        :root {
            --motion-fast: 0.16s;
            --motion-base: 0.2s;
            --motion-slow: 0.24s;
            --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
            --ease-subtle: ease-out;
            --app-font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
        }

        @keyframes heartbeat {
            0% { transform: scale(1); }
            25% { transform: scale(1.1); }
            40% { transform: scale(1); }
            60% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }

        .animate-beat {
            animation: heartbeat 1s infinite;
            display: inline-block;
        }

        /* New glow pulse animation for active calls */
        @keyframes glow-pulse {
            0% { box-shadow: 0 0 5px rgba(59, 130, 246, 0.4), 0 0 10px rgba(59, 130, 246, 0.3); }
            50% { box-shadow: 0 0 15px rgba(59, 130, 246, 0.6), 0 0 25px rgba(59, 130, 246, 0.4); }
            100% { box-shadow: 0 0 5px rgba(59, 130, 246, 0.4), 0 0 10px rgba(59, 130, 246, 0.3); }
        }
        .active-call-pulse {
            animation: glow-pulse 2s infinite;
            border: 2px solid #3b82f6;
        }

        html,
        body {
            max-width: 100%;
            overflow-x: hidden;
            font-family: var(--app-font-family);
            -webkit-text-size-adjust: 100%;
            text-size-adjust: 100%;
        }

        body {
            position: relative;
        }

        button,
        input,
        select,
        textarea,
        option {
            font-family: inherit;
        }

        *,
        *::before,
        *::after {
            box-sizing: border-box;
        }

        img,
        svg,
        canvas,
        video,
        iframe {
            max-width: 100%;
        }

        .amount-input { width: 100px; }
        .scrollable-table {
            max-height: 400px;
            overflow: auto;
            -webkit-overflow-scrolling: touch;
        }

        .dashboard-surface,
        .metric-surface,
        .session-metric,
        .session-history-item,
        .app-footer-panel,
        .call-log-mobile-card,
        .call-log-mobile-meta,
        .call-log-mobile-summary {
            min-width: 0;
        }

        .dashboard-surface p,
        .metric-surface p,
        .session-metric-value,
        .session-history-chip,
        .session-history-date,
        .session-history-range,
        .call-log-mobile-card,
        .call-log-mobile-meta,
        .call-log-mobile-summary,
        .trend-insight-chip,
        .weekly-trend-day-label,
        .weekly-trend-day-amount,
        .app-footer-panel {
            overflow-wrap: anywhere;
        }
        .fade-in-out { animation: fadeInOut 2.5s forwards; }
        @keyframes fadeInOut {
            0% { opacity: 0; transform: translateY(-10px);}
            10% { opacity: 1; transform: translateY(0);}
            90% { opacity: 1;}
            100% { opacity: 0; transform: translateY(-10px);}
        }

        @keyframes gradient {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }

        .animate-gradient {
            background-size: 200% auto;
            animation: gradient 4s linear infinite;
        }

        /* Pulse animation for icons */
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        .animate-pulse {
            animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
        }

        /* Dark Mode Toggle & Date Picker Styles */
        #dark-toggle {
            transform: scale(1);
            transition: transform 0.3s ease;
        }

        .app-header-shell {
            position: sticky;
            top: max(0.45rem, env(safe-area-inset-top));
            z-index: 44;
        }

        .app-header-card {
            border: 1px solid rgba(148, 163, 184, 0.26);
            border-radius: 1rem;
            background:
                radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 50%),
                linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.85) 100%);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
            padding: 0.78rem 0.9rem 0.7rem;
        }

        html.dark .app-header-card {
            border-color: rgba(71, 85, 105, 0.54);
            background:
                radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 52%),
                linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(2, 6, 23, 0.82) 100%);
            box-shadow: 0 16px 32px rgba(2, 6, 23, 0.34);
        }

        .app-header-main-row {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.8rem;
            flex-wrap: wrap;
        }

        .app-header-brand {
            flex: 1 1 300px;
            min-width: 0;
        }

        .app-header-title {
            margin: 0;
            font-size: clamp(1.9rem, 3.8vw, 2.55rem);
            line-height: 1.05;
            letter-spacing: 0.01em;
        }

        .app-header-subtitle {
            margin: 0.34rem 0 0;
            font-size: clamp(0.82rem, 1.6vw, 1rem);
            line-height: 1.32;
            font-weight: 600;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
        }

        .app-toolbar {
            display: flex;
            align-items: center;
            gap: 0.42rem;
            padding: 0.24rem;
            border-radius: 9999px;
            border: 1px solid rgba(148, 163, 184, 0.3);
            background: rgba(255, 255, 255, 0.74);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
        }

        html.dark .app-toolbar {
            border-color: rgba(71, 85, 105, 0.58);
            background: rgba(15, 23, 42, 0.6);
            box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.1);
        }

        #app-toolbar button {
            min-width: 44px;
            min-height: 44px;
        }

        #app-toolbar button:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.45);
        }

        .app-header-badge-row {
            margin-top: 0.52rem;
            display: flex;
            justify-content: flex-start;
        }

        .app-header-badge {
            font-size: 0.93rem;
            line-height: 1.2;
            padding: 0.3rem 0.74rem;
            border: 1px solid rgba(148, 163, 184, 0.22);
        }

        html.dark .app-header-badge {
            border-color: rgba(71, 85, 105, 0.6);
        }

        #dark-toggle:hover {
            transform: scale(1.1);
        }

        #dark-toggle i {
            transform: rotate(0deg);
            transition: transform 0.3s ease;
        }

        #dark-toggle:active i {
            transform: rotate(360deg);
        }

        @media (max-width: 768px) {
            .app-header-card {
                padding: 0.72rem 0.72rem 0.62rem;
            }

            .app-header-main-row {
                align-items: center;
                gap: 0.55rem;
            }

            .app-header-brand {
                flex: 1 1 100%;
                text-align: center;
            }

            .app-header-subtitle {
                justify-content: center;
                margin-top: 0.24rem;
                font-size: 0.8rem;
                line-height: 1.24;
            }

            .app-toolbar {
                margin: 0 auto;
            }

            .app-header-badge-row {
                margin-top: 0.42rem;
                justify-content: center;
            }

            .app-header-badge {
                font-size: 0.82rem;
                padding: 0.25rem 0.62rem;
            }
        }

        /* Date picker styles - consolidated */
        input[type="date"],
        input[type="time"],
        input[type="datetime-local"] {
            background-color: white !important;
            border: 1px solid #e2e8f0;
            color: #1a202c;
            border-radius: 0.375rem;
            padding: 0.375rem 0.75rem;
        }

        html.dark input[type="date"],
        html.dark input[type="time"],
        html.dark input[type="datetime-local"] {
            background-color: #1e293b !important;
            border-color: #475569;
            color: #f1f5f9;
        }

        input[type="date"]::-webkit-calendar-picker-indicator,
        input[type="time"]::-webkit-calendar-picker-indicator,
        input[type="datetime-local"]::-webkit-calendar-picker-indicator {
            background-color: transparent;
            cursor: pointer;
            padding: 0.25rem;
            filter: invert(0.8) brightness(1.2) saturate(0.8);
        }

        html.dark input[type="date"]::-webkit-calendar-picker-indicator,
        html.dark input[type="time"]::-webkit-calendar-picker-indicator,
        html.dark input[type="datetime-local"]::-webkit-calendar-picker-indicator {
            filter: invert(1) brightness(0.8) saturate(0.8);
        }

        /* Focus states */
        input[type="date"]:focus,
        input[type="time"]:focus,
        input[type="datetime-local"]:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
        }

        /* Enhanced Dark Mode Styles */
        html.dark {
            color-scheme: dark;
        }

        html.dark body {
            background-color: #0f172a;
            color: #f1f5f9;
        }

        html.dark .card,
        html.dark .modal,
        html.dark #call-modal,
        html.dark #settings-modal,
        html.dark #edit-cycle-modal {
            background-color: #1e293b;
            border: 1px solid #334155;
        }

        html.dark input,
        html.dark select,
        html.dark textarea {
            background-color: #334155;
            border-color: #475569;
            color: #f1f5f9;
        }

        /* Call log totals dark mode fix */
        html.dark #total-minutes,
        html.dark #total-earnings {
            color: #f1f5f9 !important;
        }

        html.dark .bg-gray-50 {
            background-color: #1f2937 !important;
        }

        html.dark tfoot tr {
            background-color: #1f2937 !important;
            color: #f1f5f9 !important;
        }

        /* Edit button visibility fixes */
        .edit-rate-btn,
        .edit-call-btn {
            display: inline-flex !important;
            align-items: center;
            padding: 0.25rem 0.5rem;
            border-radius: 0.25rem;
            background-color: #3b82f6;
            color: white !important;
            font-size: 0.75rem;
            font-weight: 600;
            gap: 0.25rem;
            transition: background-color 0.2s;
            margin: 0 0.25rem;
            border: none;
            cursor: pointer;
        }

        .edit-rate-btn:hover,
        .edit-call-btn:hover {
            background-color: #2563eb;
        }

        /* Improved text contrast in dark mode */
        html.dark .text-gray-900 {
            color: #f1f5f9 !important;
        }

        html.dark .text-gray-800 {
            color: #e2e8f0 !important;
        }

        html.dark .text-gray-700 {
            color: #cbd5e1 !important;
        }

        html.dark .bg-white {
            background-color: #1e293b !important;
        }

        html.dark .border-gray-200 {
            border-color: #334155 !important;
        }

        /* Rates card improvements */
        .rate-edit-form {
            background-color: white;
            padding: 0.5rem;
            border-radius: 0.75rem;
            margin-bottom: 1rem;
            width: 100%;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        html.dark .rate-edit-form {
            background-color: #1e293b;
            border: 1px solid #475569;
        }

        .rate-edit-form input {
            width: 100%;
            padding: 0.5rem;
            margin-bottom: 0.5rem;
            border-radius: 0.25rem;
            border: 1px solid #e2e8f0;
            transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
        }

        html.dark .rate-edit-form input {
            background-color: #334155;
            border-color: #475569;
            color: #f1f5f9;
        }

        .rate-edit-form button {
            transition: background-color 0.2s ease, color 0.2s ease;
        }

        .rates-list-item {
            display: flex;
            align-items: center;
            padding: 0.5rem;
            margin-bottom: 0.5rem;
            background-color: #f8fafc;
            border-radius: 0.375rem;
        }

        html.dark .rates-list-item {
            background-color: #1e293b;
        }

        .call-log-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
        }

        .call-log-toolbar {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.55rem;
        }

        .call-log-toolbar-primary {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            flex-wrap: wrap;
        }

        .call-log-toolbar-secondary {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            margin-left: auto;
            flex-wrap: wrap;
        }

        .call-log-search-input,
        .call-log-rate-filter {
            height: 34px;
            border: 1px solid #dbe2ee;
            border-radius: 0.6rem;
            background: #ffffff;
            color: #0f172a;
            font-size: 0.78rem;
            padding: 0 0.65rem;
        }

        .call-log-search-input {
            min-width: 180px;
        }

        .call-log-rate-filter {
            min-width: 132px;
        }

        .call-log-search-input:focus,
        .call-log-rate-filter:focus {
            outline: 2px solid rgba(59, 130, 246, 0.32);
            outline-offset: 1px;
            border-color: #60a5fa;
        }

        .call-log-reset-btn {
            height: 34px;
            border: 1px solid #dbe2ee;
            border-radius: 0.6rem;
            background: #f8fafc;
            color: #334155;
            font-size: 0.76rem;
            font-weight: 700;
            padding: 0 0.72rem;
            transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
        }

        .call-log-reset-btn:hover {
            background: #e2e8f0;
            color: #0f172a;
            border-color: #cbd5e1;
        }

        .call-log-results-summary {
            width: 100%;
            line-height: 1.15;
            margin-top: 0.1rem;
        }

        .call-log-table th,
        .call-log-table td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid #e2e8f0;
        }

        html.dark .call-log-table th,
        html.dark .call-log-table td {
            border-bottom: 1px solid #334155;
        }

        .call-log-table th {
            font-weight: 600;
            background-color: #f8fafc;
            position: sticky;
            top: 0;
            z-index: 2;
        }

        .call-log-sortable {
            cursor: pointer;
            user-select: none;
            transition: color 0.15s ease;
            white-space: nowrap;
        }

        .call-log-sortable:hover {
            color: #2563eb;
        }

        html.dark .call-log-sortable:hover {
            color: #93c5fd;
        }

        .call-log-sort-indicator {
            display: inline-block;
            width: 0.75rem;
            margin-left: 0.2rem;
            text-align: center;
            opacity: 0.45;
            font-size: 0.72rem;
            line-height: 1;
        }

        .call-log-sortable.sort-active {
            color: #1d4ed8;
        }

        html.dark .call-log-sortable.sort-active {
            color: #bfdbfe;
        }

        .call-log-sortable.sort-active .call-log-sort-indicator {
            opacity: 1;
        }

        .call-log-sortable.sort-asc .call-log-sort-indicator::before {
            content: "▲";
        }

        .call-log-sortable.sort-desc .call-log-sort-indicator::before {
            content: "▼";
        }

        html.dark .call-log-table th {
            background-color: #1e293b;
            color: #f1f5f9;
        }

        .call-log-table tr:hover {
            background-color: #f1f5f9;
        }

        html.dark .call-log-table tr:hover {
            background-color: #334155;
        }

        .tag {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 4px;
            background-color: #e2e8f0;
            color: #4a5568;
            font-size: 0.875rem;
        }

        html.dark .tag {
            background-color: #475569;
            color: #f1f5f9;
        }

        /* Modal styles with dark mode */
        #call-modal .modal,
        #settings-modal .modal,
        #edit-cycle-modal .modal {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            max-width: 500px;
            width: 90%;
        }

        html.dark #call-modal .modal,
        html.dark #settings-modal .modal,
        html.dark #edit-cycle-modal .modal {
            background-color: #1e293b;
            border-color: #475569;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
        }

        #call-modal input,
        #call-modal select,
        #settings-modal input,
        #settings-modal select,
        #edit-cycle-modal input,
        #edit-cycle-modal select {
            width: 100%;
            padding: 8px;
            margin: 4px 0 12px;
            border-radius: 4px;
            border: 1px solid #e2e8f0;
        }

        html.dark #call-modal input,
        html.dark #call-modal select,
        html.dark #settings-modal input,
        html.dark #settings-modal select,
        html.dark #edit-cycle-modal input,
        html.dark #edit-cycle-modal select {
            background-color: #334155;
            border-color: #475569;
            color: #f1f5f9;
        }

        /* Button styles with dark mode */
        .btn-primary {
            background-color: #3b82f6;
            color: white;
            transition: background-color 0.2s;
        }

        .btn-primary:hover {
            background-color: #2563eb;
        }

        html.dark .btn-primary {
            background-color: #3b82f6;
        }

        html.dark .btn-primary:hover {
            background-color: #1d4ed8;
        }

        /* Call log table specific styles */
        .call-log-table td button {
            opacity: 1 !important;
            visibility: visible !important;
        }

        .call-log-actions-wrap {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
            gap: 0.3rem;
        }

        .call-log-actions-menu-btn {
            width: 30px;
            height: 30px;
            min-height: 30px;
            border-radius: 999px;
            border: 1px solid #dbeafe;
            background: #f8fbff;
            color: #475569;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
        }

        .call-log-actions-menu-btn:hover {
            background: #e2e8f0;
            border-color: #cbd5e1;
            color: #0f172a;
        }

        .call-log-actions-menu {
            position: absolute;
            top: calc(100% + 0.35rem);
            right: 0;
            min-width: 124px;
            padding: 0.32rem;
            border: 1px solid #e2e8f0;
            border-radius: 0.66rem;
            background: #ffffff;
            box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
            opacity: 0;
            transform: translateY(-4px);
            pointer-events: none;
            z-index: 18;
            transition: opacity 0.14s ease, transform 0.14s ease;
        }

        .call-log-actions-menu.is-open {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        .call-log-actions-menu .delete-call-btn {
            width: 100%;
            height: auto;
            min-height: 0;
            border: 0;
            border-radius: 0.5rem;
            background: transparent;
            color: #be123c !important;
            padding: 0.4rem 0.5rem;
            margin: 0;
            font-size: 0.76rem;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            justify-content: flex-start;
            gap: 0.35rem;
            line-height: 1.1;
        }

        .call-log-actions-menu .delete-call-btn:hover {
            background: #fff1f2;
            color: #9f1239 !important;
        }

        html.dark .call-log-actions-menu-btn {
            border-color: #334155;
            background: rgba(15, 23, 42, 0.88);
            color: #cbd5e1;
        }

        html.dark .call-log-actions-menu-btn:hover {
            background: #334155;
            border-color: #475569;
            color: #f8fafc;
        }

        html.dark .call-log-actions-menu {
            border-color: #334155;
            background: #0f172a;
            box-shadow: 0 14px 28px rgba(2, 6, 23, 0.45);
        }

        html.dark .call-log-actions-menu .delete-call-btn {
            color: #fda4af !important;
        }

        html.dark .call-log-actions-menu .delete-call-btn:hover {
            background: rgba(136, 19, 55, 0.28);
            color: #fecdd3 !important;
        }

        .call-log-mobile-list {
            display: none;
        }

        .call-log-mobile-card {
            border: 1px solid #dbeafe;
            border-radius: 0.95rem;
            background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
            box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
            padding: 0.68rem;
            margin-bottom: 0.55rem;
        }

        html.dark .call-log-mobile-card {
            border-color: #334155;
            background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
            box-shadow: 0 12px 24px rgba(2, 6, 23, 0.26);
        }

        .call-log-mobile-top {
            display: flex;
            justify-content: space-between;
            gap: 0.55rem;
            align-items: center;
            margin-bottom: 0.45rem;
        }

        .call-log-mobile-date {
            font-size: 0.9rem;
            font-weight: 700;
            color: #0f172a;
            line-height: 1.15;
        }

        html.dark .call-log-mobile-date {
            color: #f8fafc;
        }

        .call-log-mobile-time {
            font-size: 0.76rem;
            color: #64748b;
            margin-top: 0.1rem;
            line-height: 1.15;
        }

        html.dark .call-log-mobile-time {
            color: #94a3b8;
        }

        .call-log-mobile-earnings-block {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 0.25rem;
        }

        .call-log-mobile-earnings {
            font-size: 0.95rem;
            font-weight: 700;
            color: #14532d;
            white-space: nowrap;
        }

        html.dark .call-log-mobile-earnings {
            color: #86efac;
        }

        .call-log-mobile-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 0.35rem;
            font-size: 0.76rem;
            color: #334155;
            margin-bottom: 0;
        }

        html.dark .call-log-mobile-meta {
            color: #cbd5e1;
        }

        .call-log-mobile-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.2rem;
            min-height: 26px;
            padding: 0.24rem 0.48rem;
            border: 1px solid #e2e8f0;
            border-radius: 999px;
            background: #f8fafc;
            line-height: 1.1;
            max-width: 100%;
            word-break: break-word;
        }

        html.dark .call-log-mobile-chip {
            border-color: rgba(71, 85, 105, 0.7);
            background: rgba(15, 23, 42, 0.72);
        }

        .call-log-mobile-actions {
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }

        .call-log-mobile-actions > button,
        .call-log-mobile-actions > .call-log-actions-wrap > .call-log-actions-menu-btn {
            width: 30px;
            height: 30px;
            min-height: 30px;
            border-radius: 999px;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #dbeafe;
            background: #f8fbff;
            color: #2563eb;
            padding: 0;
        }

        html.dark .call-log-mobile-actions > button,
        html.dark .call-log-mobile-actions > .call-log-actions-wrap > .call-log-actions-menu-btn {
            border-color: #334155;
            background: rgba(15, 23, 42, 0.88);
            color: #cbd5e1;
        }

        .call-log-mobile-actions > .delete-call-btn {
            background: #fff5f5;
            border-color: #fecdd3;
            color: #e11d48 !important;
        }

        html.dark .call-log-mobile-actions > .delete-call-btn {
            background: rgba(136, 19, 55, 0.18);
            border-color: rgba(190, 24, 93, 0.35);
            color: #fda4af !important;
        }

        .call-log-mobile-empty {
            border: 1px dashed #cbd5e1;
            border-radius: 0.95rem;
            background: #f8fafc;
            padding: 1.2rem;
        }

        html.dark .call-log-mobile-empty {
            border-color: #334155;
            background: #0f172a;
        }
        .call-log-total-bar {
            position: sticky;
            bottom: 0;
            z-index: 4;
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
        }

        /* notes column should truncate with full text on hover */
        .call-log-table td:nth-child(5) {
            white-space: nowrap;
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .call-note-text {
            display: inline-block;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            vertical-align: bottom;
        }

        html.dark .call-log-search-input,
        html.dark .call-log-rate-filter {
            background: #0f172a;
            border-color: #334155;
            color: #e2e8f0;
        }

        html.dark .call-log-reset-btn {
            background: #1e293b;
            border-color: #334155;
            color: #cbd5e1;
        }

        html.dark .call-log-reset-btn:hover {
            background: #334155;
            color: #f8fafc;
            border-color: #475569;
        }

        @media (max-width: 860px) {
            .call-log-toolbar-secondary {
                margin-left: 0;
                width: 100%;
            }

            .call-log-search-input,
            .call-log-rate-filter {
                flex: 1 1 140px;
                min-width: 0;
            }
        }

        /* Make goal save button always visible */
        #goal-form button[type="submit"] {
            display: inline-flex !important;
            opacity: 1 !important;
            visibility: visible !important;
            background-color: #22c55e;
            color: white;
            padding: 0.375rem 0.75rem;
            border-radius: 0.375rem;
        }

        #goal-form button[type="submit"]:hover {
            background-color: #16a34a;
        }

        /* Style for Add Rate button */
        #show-rate-add {
            background-color: #dbeafe !important;
            color: #2563eb !important;
            padding: 0.25rem 0.75rem;
            border-radius: 9999px;
            font-size: 0.875rem;
            font-weight: 500;
            transition: background-color 0.2s, color 0.2s;
        }

        #show-rate-add:hover {
            background-color: #bfdbfe !important;
        }

        html.dark #show-rate-add {
            background-color: #1e3a8a !important;
            color: #60a5fa !important;
        }

        html.dark #show-rate-add:hover {
            background-color: #1e40af !important;
        }

        /* Hidden file input */
        #file-input {
            display: none;
        }

        /* Responsive containers */
        .tracker-container {
            width: 100%;
            max-width: 320px;
        }

        @media (max-width: 640px) {
            .tracker-container {
                max-width: 100%;
            }

            .rate-edit-form button {
                width: 100%;
                margin-bottom: 0.5rem;
            }

            .rate-edit-form .flex {
                flex-direction: column;
            }

            .scrollable-table {
                max-height: min(52vh, 460px);
                border-radius: 0.85rem;
                overscroll-behavior: contain;
            }

            .call-log-table {
                min-width: 760px;
            }

            .live-call-adjust-controls {
                width: 100%;
                justify-content: center;
                flex-wrap: wrap;
            }

            .live-call-adjust-btn {
                flex: 1 1 118px;
                min-width: 0;
            }

            .hourly-heatmap-grid {
                grid-template-columns: repeat(12, minmax(0, 1fr));
            }

            .session-action-row {
                grid-template-columns: 1fr;
            }

            .session-metrics-grid {
                grid-template-columns: 1fr;
            }

            .trend-nav-row {
                gap: 0.35rem;
            }

            .trend-range-label {
                font-size: 0.66rem;
            }

            .monthly-trend-cell {
                min-height: 0;
            }

            .trend-insight-chip {
                font-size: 0.62rem;
                padding: 0.22rem 0.5rem;
            }

            .release-spotlight-banner {
                width: min(95vw, 640px);
                top: max(0.55rem, env(safe-area-inset-top));
                padding: 0.8rem 0.85rem;
            }
        }

        /* New Typography Styles */
        .font-poppins {
            font-family: var(--app-font-family);
        }

        .font-mono {
            font-family: var(--app-font-family) !important;
        }

        h1 {
            font-weight: 700;
        }

        h2, h3, h4 {
            font-weight: 600;
        }

        /* Slogan Text Color Fix */
        .slogan-text-color {
            color: #4b5563;
        }
        html.dark .slogan-text-color {
            color: #cbd5e1;
        }
        
        /* Specific fix for text visibility within the payment cycle card */
        #payment-cycle-earnings-cards p {
            color: #4b5563;
        }
        
        html.dark #payment-cycle-earnings-cards p {
            color: #cbd5e1;
        }
        
        #payment-cycle-earnings-cards p .font-semibold {
            color: #1f2937;
        }
        
        html.dark #payment-cycle-earnings-cards p .font-semibold {
            color: #f1f5f9;
        }

        .hourly-heatmap-grid {
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 0.35rem;
        }

        .hourly-heatmap-cell {
            min-height: 44px;
            border-radius: 0.55rem;
            border: 1px solid rgba(148, 163, 184, 0.25);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.1rem;
            font-size: 0.66rem;
            line-height: 1.05;
            color: #1e293b;
            transition: transform 0.14s ease;
        }

        .hourly-heatmap-cell:hover {
            transform: translateY(-1px);
        }

        .hourly-heatmap-hour {
            font-weight: 700;
        }

        .hourly-heatmap-count {
            opacity: 0.88;
        }

        html.dark .hourly-heatmap-cell {
            border-color: rgba(71, 85, 105, 0.7);
            color: #e2e8f0;
        }

        .heatmap-hover-tooltip {
            position: fixed;
            left: 0;
            top: 0;
            z-index: 120;
            max-width: min(320px, 88vw);
            padding: 0.42rem 0.6rem;
            border-radius: 0.55rem;
            border: 1px solid rgba(30, 41, 59, 0.22);
            background: rgba(15, 23, 42, 0.95);
            color: #f8fafc;
            font-size: 0.69rem;
            font-weight: 600;
            line-height: 1.3;
            letter-spacing: 0.01em;
            box-shadow: 0 10px 24px rgba(2, 6, 23, 0.32);
            pointer-events: none;
            user-select: none;
            backdrop-filter: blur(2px);
        }

        html.dark .heatmap-hover-tooltip {
            border-color: rgba(148, 163, 184, 0.35);
            background: rgba(2, 6, 23, 0.96);
            color: #e2e8f0;
        }

        .trend-analytics-grid {
            align-items: start;
            grid-auto-rows: auto;
        }

        #patterns-panel {
            border: 1px solid rgba(148, 163, 184, 0.24);
            background: linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(241, 245, 249, 0.92) 100%);
        }

        html.dark #patterns-panel {
            border-color: rgba(71, 85, 105, 0.5);
            background: linear-gradient(180deg, rgba(17, 24, 39, 0.96) 0%, rgba(15, 23, 42, 0.93) 100%);
        }

        .patterns-panel-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.75rem;
            flex-wrap: wrap;
            margin-bottom: 0.7rem;
        }

        .patterns-mode-toggle {
            display: inline-flex;
            align-items: center;
            border-radius: 9999px;
            border: 1px solid rgba(37, 99, 235, 0.24);
            padding: 0.2rem;
            background: rgba(255, 255, 255, 0.74);
            gap: 0.2rem;
        }

        .patterns-mode-btn {
            border: 1px solid rgba(148, 163, 184, 0.26);
            border-radius: 0.72rem;
            padding: 0.34rem 0.7rem;
            font-size: 0.68rem;
            font-weight: 700;
            color: #1d4ed8;
            background: linear-gradient(180deg, rgba(239, 246, 255, 0.8) 0%, rgba(219, 234, 254, 0.62) 100%);
            box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
            transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
        }

        .patterns-mode-btn:hover {
            transform: translateY(-1px);
            filter: brightness(1.02);
        }

        .patterns-mode-btn.is-active {
            background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
            border-color: rgba(59, 130, 246, 0.45);
            color: #ffffff;
            box-shadow: 0 8px 16px rgba(37, 99, 235, 0.24);
        }

        html.dark .patterns-mode-toggle {
            border-color: rgba(96, 165, 250, 0.4);
            background: rgba(30, 41, 59, 0.72);
        }

        html.dark .patterns-mode-btn {
            color: #93c5fd;
            border-color: rgba(100, 116, 139, 0.48);
            background: linear-gradient(180deg, rgba(51, 65, 85, 0.66) 0%, rgba(30, 41, 59, 0.72) 100%);
            box-shadow: 0 8px 16px rgba(2, 6, 23, 0.32);
        }

        html.dark .patterns-mode-btn.is-active {
            background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
            color: #ffffff;
        }

        :root {
            --heatmap-square-size: clamp(26px, 2.6vw, 42px);
            --patterns-visual-height: 340px;
        }

        #patterns-panel #hourly-heatmap-card,
        #patterns-panel #trend-card {
            margin: 0;
            height: var(--patterns-visual-height);
            min-height: var(--patterns-visual-height);
            max-height: var(--patterns-visual-height);
        }

        #patterns-panel #trend-analytics-grid {
            height: var(--patterns-visual-height);
            min-height: var(--patterns-visual-height);
            max-height: var(--patterns-visual-height);
        }

        .activity-mode-toolbar {
            display: flex;
            align-items: center;
            justify-content: flex-end;
        }

        .trend-analytics-grid.activity-single-mode {
            grid-template-columns: minmax(0, 1fr);
        }

        .trend-card {
            transition: box-shadow 0.18s ease, border-color 0.18s ease;
        }

        #hourly-heatmap-card,
        #trend-card {
            border: 1px solid rgba(148, 163, 184, 0.24);
            background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.92) 100%);
            flex-direction: column;
            overflow: hidden;
            min-height: 0;
            height: auto;
        }

        #hourly-heatmap-card:not(.hidden) {
            display: grid;
        }

        #trend-card:not(.hidden) {
            display: flex;
        }

        #hourly-heatmap-card.hidden,
        #trend-card.hidden {
            display: none !important;
        }

        #hourly-heatmap-summary,
        #weekly-trend-summary,
        #hourly-heatmap-card .trend-insight-wrap,
        #trend-card .trend-insight-wrap,
        #trend-card .trend-nav-row,
        #trend-card .trend-header-row,
        #monthly-trend-weekdays {
            flex: 0 0 auto;
        }

        @media (min-width: 900px) {
            .trend-analytics-grid:not(.activity-single-mode),
            .trend-analytics-grid.trend-layout-monthly:not(.activity-single-mode) {
                grid-template-columns: minmax(0, 1fr);
            }

            .trend-analytics-grid.activity-single-mode {
                grid-template-columns: minmax(0, 1fr);
            }

            .trend-analytics-grid.trend-layout-monthly #trend-card,
            .trend-analytics-grid.trend-layout-monthly #hourly-heatmap-card {
                order: initial;
            }
        }

        .trend-card.is-monthly {
            box-shadow: 0 10px 24px rgba(190, 24, 93, 0.08);
        }

        .trend-heatmap-card-muted {
            opacity: 0.98;
        }

        .weekly-trend-bars {
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            gap: 0.3rem;
            align-items: stretch;
            justify-content: stretch;
            width: 100%;
            max-width: none;
            min-height: 0;
            flex: 1 1 auto;
        }

        .trend-visual-canvas {
            display: flex;
            flex-direction: column;
            flex: 1 1 auto;
            min-height: 0;
            overflow: hidden;
        }

        .monthly-trend-canvas {
            display: grid;
            grid-template-rows: auto minmax(0, 1fr);
            gap: 0.24rem;
            width: 100%;
            height: 100%;
            margin: 0;
            flex: 1 1 auto;
            min-height: 0;
        }

        .trend-header-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.8rem;
            margin-bottom: 0.5rem;
            flex-wrap: wrap;
        }

        .trend-card.is-monthly .trend-header-row {
            margin-bottom: 0.45rem;
        }

        .trend-mode-toggle {
            display: inline-flex;
            align-items: center;
            border-radius: 9999px;
            border: 1px solid rgba(190, 24, 93, 0.2);
            padding: 0.2rem;
            background: rgba(255, 255, 255, 0.7);
            gap: 0.2rem;
        }

        .trend-mode-btn {
            border: 0;
            border-radius: 9999px;
            padding: 0.28rem 0.64rem;
            font-size: 0.68rem;
            font-weight: 700;
            color: #9f1239;
            background: transparent;
            transition: background-color 0.14s ease, color 0.14s ease;
        }

        .trend-mode-btn.is-active {
            background: #e11d48;
            color: #ffffff;
        }

        .trend-nav-row {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            margin-bottom: 0.55rem;
            flex-wrap: wrap;
        }

        .trend-card.is-monthly .trend-nav-row {
            margin-bottom: 0.5rem;
        }

        .trend-nav-btn {
            width: 28px;
            height: 28px;
            border-radius: 9999px;
            border: 1px solid rgba(190, 24, 93, 0.2);
            background: rgba(255, 255, 255, 0.78);
            color: #be123c;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.72rem;
            transition: background-color 0.14s ease, transform 0.14s ease;
        }

        .trend-nav-btn:hover:not(:disabled) {
            transform: translateY(-1px);
            background: rgba(255, 255, 255, 0.95);
        }

        .trend-nav-btn:disabled {
            opacity: 0.38;
            cursor: not-allowed;
        }

        .trend-range-label {
            font-size: 0.72rem;
            font-weight: 700;
            color: #9f1239;
            letter-spacing: 0.01em;
        }

        .trend-summary-inline {
            margin-left: auto;
            font-size: 0.64rem;
            font-weight: 700;
            color: #be123c;
            letter-spacing: 0.01em;
            white-space: nowrap;
        }

        .trend-card.is-monthly .trend-range-label {
            font-size: 0.78rem;
        }

        .trend-insight-wrap {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr) auto;
            align-items: center;
            gap: 0.5rem;
            width: 100%;
        }

        .trend-insight-label {
            font-size: 0.66rem;
            font-weight: 800;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            opacity: 0.84;
        }

        .trend-insight-chips {
            display: flex;
            align-items: center;
            gap: 0.32rem;
            flex-wrap: wrap;
            min-height: 1.4rem;
            flex: 1 1 auto;
            min-width: 0;
        }

        .trend-insight-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.22rem;
            border-radius: 9999px;
            border: 1px solid rgba(71, 85, 105, 0.24);
            background: rgba(255, 255, 255, 0.86);
            color: #0f172a;
            padding: 0.24rem 0.56rem;
            font-size: 0.64rem;
            font-weight: 700;
            line-height: 1;
        }

        .trend-insight-chip-empty {
            opacity: 0.65;
        }

        .trend-insight-wrap-rose .trend-insight-label {
            color: #be123c;
        }

        .trend-insight-chips-rose .trend-insight-chip {
            border-color: rgba(190, 24, 93, 0.26);
            background: rgba(255, 241, 242, 0.92);
            color: #9f1239;
        }

        .trend-insight-chip-best {
            border-color: rgba(225, 29, 72, 0.34) !important;
            background: rgba(255, 228, 230, 0.96) !important;
            color: #9f1239 !important;
        }

        .weekly-trend-day {
            display: grid;
            grid-template-rows: 1fr;
            align-items: stretch;
            justify-items: center;
            gap: 0.2rem;
            min-height: 0;
            height: 100%;
            width: 100%;
        }

        .weekly-trend-bar {
            width: 100%;
            height: 100%;
            border-radius: 0.38rem;
            min-height: clamp(38px, 4.6vw, 74px);
            background: rgba(244, 63, 94, 0.08);
            border: 1px solid rgba(190, 24, 93, 0.2);
            box-shadow: none;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .weekly-trend-bar-day {
            font-size: 0.56rem;
            font-weight: 800;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            color: #9f1239;
            line-height: 1;
            pointer-events: none;
        }

        .weekly-trend-day-label {
            display: none;
        }

        .weekly-trend-day-value {
            display: none;
        }

        .monthly-trend-heatmap {
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            grid-template-rows: repeat(6, minmax(0, 1fr));
            gap: 0.24rem;
            margin-bottom: 0;
            width: 100%;
            height: 100%;
            flex: 1 1 auto;
            min-height: 0;
            align-content: stretch;
            justify-content: stretch;
        }

        .monthly-trend-weekdays {
            display: grid;
            grid-template-columns: repeat(7, minmax(0, 1fr));
            gap: 0.24rem;
            margin-bottom: 0;
            width: 100%;
            justify-content: stretch;
        }

        .monthly-trend-weekday {
            text-align: center;
            font-size: 0.5rem;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            color: #be123c;
            opacity: 0.88;
        }

        .monthly-trend-cell {
            width: 100%;
            height: 100%;
            min-height: 0;
            border-radius: 0.38rem;
            border: 1px solid rgba(190, 24, 93, 0.18);
            background: rgba(255, 255, 255, 0.72);
            color: #881337;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0;
            padding: 0;
            font-size: 0.62rem;
            line-height: 1.05;
            transition: transform 0.12s ease;
        }

        .monthly-trend-cell:hover {
            transform: translateY(-1px);
        }

        .monthly-trend-cell.is-empty {
            opacity: 0.32;
            background: rgba(255, 255, 255, 0.2);
            border-style: dashed;
            pointer-events: none;
        }

        .monthly-trend-day {
            display: block;
            font-size: 0.56rem;
            font-weight: 800;
            line-height: 1;
            color: #9f1239;
        }

        .heatmap-scale {
            margin-top: 0;
            margin-left: auto;
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
            gap: 0.28rem;
            width: auto;
            padding-top: 0;
            flex: 0 0 auto;
        }

        .heatmap-scale-label {
            font-size: 0.63rem;
            font-weight: 600;
            opacity: 0.82;
            line-height: 1;
        }

        .heatmap-scale-dot {
            width: 0.5rem;
            height: 0.5rem;
            border-radius: 9999px;
            border: 1px solid transparent;
        }

        .heatmap-scale-emerald .heatmap-scale-dot:nth-child(2) { background: rgba(16, 185, 129, 0.10); border-color: rgba(16, 185, 129, 0.20); }
        .heatmap-scale-emerald .heatmap-scale-dot:nth-child(3) { background: rgba(16, 185, 129, 0.22); border-color: rgba(16, 185, 129, 0.30); }
        .heatmap-scale-emerald .heatmap-scale-dot:nth-child(4) { background: rgba(16, 185, 129, 0.34); border-color: rgba(16, 185, 129, 0.40); }
        .heatmap-scale-emerald .heatmap-scale-dot:nth-child(5) { background: rgba(16, 185, 129, 0.46); border-color: rgba(16, 185, 129, 0.52); }
        .heatmap-scale-emerald .heatmap-scale-dot:nth-child(6) { background: rgba(16, 185, 129, 0.62); border-color: rgba(16, 185, 129, 0.66); }

        .heatmap-scale-rose .heatmap-scale-dot:nth-child(2) { background: rgba(244, 63, 94, 0.10); border-color: rgba(190, 24, 93, 0.20); }
        .heatmap-scale-rose .heatmap-scale-dot:nth-child(3) { background: rgba(244, 63, 94, 0.22); border-color: rgba(190, 24, 93, 0.30); }
        .heatmap-scale-rose .heatmap-scale-dot:nth-child(4) { background: rgba(244, 63, 94, 0.34); border-color: rgba(190, 24, 93, 0.40); }
        .heatmap-scale-rose .heatmap-scale-dot:nth-child(5) { background: rgba(244, 63, 94, 0.46); border-color: rgba(190, 24, 93, 0.52); }
        .heatmap-scale-rose .heatmap-scale-dot:nth-child(6) { background: rgba(244, 63, 94, 0.62); border-color: rgba(190, 24, 93, 0.66); }

        html.dark .heatmap-scale-label {
            color: #cbd5e1;
            opacity: 0.9;
        }

        @media (max-width: 900px) {
            :root {
                --heatmap-square-size: clamp(20px, 5.6vw, 30px);
            }

            .patterns-panel-header {
                gap: 0.55rem;
            }

            .patterns-mode-toggle {
                width: 100%;
                justify-content: flex-start;
            }

            .trend-insight-wrap {
                grid-template-columns: 1fr;
                row-gap: 0.34rem;
            }

            .heatmap-scale {
                margin-left: 0;
                justify-content: flex-start;
            }
        }

        #hourly-heatmap-card {
            grid-template-rows: auto minmax(0, 1fr) auto;
            row-gap: 0.3rem;
        }

        .hourly-heatmap-grid {
            grid-template-columns: repeat(12, minmax(0, 1fr));
            grid-template-rows: repeat(2, minmax(0, 1fr));
            gap: 0.24rem;
            width: 100%;
            height: 100%;
            min-height: 0;
            align-content: stretch;
            justify-content: stretch;
            margin-inline: 0;
        }

        #hourly-heatmap-card .trend-insight-wrap {
            margin-top: 0;
            align-self: end;
        }

        .hourly-heatmap-cell {
            width: 100%;
            height: 100%;
            min-height: 0;
            border-radius: 0.3rem;
            padding: 0;
            aspect-ratio: auto;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        @media (max-width: 900px) {
            .hourly-heatmap-grid {
                gap: 0.2rem;
            }
        }

        .hourly-heatmap-hour {
            display: inline-block;
            font-size: 0.62rem;
            font-weight: 700;
            letter-spacing: 0.01em;
            color: #0f172a;
            line-height: 1;
            pointer-events: none;
        }

        .hourly-heatmap-count {
            display: none;
        }

        .trend-insight-wrap {
            margin-top: 0.4rem;
        }

        .trend-insight-label {
            font-size: 0.6rem;
        }

        .trend-insight-chip {
            padding: 0.18rem 0.42rem;
            font-size: 0.58rem;
        }

        .trend-nav-row {
            margin-bottom: 0.38rem;
        }

            .monthly-trend-weekday {
                font-size: 0.46rem;
            }

            #patterns-panel #hourly-heatmap-card,
            #patterns-panel #trend-card,
            #patterns-panel #trend-analytics-grid {
                height: 300px;
                min-height: 300px;
                max-height: 300px;
            }

        .trend-header-row h3,
        #hourly-heatmap-card h3 {
            font-size: 1.08rem;
            margin-bottom: 0.25rem;
        }

        .trend-range-label {
            font-size: 0.66rem;
        }

        .trend-card.is-monthly .trend-range-label {
            font-size: 0.7rem;
        }

            .monthly-trend-amount {
                display: none;
            }

        @media (max-width: 640px) {
            #patterns-panel #hourly-heatmap-card,
            #patterns-panel #trend-card,
            #patterns-panel #trend-analytics-grid {
                height: 280px;
                min-height: 280px;
                max-height: 280px;
            }
        }

        html.dark .weekly-trend-bar {
            border-color: rgba(251, 113, 133, 0.32);
            background: rgba(244, 63, 94, 0.12);
        }

        html.dark .weekly-trend-bar-day {
            color: #fecdd3;
        }

        html.dark .weekly-trend-day-label {
            color: #fda4af;
        }

        html.dark .weekly-trend-day-value {
            color: #fecdd3;
        }

        html.dark .hourly-heatmap-hour {
            color: #dcfce7;
        }

        html.dark .trend-mode-toggle {
            border-color: rgba(251, 113, 133, 0.34);
            background: rgba(30, 41, 59, 0.66);
        }

        html.dark .trend-mode-btn {
            color: #fda4af;
        }

        html.dark .trend-mode-btn.is-active {
            background: #f43f5e;
            color: #ffffff;
        }

        html.dark .trend-nav-btn {
            border-color: rgba(251, 113, 133, 0.34);
            background: rgba(30, 41, 59, 0.62);
            color: #fda4af;
        }

        html.dark .trend-range-label {
            color: #fda4af;
        }

        html.dark .trend-summary-inline {
            color: #fecdd3;
        }

        html.dark .monthly-trend-cell {
            border-color: rgba(251, 113, 133, 0.26);
            background: rgba(15, 23, 42, 0.62);
            color: #fecdd3;
        }

        html.dark #hourly-heatmap-card,
        html.dark #trend-card {
            border-color: rgba(71, 85, 105, 0.44);
            background: linear-gradient(180deg, rgba(17, 24, 39, 0.94) 0%, rgba(15, 23, 42, 0.9) 100%);
        }

        html.dark .monthly-trend-weekday {
            color: #fda4af;
        }

        html.dark .monthly-trend-day {
            color: #fecdd3;
        }

        html.dark .trend-insight-label {
            color: #e2e8f0;
        }

        html.dark .trend-insight-chip {
            border-color: rgba(148, 163, 184, 0.36);
            background: rgba(15, 23, 42, 0.72);
            color: #e2e8f0;
        }

        html.dark .trend-insight-chips-rose .trend-insight-chip {
            border-color: rgba(251, 113, 133, 0.4);
            background: rgba(80, 7, 36, 0.42);
            color: #fecdd3;
        }

        html.dark .trend-insight-chip-best {
            background: rgba(136, 19, 55, 0.5) !important;
            border-color: rgba(251, 113, 133, 0.52) !important;
            color: #fecdd3 !important;
        }

        html.dark .trend-card.is-monthly {
            box-shadow: 0 10px 24px rgba(3, 7, 18, 0.28);
        }

        .session-tracker-intro {
            letter-spacing: 0.01em;
        }

        .session-action-row {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 0.5rem;
        }

        #session-start-time[readonly],
        #session-end-time[readonly] {
            cursor: default;
            background: rgba(255, 255, 255, 0.78);
        }

        .session-action-btn {
            border-radius: 0.85rem;
            border: 1px solid rgba(148, 163, 184, 0.25);
            padding: 0.62rem 0.85rem;
            font-size: 0.86rem;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.32rem;
            transition: transform 0.16s ease, box-shadow 0.18s ease, filter 0.18s ease;
            box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
        }

        .session-action-btn:hover:not(:disabled) {
            transform: translateY(-1px);
            filter: brightness(1.02);
        }

        .session-action-btn:disabled {
            opacity: 0.45;
            cursor: not-allowed;
            box-shadow: none;
            transform: none;
        }

        .session-action-start {
            background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
            color: #ffffff;
            border-color: rgba(16, 185, 129, 0.45);
        }

        .session-action-pause {
            background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
            color: #1f2937;
            border-color: rgba(217, 119, 6, 0.38);
        }

        .session-action-end {
            background: linear-gradient(180deg, #fb7185 0%, #ef4444 100%);
            color: #ffffff;
            border-color: rgba(239, 68, 68, 0.45);
        }

        .session-live-panel {
            border: 1px solid rgba(99, 102, 241, 0.35);
            border-radius: 0.95rem;
            padding: 0.85rem;
            background: linear-gradient(145deg, rgba(224, 231, 255, 0.72) 0%, rgba(238, 242, 255, 0.55) 100%);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 24px rgba(15, 23, 42, 0.08);
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .session-live-panel.is-active {
            border-color: rgba(16, 185, 129, 0.42);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 12px 28px rgba(16, 185, 129, 0.16);
        }

        .session-live-panel.is-paused {
            border-color: rgba(245, 158, 11, 0.42);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 12px 28px rgba(245, 158, 11, 0.16);
        }

        .session-live-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            margin-bottom: 0.75rem;
        }

        .session-live-left {
            display: flex;
            align-items: center;
            gap: 0.42rem;
            min-width: 0;
            flex-wrap: wrap;
        }

        .session-state-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            border-radius: 9999px;
            padding: 0.24rem 0.62rem;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.02em;
            border: 1px solid rgba(99, 102, 241, 0.3);
            color: #4338ca;
            background: rgba(238, 242, 255, 0.92);
        }

        .session-state-pill .session-state-dot {
            width: 0.42rem;
            height: 0.42rem;
            border-radius: 9999px;
            background: currentColor;
            opacity: 0.9;
        }

        .session-state-pill.is-active {
            color: #047857;
            border-color: rgba(16, 185, 129, 0.42);
            background: rgba(209, 250, 229, 0.92);
        }

        .session-state-pill.is-paused {
            color: #b45309;
            border-color: rgba(245, 158, 11, 0.42);
            background: rgba(254, 243, 199, 0.92);
        }

        .session-state-pill.is-idle {
            color: #4338ca;
            border-color: rgba(99, 102, 241, 0.3);
            background: rgba(238, 242, 255, 0.92);
        }

        .session-live-clock {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            line-height: 1.1;
        }

        .session-live-clock-label {
            font-size: 0.64rem;
            font-weight: 700;
            color: #475569;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .session-live-clock-value {
            font-family: var(--app-font-family);
            font-size: 1.02rem;
            font-weight: 800;
            color: #0f172a;
        }

        .session-metrics-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 0.45rem;
            margin-bottom: 0.72rem;
        }

        .session-metric {
            border-radius: 0.72rem;
            border: 1px solid rgba(148, 163, 184, 0.35);
            background: rgba(255, 255, 255, 0.72);
            padding: 0.45rem 0.52rem;
            display: flex;
            flex-direction: column;
            gap: 0.12rem;
        }

        .session-metric-label {
            font-size: 0.65rem;
            font-weight: 700;
            color: #475569;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .session-metric-value {
            font-size: 0.82rem;
            font-weight: 700;
            color: #1e293b;
            font-family: var(--app-font-family);
        }

        .session-utilization-track {
            width: 100%;
            height: 0.46rem;
            border-radius: 9999px;
            overflow: hidden;
            background: rgba(99, 102, 241, 0.2);
        }

        .session-utilization-fill {
            height: 100%;
            background: linear-gradient(90deg, #22d3ee 0%, #10b981 50%, #22c55e 100%);
            border-radius: 9999px;
            transition: width 0.24s ease;
        }

        .session-utilization-hint {
            margin-top: 0.44rem;
            font-size: 0.68rem;
            color: #475569;
            line-height: 1.2;
            font-weight: 600;
        }

        .session-history-open-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.28rem;
            border-radius: 9999px;
            border: 1px solid rgba(99, 102, 241, 0.38);
            background: rgba(99, 102, 241, 0.12);
            color: #3730a3;
            font-size: 0.66rem;
            font-weight: 700;
            line-height: 1;
            padding: 0.28rem 0.62rem;
            transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
        }

        .session-history-open-btn:hover {
            transform: translateY(-1px);
            background: rgba(99, 102, 241, 0.18);
            border-color: rgba(79, 70, 229, 0.52);
        }

        .session-history-count-label {
            font-size: 0.62rem;
            font-weight: 700;
            border-radius: 9999px;
            border: 1px solid rgba(148, 163, 184, 0.32);
            background: rgba(241, 245, 249, 0.76);
            padding: 0.2rem 0.48rem;
            color: #475569;
            line-height: 1;
            white-space: nowrap;
        }

        .session-history-wrap {
            border: 1px solid rgba(99, 102, 241, 0.24);
            border-radius: 0.9rem;
            background: rgba(248, 250, 252, 0.82);
            padding: 0.65rem;
        }

        .session-history-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            margin-bottom: 0.5rem;
        }

        .session-history-title {
            font-size: 0.74rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: #334155;
        }

        .session-history-clear-btn {
            border-radius: 9999px;
            border: 1px solid rgba(148, 163, 184, 0.45);
            background: rgba(255, 255, 255, 0.9);
            color: #334155;
            font-size: 0.66rem;
            font-weight: 700;
            padding: 0.2rem 0.58rem;
            transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
        }

        .session-history-clear-btn:hover:not(:disabled) {
            background: rgba(241, 245, 249, 0.95);
            border-color: rgba(100, 116, 139, 0.55);
            transform: translateY(-1px);
        }

        .session-history-list {
            display: flex;
            flex-direction: column;
            gap: 0.38rem;
            max-height: 172px;
            overflow: auto;
            padding-right: 0.18rem;
        }

        #session-history-modal .session-history-list {
            max-height: min(56vh, 440px);
        }

        .session-history-item {
            border: 1px solid rgba(148, 163, 184, 0.28);
            border-radius: 0.72rem;
            background: rgba(255, 255, 255, 0.78);
            padding: 0.45rem 0.5rem;
        }

        .session-history-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 0.28rem;
        }

        .session-history-row + .session-history-row {
            margin-top: 0.32rem;
        }

        .session-history-date {
            font-size: 0.68rem;
            font-weight: 800;
            color: #1e293b;
        }

        .session-history-range {
            font-size: 0.66rem;
            font-weight: 700;
            color: #475569;
        }

        .session-history-chip {
            display: inline-flex;
            align-items: center;
            border-radius: 9999px;
            border: 1px solid rgba(148, 163, 184, 0.35);
            background: rgba(241, 245, 249, 0.92);
            color: #334155;
            font-size: 0.62rem;
            font-weight: 700;
            line-height: 1;
            padding: 0.22rem 0.44rem;
        }

        .session-history-empty {
            font-size: 0.68rem;
            color: #64748b;
            font-weight: 600;
            text-align: center;
            padding: 0.42rem 0.2rem;
        }

        .pattern-detail-header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.75rem;
            flex-wrap: wrap;
            padding-right: 3.1rem;
        }

        .pattern-detail-nav {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
        }

        .pattern-detail-nav-btn {
            width: 34px;
            height: 34px;
            border-radius: 9999px;
            border: 1px solid rgba(99, 102, 241, 0.35);
            background: rgba(99, 102, 241, 0.12);
            color: #3730a3;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.78rem;
            transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
        }

        .pattern-detail-nav-btn:hover:not(:disabled) {
            transform: translateY(-1px);
            background: rgba(99, 102, 241, 0.18);
            border-color: rgba(79, 70, 229, 0.5);
        }

        .pattern-detail-nav-btn:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

        .pattern-detail-summary-grid {
            margin-top: 0.72rem;
            display: grid;
            gap: 0.5rem;
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .pattern-detail-summary-card {
            border-radius: 0.72rem;
            border: 1px solid rgba(148, 163, 184, 0.3);
            background: rgba(248, 250, 252, 0.86);
            padding: 0.45rem 0.6rem;
        }

        .pattern-detail-summary-label {
            display: block;
            font-size: 0.62rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.045em;
            color: #64748b;
        }

        .pattern-detail-summary-value {
            display: block;
            margin-top: 0.16rem;
            font-size: 0.84rem;
            font-weight: 800;
            color: #1e293b;
            line-height: 1.2;
        }

        .pattern-detail-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.75rem;
        }

        .pattern-detail-section {
            border-radius: 0.85rem;
            border: 1px solid rgba(148, 163, 184, 0.28);
            background: rgba(248, 250, 252, 0.78);
            padding: 0.65rem;
            min-height: 0;
        }

        .pattern-detail-section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.45rem;
            gap: 0.5rem;
        }

        .pattern-detail-section-title {
            font-size: 0.72rem;
            font-weight: 800;
            letter-spacing: 0.045em;
            text-transform: uppercase;
            color: #334155;
        }

        .pattern-detail-list {
            display: flex;
            flex-direction: column;
            gap: 0.42rem;
            max-height: min(46vh, 380px);
            overflow: auto;
            padding-right: 0.12rem;
        }

        .pattern-detail-item {
            border-radius: 0.7rem;
            border: 1px solid rgba(148, 163, 184, 0.24);
            background: rgba(255, 255, 255, 0.8);
            padding: 0.46rem 0.52rem;
        }

        .pattern-detail-item-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        .pattern-detail-item-row + .pattern-detail-item-row {
            margin-top: 0.2rem;
        }

        .pattern-detail-item-main {
            font-size: 0.7rem;
            font-weight: 800;
            color: #1e293b;
        }

        .pattern-detail-item-amount {
            font-size: 0.68rem;
            font-weight: 800;
            color: #0f766e;
        }

        .pattern-detail-item-meta {
            font-size: 0.64rem;
            font-weight: 700;
            color: #475569;
        }

        .pattern-detail-item-note {
            margin-top: 0.28rem;
            font-size: 0.62rem;
            color: #64748b;
            line-height: 1.3;
            word-break: break-word;
        }

        .pattern-detail-empty {
            border-radius: 0.7rem;
            border: 1px dashed rgba(148, 163, 184, 0.34);
            background: rgba(241, 245, 249, 0.65);
            padding: 0.62rem 0.5rem;
            text-align: center;
            font-size: 0.68rem;
            font-weight: 700;
            color: #64748b;
        }

        html.dark .session-action-btn {
            box-shadow: 0 10px 22px rgba(2, 6, 23, 0.36);
        }

        html.dark #session-start-time[readonly],
        html.dark #session-end-time[readonly] {
            background: rgba(30, 41, 59, 0.78);
        }

        html.dark .session-action-pause {
            color: #111827;
        }

        html.dark .session-live-panel {
            border-color: rgba(99, 102, 241, 0.46);
            background: linear-gradient(145deg, rgba(30, 41, 59, 0.88) 0%, rgba(15, 23, 42, 0.78) 100%);
            box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.12), 0 14px 28px rgba(2, 6, 23, 0.45);
        }

        html.dark .session-live-panel.is-active {
            border-color: rgba(16, 185, 129, 0.52);
            box-shadow: inset 0 1px 0 rgba(110, 231, 183, 0.16), 0 14px 30px rgba(16, 185, 129, 0.22);
        }

        html.dark .session-live-panel.is-paused {
            border-color: rgba(245, 158, 11, 0.52);
            box-shadow: inset 0 1px 0 rgba(252, 211, 77, 0.16), 0 14px 30px rgba(245, 158, 11, 0.22);
        }

        html.dark .session-state-pill {
            color: #c4b5fd;
            border-color: rgba(165, 180, 252, 0.42);
            background: rgba(49, 46, 129, 0.35);
        }

        html.dark .session-state-pill.is-active {
            color: #6ee7b7;
            border-color: rgba(16, 185, 129, 0.5);
            background: rgba(6, 95, 70, 0.4);
        }

        html.dark .session-state-pill.is-paused {
            color: #fcd34d;
            border-color: rgba(245, 158, 11, 0.5);
            background: rgba(120, 53, 15, 0.42);
        }

        html.dark .session-live-clock-label,
        html.dark .session-metric-label,
        html.dark .session-utilization-hint {
            color: #cbd5e1;
        }

        html.dark .session-live-clock-value,
        html.dark .session-metric-value {
            color: #f8fafc;
        }

        html.dark .session-metric {
            border-color: rgba(100, 116, 139, 0.52);
            background: rgba(15, 23, 42, 0.58);
        }

        html.dark .session-history-open-btn {
            border-color: rgba(129, 140, 248, 0.46);
            background: rgba(49, 46, 129, 0.36);
            color: #c7d2fe;
        }

        html.dark .session-history-open-btn:hover {
            background: rgba(67, 56, 202, 0.45);
            border-color: rgba(165, 180, 252, 0.6);
        }

        html.dark .session-history-count-label {
            border-color: rgba(100, 116, 139, 0.56);
            background: rgba(15, 23, 42, 0.66);
            color: #94a3b8;
        }

        @media (max-width: 640px) {
            .session-live-header {
                align-items: flex-start;
            }

            .session-live-clock {
                margin-left: auto;
            }

            .session-history-count-label {
                display: none;
            }
        }

        html.dark .session-history-wrap {
            border-color: rgba(99, 102, 241, 0.34);
            background: rgba(15, 23, 42, 0.62);
        }

        html.dark .session-history-title {
            color: #cbd5e1;
        }

        html.dark .session-history-clear-btn {
            border-color: rgba(100, 116, 139, 0.55);
            background: rgba(30, 41, 59, 0.82);
            color: #e2e8f0;
        }

        html.dark .session-history-clear-btn:hover:not(:disabled) {
            background: rgba(51, 65, 85, 0.9);
            border-color: rgba(148, 163, 184, 0.6);
        }

        html.dark .session-history-item {
            border-color: rgba(100, 116, 139, 0.48);
            background: rgba(30, 41, 59, 0.7);
        }

        html.dark .session-history-date {
            color: #e2e8f0;
        }

        html.dark .session-history-range {
            color: #94a3b8;
        }

        html.dark .session-history-chip {
            border-color: rgba(100, 116, 139, 0.6);
            background: rgba(15, 23, 42, 0.75);
            color: #cbd5e1;
        }

        html.dark .session-history-empty {
            color: #94a3b8;
        }

        html.dark .pattern-detail-nav-btn {
            border-color: rgba(129, 140, 248, 0.44);
            background: rgba(49, 46, 129, 0.34);
            color: #c7d2fe;
        }

        html.dark .pattern-detail-nav-btn:hover:not(:disabled) {
            background: rgba(67, 56, 202, 0.44);
            border-color: rgba(165, 180, 252, 0.6);
        }

        html.dark .pattern-detail-summary-card,
        html.dark .pattern-detail-section,
        html.dark .pattern-detail-item {
            border-color: rgba(100, 116, 139, 0.5);
            background: rgba(15, 23, 42, 0.66);
        }

        html.dark .pattern-detail-summary-label {
            color: #94a3b8;
        }

        html.dark .pattern-detail-summary-value,
        html.dark .pattern-detail-item-main {
            color: #f8fafc;
        }

        html.dark .pattern-detail-section-title {
            color: #cbd5e1;
        }

        html.dark .pattern-detail-item-amount {
            color: #5eead4;
        }

        html.dark .pattern-detail-item-meta,
        html.dark .pattern-detail-item-note {
            color: #94a3b8;
        }

        html.dark .pattern-detail-empty {
            border-color: rgba(100, 116, 139, 0.56);
            background: rgba(30, 41, 59, 0.48);
            color: #94a3b8;
        }

        @media (max-width: 640px) {
            .pattern-detail-header {
                padding-right: 2.6rem;
            }

            .pattern-detail-summary-grid {
                grid-template-columns: 1fr;
            }

            .pattern-detail-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Session-style visual system for action buttons across the app */
        button[class*="bg-"]:not([class*="rounded-full"]):not(.call-log-actions-menu-btn):not(.call-log-reset-btn):not(.release-spotlight-close):not(.app-footer-collapsible-toggle):not(.onboarding-cue-close),
        .btn-primary,
        .edit-rate-btn,
        .edit-call-btn,
        #show-rate-add {
            border-radius: 0.85rem !important;
            border: 1px solid rgba(148, 163, 184, 0.25);
            box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
            font-weight: 700;
            letter-spacing: 0.01em;
            transition: transform 0.16s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
        }

        button[class*="bg-"]:not([class*="rounded-full"]):not(.call-log-actions-menu-btn):not(.call-log-reset-btn):not(.release-spotlight-close):not(.app-footer-collapsible-toggle):not(.onboarding-cue-close):hover:not(:disabled),
        .btn-primary:hover:not(:disabled),
        .edit-rate-btn:hover:not(:disabled),
        .edit-call-btn:hover:not(:disabled),
        #show-rate-add:hover:not(:disabled) {
            transform: translateY(-1px);
            filter: brightness(1.02);
        }

        button[class*="bg-"]:not([class*="rounded-full"]):not(.call-log-actions-menu-btn):not(.call-log-reset-btn):not(.release-spotlight-close):not(.app-footer-collapsible-toggle):not(.onboarding-cue-close):active:not(:disabled),
        .btn-primary:active:not(:disabled),
        .edit-rate-btn:active:not(:disabled),
        .edit-call-btn:active:not(:disabled),
        #show-rate-add:active:not(:disabled) {
            transform: translateY(0);
        }

        button[class*="bg-"]:not([class*="rounded-full"]):not(.call-log-actions-menu-btn):not(.call-log-reset-btn):not(.release-spotlight-close):not(.app-footer-collapsible-toggle):not(.onboarding-cue-close):disabled,
        .btn-primary:disabled,
        .edit-rate-btn:disabled,
        .edit-call-btn:disabled,
        #show-rate-add:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            box-shadow: none;
            transform: none;
        }

        button.bg-blue-500,
        button.bg-blue-600,
        .btn-primary,
        .edit-rate-btn,
        .edit-call-btn {
            background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%) !important;
            border-color: rgba(59, 130, 246, 0.45);
            color: #ffffff !important;
        }

        button.bg-green-500,
        button.bg-green-600,
        button.bg-emerald-600,
        button.bg-emerald-700 {
            background: linear-gradient(180deg, #34d399 0%, #10b981 100%) !important;
            border-color: rgba(16, 185, 129, 0.45);
            color: #ffffff !important;
        }

        button.bg-red-500,
        button.bg-red-600 {
            background: linear-gradient(180deg, #fb7185 0%, #ef4444 100%) !important;
            border-color: rgba(239, 68, 68, 0.45);
            color: #ffffff !important;
        }

        button.bg-yellow-500,
        button.bg-amber-500,
        button.bg-yellow-400 {
            background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%) !important;
            border-color: rgba(217, 119, 6, 0.38);
            color: #1f2937 !important;
        }

        button.bg-indigo-500,
        button.bg-indigo-600 {
            background: linear-gradient(180deg, #818cf8 0%, #6366f1 100%) !important;
            border-color: rgba(99, 102, 241, 0.42);
            color: #ffffff !important;
        }

        button.bg-purple-500,
        button.bg-purple-600 {
            background: linear-gradient(180deg, #a78bfa 0%, #8b5cf6 100%) !important;
            border-color: rgba(139, 92, 246, 0.42);
            color: #ffffff !important;
        }

        button.bg-cyan-600 {
            background: linear-gradient(180deg, #22d3ee 0%, #06b6d4 100%) !important;
            border-color: rgba(6, 182, 212, 0.45);
            color: #ffffff !important;
        }

        button.bg-slate-800,
        button.bg-slate-700 {
            background: linear-gradient(180deg, #334155 0%, #1e293b 100%) !important;
            border-color: rgba(71, 85, 105, 0.5);
            color: #ffffff !important;
        }

        button.bg-gray-300,
        button.bg-gray-200,
        button.bg-gray-100 {
            background: linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%) !important;
            border-color: rgba(148, 163, 184, 0.35);
            color: #334155 !important;
        }

        #show-rate-add {
            background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
            color: #1d4ed8;
            border-color: rgba(96, 165, 250, 0.45);
            min-height: 42px;
        }

        html.dark button[class*="bg-"]:not([class*="rounded-full"]):not(.call-log-actions-menu-btn):not(.call-log-reset-btn):not(.release-spotlight-close):not(.app-footer-collapsible-toggle):not(.onboarding-cue-close),
        html.dark .btn-primary,
        html.dark .edit-rate-btn,
        html.dark .edit-call-btn,
        html.dark #show-rate-add {
            box-shadow: 0 10px 22px rgba(2, 6, 23, 0.36);
            border-color: rgba(100, 116, 139, 0.48);
        }

        html.dark button.bg-gray-300,
        html.dark button.bg-gray-200,
        html.dark button.bg-gray-100 {
            background: linear-gradient(180deg, #334155 0%, #1e293b 100%) !important;
            color: #e2e8f0 !important;
            border-color: rgba(100, 116, 139, 0.5);
        }

        html.dark #show-rate-add {
            background: linear-gradient(180deg, rgba(37, 99, 235, 0.34) 0%, rgba(30, 64, 175, 0.28) 100%);
            color: #bfdbfe;
            border-color: rgba(96, 165, 250, 0.48);
        }

        html.dark .session-utilization-track {
            background: rgba(79, 70, 229, 0.28);
        }

        /* Fix for live call info alignment */
        #live-call-info {
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        #live-call-info .flex {
            width: 100%;
        }

        .live-call-adjust-controls {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }

        .live-call-adjust-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            min-width: 72px;
            justify-content: center;
            border-radius: 9999px;
            border: 1px solid rgba(59, 130, 246, 0.28);
            padding: 0.38rem 0.74rem;
            font-size: 0.79rem;
            font-weight: 600;
            letter-spacing: 0.01em;
            transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
            box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
            user-select: none;
        }

        .live-call-adjust-btn i {
            font-size: 0.7rem;
            opacity: 0.88;
        }

        .live-call-adjust-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
        }

        .live-call-adjust-btn:active {
            transform: translateY(0);
        }

        .live-call-adjust-minus {
            background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
            color: #1e3a8a;
            border-color: #93c5fd;
        }

        .live-call-adjust-minus:hover {
            background: linear-gradient(180deg, #e0ecff 0%, #c7ddff 100%);
        }

        .live-call-adjust-plus {
            background: linear-gradient(180deg, #ecfeff 0%, #ccfbf1 100%);
            color: #0f766e;
            border-color: #5eead4;
        }

        .live-call-adjust-plus:hover {
            background: linear-gradient(180deg, #dffbf7 0%, #bdf6ea 100%);
        }

        html.dark .live-call-adjust-btn {
            box-shadow: 0 8px 18px rgba(2, 6, 23, 0.34);
        }

        html.dark .live-call-adjust-minus {
            background: linear-gradient(180deg, rgba(30, 58, 138, 0.34) 0%, rgba(30, 64, 175, 0.28) 100%);
            color: #bfdbfe;
            border-color: rgba(96, 165, 250, 0.48);
        }

        html.dark .live-call-adjust-plus {
            background: linear-gradient(180deg, rgba(15, 118, 110, 0.34) 0%, rgba(13, 148, 136, 0.28) 100%);
            color: #99f6e4;
            border-color: rgba(45, 212, 191, 0.45);
        }

        .release-spotlight-banner {
            position: fixed;
            top: max(0.75rem, env(safe-area-inset-top));
            left: 50%;
            transform: translateX(-50%);
            width: min(92vw, 680px);
            z-index: 88;
            border: 1px solid rgba(59, 130, 246, 0.28);
            border-radius: 1rem;
            background: rgba(255, 255, 255, 0.96);
            box-shadow: 0 20px 42px rgba(15, 23, 42, 0.18);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            padding: 0.9rem 1rem;
            animation: release-spotlight-in 180ms ease-out;
        }

        .release-spotlight-hidden {
            display: none !important;
        }

        .release-spotlight-content {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.75rem;
        }

        .release-spotlight-title {
            font-size: 0.9rem;
            font-weight: 700;
            color: #0f172a;
        }

        .release-spotlight-text {
            margin-top: 0.25rem;
            font-size: 0.8rem;
            color: #334155;
            line-height: 1.35;
        }

        .release-spotlight-actions {
            margin-top: 0.6rem;
            display: flex;
            flex-wrap: wrap;
            gap: 0.45rem;
        }

        .release-spotlight-btn {
            border: 1px solid rgba(148, 163, 184, 0.28);
            border-radius: 0.85rem;
            padding: 0.45rem 0.92rem;
            font-size: 0.76rem;
            font-weight: 700;
            transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
            box-shadow: 0 8px 16px rgba(15, 23, 42, 0.14);
        }

        .release-spotlight-btn:hover {
            transform: translateY(-1px);
            filter: brightness(1.02);
        }

        .release-spotlight-btn-primary {
            background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
            border-color: rgba(59, 130, 246, 0.45);
            color: #fff;
        }

        .release-spotlight-btn-primary:hover {
            background: linear-gradient(180deg, #6bb0ff 0%, #3c86f6 100%);
        }

        .release-spotlight-btn-muted {
            background: linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%);
            border-color: rgba(148, 163, 184, 0.35);
            color: #1f2937;
        }

        .release-spotlight-btn-muted:hover {
            background: linear-gradient(180deg, #eceef2 0%, #dde2ea 100%);
        }

        .release-spotlight-close {
            width: 30px;
            height: 30px;
            border-radius: 9999px;
            border: 0;
            background: #e2e8f0;
            color: #475569;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .release-spotlight-close:hover {
            background: #cbd5e1;
            color: #1f2937;
        }

        html.dark .release-spotlight-banner {
            border-color: rgba(96, 165, 250, 0.28);
            background: rgba(2, 6, 23, 0.92);
            box-shadow: 0 22px 44px rgba(2, 6, 23, 0.46);
        }

        html.dark .release-spotlight-title {
            color: #e2e8f0;
        }

        html.dark .release-spotlight-text {
            color: #cbd5e1;
        }

        html.dark .release-spotlight-btn-muted {
            background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
            color: #e2e8f0;
            border-color: rgba(100, 116, 139, 0.52);
            box-shadow: 0 10px 22px rgba(2, 6, 23, 0.36);
        }

        html.dark .release-spotlight-btn-muted:hover,
        html.dark .release-spotlight-close:hover {
            background: #475569;
        }

        html.dark .release-spotlight-btn-primary {
            box-shadow: 0 10px 22px rgba(2, 6, 23, 0.4);
        }

        html.dark .release-spotlight-close {
            background: #334155;
            color: #cbd5e1;
        }

        @keyframes release-spotlight-in {
            from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
            to { opacity: 1; transform: translateX(-50%) translateY(0); }
        }

        #active-call-recovery-banner {
            box-shadow: 0 10px 24px rgba(120, 53, 15, 0.08);
        }

        html.dark #active-call-recovery-banner {
            box-shadow: 0 12px 28px rgba(2, 6, 23, 0.22);
        }

        .delete-cycle-btn {
            background: none;
            border: none;
            cursor: pointer;
            padding: 0;
        }

        .edit-cycle-btn {
            background: none;
            border: none;
            cursor: pointer;
            padding: 0;
        }

        /* Feedback Modal Styles */
        #feedback-modal .modal {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            max-width: 500px;
            width: 90%;
        }

        html.dark #feedback-modal .modal {
            background-color: #1e293b;
            border-color: #475569;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
        }

        #feedback-modal input,
        #feedback-modal select,
        #feedback-modal textarea {
            width: 100%;
            padding: 8px;
            margin: 4px 0 12px;
            border-radius: 4px;
            border: 1px solid #e2e8f0;
        }

        html.dark #feedback-modal input,
        html.dark #feedback-modal select,
        html.dark #feedback-modal textarea {
            background-color: #334155;
            border-color: #475569;
            color: #f1f5f9;
        }

        #feedback-modal textarea {
            resize: vertical;
            min-height: 120px;
        }

        /* Settings modal: robust scroll in split-screen / short viewports */
        #settings-modal {
            align-items: center;
            overflow-y: auto;
            padding: 1rem;
        }

        #settings-modal .modal {
            max-height: calc(100vh - 2rem);
            margin: 0.75rem auto;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            width: min(96vw, 980px);
            transition: transform var(--motion-base) var(--ease-standard), opacity var(--motion-fast) var(--ease-subtle), width var(--motion-base) var(--ease-standard), max-width var(--motion-base) var(--ease-standard);
        }

        #settings-modal.settings-split-active {
            justify-content: flex-start;
            align-items: center;
            padding: 1rem;
        }

        #settings-modal.settings-split-active .settings-main-modal-panel {
            margin: 0;
            width: min(40vw, 560px);
            max-width: 560px;
            transform: translateX(0);
            animation: settings-main-slide-left var(--motion-base) var(--ease-standard);
        }

        #floating-controls-settings-modal {
            align-items: center;
            overflow-y: auto;
            padding: 1rem;
        }

        #floating-controls-settings-modal .modal {
            max-height: calc(100vh - 2rem);
            margin: 0.75rem auto;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            width: min(95vw, 930px);
        }

        #achievements-settings-modal {
            align-items: center;
            overflow-y: auto;
            padding: 1rem;
        }

        #achievements-settings-modal .modal {
            background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
            border: 1px solid #e2e8f0;
            box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
            max-height: calc(100vh - 2rem);
            margin: 0.75rem auto;
            overflow: visible;
            display: flex;
            flex-direction: column;
            width: min(95vw, 930px);
        }

        html.dark #achievements-settings-modal .modal {
            background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
            border-color: #334155;
            box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
        }

        #achievements-settings-modal .settings-modal-scroll {
            flex: 1 1 auto;
            min-height: 0;
            max-height: none;
            overflow-y: auto;
        }

        #achievements-summary {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.35rem;
            line-height: 1.35;
        }

        #data-hub-modal .modal,
        #export-options-modal .modal,
        #csv-import-preview-modal .modal,
        #payment-cycles-settings-modal .modal,
        #confirmation-modal .modal,
        #changelog-modal .modal,
        #onboarding-modal .modal,
        #recovery-modal .modal {
            background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
            border: 1px solid #e2e8f0;
            box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
        }

        html.dark #data-hub-modal .modal,
        html.dark #export-options-modal .modal,
        html.dark #csv-import-preview-modal .modal,
        html.dark #payment-cycles-settings-modal .modal,
        html.dark #confirmation-modal .modal,
        html.dark #changelog-modal .modal,
        html.dark #onboarding-modal .modal,
        html.dark #recovery-modal .modal {
            background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
            border-color: #334155;
            box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
        }

        .achievement-card-btn {
            width: 100%;
            text-align: left;
            border-width: 1px;
            transition: transform var(--motion-fast) var(--ease-subtle), box-shadow var(--motion-fast) var(--ease-subtle), border-color var(--motion-fast) var(--ease-subtle);
        }

        .achievement-card-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
        }

        .achievement-card-btn:focus-visible {
            outline: 2px solid #f59e0b;
            outline-offset: 2px;
        }

        #achievement-detail-modal .modal {
            background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
            border: 1px solid #e2e8f0;
            box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
            max-height: calc(100vh - 2rem);
            overflow-y: auto;
        }

        html.dark #achievement-detail-modal .modal {
            background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
            border-color: #334155;
            box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
        }

        .settings-side-modal {
            background: transparent !important;
            z-index: var(--settings-side-z, 72);
            pointer-events: none;
            overflow: hidden;
            backdrop-filter: none !important;
        }

        .settings-side-modal.app-modal {
            backdrop-filter: none !important;
        }

        .settings-side-modal-anchored .modal {
            position: fixed;
            top: var(--settings-detail-top, 1rem);
            left: var(--settings-detail-left, calc(2rem + min(40vw, 560px)));
            transform: translateY(0);
            transform-origin: var(--settings-origin-x, 40px) var(--settings-origin-y, 40px);
            pointer-events: auto;
            width: var(--settings-detail-width, min(calc(100vw - (3rem + min(40vw, 560px))), 860px)) !important;
            max-width: 860px;
            max-height: calc(100vh - 2rem);
            overflow: hidden;
            margin: 0;
            animation: side-panel-in-from-trigger var(--motion-base) var(--ease-standard);
            will-change: transform, opacity;
        }

        .floating-settings-modal-panel {
            border: 1px solid #dbeafe;
            border-radius: 0.9rem;
            box-shadow: 0 24px 60px rgba(2, 6, 23, 0.22);
            background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
        }

        html.dark .floating-settings-modal-panel {
            border-color: #334155;
            background: linear-gradient(180deg, #0f172a 0%, #0b1226 100%);
            box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
        }

        .settings-modal-scroll {
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding-right: 0.25rem;
            max-height: calc(100vh - 12rem);
        }

        .settings-section-card {
            border: 1px solid #e5e7eb;
            border-radius: 0.75rem;
            padding: 0.9rem;
            background: #f8fafc;
        }

        html.dark .settings-section-card {
            border-color: #334155;
            background: #0f172a;
        }

        .dashboard-surface {
            background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,1) 100%);
            border: 1px solid rgba(226, 232, 240, 0.9);
            box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
        }

        html.dark .dashboard-surface {
            background: linear-gradient(180deg, rgba(30,41,59,0.98) 0%, rgba(15,23,42,1) 100%);
            border-color: rgba(51, 65, 85, 0.95);
            box-shadow: 0 20px 46px rgba(2, 6, 23, 0.34);
        }

        #call-controls-card {
            overflow-anchor: none;
        }

        .metric-surface {
            border: 1px solid rgba(191, 219, 254, 0.65);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
        }

        html.dark .metric-surface {
            border-color: rgba(51, 65, 85, 0.95);
            box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.06);
        }

        .panel-icon-shell {
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 10px 24px rgba(37, 99, 235, 0.12);
        }

        html.dark .panel-icon-shell {
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 12px 28px rgba(2, 6, 23, 0.28);
        }

        .section-heading {
            letter-spacing: -0.02em;
        }

        .modal-actions {
            position: sticky;
            bottom: 0;
            background: inherit;
            padding-top: 0.75rem;
            backdrop-filter: none;
        }

        .modal-actions-inline {
            position: static;
            bottom: auto;
            padding-top: 0.75rem;
        }

        .preview-states-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 0.85rem;
        }

        @media (min-width: 860px) {
            .preview-states-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        .preview-state-card {
            border: 1px solid #cbd5e1;
            border-radius: 0.75rem;
            padding: 0.55rem;
            background: #f8fafc;
        }

        html.dark .preview-state-card {
            border-color: #334155;
            background: #0b1327;
        }

        .preview-floating-dock {
            border: 1px dashed #9ca3af;
            border-radius: 0.75rem;
            padding: 0.65rem;
            background: #eef2ff;
            width: 220px;
            max-width: 100%;
            margin-left: 0;
            margin-right: 0;
        }

        html.dark .preview-floating-dock {
            border-color: #475569;
            background: #172554;
        }

        .preview-floating-dock.preview-left {
            margin-left: 0;
            margin-right: auto;
        }

        .preview-floating-dock.preview-right {
            margin-left: auto;
            margin-right: 0;
        }

        .preview-floating-active-card {
            margin-bottom: 0.5rem;
            padding: 0.5rem;
            border-radius: 0.5rem;
            border: 1px solid #86efac;
            background: #f0fdf4;
        }

        html.dark .preview-floating-active-card {
            border-color: #14532d;
            background: rgba(22, 101, 52, 0.25);
        }

        .preview-floating-actions {
            display: flex;
            flex-direction: column;
            gap: 0.45rem;
        }

        .preview-floating-actions button {
            width: 100%;
        }

        .preview-mode-compact {
            width: 170px;
        }

        .preview-mode-compact .preview-floating-actions button {
            font-size: 0.78rem;
            padding: 0.45rem 0.6rem;
        }

        .preview-mode-icon {
            width: 50px;
            border-style: none;
            background: transparent;
            padding: 0;
            margin-left: auto;
            margin-right: auto;
        }

        .preview-mode-icon .preview-floating-active-card {
            display: none !important;
        }

        .preview-mode-icon .preview-floating-actions button {
            width: 48px;
            height: 48px;
            border-radius: 9999px;
            padding: 0;
            gap: 0;
            justify-content: center;
        }

        .preview-mode-icon .preview-floating-actions {
            align-items: center;
        }

        .preview-mode-icon .preview-floating-actions button span {
            display: none;
        }

        .preview-mode-icon .preview-primary-btn i {
            margin: 0;
            line-height: 1;
        }

        .preview-mode-icon .preview-floating-actions .preview-secondary-btn {
            display: none !important;
        }

        .preview-mode-icon.preview-show-icon-details {
            width: 176px;
            border-style: solid;
            background: #ffffff;
            border-color: #e5e7eb;
            box-shadow: 0 8px 24px rgba(2, 6, 23, 0.2);
            padding: 0.5rem;
            margin-left: auto;
            margin-right: auto;
        }

        html.dark .preview-mode-icon.preview-show-icon-details {
            background: #1f2937;
            border-color: #374151;
        }

        .preview-mode-icon.preview-show-icon-details .preview-floating-active-card {
            display: block !important;
            margin-bottom: 0.45rem;
        }

        .preview-mode-icon.preview-show-icon-details .preview-primary-btn {
            margin: 0 auto;
        }

        .preview-one-handed .preview-floating-actions button {
            min-height: 48px;
        }

        #floating-controls-customization {
            padding-right: 0.25rem;
        }

        /* Version display in footer */
        #app-version {
            font-family: var(--app-font-family);
        }

        /* Season 1.1.x: unified modal behavior */
        .app-modal {
            backdrop-filter: none;
            opacity: 0;
            transition: opacity var(--motion-fast) var(--ease-subtle);
        }

        .app-modal.is-open {
            opacity: 1;
        }

        .app-modal .modal {
            opacity: 0;
            transform: translateY(-8px) scale(0.988);
            transform-origin: var(--modal-origin-x, 50%) var(--modal-origin-y, 10%);
            transition: transform var(--motion-base) var(--ease-standard), opacity var(--motion-fast) var(--ease-subtle);
            will-change: transform, opacity;
        }

        .app-modal.is-open .modal {
            opacity: 1;
            transform: translateY(0) scale(1);
        }

        .app-modal button:focus-visible,
        .app-modal input:focus-visible,
        .app-modal select:focus-visible,
        .app-modal textarea:focus-visible {
            outline: 2px solid #2563eb;
            outline-offset: 2px;
        }

        #confirmation-modal-status {
            min-height: 1rem;
        }

        #floating-call-controls {
            display: none;
            align-items: flex-end;
            transition: transform var(--motion-base) var(--ease-standard), opacity var(--motion-fast) var(--ease-subtle);
            opacity: 0;
            transform: translateY(6px);
        }

        #floating-call-controls.dock-visible {
            opacity: 1;
            transform: translateY(0);
        }

        #floating-call-dock {
            transition: transform var(--motion-base) var(--ease-standard), opacity var(--motion-fast) var(--ease-subtle);
        }

        #floating-call-controls.dragging,
        #floating-call-controls.dragging #floating-call-dock {
            transition: none !important;
            animation: none !important;
            cursor: grabbing;
        }

        #floating-dock-drag-handle {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 18px;
            margin-bottom: 0.35rem;
            cursor: grab;
            touch-action: none;
        }

        .floating-dock-drag-pill {
            display: inline-block;
            width: 44px;
            height: 6px;
            border-radius: 999px;
            background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%);
            border: 1px solid #93c5fd;
            box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7);
        }

        html.dark .floating-dock-drag-pill {
            background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
            border-color: #334155;
        }

        #floating-call-controls.dock-collapsed #floating-call-dock {
            opacity: 0;
            transform: scale(0.92);
            pointer-events: none;
            position: absolute;
        }

        #floating-call-dock {
            width: 220px;
            max-width: 220px;
        }

        #floating-call-dock button {
            min-width: 180px;
        }

        .floating-active-adjust-controls {
            margin-top: 0.45rem;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 0.35rem;
            flex-wrap: nowrap;
            overflow: hidden;
            width: max-content;
            max-width: 100%;
            margin-left: auto;
        }

        #floating-call-dock .floating-active-adjust-controls .floating-active-adjust-btn,
        .preview-floating-dock .floating-active-adjust-controls .floating-active-adjust-btn {
            width: 24px;
            min-width: 24px;
            max-width: 24px;
            height: 24px;
            min-height: 24px;
            border-radius: 9999px;
            border: 1px solid rgba(30, 64, 175, 0.25);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 24px;
            padding: 0 !important;
            box-sizing: border-box;
            font-size: 0.62rem;
            line-height: 1;
            transition: transform 0.14s ease, background-color 0.14s ease, border-color 0.14s ease;
        }

        #floating-call-dock .floating-active-adjust-controls .floating-active-adjust-btn:hover,
        .preview-floating-dock .floating-active-adjust-controls .floating-active-adjust-btn:hover {
            transform: translateY(-1px);
        }

        .floating-active-adjust-minus {
            background: #dbeafe;
            color: #1e3a8a;
            border-color: #93c5fd;
        }

        .floating-active-adjust-plus {
            background: #ccfbf1;
            color: #0f766e;
            border-color: #5eead4;
        }

        html.dark .floating-active-adjust-minus {
            background: rgba(30, 64, 175, 0.32);
            color: #bfdbfe;
            border-color: rgba(96, 165, 250, 0.45);
        }

        html.dark .floating-active-adjust-plus {
            background: rgba(15, 118, 110, 0.32);
            color: #99f6e4;
            border-color: rgba(45, 212, 191, 0.4);
        }

        .preview-floating-dock .floating-active-adjust-controls {
            margin-top: 0.35rem;
        }

        @media (max-width: 640px) {
            #floating-call-dock .floating-active-adjust-controls .floating-active-adjust-btn,
            .preview-floating-dock .floating-active-adjust-controls .floating-active-adjust-btn {
                width: 24px !important;
                min-width: 24px !important;
                max-width: 24px !important;
                height: 24px !important;
                min-height: 24px !important;
                flex: 0 0 24px !important;
                font-size: 0.62rem !important;
            }
        }

        #floating-call-controls.one-handed #floating-call-dock button {
            min-height: 50px;
        }

        .floating-dock-mini {
            display: none;
            align-items: center;
            justify-content: center;
        }

        #floating-call-controls.dock-collapsed .floating-dock-mini {
            display: inline-flex !important;
        }

        #floating-call-controls.floating-compact #floating-call-dock button {
            min-width: 132px;
            font-size: 0.95rem;
            padding: 0.6rem 0.85rem;
        }

        #floating-call-controls.floating-compact #floating-call-dock {
            width: 170px;
            max-width: 170px;
            padding: 0.55rem;
        }

        #floating-call-controls.floating-icon #floating-start-call-btn,
        #floating-call-controls.floating-icon #floating-end-call-btn {
            min-width: 48px;
            width: 48px;
            height: 48px;
            padding: 0;
            border-radius: 9999px;
            font-size: 1rem;
        }

        #floating-call-controls.floating-icon .floating-call-label {
            display: none;
        }

        #floating-call-controls.floating-icon #floating-start-call-btn i,
        #floating-call-controls.floating-icon #floating-end-call-btn i {
            margin: 0;
        }

        #floating-call-controls.floating-icon #floating-call-dock {
            width: auto;
            max-width: none;
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
            padding: 0;
        }

        #floating-call-controls.floating-icon #floating-secondary-action-btn {
            display: none !important;
        }

        #floating-call-controls.floating-icon #floating-active-card {
            display: none;
        }

        #floating-call-controls.floating-icon.show-icon-details #floating-call-dock {
            width: 176px;
            max-width: 176px;
            background: #ffffff !important;
            border: 1px solid #e5e7eb !important;
            box-shadow: 0 8px 24px rgba(2, 6, 23, 0.2) !important;
            border-radius: 0.85rem;
            padding: 0.5rem;
        }

        html.dark #floating-call-controls.floating-icon.show-icon-details #floating-call-dock {
            background: #1f2937 !important;
            border-color: #374151 !important;
        }

        #floating-call-controls.floating-icon.show-icon-details #floating-active-card {
            display: block !important;
            width: 100%;
            margin-bottom: 0.45rem;
        }

        #floating-call-controls.floating-icon.show-icon-details #floating-start-call-btn,
        #floating-call-controls.floating-icon.show-icon-details #floating-end-call-btn {
            margin: 0 auto;
        }

        #floating-call-controls.dock-animate-expand #floating-call-dock {
            animation: floating-dock-expand var(--motion-fast) var(--ease-standard);
        }

        @keyframes floating-dock-expand {
            from { opacity: 0.5; transform: scale(0.9) translateY(4px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }

        @media (max-width: 640px) {
            #floating-call-controls {
                right: 0.75rem;
                bottom: 0.75rem;
                max-width: min(92vw, 340px);
            }

            #floating-call-dock {
                width: min(92vw, 340px);
                max-width: min(92vw, 340px);
            }

            #floating-call-dock button {
                width: 100%;
                min-width: 0;
                font-size: 0.95rem;
                padding: 0.65rem 0.9rem;
            }

            #floating-call-controls.one-handed #floating-call-dock button {
                min-height: 56px;
            }
        }

        #floating-call-controls #floating-call-dock .floating-active-adjust-controls .floating-active-adjust-btn {
            width: 24px !important;
            min-width: 24px !important;
            max-width: 24px !important;
            height: 24px !important;
            min-height: 24px !important;
            flex: 0 0 24px !important;
            padding: 0 !important;
            border-radius: 9999px !important;
            font-size: 0.62rem !important;
            line-height: 1 !important;
        }

        @media (max-width: 1100px) {
            #settings-modal.settings-split-active .settings-main-modal-panel {
                transform: none;
                width: min(96vw, 980px);
                max-width: none;
                animation: none;
            }

            .settings-side-modal {
                background: rgba(0, 0, 0, 0.5) !important;
                justify-content: center !important;
                padding: 1rem !important;
                pointer-events: auto;
            }

            .settings-side-modal .modal,
            .settings-side-modal-anchored .modal {
                width: min(95vw, 930px) !important;
                max-width: none;
                position: relative;
                top: auto;
                left: auto;
                transform: none;
            }
        }

        @keyframes modal-overlay-in {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes modal-panel-in {
            from { opacity: 0; transform: translateY(-8px) scale(0.985); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        @keyframes side-panel-in {
            from { opacity: 0; transform: translateY(6px) translateX(12px) scale(0.99); }
            to { opacity: 1; transform: translateY(0) translateX(0) scale(1); }
        }

        @keyframes side-panel-in-from-trigger {
            from { opacity: 0; transform: translateY(8px) scale(0.96); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        @keyframes settings-main-slide-left {
            from { transform: translateX(18px); opacity: 0.96; }
            to { transform: translateX(0); opacity: 1; }
        }

        @media (prefers-reduced-motion: reduce) {
            .app-modal,
            .app-modal .modal,
            #floating-call-controls,
            #floating-call-dock,
            #settings-modal .modal,
            .settings-side-modal-anchored .modal {
                animation: none !important;
                transition: none !important;
            }
        }

        .hint-tooltip {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 1rem;
            height: 1rem;
            border-radius: 9999px;
            font-size: 0.7rem;
            font-weight: 700;
            line-height: 1;
            cursor: help;
            background: #1d4ed8;
            color: #fff;
            user-select: none;
        }

        .hint-tooltip::after {
            content: attr(data-tooltip);
            position: absolute;
            bottom: calc(100% + 8px);
            left: 50%;
            transform: translateX(-50%) translateY(4px);
            width: min(280px, 72vw);
            padding: 0.45rem 0.55rem;
            border-radius: 0.5rem;
            background: #0f172a;
            color: #e2e8f0;
            font-size: 0.72rem;
            font-weight: 500;
            line-height: 1.35;
            text-align: left;
            box-shadow: 0 8px 24px rgba(2, 6, 23, 0.35);
            border: 1px solid #334155;
            opacity: 0;
            pointer-events: none;
            z-index: 140;
            transition: opacity 130ms ease, transform 130ms ease;
            white-space: normal;
        }

        .hint-tooltip::before {
            content: '';
            position: absolute;
            bottom: calc(100% + 2px);
            left: 50%;
            transform: translateX(-50%);
            border-width: 6px;
            border-style: solid;
            border-color: #0f172a transparent transparent transparent;
            opacity: 0;
            transition: opacity 130ms ease;
            z-index: 141;
        }

        .hint-tooltip:hover::after,
        .hint-tooltip:hover::before {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        .hint-tooltip.hint-tooltip-right::after {
            left: auto;
            right: 0;
            transform: translateY(4px);
        }

        .hint-tooltip.hint-tooltip-right::before {
            left: auto;
            right: 8px;
            transform: none;
        }

        .hint-tooltip.hint-tooltip-right:hover::after {
            transform: translateY(0);
        }

        .onboarding-cues {
            position: fixed;
            right: 1rem;
            bottom: 1rem;
            z-index: 65;
            width: min(92vw, 320px);
            display: grid;
            gap: 0.75rem;
            pointer-events: none;
            transition: opacity 180ms var(--ease-subtle), transform 180ms var(--ease-standard);
        }

        .onboarding-steps {
            display: flex;
            flex-wrap: wrap;
            gap: 0.45rem;
        }

        .onboarding-step-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            border-radius: 9999px;
            background: #e0e7ff;
            color: #1e3a8a;
            padding: 0.22rem 0.55rem;
            font-size: 0.73rem;
            font-weight: 600;
        }

        .onboarding-step-pill span {
            width: 1.05rem;
            height: 1.05rem;
            border-radius: 9999px;
            background: #2563eb;
            color: #fff;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.67rem;
            font-weight: 700;
        }

        html.dark .onboarding-step-pill {
            background: #1e293b;
            color: #dbeafe;
        }

        .onboarding-step-pill.done {
            background: #dcfce7;
            color: #14532d;
        }

        .onboarding-step-pill.done span {
            background: #16a34a;
            color: #ffffff;
        }

        html.dark .onboarding-step-pill.done {
            background: #14532d;
            color: #dcfce7;
        }

        .onboarding-cue-card {
            position: relative;
            border: 1px solid #cbd5e1;
            border-radius: 0.85rem;
            padding: 0.85rem 0.85rem 0.75rem 0.85rem;
            background: #ffffff;
            box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
            pointer-events: auto;
            animation: onboarding-cue-in 220ms ease-out;
            transition: transform 160ms var(--ease-standard), box-shadow 160ms var(--ease-subtle), border-color 160ms var(--ease-subtle);
        }

        html.dark .onboarding-cue-card {
            border-color: #334155;
            background: #0f172a;
            box-shadow: 0 10px 24px rgba(2, 6, 23, 0.45);
        }

        .onboarding-cue-title {
            font-size: 0.95rem;
            font-weight: 700;
            color: #0f172a;
            margin-bottom: 0.2rem;
        }

        html.dark .onboarding-cue-title {
            color: #e2e8f0;
        }

        .onboarding-cue-text {
            font-size: 0.82rem;
            color: #475569;
            margin-bottom: 0.55rem;
            line-height: 1.35;
        }

        html.dark .onboarding-cue-text {
            color: #94a3b8;
        }

        .onboarding-cue-action {
            width: 100%;
            border: 0;
            border-radius: 0.6rem;
            background: #2563eb;
            color: #ffffff;
            padding: 0.45rem 0.65rem;
            font-size: 0.84rem;
            font-weight: 600;
            transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
            box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
        }

        .onboarding-cue-action:hover {
            background: #1d4ed8;
            transform: translateY(-1px);
            box-shadow: 0 8px 18px rgba(37, 99, 235, 0.3);
        }

        .onboarding-cue-action:active {
            transform: translateY(1px);
        }

        .onboarding-cue-close {
            position: absolute;
            top: 0.35rem;
            right: 0.4rem;
            border: 0;
            background: transparent;
            color: #64748b;
            width: 1.6rem;
            height: 1.6rem;
            border-radius: 9999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .onboarding-cue-close:hover {
            color: #0f172a;
            background: rgba(148, 163, 184, 0.2);
        }

        html.dark .onboarding-cue-close {
            color: #94a3b8;
        }

        html.dark .onboarding-cue-close:hover {
            color: #e2e8f0;
            background: rgba(148, 163, 184, 0.25);
        }

        html.native-app-shell,
        html.native-app-shell body {
            min-height: 100%;
            width: 100%;
            max-width: 100%;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
        }

        html.native-app-shell body {
            min-height: calc(var(--app-shell-vh, 1vh) * 100);
            background:
                radial-gradient(circle at top, rgba(59, 130, 246, 0.08), transparent 38%),
                linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
        }

        html.dark.native-app-shell body {
            background:
                radial-gradient(circle at top, rgba(59, 130, 246, 0.16), transparent 34%),
                linear-gradient(180deg, #020617 0%, #0f172a 100%);
        }

        html.native-app-shell .container.mx-auto.max-w-7xl {
            width: 100%;
            max-width: none;
            overflow-x: hidden;
            padding-top: max(1rem, env(safe-area-inset-top));
            padding-right: max(1rem, env(safe-area-inset-right));
            padding-bottom: max(1.25rem, calc(env(safe-area-inset-bottom) + 1.25rem));
            padding-left: max(1rem, env(safe-area-inset-left));
        }

        html.native-app-shell .app-header-shell {
            top: max(0.35rem, env(safe-area-inset-top));
            margin-bottom: 1rem;
        }

        html.native-app-shell .app-header-card {
            border-radius: 1rem;
            padding: 0.66rem 0.72rem 0.62rem;
        }

        html.native-app-shell #app-toolbar {
            position: static;
            margin: 0;
            padding: 0.22rem;
            max-width: 100%;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
        }

        html.native-app-shell #app-toolbar button {
            width: 42px;
            height: 42px;
            min-width: 42px;
            min-height: 42px;
        }

        html.native-app-shell footer {
            padding-bottom: max(1rem, env(safe-area-inset-bottom));
            overflow-x: hidden;
        }

        .app-footer {
            position: relative;
            background:
                radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 40%),
                linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
            border: 1px solid rgba(203, 213, 225, 0.75);
            border-radius: 1rem;
            overflow: hidden;
        }

        html.dark .app-footer {
            background:
                radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 42%),
                linear-gradient(180deg, #0f172a 0%, #0b1325 100%);
            border-color: rgba(51, 65, 85, 0.92);
        }

        .app-footer > .container {
            border: 1px solid rgba(203, 213, 225, 0.62);
            border-radius: 0.95rem;
            background: rgba(255, 255, 255, 0.68);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
        }

        html.dark .app-footer > .container {
            border-color: rgba(71, 85, 105, 0.62);
            background: rgba(15, 23, 42, 0.64);
            box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08);
        }

        .app-footer-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 0.9rem;
            align-items: stretch;
        }

        .app-footer-panel {
            border: 1px solid rgba(148, 163, 184, 0.2);
            border-radius: 0.85rem;
            background: rgba(255, 255, 255, 0.72);
            padding: 0.9rem 0.95rem;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            min-width: 0;
            align-items: center;
            text-align: center;
        }

        html.dark .app-footer-panel {
            border-color: rgba(71, 85, 105, 0.42);
            background: rgba(15, 23, 42, 0.78);
        }

        .app-footer-heading {
            line-height: 1.15;
            letter-spacing: 0.01em;
            margin: 0;
        }

        .app-footer-text {
            margin: 0;
            line-height: 1.4;
        }

        .app-footer-inline-link {
            color: #2563eb;
            text-decoration: underline;
            text-underline-offset: 2px;
            transition: color 0.14s ease;
        }

        .app-footer-inline-link:hover {
            color: #1d4ed8;
        }

        html.dark .app-footer-inline-link {
            color: #60a5fa;
        }

        html.dark .app-footer-inline-link:hover {
            color: #93c5fd;
        }

        .app-footer-links {
            list-style: none;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: 0.34rem;
            width: 100%;
            align-items: center;
        }

        .app-footer-links li {
            display: flex;
            justify-content: center;
            width: 100%;
        }

        .app-footer-link,
        .app-footer-link-btn {
            font-size: 0.84rem;
            font-weight: 700;
            color: #1e40af;
            text-decoration: underline;
            text-underline-offset: 2px;
            background: transparent;
            border: 0;
            padding: 0;
            cursor: pointer;
            text-align: center;
            transition: color 0.14s ease;
        }

        .app-footer-link:hover,
        .app-footer-link-btn:hover {
            color: #1d4ed8;
        }

        .app-footer-link:focus-visible,
        .app-footer-link-btn:focus-visible {
            outline: 2px solid rgba(37, 99, 235, 0.45);
            outline-offset: 2px;
            border-radius: 0.25rem;
        }

        html.dark .app-footer-link,
        html.dark .app-footer-link-btn {
            color: #93c5fd;
        }

        html.dark .app-footer-link:hover,
        html.dark .app-footer-link-btn:hover {
            color: #bfdbfe;
        }

        .app-footer-version-label {
            margin: 0.2rem 0 0;
            line-height: 1.15;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            font-weight: 700;
        }

        .app-footer-version-value {
            margin: 0;
            font-weight: 800;
            font-family: var(--app-font-family);
        }

        .app-footer-time {
            margin: 0.05rem 0 0;
            line-height: 1.25;
            text-align: center;
        }

        .app-footer-timezone {
            margin: 0;
            line-height: 1.2;
            text-align: center;
        }

        .app-footer-data-note {
            margin: auto 0 0;
            line-height: 1.35;
            text-align: center;
        }

        .app-footer-collapsible-toggle {
            width: 100%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            border: 0;
            background: transparent;
            color: inherit;
            padding: 0;
            text-align: center;
            cursor: pointer;
        }

        .app-footer-collapsible-icon {
            display: none;
            font-size: 0.72rem;
            color: #64748b;
            transition: transform 0.14s ease, color 0.14s ease;
            flex: 0 0 auto;
        }

        html.dark .app-footer-collapsible-icon {
            color: #94a3b8;
        }

        .app-footer-collapsible-body {
            display: flex;
            flex-direction: column;
            gap: 0.45rem;
            width: 100%;
            align-items: center;
        }

        .app-footer-collapsible.is-open .app-footer-collapsible-icon {
            transform: rotate(180deg);
        }

        .support-actions-row {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .support-action-form {
            margin: 0;
            flex: 0 0 auto;
        }

        .support-action-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 124px;
            height: 36px;
            padding: 0 0.7rem;
            border-radius: 0.85rem;
            font-size: 0.78rem;
            font-weight: 700;
            letter-spacing: -0.01em;
            line-height: 1;
            white-space: nowrap;
            text-decoration: none;
            border: 1px solid rgba(148, 163, 184, 0.28);
            transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
            box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
            box-sizing: border-box;
        }

        .support-action-btn:hover {
            transform: translateY(-1px);
            filter: brightness(1.02);
        }

        .support-action-btn-paypal {
            background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
            border-color: rgba(217, 119, 6, 0.38);
            color: #111827;
        }

        .support-action-btn-paypal:hover {
            background: linear-gradient(180deg, #fdc62e 0%, #f5a317 100%);
        }

        .support-action-btn-kofi {
            background: linear-gradient(180deg, #2ea2f4 0%, #238fe4 100%);
            border-color: rgba(37, 143, 228, 0.48);
            color: #ffffff;
        }

        .support-action-btn-kofi:hover {
            background: linear-gradient(180deg, #41aff7 0%, #2698ef 100%);
        }

        #support-modal .modal {
            background-color: white;
            border-radius: 12px;
            box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
            max-width: 520px;
            width: min(92vw, 520px);
        }

        html.dark #support-modal .modal {
            background-color: #1e293b;
            border-color: #475569;
            box-shadow: 0 12px 32px rgba(2, 6, 23, 0.34);
        }

        .support-modal-card {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            padding: 1rem;
            border: 1px solid #e2e8f0;
            border-radius: 1rem;
            background: rgba(248, 250, 252, 0.9);
        }

        html.dark .support-modal-card {
            border-color: #334155;
            background: rgba(15, 23, 42, 0.75);
        }

        .support-modal-action-btn {
            flex: 0 0 auto;
            min-width: 122px;
            height: 40px;
            padding: 0 1rem;
            border-radius: 0.85rem;
            font-size: 0.85rem;
            font-weight: 700;
            line-height: 1;
            border: 1px solid rgba(148, 163, 184, 0.28);
            cursor: pointer;
            transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, filter 160ms ease;
            box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
        }

        .support-modal-action-btn:hover {
            transform: translateY(-1px);
            filter: brightness(1.02);
        }

        .support-modal-action-btn-paypal {
            background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
            border-color: rgba(217, 119, 6, 0.38);
            color: #111827;
        }

        .support-modal-action-btn-paypal:hover {
            background: linear-gradient(180deg, #fdc62e 0%, #f5a317 100%);
        }

        .support-modal-action-btn-kofi {
            background: linear-gradient(180deg, #2ea2f4 0%, #238fe4 100%);
            border-color: rgba(37, 143, 228, 0.48);
            color: #ffffff;
        }

        .support-modal-action-btn-kofi:hover {
            background: linear-gradient(180deg, #41aff7 0%, #2698ef 100%);
        }

        @media (max-width: 640px) {
            .onboarding-cues {
                left: 0.75rem;
                right: 0.75rem;
                width: auto;
                bottom: 0.75rem;
            }

            .support-modal-card {
                flex-direction: column;
                align-items: stretch;
            }

            .support-modal-action-btn {
                width: 100%;
            }
        }

        @media (max-width: 768px) {
            body {
                padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
            }

            html.native-app-shell .container.mx-auto.max-w-7xl {
                padding-left: max(0.85rem, env(safe-area-inset-left));
                padding-right: max(0.85rem, env(safe-area-inset-right));
                padding-top: max(0.75rem, env(safe-area-inset-top));
                padding-bottom: max(1rem, calc(env(safe-area-inset-bottom) + 1rem));
            }

            html.native-app-shell #app-header {
                margin-bottom: 0.85rem;
            }

            input,
            select,
            textarea {
                font-size: 16px !important;
            }

            .container.mx-auto.max-w-7xl {
                padding-left: 0.85rem;
                padding-right: 0.85rem;
                padding-top: 1rem;
                overflow-x: hidden;
            }

            footer .container,
            .dashboard-surface,
            .settings-section-card,
            .call-log-mobile-card,
            #call-controls-card,
            #rates-card,
            #monthly-earnings-cards,
            #payment-cycle-earnings-cards {
                max-width: 100%;
                min-width: 0;
                overflow-x: hidden;
            }

            footer .grid > div,
            footer .container {
                max-width: 100%;
                min-width: 0;
                box-sizing: border-box;
            }

            .app-footer-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 0.56rem;
            }

            .app-footer-panel {
                padding: 0.72rem 0.7rem;
                border-radius: 0.74rem;
                gap: 0.36rem;
                text-align: center;
                align-items: center;
            }

            .app-footer-heading {
                font-size: 0.94rem;
            }

            .app-footer-text,
            .app-footer-link,
            .app-footer-link-btn {
                font-size: 0.74rem;
                text-align: center;
            }

            .app-footer-version-label,
            .app-footer-timezone,
            .app-footer-data-note {
                font-size: 0.67rem;
            }

            .app-footer-version-value {
                font-size: 0.76rem;
            }

            .app-footer-time {
                font-size: 0.9rem;
            }

            .app-footer-collapsible-toggle {
                justify-content: center;
                position: relative;
                cursor: pointer;
                min-height: 1.4rem;
            }

            .app-footer-collapsible-icon {
                display: inline-flex;
                position: absolute;
                right: 0.08rem;
                top: 50%;
                transform: translateY(-50%);
            }

            .app-footer-collapsible.is-open .app-footer-collapsible-icon {
                transform: translateY(-50%) rotate(180deg);
            }

            .app-footer-collapsible:not(.is-open) .app-footer-collapsible-body {
                display: none;
            }

            .app-footer-links li {
                display: flex;
                justify-content: center;
            }

            .app-footer-quicklinks .app-footer-links,
            .app-footer-support-updates .app-footer-links {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 0.25rem 0.5rem;
                width: 100%;
            }

            .support-actions-row {
                margin-top: 0.08rem;
                justify-content: center;
            }

            #local-time {
                font-size: 0.92rem;
                line-height: 1.3;
                overflow-wrap: anywhere;
                word-break: break-word;
            }

            .support-action-btn {
                width: 100%;
                max-width: 126px;
                height: 32px;
                padding: 0 0.54rem;
                font-size: 0.71rem;
            }

            html.native-app-shell #app-header .app-header-title {
                font-size: clamp(1.72rem, 7vw, 2.2rem);
            }

            html.native-app-shell #app-header .app-header-subtitle {
                font-size: 0.84rem;
            }

            #app-header {
                margin-bottom: 1.25rem;
            }

            #app-header .app-header-title {
                font-size: clamp(1.78rem, 7.2vw, 2.28rem);
                line-height: 1.07;
            }

            #app-header .app-header-subtitle {
                font-size: 0.86rem;
                line-height: 1.34;
            }

            .dashboard-surface {
                border-radius: 1rem;
            }

            #call-controls-card,
            #rates-card,
            .dashboard-surface.rounded-xl {
                padding: 1rem;
            }

            .section-heading {
                font-size: 1.3rem;
            }

            #start-call-btn,
            #end-call-btn,
            #add-call-btn,
            #show-rate-add,
            #open-data-hub-btn,
            #reset-calls,
            #reset-all,
            #data-hub-export-json-btn,
            #data-hub-import-json-btn,
            #data-hub-export-csv-btn,
            #data-hub-import-csv-btn,
            #confirm-export-options-btn,
            #cancel-export-options-btn,
            #confirm-csv-import-btn,
            #cancel-csv-import-preview-btn {
                min-height: 48px;
            }

            #live-call-timer {
                font-size: 2rem;
            }

            #live-call-earnings {
                font-size: 1.5rem;
            }

            .settings-section-card {
                padding: 0.8rem;
                border-radius: 0.85rem;
            }

            .settings-modal-scroll {
                max-height: calc(100dvh - 8.5rem);
                padding-right: 0;
            }

            .modal-actions {
                padding-top: 0.75rem;
            }

            #settings-modal,
            #floating-controls-settings-modal,
            #achievements-settings-modal,
            #data-hub-modal,
            #export-options-modal,
            #csv-import-preview-modal,
            #payment-cycles-settings-modal,
            #call-modal,
            #edit-cycle-modal,
            #feedback-modal,
            #confirmation-modal,
            #changelog-modal,
            #achievement-detail-modal,
            #onboarding-modal,
            #recovery-modal {
                align-items: flex-end;
                padding: 0.5rem;
            }

            #settings-modal .modal,
            #floating-controls-settings-modal .modal,
            #achievements-settings-modal .modal,
            #data-hub-modal .modal,
            #export-options-modal .modal,
            #csv-import-preview-modal .modal,
            #payment-cycles-settings-modal .modal,
            #call-modal .modal,
            #edit-cycle-modal .modal,
            #feedback-modal .modal,
            #confirmation-modal .modal,
            #changelog-modal .modal,
            #achievement-detail-modal .modal,
            #onboarding-modal .modal,
            #recovery-modal .modal {
                width: min(100%, calc(100vw - 1rem)) !important;
                max-width: none !important;
                max-height: calc(100dvh - 0.75rem) !important;
                margin: 0;
                border-radius: 1rem;
            }

            #settings-modal .modal,
            #floating-controls-settings-modal .modal,
            #achievements-settings-modal .modal,
            #data-hub-modal .modal,
            #csv-import-preview-modal .modal,
            #payment-cycles-settings-modal .modal,
            #changelog-modal .modal {
                min-height: min(70dvh, 760px);
            }

            .preview-states-grid {
                grid-template-columns: 1fr;
            }

            .scrollable-table {
                display: none;
            }

            .call-log-mobile-list {
                display: block;
            }

            #floating-call-controls {
                bottom: max(0.75rem, env(safe-area-inset-bottom)) !important;
            }

            #floating-call-controls[style*="left"] {
                left: 0.75rem !important;
            }

            #floating-call-controls[style*="right"] {
                right: 0.75rem !important;
            }
        }

        @media (max-width: 520px) {
            .app-footer .container {
                padding-left: 0.75rem;
                padding-right: 0.75rem;
                padding-top: 0.95rem;
                padding-bottom: 1rem;
            }

            .app-footer-grid {
                grid-template-columns: 1fr;
            }

            .app-footer-panel {
                padding: 0.7rem 0.68rem;
                gap: 0.34rem;
            }

            .app-footer-text-summary {
                display: none;
            }

            .app-footer-heading {
                font-size: 0.9rem;
            }

            .app-footer-text,
            .app-footer-link,
            .app-footer-link-btn {
                font-size: 0.73rem;
            }

            .app-footer-quicklinks .app-footer-links,
            .app-footer-support-updates .app-footer-links {
                grid-template-columns: 1fr;
                gap: 0.24rem;
            }

            .app-footer-time {
                font-size: 0.88rem;
            }
        }

        .onboarding-highlight-target {
            position: relative;
            z-index: 2;
            box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45);
            animation: onboarding-target-pulse 1.1s ease-out 2;
            border-radius: 0.9rem;
        }

        .onboarding-cue-card:hover {
            transform: translateY(-1px);
            border-color: #93c5fd;
            box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22);
        }

        @keyframes onboarding-cue-in {
            from { opacity: 0; transform: translateY(8px) scale(0.985); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        @keyframes onboarding-target-pulse {
            0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45); }
            70% { box-shadow: 0 0 0 12px rgba(37, 99, 235, 0); }
            100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
        }

        .stat-delta-positive {
            color: #059669 !important;
        }

        .stat-delta-negative {
            color: #b45309 !important;
        }

        .stat-delta-neutral {
            color: #475569 !important;
        }

        html.dark .stat-delta-positive {
            color: #34d399 !important;
        }

        html.dark .stat-delta-negative {
            color: #fbbf24 !important;
        }

        html.dark .stat-delta-neutral {
            color: #94a3b8 !important;
        }

        .rpg-breakdown-toggle {
            border: 1px solid rgba(99, 102, 241, 0.35);
            border-radius: 9999px;
            padding: 0.32rem 0.78rem;
            font-size: 0.74rem;
            font-weight: 700;
            color: #4338ca;
            background: rgba(238, 242, 255, 0.95);
            transition: transform 0.14s ease, background-color 0.14s ease, border-color 0.14s ease;
        }

        .rpg-breakdown-toggle:hover {
            transform: translateY(-1px);
            background: rgba(224, 231, 255, 0.96);
            border-color: rgba(99, 102, 241, 0.5);
        }

        html.dark .rpg-breakdown-toggle {
            color: #c7d2fe;
            background: rgba(49, 46, 129, 0.34);
            border-color: rgba(129, 140, 248, 0.45);
        }

        html.dark .rpg-breakdown-toggle:hover {
            background: rgba(67, 56, 202, 0.3);
        }

        .cycle-state-chip {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 22px;
            padding: 0.2rem 0.56rem;
            border-radius: 9999px;
            font-size: 0.66rem;
            font-weight: 700;
            letter-spacing: 0.01em;
            color: #6d28d9;
            border: 1px solid rgba(167, 139, 250, 0.55);
            background: rgba(233, 213, 255, 0.65);
        }

        html.dark .cycle-state-chip {
            color: #ddd6fe;
            border-color: rgba(139, 92, 246, 0.52);
            background: rgba(76, 29, 149, 0.35);
        }

        .cycle-progress-track {
            width: 100%;
            height: 8px;
            border-radius: 9999px;
            overflow: hidden;
            background: rgba(196, 181, 253, 0.5);
        }

        .cycle-progress-fill {
            height: 100%;
            width: 0;
            border-radius: inherit;
            background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%);
            transition: width 0.35s ease;
        }

        html.dark .cycle-progress-track {
            background: rgba(91, 33, 182, 0.5);
        }

        .app-toast-stack {
            position: fixed;
            right: max(0.9rem, env(safe-area-inset-right));
            bottom: max(0.95rem, env(safe-area-inset-bottom));
            z-index: 120;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            pointer-events: none;
        }

        .app-toast {
            min-width: min(360px, calc(100vw - 1.5rem));
            max-width: min(420px, calc(100vw - 1.5rem));
            border-radius: 0.78rem;
            border: 1px solid rgba(148, 163, 184, 0.4);
            background: rgba(15, 23, 42, 0.94);
            color: #f8fafc;
            box-shadow: 0 14px 30px rgba(15, 23, 42, 0.35);
            backdrop-filter: blur(6px);
            display: grid;
            grid-template-columns: auto minmax(0, 1fr) auto;
            align-items: center;
            gap: 0.5rem;
            padding: 0.55rem 0.68rem;
            transform: translateY(8px);
            opacity: 0;
            transition: opacity 0.18s ease, transform 0.18s ease;
            pointer-events: auto;
        }

        .app-toast.is-visible {
            opacity: 1;
            transform: translateY(0);
        }

        .app-toast.is-exiting {
            opacity: 0;
            transform: translateY(8px);
        }

        .app-toast-icon {
            width: 1.1rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.88rem;
            line-height: 1;
        }

        .app-toast-message {
            font-size: 0.76rem;
            font-weight: 700;
            line-height: 1.3;
            min-width: 0;
            word-break: break-word;
        }

        .app-toast-close {
            width: 1.35rem;
            height: 1.35rem;
            border: 0;
            border-radius: 9999px;
            background: transparent;
            color: inherit;
            font-size: 1rem;
            line-height: 1;
            padding: 0;
            opacity: 0.75;
            cursor: pointer;
        }

        .app-toast-close:hover {
            opacity: 1;
            background: rgba(255, 255, 255, 0.12);
        }

        .app-toast-success {
            border-color: rgba(16, 185, 129, 0.46);
            background: linear-gradient(180deg, rgba(6, 78, 59, 0.93) 0%, rgba(5, 46, 22, 0.94) 100%);
        }

        .app-toast-success .app-toast-icon {
            color: #6ee7b7;
        }

        .app-toast-error {
            border-color: rgba(239, 68, 68, 0.52);
            background: linear-gradient(180deg, rgba(127, 29, 29, 0.94) 0%, rgba(69, 10, 10, 0.94) 100%);
        }

        .app-toast-error .app-toast-icon {
            color: #fca5a5;
        }

        .app-toast-warning {
            border-color: rgba(245, 158, 11, 0.55);
            background: linear-gradient(180deg, rgba(120, 53, 15, 0.94) 0%, rgba(69, 26, 3, 0.95) 100%);
        }

        .app-toast-warning .app-toast-icon {
            color: #fcd34d;
        }

        .app-toast-info {
            border-color: rgba(59, 130, 246, 0.5);
            background: linear-gradient(180deg, rgba(30, 64, 175, 0.93) 0%, rgba(30, 58, 138, 0.93) 100%);
        }

        .app-toast-info .app-toast-icon {
            color: #93c5fd;
        }

        @media (max-width: 640px) {
            .app-toast {
                min-width: min(320px, calc(100vw - 1.2rem));
                max-width: min(360px, calc(100vw - 1.2rem));
                padding: 0.5rem 0.58rem;
            }

            .app-toast-message {
                font-size: 0.72rem;
            }
        }

        /* UI Refresh v1 core styles */
        body.ui-refresh-v1 {
            --ui-surface-border: rgba(148, 163, 184, 0.26);
            --ui-shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.14);
            --ui-shadow-dark: 0 12px 28px rgba(2, 6, 23, 0.34);
            --ui-focus-ring: 0 0 0 3px rgba(56, 189, 248, 0.45);
            line-height: 1.45;
        }

        body.ui-refresh-v1 .dashboard-surface,
        body.ui-refresh-v1 .metric-surface,
        body.ui-refresh-v1 .settings-section-card {
            border-radius: 0.9rem;
            border: 1px solid var(--ui-surface-border);
            box-shadow: var(--ui-shadow-soft) !important;
        }

        html.dark body.ui-refresh-v1 .dashboard-surface,
        html.dark body.ui-refresh-v1 .metric-surface,
        html.dark body.ui-refresh-v1 .settings-section-card {
            border-color: rgba(71, 85, 105, 0.46);
            box-shadow: var(--ui-shadow-dark) !important;
        }

        body.ui-refresh-v1 .animate-gradient,
        body.ui-refresh-v1 .animate-pulse {
            animation-duration: 9s;
            animation-timing-function: ease-in-out;
        }

        body.ui-refresh-v1 #app-toolbar button {
            border: 1px solid rgba(148, 163, 184, 0.34);
            box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
        }

        html.dark body.ui-refresh-v1 #app-toolbar button {
            border-color: rgba(71, 85, 105, 0.65);
            box-shadow: 0 8px 16px rgba(2, 6, 23, 0.3);
        }

        body.ui-refresh-v1 :focus-visible {
            outline: none;
            box-shadow: var(--ui-focus-ring);
            border-color: rgba(56, 189, 248, 0.8) !important;
        }

        body.ui-refresh-v1 .section-heading {
            letter-spacing: 0.01em;
            line-height: 1.2;
        }

        body.ui-refresh-v1 .active-call-pulse {
            animation: glow-pulse 3.4s ease-in-out infinite;
        }

        body.ui-refresh-v1 .focus-workstrip-row {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 1rem;
            margin-bottom: 0.8rem;
        }

        body.ui-refresh-v1 .focus-workstrip-eyebrow {
            margin: 0;
            font-size: 0.72rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #475569;
            font-weight: 700;
        }

        html.dark body.ui-refresh-v1 .focus-workstrip-eyebrow {
            color: #94a3b8;
        }

        body.ui-refresh-v1 .focus-workstrip-status {
            margin: 0.15rem 0 0;
            font-size: 1rem;
            font-weight: 700;
            color: #0f172a;
        }

        body.ui-refresh-v1 .focus-workstrip-status.is-active {
            color: #065f46;
        }

        html.dark body.ui-refresh-v1 .focus-workstrip-status {
            color: #e2e8f0;
        }

        html.dark body.ui-refresh-v1 .focus-workstrip-status.is-active {
            color: #6ee7b7;
        }

        body.ui-refresh-v1 .focus-workstrip-metrics {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 0.65rem;
            margin-bottom: 0.85rem;
        }

        body.ui-refresh-v1 .focus-workstrip-metric {
            border-radius: 0.7rem;
            border: 1px solid rgba(148, 163, 184, 0.28);
            background: rgba(248, 250, 252, 0.55);
            padding: 0.55rem 0.68rem;
            min-width: 0;
        }

        html.dark body.ui-refresh-v1 .focus-workstrip-metric {
            border-color: rgba(71, 85, 105, 0.56);
            background: rgba(15, 23, 42, 0.46);
        }

        body.ui-refresh-v1 .focus-workstrip-metric-label {
            display: block;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #64748b;
            margin-bottom: 0.2rem;
            font-weight: 700;
        }

        body.ui-refresh-v1 .focus-workstrip-metric-value {
            display: block;
            font-size: 0.92rem;
            font-weight: 700;
            color: #0f172a;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        html.dark body.ui-refresh-v1 .focus-workstrip-metric-value {
            color: #e2e8f0;
        }

        body.ui-refresh-v1 .focus-workstrip-actions {
            display: flex;
            align-items: center;
            gap: 0.6rem;
        }

        body.ui-refresh-v1 .focus-workstrip-action {
            border: 0;
            border-radius: 0.68rem;
            padding: 0.58rem 0.85rem;
            font-size: 0.82rem;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            transition: transform 140ms ease, filter 140ms ease;
        }

        body.ui-refresh-v1 .focus-workstrip-action:hover {
            transform: translateY(-1px);
            filter: brightness(1.03);
        }

        body.ui-refresh-v1 .focus-workstrip-action-secondary {
            background: #1d4ed8;
            color: #eff6ff;
        }

        body.ui-refresh-v1 .focus-workstrip-action-start {
            background: #059669;
            color: #ecfdf5;
        }

        body.ui-refresh-v1 .focus-workstrip-action-end {
            background: #dc2626;
            color: #fef2f2;
        }

        body.ui-refresh-v1 .focus-workstrip-reminder {
            margin: 0.82rem 0 0;
            font-size: 0.76rem;
            font-weight: 600;
            color: #b45309;
        }

        html.dark body.ui-refresh-v1 .focus-workstrip-reminder {
            color: #fcd34d;
        }

        body.ui-refresh-v1 .post-call-review-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            flex-wrap: wrap;
        }

        body.ui-refresh-v1 .post-call-review-title {
            margin: 0;
            font-size: 0.84rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            font-weight: 700;
            color: #0f766e;
        }

        body.ui-refresh-v1 .post-call-review-summary {
            margin: 0.15rem 0 0;
            font-size: 0.86rem;
            color: #0f172a;
            font-weight: 600;
        }

        html.dark body.ui-refresh-v1 .post-call-review-summary {
            color: #e2e8f0;
        }

        body.ui-refresh-v1 .post-call-review-actions {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        body.ui-refresh-v1 .post-call-review-btn {
            border: 0;
            border-radius: 0.62rem;
            padding: 0.5rem 0.75rem;
            font-size: 0.78rem;
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
        }

        body.ui-refresh-v1 .post-call-review-btn-warning {
            background: #f59e0b;
            color: #111827;
        }

        body.ui-refresh-v1 .post-call-review-btn-primary {
            background: #2563eb;
            color: #eff6ff;
        }

        body.ui-refresh-v1 .post-call-review-btn-neutral {
            background: rgba(148, 163, 184, 0.24);
            color: #1e293b;
        }

        html.dark body.ui-refresh-v1 .post-call-review-btn-neutral {
            background: rgba(71, 85, 105, 0.44);
            color: #e2e8f0;
        }

        body.ui-refresh-v1 .modal {
            border-radius: 0.95rem;
            max-height: min(88vh, 920px);
        }

        body.ui-refresh-v1 .modal-actions {
            position: sticky;
            bottom: 0;
            padding-top: 0.7rem;
            margin-top: 0.8rem;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(248, 250, 252, 0.95) 35%);
        }

        html.dark body.ui-refresh-v1 .modal-actions {
            background: linear-gradient(180deg, rgba(2, 6, 23, 0), rgba(15, 23, 42, 0.95) 35%);
        }

        body.ui-refresh-v1 .app-toast {
            box-shadow: 0 10px 22px rgba(15, 23, 42, 0.24);
        }

        @media (max-width: 980px) {
            body.ui-refresh-v1 .focus-workstrip-metrics {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }

            body.ui-refresh-v1 .focus-workstrip-actions {
                flex-wrap: wrap;
            }
        }

        @media (max-width: 640px) {
            body.ui-refresh-v1 .focus-workstrip-row {
                flex-direction: column;
                align-items: flex-start;
            }

            body.ui-refresh-v1 .focus-workstrip-metrics {
                grid-template-columns: 1fr;
            }

            body.ui-refresh-v1 .post-call-review-actions {
                width: 100%;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            body.ui-refresh-v1 .focus-workstrip-action,
            body.ui-refresh-v1 #app-toolbar button,
            body.ui-refresh-v1 .post-call-review-btn {
                transition: none !important;
            }

            body.ui-refresh-v1 .animate-gradient,
            body.ui-refresh-v1 .animate-pulse,
            body.ui-refresh-v1 .active-call-pulse {
                animation: none !important;
            }
        }
    
