        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

        :root {
            --bg-primary: #ffffff;
            --bg-card: #ffffff;
            --text-primary: #171717;
            --text-secondary: #737373;
            --text-tertiary: #a3a3a3;
            --text-quaternary: #c4c4c4;
            /* Golden accent ramp */
            --golden-primary: #ca8a04;
            --golden-mid: #d4a938;
            --golden-light: #e8cc6e;
            --golden-wash: #fdf6e3;
            --golden-lightest: #fefcf5;
            --golden-inactive: #e0c97a;
            --golden-dark: #2E1D34;

            /* Trial tag color */
            --tag-gold: #ca8a04;

            --border: #e5e5e5;
            --border-subtle: #f0f0f0;
            --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
            --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
            --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
            --danger: #dc2626;
            --success: #16a34a;
        }

        body {
            font-family: 'Inter', sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.6;
            padding: 0;
            min-height: 100vh;
        }

        /* Hide detail panel brace by default (mobile-first) */
        .detail-panel-brace {
            display: none;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 60px 40px;
        }

        /* Header */
        .header {
            margin-bottom: 80px;
            animation: fadeIn 0.6s ease;
        }

        .brand {
            display: flex;
            padding-top: env(safe-area-inset-top, 20px);
            align-items: center;
            gap: 12px;
            margin-bottom: 48px;
        }

        .brand-icon {
            width: 40px;
            height: 40px;
            background: var(--golden-primary);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
        }

        .brand-name {
            font-family: 'Inter', sans-serif;
            font-size: 28px;
            font-weight: 600;
            color: var(--text-primary);
            letter-spacing: -0.5px;
        }

        .brand-link {
            display: inline-block;
            cursor: pointer;
        }

        .brand-wordmark {
            height: 85px;
            width: auto;
        }

        /* Smaller wordmark on mobile */
        @media (max-width: 480px) {
            .brand-wordmark {
                height: 60px;
            }
        }

        .activation-status {
            position: absolute;
            top: 24px;
            right: 40px;
            display: none;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            background: #dcfce7;
            color: #166534;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
        }

        .activation-status.active {
            display: flex;
        }

        .activation-status-dot {
            width: 6px;
            height: 6px;
            background: #16a34a;
            border-radius: 50%;
        }

        .logout-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 24px;
            height: 24px;
            margin-left: 4px;
            padding: 0;
            background: transparent;
            border: none;
            border-radius: 50%;
            color: #166534;
            cursor: pointer;
            transition: all 0.2s ease;
            opacity: 0.7;
        }

        .logout-btn:hover {
            background: rgba(22, 101, 52, 0.15);
            opacity: 1;
        }

        /* Stats Grid */
        .stats-grid {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 24px;
            animation: fadeInUp 0.6s ease 0.1s backwards;
        }

        .stats-main {
            background: var(--bg-card);
            border-radius: 20px;
            padding: 48px;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border);
        }

        .stats-label {
            font-size: 13px;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            color: var(--text-tertiary);
            font-weight: 600;
            margin-bottom: 16px;
        }

        .stats-values {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 40px;
            margin-bottom: 32px;
        }

        .stat-item h3 {
            font-family: 'Inter', sans-serif;
            font-size: 48px;
            font-weight: 600;
            color: var(--text-primary);
            line-height: 1.1;
            margin-bottom: 8px;
            letter-spacing: -1px;
        }

        .stat-item p {
            font-size: 14px;
            color: var(--text-secondary);
        }

        .currency-note {
            background: var(--golden-lightest);
            border-left: 3px solid var(--golden-primary);
            padding: 16px 20px;
            border-radius: 8px;
            font-size: 13px;
            color: #92400e;
            display: none;
        }

        .currency-note.visible {
            display: block;
        }

        .stats-sidebar {
            display: flex;
            flex-direction: column;
            gap: 24px;
        }

        .upcoming-card {
            background: var(--bg-card);
            border-radius: 20px;
            padding: 32px;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border);
        }

        .upcoming-card .stats-label {
            margin-bottom: 20px;
        }

        .upcoming-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .upcoming-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
            background: var(--bg-primary);
            border-radius: 10px;
            font-size: 14px;
        }

        .upcoming-name {
            font-weight: 600;
            color: var(--text-primary);
        }

        .upcoming-days {
            font-size: 13px;
            color: var(--text-secondary);
        }

        .upcoming-days.today {
            color: var(--danger);
            font-weight: 600;
        }

        .upcoming-days.soon {
            color: var(--golden-primary);
            font-weight: 600;
        }

        .count-card {
            background: var(--bg-card);
            border-radius: 20px;
            padding: 24px 32px;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .count-card .stats-label {
            margin-bottom: 0;
        }

        .count-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 48px;
            height: 48px;
            padding: 0 16px;
            background: var(--golden-primary);
            border-radius: 12px;
            font-family: 'Inter', sans-serif;
            font-size: 24px;
            font-weight: 700;
            color: white;
        }

        /* Actions Bar */
        .actions-bar {
            display: flex;
            gap: 16px;
            align-items: center;
            margin: 48px 0;
            padding: 24px 0;
            border-bottom: 1px solid var(--border);
            animation: fadeIn 0.6s ease 0.2s backwards;
        }

        .btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 12px 24px;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            border: none;
            font-family: 'Inter', sans-serif;
        }

        .btn-primary {
            background: var(--text-primary);
            color: var(--bg-card);
        }

        .btn-primary:hover {
            background: #404040;
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .btn-secondary {
            background: transparent;
            color: var(--text-secondary);
            border: 1px solid var(--border);
        }

        .btn-secondary:hover {
            background: var(--bg-card);
            border-color: var(--text-secondary);
            color: var(--text-primary);
        }

        .btn-gold {
            background: var(--golden-primary);
            color: white;
            box-shadow: var(--shadow-sm);
        }

        .btn-gold:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        /* Add New Section (Collapsible) */
        .add-section {
            margin-bottom: 48px;
            animation: fadeIn 0.6s ease 0.3s backwards;
        }

        .add-trigger {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 24px 32px;
            background: var(--bg-card);
            border-radius: 16px;
            border: 2px dashed var(--border);
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .add-trigger:hover {
            border-color: var(--golden-primary);
            background: var(--golden-wash);
        }

        .add-trigger.active {
            border-color: var(--golden-primary);
            background: var(--bg-card);
            border-style: solid;
            border-radius: 16px 16px 0 0;
            box-shadow: var(--shadow-sm);
        }

        .add-trigger-content {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .add-icon {
            width: 40px;
            height: 40px;
            background: var(--golden-primary);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 20px;
            font-weight: 700;
        }

        .add-text {
            font-family: 'Inter', sans-serif;
            font-size: 22px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .add-arrow {
            font-size: 20px;
            color: var(--text-tertiary);
            transition: transform 0.3s ease;
        }

        .add-trigger.active .add-arrow {
            transform: rotate(180deg);
        }

        .add-form-container {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.5s ease;
            background: var(--bg-card);
            border: 2px solid var(--golden-primary);
            border-top: none;
            border-radius: 0 0 16px 16px;
            box-shadow: var(--shadow-md);
        }

        .add-form-container.active {
            max-height: 1200px;
        }

        .add-form-content {
            padding: 40px;
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 24px;
            margin-bottom: 24px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
        }

        .form-group.full-width {
            grid-column: 1 / -1;
        }

        label {
            font-size: 12px;
            letter-spacing: 1px;
            text-transform: uppercase;
            color: var(--text-tertiary);
            font-weight: 600;
            margin-bottom: 8px;
        }

        input, select {
            padding: 14px 16px;
            border: 1px solid var(--border);
            border-radius: 10px;
            font-size: 15px;
            font-family: 'Inter', sans-serif;
            transition: all 0.3s ease;
            background: var(--bg-primary);
            color: var(--text-primary);
        }

        input:focus, select:focus, textarea:focus {
            border-color: var(--golden-primary);
            outline: none;
            box-shadow: 0 0 0 3px rgba(202, 138, 4, 0.1);
        }

        input[type="radio"],
        input[type="checkbox"] {
            accent-color: var(--golden-primary);
        }

        .currency-cost {
            display: grid;
            grid-template-columns: 130px 1fr;
            gap: 12px;
        }

        /* Currency cost input container */
        .currency-cost select {
            width: 130px;
        }

        /* Autocomplete Dropdown Styles */
        .autocomplete-wrapper {
            position: relative;
        }

        .autocomplete-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-top: none;
            border-radius: 0 0 10px 10px;
            max-height: 180px;
            overflow-y: auto;
            z-index: 100;
            display: none;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .autocomplete-dropdown.active {
            display: block;
        }

        .autocomplete-item {
            padding: 12px 16px;
            cursor: pointer;
            font-size: 14px;
            color: var(--text-primary);
            transition: background 0.15s ease;
        }

        .autocomplete-item:hover,
        .autocomplete-item.highlighted {
            background: #fefce8;
        }

        .autocomplete-item:last-child {
            border-radius: 0 0 10px 10px;
        }

        /* Service Picker Styles */
        .name-input-wrapper {
            display: flex;
            gap: 8px;
        }
        .name-input-wrapper input {
            flex: 1;
        }
        .browse-services-btn {
            padding: 12px 14px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 10px;
            cursor: pointer;
            font-size: 16px;
            transition: all 0.2s ease;
        }
        .browse-services-btn:hover {
            background: #f5f5f4;
            border-color: var(--golden-primary);
        }

        .service-picker-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(46, 29, 52, 0.35);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 10000;
            padding: 20px;
        }
        .service-picker-overlay.active {
            display: flex;
        }
        .service-picker-modal {
            background: var(--bg-card);
            border-radius: 20px;
            width: 100%;
            max-width: 600px;
            height: 70vh;
            max-height: 600px;
            display: flex;
            flex-direction: column;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            overflow: hidden;
        }
        .service-picker-header {
            padding: 20px 20px 14px;
            border-bottom: 1px solid var(--border);
            flex-shrink: 0;
        }
        .service-picker-title {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 12px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .service-picker-close {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: var(--text-secondary);
            padding: 4px 8px;
            border-radius: 6px;
        }
        .service-picker-close:hover {
            background: #f5f5f4;
        }
        .service-picker-search {
            width: 100%;
            padding: 10px 14px;
            border: 1px solid var(--border);
            border-radius: 10px;
            font-size: 14px;
        }
        .service-picker-filters {
            display: flex;
            gap: 6px;
            padding: 12px 16px;
            overflow-x: auto;
            border-bottom: 1px solid var(--border);
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            -ms-overflow-style: none;
            align-items: center;
            flex-shrink: 0;
            background: var(--bg-card);
        }
        .service-picker-filters::-webkit-scrollbar {
            display: none;
        }
        .filter-chip {
            padding: 8px 16px;
            background: transparent;
            border: 1.5px solid var(--golden-inactive);
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
            color: var(--text-primary);
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.2s ease;
            flex-shrink: 0;
            line-height: 1.2;
            -webkit-appearance: none;
            appearance: none;
            font-family: 'Inter', sans-serif;
        }
        .filter-chip:hover, .filter-chip.active {
            background: #5B3D66;
            color: white;
            border-color: #5B3D66;
            font-weight: 600;
        }
        .service-picker-list {
            flex: 1;
            overflow-y: auto;
            padding: 12px 16px;
            min-height: 0;
        }
        .service-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 12px 14px;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .service-item:hover {
            background: var(--golden-lightest);
        }

        .service-logo {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            object-fit: contain;
            background: #f5f5f4;
            padding: 6px;
        }
        .service-info {
            flex: 1;
        }
        .service-name {
            font-weight: 600;
            font-size: 15px;
            color: var(--text-primary);
        }
        .service-meta {
            font-size: 13px;
            color: var(--text-secondary);
        }
        .service-price {
            font-size: 14px;
            font-weight: 600;
            color: var(--golden-primary);
        }
        .no-services-found {
            text-align: center;
            padding: 40px;
            color: var(--text-secondary);
        }

        .trial-fields {
            display: none;
            grid-column: 1 / -1;
            background: var(--golden-wash);
            padding: 24px;
            border-radius: 12px;
            border-left: 3px solid var(--tag-gold);
            margin-top: 8px;
        }

        .trial-fields.active {
            display: block;
        }

        .trial-note {
            font-size: 13px;
            color: #92400e;
            margin-bottom: 16px;
            font-weight: 500;
        }

        .form-actions {
            display: flex;
            gap: 12px;
            margin-top: 32px;
            padding-top: 32px;
            border-top: 1px solid var(--border);
        }

        /* Charts */
        .charts-section {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 24px;
            margin-bottom: 48px;
            animation: fadeIn 0.6s ease 0.4s backwards;
        }

        .chart-card {
            background: var(--bg-card);
            border-radius: 20px;
            padding: 40px;
            border: 1px solid var(--border);
            box-shadow: var(--shadow-sm);
        }

        .chart-title {
            font-family: 'Inter', sans-serif;
            font-size: 20px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 32px;
            letter-spacing: -0.3px;
        }

        .chart-container {
            position: relative;
            height: 280px;
        }

        /* Subscriptions List */
        .subscriptions-section {
            animation: fadeIn 0.6s ease 0.5s backwards;
        }

        .section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 32px;
        }

        .section-title {
            font-family: 'Inter', sans-serif;
            font-size: 28px;
            font-weight: 600;
            color: var(--text-primary);
            letter-spacing: -0.5px;
        }

        .subscriptions-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
            gap: 20px;
        }

        .subscription-card {
            background: var(--bg-card);
            border-radius: 16px;
            padding: 24px;
            border: 1px solid var(--border);
            box-shadow: var(--shadow-sm);
            display: flex;
            flex-direction: column;
            gap: 16px;
            transition: all 0.3s ease;
            height: auto;
            cursor: pointer;
            user-select: none;
        }

        .subscription-card:hover:not(.expanded) {
            border-color: var(--golden-primary);
            box-shadow: var(--shadow-md);
            transform: translateY(-2px);
        }

        .subscription-card.trial {
            border-left: 3px solid var(--tag-gold);
        }

        .subscription-card.expanded {
            cursor: default;
            border-color: var(--golden-primary);
        }

        .subscription-card.expanded:hover {
            transform: none;
        }

        .subscription-info {
            display: flex;
            flex-direction: column;
            gap: 12px;
            flex: 1;
        }

        .subscription-header {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .subscription-name {
            font-family: 'Inter', sans-serif;
            font-size: 24px;
            font-weight: 600;
            color: var(--text-primary);
            letter-spacing: -0.3px;
        }

        .trial-badge {
            display: inline-flex;
            align-items: center;
            padding: 4px 12px;
            background: var(--tag-gold);
            color: white;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }

        .subscription-summary {
            font-size: 14px;
            color: var(--text-secondary);
            line-height: 1.6;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .subscription-summary .summary-text {
            flex: 1;
        }

        .subscription-summary .cost {
            color: var(--text-primary);
            font-weight: 600;
        }

        .subscription-summary .days-until {
            font-style: italic;
            font-weight: 700;
            color: var(--text-primary);
        }

        .subscription-summary .days-until.today {
            color: var(--danger);
        }

        .subscription-summary .days-until.soon {
            color: var(--golden-primary);
        }

        .expand-icon {
            font-size: 12px;
            color: var(--text-tertiary);
            transition: transform 0.3s ease;
            margin-left: 8px;
        }

        .subscription-card.expanded .expand-icon {
            transform: rotate(180deg);
        }

        .subscription-details {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
        }

        .subscription-card.expanded .subscription-details {
            max-height: 300px;
        }

        .subscription-meta {
            display: flex;
            gap: 16px;
            align-items: center;
            flex-wrap: wrap;
            font-size: 13px;
            padding-top: 12px;
        }

        .meta-item {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            color: var(--text-secondary);
        }

        .meta-label {
            color: var(--text-tertiary);
        }

        .payment-badge {
            display: inline-flex;
            padding: 6px 12px;
            background: var(--bg-primary);
            border-radius: 8px;
            font-size: 12px;
            color: var(--text-secondary);
            font-weight: 500;
        }

        .trial-warning {
            padding: 10px 14px;
            background: var(--golden-lightest);
            border-radius: 8px;
            font-size: 12px;
            color: #92400e;
            font-weight: 600;
            margin-top: 8px;
        }

        .subscription-bottom {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-top: 16px;
            border-top: 1px solid var(--border);
        }

        .monthly-cost {
            display: flex;
            align-items: baseline;
            gap: 8px;
        }

        .cost-amount {
            font-family: 'Inter', sans-serif;
            font-size: 28px;
            font-weight: 600;
            color: var(--text-primary);
            line-height: 1;
            letter-spacing: -0.5px;
        }

        .cost-period {
            font-size: 12px;
            color: var(--text-tertiary);
        }

        .will-be-cost {
            font-size: 11px;
            color: var(--text-secondary);
            margin-top: 4px;
        }

        .subscription-actions {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .btn-icon {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 10px;
            border: 1px solid var(--border);
            background: transparent;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 16px;
        }

        .btn-icon:hover {
            background: var(--bg-primary);
            color: var(--text-primary);
            border-color: var(--text-secondary);
        }

        .btn-icon.delete {
            color: var(--danger);
            border-color: var(--danger);
        }

        .btn-icon.delete:hover {
            background: #fee2e2;
        }

        .btn-renewed {
            padding: 8px 16px;
            border-radius: 8px;
            border: 1px solid var(--golden-primary);
            background: transparent;
            color: var(--golden-primary);
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            transition: all 0.3s ease;
            white-space: nowrap;
        }

        .btn-renewed:hover {
            background: var(--golden-primary);
            color: white;
        }

        .btn-renewed.urgent {
            background: var(--golden-primary);
            color: white;
            border-color: var(--golden-primary);
            animation: pulse 2s ease-in-out infinite;
        }

        .btn-manage {
            padding: 6px 12px;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: transparent;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 12px;
            font-weight: 500;
            transition: all 0.2s ease;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }

        .btn-manage:hover {
            background: var(--golden-primary);
            color: white;
            border-color: var(--golden-primary);
        }

        @keyframes pulse {
            0%, 100% {
                box-shadow: 0 0 0 0 rgba(202, 138, 4, 0.4);
            }
            50% {
                box-shadow: 0 0 0 8px rgba(202, 138, 4, 0);
            }
        }

        .renewed-confirm {
            position: fixed;
            bottom: 32px;
            right: 32px;
            background: var(--text-primary);
            color: white;
            padding: 16px 24px;
            border-radius: 12px;
            box-shadow: var(--shadow-lg);
            font-size: 14px;
            animation: slideUp 0.4s ease;
            z-index: 1000;
        }

        .renewed-confirm.hidden {
            display: none;
        }

        /* Settings */
        .settings-panel {
            background: var(--bg-card);
            border-radius: 16px;
            padding: 24px 32px;
            border: 1px solid var(--border);
            margin-bottom: 48px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            animation: fadeIn 0.6s ease 0.2s backwards;
        }

        .settings-label {
            font-size: 14px;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .settings-select {
            padding: 10px 16px;
            border: 1px solid var(--border);
            border-radius: 8px;
            font-size: 14px;
            background: var(--bg-primary);
            color: var(--text-primary);
            font-family: 'Inter', sans-serif;
            cursor: pointer;
        }

        /* Empty State */
        .empty-state {
            grid-column: 1 / -1;
            background: var(--bg-card);
            border-radius: 20px;
            padding: 80px 40px;
            text-align: center;
            border: 2px dashed var(--border);
        }

        .empty-icon {
            font-size: 64px;
            margin-bottom: 24px;
            opacity: 0.3;
        }

        .empty-text {
            font-size: 16px;
            color: var(--text-secondary);
        }

        /* Activation Modal */
        .activation-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            backdrop-filter: blur(8px);
        }

        .activation-overlay.hidden {
            display: none;
        }

        .activation-modal {
            background: white;
            padding: 48px;
            border-radius: 24px;
            max-width: 500px;
            width: 90%;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            animation: modalAppear 0.4s ease;
        }

        @keyframes modalAppear {
            from {
                opacity: 0;
                transform: scale(0.9) translateY(20px);
            }
            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        .activation-icon {
            font-size: 64px;
            text-align: center;
            margin-bottom: 24px;
        }

        .activation-title {
            font-family: 'Inter', sans-serif;
            font-size: 32px;
            font-weight: 600;
            text-align: center;
            margin-bottom: 12px;
            color: var(--text-primary);
        }

        .activation-subtitle {
            font-size: 14px;
            color: var(--text-secondary);
            text-align: center;
            margin-bottom: 32px;
            line-height: 1.6;
        }

        .activation-form label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .activation-form input {
            width: 100%;
            padding: 14px 16px;
            border: 2px solid var(--border);
            border-radius: 12px;
            font-size: 15px;
            font-family: 'Inter', sans-serif;
            margin-bottom: 20px;
            transition: all 0.3s ease;
        }

        .activation-form input:focus {
            outline: none;
            border-color: var(--golden-primary);
            box-shadow: 0 0 0 3px rgba(202, 138, 4, 0.1);
        }

        .activation-form input[name="licenseKey"] {
            font-family: 'Courier New', monospace;
            font-size: 14px;
            letter-spacing: 1px;
        }

        .activation-submit {
            width: 100%;
            padding: 16px;
            background: var(--golden-primary);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-top: 8px;
        }

        .activation-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(202, 138, 4, 0.3);
        }

        .activation-submit:active {
            transform: translateY(0);
        }

        .activation-error {
            background: #fee2e2;
            color: #991b1b;
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 13px;
            margin-top: 16px;
            display: none;
        }

        .activation-error.show {
            display: block;
        }

        .activation-help {
            margin-top: 24px;
            padding-top: 24px;
            border-top: 1px solid var(--border);
            text-align: center;
            font-size: 12px;
            color: var(--text-tertiary);
        }

        .activation-divider {
            display: flex;
            align-items: center;
            margin: 24px 0 16px;
        }

        .activation-divider::before,
        .activation-divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: var(--border);
        }

        .activation-divider span {
            padding: 0 16px;
            color: var(--text-tertiary);
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .recovery-link-btn {
            width: 100%;
            padding: 14px 20px;
            background: transparent;
            border: 2px solid var(--border);
            border-radius: 12px;
            color: var(--text-secondary);
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            font-family: 'Inter', sans-serif;
        }

        .recovery-link-btn:hover {
            border-color: var(--golden-primary);
            color: var(--golden-primary);
            background: rgba(202, 138, 4, 0.05);
        }

        .recovery-success {
            background: #dcfce7;
            color: #166534;
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 13px;
            margin-top: 16px;
            display: none;
            font-weight: 600;
        }

        .recovery-success.show {
            display: block;
        }

        /* Footer */
        .footer {
            margin-top: 40px;
            padding-top: 0;
            border-top: none;
            animation: fadeIn 0.6s ease 0.6s backwards;
        }

        /* Mobile Footer */
        .footer-mobile {
            display: block;
        }

        .footer-mobile-divider {
            height: 1px;
            background: #e5e5e5;
            margin-bottom: 16px;
        }

        .footer-mobile-content {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 8px;
            padding-bottom: 24px;
        }

        .footer-mobile-link {
            font-size: 11px;
            font-weight: 400;
            color: #ca8a04;
            text-decoration: none;
        }

        .footer-mobile-separator {
            font-size: 11px;
            color: #ca8a04;
        }

        .footer-mobile-version {
            font-size: 10px;
            font-weight: 400;
            color: #ca8a04;
        }

        .footer-mobile-text {
            font-size: 10px;
            font-weight: 400;
            color: #ca8a04;
        }

        /* Desktop Footer - Minimal Colophon */
        .footer-desktop {
            display: none;
        }

        .footer-desktop-divider {
            height: 1px;
            background: var(--border-subtle);
            margin-bottom: 32px;
        }

        .footer-desktop-content {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 12px;
            padding: 8px 0 40px;
        }

        .footer-desktop .footer-text {
            font-size: 12px;
            font-weight: 400;
            color: #ca8a04;
            letter-spacing: 0.01em;
        }

        .footer-desktop .footer-separator {
            font-size: 12px;
            color: #ca8a04;
            opacity: 0.6;
        }

        .footer-desktop .footer-link {
            font-size: 12px;
            font-weight: 400;
            color: #ca8a04;
            text-decoration: none;
            letter-spacing: 0.01em;
            transition: color 0.2s ease;
        }

        .footer-desktop .footer-link:hover {
            color: #ca8a04;
        }

        /* Responsive: Show mobile footer on mobile, desktop footer on desktop */
        @media (min-width: 769px) {
            .footer-mobile {
                display: none;
            }

            .footer-desktop {
                display: block;
            }

            .footer {
                margin-top: 80px;
                padding: 0 40px;
                border-top: none;
            }
        }

        /* Animations */
        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Responsive */
        @media (max-width: 1200px) {
            .stats-grid {
                grid-template-columns: 1fr;
            }

            .stats-values {
                grid-template-columns: 1fr;
                gap: 32px;
            }

            .charts-section {
                grid-template-columns: 1fr;
            }

            .subscriptions-list {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 768px) {
            .container {
                padding: 40px 24px;
            }

            .stats-main {
                padding: 32px 24px;
            }

            .stat-item h3 {
                font-size: 36px;
            }

            .subscription-card {
                padding: 20px;
            }

            .form-grid {
                grid-template-columns: 1fr;
            }

            .actions-bar {
                flex-wrap: wrap;
            }

            /* Mobile-specific form fixes */
            .add-section {
                margin-bottom: 32px;
            }

            .add-form-container {
                padding: 24px 20px;
            }

            .form-title {
                font-size: 24px;
                margin-bottom: 20px;
            }

            .form-row {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .currency-cost {
                grid-template-columns: 100px 1fr;
                gap: 8px;
            }

            label {
                font-size: 12px;
            }

            input, select {
                padding: 12px 14px;
                font-size: 14px;
            }

            .trial-fields {
                padding: 20px 16px;
            }

            .form-actions {
                flex-direction: column;
                gap: 12px;
                margin-top: 24px;
                padding-top: 24px;
            }

            .form-actions button {
                width: 100%;
            }

            /* Activation modal mobile */
            .activation-modal {
                padding: 32px 24px;
                width: 95%;
            }

            .activation-title {
                font-size: 26px;
            }

            .activation-form input {
                padding: 12px 14px;
                font-size: 14px;
            }

            /* Stats grid mobile */
            .stats-values {
                grid-template-columns: 1fr;
            }

            .stat-item {
                text-align: center;
            }

            /* Chart cards mobile */
            .chart-card {
                padding: 24px 20px;
            }

            .chart-container {
                height: 220px;
            }

            /* Activation status mobile */
            .activation-status {
                position: static;
                margin: 0 auto 20px;
                justify-content: center;
            }
        }

        /* Print Styles */
        @media print {
            body {
                background: white;
            }

            .actions-bar,
            .add-section,
            .settings-panel,
            .subscription-actions,
            .footer {
                display: none !important;
            }

            .subscription-card {
                break-inside: avoid;
            }
        }

        /* Autocomplete Dropdown */
        .autocomplete-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 48px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-top: none;
            border-radius: 0 0 10px 10px;
            box-shadow: var(--shadow-md);
            max-height: 280px;
            overflow-y: auto;
            z-index: 1000;
            display: none;
        }

        .autocomplete-dropdown.active {
            display: block;
        }

        .autocomplete-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            cursor: pointer;
            transition: background 0.15s ease;
        }

        .autocomplete-item:hover,
        .autocomplete-item.selected {
            background: var(--golden-lightest);
        }

        .autocomplete-item-logo {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            object-fit: contain;
            background: #f5f5f4;
            padding: 4px;
        }

        .autocomplete-item-info {
            flex: 1;
            min-width: 0;
        }

        .autocomplete-item-name {
            font-weight: 600;
            font-size: 14px;
            color: var(--text-primary);
        }

        .autocomplete-item-meta {
            font-size: 12px;
            color: var(--text-secondary);
        }

        /* Manage URL group styling for prebuilt services */
        .manage-url-group {
            transition: opacity 0.2s ease;
        }

        .manage-url-group.hidden {
            display: none;
        }

        .manage-url-helper,
        .field-helper {
            font-size: 11px;
            color: var(--text-tertiary);
            margin-top: 6px;
        }

        /* Prebuilt service manage button in form */
        .prebuilt-manage-group {
            display: none;
        }

        .prebuilt-manage-group.active {
            display: block;
        }

        .prebuilt-manage-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 12px 20px;
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 10px;
            color: var(--text-secondary);
            font-size: 14px;
            cursor: not-allowed;
            opacity: 0.8;
        }

        .prebuilt-manage-btn svg {
            width: 16px;
            height: 16px;
        }

        /* ========================================
           PHASE 1 REDESIGN - Mobile-First Styles
           ======================================== */

        /* Hide elements for Phase 1 */
        .phase1-hidden {
            display: none !important;
        }

        /* OLD MODAL STYLES - Commented out in favor of Add View (Phase 4)
        .phase1-redesign .add-form-container {
            position: fixed;
            ...
        }
        */

        /* Floating Add Button (FAB) - Not used with bottom nav */
        .fab-add {
            display: none;
        }

        /* Sticky Footer - OBSOLETE, replaced by bottom nav */
        .sticky-footer {
            display: none;
        }

        /* Subscription List - Editorial rhythm */
        .subscriptions-list {
            display: flex;
            flex-direction: column;
            gap: 0;
            background: transparent;
            border-radius: 0;
            overflow: visible;
        }

        .sub-row {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 20px;
            background: var(--bg-primary);
            cursor: pointer;
            transition: background 0.15s ease;
            -webkit-tap-highlight-color: transparent;
            border-bottom: 1px solid #F0F0F0;
        }

        .sub-row:last-child {
            border-bottom: none;
        }

        .sub-row:hover {
            background: rgba(0, 0, 0, 0.015);
        }

        .sub-row:active {
            background: rgba(0, 0, 0, 0.025);
        }

        .sub-row.urgent {
            background: #FEF2F2;
        }

        .sub-row.urgent:hover {
            background: #FDEAEA;
        }

        /* Edge-to-edge highlight bars: list container breaks out of .container padding (mobile only) */
        @media (max-width: 768px) {
            .mobile-subscriptions .subscriptions-list {
                margin-left: -16px;
                margin-right: -16px;
            }
        }

        .sub-logo {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            object-fit: contain;
            background: #ffffff;
            flex-shrink: 0;
        }

        .sub-content {
            flex: 1;
            min-width: 0;
        }

        .sub-name {
            font-size: 14px;
            font-weight: 500;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .trial-tag {
            font-size: 10px;
            font-weight: 600;
            color: #ca8a04;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-left: 6px;
        }

        .sub-secondary {
            font-size: 12px;
            color: #888;
            margin-top: 1px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            font-weight: 400;
        }

        /* Empty state adjustment */
        .empty-state {
            background: transparent;
            border: none;
            padding: 60px 20px;
        }

        /* Mobile empty state with greeting and copy */
        .mobile-empty-state {
            padding: 40px 24px;
            text-align: left !important;
            align-items: flex-start !important;
        }

        .mobile-empty-greeting {
            font-family: 'Inter', sans-serif;
            font-size: 26px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 16px;
            letter-spacing: -0.3px;
            text-align: left;
        }

        .mobile-empty-copy {
            font-family: 'Inter', sans-serif;
            font-size: 15px;
            font-style: italic;
            font-weight: 400;
            color: var(--text-secondary);
            line-height: 1.7;
            margin-bottom: 28px;
            text-align: left;
        }

        .mobile-empty-state .empty-add-btn {
            width: 100%;
            text-align: center;
        }

        /* ===== EMPTY STATE ONBOARDING ===== */
        .empty-state-onboarding {
            padding: 32px 20px;
        }

        .empty-state-onboarding.mobile {
            padding: 24px 0;
        }

        .empty-state-onboarding.desktop {
            padding: 40px 0;
            /* No max-width - inherits full width from .main-list-area (800px) */
        }

        /* Greeting Section */
        .empty-state-greeting-section {
            margin-bottom: 32px;
        }

        .empty-state-greeting {
            font-family: 'Inter', sans-serif;
            font-size: 26px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 8px;
            letter-spacing: -0.3px;
        }

        .empty-state-subtitle {
            font-family: 'Inter', sans-serif;
            font-size: 15px;
            font-weight: 400;
            color: var(--text-secondary);
            line-height: 1.5;
        }

        /* Manual add link in heading */
        .empty-state-manual-link {
            color: var(--golden-mid);
            text-decoration: none;
            font-weight: 600;
        }

        .empty-state-manual-link:hover {
            color: var(--golden-mid);
            text-decoration: underline;
        }

        /* Ghost Preview Section */
        .empty-state-ghost-section {
            margin-bottom: 40px;
        }

        .empty-state-ghost-card {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 16px;
            background: var(--bg-card);
            border-radius: 12px;
            margin-bottom: 8px;
            opacity: 0.35;
            pointer-events: none;
            user-select: none;
        }

        .empty-state-ghost-logo {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            object-fit: cover;
            flex-shrink: 0;
        }

        .empty-state-ghost-info {
            flex: 1;
            min-width: 0;
        }

        .empty-state-ghost-name {
            font-family: 'Inter', sans-serif;
            font-size: 15px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 2px;
        }

        .empty-state-ghost-meta {
            font-size: 13px;
            color: var(--text-secondary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .empty-state-ghost-label {
            font-size: 13px;
            color: var(--text-tertiary);
            text-align: center;
            margin-top: 12px;
        }

        /* Desktop Ghost Rows (match real subscription rows) */
        .empty-state-ghost-row {
            opacity: 0.35;
            pointer-events: none;
            user-select: none;
        }

        .empty-state-ghost-header {
            opacity: 0.5;
            pointer-events: none;
            user-select: none;
        }

        /* Quick-Add Section */
        .empty-state-quickadd-section {
            margin-bottom: 32px;
        }

        .empty-state-quickadd-heading {
            font-family: 'Inter', sans-serif;
            font-size: 15px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 16px;
        }

        .empty-state-quickadd-grid {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 16px;
        }

        /* Mobile: 4 columns, 2 rows */
        .empty-state-onboarding.mobile .empty-state-quickadd-grid {
            gap: 12px 20px;
        }

        .empty-state-onboarding.mobile .empty-state-quickadd-grid .empty-state-quick-card {
            width: calc(25% - 15px);
        }

        .empty-state-quick-card {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 6px;
            background: transparent;
            border: none;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }

        .empty-state-quick-logo {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            object-fit: cover;
            opacity: 0.55;
            transition: opacity 0.15s ease;
        }

        .empty-state-quick-card:hover .empty-state-quick-logo,
        .empty-state-quick-card:active .empty-state-quick-logo,
        .empty-state-quick-card:focus .empty-state-quick-logo {
            opacity: 1;
        }

        /* Bottom Actions */
        .empty-state-actions {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
        }

        .empty-state-link {
            background: none;
            border: none;
            font-family: 'Inter', sans-serif;
            font-size: 14px;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 8px 16px;
            transition: color 0.15s ease;
        }

        .empty-state-link:hover {
            color: var(--text-primary);
        }

        /* Desktop: 8 logos in a single row, wrap if needed */
        .empty-state-onboarding.desktop .empty-state-quickadd-grid {
            justify-content: space-evenly;
            gap: 20px;
        }

        .empty-state-onboarding.desktop .empty-state-quick-card {
            padding: 8px;
        }

        .empty-state-onboarding.desktop .empty-state-quick-logo {
            width: 42px;
            height: 42px;
        }

        .empty-state-onboarding.desktop .empty-state-actions {
            flex-direction: row;
            justify-content: center;
            gap: 24px;
        }

        /* Section header simplified */
        .subscriptions-section .section-header {
            display: none;
        }

        /* Header - editorial spacing */
        .header {
            margin-bottom: 36px;
        }

        .brand {
            margin-bottom: 0;
        }

        /* Container padding adjustment for sticky footer */
        .container {
            padding-bottom: 100px;
        }

        /* Mobile-first responsive adjustments */
        @media (max-width: 768px) {
            .container {
                display: flex;
                flex-direction: column;
                min-height: calc(100vh - 60px);
                padding: 20px 16px 100px;
                overflow-x: hidden;
            }

            .view-container {
                flex: 1;
            }

            .header {
                margin-bottom: 32px;
            }

            .brand-name {
                font-size: 20px;
            }

            .brand-icon {
                width: 32px;
                height: 32px;
                font-size: 16px;
            }

            .fab-add {
                bottom: 70px;
                right: 16px;
                width: 52px;
                height: 52px;
            }

            .fab-icon {
                font-size: 26px;
            }

            .sub-row {
                padding: 16px 20px;
                gap: 12px;
            }

            .sub-logo {
                width: 32px;
                height: 32px;
                background: transparent;
            }

            .sub-name {
                font-size: 14px;
            }

            .sub-secondary {
                font-size: 11px;
            }

            .subscriptions-list {
                border-radius: 0;
            }
        }

        /* OLD MODAL STYLES - Removed in favor of Add View (Phase 4)
           Form input caret visibility is now handled in #addView styles
           Form modal header styles are no longer needed
           Desktop modal styles are no longer needed
        */

        /* Desktop enhancements */
        @media (min-width: 769px) {
            .subscriptions-list {
                max-width: 100%;
                width: 100%;
            }
        }

        /* ========================================
           PHASE 2A - Subscription Status Styles
           ======================================== */

        /* Paused subscription row - muted styling */
        .sub-row.paused {
            opacity: 0.5;
            background: #ffffff;
        }

        .sub-row.paused:hover {
            background: #eeeeee;
            opacity: 0.6;
        }

        .sub-row.paused .sub-name {
            color: var(--text-secondary);
        }

        .sub-row.paused .sub-secondary {
            color: var(--text-tertiary);
        }

        .sub-row.paused .sub-logo {
            filter: grayscale(100%);
            opacity: 0.7;
        }

        /* Incomplete subscription row — full opacity, no dimming */
        .subscription-incomplete {
            opacity: 1;
        }

        .subscription-incomplete:hover {
            opacity: 1;
        }

        /* Incomplete nudge text styling */
        .incomplete-nudge {
            color: #999;
            font-size: 13px;
            font-style: italic;
        }

        /* Status Actions Section in Edit Form */
        .status-actions {
            margin-top: 24px;
            padding-top: 20px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .status-actions-divider {
            height: 1px;
            background: var(--border);
            margin-bottom: 8px;
        }

        .btn-status {
            width: 100%;
            padding: 14px 20px;
            border-radius: 10px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: 'Inter', sans-serif;
            text-align: center;
            border: 1px solid var(--border);
            background: var(--bg-card);
        }

        /* Pause removed from UI — styles retained for legacy paused data */
        .btn-pause {
            display: none !important;
        }

        .btn-resume {
            color: var(--success);
            border-color: var(--success);
            background: #f0fdf4;
        }

        .btn-resume:hover {
            background: #dcfce7;
        }

        .btn-cancel-sub {
            color: var(--danger);
            border-color: var(--danger);
            background: #fef2f2;
        }

        .btn-cancel-sub:hover {
            background: #fee2e2;
        }

        /* Mobile adjustments for status actions */
        @media (max-width: 768px) {
            .status-actions {
                margin-top: 20px;
                padding-top: 16px;
            }

            .btn-status {
                padding: 12px 16px;
                font-size: 13px;
            }
        }

        /* ========================================
           PHASE 2B - Mobile Swipe Interactions
           ======================================== */

        /* Swipe row wrapper */
        .sub-row-wrapper {
            position: relative;
            overflow: hidden;
            background: transparent;
        }

        /* Swipe action areas (hidden behind row) */
        .swipe-action-left,
        .swipe-action-right {
            position: absolute;
            top: 0;
            bottom: 0;
            display: flex;
            align-items: stretch;
            opacity: 0;
            transition: opacity 0.15s ease;
        }

        /* Left swipe action (Manage only) */
        .swipe-action-left {
            right: 0;
            width: 90px;
            padding: 0;
            gap: 0;
        }

        .swipe-action-left .swipe-btn {
            flex: 1;
            border-radius: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Right swipe action (Renewed button) */
        .swipe-action-right {
            left: 0;
            width: 100px;
            padding: 0;
        }

        .swipe-action-right .swipe-btn {
            flex: 1;
            border-radius: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Show action areas during swipe */
        .sub-row-wrapper.swipe-left-active .swipe-action-left,
        .sub-row-wrapper.swipe-open .swipe-action-left {
            opacity: 1;
            z-index: 1;
        }

        .sub-row-wrapper.swipe-right-active .swipe-action-right,
        .sub-row-wrapper.swipe-open-right .swipe-action-right {
            opacity: 1;
            z-index: 1;
        }

        /* Swipe action buttons */
        .swipe-btn {
            padding: 8px 12px;
            border: none;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            white-space: nowrap;
            text-align: center;
            font-family: 'Inter', sans-serif;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }

        .swipe-btn:active {
            opacity: 0.8;
        }

        .swipe-manage {
            background: var(--golden-mid);
            color: white;
        }

        .swipe-manage.disabled {
            background: #9ca3af;
            color: #e5e7eb;
            cursor: default;
        }

        .swipe-renew {
            background: var(--success);
            color: white;
        }

        /* Row during swipe */
        .sub-row-wrapper .sub-row {
            position: relative;
            z-index: 2;
            transition: transform 0.2s ease;
            will-change: transform;
        }

        .sub-row-wrapper.swiping .sub-row {
            transition: none;
        }

        /* Hide swipe UI on desktop */
        @media (min-width: 769px) {
            .swipe-action-left,
            .swipe-action-right {
                display: none;
            }
        }

        /* Mobile swipe enhancements */
        @media (max-width: 768px) {
            .sub-row-wrapper {
                touch-action: pan-y;
            }

            .swipe-btn {
                font-size: 14px;
            }

            .swipe-action-left {
                width: 90px;
            }
        }

        /* ========================================
           BILL ROW STYLES
           ======================================== */

        /* Bill row styling - inherits from subscription rows with bill-specific additions */
        .bill-row-wrapper {
            /* Inherits from .sub-row-wrapper */
        }

        .bill-row {
            cursor: default; /* No interaction yet */
        }

        .bill-row-icon {
            font-size: 24px;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .bill-row-icon .bill-logo-img {
            width: 20px;
            height: 20px;
            object-fit: contain;
        }

        .bill-type-icon-svg {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
        }

        .bill-type-icon-svg svg {
            display: block;
            flex-shrink: 0;
        }

        /* Bill tag - matches trial-tag styling */
        .bill-tag {
            font-size: 10px;
            font-weight: 600;
            color: #ca8a04;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-left: 6px;
        }

        /* Prevent bill rows from triggering subscription interactions */
        .bill-row-wrapper .sub-row {
            cursor: default;
        }

        /* Mobile bill row adjustments */
        @media (max-width: 768px) {
            .bill-row-icon {
                width: 32px;
                height: 32px;
                font-size: 18px;
            }

            .bill-row-icon .bill-type-icon-svg {
                width: 24px;
                height: 24px;
            }

            .bill-row-icon .bill-type-icon-svg svg {
                width: 24px;
                height: 24px;
            }

            .bill-row-wrapper .sub-row {
                /* Same padding as subscription rows */
            }
        }

        /* ========================================
           PHASE 3A - Navigation & Layout
           ======================================== */

        /* Header Top - Flex container for brand, nav, user info */
        .header-top {
            display: flex;
            align-items: center;
            gap: 20px;
        }

        /* Desktop header layout: logo-left, nav center-left, user-info right */
        @media (min-width: 769px) {
            .header-top {
                justify-content: flex-start;
            }

            .header-top .brand {
                flex-shrink: 0;
                margin-bottom: 0;
                display: flex;
                align-items: center;
            }

            .header-top .brand-wordmark {
                height: 50px;
                display: block;
            }

            .header-top .desktop-nav {
                flex-shrink: 0;
            }

            .header-top .user-info,
            .header-top .header-actions {
                margin-left: auto;
            }
        }

        /* Mobile header: space-between for brand and user info */
        @media (max-width: 768px) {
            .header-top {
                justify-content: space-between;
            }
        }

        /* Desktop Navigation (Icon-only) */
        .desktop-nav {
            display: none;
            align-items: center;
            gap: 8px;
            margin-left: 32px;
        }

        .desktop-nav-item {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            padding: 0;
            border: none;
            background: transparent;
            color: var(--text-secondary);
            opacity: 0.85;
            cursor: pointer;
            border-radius: 0;
            transition: opacity 0.15s ease;
        }

        .desktop-nav-item .nav-icon {
            width: 19px;
            height: 19px;
            stroke: currentColor;
            pointer-events: none;
        }

        .desktop-nav-item:hover {
            opacity: 1;
        }

        .desktop-nav-item.active {
            color: var(--golden-mid);
            opacity: 1;
        }

        .desktop-nav-item.active .nav-icon {
            stroke: var(--golden-mid);
        }

        /* Desktop Add button - same style as other nav items (grey default, golden active) */
        .desktop-nav-item.add-btn {
            color: var(--text-secondary);
        }

        .desktop-nav-item.add-btn .nav-icon {
            width: 21px;
            height: 21px;
            stroke: currentColor;
            stroke-width: 2.5;
        }

        .desktop-nav-item.add-btn:hover {
            opacity: 0.85;
        }

        .desktop-nav-item.add-btn.active {
            color: var(--golden-mid);
            opacity: 1;
        }

        .desktop-nav-item.add-btn.active .nav-icon {
            stroke: var(--golden-mid);
        }

        /* User Info (Desktop) */
        .user-info,
        .header-actions {
            display: none;
            align-items: center;
            gap: 8px;
        }

        /* Mobile Logout Button - hidden on desktop */
        .mobile-logout-btn {
            display: none;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            border: none;
            background: transparent;
            color: var(--text-secondary);
            opacity: 0.85;
            cursor: pointer;
            border-radius: 0;
            transition: opacity 0.15s ease;
        }

        .mobile-logout-btn:hover {
            opacity: 1;
        }

        .user-email {
            font-size: 12px;
            color: var(--golden-mid);
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-weight: 500;
        }

        .logout-btn-header {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            border: none;
            background: transparent;
            border-radius: 0;
            color: var(--text-tertiary);
            opacity: 0.65;
            cursor: pointer;
            transition: opacity 0.15s ease;
        }

        .logout-btn-header:hover {
            opacity: 0.85;
        }

        /* Bottom Navigation Bar (Mobile) */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            display: flex;
            align-items: stretch;
            justify-content: space-around;
            background: var(--bg-card);
            border-top: 1px solid var(--border);
            padding: 8px 0;
            padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
            z-index: 1000;
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
        }

        .bottom-nav-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            padding: 8px 4px;
            border: none;
            background: transparent;
            color: var(--text-tertiary);
            font-family: 'Inter', sans-serif;
            font-size: 10px;
            font-weight: 500;
            letter-spacing: 0.02em;
            text-transform: uppercase;
            cursor: pointer;
            transition: all 0.2s ease;
            -webkit-tap-highlight-color: transparent;
        }

        .bottom-nav-item .nav-icon {
            width: 24px;
            height: 24px;
            stroke-width: 2;
        }

        .bottom-nav-item.active {
            color: var(--golden-mid);
        }

        @media (hover: hover) {
            .bottom-nav-item:hover {
                color: var(--golden-mid);
            }
        }

        .bottom-nav-item.active .nav-icon {
            stroke: var(--golden-mid);
        }

        /* Add button in bottom nav - grey by default, golden when active */
        .bottom-nav-item.add-btn {
            color: var(--text-tertiary);
        }

        .bottom-nav-item.add-btn .nav-icon {
            width: 28px;
            height: 28px;
            stroke: currentColor;
            stroke-width: 2.5;
        }

        .bottom-nav-item.add-btn.active {
            color: var(--golden-mid);
        }

        @media (hover: hover) {
            .bottom-nav-item.add-btn:hover {
                color: var(--golden-mid);
            }
        }

        /* View containers */
        .view-container {
            animation: fadeIn 0.3s ease;
        }

        /* Stats View */
        .stats-view-header {
            margin-bottom: 24px;
        }

        .stats-view-title {
            font-family: 'Inter', sans-serif;
            font-size: 28px;
            font-weight: 600;
            color: var(--text-primary);
            letter-spacing: -0.5px;
        }

        /* ========================================
           DESKTOP COLUMN HEADERS (Phase 3D)
           ======================================== */

        .desktop-list-header {
            display: none;
        }

        @media (min-width: 769px) {
            .desktop-list-header {
                display: flex;
                align-items: center;
                padding: 8px 16px;
                margin-bottom: 4px;
                font-size: 11px;
                font-weight: 500;
                letter-spacing: 0.5px;
                text-transform: uppercase;
                color: var(--text-tertiary);
                gap: 16px;
            }

            /* Header select column - aligns with row checkboxes */
            .desktop-list-header .header-select {
                width: 16px;
                flex-shrink: 0;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            /* Header logo spacer - aligns with row logos */
            .desktop-list-header .header-logo-spacer {
                width: 40px;
                flex-shrink: 0;
            }

            .desktop-list-header .header-name {
                flex: 1;
                min-width: 180px;
            }

            .desktop-list-header .header-renewal {
                width: 120px;
                text-align: left;
            }

            .desktop-list-header .header-amount {
                width: 100px;
                text-align: right;
            }

            .desktop-list-header .header-payment {
                width: 120px;
                text-align: left;
            }

            .desktop-list-header .header-manage {
                width: 80px;
                text-align: center;
            }

            .desktop-list-header .header-renewed {
                width: 90px;
                text-align: center;
            }

            /* Desktop subscription row layout */
            .sub-row.desktop-row {
                display: flex;
                align-items: center;
                gap: 16px;
            }

            .sub-row.desktop-row .sub-logo {
                width: 40px;
                height: 40px;
                flex-shrink: 0;
            }

            .sub-row.desktop-row .sub-content {
                flex: 1;
                min-width: 180px;
            }

            /* Desktop: Show full service name, no truncation */
            .sub-row.desktop-row .sub-name {
                white-space: normal;
                overflow: visible;
                text-overflow: clip;
                font-size: 15px;
            }

            .sub-row.desktop-row .sub-renewal {
                width: 120px;
                font-size: 13px;
                color: var(--text-secondary);
                flex-shrink: 0;
            }

            .sub-row.desktop-row.urgent .sub-renewal {
                color: var(--danger);
                font-weight: 600;
            }

            .sub-row.desktop-row.soon .sub-renewal {
                color: #b45309;
                font-weight: 500;
            }

            .sub-row.desktop-row .sub-amount {
                width: 100px;
                font-size: 14px;
                font-weight: 500;
                color: var(--text-primary);
                flex-shrink: 0;
                text-align: right;
                justify-content: flex-end;
            }

            .sub-row.desktop-row .sub-payment {
                width: 120px;
                font-size: 13px;
                color: var(--text-secondary);
                flex-shrink: 0;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .sub-row.desktop-row .sub-manage {
                width: 80px;
                text-align: center;
                flex-shrink: 0;
            }

            .sub-row.desktop-row .sub-renewed {
                width: 90px;
                text-align: center;
                flex-shrink: 0;
            }

            /* Desktop manage button (inline) */
            .desktop-manage-btn {
                display: inline-flex;
                align-items: center;
                gap: 4px;
                padding: 6px 12px;
                border: 1px solid var(--border);
                background: transparent;
                border-radius: 6px;
                font-size: 12px;
                color: var(--text-secondary);
                cursor: pointer;
                transition: all 0.2s ease;
                text-decoration: none;
            }

            .desktop-manage-btn:hover {
                background: var(--bg-primary);
                border-color: var(--text-secondary);
            }

            .desktop-manage-btn.disabled {
                color: var(--text-tertiary);
                cursor: default;
                opacity: 0.5;
            }

            .desktop-manage-btn.disabled:hover {
                background: transparent;
                border-color: var(--border);
            }

            /* Desktop renewed button (inline) */
            .desktop-renewed-btn {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                width: 28px;
                height: 28px;
                border: 1px solid var(--border);
                background: transparent;
                border-radius: 6px;
                color: var(--text-tertiary);
                cursor: pointer;
                transition: all 0.2s ease;
            }

            .desktop-renewed-btn:hover {
                background: var(--success);
                border-color: var(--success);
                color: white;
            }

            .desktop-renewed-btn svg {
                width: 16px;
                height: 16px;
            }
        }

        /* Hide desktop columns on mobile */
        .sub-renewal,
        .sub-payment,
        .sub-manage,
        .sub-renewed {
            display: none;
        }

        /* Amount shown on mobile - right-aligned */
        .sub-amount {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            flex-shrink: 0;
            margin-left: auto;
        }

        .sub-amount .amount-value {
            font-family: 'Inter', sans-serif;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
            line-height: 1.2;
            white-space: nowrap;
            letter-spacing: -0.03em;
        }

        .sub-amount .amount-cycle {
            font-size: 10px;
            font-weight: 400;
            color: var(--text-tertiary);
            text-transform: uppercase;
            letter-spacing: 0.02em;
            line-height: 1.3;
        }

        @media (min-width: 769px) {
            .sub-renewal,
            .sub-amount,
            .sub-payment,
            .sub-manage,
            .sub-renewed {
                display: flex;
                align-items: center;
            }

            /* Hide secondary line on desktop (info is in columns) */
            .sub-row.desktop-row .sub-secondary {
                display: none;
            }

            /* Desktop subscription list - remove rounded corners for cleaner look */
            .subscriptions-list {
                border-radius: 12px;
                overflow: hidden;
            }

            /* Desktop list header stays outside rounded container */
            .desktop-list-header {
                background: transparent;
            }
        }

        /* ===== MOBILE STATS - CALM REFLECTION SURFACE ===== */

        /* Mobile Stats Summary */
        .stats-mobile-summary {
            padding: 32px 24px 0;
        }

        /* Hero Stat - Due This Month */
        .stats-mobile-hero {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-bottom: 28px;
        }

        .stats-mobile-hero-label {
            font-size: 12px;
            font-weight: 500;
            color: var(--golden-mid);
            letter-spacing: 0.03em;
            text-transform: uppercase;
        }

        .stats-mobile-hero-value {
            font-family: 'Inter', sans-serif;
            font-size: 26px;
            font-weight: 500;
            color: #262626;
            letter-spacing: -0.3px;
            line-height: 1.2;
        }

        /* Supporting Stats Row */
        .stats-mobile-row {
            display: flex;
            justify-content: space-between;
            gap: 16px;
        }

        .stats-mobile-stat {
            display: flex;
            flex-direction: column;
            gap: 2px;
            flex: 1;
        }

        .stats-mobile-stat-value {
            font-family: 'Inter', sans-serif;
            font-size: 18px;
            font-weight: 500;
            color: #262626;
            letter-spacing: -0.2px;
            line-height: 1.2;
        }

        .stats-mobile-stat-label {
            font-size: 11px;
            font-weight: 400;
            color: var(--golden-light);
            letter-spacing: 0.02em;
            text-transform: uppercase;
        }

        .stats-mobile-divider {
            height: 1px;
            background: #e5e5e5;
            margin-top: 28px;
        }

        /* Show charts in stats view */
        #statsView .charts-section {
            display: grid !important;
            grid-template-columns: 1fr;
            gap: 20px;
        }

        #statsView .chart-card {
            padding: 24px;
        }

        #statsView .chart-container {
            height: 250px;
        }

        /* Mobile Charts - Soft and Informational */
        .stats-mobile-charts {
            display: flex;
            flex-direction: column;
            gap: 40px;
            padding: 32px 24px 48px;
        }

        .stats-mobile-chart-section {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .stats-mobile-chart-title {
            font-size: 11px;
            font-weight: 500;
            color: var(--golden-mid);
            letter-spacing: 0.06em;
            text-transform: uppercase;
        }

        .stats-mobile-bars {
            display: flex;
            flex-direction: column;
            gap: 14px;
        }

        .stats-mobile-bars .stats-bar-row {
            display: grid;
            grid-template-columns: 90px 1fr auto;
            grid-template-rows: auto auto;
            gap: 8px 12px;
            align-items: center;
        }

        .stats-mobile-bars .stats-bar-label {
            font-size: 13px;
            font-weight: 400;
            color: var(--text-secondary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            grid-row: 1;
            grid-column: 1;
        }

        .stats-mobile-bars .stats-bar-track {
            height: 14px;
            background: #f0f0f0;
            border-radius: 3px;
            overflow: hidden;
            position: relative;
            min-width: 40px;
            grid-row: 1;
            grid-column: 2;
        }

        .stats-mobile-bars .stats-bar-fill {
            height: 100%;
            border-radius: 3px;
            transition: all 0.2s ease;
            position: relative;
        }

        /* Gradient: first bar darkest, fading lighter */
        .stats-mobile-bars .stats-bar-row:nth-child(1) .stats-bar-fill {
            background: var(--golden-primary);
        }

        .stats-mobile-bars .stats-bar-row:nth-child(2) .stats-bar-fill {
            background: #d4a938;
        }

        .stats-mobile-bars .stats-bar-row:nth-child(3) .stats-bar-fill {
            background: #e0c97a;
        }

        .stats-mobile-bars .stats-bar-row:nth-child(4) .stats-bar-fill {
            background: #e8cc6e;
        }

        .stats-mobile-bars .stats-bar-row:nth-child(5) .stats-bar-fill {
            background: #f0dda0;
        }

        .stats-mobile-bars .stats-bar-row:nth-child(n+6) .stats-bar-fill {
            background: #f5e8b8;
        }

        /* On hover/touch, intensify to primary */
        .stats-mobile-bars .stats-bar-row:hover .stats-bar-fill,
        .stats-mobile-bars .stats-bar-row.touch-active .stats-bar-fill {
            background: var(--golden-primary) !important;
        }

        .stats-mobile-bars .stats-bar-percent {
            font-size: 13px;
            font-weight: 400;
            color: var(--text-tertiary);
            text-align: right;
            transition: all 0.2s ease;
            grid-row: 1;
            grid-column: 3;
            white-space: nowrap;
        }

        /* When touch-active with long amount text, wrap to second line */
        .stats-mobile-bars .stats-bar-row.touch-active .stats-bar-percent {
            color: var(--golden-primary);
            font-weight: 500;
        }

        .stats-mobile-bars .stats-bar-row:hover .stats-bar-percent {
            color: var(--golden-primary);
            font-weight: 500;
        }

        /* Multi-currency amounts wrap below the bar on mobile */
        .stats-mobile-bars .stats-bar-row.touch-active .stats-bar-percent.multi-currency {
            grid-row: 2;
            grid-column: 2 / 4;
            text-align: right;
            padding-top: 2px;
        }

        .stats-mobile-bars .stats-chart-empty {
            color: var(--text-quaternary);
            font-size: 13px;
            font-style: italic;
        }

        /* Mobile Secondary Section - Demoted */
        .stats-mobile-secondary {
            padding: 32px 24px 40px;
            display: flex;
            flex-direction: column;
            gap: 24px;
        }

        .stats-mobile-cancelled-link {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            padding: 0;
            background: transparent;
            border: none;
            cursor: pointer;
            font-size: 13px;
            font-weight: 400;
            color: var(--text-tertiary);
        }

        .stats-mobile-cancelled-count {
            font-size: 12px;
            color: var(--text-quaternary);
        }

        .stats-mobile-export {
            display: flex;
            gap: 16px;
        }

        .stats-mobile-export-btn {
            padding: 0;
            background: transparent;
            border: none;
            font-size: 12px;
            font-weight: 400;
            color: var(--text-quaternary);
            cursor: pointer;
        }

        /* Hide desktop stats workspace on mobile (shown via desktop media query) */
        .stats-desktop-workspace {
            display: none;
        }

        /* ========================================
           CANCELLED SUBSCRIPTIONS (Phase 3C)
           ======================================== */

        /* Link in Stats view */
        .cancelled-section {
            margin-top: 24px;
            padding-top: 24px;
            border-top: 1px solid var(--border);
        }

        .cancelled-link {
            display: flex;
            align-items: center;
            width: 100%;
            padding: 16px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            cursor: pointer;
            transition: background 0.2s ease;
        }

        .cancelled-link:hover {
            background: var(--bg-primary);
        }

        .cancelled-link-text {
            flex: 1;
            font-size: 15px;
            color: var(--text-primary);
            text-align: left;
        }

        .cancelled-count {
            font-size: 14px;
            color: var(--text-tertiary);
            margin-right: 8px;
        }

        .cancelled-arrow {
            width: 20px;
            height: 20px;
            color: var(--text-tertiary);
        }

        /* Cancelled View */
        .cancelled-view-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 20px;
        }

        .back-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            border: 1px solid var(--border);
            background: var(--bg-card);
            border-radius: 10px;
            cursor: pointer;
            transition: background 0.2s ease;
        }

        .back-btn:hover {
            background: var(--bg-primary);
        }

        .back-btn svg {
            width: 20px;
            height: 20px;
            color: var(--text-secondary);
        }

        .cancelled-view-title {
            font-family: 'Inter', sans-serif;
            font-size: 24px;
            font-weight: 600;
            color: var(--text-primary);
        }

        /* Cancelled List */
        .cancelled-list {
            background: var(--bg-card);
            border-radius: 12px;
            border: 1px solid var(--border);
            overflow: hidden;
        }

        .cancelled-row {
            display: flex;
            align-items: center;
            padding: 14px 16px;
            border-bottom: 1px solid var(--border);
            cursor: pointer;
            transition: background 0.2s ease;
        }

        .cancelled-row:last-child {
            border-bottom: none;
        }

        .cancelled-row:hover {
            background: var(--bg-primary);
        }

        .cancelled-logo {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            object-fit: cover;
            margin-right: 12px;
            opacity: 0.6;
        }

        .cancelled-content {
            flex: 1;
            min-width: 0;
        }

        .cancelled-name {
            font-size: 15px;
            font-weight: 500;
            color: var(--text-secondary);
            margin-bottom: 2px;
        }

        .cancelled-meta {
            font-size: 13px;
            color: var(--text-tertiary);
        }

        .cancelled-badge {
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-tertiary);
            background: var(--bg-primary);
            padding: 4px 8px;
            border-radius: 6px;
        }

        .cancelled-empty {
            padding: 40px 20px;
            text-align: center;
        }

        .cancelled-empty-text {
            font-size: 14px;
            color: var(--text-tertiary);
        }

        /* Restore button style */
        .btn-restore {
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
            color: white;
        }

        .btn-restore:hover {
            background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
        }

        /* ========================================
           ADD VIEW (Phase 4 - Full Page Form)
           ======================================== */

        /* Add View - Full page view like Home, Stats, Cancelled */
        #addView {
            position: relative;
            overflow-y: auto;
            padding-bottom: 100px; /* Space for bottom nav */
        }

        .add-view-header {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 16px 20px;
            background: var(--bg-card);
            border-bottom: 1px solid var(--border);
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .add-view-title {
            font-family: 'Inter', sans-serif;
            font-size: 20px;
            font-weight: 600;
            color: var(--text-primary);
            margin: 0;
        }

        .add-view-content {
            padding: 20px;
        }

        /* Ensure form displays properly in view context */
        #addView .form-grid {
            max-width: 600px;
        }

        /* Form input caret visibility fix for Add View */
        #addView input,
        #addView select,
        #addView textarea {
            caret-color: #000000 !important;
            color: #171717 !important;
            background-color: #ffffff !important;
            opacity: 1 !important;
            transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
            -webkit-text-size-adjust: 100%;
            text-size-adjust: 100%;
            font-size: 15px !important;
            transform: translateZ(0);
            -webkit-transform: translateZ(0);
        }

        #addView input:focus,
        #addView select:focus,
        #addView textarea:focus {
            caret-color: #000000 !important;
            color: #171717 !important;
            background-color: #ffffff !important;
            outline: none;
        }

        #addView input::placeholder,
        #addView textarea::placeholder {
            color: #a3a3a3 !important;
            opacity: 1 !important;
        }

        #addView input,
        #addView input:focus,
        #addView select,
        #addView select:focus,
        #addView textarea,
        #addView textarea:focus {
            -webkit-text-fill-color: initial !important;
        }

        /* Hide desktop Add workspace on mobile (shown via desktop media query) */
        .add-desktop-workspace {
            display: none;
        }

        /* ===== MOBILE ADD VIEW - SEGMENTED DESIGN ===== */

        /* Segmented Control */
        .add-segment-control {
            display: flex;
            padding: 16px 20px;
            gap: 0;
            background: var(--bg-primary);
            border-bottom: 1px solid var(--border);
            position: sticky;
            top: 0;
            z-index: 9;
        }

        .add-segment-btn {
            flex: 1;
            padding: 10px 12px;
            background: transparent;
            border: none;
            font-size: 13px;
            font-weight: 500;
            color: var(--text-tertiary);
            cursor: pointer;
            position: relative;
        }

        .add-segment-btn.active {
            color: var(--golden-primary);
            font-weight: 600;
        }

        .add-segment-btn.active::after {
            content: '';
            position: absolute;
            bottom: -16px;
            left: 16px;
            right: 16px;
            height: 2px;
            background: var(--golden-primary);
        }

        /* Tab Required Asterisk */
        .tab-required {
            color: var(--golden-primary);
            font-weight: 600;
            margin-left: 2px;
        }

        /* Field Required Asterisk */
        .field-required {
            color: var(--golden-primary);
            font-size: 1.1em;
            font-weight: 700;
            margin-left: 2px;
        }

        /* Tab Helper Text */
        .tab-helper-text {
            font-family: 'Inter', sans-serif;
            font-size: 0.8rem;
            font-style: italic;
            color: #999;
            margin: 0 0 20px 0;
            padding: 0;
            font-weight: 400;
        }

        /* Nudge Message */
        .nudge-message {
            font-family: 'Inter', sans-serif;
            font-size: 0.8rem;
            color: #e74c3c;
            text-align: center;
            margin-top: 8px;
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }

        .nudge-message.visible {
            opacity: 1;
        }

        /* Segment Content */
        .add-segment {
            display: none;
        }

        .add-segment.active {
            display: block;
        }

        /* Field Clusters */
        .add-field-cluster {
            margin-bottom: 28px;
        }

        .add-field-label {
            display: block;
            font-size: 12px;
            font-weight: 500;
            color: var(--text-tertiary);
            margin-bottom: 8px;
            letter-spacing: 0.01em;
        }

        .add-field-optional {
            font-weight: 400;
            color: var(--text-quaternary);
        }

        .add-field-input {
            width: 100%;
            padding: 14px 16px;
            font-size: 16px;
            font-weight: 400;
            color: var(--text-primary);
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 8px;
            -webkit-appearance: none;
            appearance: none;
        }

        .add-field-input:focus {
            outline: none;
            border-color: var(--text-tertiary);
        }

        .add-field-input::placeholder {
            color: var(--text-quaternary);
        }

        /* Fix date input height on mobile */
        .add-field-input[type="date"] {
            min-height: 52px;
            line-height: 1.4;
        }

        .add-field-helper {
            font-size: 11px;
            color: var(--text-quaternary);
            margin-top: 6px;
        }

        /* Mobile Type Radio Buttons */
        .add-segment .add-type-checkboxes {
            display: flex;
            gap: 24px;
        }

        .add-segment .add-type-checkbox {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
        }

        .add-segment .add-type-checkbox input[type="radio"] {
            width: 18px;
            height: 18px;
            margin: 0;
            padding: 0;
            cursor: pointer;
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            border: 1.5px solid var(--border);
            border-radius: 50%;
            background: white;
            position: relative;
            flex-shrink: 0;
        }

        .add-segment .add-type-checkbox input[type="radio"]:checked {
            border-color: var(--golden-primary);
        }

        .add-segment .add-type-checkbox input[type="radio"]:checked::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 8px;
            height: 8px;
            background: var(--golden-primary);
            border-radius: 50%;
        }

        .add-segment .add-type-checkbox-label {
            font-size: 15px;
            color: var(--text-tertiary);
            font-weight: 400;
        }

        .add-segment .add-type-checkbox input[type="radio"]:checked + .add-type-checkbox-label {
            color: var(--text-primary);
            font-weight: 500;
        }

        /* Currency + Cost row */
        .add-currency-cost {
            display: flex;
            gap: 10px;
        }

        .add-currency-select {
            flex: 0 0 90px;
            padding: 14px 12px;
        }

        .add-currency-cost .add-field-input:not(.add-currency-select) {
            flex: 1;
        }

        /* Trial Fields */
        .add-trial-fields {
            display: none;
            margin-top: 24px;
            padding-top: 24px;
            border-top: 1px solid var(--border-subtle);
        }

        .add-trial-fields.active,
        #trialFields.active {
            display: block;
        }

        /* Input Wrapper with Browse Button */
        .add-field-input-wrapper {
            position: relative;
        }

        .add-field-input-wrapper .add-field-input {
            width: 100%;
            padding-right: 48px;
        }

        .add-browse-btn {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            width: 32px;
            height: 32px;
            border: 1px solid rgba(202, 138, 4, 0.4);
            background: transparent;
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 500;
        }

        .add-browse-btn svg {
            width: 16px;
            height: 16px;
            color: rgba(202, 138, 4, 0.7);
        }

        .add-segment .autocomplete-wrapper {
            position: relative;
        }

        /* Form Actions */
        .add-form-actions {
            margin-top: 40px;
            padding-top: 24px;
        }

        .add-mobile-submit {
            width: 100%;
            padding: 16px 24px;
            font-size: 15px;
            font-weight: 600;
            font-family: 'Inter', sans-serif;
            letter-spacing: 0.3px;
            color: white;
            background: rgba(202, 138, 4, 0.35);
            border: none;
            border-radius: 12px;
            cursor: pointer;
            opacity: 0.7;
            transition: all 0.2s ease;
        }

        .add-mobile-submit.btn-ready {
            background: rgba(202, 138, 4, 0.85);
            opacity: 1;
        }

        .add-mobile-submit.has-changes {
            background: var(--golden-primary);
            opacity: 1;
        }

        .add-mobile-cancel {
            width: 100%;
            padding: 14px 24px;
            margin-top: 12px;
            font-size: 14px;
            font-weight: 400;
            color: var(--text-tertiary);
            background: transparent;
            border: none;
            cursor: pointer;
        }

        /* Prebuilt Manage Button */
        .add-segment .prebuilt-manage-btn {
            width: 100%;
            padding: 14px 16px;
            font-size: 14px;
            font-weight: 400;
            color: var(--text-secondary);
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 8px;
            cursor: pointer;
            text-align: left;
        }

        .add-segment .prebuilt-manage-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* Mobile Add View adjustments */
        @media (max-width: 768px) {
            .add-view-header {
                padding: 14px 16px;
            }

            .add-view-content {
                padding: 24px 20px;
            }
        }

        /* Mobile Service Suggestion Box */
        .add-suggestion-box-mobile {
            margin-top: 32px;
            padding-top: 24px;
            border-top: 1px solid var(--border-subtle);
        }

        .add-suggestion-box-mobile .add-suggestion-label {
            font-size: 13px;
            font-weight: 500;
            color: var(--text-secondary);
            margin-bottom: 6px;
        }

        .add-suggestion-box-mobile .add-suggestion-helper {
            font-size: 12px;
            color: var(--text-tertiary);
            line-height: 1.4;
            margin-bottom: 14px;
        }

        .add-suggestion-form-mobile {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .add-suggestion-form-mobile .add-suggestion-input,
        .add-suggestion-form-mobile .add-suggestion-select {
            width: 100%;
            padding: 12px 14px;
            font-size: 14px;
            font-family: 'Inter', sans-serif;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg-card);
            color: var(--text-primary);
        }

        .add-suggestion-form-mobile .add-suggestion-input::placeholder {
            color: var(--text-tertiary);
        }

        .add-suggestion-form-mobile .add-suggestion-submit {
            width: 100%;
            padding: 14px 16px;
            font-size: 14px;
            font-family: 'Inter', sans-serif;
            font-weight: 600;
            border: none;
            border-radius: 12px;
            background: #ca8a04;
            color: white;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .add-suggestion-form-mobile .add-suggestion-submit:hover {
            background: #b07d04;
        }

        /* Catalog Suggestion Form (in catalog browse view) */
        #catalogBrowseView .catalog-suggestion-section {
            margin-top: 16px;
            padding: 0 16px;
            text-align: center;
        }

        #catalogBrowseView .catalog-suggestion-section .add-suggestion-toggle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            margin: 0 auto;
            padding: 12px 16px;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .add-suggestion-form-catalog {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .add-suggestion-form-catalog .add-suggestion-input,
        .add-suggestion-form-catalog .add-suggestion-select {
            width: 100%;
            padding: 12px 14px;
            font-size: 14px;
            font-family: 'Inter', sans-serif;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg-card);
            color: var(--text-primary);
        }

        .add-suggestion-form-catalog .add-suggestion-input::placeholder {
            color: var(--text-tertiary);
        }

        .add-suggestion-form-catalog .add-suggestion-submit {
            width: 100%;
            padding: 14px 16px;
            font-size: 14px;
            font-family: 'Inter', sans-serif;
            font-weight: 600;
            border: none;
            border-radius: 12px;
            background: #ca8a04;
            color: white;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .add-suggestion-form-catalog .add-suggestion-submit:hover {
            background: #b07d04;
        }

        /* Prebuilt Billing Link (Mobile) */
        .prebuilt-manage-link {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 14px 16px;
            font-size: 14px;
            font-weight: 400;
            color: var(--accent);
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 8px;
            text-decoration: none;
            transition: all 0.15s ease;
        }

        .prebuilt-manage-link:hover {
            border-color: var(--accent);
            background: rgba(59, 130, 246, 0.05);
        }

        .prebuilt-manage-link svg {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
        }

        /* Collapsible Missing Service Section (Mobile) */
        .add-suggestion-section {
            margin-top: 0;
        }

        .add-suggestion-divider {
            height: 1px;
            background: var(--border-subtle);
            margin-bottom: 16px;
        }

        .add-suggestion-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 0;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .add-suggestion-toggle-text {
            font-size: 13px;
            font-weight: 500;
            color: var(--text-secondary);
        }

        .add-suggestion-chevron {
            width: 18px;
            height: 18px;
            color: var(--text-tertiary);
            transition: transform 0.2s ease;
        }

        .add-suggestion-section.expanded .add-suggestion-chevron {
            transform: rotate(180deg);
        }

        .add-suggestion-content {
            display: none;
            padding-top: 8px;
        }

        .add-suggestion-section.expanded .add-suggestion-content {
            display: block;
        }

        .add-suggestion-content .add-suggestion-helper {
            font-size: 12px;
            color: var(--text-tertiary);
            line-height: 1.4;
            margin-bottom: 14px;
        }

        /* Desktop: center the form */
        @media (min-width: 768px) {
            .add-view-content {
                max-width: 800px;
                margin: 0 auto;
                padding: 32px 40px;
            }

            #addView .form-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 20px;
                max-width: none;
            }

            #addView .form-actions {
                flex-direction: row;
                justify-content: flex-start;
                gap: 12px;
                margin-top: 24px;
                padding-top: 24px;
            }

            #addView .form-actions button {
                width: auto;
                min-width: 140px;
            }

            .add-view-title {
                font-size: 24px;
            }
        }

        /* Data Management Section */
        .data-management-section {
            margin: 24px 0;
            padding: 20px;
            background: var(--bg-card);
            border-radius: 16px;
            border: 1px solid var(--border);
            box-shadow: var(--shadow-sm);
        }

        .data-management-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 16px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .data-management-buttons {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            max-width: 400px;
        }

        /* Center on desktop */
        @media (min-width: 768px) {
            .data-management-buttons {
                margin: 0 auto;
            }
        }

        .data-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 14px 16px;
            background: var(--bg-primary);
            border: 2px solid var(--border);
            border-radius: 12px;
            font-size: 14px;
            font-weight: 500;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.2s ease;
            font-family: 'Inter', sans-serif;
        }

        .data-btn:hover {
            background: #e5e5e5;
            border-color: #d4d4d4;
        }

        .data-btn:active {
            transform: scale(0.98);
        }

        .data-btn-icon {
            font-size: 18px;
        }

        .data-btn-text {
            font-size: 14px;
        }

        /* Center desktop layout */
        @media (min-width: 769px) {
            .container {
                max-width: 100%;
                margin: 0 auto;
                padding: 0 0 100px;
            }

            /* Desktop header - full width with internal padding */
            .header {
                width: 100%;
                padding: 12px 48px 12px 60px;
                margin-bottom: 32px;
                border-bottom: 0.5px solid rgba(229, 229, 229, 0.6);
                background: var(--bg-card);
            }

            .header-top {
                max-width: 1400px;
                margin: 0 auto;
                align-items: center;
            }

            /* Desktop content area - centered with max-width */
            .subscriptions-section,
            #cancelledView {
                max-width: 1200px;
                margin: 0 auto;
                padding: 0 40px;
            }

            /* Stats view - full width to let stats-desktop-workspace control layout */
            #statsView {
                max-width: 100%;
                margin: 0;
                padding: 0;
            }

            /* Add view - full width to let add-desktop-workspace control layout */
            #addView {
                max-width: 100%;
                margin: 0;
                padding: 0;
            }

            /* Hide old horizontal tabs on desktop (using left rail nav instead) */
            .add-tabs {
                display: none;
            }

            /* Show desktop nav */
            .desktop-nav {
                display: flex;
            }

            /* Show user info/header actions on desktop */
            .user-info,
            .header-actions {
                display: flex;
            }

            /* Hide bottom nav on desktop */
            .bottom-nav {
                display: none;
            }

            /* Stats view on desktop */
            #statsView .charts-section {
                grid-template-columns: repeat(2, 1fr);
            }

            #statsView .chart-container {
                height: 280px;
            }

            .stats-summary-card {
                padding: 20px;
            }

            .stats-summary-value {
                font-size: 32px;
            }
        }

        /* Mobile specific adjustments */
        @media (max-width: 768px) {
            .container {
                padding: 16px 16px 100px;
            }

            .header-top {
                flex-direction: row;
                align-items: center;
                justify-content: space-between;
                flex-wrap: nowrap;
                gap: 8px;
            }

            .brand {
                margin-bottom: 0;
                flex-shrink: 0;
            }

            /* Mobile user info - right-aligned, compact */
            .user-info {
                flex-shrink: 1;
                min-width: 0;
                gap: 8px;
            }

            /* Hide header actions (Settings/Logout icons) on mobile - use bottom nav instead */
            .header-actions {
                display: none !important;
            }

            /* Hide mobile logout button - moved to Settings > Account */
            .mobile-logout-btn {
                display: none;
            }

            .user-email {
                font-size: 11px;
                max-width: 120px;
            }

            .logout-btn-header {
                width: 28px;
                height: 28px;
                flex-shrink: 0;
            }

            .logout-btn-header svg {
                width: 14px;
                height: 14px;
            }

            .stats-summary {
                gap: 8px;
            }

            .stats-summary-card {
                padding: 12px 8px;
            }

            .stats-summary-label {
                font-size: 10px;
            }

            .stats-summary-value {
                font-size: 18px;
            }

            #statsView .chart-card {
                padding: 16px;
            }

            #statsView .chart-container {
                height: 200px;
            }
        }

        /* Hide FAB - now using bottom nav */
        .fab-add {
            display: none !important;
        }

        /* Remove old activation status styles (moved to header) */
        .activation-status {
            display: none !important;
        }

        /* Empty state button */
        .empty-add-btn {
            margin-top: 20px;
            padding: 14px 28px;
            font-size: 15px;
        }

        /* Empty state improvements */
        .empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 200px;
        }

        /* ========================================
           DESKTOP WORKSPACE - Three Region Layout
           ======================================== */

        /* Hide desktop workspace on mobile, show mobile subscriptions */
        .desktop-workspace {
            display: none;
        }

        .mobile-subscriptions {
            display: block;
        }

        .mobile-subscriptions .subscriptions-list {
            padding: 0;
        }

        .mobile-gesture-hint {
            font-size: 10px;
            font-weight: 400;
            font-style: italic;
            color: var(--text-tertiary);
            text-align: center;
            margin: 20px 20px 12px;
            padding: 0;
        }

        @media (min-width: 769px) {
            /* Show desktop workspace, hide mobile subscriptions */
            .desktop-workspace {
                display: flex;
                flex-direction: column;
                align-items: center;
                min-height: calc(100vh - 100px);
                padding: 12px 24px 0;
            }

            .mobile-subscriptions {
                display: none;
            }

            /* ===== DESKTOP GREETING SECTION ===== */
            .desktop-greeting {
                padding: 32px 0 28px;
                width: 100%;
                max-width: 800px;
            }

            .greeting-name {
                font-family: 'Inter', sans-serif;
                font-size: 30px;
                font-weight: 400;
                color: var(--text-primary);
                margin: 0 0 12px;
                letter-spacing: -0.3px;
            }

            .greeting-summary {
                font-family: 'Inter', sans-serif;
                font-size: 16px;
                font-weight: 400;
                color: var(--text-secondary);
                margin: 0;
                line-height: 1.7;
            }

            .greeting-highlight {
                font-weight: 500;
                color: var(--text-primary);
            }

            .greeting-empty-copy {
                font-family: 'Inter', sans-serif;
                font-size: 16px;
                font-style: italic;
                font-weight: 400;
                color: var(--text-secondary);
                margin: 0;
                line-height: 1.7;
                max-width: 680px;
            }

            /* Hide old summary row elements if still in DOM */
            .home-summary-row {
                display: none;
            }

            /* Hide old context rail */
            .context-rail {
                display: none;
            }

            /* ===== MAIN LIST AREA ===== */
            .main-list-area {
                padding: 0 0 40px;
                background: var(--bg-primary);
                width: 100%;
                max-width: 800px;
                position: relative;
                /* No max-height or overflow - let page scroll naturally */
            }

            /* Hide scroll indicator arrow on desktop - page scrolls naturally */
            .scroll-indicator-arrow {
                display: none;
            }

            .main-list-area .subscriptions-section {
                max-width: none;
                padding: 0;
            }

            /* Desktop list: remove gap-based dividers, use border-bottom on rows instead */
            .main-list-area .subscriptions-list {
                gap: 0;
                background: transparent;
                border-radius: 0;
            }

            /* Hide section header on desktop - using table header instead */
            .main-list-area .section-header {
                display: none;
            }

            /* Desktop table header (above action strip) - STICKY */
            .desktop-table-header {
                position: sticky;
                top: 0;
                z-index: 50;
                background: var(--bg-primary);
                margin-bottom: 0;
            }

            .desktop-table-header .desktop-list-header {
                display: flex;
                align-items: center;
                padding: 10px 12px 10px 8px;
                background: var(--bg-primary);
                border-bottom: 1px solid var(--border-subtle);
                font-size: 11px;
                text-transform: none;
                letter-spacing: 0.2px;
                color: var(--text-tertiary);
                font-weight: 400;
                gap: 12px;
                position: relative;
            }

            /* Header select column - aligns with row checkboxes */
            .desktop-table-header .header-select {
                width: 16px;
                flex-shrink: 0;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            /* Header logo spacer - aligns with row logos */
            .desktop-table-header .header-logo-spacer {
                width: 40px;
                flex-shrink: 0;
            }

            .desktop-table-header .header-name {
                width: 35%;
                flex-shrink: 0;
                padding-right: 12px;
                text-align: left;
            }

            .desktop-table-header .header-amount {
                width: 15%;
                flex-shrink: 0;
                padding-right: 12px;
                text-align: right;
            }

            .desktop-table-header .header-payment {
                width: 25%;
                flex-shrink: 0;
                padding-right: 12px;
                text-align: center;
            }

            .desktop-table-header .header-renewal {
                width: 15%;
                flex-shrink: 0;
                text-align: left;
            }

            /* ===== HEADER FILTER BUTTON ===== */
            .header-filter-btn {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 28px;
                height: 28px;
                padding: 0;
                border: none;
                background: transparent;
                border-radius: 6px;
                color: var(--text-tertiary);
                cursor: pointer;
                transition: all 0.15s ease;
                flex-shrink: 0;
                position: relative;
            }

            .header-filter-btn:hover {
                background: rgba(0, 0, 0, 0.04);
                color: var(--text-secondary);
            }

            .header-filter-btn.active {
                color: var(--golden-primary);
            }

            .header-filter-btn svg {
                width: 14px;
                height: 14px;
            }

            /* Filter active indicator dot */
            .header-filter-dot {
                position: absolute;
                top: -2px;
                right: -2px;
                width: 6px;
                height: 6px;
                background: var(--golden-primary);
                border-radius: 50%;
            }

            /* ===== HEADER FILTER DROPDOWN ===== */
            .header-filter-dropdown {
                position: absolute;
                top: 42px;
                left: 8px;
                width: 260px;
                background: var(--bg-card);
                border: 1px solid var(--border);
                border-radius: 10px;
                box-shadow: var(--shadow-lg);
                padding: 16px;
                z-index: 100;
                display: none;
            }

            .header-filter-dropdown.active {
                display: block;
            }

            /* ===== FILTER DROPDOWN SECTIONS ===== */
            .filter-section {
                margin-bottom: 16px;
            }

            .filter-section:last-of-type {
                margin-bottom: 16px;
            }

            .filter-section-label {
                font-size: 11px;
                letter-spacing: 0.5px;
                text-transform: uppercase;
                color: var(--text-tertiary);
                font-weight: 600;
                margin-bottom: 8px;
            }

            .header-filter-dropdown select {
                width: 100%;
                padding: 10px 12px;
                border: 1px solid var(--border);
                border-radius: 8px;
                font-size: 13px;
                background: var(--bg-primary);
                color: var(--text-primary);
                cursor: pointer;
            }

            .header-filter-dropdown select:focus {
                outline: none;
                border-color: var(--golden-primary);
            }

            .filter-clear-btn {
                width: 100%;
                padding: 10px;
                border: 1px solid var(--border);
                background: transparent;
                border-radius: 8px;
                font-size: 13px;
                color: var(--text-secondary);
                cursor: pointer;
                transition: all 0.15s ease;
                font-family: 'Inter', sans-serif;
            }

            .filter-clear-btn:hover {
                background: var(--bg-primary);
                color: var(--text-primary);
            }

            /* ===== DESKTOP TABLE WITH SELECTION ===== */
            /* Selection checkbox column in header - defined in detail section below */

            /* Row selection checkbox - REMOVED, keeping for backwards compat */
            .sub-row-select {
                display: none;
            }

            .sub-row-select input[type="radio"] {
                appearance: none;
                -webkit-appearance: none;
                width: 16px !important;
                height: 16px !important;
                min-width: 16px !important;
                min-height: 16px !important;
                max-width: 16px !important;
                max-height: 16px !important;
                padding: 0 !important;
                margin: 0 !important;
                border: 1.5px solid var(--border);
                border-radius: 3px;
                cursor: pointer;
                transition: all 0.15s ease;
                position: relative;
                background: white;
                box-sizing: border-box !important;
            }

            .sub-row-select input[type="radio"]:hover {
                border-color: var(--text-tertiary);
            }

            .sub-row-select input[type="radio"]:checked {
                border-color: var(--golden-primary);
                background: var(--golden-primary);
            }

            .sub-row-select input[type="radio"]:checked::after {
                content: '';
                position: absolute;
                top: 50%;
                left: 50%;
                width: 4px;
                height: 7px;
                border: solid white;
                border-width: 0 2px 2px 0;
                transform: translate(-50%, -60%) rotate(45deg);
            }

            /* Selected row - margin marker style */
            .sub-row.selected {
                background: rgba(250, 250, 249, 0.4) !important;
                padding-top: 18px !important;
                padding-bottom: 18px !important;
            }

            .sub-row.selected:hover {
                background: rgba(250, 250, 249, 0.5) !important;
            }

            /* Desktop row in workspace context */
            .desktop-workspace .sub-row.desktop-row {
                padding: 16px 12px 16px 4px;
                display: flex;
                align-items: center;
                gap: 12px;
                min-height: auto;
                border-bottom: 1px solid rgba(229, 229, 229, 0.4);
                background: transparent;
            }

            .desktop-workspace .sub-row.desktop-row:last-child {
                border-bottom: none;
            }

            .desktop-workspace .sub-row.desktop-row:hover {
                background: rgba(250, 250, 250, 0.6);
            }

            /* Subtle highlighting for top 3 upcoming renewals */
            .desktop-workspace .sub-row.desktop-row.upcoming-highlight {
                background: transparent;
            }

            .desktop-workspace .sub-row.desktop-row.upcoming-highlight:hover {
                background: rgba(250, 250, 250, 0.6);
            }

            .desktop-workspace .sub-row.desktop-row .sub-logo {
                width: 24px;
                height: 24px;
                flex-shrink: 0;
            }

            /* Desktop table cell styles */
            .desktop-workspace .sub-row .desktop-cell {
                display: flex !important;
                font-size: 13px;
            }

            .desktop-workspace .sub-row .sub-content {
                width: calc(35% - 16px);
                flex-shrink: 0;
                min-width: 0;
                padding-right: 12px;
            }

            .desktop-workspace .sub-row .sub-content .sub-name {
                font-size: 14px;
                font-weight: 500;
                color: var(--text-primary);
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                line-height: 1.4;
            }

            /* Column widths: SERVICE 35% | COST 15% | PAYMENT 25% | RENEWS 15% */
            /* Reading hierarchy: name (primary) → renewal (secondary) → cost (secondary) → payment (tertiary) */
            .desktop-workspace .sub-row .sub-amount {
                width: 15%;
                flex-shrink: 0;
                font-family: 'Inter', sans-serif;
                font-weight: 400;
                font-size: 14px;
                color: rgba(23, 23, 23, 0.75);
                letter-spacing: -0.1px;
                order: 1;
                padding-right: 12px;
                text-align: right;
                justify-content: flex-end;
            }

            .desktop-workspace .sub-row .sub-payment {
                width: 25%;
                flex-shrink: 0;
                color: var(--text-tertiary);
                font-size: 12px;
                font-weight: 400;
                order: 2;
                padding-right: 12px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                text-align: center;
                justify-content: center;
            }

            .desktop-workspace .sub-row .sub-renewal {
                width: 15%;
                flex-shrink: 0;
                order: 3;
                font-size: 13px;
                color: var(--text-secondary);
                text-align: left;
                justify-content: flex-start;
            }

            /* Hide manage/renewed columns in desktop workspace (moved to action strip) */
            .desktop-workspace .sub-row .sub-manage,
            .desktop-workspace .sub-row .sub-renewed,
            .desktop-workspace .desktop-list-header .header-manage,
            .desktop-workspace .desktop-list-header .header-renewed {
                display: none !important;
            }

            /* Desktop header styling - aligned with rows */
            .desktop-workspace .desktop-list-header {
                padding: 12px 12px 14px 4px;
                background: transparent;
                border-bottom: none;
                margin-bottom: 0;
                display: flex;
                align-items: center;
                gap: 12px;
                font-size: 11px;
                font-weight: 400;
                text-transform: none;
                letter-spacing: 0.2px;
                color: var(--text-tertiary);
                opacity: 0.7;
            }

            /* Header select column - matches row checkbox column */
            .desktop-workspace .desktop-list-header .header-select {
                width: 16px;
                flex-shrink: 0;
                display: flex;
                align-items: center;
                justify-content: center;
            }

            /* Header logo spacer - matches row logo */
            .desktop-workspace .desktop-list-header .header-logo-spacer {
                width: 24px;
                flex-shrink: 0;
            }

            /* Header name with inline filter button */
            .desktop-workspace .desktop-list-header .header-name {
                width: 35%;
                flex-shrink: 0;
                padding-right: 12px;
                text-align: left;
                display: flex;
                align-items: center;
                gap: 8px;
            }

            /* Filter button inline with header name */
            .desktop-workspace .desktop-list-header .header-filter-btn {
                width: 20px;
                height: 20px;
                padding: 0;
                margin: 0;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                flex-shrink: 0;
            }

            .desktop-workspace .desktop-list-header .header-filter-btn svg {
                width: 11px;
                height: 11px;
            }

            /* Column order in header: SERVICE | COST | PAYMENT | RENEWS IN */
            .desktop-workspace .desktop-list-header .header-amount {
                width: 15%;
                flex-shrink: 0;
                order: 1;
                padding-right: 12px;
                text-align: right;
            }

            .desktop-workspace .desktop-list-header .header-payment {
                width: 25%;
                flex-shrink: 0;
                order: 2;
                padding-right: 12px;
                text-align: center;
            }

            .desktop-workspace .desktop-list-header .header-renewal {
                width: 15%;
                flex-shrink: 0;
                order: 3;
                text-align: left;
            }

            /* ===== ADD PAGE DESKTOP LAYOUT ===== */

            /* Hide mobile-only Add elements on desktop */
            .add-mobile-only {
                display: none !important;
            }

            /* Desktop Add workspace - 2 column centered layout (matches Settings) */
            .add-desktop-workspace {
                display: grid;
                grid-template-columns: 180px 600px;
                gap: 0;
                max-width: 780px;
                margin: 0 auto;
                padding: 0;
                min-height: calc(100vh - 180px);
            }

            /* Add Left Context Rail - matches Settings */
            .add-context-rail {
                padding: 32px 24px 40px 0;
                background: transparent;
                position: sticky;
                top: 0;
                height: fit-content;
            }

            /* Add Navigation - vertical list */
            .add-nav {
                display: flex;
                flex-direction: column;
                gap: 8px;
            }

            .add-nav-item {
                display: block;
                padding: 10px 0;
                background: transparent;
                border: none;
                text-align: left;
                font-family: 'Inter', sans-serif;
                font-size: 14px;
                font-weight: 400;
                color: var(--text-tertiary);
                cursor: pointer;
                transition: color 0.15s ease;
                position: relative;
            }

            .add-nav-item:hover {
                color: var(--text-secondary);
            }

            .add-nav-item.active {
                color: var(--text-primary);
                font-weight: 500;
            }

            .add-nav-item.active::before {
                content: '';
                position: absolute;
                left: -16px;
                top: 50%;
                transform: translateY(-50%);
                width: 3px;
                height: 16px;
                background: rgba(202, 138, 4, 0.7);
                border-radius: 2px;
            }

            /* Add Main Area (Form container) */
            .add-main-area {
                padding: 32px 0 60px 24px;
                overflow-y: auto;
                background: var(--bg-primary);
                display: block;
            }

            .add-form-container {
                max-width: 100%;
                max-height: none;
                overflow: visible;
                border: none;
                border-radius: 0;
                box-shadow: none;
                background: transparent;
            }

            /* Add Preview Panel - hidden in centered layout */
            .add-preview-panel {
                display: none;
            }

            .add-preview-card {
                display: none;
            }

            /* Preview Empty State */
            .add-preview-empty {
                padding: 40px 20px;
                display: flex;
                align-items: center;
                justify-content: center;
                text-align: center;
                min-height: 200px;
            }

            .add-preview-empty-text {
                font-family: 'Inter', sans-serif;
                font-size: 12px;
                font-weight: 400;
                color: var(--text-tertiary);
                line-height: 1.5;
            }

            /* Preview Content */
            .add-preview-content {
                padding: 16px;
                display: flex;
                flex-direction: column;
                gap: 14px;
            }

            .add-preview-header {
                display: flex;
                align-items: center;
                gap: 10px;
            }

            .add-preview-logo {
                width: 32px;
                height: 32px;
                border-radius: 6px;
                background: var(--bg-secondary);
                display: flex;
                align-items: center;
                justify-content: center;
                color: var(--text-tertiary);
                flex-shrink: 0;
                overflow: hidden;
            }

            .add-preview-logo svg {
                width: 18px;
                height: 18px;
            }

            .add-preview-logo img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }

            .add-preview-name {
                font-family: 'Inter', sans-serif;
                font-size: 14px;
                font-weight: 500;
                color: var(--text-primary);
                flex: 1;
                min-width: 0;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .add-preview-name.placeholder {
                color: var(--text-tertiary);
            }

            /* Type badge */
            .add-preview-badges {
                display: flex;
                gap: 6px;
            }

            .add-preview-type-badge {
                font-family: 'Inter', sans-serif;
                font-size: 10px;
                font-weight: 500;
                text-transform: uppercase;
                letter-spacing: 0.3px;
                padding: 3px 8px;
                border-radius: 4px;
                background: rgba(202, 138, 4, 0.1);
                color: var(--golden-primary);
            }

            .add-preview-type-badge.trial {
                background: rgba(59, 130, 246, 0.1);
                color: #3b82f6;
            }

            /* Detail rows */
            .add-preview-rows {
                display: flex;
                flex-direction: column;
                gap: 0;
                border-top: 1px solid var(--border);
                padding-top: 12px;
            }

            .add-preview-row {
                display: flex;
                justify-content: space-between;
                align-items: flex-start;
                padding: 6px 0;
            }

            .add-preview-row.highlight {
                padding-bottom: 10px;
                margin-bottom: 4px;
                border-bottom: 1px solid var(--border);
            }

            .add-preview-label {
                font-family: 'Inter', sans-serif;
                font-size: 11px;
                color: var(--text-tertiary);
                flex-shrink: 0;
            }

            .add-preview-value {
                font-family: 'Inter', sans-serif;
                font-size: 11px;
                color: var(--text-primary);
                text-align: right;
                word-break: break-word;
            }

            .add-preview-row.highlight .add-preview-value {
                font-size: 14px;
                font-weight: 600;
            }

            .add-preview-value .cycle {
                font-weight: 400;
                color: var(--text-tertiary);
                font-size: 11px;
            }

            /* Hide preview on narrower screens */
            @media (max-width: 1100px) {
                .add-preview-panel {
                    display: none;
                }

                .add-form-container {
                    max-width: 100%;
                    max-height: none;
                    overflow: visible;
                }
            }

            /* Add Right Panel - no longer used */
            .add-right-panel {
                display: none;
            }

            /* Suggestion Box - below form */
            .add-suggestion-box {
                margin-top: 48px;
                padding-top: 32px;
                border-top: 1px solid var(--border-subtle);
            }

            .add-suggestion-label {
                font-size: 13px;
                font-weight: 500;
                letter-spacing: 0.1px;
                color: var(--text-secondary);
                margin-bottom: 6px;
            }

            /* Suggestion helper text */
            .add-suggestion-helper {
                font-size: 12px;
                color: var(--text-tertiary);
                line-height: 1.4;
                margin-bottom: 16px;
            }

            /* Suggestion form - horizontal layout */
            .add-suggestion-form {
                display: flex;
                flex-direction: row;
                gap: 10px;
                align-items: center;
            }

            .add-suggestion-input,
            #suggestServiceName {
                flex: 1;
                padding: 14px 12px;
                min-height: 48px;
                height: 48px;
                font-size: 13px;
                font-family: 'Inter', sans-serif;
                border: 1px solid var(--border);
                border-radius: 6px;
                background: transparent;
                color: var(--text-primary);
                transition: border-color 0.15s ease;
                box-sizing: border-box;
            }

            .add-suggestion-input::placeholder {
                color: var(--text-tertiary);
                font-size: 13px;
            }

            .add-suggestion-select,
            #suggestServiceCategory {
                width: 140px;
                padding: 14px 12px;
                min-height: 48px;
                height: 48px;
                font-size: 13px;
                font-family: 'Inter', sans-serif;
                border: 1px solid var(--border);
                border-radius: 6px;
                background: transparent;
                color: var(--text-primary);
                transition: border-color 0.15s ease;
                box-sizing: border-box;
            }

            .add-suggestion-input:focus,
            .add-suggestion-select:focus {
                outline: none;
                border-color: var(--text-tertiary);
            }

            .add-suggestion-submit {
                padding: 14px 16px;
                min-height: 48px;
                height: 48px;
                font-size: 13px;
                font-family: 'Inter', sans-serif;
                font-weight: 600;
                border: none;
                border-radius: 12px;
                background: #ca8a04;
                color: white;
                cursor: pointer;
                transition: all 0.15s ease;
                white-space: nowrap;
                box-sizing: border-box;
            }

            .add-suggestion-submit:hover {
                background: #b07d04;
            }

            /* Catalog Suggestion Form (Desktop) */
            #catalogBrowseView .catalog-suggestion-section {
                margin-top: 24px;
                padding: 0 24px 24px;
                text-align: center;
            }

            #catalogBrowseView .catalog-suggestion-section .add-suggestion-toggle {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                gap: 6px;
                padding: 8px 16px;
                cursor: pointer;
            }

            #catalogBrowseView .catalog-suggestion-section .add-suggestion-toggle:hover .add-suggestion-toggle-text {
                color: var(--text-primary);
            }

            .add-suggestion-form-catalog {
                display: flex;
                flex-direction: row;
                gap: 10px;
                align-items: center;
            }

            .add-suggestion-form-catalog .add-suggestion-input {
                flex: 1;
                padding: 14px 12px;
                min-height: 48px;
                height: 48px;
                font-size: 13px;
                font-family: 'Inter', sans-serif;
                border: 1px solid var(--border);
                border-radius: 6px;
                background: transparent;
                color: var(--text-primary);
                box-sizing: border-box;
            }

            .add-suggestion-form-catalog .add-suggestion-select {
                width: 140px;
                padding: 14px 12px;
                min-height: 48px;
                height: 48px;
                font-size: 13px;
                font-family: 'Inter', sans-serif;
                border: 1px solid var(--border);
                border-radius: 6px;
                background: transparent;
                color: var(--text-primary);
                box-sizing: border-box;
            }

            .add-suggestion-form-catalog .add-suggestion-submit {
                padding: 14px 16px;
                min-height: 48px;
                height: 48px;
                font-size: 13px;
                font-family: 'Inter', sans-serif;
                font-weight: 600;
                border: none;
                border-radius: 12px;
                background: #ca8a04;
                color: white;
                cursor: pointer;
                transition: all 0.15s ease;
                white-space: nowrap;
                box-sizing: border-box;
            }

            .add-suggestion-form-catalog .add-suggestion-submit:hover {
                background: #b07d04;
            }

            /* Prebuilt Billing Link (Desktop) */
            .prebuilt-manage-link {
                display: inline-flex;
                align-items: center;
                gap: 6px;
                padding: 10px 14px;
                font-size: 13px;
                font-weight: 400;
                color: var(--accent);
                background: transparent;
                border: 1px solid var(--border);
                border-radius: 6px;
                text-decoration: none;
                transition: all 0.15s ease;
            }

            .prebuilt-manage-link:hover {
                border-color: var(--accent);
                background: rgba(59, 130, 246, 0.05);
            }

            .prebuilt-manage-link svg {
                width: 14px;
                height: 14px;
                flex-shrink: 0;
            }

            /* Collapsible Missing Service Section (Desktop) */
            .add-suggestion-section {
                margin-top: 48px;
            }

            .add-suggestion-divider {
                height: 1px;
                background: var(--border-subtle);
                margin-bottom: 20px;
            }

            .add-suggestion-toggle {
                display: inline-flex;
                align-items: center;
                gap: 6px;
                padding: 8px 0;
                cursor: pointer;
            }

            .add-suggestion-toggle:hover .add-suggestion-toggle-text {
                color: var(--text-primary);
            }

            .add-suggestion-toggle-text {
                font-size: 13px;
                font-weight: 500;
                color: var(--text-secondary);
                transition: color 0.15s ease;
            }

            .add-suggestion-chevron {
                width: 16px;
                height: 16px;
                color: var(--text-tertiary);
                transition: transform 0.2s ease;
            }

            .add-suggestion-section.expanded .add-suggestion-chevron {
                transform: rotate(180deg);
            }

            .add-suggestion-content {
                display: none;
                padding-top: 12px;
            }

            .add-suggestion-section.expanded .add-suggestion-content {
                display: block;
            }

            .add-suggestion-content .add-suggestion-helper {
                font-size: 12px;
                color: var(--text-tertiary);
                line-height: 1.4;
                margin-bottom: 16px;
            }

            /* Required field asterisk */
            .add-field-required {
                color: rgba(202, 138, 4, 0.8);
                font-weight: 400;
            }

            /* Type checkboxes (radio style) */
            .add-type-checkboxes {
                display: flex;
                gap: 24px;
            }

            .add-type-checkbox {
                display: flex;
                align-items: center;
                gap: 8px;
                cursor: pointer;
            }

            .add-type-checkbox input[type="radio"] {
                width: 14px;
                height: 14px;
                min-width: 14px;
                min-height: 14px;
                max-width: 14px;
                max-height: 14px;
                margin: 0;
                padding: 0;
                accent-color: var(--golden-primary);
                cursor: pointer;
                -webkit-appearance: none;
                -moz-appearance: none;
                appearance: none;
                border: 1.5px solid var(--border);
                border-radius: 50%;
                background: white;
                position: relative;
                flex-shrink: 0;
                box-sizing: border-box;
            }

            .add-type-checkbox input[type="radio"]:checked {
                border-color: var(--golden-primary);
            }

            .add-type-checkbox input[type="radio"]:checked::after {
                content: '';
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                width: 6px;
                height: 6px;
                background: var(--golden-primary);
                border-radius: 50%;
            }

            .add-type-checkbox-label {
                font-size: 13px;
                color: var(--text-tertiary);
                font-family: 'Inter', sans-serif;
                font-weight: 400;
            }

            .add-type-checkbox input[type="radio"]:checked + .add-type-checkbox-label {
                color: var(--text-secondary);
            }


            /* Tab Navigation */
            .add-tabs {
                display: flex;
                gap: 32px;
                margin-bottom: 40px;
                border-bottom: 1px solid var(--border);
                padding-bottom: 0;
            }

            .add-tab {
                background: none;
                border: none;
                padding: 12px 0;
                font-size: 14px;
                font-weight: 500;
                color: var(--text-tertiary);
                cursor: pointer;
                position: relative;
                font-family: 'Inter', sans-serif;
                transition: color 0.2s ease;
            }

            .add-tab:hover {
                color: var(--text-secondary);
            }

            .add-tab.active {
                color: var(--golden-primary);
                font-weight: 600;
            }

            .add-tab.active::after {
                content: '';
                position: absolute;
                bottom: -1px;
                left: 0;
                right: 0;
                height: 2px;
                background: var(--golden-primary);
            }

            /* Tab Content */
            .add-tab-content {
                display: none;
            }

            .add-tab-content.active {
                display: block;
            }

            /* Form Section */
            .add-form-section {
                display: flex;
                flex-direction: column;
                gap: 24px;
            }

            .add-field-row {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 20px;
                align-items: start;
            }

            /* Single field in a row - take half width for alignment */
            .add-field-row-single {
                grid-template-columns: 1fr 1fr;
            }

            .add-field-row-single .add-field-group {
                grid-column: 1;
            }

            /* Full width field spanning both columns */
            .add-field-row-fullwidth {
                display: block;
            }

            .add-field-row-fullwidth .add-field-group {
                width: 100%;
            }

            .add-field-group {
                display: flex;
                flex-direction: column;
                gap: 8px;
            }

            .add-field-label {
                font-size: 12px;
                font-weight: 600;
                color: var(--text-secondary);
                letter-spacing: 0.3px;
            }

            .add-field-optional {
                font-weight: 400;
                color: var(--text-tertiary);
            }

            .add-field-input,
            .add-field-select,
            .add-field-textarea {
                width: 100%;
                padding: 12px 14px;
                border: 1px solid var(--border);
                border-radius: 8px;
                font-size: 14px;
                font-family: 'Inter', sans-serif;
                color: var(--text-primary);
                background: white;
                transition: border-color 0.15s ease;
                box-sizing: border-box;
            }

            .add-field-input:focus,
            .add-field-select:focus,
            .add-field-textarea:focus {
                outline: none;
                border-color: var(--golden-primary);
            }

            .add-field-input::placeholder,
            .add-field-textarea::placeholder {
                color: var(--text-tertiary);
                font-size: 13px;
                opacity: 0.6;
            }

            .add-field-textarea {
                resize: vertical;
                min-height: 80px;
            }

            .add-field-hint {
                font-size: 11px;
                color: var(--text-tertiary);
                margin-top: 6px;
                opacity: 0.7;
            }

            /* Dropdown option styling */
            .add-field-select option {
                font-family: 'Inter', sans-serif;
                font-size: 14px;
                padding: 8px 12px;
            }

            /* Match select height to text inputs - use IDs for specificity */
            #categoryDesktop,
            #paymentMethodDesktop {
                padding: 14px 14px;
                min-height: 48px;
                height: 48px;
            }

            /* Date input styling */
            .add-field-input[type="date"] {
                font-family: 'Inter', sans-serif;
                font-size: 14px;
            }

            .add-field-input[type="date"]::-webkit-datetime-edit {
                font-family: 'Inter', sans-serif;
                font-size: 14px;
            }

            .add-field-input[type="date"]::-webkit-datetime-edit-fields-wrapper {
                font-family: 'Inter', sans-serif;
            }

            /* Input Wrapper with Button */
            .add-field-input-wrapper {
                position: relative;
            }

            .add-field-input-wrapper .add-field-input {
                width: 100%;
                padding-right: 44px;
            }

            .add-browse-btn {
                position: absolute;
                right: 8px;
                top: 50%;
                transform: translateY(-50%);
                width: 32px;
                height: 32px;
                border: 1px solid rgba(202, 138, 4, 0.4);
                background: transparent;
                border-radius: 6px;
                cursor: pointer;
                display: flex;
                align-items: center;
                transition: border-color 0.15s ease, background 0.15s ease;
                justify-content: center;
                transition: background 0.15s ease;
            }

            .add-browse-btn:hover {
                background: rgba(202, 138, 4, 0.08);
                border-color: rgba(202, 138, 4, 0.6);
            }

            .add-browse-btn svg {
                width: 16px;
                height: 16px;
                color: rgba(202, 138, 4, 0.7);
            }

            .add-browse-btn:hover svg {
                color: var(--golden-primary);
            }

            /* Type Toggle */
            .add-type-toggle {
                display: flex;
                gap: 0;
                border: 1px solid var(--border);
                border-radius: 8px;
                overflow: hidden;
            }

            .add-type-btn {
                flex: 1;
                padding: 12px 20px;
                border: none;
                background: white;
                font-size: 14px;
                font-family: 'Inter', sans-serif;
                color: var(--text-secondary);
                cursor: pointer;
                transition: all 0.15s ease;
            }

            .add-type-btn:not(:last-child) {
                border-right: 1px solid var(--border);
            }

            .add-type-btn.active {
                background: var(--golden-primary);
                color: white;
            }

            .add-type-btn:hover:not(.active) {
                background: #f9f9f9;
            }

            /* Amount Input with Currency */
            .add-amount-input {
                display: flex;
                gap: 0;
                border: 1px solid var(--border);
                border-radius: 8px;
                overflow: hidden;
            }

            .add-currency-select {
                width: 80px;
                padding: 12px 8px;
                border: none;
                border-right: 1px solid var(--border);
                background: #f9f9f9;
                font-size: 14px;
                font-family: 'Inter', sans-serif;
                color: var(--text-primary);
                cursor: pointer;
            }

            .add-currency-select:focus {
                outline: none;
            }

            .add-amount-input .add-field-input {
                flex: 1;
                border: none;
                border-radius: 0;
            }

            .add-amount-input .add-field-input:focus {
                border: none;
            }

            /* Trial Fields */
            .add-trial-fields {
                margin-top: 24px;
                padding-top: 24px;
                border-top: 1px dashed var(--border);
            }

            .add-trial-note {
                font-size: 13px;
                color: var(--tag-gold);
                margin-bottom: 20px;
                font-weight: 500;
            }

            /* Form Actions */
            .add-form-actions {
                margin-top: 40px;
                padding-top: 28px;
                border-top: 1px solid var(--border);
            }

            .add-submit-btn {
                padding: 14px 32px;
                background: rgba(202, 138, 4, 0.35);
                color: white;
                border: none;
                border-radius: 8px;
                font-size: 14px;
                font-weight: 500;
                font-family: 'Inter', sans-serif;
                letter-spacing: 0.3px;
                cursor: pointer;
                transition: all 0.2s ease;
                opacity: 0.7;
            }

            .add-submit-btn:hover {
                opacity: 0.85;
            }

            .add-submit-btn.btn-ready {
                background: rgba(202, 138, 4, 0.85);
                opacity: 1;
            }

            .add-submit-btn.btn-ready:hover {
                background: var(--golden-primary);
            }

            /* Status Actions (Edit mode) */
            .add-status-actions {
                margin-top: 32px;
                padding-top: 24px;
                border-top: 1px solid var(--border);
                display: flex;
                gap: 16px;
            }

            .add-status-btn {
                padding: 10px 20px;
                border: 1px solid var(--border);
                border-radius: 6px;
                font-size: 13px;
                font-family: 'Inter', sans-serif;
                cursor: pointer;
                background: white;
                transition: all 0.15s ease;
            }

            .add-status-pause {
                color: #b45309;
                border-color: #fcd34d;
            }

            .add-status-pause:hover {
                background: var(--golden-lightest);
            }

            .add-status-resume {
                color: #047857;
                border-color: #6ee7b7;
            }

            .add-status-resume:hover {
                background: #d1fae5;
            }

            .add-status-restore {
                color: #1d4ed8;
                border-color: #93c5fd;
            }

            .add-status-restore:hover {
                background: #dbeafe;
            }

            .add-status-cancel {
                color: #dc2626;
                border-color: #fca5a5;
            }

            .add-status-cancel:hover {
                background: #fee2e2;
            }

            /* Autocomplete Dropdown */
            .add-field-input-wrapper .autocomplete-dropdown {
                position: absolute;
                top: 100%;
                left: 0;
                right: 0;
                background: white;
                border: 1px solid var(--border);
                border-radius: 8px;
                margin-top: 4px;
                max-height: 200px;
                overflow-y: auto;
                z-index: 100;
                box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            }

            /* ===== STATS PAGE DESKTOP LAYOUT ===== */

            /* Hide mobile-only stats elements on desktop */
            .stats-mobile-only {
                display: none !important;
            }

            /* Desktop stats workspace - centered layout matching Settings page */
            .stats-desktop-workspace {
                display: grid;
                grid-template-columns: 180px 600px;
                gap: 0;
                max-width: 780px;
                margin: 0 auto;
                padding: 0;
                min-height: calc(100vh - 180px);
            }

            /* Stats Context Rail (Left) - matches Settings page nav-rail */
            .stats-context-rail {
                padding: 32px 24px 40px 0;
                background: transparent;
                position: sticky;
                top: 0;
                height: fit-content;
            }

            .stats-rail-section {
                margin-bottom: 44px;
            }

            .stats-rail-section:last-child {
                margin-bottom: 0;
            }

            .stats-rail-label {
                font-size: 11px;
                letter-spacing: 0.3px;
                text-transform: none;
                color: var(--text-tertiary);
                font-weight: 400;
                margin-bottom: 10px;
                opacity: 0.7;
            }

            .stats-rail-value {
                font-family: 'Inter', sans-serif;
                font-size: 20px;
                font-weight: 500;
                color: var(--text-primary);
                letter-spacing: -0.2px;
                line-height: 1.4;
                padding-top: 2px;
            }

            /* Multi-currency values on separate lines */
            .stats-rail-value .stats-currency-line {
                display: block;
                margin-bottom: 4px;
            }

            .stats-rail-value .stats-currency-line:last-child {
                margin-bottom: 0;
            }

            .stats-rail-count {
                font-size: 20px;
                color: var(--text-primary);
            }

            /* Stats Main Area (Right) - matches Settings page main-area */
            .stats-main-area {
                padding: 32px 0 60px 24px;
                overflow-y: auto;
                background: var(--bg-primary);
            }

            /* Charts - stacked vertically */
            .stats-charts-row {
                display: flex;
                flex-direction: column;
                gap: 40px;
            }

            .stats-chart-block {
                width: 100%;
            }

            /* Payment chart - same styling as category chart */
            .stats-chart-narrow .stats-bar-row {
                grid-template-columns: 110px 1fr 65px;
            }

            .stats-chart-header {
                font-size: 14px;
                letter-spacing: 0.4px;
                text-transform: uppercase;
                color: #ca8a04;
                font-weight: 400;
                margin-bottom: 24px;
            }

            /* Horizontal Bar Chart */
            .stats-bar-chart {
                display: flex;
                flex-direction: column;
                gap: 14px;
            }

            .stats-bar-row {
                display: grid;
                grid-template-columns: 110px 1fr auto;
                gap: 12px;
                align-items: center;
            }

            .stats-bar-label {
                font-size: 13px;
                color: var(--text-secondary);
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .stats-bar-track {
                height: 14px;
                background: #f0f0f0;
                border-radius: 3px;
                overflow: hidden;
                position: relative;
                min-width: 60px;
            }

            .stats-bar-fill {
                height: 100%;
                background: #f5e8b8;
                border-radius: 3px;
                transition: all 0.2s ease;
                position: relative;
            }

            .stats-bar-row:nth-child(1) .stats-bar-fill {
                background: #ca8a04;
            }

            .stats-bar-row:nth-child(2) .stats-bar-fill {
                background: #d4a938;
            }

            .stats-bar-row:nth-child(3) .stats-bar-fill {
                background: #e0c97a;
            }

            .stats-bar-row:nth-child(4) .stats-bar-fill {
                background: #e8cc6e;
            }

            .stats-bar-row:nth-child(5) .stats-bar-fill {
                background: #f0dda0;
            }

            .stats-bar-row:hover .stats-bar-fill {
                background: var(--golden-primary);
            }

            .stats-bar-percent {
                font-size: 13px;
                color: var(--text-tertiary);
                text-align: right;
                white-space: nowrap;
                transition: color 0.15s ease;
            }

            /* On hover, show amount in golden */
            .stats-bar-row:hover .stats-bar-percent {
                color: var(--golden-primary);
                font-weight: 500;
            }

            .stats-chart-empty {
                color: var(--text-tertiary);
                font-size: 13px;
                padding: 20px 0;
            }

            /* Cancelled Section */
            .stats-cancelled-section {
                border-top: 1px solid var(--border);
                padding-top: 24px;
                margin-bottom: 24px;
            }

            .stats-cancelled-toggle {
                display: flex;
                align-items: center;
                gap: 8px;
                background: none;
                border: none;
                padding: 8px 0;
                cursor: pointer;
                width: 100%;
                text-align: left;
                font-family: 'Inter', sans-serif;
            }

            .stats-cancelled-text {
                font-size: 13px;
                color: var(--text-secondary);
            }

            .stats-cancelled-count {
                font-size: 12px;
                color: var(--text-tertiary);
                background: #f5f5f5;
                padding: 2px 8px;
                border-radius: 10px;
            }

            .stats-cancelled-chevron {
                width: 16px;
                height: 16px;
                color: var(--text-tertiary);
                margin-left: auto;
                transition: transform 0.2s ease;
            }

            .stats-cancelled-section.expanded .stats-cancelled-chevron {
                transform: rotate(180deg);
            }

            .stats-cancelled-list {
                max-height: 0;
                overflow: hidden;
                transition: max-height 0.3s ease;
            }

            .stats-cancelled-section.expanded .stats-cancelled-list {
                max-height: 400px;
                overflow-y: auto;
            }

            .stats-cancelled-item {
                display: flex;
                align-items: center;
                gap: 12px;
                padding: 10px 0;
                border-bottom: 1px solid #f5f5f5;
                cursor: pointer;
                opacity: 0.6;
                transition: opacity 0.15s ease;
            }

            .stats-cancelled-item:hover {
                opacity: 1;
            }

            .stats-cancelled-item:last-child {
                border-bottom: none;
            }

            .stats-cancelled-logo {
                width: 20px;
                height: 20px;
                border-radius: 4px;
                object-fit: cover;
            }

            .stats-cancelled-name {
                font-size: 13px;
                color: var(--text-secondary);
                flex: 1;
            }

            .stats-cancelled-amount {
                font-size: 12px;
                color: var(--text-tertiary);
            }

            .stats-cancelled-empty {
                padding: 16px 0;
                font-size: 13px;
                color: var(--text-tertiary);
            }

            /* Export Section */
            .stats-export-section {
                display: flex;
                align-items: center;
                gap: 12px;
                padding-top: 8px;
            }

            .stats-export-link {
                background: none;
                border: none;
                padding: 0;
                font-size: 13px;
                color: var(--text-tertiary);
                cursor: pointer;
                font-family: 'Inter', sans-serif;
                transition: color 0.15s ease;
            }

            .stats-export-link:hover {
                color: var(--text-secondary);
            }

            .stats-export-divider {
                color: var(--border);
                font-size: 13px;
            }

            /* ===== INLINE DETAIL CARD (Desktop Row Expansion) ===== */

            /* Expanded row wrapper */
            .sub-row-wrapper.expanded {
                z-index: 10;
            }

            .sub-row-wrapper.expanded .sub-row {
                border-bottom: none;
                background: rgba(250, 250, 250, 0.8);
            }

            /* Inline detail card container */
            .inline-detail-card {
                max-height: 0;
                overflow: hidden;
                opacity: 0;
                background: linear-gradient(to bottom, rgba(250, 250, 250, 0.95), rgba(255, 255, 255, 0.98));
                border: 1px solid var(--border-subtle);
                border-top: none;
                border-radius: 0 0 10px 10px;
                margin: 0 8px 8px 8px;
                box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
                transition: max-height 0.3s ease-out, opacity 0.25s ease-out;
            }

            .inline-detail-card.expanded {
                max-height: 800px;
                opacity: 1;
            }

            /* Detail content wrapper */
            .inline-detail-content {
                padding: 20px 24px 24px;
            }

            /* Header section */
            .inline-detail-header {
                margin-bottom: 16px;
                padding-bottom: 12px;
                border-bottom: 1px solid var(--border-subtle);
            }

            .inline-detail-title-row {
                display: flex;
                align-items: center;
                gap: 10px;
                flex-wrap: wrap;
            }

            .inline-detail-name {
                font-family: 'Inter', sans-serif;
                font-size: 18px;
                font-weight: 600;
                color: var(--text-primary);
                margin: 0;
                letter-spacing: -0.2px;
            }

            .inline-type-badge {
                font-size: 10px;
                font-weight: 600;
                text-transform: uppercase;
                letter-spacing: 0.5px;
                padding: 3px 8px;
                border-radius: 4px;
                background: #f3f4f6;
                color: var(--text-secondary);
            }

            .inline-type-badge.trial {
                background: #dbeafe;
                color: #1e40af;
            }

            .inline-type-badge.bill {
                background: var(--golden-lightest);
                color: #92400e;
            }

            .inline-status-badge {
                font-size: 10px;
                font-weight: 600;
                text-transform: uppercase;
                letter-spacing: 0.5px;
                padding: 3px 8px;
                border-radius: 4px;
            }

            .inline-status-badge.paused {
                background: var(--golden-lightest);
                color: #92400e;
            }

            .inline-status-badge.cancelled {
                background: #fee2e2;
                color: #991b1b;
            }

            /* Detail grid layout */
            .inline-detail-grid {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: 16px 24px;
                margin-bottom: 16px;
            }

            .inline-detail-item {
                display: flex;
                flex-direction: column;
                gap: 4px;
            }

            .inline-detail-label {
                font-size: 10px;
                font-weight: 500;
                text-transform: uppercase;
                letter-spacing: 0.5px;
                color: var(--text-tertiary);
            }

            .inline-detail-value {
                font-size: 14px;
                color: var(--text-primary);
                font-weight: 500;
            }

            .inline-cycle {
                font-size: 12px;
                font-weight: 400;
                color: var(--text-secondary);
            }

            .inline-days {
                font-size: 12px;
                color: var(--text-tertiary);
            }

            /* Notes section */
            .inline-detail-notes {
                margin-bottom: 16px;
                padding: 12px;
                background: rgba(0, 0, 0, 0.02);
                border-radius: 6px;
            }

            .inline-detail-notes .inline-detail-label {
                margin-bottom: 6px;
            }

            .inline-detail-notes-text {
                font-size: 13px;
                color: var(--text-secondary);
                margin: 0;
                line-height: 1.5;
            }

            /* Action buttons */
            .inline-detail-actions {
                display: flex;
                gap: 8px;
                padding-top: 16px;
                border-top: 1px solid var(--border-subtle);
            }

            .inline-action-btn {
                display: inline-flex;
                align-items: center;
                gap: 6px;
                padding: 8px 14px;
                border: 1px solid var(--border);
                background: var(--bg-card);
                border-radius: 6px;
                font-size: 12px;
                font-weight: 500;
                color: var(--text-secondary);
                cursor: pointer;
                transition: all 0.15s ease;
                font-family: 'Inter', sans-serif;
                text-decoration: none;
            }

            .inline-action-btn:hover {
                background: var(--bg-primary);
                border-color: var(--text-tertiary);
                color: var(--text-primary);
            }

            .inline-action-btn svg {
                width: 14px;
                height: 14px;
            }

            .inline-action-btn.inline-action-renewed {
                border-color: var(--success);
                color: var(--success);
            }

            .inline-action-btn.inline-action-renewed:hover {
                background: rgba(22, 163, 74, 0.08);
            }

            .inline-action-btn.inline-action-save {
                background: var(--golden-primary);
                border-color: var(--golden-primary);
                color: white;
            }

            .inline-action-btn.inline-action-save:hover {
                background: #b47d04;
                border-color: #b47d04;
            }

            .inline-action-btn.inline-action-delete {
                border-color: var(--danger);
                color: var(--danger);
            }

            .inline-action-btn.inline-action-delete:hover {
                background: rgba(220, 38, 38, 0.08);
            }

            /* ===== INLINE EDIT FORM ===== */
            .inline-edit-mode .inline-detail-header {
                margin-bottom: 20px;
            }

            .inline-edit-form {
                display: flex;
                flex-direction: column;
            }

            .inline-edit-grid {
                display: grid;
                grid-template-columns: repeat(3, 1fr);
                gap: 16px 20px;
                margin-bottom: 20px;
            }

            .inline-form-group {
                display: flex;
                flex-direction: column;
                gap: 6px;
            }

            .inline-form-group.inline-form-full {
                grid-column: span 3;
            }

            .inline-form-group label {
                font-size: 10px;
                font-weight: 500;
                text-transform: uppercase;
                letter-spacing: 0.5px;
                color: var(--text-tertiary);
            }

            .inline-form-group input,
            .inline-form-group select,
            .inline-form-group textarea {
                padding: 10px 12px;
                font-size: 13px;
                border: 1px solid var(--border);
                border-radius: 6px;
                background: var(--bg-card);
                color: var(--text-primary);
                font-family: 'Inter', sans-serif;
                transition: border-color 0.15s ease;
            }

            .inline-form-group input:focus,
            .inline-form-group select:focus,
            .inline-form-group textarea:focus {
                outline: none;
                border-color: var(--golden-primary);
            }

            .inline-form-group textarea {
                resize: vertical;
                min-height: 60px;
            }

            .inline-currency-cost {
                display: grid;
                grid-template-columns: 80px 1fr;
                gap: 8px;
            }

            .inline-edit-actions {
                display: flex;
                gap: 8px;
                padding-top: 16px;
                border-top: 1px solid var(--border-subtle);
            }
        }

        /* Click outside to close filter dropdown */
        .filter-backdrop {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 99;
            display: none;
        }

        .filter-backdrop.active {
            display: block;
        }

/* ===== MOBILE SUBSCRIPTION BOTTOM SHEET ===== */
.subscription-bottom-sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.subscription-bottom-sheet.show {
    display: flex;
}

.subscription-bottom-sheet-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(46, 29, 52, 0.35);
    animation: fadeIn 0.2s ease;
}

.subscription-bottom-sheet-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUpSheet 0.3s ease;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
}

@keyframes slideUpSheet {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.subscription-bottom-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
}

.subscription-bottom-sheet-title {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.subscription-bottom-sheet-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.15s ease;
}

.subscription-bottom-sheet-close:hover {
    background: var(--border-subtle);
    color: var(--text-primary);
}

.subscription-bottom-sheet-body {
    padding: 20px;
}

.subscription-bottom-sheet-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.subscription-bottom-sheet-row:last-child {
    border-bottom: none;
}

.subscription-bottom-sheet-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.subscription-bottom-sheet-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.subscription-bottom-sheet-value.status {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.subscription-bottom-sheet-value.status.active {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
}

.subscription-bottom-sheet-value.status.paused {
    background: rgba(202, 138, 4, 0.1);
    color: var(--golden-primary);
}

.subscription-bottom-sheet-value a {
    color: var(--golden-mid);
    text-decoration: none;
}

.subscription-bottom-sheet-value a:hover {
    text-decoration: underline;
}

.subscription-bottom-sheet-notes {
    padding: 14px 0;
}

.subscription-bottom-sheet-notes .subscription-bottom-sheet-label {
    margin-bottom: 8px;
}

.subscription-bottom-sheet-notes-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    background: var(--border-subtle);
    padding: 12px;
    border-radius: 8px;
}

.subscription-bottom-sheet-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px 24px;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-card);
    position: sticky;
    bottom: 0;
}

.subscription-bottom-sheet-btn {
    flex: 1;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
}

.subscription-bottom-sheet-btn:hover {
    background: var(--border-subtle);
}

.subscription-bottom-sheet-btn-edit {
    background: var(--text-primary);
    color: var(--bg-card);
    border-color: var(--text-primary);
}

.subscription-bottom-sheet-btn-edit:hover {
    background: #2d2d2d;
    border-color: #2d2d2d;
}

.subscription-bottom-sheet-btn-pause {
    color: var(--golden-mid);
    border-color: var(--golden-inactive);
}

.subscription-bottom-sheet-btn-pause:hover {
    background: rgba(202, 138, 4, 0.08);
}

.subscription-bottom-sheet-btn-cancel {
    color: var(--danger);
    border-color: var(--danger);
}

.subscription-bottom-sheet-btn-cancel:hover {
    background: rgba(220, 38, 38, 0.08);
}

/* ===== MOBILE CONFIRMATION MODALS ===== */
.mobile-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mobile-confirm-modal.show {
    display: flex;
}

.mobile-confirm-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(46, 29, 52, 0.35);
    animation: fadeIn 0.2s ease;
}

.mobile-confirm-modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    width: 100%;
    max-width: 340px;
    padding: 24px;
    animation: scaleIn 0.2s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.mobile-confirm-modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px;
}

.mobile-confirm-modal-message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 24px;
}

.mobile-confirm-modal-actions {
    display: flex;
    gap: 10px;
}

.mobile-confirm-modal-btn {
    flex: 1;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.mobile-confirm-modal-btn-secondary {
    background: var(--border-subtle);
    color: var(--text-primary);
}

.mobile-confirm-modal-btn-secondary:hover {
    background: var(--border);
}

.mobile-confirm-modal-btn-primary {
    background: var(--text-primary);
    color: var(--bg-card);
}

.mobile-confirm-modal-btn-primary:hover {
    background: #2d2d2d;
}

.mobile-confirm-modal-btn-danger {
    background: var(--danger);
    color: white;
}

.mobile-confirm-modal-btn-danger:hover {
    background: #b91c1c;
}

/* ===== MOBILE EDIT OVERLAY ===== */
.mobile-edit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: var(--bg-primary);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.mobile-edit-overlay.show {
    display: flex;
}

.mobile-edit-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.mobile-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    padding-top: calc(16px + env(safe-area-inset-top));
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-card);
    flex-shrink: 0;
}

.mobile-edit-title {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.mobile-edit-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.15s ease;
}

.mobile-edit-close:hover {
    background: var(--border-subtle);
    color: var(--text-primary);
}

.mobile-edit-segment-control {
    margin: 16px 20px;
    flex-shrink: 0;
}

.mobile-edit-form {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px;
}

.mobile-edit-form-actions {
    padding: 16px 0;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-card);
    flex-shrink: 0;
    /* Not sticky — scrolls with form content */
    position: static;
    margin-bottom: 20px; /* Space below button so it's not cut off */
}

.mobile-edit-form-actions .add-mobile-submit {
    width: 100%;
}

/* Update Bill button styling */
.mobile-edit-submit {
    padding: 16px 0;
}

.mobile-edit-submit .btn-submit {
    width: 100%;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: white;
    background: #ca8a04;
    border: none;
    border-radius: 12px;
    cursor: pointer;
}

/* Hide trial fields by default in edit form */
#editTrialFields {
    display: none;
}

#editTrialFields.show {
    display: block;
}

/* Desktop: hide the mobile edit overlay completely */
@media (min-width: 769px) {
    .mobile-edit-overlay,
    .subscription-bottom-sheet,
    .mobile-confirm-modal {
        display: none !important;
    }
}

/* ===== MOBILE EDIT OVERLAY — SINGLE PAGE MODE ===== */
/* Hide the segment/tab switcher */
.mobile-edit-overlay .mobile-edit-segment-control {
    display: none !important;
}

/* Show ALL segments at once as one scrollable page */
.mobile-edit-overlay #editSegmentService,
.mobile-edit-overlay #editSegmentBilling,
.mobile-edit-overlay #editSegmentManagement {
    display: block !important;
}

/* Hide the service picker browse button in edit mode (doesn't make sense there) */
.mobile-edit-overlay .add-browse-btn {
    display: none !important;
}

/* Hide asterisks from all fields except name in mobile edit */
.mobile-edit-overlay .field-required {
    display: none;
}
.mobile-edit-overlay #editSegmentService .add-field-cluster:first-child .field-required {
    display: inline;
}

/* Hide helper text in mobile edit form */
.mobile-edit-overlay .add-field-helper {
    display: none;
}

/* Add spacing between segments in single-page mode */
.mobile-edit-overlay .add-segment {
    padding-bottom: 8px;
}

/* Bill mobile edit form fields wrapper */
.bill-mobile-fields {
    padding-top: 16px;
}

/* ===== PUSH NOTIFICATION TOGGLE ===== */
.push-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.push-toggle-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.push-toggle-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.push-toggle-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.push-toggle-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.push-status {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes pulse-loading {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.push-status-loading {
    animation: pulse-loading 1s ease-in-out infinite;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d4d4d4;
    transition: 0.2s ease;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.2s ease;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--golden-primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Push notification helper messages */
.push-helper-message {
    font-size: 13px;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    line-height: 1.4;
}

.push-helper-message.warning {
    background: var(--golden-lightest);
    color: #92400e;
    border-left: 3px solid #f59e0b;
}

.push-helper-message.error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 3px solid #dc2626;
}

.push-helper-message.info {
    background: var(--golden-wash);
    color: var(--golden-primary);
    border-left: 3px solid var(--golden-mid);
}

/* ===== PULL TO REFRESH ===== */
#homeView {
    position: relative;
    overflow-y: auto;
}

.pull-to-refresh {
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    pointer-events: none;
    z-index: 100;
}

.pull-to-refresh.pulling {
    transform: translateY(50px);
}

.pull-to-refresh.refreshing {
    transform: translateY(50px);
}

.pull-to-refresh-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #e5e5e5;
    border-top-color: var(--golden-primary);
    border-radius: 50%;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

/* Ready state - threshold + hold met, release will trigger refresh */
.pull-to-refresh.ready .pull-to-refresh-spinner {
    border-color: var(--golden-primary);
    border-top-color: var(--golden-primary);
    transform: scale(1.2);
    animation: pullToRefreshSpin 0.8s linear infinite;
}

.pull-to-refresh.refreshing .pull-to-refresh-spinner {
    animation: pullToRefreshSpin 0.8s linear infinite;
}

@keyframes pullToRefreshSpin {
    to { transform: rotate(360deg); }
}

/* Only show on mobile */
@media (min-width: 769px) {
    .pull-to-refresh {
        display: none;
    }
}

/* ===== PWA ONBOARDING MODAL ===== */
.pwa-onboarding-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10002;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pwa-onboarding-modal.show {
    display: flex;
}

.pwa-onboarding-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(46, 29, 52, 0.35);
    animation: fadeIn 0.2s ease;
}

.pwa-onboarding-modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    width: 100%;
    max-width: 360px;
    padding: 28px 24px;
    animation: scaleIn 0.2s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.pwa-onboarding-title {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px;
    text-align: center;
}

.pwa-onboarding-message {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 24px;
    text-align: center;
}

.pwa-onboarding-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pwa-onboarding-btn {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    text-align: center;
}

.pwa-onboarding-btn-primary {
    background: var(--text-primary);
    color: var(--bg-card);
}

.pwa-onboarding-btn-primary:hover {
    background: #2d2d2d;
}

.pwa-onboarding-btn-secondary {
    background: transparent;
    color: var(--text-tertiary);
    padding: 10px 16px;
}

.pwa-onboarding-btn-secondary:hover {
    color: var(--text-secondary);
}

/* Install instruction steps */
.pwa-onboarding-steps {
    margin: 0 0 24px;
}

.pwa-onboarding-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
}

.pwa-onboarding-step-number {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: var(--border-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.pwa-onboarding-step-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    padding-top: 2px;
}

.pwa-onboarding-single-instruction {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: center;
    margin: 0;
}

/* Mobile bottom sheet style */
@media (max-width: 768px) {
    .pwa-onboarding-modal {
        align-items: flex-end;
        padding: 0;
    }

    .pwa-onboarding-modal-content {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 28px 20px 36px;
        animation: slideUp 0.25s ease;
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

/* ===== PWA INSTALL GUIDANCE (Settings) ===== */
.pwa-install-guidance {
    margin-top: 24px;
}

.pwa-install-guidance-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.pwa-install-guidance-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pwa-install-guidance-list li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: 2px 0;
}

.pwa-install-guidance-list li strong {
    color: var(--text-secondary);
    font-weight: 500;
}

/* New simplified PWA install guidance text */
.pwa-install-guidance-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Hide PWA install guidance entirely on Capacitor native — already installed there */
body.capacitor-native .pwa-install-guidance {
    display: none !important;
}

/* ===== CATALOG BROWSE VIEW ===== */

/* Responsive visibility helpers */
.catalog-mobile-only {
    display: block;
}
.catalog-desktop-only {
    display: none;
}

/* Desktop grid needs display: grid not block */
.catalog-grid.catalog-desktop-only {
    display: none;
}

/* Category pills need display: flex not block */
.catalog-category-pills.catalog-desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .catalog-mobile-only {
        display: none !important;
    }
    .catalog-desktop-only {
        display: block;
    }
    .catalog-grid.catalog-desktop-only {
        display: grid;
    }
    .catalog-category-pills.catalog-desktop-only {
        display: flex;
    }
}

/* Catalog container */
#catalogBrowseView {
    padding: 16px;
}

/* Catalog Type Tabs */
.catalog-type-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.catalog-type-tab {
    flex: 1;
    padding: 10px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #999;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    text-align: center;
}

.catalog-type-tab.active {
    color: #ca8a04;
    border-bottom-color: #ca8a04;
    font-weight: 600;
}

.catalog-type-tab:hover:not(.active) {
    color: #666;
}

/* Bill category list */
.bill-category-list {
    max-width: 500px;
    margin: 0 auto;
}

.bill-category-group-header {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    padding: 16px 0 6px;
    margin-top: 4px;
}

.bill-category-group-header:first-child {
    padding-top: 0;
    margin-top: 0;
}

.bill-category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s;
}

.bill-category-item:hover {
    background: #f5f5f5;
}

.bill-category-icon {
    font-size: 22px;
    width: 36px;
    text-align: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bill-category-icon svg {
    display: block;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
}

.bill-category-label {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #333;
}

/* Form field error state */
.field-error {
    border-color: #e74c3c !important;
}

/* Mobile adjustments for bill category list */
@media (max-width: 768px) {
    .bill-category-list {
        padding: 0 8px;
    }

    .bill-category-item {
        padding: 14px 8px;
    }
}

/* Home type filter chips (All | Subscriptions | Bills) */
.home-type-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.home-filter-chip {
    padding: 6px 16px;
    border: 1px solid #ca8a04;
    border-radius: 20px;
    background: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #ca8a04;
    cursor: pointer;
    transition: all 0.2s;
}

.home-filter-chip.active {
    background: #ca8a04;
    color: #fff;
    border-color: #ca8a04;
}

.home-filter-chip:hover:not(.active) {
    border-color: #d4a938;
    color: #d4a938;
}

/* Mobile adjustments for home type filter */
@media (max-width: 768px) {
    .home-type-filter {
        padding: 12px 16px 0;
        margin-bottom: 8px;
        align-items: center;
    }

    .home-filter-chip {
        border: 1px solid #E0DDD7;
        color: #888;
        background: transparent;
    }

    .home-filter-chip.active {
        background: #1a1a1a;
        color: #fff;
        border-color: #1a1a1a;
        font-weight: 500;
    }

    .home-filter-chip:hover:not(.active) {
        border-color: #ccc;
        color: #666;
    }

    .home-filter-pills-group {
        display: flex;
        gap: 8px;
        flex: 1;
    }

    .home-filter-calendar-btn {
        width: 34px;
        height: 34px;
        border-radius: 8px;
        border: 1px solid #E0DDD7;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
    }

    .home-filter-calendar-btn.active {
        background: #ca8a04;
        border-color: #ca8a04;
    }

    /* Calendar view */
    .calendar-view {
        padding: 4px 0;
    }

    .calendar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        padding: 0 16px;
    }

    .calendar-nav-btn {
        font-size: 20px;
        color: #999;
        cursor: pointer;
        padding: 4px 8px;
        background: none;
        border: none;
        font-family: 'Inter', sans-serif;
        line-height: 1;
    }

    .calendar-month-label {
        font-size: 16px;
        font-weight: 500;
        color: #1a1a1a;
    }

    .calendar-weekdays {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        text-align: center;
        font-size: 11px;
        color: #999;
        font-weight: 500;
        margin-bottom: 8px;
        padding: 0 16px;
    }

    .calendar-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        text-align: center;
        gap: 2px;
        padding: 0 16px;
    }

    .calendar-cell {
        padding: 8px 0;
        font-size: 13px;
        color: #999;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .calendar-cell.has-event {
        font-weight: 500;
        color: #ca8a04;
    }

    .calendar-cell.has-overdue {
        font-weight: 500;
        color: #DC2626;
    }

    .calendar-dot {
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: #ca8a04;
        margin: 2px auto 0;
        display: block;
    }

    .calendar-cell.has-overdue .calendar-dot {
        background: #DC2626;
    }

    .calendar-date-num {
        display: inline-block;
        width: 30px;
        height: 30px;
        line-height: 30px;
        text-align: center;
        border-radius: 50%;
    }

    .calendar-today-ring {
        border: 1.5px solid #ca8a04;
    }

    .calendar-cell.selected .calendar-date-num {
        background: rgba(202,138,4,0.1);
    }

    .calendar-cell[data-day] {
        cursor: pointer;
    }

    /* Calendar detail */
    .calendar-detail {
        padding: 0 16px;
    }

    .calendar-detail-header {
        font-size: 11px;
        color: #ca8a04;
        font-weight: 500;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        margin: 16px 0 8px;
    }

    .calendar-detail-empty {
        font-size: 13px;
        color: #999;
        text-align: center;
        padding: 24px 0;
    }

    .calendar-detail-row {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 11px 0;
    }

    .calendar-detail-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        flex-shrink: 0;
        object-fit: cover;
    }

    .calendar-detail-icon.bill-row-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fdf6e3;
    }

    .calendar-detail-info {
        flex: 1;
        min-width: 0;
    }

    .calendar-detail-name {
        font-size: 14px;
        font-weight: 500;
        color: #1a1a1a;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .calendar-detail-status {
        font-size: 12px;
        margin-top: 1px;
    }

    .calendar-detail-price {
        flex-shrink: 0;
        text-align: right;
    }

    .calendar-detail-amount {
        font-size: 14px;
        font-weight: 500;
        color: #1a1a1a;
    }

    .calendar-detail-cycle {
        font-size: 10px;
        color: #999;
        margin-left: 2px;
    }
}

/* Onboarding message */
.catalog-onboarding-msg {
    text-align: center;
    padding: 24px 20px 16px;
    color: #333;
    font-size: 18px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

/* Empty Home state (when user has zero subs and navigates to Home) */
.empty-home-state {
    text-align: center;
    padding: 80px 24px 40px;
    font-family: 'Inter', sans-serif;
}

.empty-home-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 18px;
    border-radius: 14px;
    background: rgba(202, 138, 4, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-home-title {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0 0 10px;
    line-height: 1.4;
}

.empty-home-subtitle {
    font-size: 13px;
    color: #888;
    margin: 0 0 24px;
    line-height: 1.6;
}

.empty-home-cta {
    background: #ca8a04;
    color: #ffffff;
    border: none;
    padding: 12px 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    width: 100%;
    max-width: 280px;
}

/* Search bar */
.catalog-search-wrapper {
    margin-bottom: 32px;
}

.catalog-search-input {
    width: 100%;
    padding: 14px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    -webkit-appearance: none;
    appearance: none;
}

.catalog-search-input:focus {
    outline: none;
    border-color: var(--text-tertiary);
}

.catalog-search-input::placeholder {
    color: var(--text-quaternary);
}

/* ===== MOBILE: Contact-style list grouped by category ===== */

.catalog-list {
    margin-top: 12px;
    margin-bottom: 20px;
}

.catalog-list-category-header {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 20px 0 8px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.catalog-list-category-header:first-child {
    padding-top: 0;
}

.catalog-list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    cursor: pointer;
    border-bottom: none;
    transition: background 0.15s ease;
}

.catalog-list-row:active {
    background: var(--border-subtle);
}

.catalog-list-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
}

.catalog-list-name {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ===== DESKTOP: Compact grid with depth ===== */

/* Category pills (Desktop only) */
.catalog-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
}

.catalog-pill {
    flex-shrink: 0;
    padding: 8px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--border-subtle);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.catalog-pill:hover {
    background: var(--border);
}

.catalog-pill.active {
    color: var(--golden-primary);
    background: rgba(202, 138, 4, 0.1);
}

/* Desktop grid */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(6, 110px);
    gap: 10px;
    justify-content: center;
    max-width: 750px;
    margin: 0 auto;
}

/* Service card (Desktop) */
.catalog-service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 110px;
    height: auto;
    min-height: 100px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    cursor: pointer;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.catalog-service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.catalog-service-card:active {
    transform: scale(0.98);
}

.catalog-service-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    opacity: 0.85;
    margin-bottom: 8px;
    border-radius: 8px;
    transition: opacity 0.2s ease;
}

.catalog-service-card:hover .catalog-service-logo {
    opacity: 1;
}

.catalog-service-name {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
}

/* Empty state */
.catalog-empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-tertiary);
}

.catalog-empty-state p {
    font-size: 15px;
    margin-bottom: 12px;
}

.catalog-empty-state a {
    color: var(--golden-mid);
    text-decoration: none;
    font-weight: 500;
}

.catalog-empty-state a:hover {
    text-decoration: underline;
}

/* Footer links */
.catalog-footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    padding-bottom: 20px;
}

.catalog-footer-links a {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.catalog-footer-links a:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* ===== Desktop adjustments ===== */
@media (min-width: 768px) {
    #catalogBrowseView {
        padding: 32px 24px;
        max-width: 800px;
        margin: 0 auto;
    }

    .catalog-search-wrapper {
        max-width: 710px;
        margin: 0 auto 20px auto;
    }

    .catalog-category-pills {
        max-width: 710px;
        margin: 0 auto 24px auto;
    }

    .catalog-footer-links {
        flex-direction: row;
        gap: 24px;
        margin-top: 40px;
    }
}

/* Catalog back button (Step 2 → Step 1) */
.catalog-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    margin-bottom: 16px;
}

.catalog-back-btn:hover {
    color: var(--text-primary);
}

.catalog-back-btn svg {
    width: 16px;
    height: 16px;
}

/* ===== CATALOG SERVICE HEADER (shown when service selected from catalog) ===== */

.catalog-service-header {
    padding: 16px 0 24px 0;
}

.catalog-back-link {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-decoration: none;
    margin-bottom: 16px;
    transition: color 0.15s ease;
}

.catalog-back-link:hover {
    color: var(--text-primary);
}

.catalog-service-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.catalog-service-logo-large {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: contain;
    flex-shrink: 0;
}

.catalog-service-header-info {
    flex: 1;
}

.catalog-service-name-display {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.catalog-service-category-display {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* ===== SINGLE-PAGE FORM MODE ===== */

/* Override grid to single column when in single-page mode */
.single-page-form-mode.add-desktop-workspace {
    display: block !important;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 24px;
}

/* When in single-page mode, show all tab contents */
.single-page-form-mode .add-tab-content {
    display: block !important;
}

/* Hide context rail (tab nav) in single-page mode */
.single-page-form-mode .add-context-rail {
    display: none !important;
}

/* Make main area full width when context rail is hidden */
.single-page-form-mode .add-main-area {
    margin-left: 0;
    padding: 32px 0 60px 0;
}

/* Hide browse button in single-page mode */
.single-page-form-mode .add-browse-btn {
    display: none !important;
}

/* Hide asterisks/required indicators in single-page mode (all fields optional except name) */
.single-page-form-mode .field-required,
.single-page-form-mode .tab-required {
    display: none !important;
}

/* Keep asterisk visible for the subscription name field (only required field) */
.single-page-form-mode #tabService .add-form-section > .add-field-group:first-child .field-required {
    display: inline !important;
}

/* Single-page mode: consistent spacing between sections */
.single-page-form-mode #tabBilling,
.single-page-form-mode #tabManagement {
    margin-top: 24px;
    padding-top: 0;
    border-top: none;
}

/* Consistent spacing for all field groups in single-page mode */
.single-page-form-mode .add-form-section {
    gap: 20px;
}

/* Ensure field rows have consistent spacing */
.single-page-form-mode .add-field-row {
    margin-bottom: 0;
}

/* Field groups inside rows maintain spacing via parent gap */
.single-page-form-mode .add-field-group {
    margin-bottom: 0;
}

/* Submit button: full width and always ready (golden) in single-page mode */
.single-page-form-mode .add-submit-btn.btn-ready,
.single-page-form-mode .add-submit-btn {
    width: 100%;
    max-width: 100%;
    background: var(--golden-primary) !important;
    color: #fff !important;
    opacity: 1 !important;
    cursor: pointer !important;
}

/* Form actions spacing in single-page mode */
.single-page-form-mode .add-form-actions {
    margin-top: 32px;
    border-top: none;
}

/* Readonly fields styling */
.readonly-field {
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    cursor: default;
}

/* Single-page mode: Suggest button styling (applies to both mobile and desktop) */
.single-page-form-mode-active .add-suggestion-submit,
.single-page-form-mode .add-suggestion-submit {
    background: var(--golden-primary) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 20px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
}

.single-page-form-mode-active .add-suggestion-submit:hover,
.single-page-form-mode .add-suggestion-submit:hover {
    background: #b8842e !important;
}

/* Single-page mode: Hide billing helper text */
.single-page-form-mode-active .add-field-hint,
.single-page-form-mode-active .add-field-helper,
.single-page-form-mode .add-field-hint,
.single-page-form-mode .add-field-helper {
    display: none !important;
}

/* Mobile single-page mode: show desktop form, hide mobile form */
.single-page-form-mode-active .add-mobile-only {
    display: none !important;
}

.single-page-form-mode-active .add-desktop-workspace {
    display: block !important;
}

/* Explicit mobile overrides for single-page mode */
@media (max-width: 768px) {
    /* Force desktop form visible on mobile when in single-page mode */
    .single-page-form-mode-active .add-desktop-workspace,
    .single-page-form-mode.add-desktop-workspace {
        display: block !important;
        max-width: 100%;
        padding: 0 16px;
    }

    /* Hide mobile-specific form elements that would conflict */
    .single-page-form-mode-active .add-segment-control,
    .single-page-form-mode-active .add-view-content.add-mobile-only,
    .single-page-form-mode-active #addForm {
        display: none !important;
    }

    /* Adjust main area padding for mobile */
    .single-page-form-mode .add-main-area {
        padding: 16px 0 80px 0;
    }

    /* Fix form container that has max-height:0 in base mobile CSS */
    .single-page-form-mode .add-form-container,
    .single-page-form-mode-active .add-form-container {
        max-height: none;
        overflow: visible;
        border: none;
        border-radius: 0;
    }

    /* 1. Remove box/card wrapper — full-width, no border, no shadow */
    .single-page-form-mode-active .add-form-container,
    .single-page-form-mode-active .add-main-area,
    .single-page-form-mode .add-form-container,
    .single-page-form-mode .add-main-area {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 2. Hide billing page URL helper text */
    .single-page-form-mode-active .add-field-hint,
    .single-page-form-mode-active .add-field-helper,
    .single-page-form-mode .add-field-hint,
    .single-page-form-mode .add-field-helper {
        display: none !important;
    }

    /* 3. "Missing a service?" section — show below Add button */
    /* (Removed display:none rule — section should be visible) */

    /* 4. Hide ALL asterisks/required indicators in single-page mode on mobile */
    .single-page-form-mode-active .field-required,
    .single-page-form-mode-active .tab-required {
        display: none !important;
    }

    /* 5. Stack field rows vertically (desktop form uses grid layout) */
    .single-page-form-mode-active .add-field-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    /* 6. Field group spacing (match mobile edit's ~20px margin-bottom) */
    .single-page-form-mode-active .add-field-group {
        margin-bottom: 20px !important;
        width: 100% !important;
    }

    /* 7. All inputs, selects, textareas full width — target desktop form classes */
    .single-page-form-mode-active .add-field-input,
    .single-page-form-mode-active .add-field-select,
    .single-page-form-mode-active .add-field-textarea,
    .single-page-form-mode-active #notesDesktop,
    .single-page-form-mode-active #categoryDesktop,
    .single-page-form-mode-active #paymentMethodDesktop {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 8. Notes textarea specific fix — add base styles since desktop styles don't apply on mobile */
    .single-page-form-mode-active textarea,
    .single-page-form-mode-active .add-field-textarea {
        width: 100% !important;
        box-sizing: border-box !important;
        min-height: 80px;
        font-family: 'Inter', sans-serif;
        padding: 12px 14px;
        border: 1px solid var(--border);
        border-radius: 8px;
        font-size: 14px;
        color: var(--text-primary);
        background: white;
        resize: vertical;
    }

    /* 9. Currency + Amount row — target .add-amount-input (desktop form class) */
    .single-page-form-mode-active .add-amount-input {
        display: flex !important;
        gap: 8px !important;
        width: 100% !important;
        border: none !important;
        border-radius: 0 !important;
        overflow: visible !important;
    }

    .single-page-form-mode-active .add-amount-input .add-currency-select {
        width: 100px !important;
        flex-shrink: 0 !important;
        border: 1px solid var(--border) !important;
        border-radius: 8px !important;
        padding: 12px 8px !important;
    }

    .single-page-form-mode-active .add-amount-input .add-field-input {
        flex: 1 !important;
        width: auto !important;
        min-width: 0 !important;
        border: 1px solid var(--border) !important;
        border-radius: 8px !important;
    }

    /* 10. Labels consistent styling */
    .single-page-form-mode-active .add-field-label {
        display: block;
        margin-bottom: 8px !important;
        font-size: 12px;
        font-weight: 600;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    /* 11. Form sections layout */
    .single-page-form-mode-active .add-form-section {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    /* 12. Tab content sections — remove gaps between sections */
    .single-page-form-mode-active .add-tab-content {
        margin-bottom: 0 !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        border-top: none !important;
    }

    /* Remove any ::before pseudo-elements that add section headers/dividers */
    .single-page-form-mode-active .add-tab-content::before {
        display: none !important;
        content: none !important;
    }

    /* 13. Paid/Trial and Monthly/Yearly radio buttons — bigger tap targets */
    .single-page-form-mode-active .add-type-checkboxes {
        display: flex !important;
        gap: 28px !important;
    }

    .single-page-form-mode-active .add-type-checkbox {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 8px 4px !important;
        cursor: pointer;
    }

    .single-page-form-mode-active .add-type-checkbox input[type="radio"] {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        border: 1.5px solid var(--border) !important;
        border-radius: 50% !important;
        background: white !important;
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
        cursor: pointer;
        flex-shrink: 0;
    }

    .single-page-form-mode-active .add-type-checkbox input[type="radio"]:checked {
        border-color: var(--golden-primary) !important;
    }

    .single-page-form-mode-active .add-type-checkbox input[type="radio"]:checked::after {
        content: '' !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 10px !important;
        height: 10px !important;
        background: var(--golden-primary) !important;
        border-radius: 50% !important;
    }

    .single-page-form-mode-active .add-type-checkbox-label {
        font-size: 15px !important;
        font-weight: 500 !important;
    }

    /* 14. Submit button — full width, matching Suggest button styling */
    .single-page-form-mode-active .add-submit-btn,
    .single-page-form-mode-active #submitBtnDesktop {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 14px 20px !important;
        border: none !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
        display: block !important;
        font-family: 'Inter', sans-serif !important;
        font-size: 14px !important;
        font-weight: 500 !important;
    }

    /* Make button container full width with no extra padding */
    .single-page-form-mode-active .add-form-actions {
        width: 100% !important;
        padding: 24px 0 0 0 !important;
        margin: 0 !important;
        border-top: none !important;
    }

    /* Also target the form container to ensure no padding constraints */
    .single-page-form-mode-active .add-desktop-form {
        width: 100% !important;
    }

    /* 15. "Missing a service?" suggestion form — stack vertically on mobile */
    .single-page-form-mode-active .add-suggestion-form {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .single-page-form-mode-active .add-suggestion-input,
    .single-page-form-mode-active #suggestServiceName {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .single-page-form-mode-active .add-suggestion-select,
    .single-page-form-mode-active #suggestServiceCategory {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Style the Suggest button */
    .single-page-form-mode-active .add-suggestion-submit {
        width: 100% !important;
        background: var(--golden-primary) !important;
        color: white !important;
        border: none !important;
        border-radius: 8px !important;
        padding: 14px 20px !important;
        font-family: 'Inter', sans-serif !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        cursor: pointer !important;
    }

    .single-page-form-mode-active .add-suggestion-submit:hover {
        background: #b8842e !important;
    }

    /* 15. Service header spacing — breathing room from top */
    .single-page-form-mode-active .catalog-service-header {
        padding-top: 16px;
        margin-bottom: 8px;
    }

    /* Catalog back link spacing */
    .single-page-form-mode-active .catalog-back-link {
        margin-bottom: 12px;
        display: inline-block;
    }
}

/* ===== BILL ADD FORM ===== */

/* Bill Add Form Container — inherits subscription form styles via shared classes */
.bill-add-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px 16px 32px;
}

/* Bill Type Custom Dropdown */
.bill-type-dropdown {
    position: relative;
}

.bill-type-selected {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    transition: border-color 0.15s ease;
    box-sizing: border-box;
    min-height: 44px;
}

.bill-type-selected:hover {
    border-color: var(--text-tertiary);
}

.bill-type-dropdown.open .bill-type-selected {
    border-color: var(--golden-primary);
}

.bill-type-dropdown.disabled .bill-type-selected {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}

.bill-type-selected-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-right: 10px;
}

.bill-type-selected-icon:empty {
    display: none;
}

.bill-type-selected-icon svg {
    width: 20px;
    height: 20px;
}

.bill-type-selected-text {
    flex: 1;
    color: var(--text-tertiary);
    font-size: 14px;
}

.bill-type-selected-text.has-value {
    color: var(--text-primary);
}

.bill-type-dropdown-arrow {
    flex-shrink: 0;
    margin-left: 8px;
    font-size: 12px;
    color: var(--text-tertiary);
    transition: transform 0.2s ease;
}

.bill-type-dropdown.open .bill-type-dropdown-arrow {
    transform: rotate(180deg);
}

.bill-type-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
}

.bill-type-dropdown.open .bill-type-options {
    display: block;
}

.bill-type-option {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s ease;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
}

.bill-type-option:first-child {
    border-radius: 8px 8px 0 0;
}

.bill-type-option:last-child {
    border-radius: 0 0 8px 8px;
}

.bill-type-option:hover {
    background: #f5f5f5;
}

.bill-type-option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-right: 10px;
}

.bill-type-option-icon svg {
    width: 20px;
    height: 20px;
}

.bill-type-option-label {
    font-size: 14px;
}

/* Safari fix: bill form selects need appearance reset for consistent height/padding */
.bill-add-form-container .add-field-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

/* Desktop bill submit button — full-width within form column */
.bill-add-form-container .add-submit-btn {
    width: 100%;
    max-width: 100%;
    display: block;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Bill form icon fallback (emoji in header) */
.bill-form-icon-fallback {
    font-size: 40px;
    line-height: 1;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 12px;
    flex-shrink: 0;
}

/* Back link wrapper for manual add */
.catalog-back-link-wrapper {
    margin-bottom: 16px;
}

/* Bill form disabled fields */
.bill-add-form-container input:disabled,
.bill-add-form-container select:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Toggle button groups — kept for inline detail edit view */
.bill-amount-type-toggle,
.bill-cycle-toggle,
.bill-due-date-toggle {
    display: flex;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.bill-toggle-btn {
    flex: 1;
    padding: 8px 12px;
    background: #fff;
    border: none;
    border-right: 1px solid #e0e0e0;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #888;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.bill-toggle-btn:last-child {
    border-right: none;
}

.bill-toggle-btn.active {
    background: #333;
    color: #fff;
}

/* Amount row — kept for mobile edit and inline detail */
.bill-amount-row {
    display: flex;
    gap: 8px;
}

.bill-amount-row .currency-select {
    width: 100px;
    flex-shrink: 0;
}

.bill-amount-row input {
    flex: 1;
}

/* Radio button styles for bill forms on mobile (add form + mobile edit form) */
.bill-add-form-container .add-type-checkboxes,
.bill-mobile-fields .add-type-checkboxes {
    display: flex;
    gap: 24px;
}

.bill-add-form-container .add-type-checkbox,
.bill-mobile-fields .add-type-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.bill-add-form-container .add-type-checkbox input[type="radio"],
.bill-mobile-fields .add-type-checkbox input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    background: white;
    position: relative;
    flex-shrink: 0;
}

.bill-add-form-container .add-type-checkbox input[type="radio"]:checked,
.bill-mobile-fields .add-type-checkbox input[type="radio"]:checked {
    border-color: var(--golden-primary);
}

.bill-add-form-container .add-type-checkbox input[type="radio"]:checked::after,
.bill-mobile-fields .add-type-checkbox input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--golden-primary);
    border-radius: 50%;
}

.bill-add-form-container .add-type-checkbox-label,
.bill-mobile-fields .add-type-checkbox-label {
    font-size: 15px;
    color: var(--text-tertiary);
    font-weight: 400;
}

.bill-add-form-container .add-type-checkbox input[type="radio"]:checked + .add-type-checkbox-label,
.bill-mobile-fields .add-type-checkbox input[type="radio"]:checked + .add-type-checkbox-label {
    color: var(--text-primary);
    font-weight: 500;
}

/* Bill Payment History */
.bill-history-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.bill-history-header {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: 0.01em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.bill-history-summary {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 12px;
}

.bill-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bill-history-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.bill-history-date {
    color: var(--text-primary);
    flex: 0 0 auto;
}

.bill-history-amount {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    flex: 1;
}

.bill-history-method {
    color: var(--text-tertiary);
    font-size: 13px;
    text-align: right;
    flex: 0 0 auto;
    min-width: 80px;
}

.bill-history-empty {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 12px 0;
}

/* Billing Cycle Native Select Pair */
.billing-cycle-selects {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 8px;
}

.billing-cycle-selects select.add-field-input {
    width: 100%;
    min-width: 0;
}

/* Billing Cycle Scroll-Wheel Picker */
.billing-cycle-picker {
    display: flex;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    height: 120px;
    user-select: none;
}

.picker-wheel {
    position: relative;
    overflow: hidden;
    cursor: grab;
}

.picker-wheel:active {
    cursor: grabbing;
}

.picker-wheel.number-wheel {
    flex: 0 0 35%;
}

.picker-wheel.unit-wheel {
    flex: 1;
}

.picker-divider {
    width: 1px;
    background: #E5E5E5;
    flex-shrink: 0;
}

.picker-items {
    position: absolute;
    width: 100%;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.picker-item {
    height: 40px;
    display: flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #999;
    padding: 0 16px;
    white-space: nowrap;
    transition: color 0.25s, font-weight 0.25s, font-size 0.25s;
}

.picker-item.selected {
    color: #ca8a04;
    font-weight: 600;
    font-size: 16px;
}

.number-wheel .picker-item {
    justify-content: center;
}

.unit-wheel .picker-item {
    justify-content: flex-start;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .bill-add-form-container {
        max-width: 100%;
        padding: 8px 16px 100px;
    }

    /* Stack two-column rows on mobile — match subscription .add-field-cluster spacing */
    .bill-add-form-container .add-field-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 28px;
    }

    /* Mobile bill add form field layout — match subscription .add-field-cluster spacing */
    .bill-add-form-container .add-form-section {
        display: flex;
        flex-direction: column;
        gap: 28px;
    }

    .bill-add-form-container .add-field-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .bill-add-form-container .add-field-label {
        display: block;
        font-size: 12px;
        font-weight: 500;
        color: var(--text-tertiary);
        margin-bottom: 0;
        letter-spacing: 0.01em;
    }

    /* Mobile bill type dropdown sizing */
    .bill-add-form-container .bill-type-selected,
    .bill-mobile-fields .bill-type-selected {
        padding: 14px 16px;
        border-radius: 10px;
        font-size: 15px;
    }

    .bill-add-form-container .bill-type-selected-text,
    .bill-mobile-fields .bill-type-selected-text {
        font-size: 15px;
    }

    .bill-add-form-container .bill-type-option,
    .bill-mobile-fields .bill-type-option {
        padding: 12px 16px;
        font-size: 15px;
    }

    .bill-add-form-container .bill-type-option-label,
    .bill-mobile-fields .bill-type-option-label {
        font-size: 15px;
    }

    .bill-add-form-container .add-field-input,
    .bill-add-form-container .add-field-select,
    .bill-add-form-container .add-field-textarea {
        width: 100%;
        padding: 14px 16px;
        border: 1px solid var(--border);
        border-radius: 10px;
        font-size: 15px;
        font-family: 'Inter', sans-serif;
        color: var(--text-primary);
        background: var(--bg-primary);
        box-sizing: border-box;
    }

    .bill-add-form-container .add-field-select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 14px center;
        background-size: 16px;
        padding-right: 38px;
    }

    .bill-add-form-container .add-field-input:focus,
    .bill-add-form-container .add-field-select:focus,
    .bill-add-form-container .add-field-textarea:focus {
        outline: none;
        border-color: var(--golden-primary);
    }

    .bill-add-form-container .add-field-textarea {
        resize: vertical;
        min-height: 80px;
    }

    /* Mobile bill add form amount row */
    .bill-add-form-container .add-amount-input {
        display: flex;
        gap: 8px;
        width: 100%;
    }

    .bill-add-form-container .add-currency-select {
        width: 100px;
        flex-shrink: 0;
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 14px 12px;
    }

    .bill-add-form-container .add-amount-input .add-field-input {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    /* Mobile bill add form submit button — match .add-mobile-submit styling */
    .bill-add-form-container .add-submit-btn {
        width: 100%;
        max-width: 100%;
        display: block;
        box-sizing: border-box;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        padding: 16px 24px;
        font-size: 15px;
        font-weight: 500;
        font-family: 'Inter', sans-serif;
        letter-spacing: 0.3px;
        color: white;
        background: rgba(202, 138, 4, 0.85);
        border: none;
        border-radius: 8px;
        cursor: pointer;
        opacity: 1;
        transition: all 0.2s ease;
    }

    .bill-add-form-container .add-form-actions {
        margin-top: 40px;
        padding-top: 24px;
    }
}

/* ===== GMAIL IMPORT STYLES ===== */

/* Import Container */
.import-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* Scanning State */
.import-scanning-state {
    text-align: center;
    padding-top: 80px;
}

.import-scanning-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.import-scanning-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.import-scanning-note {
    font-size: 12px;
    color: #999;
    margin-top: 40px;
}

/* Scanning Animation - Pulsing Dots */
.import-scanning-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
}

.import-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #000;
    border-radius: 50%;
    animation: importPulse 1.4s infinite ease-in-out;
}

.import-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.import-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes importPulse {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Error State */
.import-error-state {
    text-align: center;
    padding-top: 80px;
}

.import-error-icon {
    width: 48px;
    height: 48px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    font-weight: 600;
    color: #666;
}

.import-error-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.import-error-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.import-error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Empty State */
.import-empty-state {
    text-align: center;
    padding-top: 80px;
}

.import-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.import-empty-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.import-empty-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Results Header */
.import-header {
    text-align: center;
    margin-bottom: 24px;
}

.import-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.import-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

/* Source Summary Badges */
.import-source-summary {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.import-source-badge {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Import Cards */
.import-cards-list {
    margin-bottom: 24px;
}

.import-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    transition: opacity 0.2s;
}

.import-card-included {
    border-left: 3px solid #22c55e;
}

.import-card-skipped {
    opacity: 0.4;
    border-left: 1px solid #e0e0e0;
}

.import-card-editing {
    border-color: #000;
}

.import-card-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

/* Card Logo */
.import-card-logo {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.import-card-logo-img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: contain;
}

.import-card-logo-fallback {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.import-card-logo-initials {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

/* Card Content */
.import-card-content {
    flex: 1;
    min-width: 0;
}

.import-card-name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

.import-card-category {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

.import-card-amount {
    font-size: 14px;
    color: #444;
    margin-top: 6px;
}

.import-card-charge-info {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

/* Card Source Badge */
.import-card-source {
    flex-shrink: 0;
    align-self: flex-start;
}

.import-card-source-badge {
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Card Action Buttons */
.import-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* Import Buttons */
.import-btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #000;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s, color 0.15s;
}

.import-btn-primary {
    background: #000;
    color: #fff;
    border-color: #000;
}

.import-btn-primary:hover {
    background: #222;
}

.import-btn-primary.disabled,
.import-btn-primary:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

.import-btn-secondary {
    background: #fff;
    color: #000;
    border-color: #ccc;
}

.import-btn-secondary:hover {
    background: #f5f5f5;
}

.import-card-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #ccc;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s;
    background: #fff;
    color: #000;
}

.import-card-btn-primary {
    background: #000;
    color: #fff;
    border-color: #000;
}

.import-card-btn-primary:hover {
    background: #222;
}

.import-card-btn-secondary {
    background: #fff;
    color: #000;
    border-color: #ccc;
}

.import-card-btn-secondary:hover {
    background: #f5f5f5;
}

.import-card-btn-undo {
    background: #fff;
    color: #000;
    border-color: #000;
}

.import-card-btn-undo:hover {
    background: #f5f5f5;
}

.import-card-btn-active {
    background: #000;
    color: #fff;
    border-color: #000;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.import-card-btn-active:hover {
    background: #000;
}

.import-card-last-billed {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

/* Edit Form */
.import-edit-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.import-edit-row {
    margin-bottom: 16px;
}

.import-edit-row-inline {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.import-edit-col {
    display: flex;
    flex-direction: column;
}

.import-edit-col-small {
    width: 120px;
}

.import-edit-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #000;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.import-edit-input,
.import-edit-select {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #000;
    width: 100%;
    box-sizing: border-box;
}

.import-edit-input:focus,
.import-edit-select:focus {
    border-color: #000;
    outline: none;
}

.import-auto-badge {
    font-size: 10px;
    font-weight: 400;
    color: #999;
    text-transform: lowercase;
    letter-spacing: 0;
}

.import-edit-helper {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.import-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

/* Bottom Sticky Bar */
.import-sticky-bar {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 16px;
    margin: 0 -16px;
    text-align: center;
}

.import-sticky-helper {
    font-size: 13px;
    color: #888;
    text-align: center;
    margin: 0 0 8px 0;
}

.import-btn-done {
    background: #000;
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    width: 100%;
    max-width: 400px;
    transition: background 0.15s;
}

.import-btn-done:disabled,
.import-btn-done.disabled {
    background: #ccc;
    cursor: not-allowed;
}

.import-btn-done:hover:not(:disabled):not(.disabled) {
    background: #222;
}

/* Bottom Note */
.import-bottom-note {
    font-size: 13px;
    color: #888;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 80px;
    padding: 0 16px;
}

/* Import Toast Notification */
.import-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #000;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 10000;
    pointer-events: none;
}

.import-toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Gmail Import Mobile Responsiveness */
@media (max-width: 768px) {
    .import-container {
        padding: 16px 12px;
    }

    .import-card {
        padding: 16px;
    }

    .import-edit-row-inline {
        grid-template-columns: 1fr;
    }

    .import-edit-col-small {
        width: 100%;
    }

    .import-card-actions {
        flex-wrap: wrap;
    }

    .import-card-btn {
        flex: 1;
        min-width: 80px;
        text-align: center;
    }

    .import-source-summary {
        gap: 8px;
        flex-wrap: wrap;
    }

    .import-source-badge {
        font-size: 12px;
    }
}

/* ===== GMAIL IMPORT ENTRY POINTS ===== */

/* Gmail Import Trigger Button (Home Empty State) */
.import-gmail-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background: #fff;
    color: #000;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.15s;
}

.import-gmail-trigger-btn:hover {
    border-color: #000;
}

/* Gmail Import Prompt (Catalog/Add View) */
.import-gmail-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #666;
}

.import-gmail-link {
    color: #000;
    font-weight: 500;
    text-decoration: underline;
}

.import-gmail-link:hover {
    text-decoration: none;
}

/* Empty State Gmail Section */
.empty-state-gmail-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e5e5;
    text-align: center;
}

.empty-state-gmail-heading {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.empty-state-gmail-subtext {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* Temporarily hide Gmail import entry points */
.gmail-import-hidden {
    display: none !important;
}


/* Hide summary card and alert nudge on desktop */
#summaryCardDesktop,
#alertNudgeDesktop {
    display: none !important;
}

/* ===== SUMMARY CARD ===== */
.summary-card {
    margin: 0 16px 14px;
    background: linear-gradient(135deg, #ca8a04 0%, #f5e6b8 30%, #ca8a04 50%, #f5e6b8 70%, #ca8a04 100%);
    border-radius: 20px;
    padding: 5px;
    border: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 8px rgba(0,0,0,0.04), 0 8px 16px rgba(0,0,0,0.03);
}
.summary-card-inner {
    background: #ffffff;
    border-radius: 15px;
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
}
.summary-card-vignette-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(180deg, rgba(245,230,184,0.25) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}
.summary-card-vignette-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(0deg, rgba(245,230,184,0.15) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}
.summary-card-vignette-left {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(90deg, rgba(245,230,184,0.12) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}
.summary-card-vignette-right {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60px;
    background: linear-gradient(270deg, rgba(245,230,184,0.12) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}
.summary-card-row1 {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.summary-card-greeting {
    font-size: 15px;
    color: #444;
    font-weight: 400;
}
.summary-card-due-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: #ca8a04;
    text-transform: uppercase;
}
.summary-card-message {
    font-size: 13px;
    color: #888888;
    font-weight: 400;
    margin: 2px 0 16px;
}
.summary-card-columns {
    display: flex;
    position: relative;
}
.summary-card-column {
    flex: 1;
}
.summary-card-column:first-child {
    padding-right: 16px;
}
.summary-card-column:last-child {
    padding-left: 16px;
}
.summary-card-column-divider {
    width: 1px;
    background: rgba(202,138,4,0.15);
    flex-shrink: 0;
}
.summary-card-column-label {
    font-size: 11px;
    color: #999999;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}
.summary-card-column-amount {
    font-size: 22px;
    font-weight: 500;
    color: #1a1a1a;
}
.summary-card-column-secondary {
    font-size: 14px;
    color: #666666;
    margin-top: 1px;
}
.summary-card-column-note {
    font-size: 12px;
    color: #999999;
    margin-top: 2px;
}

/* Mobile summary card adjustments */
@media (max-width: 768px) {
    .summary-card {
        margin: 0 0 14px;
    }
}

/* ===== ALERT NUDGE ===== */
.alert-nudge {
    margin: 0 16px 12px;
    padding: 8px 14px;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    display: flex;
    align-items: center;
    gap: 8px;
}
.alert-nudge-red {
    background: #FEF2F2;
}
.alert-nudge-neutral {
    background: #ffffff;
    border: 0.5px solid rgba(0,0,0,0.04);
}
.alert-nudge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.alert-nudge-red .alert-nudge-dot {
    background: #DC2626;
}
.alert-nudge-neutral .alert-nudge-dot {
    background: #ca8a04;
}
.alert-nudge-text {
    font-size: 12px;
}
.alert-nudge-red .alert-nudge-text {
    color: #991B1B;
}
.alert-nudge-neutral .alert-nudge-text {
    color: #444;
}

/* ===== STATS EMPTY STATE ===== */
.stats-empty-state {
    padding: 20px 16px;
    font-family: 'Inter', sans-serif;
}

.stats-empty-header {
    text-align: center;
    margin-bottom: 6px;
}

.stats-empty-title {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0 0 6px;
}

.stats-empty-subtitle {
    font-size: 12px;
    color: #888;
    margin: 0 0 12px;
    line-height: 1.5;
}

.stats-empty-cta {
    background: #ca8a04;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: inline-block;
}

.stats-empty-sample-label {
    text-align: right;
    font-size: 10px;
    color: #bbb;
    font-style: italic;
    margin-top: 14px;
    margin-bottom: 6px;
}

.stats-empty-preview {
    opacity: 0.5;
    pointer-events: none;
}

.stats-empty-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    border: 0.5px solid rgba(0,0,0,0.04);
}

.stats-empty-bar-row {
    margin-bottom: 8px;
}

.stats-empty-bar-row:last-child {
    margin-bottom: 0;
}

.stats-empty-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #555;
    margin-bottom: 3px;
}

.stats-empty-bar-track {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
}

.stats-empty-bar-fill {
    height: 6px;
    border-radius: 3px;
}

/* ===== ONBOARDING SCREENS ===== */

.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.onboarding-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 480px;
    margin: 0 auto;
}

.onboarding-skip-row {
    padding: 16px 24px 0;
    display: flex;
    justify-content: flex-end;
}

.onboarding-skip {
    font-size: 14px;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    font-family: 'Inter', sans-serif;
}

.onboarding-viewport {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.onboarding-track {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.onboarding-slide {
    width: 33.333%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 32px 20px;
    text-align: center;
}

.onboarding-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: rgba(202, 138, 4, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

.onboarding-title {
    font-size: 22px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0 0 12px;
    line-height: 1.3;
    font-family: 'Inter', sans-serif;
}

.onboarding-desc {
    font-size: 15px;
    color: #888;
    margin: 0;
    line-height: 1.6;
    font-family: 'Inter', sans-serif;
}

.onboarding-bottom {
    padding: 0 32px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.onboarding-dots {
    display: flex;
    gap: 8px;
}

.onboarding-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.3s;
}

.onboarding-dot.active {
    background: #ca8a04;
    width: 24px;
    border-radius: 4px;
}

.onboarding-btn {
    background: #ca8a04;
    color: #ffffff;
    border: none;
    padding: 14px 0;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    width: 100%;
}

/* Hide onboarding on desktop */
@media (min-width: 769px) {
    .onboarding-overlay {
        display: none !important;
    }
}

