html, body { 
    height: 100%; 
    overflow: hidden; 
    -webkit-tap-highlight-color: transparent; 
    
    /* Prevent text selection across the app */
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

/* Allow text selection inside inputs and textareas */
input, textarea {
    user-select: text !important;
    -webkit-user-select: text !important;
}


#app-view { 
    height: 100%; 
    display: flex; 
    flex-direction: column; 
}

.view-content { 
    padding-bottom: 120px; 
} 

.no-scrollbar::-webkit-scrollbar { 
    display: none; 
}

/* Safe area padding for mobile notch and navigation pill */
.pb-safe {
    padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
}

/* Glassmorphism */
.glass { 
    background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(12px); 
    border-bottom: 1px solid rgba(0,0,0,0.05); 
}

.dark .glass { 
    background: rgba(15, 23, 42, 0.85); 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}

/* PRIVACY BLUR LOGIC */
body.privacy-active .sensitive-data {
    filter: blur(8px);
    transition: filter 0.3s ease;
    user-select: none;
}

/* Calendar Styles */
.calendar-day { 
    aspect-ratio: 1; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 12px; 
    font-size: 12px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.2s; 
}

.calendar-day:hover { background-color: #f3f4f6; }
.dark .calendar-day:hover { background-color: #334155; }

.calendar-day.active { 
    background-color: #6366f1; 
    color: white; 
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4); 
}

.calendar-day.today { 
    border: 2px solid #6366f1; 
    color: #6366f1; 
}

/* FIXED: Icons Dark Mode Visibility */
.cat-icon-box { 
    position: relative; 
    z-index: 1; 
    overflow: hidden; 
    transition: all 0.3s; 
}

.dark .cat-icon-box { 
    border: 1px solid rgba(255,255,255,0.2); 
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15); 
    background-color: #1e293b !important; /* Force dark card bg */
    color: #e2e8f0 !important; /* Force light icon */
}

/* Toggle Switch */
.toggle-checkbox:checked { 
    right: 0; 
    border-color: #6366f1; 
}
.toggle-checkbox:checked + .toggle-label { 
    background-color: #6366f1; 
}

/* Toast Animation */
#toast-notification { 
    transform: translateY(-150%); 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
#toast-notification.show { 
    transform: translateY(20px); 
}

/* Pro Badge Shine Animation */
.pro-shine { 
    position: relative; 
    overflow: hidden; 
}
.pro-shine::after { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: -100%; 
    width: 100%; 
    height: 100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); 
    animation: shine 3s infinite; 
}

@keyframes shine { 
    100% { left: 100%; } 
}

/* Loading Screen Animation Helpers */
.crown-float {
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}


/* --- BUDGET EXPAND ANIMATION --- */
.budget-split-view {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.budget-split-view.open {
    max-height: 200px; /* Enough space for 2 rows */
    opacity: 1;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(0,0,0,0.1);
}

.dark .budget-split-view.open {
    border-top: 1px dashed rgba(255,255,255,0.1);
}

.chevron-icon {
    transition: transform 0.3s ease;
}

.chevron-icon.rotate {
    transform: rotate(180deg);
}



/* --- AI INSIGHTS BUTTON & MODAL --- */

/* 1. Magic Button Animation */
.ai-btn-gradient {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    background-size: 200% 200%;
    animation: gradientMove 3s ease infinite;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
}

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

.ai-btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine 3s infinite;
}

/* 2. AI Modal Styling */
.ai-card {
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent),
                white;
    border: 1px solid rgba(99, 102, 241, 0.1);
}
.dark .ai-card {
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent),
                #1e293b;
    border: 1px solid rgba(255,255,255,0.05);
}

/* 3. Blur Effect for Non-Pro Users */
.blur-content {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
    z-index: 10;
    border-radius: 1rem;
}
.dark .lock-overlay {
    background: rgba(15, 23, 42, 0.7);
}


/* --- CALENDAR ANIMATIONS (Paste at bottom of style.css) --- */

/* Slide Out to Left (When clicking Next) */
.slide-out-left {
    animation: slideOutLeft 0.2s forwards ease-in;
}

/* Slide In from Right (When clicking Next) */
.slide-in-right {
    animation: slideInRight 0.2s forwards ease-out;
}

/* Slide Out to Right (When clicking Prev) */
.slide-out-right {
    animation: slideOutRight 0.2s forwards ease-in;
}

/* Slide In from Left (When clicking Prev) */
.slide-in-left {
    animation: slideInLeft 0.2s forwards ease-out;
}

@keyframes slideOutLeft {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(-20px); opacity: 0; }
}

@keyframes slideInRight {
    0% { transform: translateX(20px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(20px); opacity: 0; }
}

@keyframes slideInLeft {
    0% { transform: translateX(-20px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}


/* Prediction Chart Container */
.prediction-chart-container {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.05) 0%, transparent 100%);
    border-radius: 24px;
    padding: 15px;
    margin-top: 15px;
}

/* Plan Cards Pulse */
.plan-card-active {
    border: 2px solid #6366f1 !important;
    background-color: rgba(99, 102, 241, 0.05);
}

.benefit-tag {
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 800;
    text-transform: uppercase;
}




/* style.css (Bottom) */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
}

.animate-stagger {
    animation: staggerFadeUp 0.5s forwards cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes staggerFadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Tooltip Styling */
#chartjs-tooltip {
    background: rgba(0, 0, 0, 0.8) !important;
    border-radius: 8px !important;
    color: white !important;
    font-size: 10px !important;
    padding: 4px 8px !important;
    font-weight: bold;
}

/* Pulse Card Glow Effect */
#pulse-icon.fa-arrow-trend-up {
    filter: drop-shadow(0 0 5px rgba(244, 63, 94, 0.5)); /* Red Glow for High Spend */
}

#pulse-icon.fa-shield-heart {
    filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.5)); /* Green Glow for Safe */
}

/* Modal Quote Background Animation */
.bg-gradient-to-r {
    background-size: 200% 200%;
    animation: gradientMove 5s ease infinite;
}

/* Neon Glow for Pulse Dot */
.neon-dot-green {
    background-color: #10b981; /* Emerald 500 */
    box-shadow: 0 0 10px #10b981;
}

.neon-dot-red {
    background-color: #f43f5e; /* Rose 500 */
    box-shadow: 0 0 10px #f43f5e;
}

.neon-dot-gray {
    background-color: #9ca3af;
    box-shadow: 0 0 5px #9ca3af;
}

/* --- REFERRAL CARD PREMIUM STYLES --- */

/* 1. Animated Gradient Background */
#referral-stats-card {
    background-size: 200% 200%;
    animation: gradientMove 6s ease infinite;
}

/* 2. Shine Effect on Hover */
#referral-stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%; /* Start outside left */
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent
    );
    transition: none; /* Reset for animation loop */
}

#referral-stats-card:hover::before {
    left: 100%; /* Move to right */
    transition: left 0.7s ease-in-out;
}

/* 3. Glass Badge for Expiry Date */
#referral-stats-card .backdrop-blur-md {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 4. Onboarding Input Focus Glow (Name & Referral Code) */
#ob-name:focus, #ob-ref-code:focus {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2); /* Soft Indigo Glow */
    transform: translateY(-2px);
}

/* Duplicate #referral-stats-card block removed — see above (line ~386) */

/* 3. Glass Badge */
.glass-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
}

/* --- SQUAD DASHBOARD STYLES --- */
.status-badge {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-pending { background: rgba(156, 163, 175, 0.2); color: #9ca3af; } /* Gray */
.status-ongoing { background: rgba(245, 158, 11, 0.2); color: #fbbf24; } /* Orange */
.status-completed { background: rgba(16, 185, 129, 0.2); color: #34d399; } /* Green */

.pro-progress-bar {
    transition: width 1s ease-in-out;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Premium Page Animations */
/* Note: .crown-float already defined above (line ~133) */

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

@keyframes pulseSlow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Smooth Card Transitions */
.plan-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}




/* Legal Content Styles */
#legal-content ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 10px;
}

#legal-content li {
    margin-bottom: 8px;
}

#legal-content h4 {
    font-weight: 800;
    color: #1e293b; /* slate-800 */
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 16px;
}

.dark #legal-content h4 {
    color: #fff;
}

/* --- NEW CLEAN THEME & ANIMATIONS --- */

/* 1. Background - Matches Loading Page (Clean) */
body {
    background-color: #ffffff; /* Pure White */
    color: #1e1b4b; /* Dark Indigo Text */
}

/* 2. Floating 3D Image Animation */
@keyframes floatImg {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}
.animate-float {
    animation: floatImg 4s ease-in-out infinite;
}

/* 3. Smooth Bottom Sheet Animation */
#login-sheet {
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1); /* Smooth easing transition without bounce */
    will-change: transform;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1); /* Soft shadow */
}

/* 4. Modern Button (Indigo Gradient) */
.primary-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    transition: all 0.3s ease;
}
.primary-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.3);
}

/* Header Compact Mode (Logo moves up smoothly) */
.header-compact {
    transform: translateY(-5px) scale(0.85);
    transition: transform 0.3s ease;
}

/* 3. Updated Glass Button (To pop on Indigo) */
.glass-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.glass-btn:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.98);
}

/* Modal Pop Animation */
@keyframes modalPop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.animate-modal-pop {
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* --- PRO CARD ACCORDION ANIMATION --- */
.pro-card-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pro-card-content.expanded {
    max-height: 500px; /* Enough space for friends list */
    opacity: 1;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

.pro-chevron {
    transition: transform 0.3s ease;
}

.pro-chevron.rotate {
    transform: rotate(180deg);
}

/* ==========================================
   🚀 IMPORT BACKUP PAGE PREMIUM STYLES
   ========================================== */

/* 1. Drag & Drop Zone Animation */
.upload-zone {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, transparent, rgba(99, 102, 241, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.upload-zone:hover::before {
    transform: translateX(100%);
}

/* When User Drags a File Over It */
.upload-zone.dragover {
    border-color: #6366f1 !important; /* Primary Color */
    background-color: rgba(99, 102, 241, 0.1) !important;
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
}

/* 2. Success Tick Pop Animation */
.success-tick-glow {
    position: relative;
    box-shadow: 0 0 50px rgba(16, 185, 129, 0.4); /* Emerald Glow */
    animation: successPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.success-tick-glow::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid #10b981;
    animation: rippleRing 1.5s infinite ease-out;
}

@keyframes successPop {
    0% { transform: scale(0.3) rotate(-15deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes rippleRing {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* 3. Stage Transitions */
.stage-enter {
    animation: fadeSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* ===== LOGOUT MODAL FIX =====
   Tailwind hidden = display:none !important
   /* இதை override பண்ண .show class use பண்றோம் */
#logoutModal.show {
    display: flex !important;
}


/* ================================================
   🖥️  DESKTOP RESPONSIVE LAYOUT
   Tablets & Laptops (768px+)
   ================================================ */

@media (min-width: 768px) {

  /* ── APP VIEW: Remove phone width constraint ── */
  #app-view {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-shadow: none !important;
  }

  /* ── HEADER: Offset from sidebar ── */
  #app-view > header {
    margin-left: 240px;
    width: calc(100% - 240px);
    padding: 18px 40px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
  }

  .dark #app-view > header {
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }

  /* ── MAIN CONTENT: Sidebar offset + centered content ── */
  #main-content {
    margin-left: 240px !important;
    width: calc(100% - 240px) !important;
    padding: 36px 5vw !important;
    max-height: calc(100vh - 74px);
    overflow-y: auto;
    box-sizing: border-box;
  }

  /* Views: comfortable reading width, centered */
  .view-content {
    max-width: 820px;
    margin: 0 auto;
    padding-bottom: 60px;
  }

  /* =============================================
     SIDEBAR NAVIGATION (was bottom nav on mobile)
     ============================================= */

  nav.glass.fixed {
    /* Position: left sidebar */
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    right: auto !important;
    width: 240px !important;
    max-width: 240px !important;
    height: 100vh !important;

    /* Style */
    border-right: 1px solid rgba(0,0,0,0.06) !important;
    border-top: none !important;
    box-shadow: 2px 0 24px rgba(0,0,0,0.04) !important;
    background: rgba(255,255,255,0.98) !important;
    backdrop-filter: blur(20px) !important;

    /* Layout */
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    overflow: hidden;
    z-index: 40 !important;
  }

  .dark nav.glass.fixed {
    background: rgba(15,23,42,0.98) !important;
    border-right-color: rgba(255,255,255,0.05) !important;
    box-shadow: 2px 0 24px rgba(0,0,0,0.2) !important;
  }

  /* Sidebar brand logo (hidden on mobile, flex on desktop) */
  #sidebar-brand {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 28px 20px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    margin-bottom: 8px;
    flex-shrink: 0;
  }

  .dark #sidebar-brand {
    border-bottom-color: rgba(255,255,255,0.04);
  }

  /* Nav items container: vertical list */
  #nav-items {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    flex: 1;
    padding: 8px 12px 24px;
    gap: 2px;
    align-items: stretch !important;
    justify-content: flex-start !important;
    overflow: hidden;
  }

  /* Nav buttons: horizontal layout with text label */
  .nav-btn {
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100% !important;
    height: 46px !important;
    border-radius: 13px !important;
    padding: 0 14px !important;
    gap: 13px !important;
    margin-bottom: 1px;
    transition: background 0.15s ease, color 0.15s ease !important;
    color: #6b7280;
  }

  .dark .nav-btn {
    color: #9ca3af;
  }

  .nav-btn:hover {
    background: rgba(99,102,241,0.07) !important;
    color: #6366f1 !important;
  }

  .nav-btn i {
    font-size: 15px !important;
    width: 18px !important;
    text-align: center !important;
    margin-bottom: 0 !important;
    flex-shrink: 0;
  }

  /* Labels injected via JS — no CSS ::after needed */

  /* Active state */
  .nav-btn.active {
    background: rgba(99,102,241,0.1) !important;
    color: #6366f1 !important;
  }

  .nav-btn.active i {
    color: #6366f1 !important;
  }

  .nav-btn.active[data-target="premium"] i {
    color: #f59e0b !important;
  }

  .nav-btn.active[data-target="premium"] {
    background: rgba(245,158,11,0.1) !important;
    color: #f59e0b !important;
  }

  /* ── "Add Expense" center button → sidebar item ── */
  #nav-add-wrap {
    position: static !important;
    top: auto !important;
    margin: 8px 0 !important;
    order: 2; /* After analytics button */
  }

  #nav-add-btn {
    width: 100% !important;
    height: 46px !important;
    border-radius: 13px !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 14px !important;
    gap: 13px !important;
    font-size: 15px !important;
    box-shadow: none !important;
    background: rgba(99,102,241,0.12) !important;
    color: #6366f1 !important;
    transition: background 0.15s ease !important;
    transform: none !important;
  }

  #nav-add-btn:hover {
    background: rgba(99,102,241,0.2) !important;
    transform: none !important;
  }

  #nav-add-btn i {
    font-size: 15px !important;
    width: 18px !important;
    text-align: center !important;
    flex-shrink: 0;
  }

  /* Add Expense label injected via JS */

  /* Force hide original floating + button on desktop */
  #nav-add-btn { display: none !important; }
  #nav-add-wrap { position: static !important; top: auto !important; margin: 4px 0; }

  /* =============================================
     AUTH VIEW: Two-panel desktop layout
     Left: Branding + Hero | Right: Login Form
     ============================================= */

  #auth-view {
    flex-direction: row !important;
  }

  /* Left panel: brand + hero on gradient bg */
  #splash-content {
    flex: 1 !important;
    background: linear-gradient(150deg, #3730a3 0%, #4f46e5 40%, #7c3aed 100%) !important;
    padding: 48px 40px !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative;
    overflow: hidden;
  }

  #splash-content::before {
    content: '';
    position: absolute;
    top: -30%; right: -20%;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
  }

  #splash-content::after {
    content: '';
    position: absolute;
    bottom: -20%; left: -10%;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
  }

  /* Wordmark → white on indigo bg */
  #splash-content #brand-container {
    z-index: 2;
    position: relative;
  }

  #splash-content #brand-container img {
    filter: brightness(0) invert(1) !important;
    height: 48px !important;
  }

  /* Hero image */
  #splash-content #hero-image {
    flex: 1 !important;
    max-width: 360px;
    width: 100%;
    z-index: 2;
    position: relative;
  }

  /* Hide "Get Started" CTA — login always visible on desktop */
  #splash-content #action-area {
    display: none !important;
  }

  /* Right panel: Login form — always visible, no bottom sheet animation */
  #login-sheet {
    position: static !important;
    transform: translateY(0) !important;
    width: 420px !important;
    max-width: 420px !important;
    min-width: 420px !important;
    height: 100% !important;
    min-height: 100vh;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 60px 48px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    overflow-y: auto;
    border-left: 1px solid #f1f5f9 !important;
  }

  .dark #login-sheet {
    background: #0f172a !important;
    border-left-color: rgba(255,255,255,0.06) !important;
  }

  /* Hide sheet handle (drag pill) */
  #login-sheet > div:first-child {
    display: none !important;
  }

  /* Hide dark overlay (no bottom sheet on desktop) */
  #sheet-overlay {
    display: none !important;
  }

  /* Bigger heading in login panel */
  #login-sheet h2 {
    font-size: 28px !important;
    margin-bottom: 8px;
  }

  /* TracEm logo at top of login panel on desktop */
  #login-sheet::before {
    content: '';
    display: block;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: url('/assets/images/icon-512.png') center/cover;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(99,102,241,0.2);
  }

  /* =============================================
     MODALS: Better centered on desktop
     (most already have md: classes in HTML)
     ============================================= */

  /* Onboarding + referral screens: centered card on desktop */
  #onboarding-modal,
  #referral-source-screen {
    background: rgba(0,0,0,0.5) !important;
    backdrop-filter: blur(8px);
  }

  #onboarding-modal > div,
  #referral-source-screen > div {
    background: white;
    max-width: 520px;
    margin: auto;
    border-radius: 32px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.15);
    min-height: auto;
    padding: 48px !important;
    max-height: 90vh;
    overflow-y: auto;
  }

  .dark #onboarding-modal > div,
  .dark #referral-source-screen > div {
    background: #1e293b;
  }

  /* Export modal - centered on desktop */
  #export-modal > div:last-child {
    bottom: auto !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
    border-radius: 28px !important;
    max-width: 440px !important;
    width: 90% !important;
    animation: none !important;
  }

}

/* ── Large desktop: more breathing room ── */
@media (min-width: 1280px) {
  #main-content {
    padding: 40px 8vw !important;
  }

  .view-content {
    max-width: 920px;
  }

  #login-sheet {
    width: 480px !important;
    max-width: 480px !important;
    min-width: 480px !important;
    padding: 60px 56px !important;
  }

  nav.glass.fixed {
    width: 260px !important;
    max-width: 260px !important;
  }

  #app-view > header {
    margin-left: 260px;
    width: calc(100% - 260px);
  }

  #main-content {
    margin-left: 260px !important;
    width: calc(100% - 260px) !important;
  }
}
