/* Shared site styles: layout, sidebar, and common components */
:root{
    --sidebar-bg: #000000;
    --sidebar-text: #ffffff;
    --sidebar-icon-bg: rgba(255,255,255,0.06);
    --accent: #4cafef;
    --border: rgba(15, 23, 42, 0.08);
}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{
    margin:0;
    min-height:100vh;
    background:var(--bg, #000);
    color:var(--text, #fff);
    font-family:Inter, Arial, sans-serif;
}
.layout{display:flex;min-height:100vh}

/* Sidebar */
.sidebar{
    width:220px;
    flex:0 0 220px;
    background:var(--sidebar-bg);
    border-right:1px solid rgba(255,255,255,.08);
    display:flex;
    flex-direction:column;
    transition:width .25s ease;
    overflow:hidden;
}
.sidebar.collapsed{width:72px;flex-basis:72px}

.toggle{
    border:none;
    background:transparent;
    color:var(--sidebar-text);
    font-size:1rem;
    padding:20px 18px;
    cursor:pointer;
    text-align:left;
    display:inline-flex;
    align-items:center;
    gap:10px;
    white-space:nowrap;
}

.toggle .brand{font-weight:600;font-size:1rem}
.toggle .hamburger{color:var(--sidebar-text);font-size:1.1rem}
.sidebar.collapsed .toggle .brand{display:none}

nav{display:flex;flex-direction:column;gap:8px;padding:0 10px 20px}
.menu-group{display:flex;flex-direction:column;gap:0}
.menu-item{display:flex;align-items:center;gap:14px;color:var(--sidebar-text);text-decoration:none;padding:14px 12px;border-radius:12px;transition:background .2s ease}
.menu-item:hover,.menu-item.active{background:rgba(255,255,255,.08)}
.submenu{display:flex;flex-direction:column;gap:0;padding-left:12px;max-height:1000px;transition:max-height .3s ease;overflow:hidden}
.sidebar.collapsed .submenu{max-height:0;padding-left:0;display:none}
.submenu-item{display:flex;align-items:center;color:var(--sidebar-text);text-decoration:none;padding:10px 12px;font-size:0.9rem;transition:background .2s ease;opacity:1}
.sidebar.collapsed .submenu-item{opacity:0;display:none}
.submenu-item:hover,.submenu-item.active{background:rgba(255,255,255,.06)}
.icon{width:42px;height:42px;border-radius:50%;background:var(--sidebar-icon-bg);display:inline-flex;align-items:center;justify-content:center;font-weight:700;color:var(--sidebar-text);flex-shrink:0;line-height:1;text-align:center}
.label{font-size:1rem;white-space:nowrap;opacity:1;transition:opacity .2s ease}
.sidebar.collapsed .label{opacity:0;width:0;overflow:hidden}
.sidebar.collapsed .toggle{justify-content:center;width:100%;text-align:center;padding-left:0;padding-right:0}
.sidebar.collapsed nav{align-items:center}
.sidebar.collapsed .menu-item{justify-content:center;gap:0;padding-left:0;padding-right:0}

/* Content area (pages can override colors via --bg / --text) */
.content{
    flex:1;
    min-width:0;
    padding:40px 40px 110px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    background:var(--content-bg, transparent);
}

.site-brand-bar{
    position:sticky;
    top:0;
    left:0;
    right:0;
    z-index:1000;
    width:100%;
    display:flex;
    justify-content:center;
    background:#000;
    border-bottom:1px solid rgba(255,255,255,0.08);
    color:rgba(255,255,255,0.92);
    font-size:0.95rem;
    font-weight:600;
    letter-spacing:0.01em;
    text-align:left;
    backdrop-filter:blur(12px);
}
.site-brand-bar > div{
    width:100%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:8px;
    flex-wrap:nowrap;
    padding:10px 24px;
}
.site-brand-copy{
    display:flex;
    align-items:center;
    gap:10px;
    flex:1;
    min-width:0;
}
.site-brand-logo{
    width:34px;
    height:34px;
    flex:0 0 auto;
    display:block;
}
.site-brand-bar .site-brand{font-size:1rem;font-weight:700;}
.site-brand-bar .site-tagline{color:rgba(255,255,255,0.75);font-size:0.88rem;}
.site-profile-area{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:10px;
    flex:0 0 auto;
}
.profile-link{
    display:inline-flex;
    align-items:center;
    gap:10px;
    text-decoration:none;
    color:rgba(255,255,255,0.92);
    background:rgba(255,255,255,0.08);
    padding:8px 12px;
    border-radius:999px;
    transition:background .2s ease, transform .2s ease;
    margin-left:auto;
}
.profile-link:hover{background:rgba(255,255,255,0.14);transform:translateY(-1px);}
.profile-avatar{
    width:34px;
    height:34px;
    border-radius:50%;
    background:#cfd8dc center/cover no-repeat;
    flex-shrink:0;
}
.profile-name{font-size:0.95rem;font-weight:700;}
.logout-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:38px;
    padding:8px 12px;
    border:1px solid rgba(255,255,255,0.16);
    border-radius:999px;
    background:rgba(255,255,255,0.04);
    color:rgba(255,255,255,0.88);
    text-decoration:none;
    font-size:0.9rem;
    font-weight:800;
    transition:background .2s ease, transform .2s ease;
}
.logout-link:hover{background:rgba(255,255,255,0.12);transform:translateY(-1px);}

/* Small helpers for hero/layout used across pages */
.hero{max-width:900px}
.hero h1{font-size:clamp(3rem,5vw,5rem);margin:0;line-height:1.05}
.hero p{color:var(--muted, #bbb);margin-top:16px;font-size:1.05rem}

/* Make links inherit color inside content */
.content a{color:inherit}

/* Cyber visual for landing page */
.cyber-visual{ margin-top:28px; width:100%; height:260px; border-radius:16px; overflow:hidden; background:linear-gradient(135deg,#021124,#04213a); border:1px solid rgba(255,255,255,0.04); box-shadow:0 32px 80px rgba(2,17,36,0.6); position:relative }
.cyber-visual svg{ width:100%; height:100%; display:block }

/* Footer */
.site-footer{margin-top:40px;padding:18px 28px;background:rgba(0,0,0,0.65);color:var(--muted,#9aa6b2);font-size:0.9rem;border-top:1px solid rgba(255,255,255,0.03);display:flex;justify-content:space-between;align-items:center;border-radius:8px;position:fixed;left:12px;right:12px;bottom:12px;z-index:9999;box-shadow:0 8px 30px rgba(2,8,23,0.6)}
.site-footer .left{max-width:78%}
.site-footer .right{font-weight:600}

/* Market watcher */
.market-search { display:flex; gap:8px; align-items:center; margin:12px 0 }
.market-search input { padding:6px 8px; border:1px solid #ccc; border-radius:4px }
.market-search button { padding:6px 10px; border-radius:4px; border:none; background:#0b74de; color:#fff }
.market-result { margin-top:12px; padding:12px; border-radius:6px; background:#fff; box-shadow:0 1px 4px rgba(0,0,0,0.06); max-width:480px }
.market-result .price { font-size:28px; font-weight:700 }
.market-result .delta { margin-top:6px; font-size:14px }
.market-result .up { color: #108a00 }
.market-result .down { color: #b71c1c }

