:root{
    --bg:#050609;
    --panel:#0d0e14;
    --panel2:#11121a;
    --line:#252731;
    --text:#f5f5f7;
    --muted:#747784;
    --pink:#f23b9a;
    --cyan:#18d9f4;
    --green:#32e875;
}

*{
    box-sizing:border-box;
    -webkit-tap-highlight-color:transparent;
}

html,body{
    margin:0;
    min-height:100%;
    background:#050609;
    color:var(--text);
    font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text",Arial,sans-serif;
}

body{
    background:
        radial-gradient(circle at 50% -15%,#191b29 0,#08090e 38%,#050609 100%);
}

button{
    font:inherit;
    border:0;
    cursor:pointer;
}

a{
    color:inherit;
    text-decoration:none;
}

.app{
    width:min(100%,760px);
    margin:auto;
    padding:
        calc(18px + env(safe-area-inset-top))
        12px
        calc(30px + env(safe-area-inset-bottom));
}

/* HEADER */

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    min-height:65px;
    margin-bottom:14px;
}

.brand-area{
    display:flex;
    align-items:center;
    gap:10px;
}

.status-dot{
    width:9px;
    height:9px;
    border-radius:50%;
    background:var(--cyan);
    box-shadow:0 0 12px rgba(24,217,244,.7);
}

.brand{
    font-size:22px;
    line-height:1;
    font-weight:950;
    letter-spacing:3px;
}

.brand span{
    color:var(--pink);
}

.brand-sub{
    margin-top:5px;
    color:#6d7180;
    font-size:8px;
    letter-spacing:2.5px;
}

.top-actions{
    display:flex;
    align-items:center;
    gap:12px;
}

.clock{
    color:#aaaebb;
    font-size:11px;
    font-weight:700;
}

.logout{
    color:#858996;
    font-size:9px;
    font-weight:800;
    letter-spacing:1px;
}

/* NAVIGATION */

.nav{
    display:flex;
    gap:7px;
    overflow-x:auto;
    padding:3px 1px 12px;
    margin-bottom:10px;
    scrollbar-width:none;
}

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

.nav-btn{
    flex:0 0 auto;
    padding:9px 12px;
    border:1px solid #252731;
    border-radius:10px;
    background:#0d0e14;
    color:#727684;
    font-size:9px;
    font-weight:900;
    letter-spacing:1px;
    transition:.2s;
}

.nav-btn.active{
    color:#fff;
    border-color:rgba(24,217,244,.45);
    background:#101b20;
    box-shadow:0 0 18px rgba(24,217,244,.08);
}

/* PAGE */

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

.page.active{
    display:block;
}

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

/* HOME */

.hero{
    padding:22px 18px;
    border:1px solid #292b35;
    border-radius:18px;
    background:
        radial-gradient(circle at 90% 0%,rgba(242,59,154,.12),transparent 35%),
        rgba(13,14,20,.97);
    margin-bottom:12px;
}

.hero-title{
    font-size:30px;
    font-weight:950;
    letter-spacing:3px;
}

.hero-title span{
    color:var(--pink);
}

.hero-sub{
    margin-top:7px;
    color:#707482;
    font-size:9px;
    letter-spacing:2px;
}

.home-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:9px;
}

.home-card{
    padding:17px 14px;
    border:1px solid #272933;
    border-radius:15px;
    background:#0d0e14;
}

.home-card b{
    display:block;
    font-size:11px;
    margin-bottom:5px;
}

.home-card small{
    color:#686d7b;
    font-size:8px;
}

/* SECTION */

.section{
    margin-bottom:12px;
    overflow:hidden;
    border:1px solid #292b35;
    border-radius:17px;
    background:rgba(13,14,20,.97);
}

.section-title{
    padding:15px 14px 11px;
    color:#7d818d;
    font-size:10px;
    font-weight:900;
    letter-spacing:2px;
}

.feature{
    min-height:67px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:13px 14px;
    border-top:1px solid #20222b;
}

.feature-info{
    min-width:0;
}

.feature b{
    display:block;
    font-size:12px;
    font-weight:850;
}

.feature small{
    display:block;
    margin-top:4px;
    color:#6f7380;
    font-size:9px;
}

/* SWITCH */

.toggle{
    position:relative;
    flex:0 0 auto;
    width:42px;
    height:25px;
    padding:2px;
    border-radius:20px;
    background:#292b34;
    transition:.18s ease;
}

.toggle i{
    display:block;
    width:21px;
    height:21px;
    border-radius:50%;
    background:#ececef;
    transition:.18s ease;
    box-shadow:0 1px 5px rgba(0,0,0,.45);
}

.toggle.on{
    background:var(--cyan);
    box-shadow:0 0 14px rgba(24,217,244,.18);
}

.toggle.on i{
    transform:translateX(17px);
}

/* SENS */

.sens-box{
    padding:18px 14px;
}

.sens-value{
    display:flex;
    align-items:end;
    justify-content:space-between;
    margin-bottom:13px;
}

.sens-value span{
    color:#777b87;
    font-size:10px;
    letter-spacing:2px;
}

.sens-value strong{
    color:var(--cyan);
    font-size:26px;
}

input[type=range]{
    width:100%;
    height:20px;
    margin:5px 0 12px;
    accent-color:var(--cyan);
}

.range-labels{
    display:flex;
    justify-content:space-between;
    color:#656a76;
    font-size:8px;
}

.set-btn{
    margin-top:14px;
    padding:10px 18px;
    border-radius:9px;
    background:var(--cyan);
    color:#031014;
    font-size:10px;
    font-weight:950;
    letter-spacing:1px;
}

/* TERMINAL */

.terminal-box{
    min-height:260px;
    padding:15px;
    border-radius:15px;
    background:#030305;
    font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
}

.terminal-line{
    margin-bottom:8px;
    color:#d5d7dd;
    font-size:10px;
    line-height:1.6;
}

.terminal-line .prompt{
    color:var(--cyan);
}

.terminal-log{
    color:#aeb2bd;
    font-size:10px;
    line-height:1.8;
}

.terminal-log .ok{
    color:var(--green);
}

/* LICENSE */

.license{
    padding:16px 14px;
    border:1px solid #292b35;
    border-radius:16px;
    background:#0d0e14;
}

.license-title{
    color:#777b87;
    font-size:9px;
    letter-spacing:2px;
}

.license code{
    display:block;
    margin:8px 0 5px;
    color:var(--cyan);
    font-size:10px;
    word-break:break-all;
}

.license small{
    color:#686c78;
    font-size:8px;
}

/* MOBILE */

@media(max-width:500px){

    .app{
        padding-left:10px;
        padding-right:10px;
    }

    .brand{
        font-size:20px;
    }

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

    .feature{
        min-height:64px;
    }
}

/* =========================
   LEGIT ADMIN V2
========================= */

.admin-shell{
    width:min(1180px,94%);
    margin:0 auto;
    padding:28px 0 70px;
}

.admin-shell .app-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    margin-bottom:25px;
}

.admin-shell .brand{
    font-weight:950;
    letter-spacing:4px;
    font-size:25px;
    color:#f5f5f7;
}

.admin-shell .brand span{
    color:#ff174f;
}

.admin-shell .sub{
    margin-top:5px;
    color:#6d6d78;
    font-size:10px;
    letter-spacing:3px;
}

.admin-shell .card{
    background:#101016;
    border:1px solid #292932;
    border-radius:20px;
    padding:24px;
    margin-bottom:20px;
    box-shadow:0 12px 35px rgba(0,0,0,.25);
}

.admin-shell h2{
    margin:0 0 18px;
    color:#f5f5f7;
    font-size:22px;
    letter-spacing:1px;
}

.admin-create .row{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.admin-create input[type="number"]{
    width:100px;
    height:44px;
    box-sizing:border-box;
    padding:0 14px;
    border:1px solid #30303a;
    border-radius:11px;
    outline:none;
    background:#191920;
    color:#fff;
    font-size:16px;
}

.primary{
    min-height:44px;
    padding:0 20px;
    border:1px solid #ff174f;
    border-radius:11px;
    background:#ff174f;
    color:#fff;
    font-weight:900;
    letter-spacing:.7px;
    cursor:pointer;
    transition:.2s ease;
}

.primary:active{
    transform:scale(.97);
}

.hint{
    margin:15px 0 0;
    color:#777782;
    font-size:13px;
    line-height:1.5;
}

.alert.success{
    margin-bottom:18px;
    padding:14px 16px;
    border:1px solid rgba(0,255,140,.25);
    border-radius:12px;
    background:rgba(0,255,140,.06);
    color:#00e889;
    font-size:13px;
}

/* TABLE */

.table-wrap{
    width:100%;
    overflow-x:auto;
    border:1px solid #292932;
    border-radius:15px;
}

.admin-shell table{
    width:100%;
    min-width:850px;
    border-collapse:collapse;
}

.admin-shell th{
    padding:15px 14px;
    background:#15151c;
    color:#777782;
    text-align:left;
    font-size:11px;
    letter-spacing:1px;
    white-space:nowrap;
}

.admin-shell td{
    padding:14px;
    border-top:1px solid #292932;
    color:#e8e8ed;
    font-size:13px;
    vertical-align:middle;
}

.key-cell{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:245px;
}

.key-cell code{
    color:#ff174f;
    font-family:monospace;
    font-size:12px;
    word-break:break-all;
}

.copy-btn{
    flex:0 0 auto;
    width:34px;
    height:34px;
    border:1px solid #353540;
    border-radius:9px;
    background:#1b1b23;
    color:#fff;
    cursor:pointer;
    font-size:15px;
    transition:.2s ease;
}

.copy-btn:active{
    transform:scale(.92);
}

.copy-btn.copied{
    border-color:#00e889;
    color:#00e889;
}

.ok{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:6px 10px;
    border:1px solid rgba(0,232,137,.25);
    border-radius:8px;
    background:rgba(0,232,137,.07);
    color:#00e889;
    font-size:10px;
    font-weight:900;
}

.ok::before{
    content:"";
    width:6px;
    height:6px;
    border-radius:50%;
    background:#00e889;
    box-shadow:0 0 8px #00e889;
}

.bad{
    display:inline-flex;
    padding:6px 10px;
    border:1px solid rgba(255,70,90,.25);
    border-radius:8px;
    background:rgba(255,70,90,.07);
    color:#ff536b;
    font-size:10px;
    font-weight:900;
}

.mini-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:36px;
    padding:0 13px;
    border:1px solid #34343e;
    border-radius:10px;
    background:#17171e;
    color:#dcdce2;
    text-decoration:none;
    font-size:11px;
    font-weight:900;
    letter-spacing:.6px;
    cursor:pointer;
    transition:.2s ease;
}

.mini-btn:hover{
    border-color:#ff174f;
    color:#ff174f;
}

.mini-btn.danger{
    border-color:rgba(255,23,79,.3);
    color:#ff174f;
}

.action-form{
    display:inline;
}

/* MOBILE */

@media(max-width:700px){

    .admin-shell{
        width:calc(100% - 24px);
        padding-top:18px;
    }

    .admin-shell .app-head{
        align-items:flex-start;
    }

    .admin-shell .brand{
        font-size:21px;
    }

    .admin-shell .card{
        padding:17px;
        border-radius:17px;
    }

    .admin-shell h2{
        font-size:19px;
    }

    .admin-create .row{
        align-items:stretch;
    }

    .admin-create input[type="number"]{
        width:90px;
    }

    .primary{
        flex:1;
    }

    .table-wrap{
        margin-top:5px;
    }
}

