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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #8b5cf6;
    --secondary-dark: #7c3aed;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Theme colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-color: rgba(0, 0, 0, 0.1);
    
    /* Default accent colors */
    --accent-primary: #2563eb;
    --accent-secondary: #1d4ed8;
    --primary-light: rgba(37, 99, 235, 0.1);
}

[data-theme="dark"] {
    --gray-50: #1a1a1a;
    --gray-100: #2a2a2a;
    --gray-200: #3a3a3a;
    --gray-300: #4a4a4a;
    --gray-400: #5a5a5a;
    --gray-500: #7a7a7a;
    --gray-600: #9a9a9a;
    --gray-700: #bababa;
    --gray-800: #dadada;
    --gray-900: #f0f0f0;
    
    --bg-primary: #181818;
    --bg-secondary: #1f1f1f;
    --bg-card: #242424;
    --text-primary: #f5f5f5;
    --text-secondary: #a3a3a3;
    --border-color: #262626;
    --shadow-color: rgba(0, 0, 0, 0.8);
}

/* Accent color mappings */
[data-accent="blue"] {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent-primary: #2563eb;
    --accent-secondary: #1d4ed8;
}

[data-accent="purple"] {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --accent-primary: #7c3aed;
    --accent-secondary: #6d28d9;
}

[data-accent="pink"] {
    --primary: #ec4899;
    --primary-dark: #db2777;
    --accent-primary: #ec4899;
    --accent-secondary: #db2777;
}

[data-accent="red"] {
    --primary: #ef4444;
    --primary-dark: #dc2626;
    --accent-primary: #ef4444;
    --accent-secondary: #dc2626;
}

[data-accent="orange"] {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --accent-primary: #f97316;
    --accent-secondary: #ea580c;
}

[data-accent="yellow"] {
    --primary: #eab308;
    --primary-dark: #ca8a04;
    --accent-primary: #eab308;
    --accent-secondary: #ca8a04;
}

[data-accent="green"] {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --accent-primary: #22c55e;
    --accent-secondary: #16a34a;
}

[data-accent="teal"] {
    --primary: #14b8a6;
    --primary-dark: #0d9488;
    --accent-primary: #14b8a6;
    --accent-secondary: #0d9488;
}

[data-accent="cyan"] {
    --primary: #06b6d4;
    --primary-dark: #0891b2;
    --accent-primary: #06b6d4;
    --accent-secondary: #0891b2;
}

[data-accent="indigo"] {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent-primary: #6366f1;
    --accent-secondary: #4f46e5;
}

[data-accent="gray"] {
    --primary: #6b7280;
    --primary-dark: #4b5563;
    --accent-primary: #6b7280;
    --accent-secondary: #4b5563;
}

[data-accent="black"] {
    --primary: #000000;
    --primary-dark: #171717;
    --accent-primary: #000000;
    --accent-secondary: #171717;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: 0;
    padding: 0;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    body {
        background-color: #f8f9fa;
    }
    
    [data-theme="dark"] body {
        background-color: #0a0a0a;
    }
}

/* Prevent zoom on input focus on iOS */
input, select, textarea {
    font-size: 16px !important;
}

/* Improve touch targets */
button, .btn, .nav-item, .bill-card {
    -webkit-tap-highlight-color: transparent;
}

/* Prevent text selection on interactive elements */
.nav-item, .bill-card, .btn {
    -webkit-user-select: none;
    user-select: none;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* Desktop/Mobile visibility helpers */
.desktop-only {
    display: none !important;
}

.mobile-only {
    display: block;
}

.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.mobile-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .desktop-only {
        display: block !important;
    }
    
    .mobile-only {
        display: none !important;
    }
    
    .page-header.desktop-only {
        display: flex !important;
    }
}

/* Auth Screen */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

@media (min-width: 640px) {
    .auth-container {
        padding: 2rem;
    }
}

.app-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .app-title {
        font-size: 3rem;
    }
}

.app-subtitle {
    color: var(--gray-600);
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .app-subtitle {
        margin-bottom: 3rem;
        font-size: 1rem;
    }
}

.auth-form {
    display: none;
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (min-width: 640px) {
    .auth-form {
        padding: 2rem;
    }
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    font-size: 16px;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    color: var(--gray-600);
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

@media (max-width: 640px) {
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .dashboard-header-controls .btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }
    
    .dashboard-header-controls .btn span {
        display: none; /* Hide emoji on mobile */
    }
}

@media (min-width: 768px) {
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
        width: auto;
    }
    
    .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .btn:active {
        transform: translateY(0);
    }
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    width: 100%;
}

@media (min-width: 768px) {
    .btn-primary {
        width: auto;
    }
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
    width: 100%;
}

@media (min-width: 768px) {
    .btn-secondary {
        width: auto;
    }
}

.btn-secondary:hover {
    background-color: var(--gray-300);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
    width: 100%;
}

@media (min-width: 768px) {
    .btn-danger {
        width: auto;
    }
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--gray-600);
    cursor: pointer;
    font-size: 0.875rem;
}

/* Main App Layout */
#mainApp {
    padding-bottom: 5rem;
    min-height: 100vh;
}

@media (min-width: 768px) {
    #mainApp {
        padding-bottom: 0;
    }
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: block;
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.btn-logout-desktop {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-logout-desktop:hover {
    background-color: var(--gray-50);
    color: var(--text-primary);
}

/* Mobile Top Navigation */
.mobile-top-nav {
    background: var(--bg-card);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

@media (min-width: 768px) {
    .mobile-top-nav {
        display: none;
    }
}

.mobile-top-nav h1 {
    font-size: 1.25rem;
    color: var(--primary);
}

@media (min-width: 640px) {
    .mobile-top-nav h1 {
        font-size: 1.5rem;
    }
}

/* Main Content Area */
.main-content {
    flex: 1;
    background-color: var(--bg-secondary);
    padding: 1rem;
    /* Add padding for mobile bottom navigation */
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
    min-height: 100vh;
}

@media (min-width: 768px) {
    .main-content {
        max-width: 1200px;
        width: 100%;
        margin: 0 auto;
        padding: 2rem;
        /* Reset bottom padding on desktop since no bottom nav */
        padding-bottom: 2rem;
        min-height: auto;
    }
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 1rem;
    /* Add padding for bottom navigation and safe areas on iOS */
    padding-bottom: calc(5rem + env(safe-area-inset-bottom));
    overflow: hidden;
    position: relative;
}

@media (min-width: 640px) {
    .tab-content {
        padding: 1.25rem;
    }
}

@media (min-width: 768px) {
    .tab-content {
        padding: 0;
        padding-bottom: 0; /* Reset safe area padding on desktop */
    }
}

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

/* Page Header (Desktop) */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

@media (max-width: 640px) {
    .page-header {
        margin-bottom: 1rem;
    }
    
    .page-header h2 {
        font-size: 1.5rem;
    }
}

.page-subtitle {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: 1rem;
}

/* Info Box */
.info-box {
    background: var(--gray-100);
    padding: 0.75rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

/* Dashboard */
.dashboard-header {
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .dashboard-header {
        margin-bottom: 0.75rem;
    }
}

.dashboard-header h2 {
    font-size: 1.125rem;
    margin-bottom: 0.125rem;
}

@media (max-width: 640px) {
    .dashboard-header h2 {
        font-size: 0.9375rem;
        margin-bottom: 0;
        line-height: 1.2;
    }
    
    .dashboard-header > div:first-child {
        flex: 1;
        min-width: 0;
    }
}

@media (min-width: 640px) {
    .dashboard-header h2 {
        font-size: 1.5rem;
    }
}

.month-display {
    color: var(--gray-600);
    font-size: 0.75rem;
}

@media (max-width: 640px) {
    .month-display {
        font-size: 0.625rem;
    }
}

@media (min-width: 640px) {
    .month-display {
        font-size: 1rem;
    }
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .summary-cards {
        gap: 0.375rem;
        margin-bottom: 0.75rem;
    }
}

@media (min-width: 480px) {
    .summary-cards {
        gap: 0.75rem;
        margin-bottom: 2rem;
    }
}

@media (min-width: 768px) {
    .summary-cards {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
        margin-bottom: 3rem;
    }
}

.summary-card {
    background: var(--bg-card);
    padding: 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 60px;
    transition: all 0.2s;
}

@media (max-width: 640px) {
    .summary-card {
        padding: 0.625rem;
        min-height: 50px;
    }
}

@media (min-width: 640px) {
    .summary-card {
        padding: 1.5rem;
        gap: 1rem;
    }
}

@media (min-width: 768px) {
    .summary-card {
        padding: 1.5rem 2rem;
        border-radius: 0.75rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        border: 1px solid var(--border-color);
    }
    
    .summary-card:hover {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px);
    }
}

.summary-icon {
    font-size: 1.25rem;
}

@media (max-width: 640px) {
    .summary-icon {
        font-size: 1rem;
    }
}

@media (min-width: 640px) {
    .summary-icon {
        font-size: 2rem;
    }
}

.summary-details {
    flex: 1;
    min-width: 0;
}

.summary-label {
    font-size: 0.625rem;
    color: var(--gray-600);
    margin-bottom: 0.125rem;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .summary-label {
        font-size: 0.625rem;
        line-height: 1;
    }
}

@media (min-width: 640px) {
    .summary-label {
        font-size: 0.875rem;
    }
}

.summary-value {
    font-size: 0.875rem;
    font-weight: 600;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .summary-value {
        font-size: 0.75rem;
    }
}

@media (min-width: 640px) {
    .summary-value {
        font-size: 1.25rem;
    }
}

/* Quick Actions */
.quick-actions {
    margin: 1.5rem 0;
    text-align: center;
}

@media (min-width: 768px) {
    .quick-actions {
        margin: 2rem 0;
    }
    
    .quick-actions .btn {
        padding: 0.75rem 1.5rem;
    }
}

/* Bills List */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .section-header {
        margin-bottom: 0.75rem;
    }
}

.section-header h3 {
    font-size: 1.125rem;
}

@media (max-width: 640px) {
    .section-header h3 {
        font-size: 1rem;
    }
}

.bills-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    .bills-list {
        gap: 1rem;
    }
    
    /* Desktop bill management - card grid */
    #bills .bills-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 1.5rem;
    }
    
    /* Dashboard bills stay as list but with max width */
    .dashboard-bills {
        display: flex;
        flex-direction: column;
        max-width: 800px;
        margin: 0 auto;
    }
}

/* Mobile bill management - ensure list layout */
@media (max-width: 767px) {
    #bills .bills-list {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* Reset desktop grid styles for mobile */
    #bills .bill-card {
        height: 68px !important;
        min-height: unset !important;
        flex-direction: row !important;
        align-items: stretch !important;
    }
    
    #bills .bill-checkbox-wrapper {
        display: none !important;
    }
    
    #bills .bill-content {
        flex-direction: column !important;
        padding: 0.375rem 0.75rem !important;
        gap: 0 !important;
        height: auto !important;
        flex: 1;
    }
    
    #bills .bill-metadata {
        display: flex !important;
    }
    
    #bills .bill-amount-section {
        border-left: none !important;
        border-top: none !important;
        padding: 0 1.5rem !important;
        align-items: center !important;
    }
    
    #bills .amount-label {
        display: none !important;
    }
}

/* Bill Cards - Modern Redesign */
.bill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: stretch;
    min-height: 80px;
    height: auto;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.bill-card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Checkbox Section */
.bill-checkbox-wrapper {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    background: var(--gray-50);
    border-right: 1px solid var(--border-color);
}

[data-theme="dark"] .bill-checkbox-wrapper {
    background: var(--gray-800);
}

/* Main Content Area */
.bill-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    min-width: 0;
    gap: 0.25rem;
}

/* Bill Header Section */
.bill-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.bill-name {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* Badge Styles */
.bill-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.125rem;
    min-height: 1.25rem;
}

.type-badge,
.warning-badge {
    font-size: 0.625rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    line-height: 1.4;
}

.type-badge {
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

[data-theme="dark"] .type-badge {
    background: var(--gray-800);
    color: var(--gray-400);
    border-color: var(--gray-700);
}

.warning-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
}

.warning-badge.urgent {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.warning-badge.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.warning-badge.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

[data-theme="dark"] .warning-badge.urgent {
    background: #7f1d1d;
    color: #fecaca;
    border-color: #991b1b;
}

[data-theme="dark"] .warning-badge.warning {
    background: #78350f;
    color: #fde68a;
    border-color: #92400e;
}

[data-theme="dark"] .warning-badge.info {
    background: #1e3a8a;
    color: #bfdbfe;
    border-color: #1e40af;
}

/* Metadata Section */
.bill-metadata {
    display: flex;
    gap: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.metadata-label {
    font-size: 0.6875rem;
    color: var(--text-secondary);
}

.metadata-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* Amount Section */
.bill-amount-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
    flex-shrink: 0;
    min-width: 100px;
    gap: 0.25rem;
}

.amount-label {
    font-size: 0.625rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bill-amount {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 100px;
}

/* Bill Amount Section for Bills Page */
.bill-amount-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    padding: 0 1.25rem;
}

.amount-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Mobile-specific adjustments */
@media (max-width: 640px) {
    .bill-card {
        min-height: 76px;
        height: auto;
        position: relative;
        cursor: pointer;
    }
    
    /* Hide checkbox on mobile */
    .bill-checkbox-wrapper {
        display: none;
    }
    
    .bill-content {
        padding: 0.375rem 0.75rem;
    }
    
    .bill-metadata {
        font-size: 0.625rem;
        gap: 0.75rem;
    }
    
    .bill-badges {
        margin-bottom: 0.125rem;
    }
    
    .type-badge,
    .warning-badge {
        font-size: 0.5rem;
    }
    
    .metadata-label,
    .metadata-value {
        font-size: 0.625rem;
    }
    
    .bill-logo {
        width: 24px;
        height: 24px;
    }
    
    .bill-amount {
        font-size: 0.875rem;
    }
}

/* Desktop adjustments */
@media (min-width: 768px) {
    .bill-card {
        min-height: 84px;
        height: auto;
        border-radius: 0.625rem;
        cursor: pointer;
    }
    
    .bill-content {
        padding: 0.5rem 1.25rem;
    }
    
    .bill-checkbox-wrapper {
        display: none;
    }
    
    .bill-name {
        font-size: 0.9375rem;
    }
    
    .type-badge,
    .warning-badge {
        font-size: 0.5625rem;
        padding: 0.125rem 0.375rem;
    }
    
    .metadata-label::after {
        content: ":";
    }
    
    .metadata-label,
    .metadata-value {
        font-size: 0.75rem;
    }
    
    .bill-amount {
        font-size: 1.125rem;
    }
    
    /* Bill management cards in grid layout */
    #bills .bill-card {
        height: auto;
        min-height: 120px;
        flex-direction: column;
        align-items: stretch;
    }
    
    #bills .bill-checkbox-wrapper {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        height: auto;
    }
    
    #bills .bill-content {
        flex-direction: column;
        padding: 1rem;
        gap: 0.75rem;
        height: auto;
    }
    
    #bills .bill-metadata {
        display: flex;
    }
    
    #bills .bill-amount-section {
        border-left: none;
        border-top: 1px solid var(--border-color);
        align-items: flex-start;
        padding: 1rem;
    }
    
    #bills .amount-label {
        display: block;
        margin-bottom: 0.25rem;
    }
}

/* Bill card modifiers */
.bill-card.bill-management {
    cursor: pointer;
}

.bill-card.bill-management:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Dashboard specific bill cards */
.dashboard-bills .bill-card {
    cursor: pointer;
}

.bill-card.paid {
    opacity: 0.6;
    position: relative;
}

.bill-card.paid::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

[data-theme="dark"] .bill-card.paid::after {
    background: rgba(0, 0, 0, 0.3);
}

/* Partner bill styling */
.bill-card.partner-bill {
    background: var(--gray-50);
    border-style: dashed;
}

[data-theme="dark"] .bill-card.partner-bill {
    background: var(--gray-900);
}

/* Bill checkbox */
.bill-checkbox {
    width: 28px;
    height: 28px;
    border: 2px solid var(--gray-300);
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    background: var(--bg-card);
}

.bill-checkbox:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.bill-checkbox.checked {
    background: var(--primary);
    border-color: var(--primary);
}

.bill-checkbox input {
    display: none;
}

.checkbox-icon {
    color: white;
    font-size: 1rem;
    font-weight: bold;
    line-height: 1;
}

/* Bill logo styling */
.bill-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 0.25rem;
    flex-shrink: 0;
}

/* Delete one-off button */
.delete-oneoff-btn {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 0.25rem;
    padding: 0 0.375rem;
    font-size: 1rem;
    line-height: 1;
    height: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-oneoff-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

@media (max-width: 640px) {
    .delete-oneoff-btn {
        font-size: 0.875rem;
        height: 18px;
        padding: 0 0.25rem;
    }
}

/* Bill Actions Overlay */
.bill-actions-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0.5rem;
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    z-index: 10;
    backdrop-filter: blur(4px);
}

[data-theme="dark"] .bill-actions-overlay {
    background: rgba(0, 0, 0, 0.98);
}

.bill-action-btn {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.bill-action-btn.btn-success {
    background: var(--success);
    color: white;
}

.bill-action-btn.btn-success:hover {
    background: #16a34a;
}

.bill-action-btn.btn-secondary {
    background: var(--gray-600);
    color: white;
}

.bill-action-btn.btn-secondary:hover {
    background: var(--gray-700);
}

.bill-action-btn.btn-danger {
    background: var(--danger);
    color: white;
}

.bill-action-btn.btn-danger:hover {
    background: #dc2626;
}

.bill-action-btn.edit {
    background: var(--secondary);
    color: white;
}

.bill-action-btn.edit:hover {
    background: var(--secondary-dark);
    transform: scale(1.02);
}

@media (max-width: 400px) {
    .bill-action-btn {
        padding: 0.5rem;
        font-size: 0.8125rem;
    }
}

/* Month Navigation */
.month-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
}

.month-navigation h3 {
    margin: 0;
    text-align: center;
    flex: 1;
}

.month-nav-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-primary);
}

.month-nav-btn:hover {
    background: var(--gray-100);
    border-color: var(--primary);
    color: var(--primary);
}

.month-nav-btn:active {
    transform: scale(0.95);
}

[data-theme="dark"] .month-nav-btn:hover {
    background: var(--gray-800);
}

/* Settings */
.settings-section {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .settings-section {
        padding: 2rem;
        border-radius: 0.75rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        border: 1px solid var(--border-color);
        margin-bottom: 1.5rem;
    }
    
    #settingsForm {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        max-width: 1200px;
    }
    
    .settings-groups-container {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 1.5rem;
    }
}

.settings-section h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.setting-item {
    margin-bottom: 1rem;
}

.setting-item label {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.setting-item p {
    font-weight: 500;
}

.settings-section form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .settings-section form {
        flex-direction: row;
        gap: 1rem;
        align-items: flex-end;
    }
}

@media (min-width: 1024px) {
    .settings-section {
        max-width: 600px;
    }
}

.settings-section input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
}

/* Modern Split Controls */
.split-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.split-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.split-user-info {
    flex: 0 0 120px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.split-user-info label {
    font-size: 0.875rem;
    color: var(--gray-700);
    font-weight: 500;
}

.percentage-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    min-width: 45px;
    text-align: right;
}

/* Modern Slider Design */
.modern-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    outline: none;
    transition: all 0.2s;
}

.modern-slider:hover {
    background: var(--gray-300);
}

.modern-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.modern-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.modern-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.modern-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Visual Split Bar */
.split-visual-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
    position: relative;
}

.split-fill {
    height: 100%;
    transition: width 0.3s ease;
    position: absolute;
    left: 0;
    top: 0;
}

.user1-fill {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
}

@media (max-width: 640px) {
    .split-row {
        gap: 1rem;
    }
    
    .split-user-info {
        flex: 0 0 100px;
    }
}

/* Removed split-note - no longer needed with slider */

.setting-note {
    color: var(--gray-600);
    font-style: italic;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    box-shadow: 0 -1px 3px var(--shadow-color);
    /* Prevent content from being cut off by rounded corners */
    padding-left: max(0.5rem, env(safe-area-inset-left));
    padding-right: max(0.5rem, env(safe-area-inset-right));
}

/* Add extra padding in standalone PWA mode */
@media (display-mode: standalone) {
    .bottom-nav {
        padding-bottom: max(1.25rem, calc(env(safe-area-inset-bottom) + 0.75rem));
    }
}

@media (min-width: 768px) {
    .bottom-nav {
        display: none;
    }
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--gray-500);
    transition: all 0.3s ease;
    position: relative;
    border-radius: 0.75rem;
    margin: 0.25rem;
}

.nav-item.active {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
    box-shadow: 0 0 0 2px var(--primary);
}

[data-theme="dark"] .nav-item.active {
    background: rgba(79, 70, 229, 0.2);
}

.nav-item:hover:not(.active) {
    background: var(--gray-50);
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.nav-label {
    font-size: 0.75rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    padding: 2rem 1rem;
    overflow-y: auto;
}

@media (min-width: 768px) {
    .modal {
        padding: 2rem;
    }
}

/* Ensure confirmation modal appears above other modals */
#confirmModal {
    z-index: 200;
}

.modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 0.5rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Fix for bank account modals */
#addBankAccountModal .modal-content,
#editBankAccountModal .modal-content {
    height: auto;
    max-height: 70vh;
    max-width: 500px !important;
}

/* Ensure bank account forms are properly laid out */
#addBankAccountModal .form-row,
#editBankAccountModal .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 640px) {
    #addBankAccountModal .form-row,
    #editBankAccountModal .form-row {
        grid-template-columns: 1fr;
    }
}

.modal-content form {
    display: block;
}

/* Fix for add bill modal form-row */
.modal-form-row-fix {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
    flex-direction: unset !important;
}

.modal-form-row-fix .form-group {
    margin-bottom: 0 !important;
    flex: unset !important;
}

@media (min-width: 640px) {
    .modal-content {
        padding: 2rem;
        max-width: 700px;
    }
}

@media (min-width: 768px) {
    .modal-content {
        padding: 2.5rem !important;
        border-radius: 0.75rem;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        max-width: 600px !important;
        width: 90vw !important;
        max-height: 85vh;
    }
    
    .modal-content h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
}

@media (min-width: 1024px) {
    .modal-content {
        padding: 2.5rem 3rem !important;
        max-width: 700px !important;
        width: 90vw !important;
    }
    
    /* 3-column layout for larger screens */
    .modal-content form {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    /* Adjust form rows for 3-column layout */
    .modal-content .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Some elements can be narrower */
    .modal-content .form-group:has(input[type="number"]:not(#billAmount)),
    .modal-content .form-group:has(input[type="date"]) {
        grid-column: span 1;
    }
}

@media (min-width: 1280px) {
    .modal-content {
        padding: 2rem 3rem !important;
        max-width: 800px !important;
        width: 85vw !important;
        max-height: 90vh !important;
    }
    
    /* 4-column layout for very large screens */
    .modal-content form {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    /* Adjust spans for 4-column layout */
    .modal-content .form-group {
        grid-column: span 2;
    }
    
    .modal-content .form-row {
        grid-template-columns: repeat(2, 1fr) !important;
        display: grid !important;
    }
    
    .modal-content .form-row .form-group {
        grid-column: span 1 !important;
    }
    
    /* Compact inputs */
    .modal-content .form-group:has(input[type="number"]:not(#billAmount)),
    .modal-content .form-group:has(input[type="date"]),
    .modal-content .form-group:has(select) {
        grid-column: span 1;
    }
}

.modal-content h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.modal-content input,
.modal-content select,
.modal-content textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    font-size: 16px;
}

@media (min-width: 768px) {
    .modal-content input,
    .modal-content select,
    .modal-content textarea {
        padding: 0.625rem 0.875rem;
        font-size: 0.9375rem;
        margin-bottom: 0;
    }
}

@media (min-width: 1024px) {
    .modal-content input,
    .modal-content select,
    .modal-content textarea {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Form Groups in Modals */
.modal-content .form-group {
    margin-bottom: 0;
}

.modal-content .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .modal-content .form-group label {
        font-size: 0.8125rem;
    }
}

.modal-content .form-group input,
.modal-content .form-group select,
.modal-content .form-group textarea {
    margin-bottom: 0;
}

/* Side-by-side form groups */
.form-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-direction: column;
}

@media (min-width: 480px) {
    .form-row {
        flex-direction: row;
    }
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* On desktop, allow 3 columns for some rows */
@media (min-width: 768px) {
    .form-row {
        gap: 1.5rem;
    }
    
    .form-row-thirds {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .form-row-thirds .form-group {
        margin-bottom: 0;
    }
    
    /* Make some form groups take full width */
    .form-group-full {
        grid-column: 1 / -1;
    }
    
    /* Optimize modal form layouts for desktop */
    .modal-content form {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Single form groups default to 2 columns */
    .modal-content .form-group {
        grid-column: span 1;
    }
    
    /* Form rows span full width and handle their own layout */
    .modal-content .form-row {
        grid-column: 1 / -1;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem;
        margin-bottom: 0;
        flex-direction: unset !important;
    }
    
    /* Ensure form-row children stay in grid */
    .modal-content .form-row .form-group {
        margin-bottom: 0;
        flex: unset !important;
        width: 100%;
    }
    
    /* Elements that should span full width */
    .modal-content .form-group-full,
    .modal-content .checkbox-group,
    .modal-content #yearlySplitOption,
    .modal-content #overrideSplitOption,
    .modal-content #editOverrideSplitOption,
    .modal-content #visibilityOption,
    .modal-content .modal-actions {
        grid-column: 1 / -1;
    }
    
    /* Specific full-width inputs */
    .modal-content .form-group:has(#billImageUrl):not(.modal-form-row-fix .form-group),
    .modal-content .form-group:has(textarea) {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .form-row {
        gap: 2rem;
    }
    
    .modal-content .form-row {
        gap: 2rem;
    }
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-direction: column;
}

@media (min-width: 400px) {
    .modal-actions {
        flex-direction: row;
        gap: 1rem;
        justify-content: space-between;
        align-items: center;
    }
}

.modal-actions .btn {
    flex: 1;
}

.modal-actions .btn-danger {
    flex: 0 0 auto;
}

@media (min-width: 768px) {
    .modal-actions {
        gap: 1rem;
        margin-top: 1.25rem;
    }
    
    .modal-actions .btn {
        flex: 0 0 auto;
        min-width: 120px;
        padding: 0.5rem 1rem;
    }
    
    .modal-actions .btn-danger {
        margin-right: auto;
    }
}

@media (min-width: 1024px) {
    .modal-actions {
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .modal-actions .btn {
        min-width: 140px;
    }
}

/* Modern Checkbox Styling */
.checkbox-group {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background-color: var(--gray-50);
    border-radius: 0.375rem;
    margin: 0.25rem 0;
}

@media (min-width: 768px) {
    .checkbox-group {
        padding: 0.375rem 0.625rem;
        margin: 0;
    }
}

[data-theme="dark"] .checkbox-group {
    background-color: var(--gray-800);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin: 0;
    user-select: none;
    width: 100%;
}

.checkbox-group input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
    accent-color: var(--primary);
}

/* Custom checkbox styling for better appearance */
@supports (appearance: none) {
    .checkbox-group input[type="checkbox"] {
        appearance: none;
        -webkit-appearance: none;
        background-color: var(--bg-primary);
        border: 2px solid var(--gray-300);
        border-radius: 0.25rem;
        position: relative;
        transition: all 0.2s ease;
    }
    
    .checkbox-group input[type="checkbox"]:checked {
        background-color: var(--primary);
        border-color: var(--primary);
    }
    
    .checkbox-group input[type="checkbox"]:checked::after {
        content: '✓';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: white;
        font-size: 0.875rem;
        font-weight: bold;
    }
    
    .checkbox-group input[type="checkbox"]:hover {
        border-color: var(--primary);
    }
    
    .checkbox-group input[type="checkbox"]:focus {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }
}

/* Split Input Styling */
.split-inputs-container {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    background-color: var(--gray-50);
    border-radius: 0.5rem;
}

[data-theme="dark"] .split-inputs-container {
    background-color: var(--gray-800);
}

.split-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.split-input-group input[type="number"] {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    text-align: center;
}

.split-input-group input[type="number"]:focus {
    outline: 2px solid var(--primary);
    outline-offset: -1px;
    border-color: var(--primary);
}

/* Bottom Navigation spacing fix */
@media (max-width: 640px) {
    #mainApp {
        padding-bottom: 4rem;
    }
    
    .bottom-nav {
        padding: 0.375rem 0;
    }
    
    .nav-icon {
        font-size: 1.25rem;
    }
    
    .nav-label {
        font-size: 0.625rem;
    }
}

/* Form improvements for mobile */
@media (max-width: 640px) {
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn-sm {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
}

/* MFA Token Input */
#mfaToken, #mfaSetupToken {
    text-align: center;
    font-size: 1.5rem !important;
    letter-spacing: 0.5rem;
    font-family: monospace;
}

/* Error Messages */
.error-message {
    background-color: #fee;
    color: var(--danger);
    padding: 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border: 1px solid #fcc;
}

.error-message .error-details {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    opacity: 0.8;
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
}

@media (max-width: 640px) {
    .notification-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}

.notification {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease-out;
    position: relative;
}

.notification.success {
    border-left: 4px solid var(--success);
}

.notification.error {
    border-left: 4px solid var(--danger);
}

.notification.info {
    border-left: 4px solid var(--primary);
}

.notification-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.notification-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0.25rem;
}

.notification-close:hover {
    color: var(--gray-600);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Theme and Color picker styles */
.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: var(--text-primary);
}

.color-btn.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
}

.theme-btn {
    min-width: 100px;
}

.theme-btn.active {
    background: var(--primary);
    color: white;
}

/* Settings headers */
.settings-header {
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    margin: -1rem -1rem 1rem -1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

/* Dark mode form elements */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: var(--gray-100);
    color: var(--text-primary);
    border-color: var(--gray-300);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--gray-500);
}

[data-theme="dark"] option {
    background: var(--gray-100);
    color: var(--text-primary);
}

/* Dark mode buttons */
[data-theme="dark"] .btn-secondary {
    background: var(--gray-200);
    color: var(--text-primary);
    border: 1px solid var(--gray-300);
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--gray-300);
}

[data-theme="dark"] .btn-danger {
    background: #991b1b;
    color: white;
}

[data-theme="dark"] .btn-danger:hover {
    background: #7f1d1d;
}

/* Modern Settings Styles */
/* Settings Navigation */
.settings-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .settings-nav {
        justify-content: center;
        flex-wrap: wrap;
        overflow-x: visible;
    }
}

@media (min-width: 1200px) {
    .settings-nav {
        gap: 1rem;
    }
}

.settings-nav-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.settings-nav-btn:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.settings-nav-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.settings-group {
    margin-bottom: 1.5rem;
    display: none;
    position: relative;
    overflow: hidden;
    contain: layout style;
}

/* Fix for sticky settings */
#settings {
    position: relative;
    overflow-y: auto;
    max-height: calc(100vh - 10rem);
    contain: layout style;
}

#settings .settings-group {
    /* Ensure settings groups are only visible within settings tab */
    z-index: auto;
}

/* Hide all settings groups when settings tab is not active */
.tab-content:not(#settings) .settings-group {
    display: none !important;
}

@media (max-width: 767px) {
    #settings {
        max-height: calc(100vh - 8rem - env(safe-area-inset-bottom));
    }
}

.settings-group.active {
    display: block;
}

@media (min-width: 768px) {
    #settingsForm {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* Tablet layout (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    /* Personal settings - keep vertical layout on tablets */
    .settings-group[data-section="personal"] .settings-item {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Account type section uses full width */
    .account-type-tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Split method buttons - already handled above */
}

/* Desktop layout (1200px+) */
@media (min-width: 1200px) {
    /* Personal settings - create a grid container for the form fields */
    .settings-group[data-section="personal"].active {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem 2rem;
    }
    
    .settings-group[data-section="personal"] .settings-group-title {
        grid-column: 1 / -1;
    }
    
    .settings-group[data-section="personal"] .settings-item {
        display: block;
        width: 100%;
        margin-bottom: 0;
    }
    
    /* Income sources section should be full width and span both columns */
    .settings-group[data-section="personal"] .settings-item:has(#incomeSourcesList) {
        grid-column: 1 / -1;
        margin-top: 1rem;
    }
    
    /* Account type section */
    .account-type-tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        max-width: 800px;
        margin: 0 auto;
    }
    
    /* Couple settings section */
    #coupleSettingsSection {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem !important;
    }
    
    /* Split method buttons - already handled above */
    
    /* Bank accounts layout */
    .bank-accounts-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1rem;
    }
    
    .bank-account-item {
        margin-bottom: 0;
    }
    
    .bank-account-item.nested {
        margin-left: 0;
        grid-column: span 1;
    }
}


.settings-group-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .settings-group-title {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }
}

.settings-item {
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .settings-item {
        margin-bottom: 1rem;
    }
}

.settings-item label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.settings-item input,
.settings-item select {
    width: 100%;
    padding: 0.625rem;
    font-size: 0.9375rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.settings-item input:focus,
.settings-item select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Compact Split Slider */
.split-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

/* Settings Boxes - Soft Minimal Design */
.settings-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
    .settings-box {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }
}

.settings-box:last-child {
    margin-bottom: 0;
}

.settings-box-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .settings-box-title {
        font-size: 1.125rem;
        margin-bottom: 1rem;
    }
}

/* Partner Management */
.text-muted {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.partner-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.partner-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .partner-info-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .partner-info-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

.partner-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.partner-info-item label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.partner-info-item span,
.partner-info-item strong {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.partner-info-item strong {
    font-weight: 600;
}

.partner-form-fields {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .partner-form-fields {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

.partner-form-fields .form-group {
    margin-bottom: 0;
}

.partner-form-fields label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.partner-form-fields input {
    width: 100%;
    padding: 0.625rem;
    font-size: 0.9375rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.partner-form-fields input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

    border-radius: 8px;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] #partnerInfo {
    background: var(--gray-800);
}

.partner-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.partner-details {
    flex: 1;
}

.partner-details h4 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.partner-details p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.add-partner-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.add-partner-form input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.875rem;
    background: var(--bg-card);
    color: var(--text-primary);
}

.partner-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Ensure slider is visible in modals */
.modal .split-compact {
    background-color: var(--gray-50);
    padding: 0.75rem;
    border-radius: 0.5rem;
}

[data-theme="dark"] .modal .split-compact {
    background-color: var(--gray-800);
}

.split-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    min-width: 60px;
}

.split-user span:first-child {
    color: var(--text-secondary);
    margin-bottom: 0.125rem;
}

.split-user span:last-child {
    font-weight: 600;
    color: var(--primary);
}

.slider-compact {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--gray-200);
    border-radius: 2px;
    outline: none;
    margin: 0 0.5rem;
}

[data-theme="dark"] .slider-compact {
    background: var(--gray-700);
}

.slider-compact::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.slider-compact::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Toggle Group */
.toggle-group {
    display: inline-flex;
    background: var(--gray-100);
    border-radius: 0.375rem;
    padding: 0.125rem;
}

.toggle-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.toggle-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Color Grid */
.color-grid {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-btn {
    width: 32px;
    height: 32px;
    border-radius: 0.375rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.color-btn:hover {
    transform: scale(1.1);
}

.color-btn.active {
    border-color: var(--text-primary);
}

.color-btn.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
}

/* Settings Link */
.settings-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.settings-link:hover {
    text-decoration: underline;
}

/* Save All Button */
.save-all {
    width: 100%;
    margin-top: 2rem;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
}

@media (min-width: 768px) {
    .save-all {
        width: auto;
        padding: 0.5rem 1.5rem;
        font-size: 0.875rem;
        margin-top: 0;
        margin-bottom: 1.5rem;
    }
}

/* MFA Compact */
.mfa-compact {
    font-size: 0.875rem;
}

/* Small buttons */
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Settings Description */
.settings-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Login Attempts Table */
.login-attempts-list {
    margin-top: 1rem;
    overflow-x: auto;
}

.login-attempts-table {
    width: 100%;
    background: var(--bg-card);
    border-radius: 0.5rem;
    overflow: hidden;
}

.login-attempts-table table {
    width: 100%;
    border-collapse: collapse;
}

.login-attempts-table th {
    background: var(--gray-100);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.login-attempts-table td {
    padding: 0.75rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-color);
}

.login-attempts-table tr:last-child td {
    border-bottom: none;
}

.login-attempts-table tr.success {
    background: var(--bg-card);
}

.login-attempts-table tr.failure {
    background: rgba(239, 68, 68, 0.05);
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.status-badge.failure {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 0.5rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 400px;
}

.modal-content h3 {
    margin-bottom: 1rem;
}

.modal-content input {
    width: 100%;
    margin-bottom: 0.75rem;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.modal-actions button {
    flex: 1;
}

/* Bank Accounts List */
.bank-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bank-account-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--gray-50);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.bank-account-item:hover {
    background-color: var(--gray-100);
}

.bank-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 0.375rem;
    margin-right: 0.75rem;
}

.bank-logo-placeholder {
    width: 40px;
    height: 40px;
    background-color: var(--gray-200);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.bank-account-info {
    flex: 1;
}

.bank-account-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.bank-account-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.bank-account-item.nested {
    background-color: var(--gray-25);
    border-left: 3px solid var(--primary);
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    margin-left: 2rem;
}

.bank-account-actions {
    display: flex;
    gap: 0.5rem;
}

/* Bank accounts list styling */
.bank-accounts-list {
    margin-bottom: 1rem;
}

/* Simple Income Sources Styling */
.income-sources-list {
    margin-bottom: 1rem;
    margin-top: 0.5rem;
    width: 100%;
}

/* Desktop grid layout for income sources */
@media (min-width: 1200px) {
    .income-sources-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Income sources section - full width always */
.settings-item:has(.income-sources-list) {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: none !important;
    display: block !important;
    margin-right: 0 !important;
}

.income-source-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    gap: 1rem;
    cursor: pointer;
}

@media (min-width: 768px) {
    .income-source-item {
        padding: 1.25rem;
    }
}

.income-source-item:hover {
    background: var(--gray-100);
}

[data-theme="dark"] .income-source-item:hover {
    background: var(--gray-800);
}

.income-source-info {
    flex: 1;
}

.income-source-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.income-source-details {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.income-source-amount {
    font-weight: 500;
    color: var(--success);
}

.income-source-actions {
    display: flex;
    gap: 0.5rem;
}

.income-form-simple {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: none;
}

@media (max-width: 767px) {
    .income-form-simple {
        padding: 1.5rem;
    }
}

@media (min-width: 1200px) {
    .income-form-simple {
        padding: 2.5rem;
    }
}

.income-form-fields {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.income-field {
    width: 100%;
}

.income-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.income-field input,
.income-field select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s;
    min-height: 44px;
}

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

/* Mobile - stack all fields */
@media (max-width: 767px) {
    .income-form-fields {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* Tablet - 2x2 grid */
@media (min-width: 768px) and (max-width: 1199px) {
    .income-form-fields {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Desktop - horizontal layout with better proportions */
@media (min-width: 1200px) {
    .income-form-fields {
        grid-template-columns: 2.5fr 1.5fr 1.5fr 2fr;
        gap: 2rem;
        align-items: end;
    }
    
    .income-field input,
    .income-field select {
        padding: 1rem 1.25rem;
        font-size: 1rem;
        min-height: 52px;
    }
}

.income-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.income-form-actions button {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    min-width: 100px;
    min-height: 44px;
}

@media (max-width: 767px) {
    .income-form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .income-form-actions button {
        width: 100%;
    }
}

.bank-account-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s ease;
}

.bank-account-item:hover {
    background: var(--gray-100);
}

[data-theme="dark"] .bank-account-item:hover {
    background: var(--gray-800);
}

.bank-account-item.nested {
    margin-left: 2rem;
    background: var(--bg-secondary);
}

.bank-account-info {
    flex: 1;
}

.bank-account-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.bank-account-type {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.bank-account-item .bank-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-right: 1rem;
    border-radius: 0.25rem;
}

/* CSS Debugging Utilities - Add ?debug=1 to URL to enable */
.debug-layout * {
    outline: 1px solid rgba(255, 0, 0, 0.3) !important;
    background: rgba(255, 0, 0, 0.05) !important;
}

.debug-layout .income-form-container {
    outline: 2px solid rgba(0, 255, 0, 0.8) !important;
    background: rgba(0, 255, 0, 0.1) !important;
}

.debug-layout .income-form-grid {
    outline: 2px solid rgba(0, 0, 255, 0.8) !important;
    background: rgba(0, 0, 255, 0.1) !important;
}

.debug-layout .form-group {
    outline: 1px solid rgba(255, 165, 0, 0.8) !important;
    background: rgba(255, 165, 0, 0.1) !important;
}

.debug-layout .settings-item {
    outline: 2px solid rgba(255, 0, 255, 0.8) !important;
    background: rgba(255, 0, 255, 0.1) !important;
}

/* Screen size indicator */
.debug-layout::before {
    content: "Mobile: < 768px";
    position: fixed;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    z-index: 9999;
}

@media (min-width: 768px) {
    .debug-layout::before {
        content: "Tablet: 768px - 1199px";
    }
}

@media (min-width: 1200px) {
    .debug-layout::before {
        content: "Desktop: ≥ 1200px";
    }
}

/* Removed complex standardized form system - keeping it simple */

/* Bill Logo Styles */
.bill-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}

.bill-logo-fallback {
    width: 32px;
    height: 32px;
    background-color: var(--gray-100);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
}

/* Reports Page */
.report-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.report-type-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.125rem;
    min-height: unset;
}

.report-type-btn:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.report-type-btn.active {
    background: var(--gray-100);
    border-color: var(--primary);
    border-width: 2px;
}

[data-theme="dark"] .report-type-btn:hover {
    background: var(--gray-800);
}

[data-theme="dark"] .report-type-btn.active {
    background: var(--gray-700);
}

.report-icon {
    font-size: 1.25rem;
    line-height: 1;
    margin-bottom: 0.125rem;
}

.report-title {
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1.2;
}

.report-desc {
    font-size: 0.6875rem;
    line-height: 1.2;
    color: var(--text-secondary);
}

@media (max-width: 640px) {
    .report-selector {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .report-type-btn {
        padding: 0.5rem;
        gap: 0;
    }
    
    .report-icon {
        font-size: 1rem;
        margin-bottom: 0;
    }
    
    .report-title {
        font-size: 0.75rem;
    }
    
    .report-desc {
        font-size: 0.625rem;
        margin-top: 0;
    }
}

.report-content {
    position: relative;
}

.report-section {
    display: none;
}

.report-section.active {
    display: block;
}

.report-month-selector {
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.month-nav-btn {
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-nav-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.month-selector-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-month-selector label {
    font-weight: 500;
}

.report-month-selector input[type="month"] {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.transfer-report {
    max-width: 800px;
    margin: 0 auto;
}

.report-month-header {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.bank-transfers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.bank-transfer-item {
    background: var(--bg-card);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Parent account group styling */
.parent-account-group {
    margin-bottom: 2rem;
}

.bank-transfer-item.parent-account {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-bottom: none;
    border-left: 4px solid var(--primary);
    margin-bottom: 0;
    border-radius: 0.5rem 0.5rem 0 0;
    position: relative;
}

.bank-transfer-item.parent-account::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: var(--border-color);
}

.bank-transfer-item.parent-account .transfer-instructions {
    margin-top: 0.25rem;
    line-height: 1.4;
    font-size: 0.875rem;
}

.bank-transfer-item.parent-account .transfer-instructions strong {
    color: var(--primary);
}

.bank-transfer-item.parent-account .transfer-amount {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: 700;
}

.sub-accounts {
    background: var(--gray-50);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    padding: 0.5rem;
}

[data-theme="dark"] .sub-accounts {
    background: var(--gray-800);
}

.bank-transfer-item.sub-account {
    background: var(--bg-card);
    margin: 0.5rem;
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--secondary);
}

.bank-transfer-item.sub-account h5 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
}

.bank-transfer-info h4 {
    margin: 0 0 0.125rem 0;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.bank-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.bank-type {
    color: var(--text-secondary);
    background: var(--gray-100);
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.bank-name {
    color: var(--text-secondary);
    font-weight: 500;
}

.parent-account {
    color: var(--text-secondary);
    font-style: italic;
}

.bill-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.transfer-amount {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.unassigned-warning {
    background: #ff98001a;
    border: 1px solid #ff9800;
    border-radius: 0.5rem;
    padding: 0.875rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.warning-content h4 {
    margin: 0 0 0.5rem 0;
    color: #ff9800;
}

.warning-content p {
    margin: 0;
    color: var(--text-primary);
}

.report-total {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.report-total span {
    font-weight: 600;
    color: var(--primary-color);
}

/* Dashboard Header Controls */
.dashboard-header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 640px) {
    .dashboard-header-controls {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
}

.grouping-selector.compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .grouping-selector.compact {
        gap: 0.25rem;
    }
}

.grouping-selector.compact label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@media (max-width: 640px) {
    .grouping-selector.compact label {
        font-size: 0.75rem;
    }
}

.grouping-selector.compact select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    min-width: 120px;
}

@media (max-width: 640px) {
    .grouping-selector.compact select {
        padding: 0.25rem 0.375rem;
        font-size: 0.6875rem;
        min-width: 80px;
    }
}

/* Mobile Header Controls */
.mobile-header-controls {
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

.mobile-header-controls select {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.25rem;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.6875rem;
    height: 28px;
    min-width: 0;
}

.btn-icon {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--primary);
    background: var(--primary);
    color: white;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.btn-icon:active {
    transform: scale(0.95);
}

/* Financial Period Info */
.financial-period-info {
    margin-top: 1rem;
    text-align: center;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.financial-period-info p {
    margin: 0;
}

@media (max-width: 640px) {
    .financial-period-info {
        margin-top: 0.75rem;
        font-size: 0.8125rem;
    }
}

/* Login Attempts Table */
.login-attempts-table {
    overflow-x: auto;
    margin-top: 1rem;
}

.login-attempts-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.login-attempts-table th,
.login-attempts-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.login-attempts-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--gray-50);
}

[data-theme="dark"] .login-attempts-table th {
    background: var(--gray-800);
}

.login-attempts-table tr:hover {
    background: var(--gray-50);
}

[data-theme="dark"] .login-attempts-table tr:hover {
    background: var(--gray-800);
}

.login-attempts-table tr.failed {
    background: rgba(239, 68, 68, 0.05);
}

.login-attempts-table tr.failed:hover {
    background: rgba(239, 68, 68, 0.1);
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.failed,
.status-badge.failure {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.primary {
    background: var(--primary-light);
    color: var(--primary);
}

.status-badge.secondary {
    background: var(--gray-100);
    color: var(--text-secondary);
}

[data-theme="dark"] .status-badge.success {
    background: #064e3b;
    color: #6ee7b7;
}

[data-theme="dark"] .status-badge.failed,
[data-theme="dark"] .status-badge.failure {
    background: #7f1d1d;
    color: #fca5a5;
}

[data-theme="dark"] .status-badge.warning {
    background: #78350f;
    color: #fde68a;
}

[data-theme="dark"] .status-badge.primary {
    background: var(--primary-dark);
    color: #dbeafe;
}

[data-theme="dark"] .status-badge.secondary {
    background: var(--gray-700);
    color: var(--gray-300);
}

/* Toggle Switch */
.toggle-setting {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.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: var(--gray-300);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Admin Users Table */
.admin-users-table {
    margin-top: 1rem;
    overflow-x: auto;
}

.admin-users-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-users-table th,
.admin-users-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-users-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
}

.admin-users-table tr:hover {
    background: var(--gray-50);
}

[data-theme="dark"] .admin-users-table tr:hover {
    background: var(--gray-800);
}

.admin-users-list {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 1rem;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.text-muted {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Admin User Search */
.admin-user-search {
    margin-top: 1rem;
}

.search-input-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.search-input-group .form-input {
    flex: 1;
    max-width: 400px;
}

.admin-user-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

.admin-user-card.not-found {
    text-align: center;
    padding: 2rem;
    background: var(--gray-50);
}

[data-theme="dark"] .admin-user-card.not-found {
    background: var(--gray-800);
}

.user-info h5 {
    margin: 0 0 0.25rem 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.user-email {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.user-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    font-size: 0.875rem;
}

.detail-item strong {
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.user-actions {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.admin-status {
    margin-bottom: 1rem;
    font-weight: 500;
}

.admin-user-card .btn {
    min-width: 200px;
}

@media (max-width: 640px) {
    .search-input-group {
        flex-direction: column;
    }
    
    .search-input-group .form-input {
        width: 100%;
        max-width: none;
    }
    
    .user-details {
        flex-direction: column;
        gap: 0.5rem;
    }
}

.settings-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Savings Cards */
.savings-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .savings-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 1.5rem;
    }
}

.savings-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.savings-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.savings-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.savings-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.savings-actions {
    display: flex;
    gap: 0.5rem;
}

.savings-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
}

.savings-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.savings-footer {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 640px) {
    .savings-card {
        padding: 1rem;
    }
    
    .savings-header {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .savings-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr auto;
    }
    
    .savings-details {
        gap: 0.5rem;
    }
    
    .stat-label {
        font-size: 0.6875rem;
    }
    
    .stat-value {
        font-size: 0.875rem;
    }
}

/* Dashboard Controls - DEPRECATED (keeping for reference) */
.dashboard-controls {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.grouping-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.grouping-selector label {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.grouping-selector select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
    min-width: 140px;
}

/* Bill Groups */
.bill-group {
    margin-bottom: 2rem;
}

.bill-group-header {
    padding: 0.75rem 1rem;
    background: var(--gray-100);
    border-radius: 0.5rem 0.5rem 0 0;
    border: 1px solid var(--border-color);
    border-bottom: none;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bill-group-content {
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    background: var(--bg-card);
}

.bill-group-content .bills-list {
    margin: 0;
    padding: 0;
}

.bill-group-content .bill-card {
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
    margin: 0;
}

.bill-group-content .bill-card:last-child {
    border-bottom: none;
    border-radius: 0 0 0.5rem 0.5rem;
}

.group-total {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

/* Warning styles for upcoming bills */
.bill-warning-inline {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.875rem;
    cursor: help;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.bill-warning-inline:hover {
    opacity: 1;
}

/* Legacy warning styles (keeping for backwards compatibility) */
.bill-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bill-warning-icon {
    font-size: 1rem;
}

[data-theme="dark"] .bill-warning {
    background: #2d1b00;
    border-color: #4a3000;
    color: #ffd700;
}

/* Collapsible sections */
.section-header.collapsible {
    cursor: pointer;
    user-select: none;
    padding: 0.75rem 0;
    transition: opacity 0.2s;
}

.section-header.collapsible:hover {
    opacity: 0.8;
}

.collapse-icon {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.collapsible-section {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    max-height: 2000px;
}

.collapsible-section.collapsed {
    max-height: 0;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .dashboard-controls {
        margin: 1rem 0;
        padding: 0.75rem;
    }
    
    .grouping-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .grouping-selector select {
        width: 100%;
        min-width: auto;
    }
    
    .bill-group-header {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .report-month-selector {
        flex-direction: row;
        padding: 0.5rem;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .month-selector-input {
        flex: 1;
    }
    
    .report-month-selector label {
        display: none;
    }
    
    .report-month-selector input[type="month"] {
        width: 100%;
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    .month-nav-btn {
        padding: 0.375rem;
    }
    
    .bank-transfer-item {
        padding: 0.625rem 0.75rem;
    }
    
    .transfer-amount {
        font-size: 1rem;
    }
    
    .bank-transfer-info h4 {
        font-size: 0.875rem;
    }
    
    .bank-transfer-item.parent-account .transfer-amount {
        font-size: 1.125rem;
    }
    
    .report-total {
        padding: 1rem;
        font-size: 1rem;
    }
}

/* Logo Styles */
.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo-img {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Navigation Logo Styles */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-brand h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

/* Mobile Navigation Logo */
.mobile-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-nav-brand h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.mobile-nav-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

/* Settings Enhancements */
.settings-subsection {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.settings-subsection:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.settings-subsection h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.settings-subsection h5 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--danger);
    margin-bottom: 0.5rem;
}

.settings-description {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.toggle-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.toggle-label span {
    font-weight: 500;
}

.input-with-prefix {
    display: flex;
    align-items: center;
    position: relative;
}

.input-prefix {
    position: absolute;
    left: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-with-prefix input {
    padding-left: 2rem;
}

.export-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .export-options {
        flex-direction: row;
    }
}

.danger-zone {
    background-color: rgba(239, 68, 68, 0.05);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Loading State */
.loading-state {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-state.active {
    opacity: 1;
    visibility: visible;
}

.loading-logo {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    margin-bottom: 1rem;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: .8;
        transform: scale(0.95);
    }
}

/* Setup Wizard Styles */
#setupWizard {
    align-items: flex-start;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 1rem;
    padding-top: 1rem;
    background: var(--bg-primary);
}

#setupWizard.active {
    display: flex;
}

.setup-wizard-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

@media (min-width: 1024px) {
    .setup-wizard-container {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .setup-wizard-container {
        max-width: 100%;
        padding: 1.5rem;
        margin: 1rem;
    }
}

.wizard-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.wizard-header .logo-img {
    width: 40px;
    height: 40px;
    margin-bottom: 0.125rem;
}

.wizard-header h1 {
    font-size: 1.375rem;
    margin-bottom: 0;
    line-height: 1.2;
}

.wizard-header p {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin-top: 0.125rem;
}

/* Progress Steps */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    padding: 0 1rem;
}

.wizard-progress::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 2rem;
    right: 2rem;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    white-space: nowrap;
    line-height: 1;
}

.progress-step.active .step-number {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.progress-step.active .step-label {
    color: var(--text-primary);
    font-weight: 500;
}

/* Form hints */
.form-hint {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Wizard Steps - moved to Modern Form Styling section */

.wizard-step h2 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    margin-top: 0;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .wizard-step h2 {
        font-size: 1.25rem;
        margin-bottom: 0.375rem;
    }
}

.step-description {
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .step-description {
        font-size: 0.875rem;
        margin-bottom: 0.75rem;
    }
}

.wizard-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.wizard-buttons .btn {
    min-width: 140px;
}

/* MFA Setup */
.mfa-setup-loading {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-secondary);
}

.mfa-qr-container {
    text-align: center;
    margin-bottom: 1rem;
}

.mfa-qr-container img {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 1rem;
    background: white;
}

.mfa-secret-text {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.mfa-secret-text code {
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    color: var(--accent-primary);
}

/* Setup Wizard Form Styles */
.wizard-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.wizard-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
}

.wizard-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.wizard-header .step-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.5;
    max-width: 500px;
    margin: 0 auto;
}

/* Modern Form Styling for Setup Wizard */
.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    min-height: auto;
    padding: 0;
}

.wizard-step form {
    max-width: 450px;
    margin: 0 auto;
    width: 100%;
}

.wizard-step .form-group {
    margin-bottom: 0.75rem;
    text-align: left;
}

.wizard-step .form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
    font-size: 0.8125rem;
}

.wizard-step input,
.wizard-step select,
.wizard-step textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 16px;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.wizard-step input:focus,
.wizard-step select:focus,
.wizard-step textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.wizard-step input:hover,
.wizard-step select:hover,
.wizard-step textarea:hover {
    border-color: var(--gray-300);
    transform: translateY(-1px);
}

[data-theme="dark"] .wizard-step input,
[data-theme="dark"] .wizard-step select,
[data-theme="dark"] .wizard-step textarea {
    border-color: var(--gray-700);
    background: var(--gray-800);
}

[data-theme="dark"] .wizard-step input:hover,
[data-theme="dark"] .wizard-step select:hover,
[data-theme="dark"] .wizard-step textarea:hover {
    border-color: var(--gray-600);
}

.wizard-step .form-hint {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.375rem;
    line-height: 1.4;
}

.password-setup-form {
    max-width: 450px;
    margin: 0 auto;
}

.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    padding-right: 3rem;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

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

.password-toggle svg {
    width: 18px;
    height: 18px;
}

.password-strength {
    margin-top: 0.75rem;
}

.strength-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 25%;
    background: #ef4444;
}

.strength-fill.fair {
    width: 50%;
    background: #f59e0b;
}

.strength-fill.good {
    width: 75%;
    background: #10b981;
}

.strength-fill.strong {
    width: 100%;
    background: #22c55e;
}

.strength-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.password-requirements {
    margin-top: 0.75rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .password-requirements {
    background: var(--gray-800);
}

.requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.requirement:last-child {
    margin-bottom: 0;
}

.req-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    background: var(--gray-300);
    color: var(--gray-600);
    transition: all 0.2s ease;
}

.requirement.valid .req-icon {
    background: var(--success);
    color: white;
}

.requirement.valid .req-text {
    color: var(--success);
}

.password-match {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.match-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    background: var(--danger);
    color: white;
}

.password-match.valid .match-icon {
    background: var(--success);
}

.password-match.valid .match-text {
    color: var(--success);
}

.password-match:not(.valid) .match-text {
    color: var(--danger);
}

.security-notice {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--gray-50);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 0.5rem 0;
}

[data-theme="dark"] .security-notice {
    background: var(--gray-800);
}

.security-icon {
    color: var(--accent-primary);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.security-notice p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.3;
    margin: 0;
}

.wizard-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.wizard-buttons .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-weight: 500;
    border-radius: 12px;
    min-width: 140px;
    transition: all 0.2s ease;
}

.wizard-buttons .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wizard-buttons .btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wizard-buttons .btn svg {
    transition: transform 0.2s ease;
}

.wizard-buttons .btn:hover:not(:disabled) svg {
    transform: translateX(2px);
}

.wizard-buttons .btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
    border: 2px solid var(--gray-300);
}

.wizard-buttons .btn-secondary:hover:not(:disabled) {
    background: var(--gray-300);
    border-color: var(--gray-400);
}

[data-theme="dark"] .wizard-buttons .btn-secondary {
    background: var(--gray-700);
    color: var(--gray-300);
    border-color: var(--gray-600);
}

[data-theme="dark"] .wizard-buttons .btn-secondary:hover:not(:disabled) {
    background: var(--gray-600);
    border-color: var(--gray-500);
}

/* Theme Selector */
.theme-selector {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.theme-option {
    flex: 1;
    padding: 1.25rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    background: var(--bg-card);
    position: relative;
    overflow: hidden;
}

.theme-option:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-option input {
    display: none;
}

.theme-option span {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

[data-theme="dark"] .theme-option span {
    color: var(--gray-300);
}

.theme-option input:checked + span {
    color: white;
    font-weight: 700;
}

.theme-option:has(input:checked) {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    color: white;
}

.theme-option:has(input:checked) span {
    color: white;
}

/* Light theme specific styling */
.theme-option[data-theme="light"] {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

.theme-option[data-theme="dark"] {
    background: var(--gray-800);
    border-color: var(--gray-600);
    color: var(--gray-900);
}

.theme-option::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-primary);
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.theme-option:has(input:checked)::before {
    opacity: 1;
    transform: scale(1);
    background: white;
}

[data-theme="dark"] .theme-option {
    border-color: var(--gray-700);
    background: var(--gray-800);
}

/* Color Picker Grid */
.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

@media (min-width: 768px) {
    .color-picker-grid {
        gap: 1.25rem;
    }
}

@media (min-width: 1200px) {
    .color-picker-grid {
        grid-template-columns: repeat(6, 60px);
        max-width: none;
    }
}

.color-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: 3px solid transparent;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.color-option:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.color-option.selected {
    border-color: var(--bg-card);
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 0 0 3px var(--bg-card), 0 0 0 5px currentColor, 0 6px 20px rgba(0, 0, 0, 0.2);
}

.color-option::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.color-option.selected::after {
    opacity: 1;
}

/* Split Display for Setup Wizard */
.wizard-step .split-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

[data-theme="dark"] .wizard-step .split-display {
    background: var(--gray-800);
    border-color: var(--gray-700);
}

.wizard-step .split-display span {
    font-weight: 500;
    color: var(--text-secondary);
}

.wizard-step .split-display strong {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 1rem;
}

.color-option[data-color="blue"] { background: #2563eb; }
.color-option[data-color="purple"] { background: #7c3aed; }
.color-option[data-color="pink"] { background: #ec4899; }
.color-option[data-color="red"] { background: #ef4444; }
.color-option[data-color="orange"] { background: #f97316; }
.color-option[data-color="yellow"] { background: #eab308; }
.color-option[data-color="green"] { background: #22c55e; }
.color-option[data-color="teal"] { background: #14b8a6; }
.color-option[data-color="cyan"] { background: #06b6d4; }
.color-option[data-color="indigo"] { background: #6366f1; }
.color-option[data-color="gray"] { background: #6b7280; }
.color-option[data-color="black"] { background: #000000; }

/* Split Display */
.split-display {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.split-display span {
    font-size: 1.125rem;
}

.split-display strong {
    color: var(--accent-primary);
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .setup-wizard-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .wizard-progress {
        padding: 0;
    }
    
    .wizard-progress::before {
        left: 1rem;
        right: 1rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }
    
    .wizard-buttons {
        flex-direction: column;
    }
    
    .wizard-buttons .btn {
        width: 100%;
    }
    
    .color-picker-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}



/* Setup Bank Accounts */
.setup-bank-container {
    width: 100%;
    max-width: 1000px;
    margin: 0.5rem auto;
}

@media (min-width: 768px) {
    .setup-bank-container {
        margin: 0.75rem auto;
    }
}

#setupBankAccountsList {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    min-height: 60px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    #setupBankAccountsList {
        padding: 0.75rem;
        min-height: 80px;
    }
}

#setupBankAccountsList > p {
    text-align: center;
    margin: 2rem 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

@media (min-width: 768px) {
    #setupBankAccountsList > p {
        font-size: 1.125rem;
        margin: 3rem 0;
    }
}

.bank-account-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .bank-account-item {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
}

.bank-account-item:last-child {
    margin-bottom: 0;
}

.bank-account-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

[data-theme="dark"] .bank-account-item {
    background: var(--gray-800);
    border-color: var(--gray-700);
}

.bank-account-item.nested {
    margin-left: 2rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-style: dashed;
}

@media (min-width: 768px) {
    .bank-account-item.nested {
        margin-left: 3rem;
        padding: 1rem 1.25rem;
    }
}

[data-theme="dark"] .bank-account-item.nested {
    background: var(--gray-900);
}

/* Setup wizard specific bank account styling */
#setupBankAccountsList .bank-account-item {
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
}

#setupBankAccountsList .bank-account-item.sub-account {
    margin-bottom: 0;
}

#setupBankAccountsList .bank-account-group:has(.sub-accounts) > .bank-account-item:first-child {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.bank-account-info {
    flex: 1;
}

.bank-account-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .bank-account-name {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
}

.bank-account-type {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

@media (min-width: 768px) {
    .bank-account-type {
        font-size: 1rem;
    }
}

.bank-form-container {
    background: var(--bg-card);
    padding: 0.75rem;
    border-radius: 12px;
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .bank-form-container {
    background: var(--gray-800);
}

.bank-form-grid {
    display: grid;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .bank-form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .bank-form-container {
        padding: 1rem;
        margin-top: 0.75rem;
    }
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: flex-end;
}

@media (min-width: 768px) {
    .form-actions {
        gap: 0.75rem;
        margin-top: 0.75rem;
    }
}

.form-actions .btn {
    min-width: 100px;
}

@media (min-width: 768px) {
    .form-actions .btn {
        min-width: 140px;
        padding: 0.875rem 1.5rem;
        font-size: 1.125rem;
    }
}

#setupStep6 .form-group {
    margin-bottom: 1.5rem;
}

#setupStep6 .form-group:last-of-type {
    margin-bottom: 0;
}

#setupStep6 input,
#setupStep6 select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.2s;
}

@media (min-width: 768px) {
    #setupStep6 input,
    #setupStep6 select {
        padding: 1rem 1.25rem;
        font-size: 1.125rem;
    }
}

#setupStep6 input:focus,
#setupStep6 select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#setupStep6 label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    #setupStep6 label {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
}

/* Remove button styling improvements */
.bank-account-item .btn-danger {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 8px;
    transition: all 0.2s;
}

@media (min-width: 768px) {
    .bank-account-item .btn-danger {
        padding: 0.625rem 1.25rem;
        font-size: 1rem;
        border-radius: 10px;
    }
}

.bank-account-item .btn-danger:hover {
    transform: scale(1.05);
}

/* Add button improvements */
.setup-bank-container > .btn-secondary {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    border-radius: 12px;
    border: 2px dashed var(--border-color);
    background: transparent;
    transition: all 0.2s;
}

@media (min-width: 768px) {
    .setup-bank-container > .btn-secondary {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
}

.setup-bank-container > .btn-secondary:hover {
    border-style: solid;
    background: var(--bg-secondary);
}

/* Bank account group styling for setup */
.bank-account-group {
    margin-bottom: 1.5rem;
}

.bank-account-group:last-child {
    margin-bottom: 0;
}

/* Bank account display styling */
.bank-account-display {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bank-logo-placeholder {
    width: 40px;
    height: 40px;
    background: var(--gray-200);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-600);
    flex-shrink: 0;
}

[data-theme="dark"] .bank-logo-placeholder {
    background: var(--gray-700);
    color: var(--gray-300);
}

@media (min-width: 768px) {
    .bank-logo-placeholder {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
}

.bank-account-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.8125rem;
    margin-top: 0.125rem;
}

@media (min-width: 768px) {
    .bank-account-meta {
        font-size: 0.875rem;
        gap: 0.75rem;
    }
}

.bank-name {
    color: var(--text-secondary);
    font-weight: 500;
}

.bank-type {
    color: var(--text-secondary);
    background: var(--gray-100);
    padding: 0.125rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: capitalize;
}

[data-theme="dark"] .bank-type {
    background: var(--gray-800);
}

/* Sub accounts container */
.sub-accounts {
    background: var(--gray-50);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 0.75rem;
    margin-top: -12px;
}

[data-theme="dark"] .sub-accounts {
    background: var(--gray-900);
}

@media (min-width: 768px) {
    .sub-accounts {
        padding: 1rem;
    }
}

/* Sub account items */
.bank-account-item.sub-account {
    background: var(--bg-card);
    margin: 0.5rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--secondary);
    border-radius: 8px;
}

@media (min-width: 768px) {
    .bank-account-item.sub-account {
        margin: 0.75rem;
        padding: 1.25rem 1.5rem;
    }
}

.bank-account-item.sub-account:hover {
    transform: translateX(2px);
}

.bank-account-item.sub-account .bank-account-name {
    font-size: 0.9375rem;
}

@media (min-width: 768px) {
    .bank-account-item.sub-account .bank-account-name {
        font-size: 1.125rem;
    }
}

.bank-account-item.sub-account .bank-account-type {
    font-size: 0.8125rem;
    text-transform: capitalize;
}

@media (min-width: 768px) {
    .bank-account-item.sub-account .bank-account-type {
        font-size: 0.875rem;
    }
}

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

/* Compact styles for bank setup form */
#setupAddBankForm .form-group {
    margin-bottom: 0.5rem;
}

#setupAddBankForm .form-group label {
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
}

/* Make bank setup step more compact */
#setupStep6 h2 {
    margin-bottom: 0.125rem !important;
}

#setupStep6 .step-description {
    margin-bottom: 0.375rem !important;
}

/* Setup Warning Banner */
.setup-warning-banner {
    background: var(--warning-light);
    border-bottom: 1px solid var(--warning);
    padding: 0.75rem 1rem;
    position: relative;
    z-index: 100;
}

.setup-warning-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-right: 2.5rem; /* Space for dismiss button */
    position: relative;
}

.warning-icon {
    color: var(--warning);
    flex-shrink: 0;
}

.warning-message {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.warning-message strong {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.warning-message span {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.setup-warning-banner .btn {
    flex-shrink: 0;
}

.setup-warning-banner .btn-dismiss {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.setup-warning-banner .btn-dismiss:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

@media (max-width: 640px) {
    .setup-warning-content {
        flex-wrap: wrap;
        padding-right: 2rem;
    }
    
    .setup-warning-banner .btn:not(.btn-dismiss) {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .setup-warning-banner .btn-dismiss {
        right: 0;
        top: 0.5rem;
        transform: none;
    }
}

[data-theme="dark"] .setup-warning-banner {
    background: rgba(255, 193, 7, 0.1);
    border-bottom-color: rgba(255, 193, 7, 0.3);
}

/* Social Auth Buttons */
.social-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-social:hover {
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-apple {
    background: #000;
    color: #fff;
    border-color: #000;
}

.btn-apple:hover {
    background: #333;
    border-color: #333;
}

.btn-google {
    background: #fff;
    color: #3c4043;
    border: 1px solid #dadce0;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #dadce0;
}

.social-icon {
    width: 20px;
    height: 20px;
}

.auth-divider {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
}

.auth-divider span {
    background: var(--bg-primary);
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
    z-index: -1;
}

/* Account Type Selection */
.account-type-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.account-type-tab {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

@media (min-width: 768px) {
    .account-type-tab {
        padding: 1.25rem;
    }
}

.account-type-tab:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.account-type-tab.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.account-type-tab.active::after {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 20px;
    height: 20px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.75rem;
}

.tab-icon {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.account-type-tab h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.account-type-tab p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.setup-divider {
    margin: 2rem 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 640px) {
    .account-type-tabs {
        grid-template-columns: 1fr;
    }
    
    .account-type-tab {
        padding: 1.5rem;
    }
}

/* Split Method Options */
.split-method-options {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.split-method-option {
    display: block;
    cursor: pointer;
    position: relative;
}

.split-method-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.split-method-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.split-method-option input[type="radio"]:checked + .split-method-content {
    background: var(--primary-light);
    border-color: var(--primary);
}

.split-method-option:hover .split-method-content {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.split-method-icon {
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.split-method-details h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.split-method-details p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.custom-split-section {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.split-info-box {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.split-info-display {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.income-split-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.income-split-breakdown .split-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.split-details {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.split-percentage {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Split Method Buttons for Settings */
.split-method-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 0.75rem;
}

@media (min-width: 768px) {
    .split-method-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
        margin-top: 1rem;
    }
}

@media (min-width: 1200px) {
    .split-method-buttons {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

.split-method-btn {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

@media (min-width: 768px) {
    .split-method-btn {
        padding: 1rem;
        gap: 0.375rem;
    }
}

.split-method-btn:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.split-method-btn.active {
    background: var(--primary-light);
    border-color: var(--primary);
}

.split-method-btn .split-method-icon {
    font-size: 1.25rem;
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .split-method-btn .split-method-icon {
        font-size: 1.5rem;
        margin-bottom: 0.125rem;
    }
}

.split-method-btn h4 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.split-method-btn p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

/* Dark mode adjustments */
[data-theme="dark"] .split-method-content {
    background: var(--gray-800);
}

[data-theme="dark"] .split-method-option input[type="radio"]:checked + .split-method-content {
    background: rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .split-method-btn {
    background: var(--bg-card);
}

[data-theme="dark"] .split-method-btn.active {
    background: rgba(37, 99, 235, 0.2);
}

/* Mobile responsive */
@media (max-width: 640px) {
    .split-method-content {
        padding: 0.875rem;
    }
    
    .split-method-icon {
        font-size: 1.5rem;
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .split-method-details h4 {
        font-size: 0.9375rem;
    }
    
    .split-method-details p {
        font-size: 0.8125rem;
    }
    
    .split-method-buttons {
        grid-template-columns: 1fr;
    }
    
    .split-method-btn {
        padding: 1rem;
    }
    
    .split-method-btn .split-method-icon {
        font-size: 1.5rem;
    }
    
    .split-method-btn h4 {
        font-size: 0.875rem;
    }
    
    .split-method-btn p {
        font-size: 0.75rem;
    }
}

/* Notification Styles */
.notification-bell {
    position: relative;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--error);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.mobile-nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notifications-dropdown {
    position: fixed;
    top: 60px;
    right: 1rem;
    width: 360px;
    max-width: calc(100vw - 2rem);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 480px;
    display: flex;
    flex-direction: column;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.notifications-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.close-notifications {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.close-notifications:hover {
    background: var(--gray-100);
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.notification-item {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.notification-item:hover {
    background: var(--gray-100);
}

.notification-item.unread {
    background: var(--primary-light);
    border-color: var(--primary);
}

.notification-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .notifications-dropdown {
        top: 50px;
        right: 0.5rem;
        width: calc(100vw - 1rem);
    }
}

/* Partner Management Styles */
.partner-tabs {
    margin-top: 1.5rem;
}

.partner-tab-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.partner-tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.partner-tab-btn:hover {
    color: var(--text-primary);
}

.partner-tab-btn.active {
    color: var(--primary);
}

.partner-tab-btn.active::after {
    content: "";
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.partner-tab-content {
    display: none;
}

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

/* Pairing options layout */
.pairing-options {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: start;
    margin-top: 1rem;
}

.pairing-option {
    text-align: center;
}

.pairing-option h4 {
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
}

.pairing-option p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0 0 1rem 0;
}

.divider-vertical {
    width: 1px;
    background: var(--border-color);
    align-self: stretch;
    margin: 0 1rem;
}

/* Code display box */
.code-display-box {
    background: var(--gray-100);
    border: 2px dashed var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    margin: 1rem 0;
}

/* Form inputs in invitation sections */
.invitation-form-section input[type="email"],
.invitation-form-section input[type="text"],
.invitation-form-section .form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: border-color 0.2s;
    margin-bottom: 0;
}

.invitation-form-section input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* Pairing code input specific styling */
.pairing-code-input {
    text-align: center !important;
    font-size: 1.5rem !important;
    letter-spacing: 0.5rem !important;
    font-weight: 600 !important;
    font-family: monospace !important;
}

.code-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: var(--primary);
    font-family: "SF Mono", "Monaco", "Inconsolata", "Fira Code", monospace;
}

.code-timer {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.invitations-section {
    margin-bottom: 2rem;
}

.invitations-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.invitations-list {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
}

.invitation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.invitation-item:last-child {
    border-bottom: none;
}

.invitation-info {
    flex: 1;
}

.invitation-email {
    font-weight: 500;
    color: var(--text-primary);
}

.invitation-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.invitation-actions {
    display: flex;
    gap: 0.5rem;
}

.invitation-actions .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

.partner-info-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.partner-info-box h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.partner-details {
    margin-bottom: 1.5rem;
}

.partner-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.partner-email {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.partner-since {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
    margin: 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .pairing-options {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .divider-vertical {
        width: 100%;
        height: 1px;
        margin: 1rem 0;
    }
    .partner-tab-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .partner-tab-nav::-webkit-scrollbar {
        display: none;
    }
    
    .code-value {
        font-size: 1.5rem;
    }
}

/* Invitation method cards */
.invitation-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

.invitation-method-btn {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    color: var(--text-primary);
}

.invitation-method-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.invitation-method-btn.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.invitation-method-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.invitation-method-btn h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.invitation-method-btn p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

/* Invitation status card */
.invitation-status-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.invitation-status-card h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.status-details {
    margin: 1rem 0;
}

.status-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.status-label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.status-value {
    color: var(--text-primary);
    font-size: 0.875rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #FFF3CD;
    color: #856404;
}

.status-badge.accepted {
    background: #D4EDDA;
    color: #155724;
}

.status-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Form select styling */
.form-select {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

/* Progressive reveal */
.couple-settings-connected {
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Invitation form sections */
.invitation-form-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.invitation-form-section .form-group {
    margin-bottom: 1rem;
}

.invitation-form-section .form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Input with inline buttons */
.input-with-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.input-with-buttons input {
    flex: 1;
}

.input-with-buttons .btn {
    white-space: nowrap;
}

/* Make code display same size as input */
.code-display-input-size {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 0.875rem;
    margin-bottom: 1rem;
    text-align: center;
}

.code-display-input-size .code-value {
    font-size: 1.5rem;
    margin: 0;
    text-align: center;
    width: 100%;
    padding-left: 0.125em; /* Compensate for letter-spacing to center properly */
}

.code-timer {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.25rem;
}

/* Mobile adjustments for invitation options */
@media (max-width: 768px) {
    .invitation-options {
        grid-template-columns: 1fr;
    }
    
    .status-actions {
        flex-direction: column;
    }
    
    .status-actions .btn {
        width: 100%;
    }
    
    .invitation-form-section .form-actions {
        flex-direction: column;
    }
    
    .invitation-form-section .form-actions .btn {
        width: 100%;
    }
    
    .input-with-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .input-with-buttons input,
    .input-with-buttons .btn {
        width: 100%;
    }
}

/* Placeholder content styling */
.placeholder-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem;
}

.placeholder-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 4px 6px -1px var(--shadow-color);
}

.placeholder-card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.placeholder-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.placeholder-card ul {
    text-align: left;
    margin: 1.5rem 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.placeholder-card li {
    margin-bottom: 0.5rem;
}

.placeholder-card .btn {
    margin-top: 1.5rem;
}
