*{box-sizing:border-box}body{margin:0;font-family:Arial,sans-serif;background:#f4f6f9;color:#202630}header{background:#132b46;color:#fff;padding:9px 5%;display:flex;align-items:center;justify-content:space-between;gap:15px}.brand-wrap{display:flex;align-items:center;gap:10px}.brand-logo{width:72px;height:48px;object-fit:contain}.brand{font-size:24px;font-weight:bold}.brand small{font-size:12px;font-weight:normal;display:block}.business-banner{background:#fff;border-bottom:1px solid #dfe5eb;padding:9px 5%;text-align:center;color:#17324d;font-size:14px;letter-spacing:.4px}nav{display:flex;gap:8px;align-items:center;flex-wrap:wrap}nav a{color:#fff;text-decoration:none;padding:8px 10px;border-radius:6px}nav a:hover{background:#244a70}.menu-btn{display:none;background:#fff;color:#17324d}main{max-width:1250px;margin:25px auto;padding:0 16px}footer{text-align:center;padding:25px;color:#68717d}.card,.stat{background:#fff;padding:18px;border-radius:10px;box-shadow:0 2px 9px #0001}.login{min-height:100vh;display:grid;place-items:center;background:#eef2f6}.login-card{width:min(420px,92vw);text-align:center}.login-logo{width:230px;max-height:115px;object-fit:contain;margin:auto}input,select,button{font:inherit;padding:11px;border:1px solid #cbd3dc;border-radius:7px}input,select{width:100%;margin:5px 0}button,.button{background:#17324d;color:#fff;border:0;cursor:pointer;text-decoration:none;display:inline-block;margin:4px}button:hover,.button:hover{opacity:.9}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:14px 0}.stat h2{margin:8px 0}.formgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.formgrid button{grid-column:span 2}.full{grid-column:1/-1}.upload{padding:9px;border:1px dashed #789;border-radius:7px}.thumb{width:55px;height:55px;object-fit:cover;border-radius:7px;vertical-align:middle;margin-right:8px}.pos{display:grid;grid-template-columns:1.2fr .8fr;gap:18px}.product{background:#fff;margin:7px 0;padding:10px;border-radius:8px;box-shadow:0 1px 4px #0001}.pick{float:right}.cartrow{display:flex;align-items:center;gap:7px;padding:8px 0;border-bottom:1px solid #ddd}.cartrow span{flex:1}.cartrow input{width:70px}.notice{padding:10px;background:#e7f3ea;border-radius:7px}.notice-error{background:#fde8e8}.error{color:#b00020}.login-top{background:#fff;color:#17324d;text-decoration:none;padding:9px 16px;border-radius:7px}.hero{padding:28px;margin-bottom:20px}.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:16px}.public-product,.product-overview{padding:0;overflow:hidden}.public-product img,.product-overview img{width:100%;height:155px;object-fit:cover}.product-info,.public-product h3,.public-product p{margin-left:14px;margin-right:14px}.no-image{height:155px;display:grid;place-items:center;background:#eee}.price{font-weight:bold}.stat-link{display:block;color:inherit;text-decoration:none}.danger-link,.low-stock-card{border:2px solid #d32f2f}.low-warning{background:#d32f2f;color:#fff;padding:8px;margin:10px;border-radius:6px;font-weight:bold}.transaction-card{margin:14px 0}.status{display:inline-block;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:bold}.status.active{background:#dff4e5;color:#126b32}.status.blocked{background:#fde2e2;color:#a41515}.danger-button{background:#b00020}.small-button{padding:7px 9px;font-size:12px}@media(max-width:760px){header{flex-wrap:wrap}.menu-btn{display:block}nav{display:none;width:100%;flex-direction:column;align-items:stretch;background:#10263b;padding:8px;border-radius:8px}nav.open{display:flex}nav a{padding:13px;font-size:16px;border-bottom:1px solid #ffffff18}.grid{grid-template-columns:repeat(2,1fr)}.pos,.formgrid{grid-template-columns:1fr}.formgrid button,.full{grid-column:span 1}table{display:block;overflow-x:auto;white-space:nowrap}.cartrow{flex-wrap:wrap}.brand-logo{width:60px;height:42px}.brand{font-size:20px}}@media(max-width:420px){.grid{grid-template-columns:1fr}.brand small{font-size:10px}}@media print{header,footer,form,button,.business-banner{display:none!important}main{max-width:none;margin:0;padding:0}.card,.stat{box-shadow:none}}.sell-add{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px}.sell-add label{font-size:13px;font-weight:bold}.sell-add input{width:90px}.stat-link:hover{transform:translateY(-2px);box-shadow:0 4px 14px #0002}.transaction-card table{margin-top:10px}@media(max-width:760px){.sell-add{flex-direction:column;align-items:stretch}.sell-add input{width:100%}}
/* === UI enhancements: table spacing, user identity, language and theme === */
html{background:#f4f6f9}body{background:#f4f6f9;color:#202630;transition:background .2s,color .2s}
table{width:100%;max-width:100%;border-collapse:separate;border-spacing:0;margin:14px 0;table-layout:auto}
th,td{padding:11px 16px;vertical-align:middle;text-align:left;line-height:1.35}
th+th,td+td{padding-left:20px}
th{font-weight:700;white-space:nowrap}td{overflow-wrap:anywhere}tbody tr,table tr{background:transparent}
.header-tools{display:flex;align-items:center;gap:10px;margin-left:auto}.user-chip{display:flex;align-items:center;gap:9px;background:#ffffff16;border:1px solid #ffffff26;border-radius:999px;padding:5px 12px 5px 6px;min-width:0}.user-avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#17324d;font-weight:800}.user-info{display:flex;flex-direction:column;line-height:1.1}.user-info strong{font-size:13px;white-space:nowrap;max-width:150px;overflow:hidden;text-overflow:ellipsis}.user-info small{font-size:10px;opacity:.75;margin-top:3px}.preference-tools{display:flex;align-items:center;gap:5px}.preference-tools select,.theme-toggle{height:36px;padding:6px 9px;border:1px solid #ffffff35;background:#fff;color:#17324d;border-radius:7px}.theme-toggle{min-width:38px;margin:0}
[data-theme="dark"]{background:#111820;color:#e8edf2} [data-theme="dark"] body{background:#111820;color:#e8edf2} [data-theme="dark"] .card,[data-theme="dark"] .stat,[data-theme="dark"] .product,[data-theme="dark"] .business-banner{background:#1b2632;color:#e8edf2;border-color:#334352} [data-theme="dark"] input,[data-theme="dark"] select{background:#18222d;color:#e8edf2;border-color:#455565} [data-theme="dark"] table{color:#e8edf2} [data-theme="dark"] th{background:#22303d} [data-theme="dark"] td{border-color:#34424f} [data-theme="dark"] .no-image{background:#26323d} [data-theme="dark"] footer{color:#9da8b3} [data-theme="dark"] .login{background:#111820} [data-theme="dark"] .login-card{background:#1b2632;color:#e8edf2} [data-theme="dark"] .business-banner{color:#e8edf2;border-bottom-color:#334352}
@media(max-width:900px){.header-tools{order:3;width:100%;justify-content:flex-end}.user-info strong{max-width:120px}th,td{padding:10px 12px}th+th,td+td{padding-left:15px}}
@media(max-width:760px){table{display:block;overflow-x:auto;white-space:nowrap;-webkit-overflow-scrolling:touch}.header-tools{width:auto;margin-left:auto;order:initial}.user-info{display:none}.user-chip{padding:4px}.preference-tools select{max-width:92px}.preference-tools{gap:3px}}
.standalone-tools,.public-tools{display:flex;align-items:center;gap:6px}.standalone-tools{position:fixed;top:16px;right:18px;z-index:10}.standalone-tools select,.public-tools select{padding:8px;border-radius:7px;border:1px solid #cbd3dc}.public-tools{margin-left:auto}.public-tools .theme-toggle{margin:0}
/* === Final UI controls: compact EN/FR switch, reliable dark theme, fitted user identity === */
html[data-theme="dark"]{background:#0f151c!important;color:#e9eef3}
html[data-theme="dark"] body{background:#0f151c!important;color:#e9eef3!important}
html[data-theme="dark"] header{background:#0b2035;color:#fff}
html[data-theme="dark"] main,html[data-theme="dark"] .card,html[data-theme="dark"] .stat,html[data-theme="dark"] .product,html[data-theme="dark"] .transaction-card,html[data-theme="dark"] .public-product,html[data-theme="dark"] .product-overview{color:#e9eef3}
html[data-theme="dark"] .card,html[data-theme="dark"] .stat,html[data-theme="dark"] .product,html[data-theme="dark"] .transaction-card,html[data-theme="dark"] .public-product,html[data-theme="dark"] .product-overview{background:#1a2530;border-color:#344453}
html[data-theme="dark"] .business-banner{background:#16222d;color:#e9eef3;border-color:#344453}
html[data-theme="dark"] input,html[data-theme="dark"] textarea,html[data-theme="dark"] select{background:#151f29!important;color:#f1f5f8!important;border-color:#465665!important}
html[data-theme="dark"] table{color:#e9eef3}html[data-theme="dark"] th{background:#22313e}html[data-theme="dark"] td{border-color:#344453}
html[data-theme="dark"] .notice{background:#173c2b;color:#dff7e8}html[data-theme="dark"] .no-image{background:#263440;color:#e9eef3}
.header-tools{min-width:0;flex:0 1 auto}.user-chip{max-width:260px}.user-info{min-width:0}.user-info strong{display:block;max-width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}.user-info small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.preference-tools{flex-shrink:0}.lang-switch{display:flex;gap:2px;padding:3px;background:#ffffff18;border:1px solid #ffffff2e;border-radius:8px}.lang-btn{margin:0!important;padding:5px 8px!important;min-width:34px;height:30px!important;border:0!important;border-radius:5px!important;background:transparent!important;color:#fff!important;font-weight:800!important;font-size:12px!important;cursor:pointer}.lang-btn.active{background:#fff!important;color:#17324d!important}.theme-toggle{height:36px!important;width:38px!important;min-width:38px!important;padding:0!important;font-size:19px!important;line-height:1!important;border:1px solid #ffffff35!important;background:#fff!important;color:#17324d!important;border-radius:7px!important}
@media(max-width:900px){.header-tools{gap:6px}.user-chip{max-width:210px}.user-info strong{max-width:125px}}
@media(max-width:760px){.header-tools{margin-left:auto}.user-chip{max-width:42px}.user-info{display:none}.lang-btn{padding:5px 6px!important;min-width:31px}.theme-toggle{width:35px!important;min-width:35px!important}}

/* Header alerts and compact price editing */
.header-badge{display:inline-grid;place-items:center;min-width:19px;height:19px;padding:0 5px;margin-left:4px;border-radius:999px;background:#e53935;color:#fff;font-size:11px;font-weight:800;line-height:19px;vertical-align:middle;box-shadow:0 0 0 2px #132b46}
.inline-price-form{display:flex;align-items:center;gap:5px;min-width:230px}.inline-price-form input{width:86px;margin:0}.inline-price-form button{white-space:nowrap;margin:0}
@media(max-width:760px){.inline-price-form{min-width:260px}.inline-price-form input{width:82px}.header-badge{min-width:18px;height:18px;line-height:18px}}
/* === Fast public product search === */
.public-search{margin:0 0 22px;padding:18px 20px}.contact-line{font-weight:800;text-align:center;margin-bottom:12px;font-size:15px;letter-spacing:.1px}.search-label{display:block;font-weight:700;margin-bottom:7px}.front-search-wrap{position:relative;display:flex;align-items:center}.front-search-wrap input{margin:0;padding:13px 76px 13px 42px;border-radius:9px;font-size:15px}.search-icon{position:absolute;left:14px;font-size:23px;line-height:1;z-index:1;color:#17324d;pointer-events:none}.clear-search{position:absolute;right:5px;top:5px;margin:0;width:38px;height:38px;padding:0;border-radius:7px;background:#17324d;color:#fff;font-size:22px;line-height:1}.clear-search[hidden]{display:none}.search-status{min-height:18px;margin-top:7px;font-size:12px;color:#68717d}.no-search-results{text-align:center;margin-top:16px}.public-product[hidden]{display:none!important}html[data-theme="dark"] .search-icon{color:#e9eef3}html[data-theme="dark"] .search-status{color:#aeb8c2}

/* Fast live item scanner */
.scanner-wrap{position:relative;width:100%;max-width:560px;margin:12px auto;aspect-ratio:4/3;background:#111;border-radius:14px;overflow:hidden;display:flex;align-items:center;justify-content:center}
#scannerVideo{width:100%;height:100%;object-fit:cover;display:block}
.scanner-guide{position:absolute;inset:15% 12%;border:2px solid rgba(255,255,255,.85);border-radius:18px;pointer-events:none;box-shadow:0 0 0 9999px rgba(0,0,0,.12)}
.scanner-guide span{position:absolute;left:8%;right:8%;top:50%;height:2px;background:rgba(255,255,255,.9);animation:scanline 1.7s ease-in-out infinite}
.scanner-status{position:absolute;left:10px;right:10px;bottom:10px;padding:8px 11px;border-radius:9px;background:rgba(0,0,0,.68);color:#fff;text-align:center;font-size:.9rem}
.scanner-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:10px 0}
.file-fallback{display:inline-flex;align-items:center;gap:6px;cursor:pointer;padding:9px 13px;border-radius:8px;border:1px solid #ccc;background:transparent}
.file-fallback input{display:none}
#matches{margin-top:10px}
@keyframes scanline{0%,100%{transform:translateY(-55px);opacity:.55}50%{transform:translateY(55px);opacity:1}}
/* Close-range auto scanner: designed for items held approximately 0–15 cm from the camera. */
.scanner-card .scanner-wrap{touch-action:none}
.scanner-card .scanner-guide{inset:10% 8%;border-width:3px;box-shadow:0 0 0 9999px rgba(0,0,0,.20),0 0 24px rgba(255,255,255,.18)}
.scanner-card .scanner-status{font-weight:700;backdrop-filter:blur(3px)}

.camera-capture{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:8px;border:1px dashed #789;border-radius:8px}
.camera-capture video{background:#111;object-fit:cover}
#scannerChoices{margin-top:10px}
#scannerChoices .product{border:1px solid #dfe5eb}

/* Product catalog / navigation refinements */
@media(min-width:761px){
  header{position:relative;margin-left:220px;padding-left:28px;padding-right:28px;min-height:66px}
  nav{position:fixed;left:0;top:0;bottom:0;width:220px;z-index:1000;background:#132b46;padding:78px 12px 18px;display:flex;flex-direction:column;align-items:stretch;gap:5px;overflow-y:auto;box-shadow:2px 0 12px #0002}
  header nav a{display:block;padding:10px 13px}
  .business-banner,main,footer{margin-left:220px}
  .business-banner{padding-left:28px;padding-right:28px}
}
.catalog-form{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.catalog-row{display:grid;grid-template-columns:minmax(0,1fr) 145px;gap:7px;align-items:start}
.catalog-row input,.catalog-row select{margin:0}
.catalog-row select:disabled{opacity:.55;cursor:not-allowed}
.price-row{display:grid;grid-template-columns:minmax(0,1fr) 125px;gap:7px;align-items:start}
.price-row input,.price-row select{margin:0}
.price-row select:disabled{opacity:.55;cursor:not-allowed}
.catalog-help{font-size:12px;color:#68717d;margin:2px 0 8px}
.buying-price-private{font-size:12px;color:#68717d}
.sale-mode{display:flex;align-items:flex-start;gap:9px;margin-top:8px}
.sale-mode input[type=checkbox]{width:18px;height:18px;margin:2px 0;accent-color:#17324d}
.sale-mode-copy{min-width:0}
.sale-mode-copy small{display:block;color:#68717d;margin-top:2px}
.cart-price{font-weight:800}
.delete-button{background:#7f0d0d!important;color:#fff!important}
.approve-button{background:#0b6b35!important;color:#fff!important}
.reject-button{background:#7f0d0d!important;color:#fff!important}
@media(max-width:760px){.catalog-form{grid-template-columns:1fr}.catalog-row,.price-row{grid-template-columns:minmax(0,1fr) 120px}}

/* Professional compact typography and action colors */
body{font-size:14px;line-height:1.45}h1{font-size:26px}h2{font-size:20px}h3{font-size:17px}table{font-size:13px}input,select,button,.button{font-size:14px}button[name="delete_product"],button.delete-button{background:#7f0d0d!important;color:#fff!important}button[name="exp_decision"][value="approve"],button[name="money_decision"][value="approve"],button.approve-button{background:#0b6b35!important;color:#fff!important}button[name="exp_decision"][value="reject"],button[name="money_decision"][value="reject"],button.reject-button{background:#7f0d0d!important;color:#fff!important}
@media(max-width:760px){h1{font-size:23px}h2{font-size:19px}h3{font-size:16px}}

.stock-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:8px}.stock-preview>div{background:#f5f7fa;border:1px solid #dfe5eb;border-radius:7px;padding:8px;text-align:center}.stock-preview strong{display:block;font-size:18px}.stock-preview small{display:block;color:#68717d;font-size:11px}.stock-preview.compact{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:6px}.stock-breakdown{color:#68717d}.product-detail-summary .stock-number{font-size:18px}@media(max-width:760px){.stock-preview{grid-template-columns:1fr}.stock-preview.compact{grid-template-columns:1fr 1fr}}

/* === Site-wide desktop sidebar navigation (defined in header.php) === */
@media(min-width:761px){
  :root{--sidebar-width:30vw;--desktop-header-height:68px}
  body{padding-left:var(--sidebar-width)}
  header{position:fixed;left:var(--sidebar-width);right:0;top:0;z-index:1100;height:var(--desktop-header-height);margin:0;padding:8px 28px;background:#132b46;display:flex;align-items:center;gap:18px;box-shadow:0 2px 10px #0002}
  header .brand-wrap{flex:0 0 auto}
  header .brand-logo{width:48px;height:42px}
  header .brand{font-size:20px}
  header .brand small{font-size:10px}
  nav{position:fixed;left:0;top:0;bottom:0;width:var(--sidebar-width);z-index:1200;background:linear-gradient(180deg,#ffffff 0%,#f7f9fc 100%);color:#17324d;padding:24px 16px 18px;display:flex;flex-direction:column;align-items:stretch;gap:6px;overflow-y:auto;box-shadow:3px 0 18px #0002;border-right:1px solid #dfe5eb}
  nav::before{content:'DUKA';display:block;color:#17324d;font-size:25px;font-weight:800;letter-spacing:.4px;padding:0 14px 18px;margin-bottom:4px;border-bottom:1px solid #e3e8ee}
  nav a{display:flex;align-items:center;gap:14px;color:#455468;text-decoration:none;padding:13px 15px;border-radius:9px;font-size:14px;font-weight:600;min-height:46px;transition:background .18s ease,color .18s ease,transform .18s ease}
  nav a i{width:23px;min-width:23px;text-align:center;font-size:17px;color:#52677f}
  nav a:hover{background:#eaf2ff;color:#2168c5;transform:translateX(2px)}
  nav a:hover i{color:#2168c5}
  nav a[href="/dashboard.php"]{margin-bottom:3px}
  nav a[href="/logout.php"]{margin-top:auto}
  nav .header-badge{margin-left:auto}
  .header-search{flex:1;max-width:520px;margin:0 auto}
  .header-search form{position:relative;margin:0}
  .header-search i{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:#7b8794}
  .header-search input{width:100%;height:38px;margin:0;padding:8px 14px 8px 38px;border:0;border-radius:6px;background:#fff;color:#202630;font-size:13px;outline:none}
  .header-tools{margin-left:auto;gap:13px}
  .header-icon{position:relative;color:#fff;text-decoration:none;font-size:20px;display:grid;place-items:center;width:36px;height:36px}
  .header-icon .header-badge{position:absolute;right:-2px;top:-2px}
  .user-chip{background:transparent;border:0;padding:2px 4px}
  .user-avatar{width:34px;height:34px}
  .user-chevron{font-size:11px;margin-left:2px;color:#fff}
  .business-banner{margin-left:0;padding-left:28px;padding-right:28px;margin-top:68px}
  main{margin:0 auto;padding-top:25px}
  footer{margin-left:0}
  .menu-btn{display:none!important}
}
@media(max-width:760px){
  .header-search{display:none}
  nav a i{width:20px;text-align:center;margin-right:6px}
}

/* Deleted record actions */
.restore-button{background:#0b6b35!important;color:#fff!important}
.deleted-row{background:#fff5f5!important}
.deleted-label{display:inline-block;background:#7f0d0d;color:#fff;border-radius:999px;padding:3px 8px;font-size:11px;font-weight:700}

/* === Adjustable desktop sidebar === */
@media(min-width:761px){
  :root{
    --sidebar-width:clamp(185px,16vw,285px);
    --desktop-header-height:68px;
  }
  body{padding-left:var(--sidebar-width)}
  header{
    position:relative;z-index:1100;
    min-height:var(--desktop-header-height);margin:0;padding:8px 28px;
    background:#132b46;display:flex;align-items:center;gap:18px;
    box-shadow:0 2px 10px #0002;
  }
  /* Desktop branding belongs in the sidebar, not beside the search box. */
  header .brand-wrap{display:none!important}
  nav{
    position:fixed;left:0;top:0;bottom:0;width:var(--sidebar-width);z-index:1200;
    background:linear-gradient(180deg,#ffffff 0%,#f7f9fc 100%);color:#17324d;
    padding:14px 11px 12px;overflow:hidden;display:flex;flex-direction:column;
    align-items:stretch;gap:0;box-shadow:3px 0 18px #0002;border-right:1px solid #dfe5eb;
  }
  .sidebar-brand{
    flex:0 0 auto;display:flex;align-items:center;min-height:62px;
    padding:7px 9px 11px;margin:0 2px 10px;border-bottom:1px solid #e1e7ee;
  }
  .sidebar-brand-logo{width:38px;height:38px;object-fit:contain;flex:0 0 38px;margin-right:2px}
  .sidebar-brand-text{min-width:0;line-height:1.15}
  .sidebar-brand-text strong{display:block;font-size:20px;color:#17324d;letter-spacing:.5px}
  .sidebar-brand-text small{display:block;margin-top:4px;font-size:11px;color:#52677f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .sidebar-brand-text em{display:block;margin-top:4px;font-style:normal;font-size:9px;color:#7a8795}
  .sidebar-nav-links{
    min-height:0;flex:1 1 auto;display:flex;flex-direction:column;gap:5px;
    overflow-y:auto;overflow-x:hidden;padding:0 2px 2px 0;
  }
  .sidebar-nav-links a{
    flex:0 0 auto;display:flex;align-items:center;gap:10px;color:#455468;
    text-decoration:none;padding:9px 10px;border-radius:9px;font-size:13px;font-weight:600;
    min-height:44px;transition:background .18s ease,color .18s ease,transform .18s ease;
  }
  .sidebar-nav-links a i{width:20px;min-width:20px;text-align:center;font-size:15px;color:#52677f}
  .sidebar-nav-links a:hover{background:#eaf2ff;color:#2168c5;transform:translateX(2px)}
  .sidebar-nav-links a:hover i{color:#2168c5}
  .sidebar-nav-links a[href="/logout.php"]{margin-top:auto}
  nav .header-badge{margin-left:auto}
  .sidebar-resizer{
    position:absolute;top:0;right:-3px;width:7px;height:100%;margin:0;padding:0;
    border:0;border-radius:0;background:transparent;cursor:ew-resize;z-index:1300;
  }
  .sidebar-resizer:hover,.sidebar-resizer:focus{background:#2168c533;outline:none}
  .header-search{flex:1;max-width:520px;margin:0 auto}
  .header-search form{position:relative;margin:0}
  .header-search i{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:#7b8794}
  .header-search input{width:100%;height:38px;margin:0;padding:8px 14px 8px 38px;border:0;border-radius:6px;background:#fff;color:#202630;font-size:13px;outline:none}
  .header-tools{margin-left:auto;gap:13px}
  .header-icon{position:relative;color:#fff;text-decoration:none;font-size:20px;display:grid;place-items:center;width:36px;height:36px}
  .header-icon .header-badge{position:absolute;right:-2px;top:-2px}
  .user-chip{background:transparent;border:0;padding:2px 4px}
  .user-avatar{width:34px;height:34px}
  .user-chevron{font-size:11px;margin-left:2px;color:#fff}
  .business-banner{margin-left:0;padding-left:28px;padding-right:28px;margin-top:var(--desktop-header-height)}
  main{margin:0 auto;padding-top:25px}
  footer{margin-left:0}
}
@media(max-width:760px){
  .header-search{display:none}
  nav a i{width:20px;text-align:center;margin-right:6px}
}

/* Final desktop navigation sizing/layout overrides */
@media(min-width:761px){
  :root{--sidebar-width:clamp(185px,16vw,285px);--desktop-header-height:68px}
  body{padding-left:var(--sidebar-width)}
  header{position:relative;left:auto;right:auto;top:auto;height:auto;min-height:var(--desktop-header-height);margin:0;padding:8px 24px;z-index:1100}
  nav{width:var(--sidebar-width);padding:14px 11px 12px}
  .sidebar-brand{min-height:62px;padding:7px 9px 11px}
  .sidebar-brand-logo{width:38px;height:38px;object-fit:contain;flex:0 0 38px;margin-right:2px}
  .sidebar-brand-text strong{font-size:20px}
  .sidebar-nav-links a{gap:10px;padding:9px 10px;font-size:13px;min-height:40px}
  .sidebar-nav-links a i{width:20px;min-width:20px;font-size:15px}
  .business-banner{margin-top:0}
  main{margin:0 auto;padding-top:24px}
}

/* === Final sidebar/mobile menu layout === */
@media(min-width:761px){
  :root{--sidebar-width:25vw;}
  .sidebar-brand-logo{display:none!important}
  .sidebar-brand{justify-content:flex-start}
}
@media(max-width:760px){
  header{position:relative;z-index:1300}
  /* The mobile navigation is placed in normal flow after the header,
     so opening it always reveals a vertical menu underneath the toggle. */
  nav{
    position:relative!important;
    left:auto!important;top:auto!important;right:auto!important;bottom:auto!important;
    width:100%!important;
    max-height:none!important;
    margin:0!important;
    border-radius:0 0 10px 10px!important;
    box-shadow:0 3px 12px #0002!important;
    order:initial;
  }
  nav:not(.open){display:none!important}
  nav.open{display:flex!important;flex-direction:column!important;align-items:stretch!important}
  .sidebar-brand{display:none!important}
  .sidebar-nav-links{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:5px!important;overflow:visible!important;padding:0!important}
  .sidebar-nav-links a{display:flex!important;width:100%!important;min-height:44px!important;padding:11px 14px!important;box-sizing:border-box!important}
  .sidebar-resizer{display:none!important}
  .menu-btn{display:inline-flex!important;align-items:center;gap:7px;position:relative;z-index:1400}
}


/* Final desktop sidebar/header arrangement */
@media(min-width:761px){
  :root{--sidebar-width:20vw;--desktop-header-height:68px}
  body{padding-left:var(--sidebar-width)}
  header{
    position:relative;
    z-index:1400;
    width:100vw;
    margin-left:calc(-1 * var(--sidebar-width));
    min-height:var(--desktop-header-height);
    box-shadow:0 2px 12px #0003;
  }
  header .brand-wrap{display:flex!important}
  nav{
    position:fixed;
    left:0;
    top:var(--desktop-header-height);
    bottom:0;
    width:var(--sidebar-width);
    z-index:1000;
    padding:14px 11px 12px;
    background:#132b46;
    color:#fff;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    overflow-y:auto;
    box-shadow:2px 0 12px #0002;
    border:0;
  }
  .sidebar-brand{display:none!important}
  .sidebar-nav-links{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:5px!important;
    overflow:visible!important;
    padding:0!important;
  }
  .sidebar-nav-links a{
    display:flex!important;
    align-items:center!important;
    width:100%!important;
    min-height:42px!important;
    padding:10px 12px!important;
    gap:10px!important;
    color:#fff!important;
    background:transparent!important;
    border-radius:6px!important;
    font-size:13px!important;
  }
  .sidebar-nav-links a i{color:#fff!important;width:20px;min-width:20px;text-align:center}
  .sidebar-nav-links a:hover{background:#244a70!important;color:#fff!important;transform:translateX(2px)}
  .sidebar-nav-links a:hover i{color:#fff!important}
  .sidebar-resizer{right:-3px}
  main{margin-top:0}
}

/* Mobile: keep the logo/header in place and put the menu vertically below the toggle */
@media(max-width:760px){
  header{position:relative;z-index:1400}
  nav{
    position:relative!important;
    left:auto!important;top:auto!important;bottom:auto!important;
    width:100%!important;
    z-index:1300!important;
    order:initial!important;
    margin:0!important;
    padding:8px!important;
    display:none!important;
    flex-direction:column!important;
    align-items:stretch!important;
    background:#10263b!important;
    border-radius:0 0 8px 8px!important;
    box-shadow:0 3px 10px #0002!important;
  }
  nav.open{display:flex!important}
  .sidebar-brand{display:none!important}
  .sidebar-nav-links{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:5px!important;padding:0!important;overflow:visible!important}
  .sidebar-nav-links a{display:flex!important;width:100%!important;min-height:44px!important;padding:11px 14px!important;box-sizing:border-box!important}
  .sidebar-resizer{display:none!important}
}

/* Final requested desktop-only header/sidebar positioning */
@media(min-width:761px){
  :root{--sidebar-width:20vw;--desktop-header-height:68px}
  body{padding-left:var(--sidebar-width);padding-top:var(--desktop-header-height)}
  header{
    position:fixed!important;
    left:0!important;
    top:0!important;
    right:0!important;
    width:auto!important;
    margin:0!important;
    min-height:var(--desktop-header-height)!important;
    height:var(--desktop-header-height)!important;
    box-sizing:border-box;
    z-index:1400!important;
  }
  nav{
    top:var(--desktop-header-height)!important;
    z-index:1000!important;
  }
  /* Keep the left navigation as menu-only: no branding/title/underline area. */
  nav .sidebar-brand{display:none!important}
  nav .sidebar-nav-links{margin:0!important;padding:0!important}
  .business-banner{margin-top:0!important}
  main{padding-top:24px!important}
}

/* Final desktop menu-only cleanup: remove any legacy sidebar title/underline. */
@media(min-width:761px){
  nav::before{content:none!important;display:none!important;border:0!important;margin:0!important;padding:0!important}
  nav .sidebar-brand{display:none!important}
}

/* Keep the 20% desktop navigation offset off standalone pages. */
@media(min-width:761px){
  body.login{padding-left:0!important;padding-top:0!important}
  body.receipt-page{padding-left:0!important;padding-top:0!important}
}
