:root{
  --navy:#0b1220; --navy2:#111827; --blue:#2563eb; --blue2:#1d4ed8;
  --bg:#f5f7fb; --card:#ffffff; --text:#0f172a; --muted:#64748b;
  --border:#e2e8f0; --green:#059669; --red:#dc2626; --orange:#f97316; --purple:#7c3aed;
}
*{box-sizing:border-box}
html,body{max-width:100%;overflow-x:hidden}
body{margin:0;font-family:Inter,Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text);font-size:15px}
a{text-decoration:none;color:inherit}.layout{display:flex;min-height:100vh}
.sidebar{position:fixed;top:0;bottom:0;left:0;width:260px;background:linear-gradient(180deg,#0b1220,#111827);color:#fff;padding:20px 16px;overflow-y:auto;z-index:1000}
.brand{font-size:28px;font-weight:900;line-height:1.05;margin-bottom:8px;letter-spacing:-.5px}
.user{font-size:13px;color:#cbd5e1;margin-bottom:18px}
.sidebar a{display:flex;gap:10px;align-items:center;color:#fff;padding:11px 12px;border-radius:12px;margin:4px 0;font-size:15px;transition:.15s}
.sidebar a:hover{background:rgba(255,255,255,.10);transform:translateX(2px)}
.menu-title{font-size:11px;color:#93a4bd;text-transform:uppercase;margin:18px 8px 8px;letter-spacing:.08em}
.main{margin-left:260px;width:calc(100% - 260px);padding:22px}
.topbar{background:#fff;border:1px solid var(--border);border-radius:18px;padding:14px 18px;box-shadow:0 10px 30px rgba(15,23,42,.05);display:flex;justify-content:space-between;gap:12px;margin-bottom:18px;align-items:center}
.topbar strong{font-size:18px}.topbar span{color:#334155}
.top-search{display:flex;gap:8px;align-items:center;flex:1;max-width:620px;margin:0 18px}
.top-search input{border-radius:999px;background:#f8fafc}.top-search button{border-radius:999px;min-height:42px}
.card{background:#fff;border:1px solid var(--border);border-radius:20px;padding:22px;box-shadow:0 10px 30px rgba(15,23,42,.05);margin-bottom:18px}
.page-title{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:0 0 16px}.page-title h1,.page-title h2{margin:0}
.grid,.kpi-row{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.stat{background:#fff;border:1px solid var(--border);border-radius:20px;padding:20px;box-shadow:0 10px 25px rgba(15,23,42,.05);position:relative;overflow:hidden}.stat:after{content:"";position:absolute;right:-28px;top:-28px;width:88px;height:88px;background:rgba(37,99,235,.10);border-radius:50%}.stat h3{margin:0;font-size:13px;color:var(--muted);font-weight:700}.stat p{font-size:34px;font-weight:900;margin:10px 0 0;letter-spacing:-.5px}.stat.blue{border-left:5px solid var(--blue)}.stat.green{border-left:5px solid var(--green)}.stat.orange{border-left:5px solid var(--orange)}.stat.purple{border-left:5px solid var(--purple)}
.quick-actions{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.quick-card{background:#f8fafc;border:1px solid var(--border);border-radius:16px;padding:16px;text-align:center;font-weight:800;transition:.15s}.quick-card:hover{background:#eef2ff;transform:translateY(-2px)}
.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}label{font-weight:800;font-size:13px;display:block;margin-bottom:6px;color:#0f172a}input,select,textarea{width:100%;padding:12px;border:1px solid #cbd5e1;border-radius:12px;font-size:15px;min-height:46px;background:#fff;outline:none}input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,.12)}textarea{min-height:90px;resize:vertical}
button,.btn{background:var(--navy);color:#fff;border:0;border-radius:12px;padding:12px 16px;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;font-size:15px;min-height:44px;line-height:20px;font-weight:800}.btn.green,button.green{background:var(--green)}.btn.red{background:var(--red)}.btn.gray{background:#475569}.btn.blue{background:var(--blue)}.btn.small{font-size:12px;padding:7px 10px;min-height:34px;border-radius:9px}
.badge{display:inline-block;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:800}.badge.green{background:#dcfce7;color:#166534}.badge.orange{background:#ffedd5;color:#9a3412}.badge.red{background:#fee2e2;color:#991b1b}.badge.blue{background:#dbeafe;color:#1e40af}
.form-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:15px}.searchbar{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.searchbar>div{min-width:210px;flex:1}.table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:14px;border:1px solid var(--border)}table{width:100%;border-collapse:collapse;min-width:860px;background:#fff}th,td{padding:12px;border-bottom:1px solid #e5e7eb;text-align:left;font-size:13px;vertical-align:top}th{background:#f8fafc;white-space:nowrap;color:#334155;font-weight:900}tr:hover td{background:#fcfdff}
.alert,.notice,.warn{padding:13px;border-radius:14px;margin-bottom:14px}.alert.success{background:#dcfce7;color:#166534}.alert.error{background:#fee2e2;color:#991b1b}.notice{background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a}.warn{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412}.help{font-size:12px;color:var(--muted);margin-top:5px}
.login-wrap{width:min(92vw,520px);margin:70px auto;background:#fff;border-radius:22px;padding:36px;box-shadow:0 20px 45px rgba(15,23,42,.12)}.login-wrap h1{font-size:34px;margin-top:0}
.mobile-menu-toggle,.mobile-menu-btn,.mobile-overlay{display:none}
.mobile-bottom-nav{display:none}.empty-state{text-align:center;padding:30px;color:var(--muted)}
.activity-list{display:grid;gap:10px}.activity-item{padding:12px;border:1px solid var(--border);border-radius:14px;background:#f8fafc;display:flex;justify-content:space-between;gap:12px}
@media(max-width:1200px){.grid,.kpi-row{grid-template-columns:repeat(2,1fr)}.quick-actions{grid-template-columns:repeat(3,1fr)}.form-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:768px){
 body{font-size:15px;padding-bottom:74px}.mobile-menu-toggle{position:absolute;opacity:0;pointer-events:none}.mobile-menu-btn{display:block;position:sticky;top:0;z-index:1200;width:100%;border-radius:0;background:var(--navy);color:#fff;text-align:left;padding:13px 16px;font-weight:900;font-size:16px;min-height:50px}.mobile-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:999}.layout{display:block}.sidebar{transform:translateX(-105%);transition:transform .25s ease;width:min(84vw,320px);box-shadow:8px 0 25px rgba(0,0,0,.25);z-index:1100}#mobileMenuToggle:checked ~ .layout .sidebar{transform:translateX(0)}#mobileMenuToggle:checked ~ .mobile-overlay{display:block}.main{margin-left:0;width:100%;padding:12px}.topbar{display:block;padding:13px;border-radius:14px}.topbar span{display:block;margin-top:6px;color:var(--muted)}.top-search{max-width:100%;margin:10px 0 0;display:flex}.card{padding:15px;border-radius:16px}.grid,.kpi-row,.form-grid,.quick-actions{grid-template-columns:1fr;gap:11px}.searchbar{display:block}.searchbar>div{min-width:0;margin-bottom:10px}input,select,textarea{font-size:16px;min-height:48px}button,.btn{width:100%;text-align:center;margin-bottom:8px;font-size:16px;min-height:48px}.btn.small{width:auto;min-height:36px;display:inline-flex;margin-bottom:4px}.form-actions{display:block}.table-wrap{margin-top:8px}table{min-width:760px}th,td{font-size:12px;padding:9px}.login-wrap{margin:24px auto;width:94vw;padding:24px}.mobile-bottom-nav{display:grid;position:fixed;left:0;right:0;bottom:0;z-index:1300;background:#fff;border-top:1px solid var(--border);grid-template-columns:repeat(4,1fr);box-shadow:0 -8px 25px rgba(15,23,42,.08)}.mobile-bottom-nav a{padding:9px 4px;text-align:center;font-size:12px;font-weight:800;color:#0f172a}
}
@media(max-width:420px){.main{padding:10px}.card{padding:13px}.brand{font-size:24px}.stat p{font-size:30px}table{min-width:720px}}
@media print{.sidebar,.topbar,.mobile-menu-btn,.mobile-overlay,.mobile-bottom-nav,.btn,button,form,.no-print{display:none!important}.main{margin:0;width:100%;padding:0}.card{box-shadow:none;border-radius:0;border:0}body{background:#fff}.table-wrap{overflow:visible;border:0}table{min-width:0}}


/* V15 Desktop UI Fix */
.topbar{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:20px !important;
}
.top-search{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    gap:12px !important;
    max-width:700px !important;
    flex:1 !important;
}
.top-search input{
    flex:1 !important;
    width:100% !important;
}
.top-search button{
    width:auto !important;
    min-width:130px !important;
    margin:0 !important;
}

.quick-actions{
    display:grid !important;
    grid-template-columns:repeat(5,1fr) !important;
    gap:14px !important;
}
.quick-card{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:90px !important;
    font-size:16px !important;
    font-weight:800 !important;
    color:#0f172a !important;
    background:linear-gradient(180deg,#ffffff,#f8fafc) !important;
    border:1px solid #dbe3ef !important;
}
.quick-card:hover{
    background:#eff6ff !important;
    color:#1d4ed8 !important;
}

.activity-list{
    display:flex !important;
    flex-direction:column !important;
    gap:12px !important;
}
.activity-item{
    background:#ffffff !important;
    border:1px solid #dbe3ef !important;
    border-left:5px solid #2563eb !important;
    padding:14px !important;
    border-radius:14px !important;
    font-size:14px !important;
}

.card h2{
    color:#0f172a !important;
    margin-bottom:18px !important;
}

.stat{
    background:linear-gradient(180deg,#ffffff,#f8fafc) !important;
}

body{
    background:#eef2f7 !important;
}

.main{
    padding:24px !important;
}

@media(max-width:768px){
    .top-search{
        flex-direction:column !important;
        align-items:stretch !important;
    }
    .top-search button{
        width:100% !important;
    }
    .quick-actions{
        grid-template-columns:1fr !important;
    }
}


/* ============================
   V16 Fixed Topbar + Profile Menu
   ============================ */

.main{
    padding-top:96px !important;
}

.fixed-topbar{
    position:fixed;
    top:0;
    left:260px;
    right:0;
    height:76px;
    z-index:950;
    background:#ffffff;
    border-bottom:1px solid #e2e8f0;
    box-shadow:0 8px 24px rgba(15,23,42,.06);
    display:flex;
    align-items:center;
    gap:18px;
    padding:12px 24px;
}

.topbar-left{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:235px;
}
.company-mark{
    width:42px;
    height:42px;
    border-radius:14px;
    background:linear-gradient(135deg,#2563eb,#0f172a);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
}
.topbar-left strong{
    display:block;
    font-size:17px;
    line-height:19px;
}
.topbar-left small{
    display:block;
    color:#64748b;
    font-size:12px;
}

.global-search{
    flex:1;
    max-width:760px;
    display:flex;
    align-items:center;
    gap:10px;
}
.global-search input{
    border-radius:999px !important;
    background:#f8fafc !important;
    height:46px;
}
.global-search button{
    border-radius:999px !important;
    min-width:110px;
    height:46px;
    margin:0 !important;
}

.topbar-right{
    margin-left:auto;
    display:flex;
    align-items:center;
    gap:12px;
}
.notify-bell{
    width:42px;
    height:42px;
    border:1px solid #e2e8f0;
    background:#f8fafc;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
}
.top-date{
    color:#334155;
    font-weight:700;
    white-space:nowrap;
}

.profile-menu{
    position:relative;
}
.profile-trigger{
    background:#f8fafc !important;
    color:#0f172a !important;
    border:1px solid #e2e8f0 !important;
    border-radius:999px !important;
    padding:6px 10px 6px 6px !important;
    display:flex !important;
    align-items:center;
    gap:8px;
    min-height:44px !important;
    margin:0 !important;
    width:auto !important;
}
.avatar{
    width:34px;
    height:34px;
    border-radius:50%;
    background:linear-gradient(135deg,#f59e0b,#ef4444);
    color:#fff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
}
.avatar.large{
    width:46px;
    height:46px;
}
.profile-name{
    font-weight:800;
    max-width:130px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.profile-dropdown{
    display:none;
    position:absolute;
    right:0;
    top:54px;
    width:285px;
    background:#fff;
    border:1px solid #e2e8f0;
    border-radius:18px;
    box-shadow:0 18px 45px rgba(15,23,42,.16);
    padding:10px;
    z-index:2000;
}
.profile-dropdown.show{
    display:block;
}
.profile-head{
    display:flex;
    gap:12px;
    align-items:center;
    padding:12px;
    border-radius:14px;
    background:#f8fafc;
    margin-bottom:8px;
}
.profile-head b{
    display:block;
}
.profile-head small{
    display:block;
    color:#64748b;
    font-size:12px;
    margin-top:3px;
}
.profile-dropdown a{
    display:flex;
    gap:10px;
    align-items:center;
    padding:11px 12px;
    border-radius:12px;
    color:#0f172a;
    font-weight:700;
}
.profile-dropdown a:hover{
    background:#eff6ff;
    color:#1d4ed8;
}
.profile-dropdown .logout-link{
    color:#b91c1c;
}
.dropdown-sep{
    height:1px;
    background:#e2e8f0;
    margin:8px 4px;
}

/* Remove old topbar spacing conflicts */
.topbar{
    display:none !important;
}

/* Sidebar should not show admin-only account controls */
.sidebar a[href*="/modules/users"],
.sidebar a[href*="/modules/backup"],
.sidebar a[href*="/modules/audit"],
.sidebar a[href*="/modules/company"],
.sidebar a[href*="/modules/help"]{
    display:none !important;
}

@media(max-width:1100px){
    .fixed-topbar{
        left:0;
        height:auto;
        min-height:74px;
        flex-wrap:wrap;
        padding:10px 14px;
    }
    .main{
        padding-top:142px !important;
    }
    .topbar-left{
        min-width:auto;
        flex:1;
    }
    .global-search{
        order:3;
        max-width:none;
        width:100%;
        flex-basis:100%;
    }
}

@media(max-width:768px){
    .fixed-topbar{
        left:0;
        top:50px;
        padding:10px;
        gap:8px;
    }
    .main{
        padding-top:170px !important;
    }
    .topbar-left small{
        display:none;
    }
    .company-mark{
        width:36px;
        height:36px;
        border-radius:12px;
    }
    .topbar-left strong{
        font-size:14px;
    }
    .top-date{
        display:none;
    }
    .notify-bell{
        width:38px;
        height:38px;
    }
    .profile-name{
        display:none;
    }
    .profile-trigger{
        padding:4px !important;
        min-height:38px !important;
    }
    .avatar{
        width:30px;
        height:30px;
    }
    .profile-dropdown{
        right:0;
        width:min(92vw,300px);
    }
    .global-search{
        display:flex !important;
        flex-direction:row !important;
        gap:8px;
    }
    .global-search input{
        min-height:42px;
        height:42px;
    }
    .global-search button{
        width:auto !important;
        min-width:86px;
        min-height:42px;
        height:42px;
        margin:0 !important;
        padding:9px 12px;
    }
}



/* V17 Sidebar Width + Layout Balance Fix */

.sidebar{
    width: 220px !important;
    min-width: 220px !important;
    padding: 18px 14px !important;
}

.sidebar .brand{
    font-size: 26px !important;
    line-height: 1.15 !important;
    margin-bottom: 14px !important;
}

.sidebar .user{
    font-size: 14px !important;
    margin-bottom: 18px !important;
}

.sidebar a{
    padding: 10px 12px !important;
    font-size: 15px !important;
    border-radius: 12px !important;
    margin-bottom: 4px !important;
}

.sidebar .menu-title{
    font-size: 12px !important;
    margin-top: 14px !important;
}

.main{
    margin-left: 220px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

.fixed-topbar{
    left: 220px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

.card{
    border-radius: 18px !important;
}

@media(max-width:1100px){
    .sidebar{
        width: 260px !important;
        min-width: 260px !important;
    }
    .main{
        margin-left: 0 !important;
    }
    .fixed-topbar{
        left: 0 !important;
    }
}


/* ============================
   V18 Final Polish UI Upgrade
   ============================ */

body{
    background:linear-gradient(180deg,#f3f6fb 0%,#eef3f9 100%) !important;
    font-size:14px !important;
}

.sidebar{
    width:210px !important;
    min-width:210px !important;
    padding:18px 12px !important;
}
.sidebar .brand{
    font-size:24px !important;
    line-height:1.08 !important;
    letter-spacing:-0.5px !important;
    margin-bottom:10px !important;
}
.sidebar .user{
    font-size:12px !important;
    color:#b8c3d3 !important;
    margin-bottom:18px !important;
}
.sidebar a{
    display:flex !important;
    align-items:center !important;
    gap:10px !important;
    font-size:14px !important;
    padding:9px 10px !important;
    border-radius:11px !important;
    margin:4px 0 !important;
}
.sidebar a:hover{
    background:rgba(255,255,255,.11) !important;
}
.nav-ico{
    width:25px;
    height:25px;
    min-width:25px;
    border-radius:9px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:9px;
    font-weight:900;
    background:rgba(255,255,255,.13);
    color:#dbeafe;
    border:1px solid rgba(255,255,255,.10);
}
.menu-title{
    font-size:10px !important;
    margin:16px 8px 6px !important;
    color:#9aa8bd !important;
}

.main{
    margin-left:210px !important;
    padding:96px 22px 22px !important;
}
.fixed-topbar{
    left:210px !important;
    height:76px !important;
    padding:12px 24px !important;
    gap:18px !important;
}
.company-mark{
    width:40px !important;
    height:40px !important;
    box-shadow:0 10px 24px rgba(37,99,235,.22);
}
.topbar-left{
    min-width:265px !important;
}
.topbar-left strong{
    font-size:18px !important;
}
.global-search{
    max-width:820px !important;
    flex:1 1 620px !important;
}
.global-search input{
    height:44px !important;
    min-height:44px !important;
    font-size:14px !important;
    padding-left:20px !important;
    background:#f8fbff !important;
}
.global-search button{
    height:44px !important;
    min-height:44px !important;
    min-width:115px !important;
    background:#0b1220 !important;
    box-shadow:0 8px 18px rgba(11,18,32,.16);
}
.topbar-right{
    gap:14px !important;
}
.top-date{
    font-size:14px !important;
}
.notify-bell{
    position:relative;
    width:42px !important;
    height:42px !important;
    color:#f59e0b !important;
    font-weight:900;
}
.notify-bell span{
    display:block;
    width:14px;
    height:14px;
    border-radius:50%;
    background:#f59e0b;
    color:#fff;
    font-size:10px;
    line-height:14px;
    text-align:center;
}
.notify-bell em{
    position:absolute;
    right:-3px;
    top:-4px;
    background:#ef4444;
    color:#fff;
    font-style:normal;
    font-size:10px;
    min-width:17px;
    height:17px;
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:2px solid #fff;
}
.profile-trigger{
    background:#ffffff !important;
    box-shadow:0 6px 18px rgba(15,23,42,.06);
}
.profile-name{
    max-width:105px !important;
}

.dashboard-hero{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:22px;
    padding:22px 26px;
    border-radius:24px;
    background:linear-gradient(135deg,#0f172a 0%,#1d4ed8 100%);
    color:#fff;
    box-shadow:0 20px 40px rgba(37,99,235,.18);
}
.dashboard-hero h1{
    margin:0 0 6px;
    font-size:32px;
    letter-spacing:-.8px;
}
.dashboard-hero p{
    margin:0;
    color:#dbeafe;
}
.hero-action{
    background:#ffffff !important;
    color:#1d4ed8 !important;
    border-radius:14px !important;
    box-shadow:none !important;
    min-width:160px;
}

.grid,.kpi-row{
    gap:18px !important;
}
.stat{
    min-height:140px !important;
    padding:24px !important;
    border-radius:22px !important;
    box-shadow:0 14px 32px rgba(15,23,42,.07) !important;
}
.stat h3{
    font-size:14px !important;
    color:#5d6b82 !important;
}
.stat p{
    font-size:38px !important;
    margin-top:14px !important;
    color:#071226;
}

.card{
    border-radius:24px !important;
    border:1px solid #dde6f2 !important;
    box-shadow:0 16px 36px rgba(15,23,42,.07) !important;
    padding:26px !important;
}
.card h2{
    font-size:26px !important;
    letter-spacing:-.4px !important;
}

.quick-actions{
    display:grid !important;
    grid-template-columns:repeat(5,minmax(150px,1fr)) !important;
    gap:16px !important;
}
.quick-card{
    min-height:118px !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    justify-content:space-between !important;
    padding:18px !important;
    border-radius:20px !important;
    color:#0f172a !important;
    background:linear-gradient(180deg,#ffffff,#f8fbff) !important;
    border:1px solid #dce6f2 !important;
    box-shadow:0 12px 26px rgba(15,23,42,.05) !important;
}
.quick-card span{
    width:42px;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:15px;
    background:#eff6ff;
    color:#1d4ed8;
    font-size:11px;
    font-weight:900;
}
.quick-card b{
    font-size:16px;
}
.quick-card:hover{
    transform:translateY(-4px) !important;
    box-shadow:0 18px 36px rgba(37,99,235,.14) !important;
}

.activity-item{
    border-left:4px solid #2563eb !important;
    background:linear-gradient(180deg,#ffffff,#f8fbff) !important;
}
.activity-item b{
    color:#0f172a;
}

.table-wrap{
    border-radius:18px !important;
}
th{
    background:#f3f7fc !important;
}
.btn.blue{
    background:#2563eb !important;
}
.app-footer{
    margin-top:22px;
    padding:14px 6px;
    color:#64748b;
    font-size:12px;
    text-align:center;
}

@media(max-width:1200px){
    .global-search{
        max-width:520px !important;
    }
    .topbar-left{
        min-width:230px !important;
    }
    .quick-actions{
        grid-template-columns:repeat(3,1fr) !important;
    }
}

@media(max-width:768px){
    .sidebar{
        width:min(84vw,300px) !important;
        min-width:auto !important;
    }
    .main{
        margin-left:0 !important;
        padding:172px 12px 82px !important;
    }
    .fixed-topbar{
        left:0 !important;
        top:50px !important;
        height:auto !important;
        flex-wrap:wrap !important;
        padding:10px !important;
    }
    .topbar-left{
        min-width:0 !important;
        flex:1 !important;
    }
    .global-search{
        order:3;
        max-width:100% !important;
        flex-basis:100% !important;
    }
    .global-search button{
        min-width:82px !important;
    }
    .dashboard-hero{
        display:block;
        padding:18px;
        border-radius:18px;
    }
    .dashboard-hero h1{
        font-size:24px;
    }
    .hero-action{
        width:100% !important;
        margin-top:14px !important;
    }
    .quick-actions{
        grid-template-columns:1fr !important;
    }
    .stat{
        min-height:112px !important;
        padding:18px !important;
    }
    .stat p{
        font-size:30px !important;
    }
    .card{
        padding:16px !important;
        border-radius:18px !important;
    }
}


/* ============================
   V19 Topbar + Sidebar Final Fix
   ============================ */

/* Layout proportions */
.sidebar{
    width:220px !important;
    min-width:220px !important;
    padding:18px 14px !important;
}
.main{
    margin-left:220px !important;
    padding:92px 26px 22px !important;
}
.fixed-topbar.clean-topbar{
    left:220px !important;
    right:0 !important;
    height:72px !important;
    padding:12px 26px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:18px !important;
}

/* Company moved to sidebar */
.sidebar .brand{
    display:none !important;
}
.sidebar-brand-block{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:12px;
    padding:6px 4px 14px;
    border-bottom:1px solid rgba(255,255,255,.10);
}
.sidebar-logo{
    width:40px;
    height:40px;
    border-radius:14px;
    background:linear-gradient(135deg,#2563eb,#38bdf8);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
    box-shadow:0 10px 24px rgba(37,99,235,.24);
}
.sidebar-company{
    color:#fff;
    font-weight:900;
    font-size:14px;
    line-height:17px;
    max-width:145px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.sidebar-app{
    color:#9fb0c5;
    font-size:11px;
    font-weight:700;
    margin-top:1px;
}
.sidebar .user{
    font-size:12px !important;
    color:#9fb0c5 !important;
    margin:10px 4px 18px !important;
}

/* Real-looking sidebar icons instead of letters */
.nav-ico{display:none !important;}
.nav-svg{
    width:26px;
    height:26px;
    min-width:26px;
    border-radius:9px;
    background:rgba(255,255,255,.10);
    border:1px solid rgba(255,255,255,.12);
    color:#c7d2fe;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    font-weight:900;
}
.sidebar a{
    font-size:14px !important;
    padding:9px 10px !important;
    gap:10px !important;
}

/* Remove company/date from topbar */
.topbar-left,
.top-date{
    display:none !important;
}

/* Topbar search wider and cleaner */
.global-search{
    flex:1 1 auto !important;
    max-width:900px !important;
    display:flex !important;
    align-items:center !important;
    gap:12px !important;
    margin:0 !important;
}
.global-search input{
    height:46px !important;
    min-height:46px !important;
    border-radius:999px !important;
    background:#f8fbff !important;
    font-size:14px !important;
    padding-left:22px !important;
}
.global-search button{
    height:46px !important;
    min-height:46px !important;
    min-width:120px !important;
    border-radius:999px !important;
    margin:0 !important;
    background:#0b1220 !important;
    color:#fff !important;
}
.topbar-right{
    margin-left:auto !important;
    display:flex !important;
    align-items:center !important;
    gap:14px !important;
}

/* Hero scan button readability */
.dashboard-hero{
    margin-top:0 !important;
}
.hero-action{
    background:#fff !important;
    color:#1d4ed8 !important;
    font-weight:900 !important;
    border:0 !important;
    opacity:1 !important;
    text-shadow:none !important;
}
.hero-action:hover{
    background:#eff6ff !important;
    color:#1e40af !important;
}

/* KPI cards 4 boxes in one row */
.dashboard-kpis{
    grid-template-columns:repeat(4,1fr) !important;
    gap:18px !important;
    align-items:stretch !important;
}
.dashboard-kpis .stat{
    min-height:130px !important;
    height:100% !important;
}

/* Reduce zoomed feeling */
.card{
    padding:22px !important;
}
.card h2{
    font-size:24px !important;
}
.stat p{
    font-size:34px !important;
}
.dashboard-hero h1{
    font-size:34px !important;
}
.dashboard-hero{
    padding:24px 28px !important;
}

/* Footer */
.app-footer{
    margin-top:22px;
    padding:14px 6px;
    color:#64748b;
    font-size:12px;
    text-align:center;
}

/* Responsive */
@media(max-width:1200px){
    .dashboard-kpis{
        grid-template-columns:repeat(2,1fr) !important;
    }
}
@media(max-width:768px){
    .sidebar{
        width:min(84vw,300px) !important;
        min-width:auto !important;
    }
    .main{
        margin-left:0 !important;
        padding:170px 12px 82px !important;
    }
    .fixed-topbar.clean-topbar{
        left:0 !important;
        top:50px !important;
        height:auto !important;
        flex-wrap:wrap !important;
        padding:10px !important;
    }
    .global-search{
        max-width:100% !important;
        width:100% !important;
        flex-basis:100% !important;
        order:2;
    }
    .global-search button{
        min-width:82px !important;
        width:auto !important;
    }
    .topbar-right{
        order:1;
        margin-left:auto !important;
    }
    .dashboard-kpis{
        grid-template-columns:1fr !important;
    }
    .dashboard-hero{
        display:block !important;
        padding:18px !important;
    }
    .dashboard-hero h1{
        font-size:26px !important;
    }
    .hero-action{
        width:100% !important;
        margin-top:14px !important;
    }
}


/* ============================
   V20 PRINT SYSTEM FIX
   ============================ */

/* Screen label preview should be centered cleanly */
.label-preview-wrap{
    display:flex;
    justify-content:flex-start;
    align-items:flex-start;
    background:#fff;
}

/* Print only actual printable content, never dashboard UI */
@media print{
    html,body{
        background:#fff !important;
        margin:0 !important;
        padding:0 !important;
        width:100% !important;
        overflow:visible !important;
        -webkit-print-color-adjust:exact !important;
        print-color-adjust:exact !important;
    }

    .sidebar,
    .fixed-topbar,
    .topbar,
    .mobile-menu-btn,
    .mobile-overlay,
    .mobile-bottom-nav,
    .no-print,
    form,
    button,
    .btn,
    .app-footer,
    .profile-dropdown,
    .notify-bell,
    .global-search{
        display:none !important;
        visibility:hidden !important;
    }

    .layout{
        display:block !important;
        min-height:auto !important;
    }

    .main{
        margin:0 !important;
        padding:0 !important;
        width:100% !important;
        max-width:100% !important;
    }

    .card{
        box-shadow:none !important;
        border:0 !important;
        border-radius:0 !important;
        margin:0 !important;
        padding:0 !important;
        background:#fff !important;
    }

    .table-wrap{
        overflow:visible !important;
        border:0 !important;
        border-radius:0 !important;
    }

    table{
        min-width:0 !important;
        width:100% !important;
        font-size:11px !important;
    }

    th,td{
        font-size:11px !important;
        padding:5px !important;
        border:1px solid #333 !important;
    }

    /* Label printing */
    .label-box,
    .label-small,
    .label-zebra{
        display:block !important;
        visibility:visible !important;
        position:static !important;
        margin:0 auto !important;
        box-shadow:none !important;
        background:#fff !important;
        color:#000 !important;
        border:2px solid #000 !important;
        page-break-after:avoid !important;
        break-after:avoid !important;
    }

    .label-box{
        width:100mm !important;
        max-width:100mm !important;
        min-height:auto !important;
        padding:6mm !important;
        font-size:11px !important;
    }

    .label-small{
        width:50mm !important;
        max-width:50mm !important;
        padding:3mm !important;
        font-size:9px !important;
    }

    .label-zebra{
        width:100mm !important;
        max-width:100mm !important;
        min-height:150mm !important;
        padding:6mm !important;
        font-size:12px !important;
    }

    .label-box h2,
    .label-small h2,
    .label-zebra h2{
        font-size:18px !important;
        margin:0 0 4mm 0 !important;
        text-align:center !important;
    }

    .qr-image{
        display:flex !important;
        justify-content:center !important;
        margin:2mm 0 !important;
    }

    .qrbox{
        border:0 !important;
        font-size:11px !important;
        text-align:left !important;
        padding:0 !important;
        margin:2mm 0 !important;
        letter-spacing:0 !important;
    }

    .label-box p,
    .label-small p,
    .label-zebra p{
        margin:2mm 0 !important;
        font-size:11px !important;
        line-height:1.25 !important;
    }

    @page{
        margin:8mm;
    }
}


/* ============================
   V21 Nav / Report / Mobile Fix
   ============================ */

/* Remove logo box from sidebar and make company text cleaner */
.sidebar-brand-block{
    padding:4px 4px 12px !important;
    margin-bottom:12px !important;
    border-bottom:1px solid rgba(255,255,255,.10) !important;
}
.sidebar-logo{
    display:none !important;
}
.sidebar-company{
    max-width:100% !important;
    font-size:15px !important;
}
.sidebar-app{
    font-size:11px !important;
}

/* Make report action buttons preserve current filters */
.report-actions{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin-top:14px;
}
.report-actions .btn,
.report-actions button{
    margin:0 !important;
}
@media(max-width:768px){
    .report-actions{
        display:block;
    }
    .report-actions .btn,
    .report-actions button{
        width:100% !important;
        margin-bottom:8px !important;
    }
}


/* ============================
   V23 Professional Barcode Label
   ============================ */

.barcode-label{
    width:100mm !important;
    min-height:150mm !important;
    max-width:100mm !important;
    border:2px solid #111 !important;
    padding:12px !important;
    background:#fff !important;
    margin:0 auto !important;
    border-radius:0 !important;
    box-shadow:none !important;
    font-family:Arial,sans-serif !important;
}

.label-company{
    text-align:center;
    font-size:20px;
    font-weight:800;
    margin-bottom:10px;
    color:#111;
}

.label-barcode-no{
    text-align:center;
    font-size:26px;
    font-weight:900;
    border:2px solid #111;
    padding:8px;
    margin-bottom:14px;
    letter-spacing:.5px;
    background:#fafafa;
}

.label-qr{
    text-align:center;
    margin-bottom:12px;
}

.label-qr .qr-image{
    display:flex;
    justify-content:center;
}

.label-qr canvas,
.label-qr img{
    width:140px !important;
    height:140px !important;
    margin:0 auto !important;
}

.label-details{
    margin-top:8px;
}

.label-details p,
.label-footer p{
    margin:7px 0 !important;
    font-size:15px !important;
    line-height:1.35 !important;
    color:#111 !important;
}

.label-details strong,
.label-footer strong{
    min-width:90px;
    display:inline-block;
}

.label-footer{
    margin-top:12px;
    padding-top:10px;
    border-top:1px solid #999;
}

@media print{
    .barcode-label{
        width:100mm !important;
        min-height:150mm !important;
        border:2px solid #000 !important;
        padding:6mm !important;
    }
    .label-company{
        font-size:18px !important;
    }
    .label-barcode-no{
        font-size:24px !important;
        margin-bottom:10px !important;
    }
}


/* ============================
   V24 FINAL PROFESSIONAL LABEL
   Barcode number is primary identifier
   ============================ */

.label-toolbar{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin-bottom:18px;
}

.label-preview-wrap{
    display:flex !important;
    justify-content:center !important;
    align-items:flex-start !important;
    background:#fff !important;
    padding:20px !important;
}

.barcode-label{
    width:100mm !important;
    min-height:150mm !important;
    max-width:100mm !important;
    border:2.5px solid #000 !important;
    padding:7mm !important;
    background:#fff !important;
    color:#000 !important;
    margin:0 auto !important;
    font-family:Arial,Helvetica,sans-serif !important;
    box-shadow:none !important;
    border-radius:0 !important;
}

.label-company{
    text-align:center !important;
    font-size:18px !important;
    line-height:1.1 !important;
    font-weight:800 !important;
    margin:0 0 5mm 0 !important;
    color:#000 !important;
    text-transform:uppercase;
}

.label-barcode-no{
    text-align:center !important;
    font-size:30px !important;
    line-height:1.1 !important;
    font-weight:900 !important;
    letter-spacing:0.4px !important;
    color:#000 !important;
    background:#f2f2f2 !important;
    border:3px solid #000 !important;
    padding:4mm 2mm !important;
    margin:0 0 5mm 0 !important;
    word-break:break-word !important;
}

.label-qr{
    display:flex !important;
    justify-content:center !important;
    align-items:center !important;
    margin:0 0 5mm 0 !important;
    text-align:center !important;
}

.label-qr #qrcode{
    display:flex !important;
    justify-content:center !important;
    align-items:center !important;
}

.label-qr canvas,
.label-qr img{
    width:42mm !important;
    height:42mm !important;
    margin:0 auto !important;
}

.label-highlight-row{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:3mm !important;
    margin:0 0 4mm 0 !important;
}

.label-highlight-row > div{
    border:2px solid #000 !important;
    padding:2.5mm !important;
    background:#fafafa !important;
}

.label-key{
    display:block !important;
    font-size:10px !important;
    font-weight:900 !important;
    color:#555 !important;
    margin-bottom:1mm !important;
    letter-spacing:.7px !important;
}

.label-highlight-row strong{
    display:block !important;
    font-size:15px !important;
    line-height:1.2 !important;
    font-weight:900 !important;
    color:#000 !important;
}

.label-main-details{
    border-top:1.5px solid #000 !important;
    border-bottom:1.5px solid #000 !important;
    padding:3mm 0 !important;
    margin-bottom:3mm !important;
}

.label-main-details p{
    display:grid !important;
    grid-template-columns:25mm 1fr !important;
    gap:2mm !important;
    margin:2mm 0 !important;
    font-size:13px !important;
    line-height:1.25 !important;
    color:#000 !important;
}

.label-main-details strong{
    font-weight:900 !important;
    color:#000 !important;
}

.label-main-details span{
    font-weight:700 !important;
    color:#000 !important;
    word-break:break-word !important;
}

.label-footer{
    margin-top:2mm !important;
    padding-top:0 !important;
    border-top:0 !important;
}

.label-footer p{
    margin:1.8mm 0 !important;
    font-size:12px !important;
    line-height:1.2 !important;
    color:#000 !important;
}

.label-footer strong{
    font-weight:900 !important;
}

/* Small label compresses but still keeps barcode number strong */
.small-label{
    width:50mm !important;
    max-width:50mm !important;
    min-height:30mm !important;
    padding:2mm !important;
}

.small-label .label-company{
    font-size:9px !important;
    margin-bottom:1mm !important;
}

.small-label .label-barcode-no{
    font-size:12px !important;
    padding:1mm !important;
    border:1.5px solid #000 !important;
    margin-bottom:1.5mm !important;
}

.small-label .label-qr canvas,
.small-label .label-qr img{
    width:18mm !important;
    height:18mm !important;
}

.small-label .label-highlight-row,
.small-label .label-main-details,
.small-label .label-footer{
    display:none !important;
}

/* Zebra 100x150 uses same professional layout */
.zebra-label{
    width:100mm !important;
    min-height:150mm !important;
}

/* Print mode */
@media print{
    @page{
        size:100mm 150mm;
        margin:0;
    }

    html,body{
        margin:0 !important;
        padding:0 !important;
        background:#fff !important;
        width:100mm !important;
        min-height:150mm !important;
        overflow:visible !important;
        -webkit-print-color-adjust:exact !important;
        print-color-adjust:exact !important;
    }

    .sidebar,
    .fixed-topbar,
    .topbar,
    .mobile-menu-btn,
    .mobile-overlay,
    .mobile-bottom-nav,
    .no-print,
    form,
    button,
    .btn,
    .app-footer,
    .profile-dropdown,
    .notify-bell,
    .global-search{
        display:none !important;
        visibility:hidden !important;
    }

    .layout,
    .main,
    .card,
    .label-preview-wrap{
        margin:0 !important;
        padding:0 !important;
        width:100mm !important;
        max-width:100mm !important;
        min-height:150mm !important;
        display:block !important;
        background:#fff !important;
        box-shadow:none !important;
        border:0 !important;
    }

    .barcode-label{
        margin:0 !important;
        width:100mm !important;
        max-width:100mm !important;
        min-height:150mm !important;
        border:2px solid #000 !important;
        padding:6mm !important;
        page-break-after:avoid !important;
        break-after:avoid !important;
    }

    .label-barcode-no{
        font-size:28px !important;
        border:3px solid #000 !important;
        background:#f2f2f2 !important;
    }

    .label-company{
        font-size:17px !important;
    }
}


/* ============================
   V25 FINAL LABEL PAGE DESIGN
   ============================ */

.label-page-card{
    background:#fff;
    border:1px solid #dbe3ef;
    border-radius:22px;
    padding:24px;
    box-shadow:0 16px 36px rgba(15,23,42,.07);
}

.label-actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    align-items:center;
    margin-bottom:24px;
}

.label-action-btn{
    background:#475569;
    color:#fff !important;
    border:0;
    border-radius:14px;
    padding:12px 18px;
    min-height:46px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-weight:900;
    text-decoration:none;
    cursor:pointer;
    line-height:20px;
}

.label-action-btn.primary{
    background:#0b1220;
}

.label-action-btn.whatsapp{
    background:#059669;
}

.label-stage{
    display:flex;
    justify-content:center;
    align-items:flex-start;
    padding:10px 0 30px;
    background:#fff;
}

.warehouse-label{
    width:100mm;
    min-height:150mm;
    max-width:100mm;
    border:2px solid #111;
    background:#fff;
    color:#000;
    padding:7mm;
    font-family:Arial, Helvetica, sans-serif;
    box-shadow:none;
}

.wl-company{
    text-align:center;
    font-size:18px;
    line-height:1.15;
    font-weight:800;
    margin:0 0 5mm;
    color:#000;
    text-transform:uppercase;
}

.wl-barcode-box{
    text-align:center;
    font-size:30px;
    line-height:1.1;
    font-weight:900;
    letter-spacing:.5px;
    color:#000;
    border:2px solid #111;
    background:#f7f7f7;
    padding:4mm 2mm;
    margin:0 0 5mm;
    word-break:break-word;
}

.wl-qr-wrap{
    display:flex;
    justify-content:center;
    align-items:center;
    margin:0 0 5mm;
}

.wl-qr-wrap #qrcode{
    display:flex;
    justify-content:center;
    align-items:center;
}

.wl-qr-wrap canvas,
.wl-qr-wrap img{
    width:43mm !important;
    height:43mm !important;
    margin:0 auto !important;
}

.wl-highlight{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:3mm;
    margin:0 0 4mm;
}

.wl-highlight-item{
    border:1.7px solid #111;
    background:#fafafa;
    padding:2.5mm;
}

.wl-highlight-item span{
    display:block;
    font-size:10px;
    font-weight:900;
    letter-spacing:.8px;
    color:#555;
    margin-bottom:1mm;
}

.wl-highlight-item b{
    display:block;
    font-size:14px;
    line-height:1.2;
    color:#000;
    font-weight:900;
}

.wl-info{
    border-top:1.5px solid #111;
    border-bottom:1.5px solid #111;
    padding:3mm 0;
    margin-bottom:3mm;
}

.wl-row{
    display:grid;
    grid-template-columns:26mm 1fr;
    gap:2mm;
    align-items:start;
    margin:2mm 0;
    font-size:13px;
    line-height:1.25;
    color:#000;
}

.wl-row strong{
    font-weight:900;
    color:#000;
}

.wl-row span{
    font-weight:700;
    color:#000;
    word-break:break-word;
}

.wl-footer{
    margin-top:2mm;
    padding-top:1mm;
}

.wl-footer .wl-row{
    font-size:12px;
    margin:1.7mm 0;
}

/* Small 50x30 */
.label-small{
    width:50mm !important;
    max-width:50mm !important;
    min-height:30mm !important;
    padding:2mm !important;
}

.label-small .wl-company{
    font-size:9px !important;
    margin-bottom:1mm !important;
}

.label-small .wl-barcode-box{
    font-size:12px !important;
    padding:1mm !important;
    border:1.3px solid #000 !important;
    margin-bottom:1.5mm !important;
}

.label-small .wl-qr-wrap canvas,
.label-small .wl-qr-wrap img{
    width:18mm !important;
    height:18mm !important;
}

.label-small .wl-highlight,
.label-small .wl-info,
.label-small .wl-footer{
    display:none !important;
}

/* Zebra */
.label-zebra{
    width:100mm !important;
    min-height:150mm !important;
}

/* Print mode only prints label */
@media print{
    @page{
        size:100mm 150mm;
        margin:0;
    }

    html,body{
        margin:0 !important;
        padding:0 !important;
        background:#fff !important;
        width:100mm !important;
        min-height:150mm !important;
        overflow:visible !important;
        -webkit-print-color-adjust:exact !important;
        print-color-adjust:exact !important;
    }

    .sidebar,
    .fixed-topbar,
    .topbar,
    .mobile-menu-btn,
    .mobile-overlay,
    .mobile-bottom-nav,
    .no-print,
    form,
    button,
    .btn,
    .app-footer,
    .profile-dropdown,
    .notify-bell,
    .global-search,
    .label-actions{
        display:none !important;
        visibility:hidden !important;
    }

    .layout,
    .main,
    .card,
    .label-page-card,
    .label-stage{
        margin:0 !important;
        padding:0 !important;
        width:100mm !important;
        max-width:100mm !important;
        min-height:150mm !important;
        display:block !important;
        background:#fff !important;
        box-shadow:none !important;
        border:0 !important;
    }

    .warehouse-label{
        margin:0 !important;
        width:100mm !important;
        max-width:100mm !important;
        min-height:150mm !important;
        border:2px solid #000 !important;
        padding:6mm !important;
        page-break-after:avoid !important;
        break-after:avoid !important;
    }

    .wl-barcode-box{
        font-size:28px !important;
        background:#f7f7f7 !important;
    }

    .wl-company{
        font-size:17px !important;
    }
}

@media(max-width:768px){
    .label-page-card{
        padding:14px;
        border-radius:16px;
    }

    .label-actions{
        display:grid;
        grid-template-columns:1fr;
    }

    .label-action-btn{
        width:100%;
    }

    .warehouse-label{
        transform:scale(.86);
        transform-origin:top center;
    }

    .label-stage{
        overflow-x:auto;
        min-height:560px;
    }
}

/* ================================
   V26 MOBILE-FIRST WAREHOUSE UI
   ================================ */
.mobile-scan-page{max-width:620px;margin:0 auto}
.mobile-scan-head{text-align:center;margin-bottom:14px}
.mobile-scan-head h2{margin-bottom:5px;font-size:26px}
.mobile-scan-head p{margin:0;color:#64748b;font-weight:700}
.mobile-scanner-card{background:#0b1220;border-radius:20px;padding:10px;overflow:hidden;box-shadow:0 14px 35px rgba(15,23,42,.22)}
.mobile-scanner-card #reader{width:100%;border:0!important;background:#000;border-radius:14px;overflow:hidden}
.mobile-scanner-card #reader video{width:100%!important;min-height:360px;object-fit:cover;border-radius:12px}
.mobile-scanner-card #reader button{min-height:48px;border-radius:12px;font-weight:900;padding:10px 14px}
.scan-status{margin-top:9px;background:#fff;color:#0f172a;text-align:center;padding:11px;border-radius:11px;font-weight:900}
.scan-status.success{background:#dcfce7;color:#166534}
.scan-status.error{background:#fee2e2;color:#991b1b}
.mobile-manual-scan{margin-top:15px;background:#fff;border:1px solid #dbe3ef;border-radius:18px;padding:15px}
.scan-input-row{display:grid;grid-template-columns:1fr 105px;gap:9px}
.scan-input-row input,.scan-input-row button{margin:0!important;min-height:54px}

/* Larger touch targets and cleaner one-column operation on phones */
@media(max-width:768px){
  body{font-size:16px}
  .main{padding:10px 10px 86px}
  .card,.label-page-card{padding:14px;border-radius:16px}
  .card h1,.card h2{font-size:23px;line-height:1.2}
  label{font-size:14px;margin-bottom:7px}
  input,select,textarea{min-height:56px;font-size:17px;border-radius:14px;padding:13px 14px}
  textarea{min-height:100px}
  button,.btn,.label-action-btn{min-height:54px;font-size:17px;border-radius:14px}
  .form-grid{display:grid;grid-template-columns:1fr!important;gap:13px}
  .form-grid>div{min-width:0}
  .mobile-bottom-nav a{min-height:62px;display:flex;align-items:center;justify-content:center;padding:8px 3px}
  .label-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:16px}
  .label-action-btn{width:100%;padding:11px 8px}
  .label-stage{overflow:auto;justify-content:flex-start;padding:5px 0 20px}
  .mobile-scanner-card{position:relative}
  .mobile-scanner-card #reader video{min-height:410px}
}
@media(max-width:420px){
  .mobile-scanner-card #reader video{min-height:360px}
  .scan-input-row{grid-template-columns:1fr 88px}
  .mobile-scan-head h2{font-size:23px}
}
@media(max-width:768px){
 .mobile-operation-card .mobile-primary-action{position:sticky;bottom:72px;z-index:25;width:100%;background:#0b1220;color:#fff;box-shadow:0 10px 28px rgba(15,23,42,.25)}
}

/* V26 large warehouse stock label: default A4 for visibility */
.label-large{
  width:196mm;
  max-width:196mm;
  min-height:277mm;
  padding:10mm;
  border:3px solid #111;
}
.label-large .wl-company{font-size:28px;margin-bottom:7mm}
.label-large .wl-barcode-box{font-size:48px;padding:7mm 3mm;margin-bottom:7mm;border-width:3px}
.label-large .wl-qr-wrap canvas,.label-large .wl-qr-wrap img{width:78mm!important;height:78mm!important}
.label-large .wl-highlight{gap:5mm;margin-bottom:6mm}
.label-large .wl-highlight-item{padding:5mm;border-width:2px}
.label-large .wl-highlight-item span{font-size:16px}
.label-large .wl-highlight-item b{font-size:27px}
.label-large .wl-info{padding:5mm 0;margin-bottom:5mm;border-width:2px}
.label-large .wl-row{grid-template-columns:42mm 1fr;font-size:22px;margin:3.5mm 0}
.label-large .wl-footer .wl-row{font-size:19px;margin:3mm 0}
@media(max-width:768px){
 .label-large{transform:scale(.43);transform-origin:top left;margin-bottom:-150mm}
 .label-stage{min-height:620px}
}

/* V27 mobile speed UX */
.optional-fields{grid-column:1/-1;border:1px solid #dbe2ea;border-radius:12px;padding:10px 12px;background:#f8fafc}
.optional-fields summary{font-weight:700;cursor:pointer;padding:4px 0}
.optional-fields[open] summary{margin-bottom:12px}
button:disabled{opacity:.65;cursor:wait}
@media(max-width:900px){
  .mobile-operation-card{padding:14px!important}
  .mobile-operation-card h2{margin:0 0 8px}
  .form-grid{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .form-grid label{font-size:14px;font-weight:700;margin-bottom:5px}
  .form-grid input,.form-grid select,.form-grid textarea,.scan-input-row input{min-height:52px;font-size:17px!important;border-radius:10px}
  .form-grid textarea{min-height:82px}
  .mobile-primary-action{position:sticky;bottom:8px;z-index:20;width:100%;min-height:56px;font-size:18px!important;border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.22)}
  .optional-fields .form-grid{margin-top:8px}
  input[type=search]{background:#fff}
  .mobile-scan-page{padding-bottom:20px}
  #reader{min-height:340px}
}

/* V28 mobile loading console */
.loading-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:15px 0}.loading-stats div{background:#f3f6fa;border-radius:12px;padding:14px;text-align:center}.loading-stats span{display:block;font-size:13px}.loading-stats b{font-size:30px}.loading-progress{height:18px;background:#e5e7eb;border-radius:20px;overflow:hidden}.loading-progress i{display:block;height:100%;background:#16a34a}.center{text-align:center}.quick-qty{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}.quick-qty button{min-height:56px;font-size:20px;font-weight:700}.loading-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:15px}.loading-actions form{margin:0}.loading-actions button,.loading-actions input{width:100%}@media(max-width:700px){.loading-stats b{font-size:25px}.loading-console{padding:14px}.loading-actions{grid-template-columns:1fr}.quick-qty{grid-template-columns:repeat(3,1fr)}}
