:root{
    --bg:#070d16;
    --bg2:#0b1422;
    --panel:#101d31;
    --panel2:#13243c;
    --card:#162941;

    --txt:#f7fbff;
    --muted:#9fb0c7;

    --brand:#ff2418;
    --brand2:#ff7a18;
    --brand3:#ffd6a0;

    --blue:#4f8cff;
    --green:#00e0a4;
    --danger:#ff4d6d;

    --border:rgba(255,255,255,.10);
    --shadow:0 24px 70px rgba(0,0,0,.42);
    --radius:24px;
}

*{
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    min-height:100vh;
    font-family:Inter,system-ui,Segoe UI,Arial,sans-serif;
    color:var(--txt);
    background:
        radial-gradient(circle at 12% 8%, rgba(255,36,24,.20), transparent 34%),
        radial-gradient(circle at 90% 90%, rgba(255,122,24,.13), transparent 32%),
        linear-gradient(135deg, #080b12, #07111f 48%, #061b18);
}

a{
    color:#ffd1bd;
    text-decoration:none;
}

button,
.btn{
    border:0;
    border-radius:16px;
    padding:13px 18px;
    background:linear-gradient(135deg,var(--brand),var(--brand2));
    color:#fff;
    font-weight:900;
    cursor:pointer;
    display:inline-block;
    box-shadow:0 14px 34px rgba(255,45,20,.26);
    transition:.22s ease;
}

button:hover,
.btn:hover{
    transform:translateY(-1px);
    box-shadow:0 18px 44px rgba(255,45,20,.35);
}

.ghost{
    background:rgba(255,255,255,.04);
    color:#fff;
    border:1px solid rgba(255,255,255,.14);
    box-shadow:none;
}

.ghost:hover{
    background:rgba(255,255,255,.08);
    border-color:rgba(255,255,255,.22);
}

.danger{
    background:linear-gradient(135deg,#ff375f,#ff4d6d);
    color:#fff;
}

/* LOGIN */

.login-bg{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:26px;
    background:
        radial-gradient(circle at 18% 15%, rgba(255,35,20,.28), transparent 34%),
        radial-gradient(circle at 82% 80%, rgba(255,120,40,.18), transparent 34%),
        linear-gradient(135deg,#130708,#07111f 52%,#071a14);
}

.login-card{
    width:min(450px,92vw);
    background:
        linear-gradient(180deg, rgba(17,31,53,.92), rgba(8,16,29,.94));
    border:1px solid rgba(255,255,255,.14);
    border-radius:32px;
    padding:36px;
    box-shadow:
        0 30px 90px rgba(0,0,0,.58),
        inset 0 1px 0 rgba(255,255,255,.05);
    backdrop-filter:blur(18px);
}

.login-card-pro{
    text-align:center;
}

.login-logo-wrap{
    position:relative;
    display:inline-block;
}

.login-logo-wrap::before{
    content:'';
    position:absolute;
    width:190px;
    height:190px;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    background:
        radial-gradient(
            circle,
            rgba(255,50,20,.38),
            rgba(255,50,20,.10),
            transparent 72%
        );
    border-radius:999px;
    z-index:-1;
    filter:blur(24px);
}

.login-logo{
    width:162px;
    height:162px;
    object-fit:contain;
    display:block;
    margin:0 auto 20px;
    border-radius:40px;
    filter:
        drop-shadow(0 0 25px rgba(255,40,20,.35))
        drop-shadow(0 0 55px rgba(255,40,20,.23))
        drop-shadow(0 25px 45px rgba(0,0,0,.45));
    animation:logoFloat 4s ease-in-out infinite;
}

.login-card-pro h1{
    margin:4px 0 8px;
    font-size:36px;
    letter-spacing:-.8px;
}

.login-card-pro p{
    color:var(--muted);
    margin:0 0 26px;
}

.login-card-pro label{
    display:block;
    text-align:left;
    color:#e8f1ff;
    font-weight:800;
    margin-top:12px;
    margin-bottom:7px;
}

.login-card input,
.grid-form input,
.grid-form textarea,
.grid-form select,
.status-card select{
    width:100%;
    margin:0 0 16px;
    padding:15px 16px;
    border-radius:16px;
    border:1px solid rgba(120,170,220,.24);
    background:rgba(5,15,30,.72);
    color:var(--txt);
    outline:none;
    transition:.18s;
}

.login-card input:focus,
.grid-form input:focus,
.grid-form textarea:focus,
.grid-form select:focus,
.status-card select:focus{
    border-color:rgba(255,90,40,.72);
    box-shadow:0 0 0 4px rgba(255,60,20,.12);
}

.login-card-pro button{
    width:100%;
    margin-top:8px;
}

.alert,
.success{
    padding:12px 14px;
    border-radius:14px;
    margin-bottom:16px;
}

.alert{
    background:rgba(255,77,109,.16);
    border:1px solid rgba(255,77,109,.28);
    color:#ffd9e0;
}

.success{
    background:rgba(0,224,164,.14);
    border:1px solid rgba(0,224,164,.26);
    color:#b8ffec;
}

/* LAYOUT */

.sidebar{
    position:fixed;
    inset:0 auto 0 0;
    width:250px;
    padding:22px;
    background:
        radial-gradient(circle at 50% 0%, rgba(255,36,24,.20), transparent 40%),
        linear-gradient(180deg,#12080a,#07101d 42%,#050b13);
    border-right:1px solid rgba(255,255,255,.08);
    box-shadow:16px 0 46px rgba(0,0,0,.24);
}

.logo{
    font-size:20px;
    margin-bottom:26px;
}

.logo-pro{
    display:flex;
    justify-content:center;
    align-items:center;
    margin-bottom:28px;
    padding-bottom:22px;
    border-bottom:1px solid rgba(255,255,255,.07);
}

.logo-pro img{
    width:96px;
    height:96px;
    border-radius:28px;
    object-fit:cover;
    filter:
        drop-shadow(0 0 20px rgba(255,40,20,.27))
        drop-shadow(0 12px 32px rgba(0,0,0,.40));
    transition:.25s ease;
}

.logo-pro img:hover{
    transform:scale(1.045) rotate(-1deg);
    filter:
        drop-shadow(0 0 28px rgba(255,40,20,.46))
        drop-shadow(0 18px 40px rgba(0,0,0,.50));
}

.logo-pro b{
    display:none;
}

.sidebar nav{
    display:flex;
    flex-direction:column;
    gap:6px;
}

.sidebar a{
    display:flex;
    align-items:center;
    gap:10px;
    padding:13px 14px;
    border-radius:16px;
    color:#d9e9ff;
    font-weight:700;
    letter-spacing:-.1px;
    border:1px solid transparent;
    transition:.18s ease;
}

.sidebar a:hover{
    background:linear-gradient(135deg, rgba(255,31,22,.18), rgba(255,122,24,.10));
    border-color:rgba(255,255,255,.08);
    color:#fff;
    transform:translateX(2px);
}

.main{
    margin-left:250px;
    min-height:100vh;
}

.topbar{
    height:70px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 30px;
    border-bottom:1px solid rgba(255,255,255,.08);
    background:rgba(7,17,31,.78);
    position:sticky;
    top:0;
    z-index:5;
    backdrop-filter:blur(14px);
}

.topbar b{
    font-size:16px;
}

.topbar span{
    color:var(--muted);
    margin-left:8px;
}

/* PANELS */

.hero-admin,
.panel{
    margin:28px;
    background:
        linear-gradient(180deg, rgba(16,31,53,.88), rgba(10,21,37,.88));
    border:1px solid rgba(255,255,255,.10);
    border-radius:28px;
    padding:28px;
    box-shadow:var(--shadow);
    position:relative;
    overflow:hidden;
}

.hero-admin::before,
.panel::before{
    content:'';
    position:absolute;
    width:240px;
    height:240px;
    right:-90px;
    top:-110px;
    background:radial-gradient(circle, rgba(255,55,25,.16), transparent 68%);
    pointer-events:none;
}

.hero-admin h1{
    font-size:46px;
    margin:0 0 10px;
    letter-spacing:-1.4px;
}

.hero-admin p,
.panel p{
    color:#d9e7f7;
}

.cards{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:16px;
    margin:28px;
}

.stat{
    background:
        linear-gradient(135deg, rgba(255,36,24,.18), rgba(18,36,61,.86)),
        linear-gradient(180deg,#152941,#0b182b);
    border:1px solid rgba(255,255,255,.10);
    border-radius:24px;
    padding:20px;
    box-shadow:0 20px 46px rgba(0,0,0,.30);
}

.stat span{
    color:var(--muted);
}

.stat b{
    display:block;
    font-size:34px;
    margin-top:8px;
    letter-spacing:-1px;
}

.panel-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:16px;
}

/* TABLES */

table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    overflow:hidden;
}

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

th{
    color:#ffd4c5;
    font-size:13px;
    text-transform:uppercase;
    letter-spacing:.6px;
}

td small{
    display:block;
    color:var(--muted);
}

tr:hover td{
    background:rgba(255,255,255,.025);
}

.pill{
    display:inline-block;
    padding:7px 11px;
    border-radius:999px;
    background:rgba(255,70,30,.14);
    color:#ffd1bd;
    border:1px solid rgba(255,70,30,.22);
    font-weight:800;
}

.thumb{
    width:72px;
    height:54px;
    object-fit:cover;
    border-radius:14px;
    box-shadow:0 10px 26px rgba(0,0,0,.30);
}

/* FORMS */

.grid-form{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
}

.grid-form .full{
    grid-column:1/-1;
}

.grid-form textarea{
    min-height:110px;
    resize:vertical;
}

.option-group{
    border:1px solid rgba(255,255,255,.10);
    padding:16px;
    border-radius:20px;
    margin:12px 0;
    background:rgba(6,17,31,.65);
}

.option-row{
    display:grid;
    grid-template-columns:1fr 130px auto;
    gap:10px;
    margin:8px 0;
}

.tabs{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin:16px 0;
}

.tabs a{
    padding:10px 13px;
    border-radius:999px;
    background:rgba(255,255,255,.05);
    border:1px solid rgba(255,255,255,.08);
    color:#ffe1d7;
    font-weight:800;
}

.tabs a:hover{
    background:rgba(255,54,24,.14);
}

/* ORDERS + WHATSAPP */

.order-grid,
.wa-grid{
    display:grid;
    grid-template-columns:1fr 360px;
    gap:22px;
}

.status-card,
.qr-box{
    background:rgba(6,17,31,.70);
    border:1px solid rgba(255,255,255,.10);
    border-radius:24px;
    padding:20px;
    box-shadow:0 18px 48px rgba(0,0,0,.25);
}

.qr-box{
    min-height:360px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    text-align:center;
}

.qr-box img{
    max-width:320px;
    width:100%;
    height:auto;
    border-radius:16px;
    padding:12px;
    background:#fff;
    box-shadow:
        0 0 0 1px rgba(255,255,255,.08),
        0 22px 60px rgba(0,0,0,.45);
}

#qrHint{
    margin-top:12px;
    color:var(--muted);
}

.warning{
    margin-top:18px;
    color:#ffdfb0;
    background:rgba(255,122,24,.12);
    border:1px solid rgba(255,150,45,.30);
    padding:14px;
    border-radius:16px;
}

.item-line{
    padding:15px;
    border:1px solid rgba(255,255,255,.10);
    border-radius:16px;
    margin:10px 0;
    background:rgba(6,17,31,.70);
}

.item-line span{
    float:right;
}

pre,
#waStatus{
    white-space:pre-wrap;
    overflow:auto;
    max-height:190px;
    color:#b6c9e2;
    background:rgba(5,15,30,.58);
    padding:12px;
    border-radius:16px;
    border:1px solid rgba(255,255,255,.08);
}

/* ANIMATION */

@keyframes logoFloat{
    0%{
        transform:translateY(0px);
    }

    50%{
        transform:translateY(-8px);
    }

    100%{
        transform:translateY(0px);
    }
}

/* RESPONSIVE */

@media(max-width:1100px){
    .cards{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:900px){

    .sidebar{
        position:static;
        width:auto;
        border-right:0;
        border-bottom:1px solid rgba(255,255,255,.08);
    }

    .logo-pro{
        justify-content:flex-start;
    }

    .logo-pro img{
        width:72px;
        height:72px;
        border-radius:22px;
    }

    .main{
        margin-left:0;
    }

    .cards,
    .grid-form,
    .order-grid,
    .wa-grid{
        grid-template-columns:1fr;
    }

    .topbar{
        position:static;
    }

    .hero-admin,
    .panel,
    .cards{
        margin:18px;
    }
}

@media(max-width:560px){

    .login-card{
        padding:28px 22px;
        border-radius:26px;
    }

    .login-logo{
        width:135px;
        height:135px;
    }

    .hero-admin h1{
        font-size:34px;
    }

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

    button,
    .btn,
    .ghost,
    .danger{
        width:100%;
        text-align:center;
        margin-bottom:8px;
    }

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