/* ==========================================================================
   1. CORE VARIABLES & THEMES
   ========================================================================== */
:root {
    /* Main Brand Colors */
    --color-primary: #2563eb;
    --color-primary-rgb: 37, 99, 235;
    --color-primary-hover: #1d4ed8;
    --color-emerald: #059669;

    /* ── Light Mode (Default) ──
       Palette: #FBFBFB / #E8F9FF / #C4D9FF / #C5BAFF
    */
    --bg-primary:   #FBFBFB;        /* page background — barely off-white */
    --bg-secondary: #E8F9FF;        /* cards, panels — soft sky blue */
    --bg-tertiary:  #C4D9FF;        /* inset areas, hover states — periwinkle */
    --bg-input:     #ffffff;        /* inputs stay pure white for clarity */
    --bg-accent:    #C5BAFF;        /* purple accent — active states, highlights */

    --text-primary:   #0d1117;      /* near-black — high contrast */
    --text-secondary: #374151;      /* dark gray — readable secondary text */
    --text-tertiary:  #6b7280;      /* placeholder, hint text */

    --border-color:     #C4D9FF;    /* periwinkle borders — matches the palette */
    --border-color-rgb: 196, 217, 255;
    --border-subtle:    #dbeafe;    /* fine dividers */

    --shadow-sm: 0 1px 4px rgba(100,130,255,0.10), 0 1px 2px rgba(100,130,255,0.06);
    --shadow-md: 0 4px 16px rgba(100,130,255,0.12), 0 2px 6px rgba(100,130,255,0.06);

    --header-bg: rgba(251,251,251,0.92);

    /* UI Specs */
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #080c14;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
    --border-color-rgb: 51, 65, 85;
    --header-bg: rgba(8,12,20,0.85);
}



/* ==========================================================================
   2. GLOBAL LAYOUT
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Light mode body — subtle texture so it doesn't look like a blank page */
:root:not([data-theme="dark"]) body {
    background-image: radial-gradient(circle at 1px 1px, rgba(100,130,255,0.07) 1px, transparent 0);
    background-size: 28px 28px;
}

/* Light mode header */
:root:not([data-theme="dark"]) {
    --header-bg: rgba(251,251,251,0.94);
}
:root:not([data-theme="dark"]) .header {
    box-shadow: 0 1px 0 var(--border-color), var(--shadow-sm);
}
/* Light mode nav links */
:root:not([data-theme="dark"]) .nav-link {
    color: var(--text-secondary) !important;
}
:root:not([data-theme="dark"]) .nav-link:hover,
:root:not([data-theme="dark"]) .nav-link.active {
    color: var(--color-primary) !important;
    background: rgba(37,99,235,0.08) !important;
}

/* LIGHT MODE — card depth and input clarity */
:root:not([data-theme="dark"]) .card,
:root:not([data-theme="dark"]) .stat-card,
:root:not([data-theme="dark"]) .asset-card {
    box-shadow: var(--shadow-sm);
}
:root:not([data-theme="dark"]) input,
:root:not([data-theme="dark"]) select,
:root:not([data-theme="dark"]) textarea {
    background: var(--bg-input) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}
:root:not([data-theme="dark"]) input::placeholder {
    color: var(--text-tertiary) !important;
}
:root:not([data-theme="dark"]) input:focus,
:root:not([data-theme="dark"]) select:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12) !important;
    outline: none;
}

/* DARK MODE ONLY - Apply the Image */
[data-theme="dark"] body {
    background: linear-gradient(rgba(8, 12, 20, 0.2), rgba(8, 12, 20, 0.2)), 
                url('../img/dark_bg.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-color: #080c14; 
}

/* ==========================================================================
   2.1 HEADER
   ========================================================================== */

.header {
    height: 72px;
    background-color: var(--header-bg, rgba(8,12,20,0.85));
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

#app-content { 
    background: linear-gradient(
    135deg, 
    var(--bg-tertiary) 0%, 
    rgba(59, 130, 246, 0.08) 100%
);
border: 1px solid rgba(59, 130, 246, 0.2);
    min-height: calc(100vh - 72px); 
    padding: 2rem 0; 
}

/* --- Search Section --- */

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    overflow: visible !important;
}

#global-asset-search {
    width: 100%;
    padding: 10px 44px 10px 18px;
    font-size: 0.95rem;
    border-radius: 12px;
    background: var(--bg-input, var(--bg-secondary));
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    transition: all var(--transition);
    box-shadow: var(--shadow-sm, none);
}

#global-asset-search:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--bg-input, var(--bg-secondary));
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.15);
}

#global-asset-search::placeholder {
    color: var(--text-tertiary, var(--text-secondary));
    opacity: 1;
}

[data-theme="dark"] #global-asset-search {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
}
[data-theme="dark"] #global-asset-search:focus {
    background: rgba(255,255,255,0.09);
    border-color: var(--color-primary);
}

.search-icon-wrapper {
    position: absolute;
    left: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    pointer-events: none;
    z-index: 2;
}

.search-icon-container {
    position: absolute;
    right: 14px;
    display: flex;
    align-items: center;
    color: #94a3b8;
    pointer-events: none;
    z-index: 2;
}

.search-input-wrapper:focus-within .search-icon-wrapper {
    color: #38bdf8;
}

/* --- Search Dropdown --- */

.selector-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-secondary); 
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
}

#selector-dropdown {
    /* Vue v-if controls visibility — element only exists when showDropdown=true */
    display: block;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    z-index: 10000;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.selector-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #334155;
    transition: background 0.2s;
}

.selector-item:last-child { border-bottom: none; }
.selector-item:hover { background: #334155; }

.symbol-pill {
    background: #38bdf8;
    color: #0f172a;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.75rem;
}

.name-label {
    color: #cbd5e1;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Buttons & Launcher --- */

#loginBtn {
    position: relative;
    padding: 0 24px 0 18px;
    height: 38px;
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 50%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    letter-spacing: 0.01em;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    box-shadow: 0 2px 8px rgba(37,99,235,0.35);
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}

#loginBtn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    transition: left 0.4s ease;
}

#loginBtn:hover {
    background: linear-gradient(135deg, #93c5fd 0%, #3b82f6 50%, #8b5cf6 100%);
    box-shadow: 0 4px 20px rgba(37,99,235,0.5);
    transform: translateY(-1px);
}

#loginBtn:hover::before { left: 140%; }
#loginBtn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(37,99,235,0.35); }

.app-launcher {
    position: relative;
    display: flex;
    align-items: center;
}

.nine-dot-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: 12px;
    color: #94a3b8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

[data-theme="dark"] .nine-dot-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}

:root:not([data-theme="dark"]) .nine-dot-btn:hover {
    background: rgba(0,0,0,0.07);
    color: #1e293b;
}

/* --- Launcher Dropdown --- */

.launcher-dropdown {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    width: 240px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 1000;
}

[data-theme="dark"] .launcher-dropdown { box-shadow: 0 10px 25px rgba(0,0,0,0.5); }

.launcher-dropdown.active {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.launcher-dropdown a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.launcher-dropdown a:hover { background: var(--bg-tertiary); }
.launcher-dropdown hr { border: 0; border-top: 1px solid var(--border-color); margin: 8px 0; }
.launcher-dropdown p { color: var(--text-secondary); font-size: 0.8rem; padding: 0 12px; margin: 4px 0; }

/* END OF HEADER */

/* ==========================================================================
   2.2 HEADER — AVATAR & USER DROPDOWN
   ========================================================================== */

.header-avatar-wrap          { position: relative; }
.avatar-btn                  { width:36px; height:36px; border-radius:50%; border:2px solid var(--border-color); overflow:hidden; cursor:pointer; padding:0; background:none; display:flex; align-items:center; justify-content:center; transition:border-color .2s; }
.avatar-btn:hover            { border-color: #3b82f6; }
.avatar-img                  { width:100%; height:100%; object-fit:cover; }
.avatar-initial              { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:white; font-weight:700; font-size:0.875rem; }

.user-dropdown               { position:absolute; top:calc(100% + 10px); right:0; background:var(--bg-secondary); border:1px solid var(--border-color); border-radius:12px; padding:0.5rem; min-width:200px; box-shadow:0 8px 32px rgba(0,0,0,0.4); z-index:1000; }
.user-dropdown-info          { padding:0.75rem 1rem 0.5rem; border-bottom:1px solid var(--border-color); margin-bottom:0.25rem; }
.user-dropdown-name          { font-weight:700; font-size:0.875rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-dropdown-email         { font-size:0.72rem; color:var(--text-secondary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-dropdown-btn           { width:100%; text-align:left; padding:9px 1rem; border:none; background:none; color:var(--text-primary); cursor:pointer; border-radius:8px; font-family:inherit; font-size:0.875rem; display:flex; align-items:center; gap:8px; transition:background 0.15s; }
.user-dropdown-btn:hover     { background: var(--bg-primary); }
.user-dropdown-btn--danger   { color: #ef4444; }
.user-dropdown-btn--danger:hover { background: rgba(239,68,68,0.08); }

.search-result-type          { color:#00ff88; font-size:10px; float:right; border:1px solid; padding:1px 4px; }

/* ==========================================================================
   2.3 MARKET PAGE — PULSE & CHANGE COLORS
   ========================================================================== */
.pulse-price--up   { color: #10b981; }
.pulse-price--down { color: #ef4444; }
.asset-change.up   { color: #10b981; }
.asset-change.down { color: #ef4444; }
.wl-change         { margin-left: 4px; }
.wl-change--up     { color: #10b981; }
.wl-change--down   { color: #ef4444; }

/* ==========================================================================
   2.4 SETTINGS PAGE — MISC CLASSES
   ========================================================================== */
.settings-nav-item--danger { color: #ef4444 !important; }
.profile-icon-cell         { width:64px; height:40px; display:flex; align-items:center; justify-content:center; font-size:1.4rem; flex-shrink:0; }
.profile-verified          { font-size:.7rem; color:#10b981; font-weight:600; margin-top:2px; }
.settings-not-logged-in    { text-align:center; padding:2rem; color:var(--text-secondary); }
.settings-hint             { font-size:.85rem; color:var(--text-secondary); margin-bottom:1.25rem; }
.pref-label--accent        { color: var(--color-primary); }
.pref-range                { width:100%; accent-color:var(--color-primary); }
.notif-coming-soon         { font-weight:600; margin-bottom:.4rem; color:var(--text-primary); }
.account-row-label--danger { color: #ef4444; }
.btn-signout--danger       { border-color:#ef4444 !important; color:#ef4444 !important; opacity:.4; }

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, border-color;
}

.card:hover {
    border-color: var(--color-primary); 
    transform: translateX(5px);
}

/* ==========================================================================
   3. LOGO STYLING
   ========================================================================== */

.logo-link { display: flex; align-items: stretch; text-decoration: none; height: 2rem; }

/* HI! box — gradient fill, left side straight, right side slanted */
.logo-hi-box {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.1em 0 0.75em;
    overflow: hidden;
    z-index: 2;
    flex-shrink: 0;
}
.logo-hi-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    transform-origin: 100% 0;
    transform: skewX(-16deg);
    z-index: 0;
    transition: box-shadow 0.2s;
}
.logo-hi-box span {
    position: relative;
    z-index: 1;
    color: #ffffff;
    font-weight: 900;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    white-space: nowrap;
}
.logo-hi-box--sm span { font-size: 1rem; }

.logo-link:hover .logo-hi-box::after { box-shadow: 0 4px 16px rgba(59,130,246,0.4); }

/* AI. TRADE box — white outline, no fill, clipped top-left corner */
.logo-trade-box {
    display: inline-flex;
    align-items: center;
    padding: 0 0.75em 0 0.4em;
    border: 2px solid #e2e8f0;
    border-left: none;
    clip-path: polygon(14px 0%, 100% 0%, 100% 100%, 0% 100%);
    margin-left: -2px;
}
.logo-trade-box--sm { padding: 0 0.55em 0 0.3em; }

.logo-ai    { font-size: 1.25rem; font-weight: 900; color: #f1f5f9; letter-spacing: -0.5px; }
.logo-trade { font-size: 1.25rem; font-weight: 900; color: #3b82f6; letter-spacing: -0.5px; }

@media (max-width: 768px) {
    .logo-trade-box { display: none; }
    .logo-link      { height: 1.8rem; }
}

/* ==========================================================================
   4. NAVIGATION
   ========================================================================== */
.nav { display: flex; gap: 2rem; align-items: center; }

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: color var(--transition);
}

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

/* ==========================================================================
   5. SEGMENTED CONTROL
   ========================================================================== */

.segmented-control {
    position: relative; 
    display: inline-flex; 
    background: var(--bg-primary);
    padding: 4px; 
    border-radius: var(--radius-lg); 
    border: 1px solid var(--border-color);
    height: 40px;
    align-items: center;
}

.btn-toggle {
    position: relative; 
    z-index: 2; 
    width: 45px;
    height: 32px;
    border: none; 
    background: transparent; 
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700; 
    cursor: pointer;
    display: flex; 
    align-items: center; 
    justify-content: center;
}

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

.segmented-control::after {
    content: ''; 
    position: absolute; 
    top: 4px; 
    left: 4px; 
    height: calc(100% - 8px);
    background: var(--bg-tertiary); 
    border-radius: var(--radius-md);
    transition: transform 0.3s ease, width 0.3s ease; 
    z-index: 1;
}

.lang-control::after { width: 45px; }
.lang-control:has(#btn-ko.active)::after { transform: translateX(45px); }

/* ==========================================================================
   6. GLOBAL COMPONENTS
   ========================================================================== */
.hero { padding: 4rem 1.5rem; text-align: center; max-width: 800px; margin: 0 auto; }
.hero-title { font-size: 3rem; font-weight: 800; margin-bottom: 1.5rem; letter-spacing: -0.025em; }

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--transition);
}

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

/* ==========================================================================
   7. HI AI PRELOADER
   ========================================================================== */
#page-loader {
    position: fixed;
    inset: 0;
    background-color: #0f172a;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

.ai-core {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.core-text {
    color: white;
    font-weight: 900;
    font-size: 1.2rem;
    z-index: 2;
    letter-spacing: 1px;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    animation: ai-pulse 2s infinite ease-out;
    box-shadow: 0 0 20px var(--color-primary), inset 0 0 20px var(--color-primary);
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -10px;
    border: 1px solid var(--color-emerald);
    border-radius: 50%;
    opacity: 0.5;
    animation: ai-pulse 2s infinite ease-out 0.5s;
}

@keyframes ai-pulse {
    0%   { transform: scale(0.8); opacity: 0.3; filter: blur(2px); }
    50%  { transform: scale(1.1); opacity: 0.7; filter: blur(0px); }
    100% { transform: scale(1.4); opacity: 0; filter: blur(4px); }
}

.loader-status {
    color: #94a3b8;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    animation: text-fade 1.5s infinite alternate;
}

@keyframes text-fade {
    from { opacity: 0.4; }
    to   { opacity: 1; }
}

.page-enter-active { animation: pageFloatUp 0.35s ease both; }
.page-leave-active { animation: pageFloatDown 0.2s ease both; }

@keyframes pageFloatUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes pageFloatDown {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-8px); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.loader-hidden { opacity: 0; visibility: hidden; }

/* ==========================================================================
   FULL SCREEN MODAL
   ========================================================================== */

#asset-detail-modal.full-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.98); 
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    display: flex; 
    align-items: stretch;
    justify-content: stretch;
    transition: opacity 0.3s ease, visibility 0.3s;
}

#asset-detail-modal.full-modal.active { opacity: 1; visibility: visible; }

#modal-content-area {
    background: #131722;
    width: 100vw; 
    height: 100vh;
    margin: 0;
    padding: 0;
    border-radius: 0;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#asset-detail-modal.active #modal-content-area { transform: translateY(0) scale(1); }

.modal-full-screen-wrapper {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.modal-left-panel {
    width: 380px;
    padding: 40px;
    border-right: 1px solid #2a2e39;
    background: #131722;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    color: white;
}

.modal-right-panel {
    flex: 1;
    height: 100%;
    background: #000;
    position: relative;
}

.close-full-modal {
    margin-top: auto;
    background: #ff4444;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.close-full-modal:hover { background: #cc0000; }

.click-shield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: transparent;
    cursor: default;
}

/* duplicate selector-results block removed — see section 2.2 */

/* ==========================================================================
   9. RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .header .nav, 
    #loginBtn, 
    .lang-control {
        display: none !important;
    }

    .header-search {
        flex: 1;
        margin: 0 10px;
    }

    .nine-dot-btn {
        margin-left: 5px;
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .header .nav, 
    .header #loginBtn, 
    .header .lang-control {
        display: none !important;
    }

    .launcher-dropdown .mobile-only-item {
        display: flex !important;
        border-bottom: 1px solid #334155;
        padding-bottom: 10px;
        margin-bottom: 5px;
        flex-direction: column;
        gap: 8px;
    }
}

@media (min-width: 769px) {
    .mobile-only-item { display: none !important; }
}

/* ==========================================================================
   9. HEADER SEARCH (fixes for Vue AppHeader)
   ========================================================================== */
.header-search {
    flex: 1;
    max-width: 400px;
    margin: 0 1.5rem;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    overflow: visible !important;
}

.search-input-wrapper input,
#asset-search-input {
    width: 100%;
    padding: 10px 44px 10px 18px;
    font-size: 0.9rem;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all var(--transition);
    font-family: inherit;
}

.search-input-wrapper input:focus,
#asset-search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.search-input-wrapper input::placeholder,
#asset-search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.search-icon-container {
    position: absolute;
    right: 14px;
    display: flex;
    align-items: center;
    color: #94a3b8;
    pointer-events: none;
    z-index: 2;
}

/* duplicate #selector-dropdown block removed — see section 2.1 */

.selector-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.selector-item:last-child { border-bottom: none; }
.selector-item:hover { background: var(--bg-tertiary); }

/* ==========================================================================
   AUTH LOADING SHIELD
   ========================================================================== */
@keyframes spin { to { transform: rotate(360deg); } }

.auth-loading-shield {
    position: fixed;
    inset: 0;
    background: #0a0a0f;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

.auth-loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.auth-loading-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(59, 130, 246, 0.4);
}

.auth-loading-logo span { color: #fff; font-weight: 900; font-size: 1rem; letter-spacing: -0.5px; }

.auth-loading-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.auth-fade-leave-active { transition: opacity 0.3s ease; }
.auth-fade-leave-to    { opacity: 0; }

/* ==========================================================================
   AUTH MODAL OVERLAY
   ========================================================================== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
}

.auth-modal-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    animation: fadeIn 0.25s ease;
}

.auth-modal-logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 1.75rem;
}

.auth-modal-brand-trade { font-size: 1.5rem; font-weight: 800; color: #3b82f6; letter-spacing: -0.5px; }
.auth-modal-brand-trade { font-size: 1.5rem; font-weight: 800; color: #3b82f6; letter-spacing: -0.5px; }
.auth-modal-title { font-size: 1.5rem; font-weight: 800; margin: 0 0 0.5rem; }
.auth-modal-subtitle { color: var(--text-secondary); font-size: 0.875rem; margin: 0 0 2rem; line-height: 1.6; }

.auth-tab-row {
    display: flex;
    gap: 4px;
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 1.5rem;
}

.auth-tab-btn {
    flex: 1;
    padding: 9px;
    border-radius: 9px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.15s;
}

.auth-tab-btn.active { background: var(--bg-secondary); color: var(--text-primary); box-shadow: var(--shadow-sm); }
.auth-tab-btn:not(.active) { background: transparent; color: var(--text-secondary); box-shadow: none; }

.auth-google-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    background: white;
    color: #111;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: box-shadow 0.2s;
}

.auth-google-btn:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.2); }

.auth-email-form { display: flex; flex-direction: column; gap: 0.75rem; text-align: left; }

.auth-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.15s;
}

.auth-input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-input--icon { padding-right: 2.5rem; }
.auth-eye-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}
.auth-eye-btn:hover { color: var(--text-primary); }

.auth-submit-btn {
    width: 100%;
    padding: 13px;
    border-radius: 10px;
    border: none;
    background: var(--color-primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 0.25rem;
}

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

.auth-mode-toggle { text-align: center; font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.25rem; }
.auth-mode-toggle a { color: var(--color-primary); cursor: pointer; text-decoration: none; font-weight: 600; }

.auth-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
}

.auth-tos { font-size: 0.875rem; color: var(--text-secondary); margin-top: 1.5rem; line-height: 1.6; opacity: 0.7; text-align: center; }


/* ==========================================================================
   MODAL — CLOSE BUTTON, TITLE ROW, BADGES, CHART CONTAINER
   ========================================================================== */
.modal-close-x {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 10001;
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.4);
    color: #ef4444;
    font-size: 1.25rem;
    font-weight: 700;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
}
.modal-close-x:hover { background: rgba(239,68,68,0.35); }

.modal-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-symbol { margin: 0; color: #00ff88; }

.modal-badges { display: flex; gap: 10px; }

.modal-badge {
    background: #2a2e39;
    padding: 5px 12px;
    border-radius: 4px;
    font-weight: bold;
    color: var(--text-primary);
}
.modal-badge--up   { color: #00ff88; }
.modal-badge--down { color: #ff4444; }

.modal-chart-container { height: 450px; flex-shrink: 0; }



/* ==========================================================================
   SETTINGS PAGE — PREFERENCES PANEL INPUTS
   ========================================================================== */

.pref-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.pref-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.pref-input,
.pref-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
}

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

/* Dark mode — ensure readable backgrounds */
[data-theme="dark"] .pref-input,
[data-theme="dark"] .pref-select {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

[data-theme="dark"] .pref-input:focus,
[data-theme="dark"] .pref-select:focus {
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--color-primary);
}

[data-theme="dark"] .pref-input::placeholder {
    color: var(--text-tertiary);
    opacity: 0.7;
}

/* Select arrow — visible in both themes */
.pref-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

/* Range slider */
.pref-range {
    width: 100%;
    accent-color: var(--color-primary);
    cursor: pointer;
    height: 4px;
}

.pref-risk-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* Save button */
.btn-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 10px;
    border: none;
    background: var(--color-primary);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    margin-top: 0.5rem;
}

.btn-save:hover { background: var(--color-primary-hover); }
.btn-save:disabled { opacity: 0.55; cursor: not-allowed; }

/* ==========================================================================
   SYMBOL LINKS — shared across MarketPage, RecommendationsPage, DashboardPage
   ========================================================================== */

/* Base: keeps existing text styling, adds pointer + transition */
.sym-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: color 0.15s, opacity 0.15s;
}

.sym-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    opacity: 0.85;
}

/* MarketPage — symbol heading inside asset card */
.symbol.sym-link {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    display: inline;
}

/* MarketPage — watchlist sidebar symbol */
.watchlist-sym.wl-sym-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.95rem;
    transition: color 0.15s;
    display: block;
}
.watchlist-sym.wl-sym-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* RecommendationsPage — large sym badge */
.reco-sym-badge.sym-link,
.reco-ai-sym-badge.sym-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.reco-sym-badge.sym-link:hover,
.reco-ai-sym-badge.sym-link:hover {
    opacity: 0.8;
    text-decoration: none;
    filter: brightness(1.15);
}

/* RecommendationsPage — sym name text */
.reco-sym-name.sym-link {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.15s;
    display: block;
}
.reco-sym-name.sym-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ==========================================================================
   ONBOARDING
   ========================================================================== */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 9998;
    backdrop-filter: blur(12px);
    padding: 2rem 1rem 4rem;
    overflow-y: auto;
}

.onboarding-card {
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

/* Old dot-style progress — kept for backward compat but no longer used */
.onboarding-progress-track { display: flex; gap: 6px; margin-bottom: 2rem; }
.onboarding-progress-dot { flex: 1; height: 4px; border-radius: 2px; transition: background 0.3s; }
.onboarding-progress-dot--done   { background: var(--color-primary); }
.onboarding-progress-dot--active { background: var(--color-primary); opacity: 0.5; }
.onboarding-progress-dot--todo   { background: var(--border-color); }

.onboarding-icon { width: 48px; height: 48px; margin-bottom: 1rem; display: flex; align-items: center; justify-content: center; color: #3b82f6; }
.onboarding-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.5rem; }
.onboarding-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.5rem; line-height: 1.5; }

.onboarding-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: inherit;
    padding: 0.875rem 0;
    width: 100%;
}

.onboarding-input::placeholder { color: var(--text-secondary); }
.onboarding-options { display: flex; flex-direction: column; gap: 0.5rem; }

.onboarding-option-btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
}

.onboarding-option-btn.selected,
.onboarding-option-btn:hover { border-color: var(--color-primary); background: rgba(37,99,235,0.06); }

.onboarding-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); }
.onboarding-step-count { font-size: 0.85rem; color: var(--text-secondary); }

.onboarding-next-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 11px 28px;
    border-radius: 12px;
    border: none;
    background: var(--color-primary);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.onboarding-next-btn:hover { background: var(--color-primary-hover); transform: translateY(-1px); }

.spin { animation: spin 1s linear infinite; }
