/* Byatikrom POS — theme (red & black, from the brand logo) */
:root{
  --byt-red:#e3192c;
  --byt-red-dark:#b3121f;
  --byt-ink:#1a1a1a;
  --byt-muted:#6b7280;
  --byt-bg:#f4f5f7;
  --byt-card:#ffffff;
  --byt-line:#e5e7eb;
  --sidebar-w:242px;
}
*{box-sizing:border-box}
body{
  background:var(--byt-bg);
  font-family:'Segoe UI',system-ui,-apple-system,'Noto Sans Bengali',sans-serif;
  color:var(--byt-ink);
  margin:0;
}
a{color:var(--byt-red);text-decoration:none}
a:hover{color:var(--byt-red-dark)}

/* ---- Layout shell ---- */
.app-shell{display:flex;min-height:100vh}
.sidebar{
  width:var(--sidebar-w);background:#161616;color:#cfcfcf;
  position:fixed;top:0;bottom:0;left:0;display:flex;flex-direction:column;z-index:1030;
  transition:transform .2s ease;overflow-y:auto;
}
.sidebar .brand{display:flex;align-items:center;gap:10px;padding:16px 16px 12px}
.sidebar .brand img{width:40px;height:40px;border-radius:8px;background:#fff;object-fit:contain;padding:3px}
.sidebar .brand b{color:#fff;font-size:15px;line-height:1.1}
.sidebar .brand span{color:var(--byt-red);font-size:11px;display:block}
.sidebar .nav-section{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#6b6b6b;padding:14px 18px 4px}
.sidebar a.nav-link{
  color:#cfcfcf;padding:9px 18px;display:flex;align-items:center;gap:11px;font-size:14px;border-left:3px solid transparent;
}
.sidebar a.nav-link i{font-size:16px;width:18px;text-align:center}
.sidebar a.nav-link:hover{background:#222;color:#fff}
.sidebar a.nav-link.active{background:#222;color:#fff;border-left-color:var(--byt-red)}
.sidebar a.nav-link.dev{color:#ffb4bb}
.main{margin-left:var(--sidebar-w);flex:1;display:flex;flex-direction:column;min-width:0}

/* ---- Topbar ---- */
.topbar{
  background:var(--byt-card);border-bottom:1px solid var(--byt-line);
  padding:10px 20px;display:flex;align-items:center;gap:14px;position:sticky;top:0;z-index:1020;
}
.topbar .page-title{font-weight:600;font-size:17px;margin:0}
.topbar .spacer{flex:1}
.content{padding:20px;flex:1}
/* center any single-column / max-width block instead of leaving it stuck to the left */
.content > [style*="max-width"]{margin-left:auto;margin-right:auto}
.footer{padding:12px 20px;color:var(--byt-muted);font-size:12px;text-align:center;border-top:1px solid var(--byt-line)}
.footer b{color:var(--byt-red)}

/* ---- Cards / tables ---- */
.card{background:var(--byt-card);border:1px solid var(--byt-line);border-radius:12px}
.card .card-header{background:transparent;border-bottom:1px solid var(--byt-line);font-weight:600}
.stat{border-radius:12px;padding:16px 18px;color:#fff;background:linear-gradient(135deg,var(--byt-red),var(--byt-red-dark))}
.stat .n{font-size:24px;font-weight:700}
.stat .l{opacity:.85;font-size:12px;text-transform:uppercase;letter-spacing:.04em}
.stat.ink{background:linear-gradient(135deg,#333,#111)}
.stat.green{background:linear-gradient(135deg,#17a673,#0f8a5f)}
.stat.amber{background:linear-gradient(135deg,#e0a008,#c48a00)}
.table thead th{font-size:12px;text-transform:uppercase;letter-spacing:.03em;color:var(--byt-muted)}
.table-wrap{overflow-x:auto}
.badge-red{background:var(--byt-red)}
.btn-byt{background:var(--byt-red);border-color:var(--byt-red);color:#fff}
.btn-byt:hover{background:var(--byt-red-dark);border-color:var(--byt-red-dark);color:#fff}
.btn-outline-byt{border-color:var(--byt-red);color:var(--byt-red)}
.btn-outline-byt:hover{background:var(--byt-red);color:#fff}
.text-byt{color:var(--byt-red)!important}

/* ---- Auth ---- */
.auth-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#1a1a1a 0%,#2a0a0d 100%);padding:20px}
.auth-card{background:#fff;border-radius:16px;max-width:400px;width:100%;padding:34px 30px;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.auth-card .logo{width:84px;height:84px;object-fit:contain;display:block;margin:0 auto 10px}
.auth-card h1{font-size:19px;text-align:center;margin:0 0 2px}
.auth-card .sub{text-align:center;color:var(--byt-muted);font-size:13px;margin-bottom:22px}

/* ---- POS ---- */
.pos-grid{display:grid;grid-template-columns:1fr 400px;gap:16px;align-items:start}
.pos-products{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}
.pcard{background:#fff;border:1px solid var(--byt-line);border-radius:12px;padding:10px;cursor:pointer;text-align:center;transition:.12s}
.pcard:hover{border-color:var(--byt-red);box-shadow:0 6px 18px rgba(227,25,44,.15);transform:translateY(-2px)}
.pcard img{width:100%;height:120px;object-fit:cover;border-radius:9px;background:#f0f0f0}
.pcard .ph{width:100%;height:120px;display:flex;align-items:center;justify-content:center;background:#faf0f1;border-radius:9px;color:var(--byt-red)}
.pcard .ph i{font-size:40px;opacity:.5}
.pcard .nm{font-size:14px;font-weight:600;margin-top:8px;line-height:1.25;min-height:36px;overflow:hidden}
.pcard .pr{color:var(--byt-red);font-weight:700;font-size:16px;margin-top:2px}
.pcard .st{font-size:11px;color:var(--byt-muted)}
.cart{background:#fff;border:1px solid var(--byt-line);border-radius:12px;position:sticky;top:76px;display:flex;flex-direction:column;max-height:calc(100vh - 96px)}
.cart-items{overflow-y:auto;flex:1;min-height:120px}
.cart-row{display:flex;gap:8px;align-items:center;padding:8px 12px;border-bottom:1px solid var(--byt-line)}
.cart-row .nm{flex:1;font-size:13px}
.cart-row input.q{width:46px;text-align:center;padding-left:2px;padding-right:2px}
.cart-row .qtybox{display:flex;align-items:center;gap:2px}
.cart-row .qtybox .btn{padding:0 7px;line-height:1.6}
.cart-row input.pr{width:84px}
.cart-row input[readonly]{background:#f6f6f6}
.pcard.out{opacity:.55}
.pcard.out:hover{transform:none;box-shadow:none;border-color:var(--byt-line)}
.kbd{display:inline-block;font-size:10px;line-height:1;padding:2px 4px;border:1px solid currentColor;border-radius:4px;opacity:.65;margin-left:3px;font-family:monospace}
.pos-toast{position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:2000;max-width:92vw;box-shadow:0 8px 24px rgba(0,0,0,.18)}
.pos-mbar{position:fixed;left:0;right:0;bottom:0;z-index:1015;display:flex;gap:8px;padding:8px 12px;background:#fff;border-top:1px solid var(--byt-line);box-shadow:0 -4px 16px rgba(0,0,0,.08)}
.scan-box{font-size:15px}
.pos-tabs .btn{border-radius:20px}

@media(max-width:1199px){
  .pos-grid{grid-template-columns:1fr 360px}
}
@media(max-width:991px){
  .sidebar{transform:translateX(-100%)}
  .sidebar.show{transform:translateX(0)}
  .main{margin-left:0}
  .pos-grid{grid-template-columns:1fr}
  .cart{position:static;max-height:none}
  .content:has(.pos-grid){padding-bottom:76px}
  .topbar{padding:8px 12px;gap:8px;flex-wrap:wrap}
  .topbar .page-title{font-size:15px}
}
@media(max-width:575px){
  .content{padding:12px}
  .pos-products{grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px}
  .pcard img,.pcard .ph{height:96px}
  .pcard .nm{font-size:13px;min-height:32px}
  .cart-row{flex-wrap:wrap}
  .cart-row .nm{flex-basis:100%}
  .branch-switch select{max-width:130px!important}
  .stat .n{font-size:19px}
}
.backdrop{display:none;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:1025}
.backdrop.show{display:block}
