:root{
    --bg:#12100d;
    --panel:#1d1712;
    --card:#261f18;
    --text:#fff8ed;
    --muted:#cdbb9e;
    --accent:#d58b3a;
    --accent2:#f5c16c;
    --danger:#e85d55;
    --ok:#31c48d;
    --line:#3a2d22;
}

*{
    box-sizing:border-box;
}

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

body{
    margin:0;
    background:radial-gradient(circle at top left,#332315,#12100d 42%);
    font-family:Inter,Arial,sans-serif;
    color:var(--text);
}

a{
    color:inherit;
}

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

/* SIDEBAR FIJO CON SCROLL */

.sidebar{
    width:340px;
    background:rgba(18,16,13,.97);
    border-right:1px solid var(--line);
    position:fixed;
    left:0;
    top:0;
    bottom:0;
    height:100vh;
    z-index:20;

    display:flex;
    flex-direction:column;

    padding:0;
}

.sidebar::-webkit-scrollbar{
    width:10px;
}

.sidebar::-webkit-scrollbar-track{
    background:#1d1712;
}

.sidebar::-webkit-scrollbar-thumb{
    background:#d58b3a;
    border-radius:20px;
}

.sidebar::-webkit-scrollbar-thumb:hover{
    background:#f5c16c;
}

.brand{
    flex-shrink:0;

    display:flex;
    align-items:center;
    gap:15px;

    padding:22px;

    border-bottom:1px solid var(--line);

    background:#14110d;
}

.brand img{
    width:78px;
    height:78px;
    object-fit:contain;
    border-radius:20px;
    background:#fff;
    padding:8px;
    flex-shrink:0;
}

.brand b{
    display:block;
    font-size:24px;
    line-height:1.1;
}

.brand span{
    color:var(--muted);
    font-size:14px;
}

.sidebar nav{
    flex:1;

    overflow-y:auto;
    overflow-x:hidden;

    display:grid;
    gap:14px;

    padding:22px;
}

.sidebar nav a{
    text-decoration:none;
    background:linear-gradient(135deg,#34281f,#211913);
    border:1px solid var(--line);
    border-radius:22px;
    min-height:72px;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    text-align:left;
    padding:14px 20px 14px 28px;
    color:var(--text);
    font-weight:800;
    font-size:22px;
    line-height:1.15;
    transition:.2s;
}

.sidebar nav a:hover{
    border-color:var(--accent);
    transform:translateX(4px);
}

/* CONTENIDO */

.main{
    flex:1;
    margin-left:340px;
    padding:28px;
    max-width:none;
    width:calc(100% - 340px);
}

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:24px;
}

.topbar h1{
    margin:0;
    font-size:42px;
}

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

/* RESTAURANTE ACTIVO */

.rest-badge{
    display:inline-flex;
    align-items:center;
    gap:12px;
    background:#211913;
    border:1px solid var(--line);
    padding:12px 16px;
    border-radius:18px;
    color:var(--muted);
}

.rest-badge img{
    width:42px;
    height:42px;
    object-fit:contain;
    background:#fff;
    border-radius:12px;
}

.active-restaurant{
    margin-top:10px;

    display:flex;
    align-items:center;
    gap:14px;

    background:rgba(38,31,24,.92);

    border:2px solid #31c48d;

    border-radius:18px;

    padding:10px 14px;

    box-shadow:0 0 15px rgba(49,196,141,.15);

    max-width:560px;
}
.active-rest-logo img{
    max-width:55px;
    max-height:55px;
    object-fit:contain;
}
.active-rest-logo img{
    max-width:70px;
    max-height:70px;
    object-fit:contain;
}

.active-restaurant span{
    display:block;
    font-size:11px;
    letter-spacing:.8px;
    color:#9ff2cf;
    font-weight:800;
}

.active-restaurant strong{
    display:block;
    font-size:18px;
    color:#fff;
    line-height:1.1;
    margin-top:2px;
}

.active-restaurant small{
    display:none;
    color:#d5ffe9;
    font-size:12px;
    margin-top:2px;
}

.no-restaurant{
    margin-top:18px;
    background:linear-gradient(135deg,#5f1f1f,#2d1111);
    border:2px solid #e85d55;
    border-radius:24px;
    padding:20px 24px;
    font-size:22px;
    font-weight:900;
    color:#fff;
}

/* GRID */

.grid{
    display:grid;
    gap:18px;
}

.grid.cards{
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
}

.card{
    background:rgba(38,31,24,.92);
    border:1px solid var(--line);
    border-radius:28px;
    padding:26px;
    box-shadow:0 16px 45px rgba(0,0,0,.25);
}

.kpi{
    font-size:54px;
    font-weight:900;
    color:var(--accent2);
}

/* TOUCH */

.touch-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:20px;
}

.touch-card img{
    width:140px !important;
    height:140px !important;
    object-fit:contain !important;
    background:transparent !important;
    padding:0 !important;
    margin-bottom:16px;
}

.touch-card b{
    font-size:34px;
}

.touch-card span{
    color:var(--muted);
    margin-top:12px;
    font-size:20px;
}

/* FORMULARIOS */

.form{
    display:grid;
    gap:16px;
    max-width:1100px;
}

.row{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:16px;
}

label{
    display:grid;
    gap:8px;
    color:var(--muted);
    font-weight:700;
}

input,
select,
textarea{
    width:100%;
    background:#100d0a;
    border:1px solid var(--line);
    color:var(--text);
    border-radius:18px;
    padding:18px;
    font-size:20px;
    outline:none;
}

input:focus,
select:focus,
textarea:focus{
    border-color:var(--accent);
}

/* BOTONES */

.btn{
    border:0;
    border-radius:22px;
    cursor:pointer;
    font-weight:800;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.btn.primary{
    background:linear-gradient(135deg,var(--accent),#a85516);
    color:#1b1007;
    border:1px solid #e6a85e;
}

.btn.big{
    min-height:76px;
    font-size:22px;
    padding:0 30px;
}

.btn.danger{
    background:linear-gradient(135deg,#7f1d1d,#3f1111);
}

/* TABLAS */

table{
    width:100%;
    border-collapse:collapse;
    background:var(--card);
    border-radius:20px;
    overflow:hidden;
}

th{
    background:#1a130e;
    color:var(--accent2);
}

th,
td{
    padding:16px;
    text-align:left;
    border-bottom:1px solid var(--line);
}

/* ALERTAS */

.alert{
    background:#2d2116;
    border:1px solid var(--accent);
    padding:16px;
    border-radius:18px;
    margin-bottom:20px;
}

.pill{
    padding:8px 14px;
    border-radius:20px;
    background:#19130e;
    border:1px solid var(--line);
    display:inline-block;
}

.low{
    color:var(--danger);
    font-weight:900;
}

.ok{
    color:var(--ok);
    font-weight:900;
}

/* CAPTURA INVENTARIO */

.scanner-box{
    font-size:34px;
    min-height:80px;
}

.qty-box{
    font-size:40px;
    text-align:center;
}

.product-hit{
    font-size:28px;
    font-weight:900;
}

/* LOGIN */

.login-wrap{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:25px;
}

.login-card{
    width:min(550px,100%);
    background:rgba(38,31,24,.95);
    border:1px solid var(--line);
    border-radius:32px;
    padding:35px;
}

.login-logo{
    max-width:220px;
    max-height:120px;
    display:block;
    margin:0 auto 25px;
    background:#fff;
    border-radius:16px;
    padding:12px;
}

.file-note{
    font-size:13px;
    color:var(--muted);
}

/* RESPONSIVE */

@media(max-width:850px){

    .shell{
        display:block;
    }

    .sidebar{
        position:relative;
        width:auto;
        height:auto;
        max-height:none;
    }

    .main{
        margin-left:0;
        width:100%;
        padding:16px;
    }

    .topbar h1{
        font-size:28px;
    }

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

    .sidebar nav a{
        min-height:60px;
        font-size:16px;
        padding:12px 15px;
    }

    .touch-card b{
        font-size:24px;
    }

    .touch-card span{
        font-size:16px;
    }

    .active-restaurant{
        align-items:flex-start;
        padding:16px;
    }

    .active-rest-logo{
        width:64px;
        height:64px;
    }

    .active-rest-logo img{
        max-width:54px;
        max-height:54px;
    }

    .active-restaurant strong{
        font-size:24px;
    }

    .active-restaurant small{
        font-size:14px;
    }

    .no-restaurant{
        font-size:18px;
    }
}

.sidebar nav::-webkit-scrollbar{
    width:10px;
}

.sidebar nav::-webkit-scrollbar-track{
    background:#1d1712;
}

.sidebar nav::-webkit-scrollbar-thumb{
    background:#d58b3a;
    border-radius:20px;
}

.sidebar nav::-webkit-scrollbar-thumb:hover{
    background:#f5c16c;
}

.restaurant-logo{
    width:180px;
    height:180px;
    object-fit:contain;
}

/* Selección de restaurante solo por logo */

.section-title{
    font-size:28px;
    margin:26px 0 16px;
    color:var(--accent2);
}

.logo-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:22px;
}

.logo-card{
    min-height:190px;

    background:linear-gradient(
        135deg,
        rgba(52,40,31,.95),
        rgba(33,25,19,.95)
    );

    border:1px solid var(--line);
    border-radius:32px;

    padding:24px;

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;

    gap:18px;

    cursor:pointer;
    transition:.25s;
}

.logo-card:hover{
    border-color:var(--accent);
    transform:translateY(-4px);
    box-shadow:0 15px 40px rgba(213,139,58,.15);
}

.logo-card:hover{
    border-color:var(--accent);
    transform:translateY(-4px);
}

.logo-card img{
    max-width:190px;
    max-height:190px;
    width:auto;
    height:auto;
    object-fit:contain;
    background:transparent;
    padding:0;
}

.bodega-card{
    border-color:#31c48d;
    background:linear-gradient(135deg,#123d2d,#0f2f24);
}

@media(max-width:850px){
    .logo-grid{
        grid-template-columns:repeat(2,1fr);
        gap:14px;
    }

    .logo-card{
        min-height:170px;
        padding:18px;
    }

    .logo-card img{
        max-width:150px;
        max-height:150px;
    }
}

/* CORRECCIÓN ACCIONES RÁPIDAS */

.touch-card{
    min-height:200px;
    border-radius:30px;
    background:linear-gradient(135deg,#30251b,#1c1510);
    border:1px solid var(--line);
    padding:28px;
    text-decoration:none !important;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:flex-start;
    color:var(--text);
}

.touch-card:hover{
    border-color:var(--accent);
    transform:translateY(-3px);
}

.touch-card b{
    display:block;
    font-size:34px;
    line-height:1.1;
    color:var(--text);
    text-decoration:none !important;
}

.touch-card span{
    display:block;
    color:var(--muted);
    margin-top:12px;
    font-size:20px;
    text-decoration:none !important;
}

.touch-card,
.touch-card *{
    text-decoration:none !important;
}

.logo-name{
    font-size:16px;
    font-weight:700;
    color:var(--text);
    text-align:center;
    line-height:1.2;
    max-width:90%;
}

.check-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:12px;
}

.check-card{
    background:#100d0a;
    border:1px solid var(--line);
    border-radius:18px;
    padding:14px;
    display:flex;
    align-items:center;
    gap:12px;
}

.check-card input{
    width:24px;
    height:24px;
}

.check-card span{
    color:var(--text);
    font-size:18px;
}

.check-card small{
    display:block;
    color:var(--muted);
    font-size:13px;
}
/* Pantalla de captura sin menú */

body.capture-full .sidebar{
    display:none;
}

body.capture-full .main{
    margin-left:0;
    width:100%;
    padding:34px;
}

.capture-card{
    max-width:1100px;
}

/* Botones rápidos para cantidad */

.quick-qty{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(110px,1fr));
    gap:12px;
    margin-top:12px;
}

.quick-qty button{
    min-height:64px;
    border-radius:18px;
    border:1px solid var(--line);
    background:#100d0a;
    color:var(--text);
    font-size:24px;
    font-weight:900;
    cursor:pointer;
}

.quick-qty button:hover{
    border-color:var(--accent);
    background:#211913;
}

/* Resultados de búsqueda manual */

.product-results{
    display:grid;
    gap:12px;
}

.product-select-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    background:#100d0a;
    border:1px solid var(--line);
    border-radius:20px;
    padding:16px;
}

.product-select-card b{
    display:block;
    font-size:22px;
}

.product-select-card span{
    display:block;
    color:var(--muted);
    margin-top:4px;
}

@media(max-width:850px){
    body.capture-full .main{
        padding:16px;
    }

    .product-select-card{
        display:grid;
    }
}

body.capture-full .sidebar{
    display:none !important;
}

body.capture-full .main{
    margin-left:0 !important;
    width:100% !important;
    padding:34px !important;
}

.capture-layout{
    display:grid;
    grid-template-columns:minmax(0, 1.9fr) minmax(380px, .9fr);
    gap:22px;
    align-items:start;
}

.capture-left{
    min-width:0;
}

.capture-right{
    position:sticky;
    top:24px;
    min-width:0;
}

.capture-summary-card{
    min-height:420px;
}

.capture-summary-card table{
    font-size:15px;
}

.capture-summary-card th,
.capture-summary-card td{
    padding:12px;
}

@media(max-width:1000px){
    .capture-layout{
        grid-template-columns:1fr;
    }

    .capture-right{
        position:relative;
        top:auto;
    }
}
.mini-delete{
    border:0;
    background:transparent;
    color:#ff6b6b;
    cursor:pointer;
    font-size:20px;
}

.capture-right > div:first-child{
    position:sticky;
    top:24px;
    z-index:5;
}

.modal-bg{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.75);
    z-index:999;
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
}

.modal-card{
    width:min(620px,100%);
    background:rgba(38,31,24,.98);
    border:1px solid var(--line);
    border-radius:28px;
    padding:28px;
    box-shadow:0 20px 60px rgba(0,0,0,.45);
}

.modal-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-top:18px;
}

.capture-mode{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:14px;
    margin-bottom:16px;
}

.radio-card{
    background:#100d0a;
    border:1px solid var(--line);
    border-radius:18px;
    padding:16px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
}

.radio-card input{
    width:22px;
    height:22px;
    margin-right:10px;
}

.radio-card span{
    color:var(--text);
    font-size:20px;
    font-weight:900;
}

.quick-results{
    margin-top:10px;
    margin-bottom:14px;
    max-height:260px;
    overflow:auto;
    padding:16px;
}

.quick-results .product-select-card{
    padding:12px 14px;
}

.quick-results h3{
    margin-top:0;
}

.capture-card-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:18px;
    margin-bottom:16px;
}

.capture-card-head h2{
    margin-top:0;
}

.capture-switch{
    display:flex;
    align-items:center;
    gap:12px;
    background:#100d0a;
    border:1px solid var(--line);
    border-radius:999px;
    padding:10px 14px;
    cursor:pointer;
    min-width:190px;
    justify-content:center;
}

.capture-switch input{
    display:none;
}

.capture-switch .slider{
    width:56px;
    height:30px;
    background:#31c48d;
    border-radius:999px;
    position:relative;
    transition:.2s;
}

.capture-switch .slider:before{
    content:'';
    position:absolute;
    width:24px;
    height:24px;
    top:3px;
    left:29px;
    background:white;
    border-radius:50%;
    transition:.2s;
}

.capture-switch input:checked + .slider{
    background:#d58b3a;
}

.capture-switch input:checked + .slider:before{
    left:3px;
}

.capture-switch b{
    color:var(--text);
    font-size:15px;
    white-space:nowrap;
}

@media(max-width:850px){
    .capture-card-head{
        display:grid;
    }

    .capture-switch{
        width:100%;
    }
}

.scanner-toggle-box{
    min-width:280px;
    background:#100d0a;
    border:1px solid var(--line);
    border-radius:22px;
    padding:14px 16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    box-shadow:0 12px 28px rgba(0,0,0,.25);
}

.scanner-toggle-label{
    display:grid;
    gap:2px;
}

.scanner-toggle-label span{
    font-size:19px;
    font-weight:900;
    color:var(--text);
}

.scanner-toggle-label small{
    font-size:13px;
    color:var(--muted);
    font-weight:800;
}

.scanner-switch{
    position:relative;
    width:74px;
    height:38px;
    display:inline-block;
    flex-shrink:0;
}

.scanner-switch input{
    opacity:0;
    width:0;
    height:0;
}

.scanner-switch span{
    position:absolute;
    cursor:pointer;
    inset:0;
    background:#31c48d;
    border-radius:999px;
    transition:.25s;
    border:2px solid rgba(255,255,255,.18);
}

.scanner-switch span:before{
    content:'';
    position:absolute;
    height:28px;
    width:28px;
    left:4px;
    top:3px;
    background:#fff;
    border-radius:50%;
    transition:.25s;
    box-shadow:0 3px 10px rgba(0,0,0,.35);
}

.scanner-switch input:checked + span{
    background:#d58b3a;
}

.scanner-switch input:checked + span:before{
    transform:translateX(34px);
}

.capture-card-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:22px;
    margin-bottom:18px;
}

.capture-card-head h2{
    margin-top:0;
    margin-bottom:10px;
}

@media(max-width:900px){
    .capture-card-head{
        display:grid;
    }

    .scanner-toggle-box{
        width:100%;
        min-width:0;
    }
}

.mini-delete{
    background:none;
    border:0;
    color:#ff6b6b;
    cursor:pointer;
}

.mini-delete svg{
    width:18px;
    height:18px;
}

.capture-summary-card{
    max-height:520px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
}

.capture-summary-card > div{
    overflow-y:auto;
    max-height:360px;
}

.summary-search{
    margin-bottom:14px;
    font-size:18px;
    padding:12px 16px;
    border-radius:16px;
}

.capture-summary-card{

    height:450px;

}

.summary-scroll{

    overflow-y:auto;

    height:520px;

    padding-right:6px;

}

.summary-scroll::-webkit-scrollbar{

    width:8px;

}

.summary-scroll::-webkit-scrollbar-thumb{

    background:#5a4024;

    border-radius:10px;

}

.modal-large{
    width:min(980px,96vw);
}

.modal-summary-scroll{
    max-height:60vh;
    overflow-y:auto;
    margin-top:14px;
}

.summary-search{
    margin-top:8px;
    margin-bottom:10px;
    font-size:20px;
    padding:14px 18px;
    border-radius:18px;
}

/* =====================================================
   ADMIN LAYOUT FINAL
===================================================== */

.sidebar-admin{
    width:215px !important;
}

body.admin-layout .main{
    margin-left:215px !important;
    width:calc(100% - 215px) !important;
    padding:24px 28px !important;
}

.sidebar-admin .brand{
    padding:12px !important;
    gap:10px !important;
}

.sidebar-admin .brand img{
    width:46px !important;
    height:46px !important;
    border-radius:12px !important;
}

.sidebar-admin .brand b{
    font-size:16px !important;
    line-height:1.05 !important;
}

.sidebar-admin .brand span{
    font-size:11px !important;
}

.sidebar-admin .admin-nav{
    display:flex !important;
    flex-direction:column !important;
    gap:5px !important;
    padding:10px !important;
    overflow-y:auto;
}

.sidebar-admin .admin-nav > a,
.sidebar-admin .admin-nav .menu-group > a{
    min-height:38px !important;
    border-radius:10px !important;
    font-size:14px !important;
    line-height:1.05 !important;
    padding:8px 11px !important;
}

.sidebar-admin .menu-section{
    border:0 !important;
    background:none !important;
    color:#cdbb9e !important;
    font-size:10px !important;
    font-weight:900 !important;
    letter-spacing:.15em !important;
    text-align:left !important;
    padding:9px 6px 3px !important;
    cursor:pointer;
    width:100%;
}

.sidebar-admin .menu-section::after{
    content:"+";
    float:right;
    font-size:15px;
}

.sidebar-admin .menu-section.active::after{
    content:"−";
}

.sidebar-admin .menu-group{
    display:none !important;
}

.sidebar-admin .menu-group.active{
    display:flex !important;
    flex-direction:column !important;
    gap:5px !important;
}

.sidebar-admin .active-link{
    border-color:var(--accent) !important;
    background:linear-gradient(135deg,#3b2b1c,#211913) !important;
    box-shadow:inset 3px 0 0 var(--accent);
}

body.admin-layout .topbar h1{
    font-size:38px !important;
    line-height:1.05 !important;
}

@media(max-width:850px){
    .sidebar-admin{
        width:auto !important;
    }

    body.admin-layout .main{
        margin-left:0 !important;
        width:100% !important;
    }
}

/* ==========================
   LEADER KPI CARDS
========================== */

.leader-kpi-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:18px;
    margin-bottom:18px;
}

.leader-kpi-card{
    padding:22px 24px;
    min-height:120px;
    overflow:hidden;
}

.leader-kpi-card .kpi{
    font-size:42px;
    line-height:1.05;
    white-space:nowrap;
}

.leader-kpi-card .kpi.money{
    font-size:38px;
}

.leader-last-date{
    font-size:22px;
    font-weight:900;
    margin-top:8px;
    white-space:nowrap;
}

@media(max-width:1200px){

    .leader-kpi-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

}

@media(max-width:700px){

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

}

.text-muted{
    color:#777;
}

.small-text{
    margin-top:12px;
    font-size:14px;
}


.minmax-search-form{
    margin-bottom:16px;
}

.minmax-search-form input{
    max-width:420px;
}

.minmax-filter-form{
    margin-bottom:16px;
}

.minmax-filter-form .row{
    margin-bottom:12px;
}

.supplier-orders-card{
    margin-bottom:18px;
}

.supplier-filter-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
    align-items:end;
}

.supplier-filter-actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    align-items:end;
}

.supplier-kpi-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:18px;
    margin-bottom:18px;
}

.supplier-kpi-card{
    padding:22px 26px;
    min-height:110px;
}

.supplier-kpi-card .kpi{
    font-size:34px;
    font-weight:900;
    line-height:1.1;
    white-space:nowrap;
}

.supplier-block{
    margin-top:24px;
}

.supplier-title-row{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:center;
    flex-wrap:wrap;
    margin-bottom:10px;
}

.supplier-title-row h3{
    margin:0;
}

.supplier-summary{
    font-size:14px;
    color:#777;
}

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

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

@media(max-width:700px){
    .supplier-filter-grid{
        grid-template-columns:1fr;
    }
}

.admin-dashboard{display:flex;flex-direction:column;gap:18px;max-width:100%;overflow:hidden}

.dash-kpis{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
}

.dash-kpi-card{
  background:rgba(255,255,255,.92);
  border:1px solid rgba(255,255,255,.18);
  border-radius:16px;
  padding:18px 16px;
  min-width:0;
  overflow:hidden;
  display:flex;
  align-items:center;
  gap:12px;
  box-shadow:0 8px 22px rgba(0,0,0,.18);
}

.dash-kpi-card .muted{
  font-size:15px;
  line-height:1.15;
  color:#b89663;
  white-space:normal;
}

.dash-kpi-card .kpi{
  font-size:42px;
  line-height:1;
  font-weight:900;
  color:#f2b24d;
  white-space:nowrap;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}

.dash-kpi-icon{
  flex:0 0 48px;
  width:48px;
  height:48px;
  border-radius:16px;
  background:#eef2ff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
}

.dash-grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.dash-card{
  padding:20px 22px;
  border-radius:24px;
  overflow:hidden;
}

.bar-row{
  display:grid;
  grid-template-columns:180px minmax(120px,1fr) 80px;
  gap:12px;
  align-items:center;
  margin:14px 0;
}

.bar-label{
  font-size:14px;
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

@media(max-width:1500px){
  .dash-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(max-width:900px){
  .dash-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dash-grid-2{grid-template-columns:1fr}
}

@media(max-width:600px){
  .dash-kpis{grid-template-columns:1fr}
  .bar-row{grid-template-columns:1fr}
}

.dash-kpi-card .kpi{
  font-size: clamp(28px, 3vw, 52px);
  line-height: .95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Error cuando el código no existe */

.qty-wrap{
    display:flex;
    gap:10px;
    align-items:stretch;
}

.qty-wrap .qty-box{
    flex:1;
}

.qty-clear{
    width:130px;
    border:0;
    border-radius:14px;
    background:#b22222;
    color:#fff;
    font-weight:900;
    font-size:20px;
    cursor:pointer;
}

.qty-error .qty-box{
    border:4px solid #ff3b30 !important;
    box-shadow:0 0 22px rgba(255,59,48,.75);
    animation:qtyShake .25s;
}

.qty-success .qty-box{
    border:4px solid #22c55e !important;
    box-shadow:0 0 18px rgba(34,197,94,.7);
}

@keyframes qtyShake{
    0%{transform:translateX(0);}
    25%{transform:translateX(-5px);}
    50%{transform:translateX(5px);}
    75%{transform:translateX(-5px);}
    100%{transform:translateX(0);}
}
