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

html,body{
    width:100%;
    min-height:100%;
}

body{
    background:#070908;
    color:#f3f6f3;
    font-family:Arial,"Segoe UI",Tahoma,sans-serif;
    overflow-x:hidden;
}

body::before{
    content:"";
    position:fixed;
    inset:0;
    pointer-events:none;
    background:
        radial-gradient(circle at 80% 10%,rgba(165,255,0,.10),transparent 30%),
        radial-gradient(circle at 10% 90%,rgba(165,255,0,.06),transparent 30%);
    z-index:-2;
}

body::after{
    content:"";
    position:fixed;
    inset:0;
    pointer-events:none;
    opacity:.13;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),
        linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);
    background-size:42px 42px;
    z-index:-1;
}

:root{
    --lime:#b8ff19;
    --lime2:#8ee000;
    --bg:#070908;
    --panel:#0d110e;
    --panel2:#111711;
    --line:rgba(255,255,255,.08);
    --muted:#8b948c;
    --danger:#ff4d4d;
}

/* =========================
   AUTH
========================= */

#authScreen{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:30px;
}

.auth-wrap{
    width:min(1050px,100%);
    min-height:650px;
    display:grid;
    grid-template-columns:1.15fr .85fr;
    background:linear-gradient(
        135deg,
        rgba(255,255,255,.035),
        rgba(255,255,255,.01)
    );
    border:1px solid var(--line);
    border-radius:32px;
    overflow:hidden;
    box-shadow:
        0 40px 100px rgba(0,0,0,.55),
        0 0 80px rgba(184,255,25,.04);
}

.auth-visual{
    position:relative;
    padding:60px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    background:
        radial-gradient(
            circle at 50% 40%,
            rgba(184,255,25,.13),
            transparent 35%
        );
}

.logo{
    font-size:32px;
    font-weight:900;
    letter-spacing:-2px;
}

.logo span{
    color:var(--lime);
}

.auth-visual h1{
    max-width:550px;
    font-size:clamp(42px,5vw,76px);
    line-height:.95;
    letter-spacing:-4px;
}

.auth-visual h1 span{
    color:var(--lime);
}

.auth-visual p{
    max-width:470px;
    margin-top:25px;
    color:var(--muted);
    line-height:1.8;
    font-size:16px;
}

.visual-status{
    display:flex;
    gap:10px;
    align-items:center;
    color:#aeb6af;
    font-size:13px;
}

.status-dot{
    width:8px;
    height:8px;
    background:var(--lime);
    border-radius:50%;
    box-shadow:0 0 15px var(--lime);
}

.auth-box{
    padding:55px 45px;
    background:rgba(8,11,9,.78);
    border-right:1px solid var(--line);
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.auth-box h2{
    font-size:34px;
    margin-bottom:8px;
}

.auth-sub{
    color:var(--muted);
    margin-bottom:30px;
}

.auth-tabs{
    display:grid;
    grid-template-columns:1fr 1fr;
    background:#080b08;
    border:1px solid var(--line);
    border-radius:14px;
    padding:4px;
    margin-bottom:25px;
}

.auth-tabs button{
    border:0;
    background:none;
    color:#7f887f;
    padding:12px;
    border-radius:10px;
    cursor:pointer;
    font-weight:700;
}

.auth-tabs button.active{
    background:var(--lime);
    color:#0a0d08;
}

.field{
    margin-bottom:17px;
}

.field label{
    display:block;
    margin-bottom:8px;
    color:#aab2aa;
    font-size:13px;
}

.field input{
    width:100%;
    border:1px solid var(--line);
    background:#090c09;
    color:white;
    padding:15px 16px;
    border-radius:12px;
    outline:none;
    transition:.2s;
    font-size:15px;
}

.field input:focus{
    border-color:rgba(184,255,25,.65);
    box-shadow:0 0 0 3px rgba(184,255,25,.06);
}

#authSubmit{
    width:100%;
    border:0;
    padding:16px;
    border-radius:13px;
    background:var(--lime);
    color:#0a0d08;
    font-weight:900;
    font-size:16px;
    cursor:pointer;
    margin-top:5px;
    transition:.2s;
}

#authSubmit:hover{
    transform:translateY(-2px);
    box-shadow:0 10px 30px rgba(184,255,25,.18);
}

#authSubmit:disabled{
    opacity:.55;
    cursor:wait;
    transform:none;
}

.auth-error{
    color:#ff7777;
    font-size:13px;
    margin-top:15px;
    min-height:18px;
}

.server-status{
    margin-top:20px;
    padding:12px;
    border-radius:10px;
    background:rgba(255,255,255,.025);
    color:#777f78;
    font-size:12px;
}

/* =========================
   APP
========================= */

#app{
    display:none;
    min-height:100vh;
}

.layout{
    display:flex;
    min-height:100vh;
}

/* =========================
   SIDEBAR
========================= */

.sidebar{
    position:fixed;
    top:0;
    right:0;
    bottom:0;
    width:255px;
    padding:25px 16px;
    background:linear-gradient(180deg,#0b0f0b,#080b08);
    border-left:1px solid var(--line);
    z-index:100;
    display:flex;
    flex-direction:column;
}

.sidebar-logo{
    padding:10px 12px 28px;
}

.sidebar-logo .logo{
    font-size:26px;
}

.nav{
    display:flex;
    flex-direction:column;
    gap:5px;
    overflow-y:auto;
    scrollbar-width:none;
}

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

.nav button{
    width:100%;
    border:0;
    background:none;
    color:#818981;
    text-align:right;
    padding:13px 14px;
    border-radius:11px;
    cursor:pointer;
    font-size:14px;
    font-weight:700;
    transition:.2s;
}

.nav button:hover{
    color:#fff;
    background:rgba(255,255,255,.035);
}

.nav button.active{
    color:#10140c;
    background:var(--lime);
    box-shadow:0 8px 25px rgba(184,255,25,.09);
}

.sidebar-bottom{
    margin-top:auto;
    border-top:1px solid var(--line);
    padding-top:15px;
}

.user-mini{
    padding:12px;
    margin-bottom:8px;
}

.user-mini-name{
    font-weight:800;
}

.user-mini-email{
    color:#6f786f;
    font-size:11px;
    margin-top:4px;
    overflow:hidden;
    text-overflow:ellipsis;
}

.logout{
    width:100%;
    border:1px solid rgba(255,77,77,.16);
    background:rgba(255,77,77,.04);
    color:#ff7777;
    padding:12px;
    border-radius:10px;
    cursor:pointer;
    font-weight:800;
}

.logout:hover{
    background:rgba(255,77,77,.09);
}

/* =========================
   MAIN
========================= */

.main{
    width:calc(100% - 255px);
    margin-right:255px;
    min-height:100vh;
}

.topbar{
    height:75px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 35px;
    border-bottom:1px solid var(--line);
    position:sticky;
    top:0;
    background:rgba(7,9,8,.82);
    backdrop-filter:blur(18px);
    z-index:50;
}

.page-title{
    font-size:14px;
    color:#a6aea6;
}

.top-actions{
    display:flex;
    gap:8px;
}

.icon-btn{
    border:1px solid var(--line);
    background:#0c100d;
    color:#aab2aa;
    width:40px;
    height:40px;
    border-radius:10px;
    cursor:pointer;
}

.content{
    padding:35px;
    max-width:1500px;
    margin:auto;
}

/* =========================
   PAGES
========================= */

.page{
    display:none;
    animation:pageIn .35s ease;
}

.page.active{
    display:block;
}

@keyframes pageIn{
    from{
        opacity:0;
        transform:translateY(8px);
    }
    to{
        opacity:1;
        transform:none;
    }
}

/* =========================
   DASHBOARD
========================= */

.hero{
    position:relative;
    overflow:hidden;
    min-height:350px;
    padding:45px;
    border:1px solid var(--line);
    border-radius:24px;
    background:
        radial-gradient(
            circle at 85% 40%,
            rgba(184,255,25,.15),
            transparent 28%
        ),
        linear-gradient(135deg,#101610,#090c09);
}

.hero::after{
    content:"RIDE";
    position:absolute;
    left:-20px;
    bottom:-60px;
    font-size:220px;
    font-weight:1000;
    color:rgba(255,255,255,.018);
    letter-spacing:-15px;
}

.eyebrow{
    color:var(--lime);
    font-size:12px;
    font-weight:900;
    letter-spacing:2px;
    text-transform:uppercase;
}

.hero h1{
    margin-top:15px;
    max-width:700px;
    font-size:clamp(40px,6vw,78px);
    line-height:.95;
    letter-spacing:-4px;
}

.hero h1 span{
    color:var(--lime);
}

.hero p{
    max-width:600px;
    color:#858e86;
    line-height:1.8;
    margin-top:22px;
}

.hero-actions{
    display:flex;
    gap:10px;
    margin-top:28px;
    flex-wrap:wrap;
}

.primary-btn,
.secondary-btn{
    border:0;
    padding:13px 20px;
    border-radius:11px;
    cursor:pointer;
    font-weight:900;
}

.primary-btn{
    background:var(--lime);
    color:#0a0d08;
}

.secondary-btn{
    border:1px solid var(--line);
    background:#0c100d;
    color:#b9c0b9;
}

/* =========================
   SECTION HEADER
========================= */

.section-head{
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:20px;
    margin:40px 0 18px;
}

.section-head h2{
    font-size:25px;
}

.section-head p{
    color:#737c74;
    font-size:13px;
}

/* =========================
   METRICS
========================= */

.metrics{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    border-top:1px solid var(--line);
    border-bottom:1px solid var(--line);
}

.metric{
    padding:24px 18px;
    border-left:1px solid var(--line);
}

.metric:last-child{
    border-left:0;
}

.metric-label{
    color:#737c74;
    font-size:12px;
}

.metric-value{
    margin-top:8px;
    font-size:30px;
    font-weight:900;
}

.metric-value span{
    font-size:12px;
    color:#737c74;
    font-weight:500;
}

/* =========================
   GRID
========================= */

.grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:15px;
}

.panel{
    border:1px solid var(--line);
    background:rgba(13,17,14,.72);
    border-radius:18px;
    padding:22px;
}

.panel h3{
    font-size:15px;
    margin-bottom:18px;
}

.empty{
    min-height:120px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    color:#697169;
    font-size:13px;
}

.data-list{
    display:flex;
    flex-direction:column;
}

.data-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:13px 0;
    border-bottom:1px solid rgba(255,255,255,.05);
}

.data-row:last-child{
    border-bottom:0;
}

.data-row span:first-child{
    color:#8b948c;
    font-size:13px;
}

.data-row strong{
    font-size:13px;
}

/* =========================
   AI
========================= */

.ai-panel{
    border-color:rgba(184,255,25,.18);
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(184,255,25,.08),
            transparent 40%
        ),
        #0d120e;
}

.ai-title{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.ai-badge{
    color:var(--lime);
    font-size:11px;
    font-weight:900;
    border:1px solid rgba(184,255,25,.25);
    padding:6px 9px;
    border-radius:20px;
}

.ai-result{
    color:#aeb7af;
    line-height:1.8;
    font-size:14px;
    white-space:pre-wrap;
}

/* =========================
   TABLE
========================= */

.table-wrap{
    overflow:auto;
    border:1px solid var(--line);
    border-radius:15px;
}

table{
    width:100%;
    border-collapse:collapse;
    min-width:650px;
}

th,td{
    padding:15px;
    text-align:right;
    border-bottom:1px solid rgba(255,255,255,.05);
}

th{
    color:#697169;
    font-size:12px;
}

td{
    font-size:13px;
}

/* =========================
   PROFILE
========================= */

.profile-head{
    display:flex;
    align-items:center;
    gap:20px;
    padding:28px;
    border:1px solid var(--line);
    border-radius:20px;
    background:#0d120e;
}

.avatar{
    width:70px;
    height:70px;
    border-radius:20px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:var(--lime);
    color:#10140c;
    font-size:25px;
    font-weight:1000;
}

.profile-info h2{
    font-size:24px;
}

.profile-info p{
    color:#727b73;
    margin-top:6px;
}

/* =========================
   TOAST
========================= */

#toast{
    position:fixed;
    bottom:25px;
    left:25px;
    background:#101510;
    border:1px solid var(--line);
    color:white;
    padding:14px 18px;
    border-radius:12px;
    opacity:0;
    transform:translateY(20px);
    pointer-events:none;
    transition:.3s;
    z-index:999;
}

#toast.show{
    opacity:1;
    transform:none;
}

/* =========================
   MOBILE
========================= */

.mobile-menu{
    display:none;
}

@media(max-width:900px){

    .auth-wrap{
        grid-template-columns:1fr;
    }

    .auth-visual{
        display:none;
    }

    .sidebar{
        transform:translateX(100%);
        transition:.25s;
    }

    .sidebar.open{
        transform:none;
    }

    .main{
        width:100%;
        margin-right:0;
    }

    .topbar{
        padding:0 18px;
    }

    .mobile-menu{
        display:block;
        margin-left:10px;
    }

    .content{
        padding:18px;
    }

    .metrics{
        grid-template-columns:repeat(2,1fr);
    }

    .metric{
        border-bottom:1px solid var(--line);
    }

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

    .hero{
        padding:28px;
    }

    .hero h1{
        font-size:48px;
    }
}

@media(max-width:550px){

    #authScreen{
        padding:12px;
    }

    .auth-box{
        padding:30px 20px;
    }

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

    .metric-value{
        font-size:23px;
    }

    .hero h1{
        font-size:40px;
    }

    .section-head{
        flex-direction:column;
        align-items:flex-start;
    }
}
