/* ==================================================================
   Admin & Superadmin shell
   ================================================================== */
.app-body { background: var(--bg); }
.shell { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 258px; flex: none; background: #081826; color: #b6c6d6;
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 60;
  border-right: 1px solid rgba(255,255,255,.06); transition: transform .22s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 16px; color: #fff; }
.sidebar-brand .brand-mark { width: 34px; height: 34px; }
.sidebar-brand .brand-text { font-size: 16.5px; font-weight: 800; letter-spacing: -.3px; }
.sidebar-brand .brand-text span { color: #5eead4; }
.sidebar-brand small { display: block; font-size: 9.5px; color: #64809a; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; margin-top: 1px; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.s-nav-group { margin-top: 18px; }
.s-nav-group > p { font-size: 9.5px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; color: #56748f; padding: 0 10px; margin-bottom: 6px; }
.s-nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border-radius: 10px;
  color: #a8bccd; font-size: 12.8px; font-weight: 600; border: none; background: none; text-align: left;
  margin-bottom: 2px; transition: .14s; position: relative;
}
.s-nav-item svg { width: 17px; height: 17px; opacity: .8; }
.s-nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.s-nav-item.active { background: linear-gradient(90deg, rgba(20,184,166,.18), rgba(20,184,166,.06)); color: #fff; }
.s-nav-item.active svg { color: #5eead4; opacity: 1; }
.s-nav-item.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #2dd4bf; }
.s-nav-item .count { margin-left: auto; background: rgba(255,255,255,.09); color: #cfe3f1; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.s-nav-item.active .count { background: rgba(94,234,212,.2); color: #5eead4; }
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.s-user { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px; background: rgba(255,255,255,.04); }
.s-user .avatar { width: 34px; height: 34px; border-radius: 10px; background: rgba(94,234,212,.14); color: #5eead4; font-size: 12px; }
.s-user b { display: block; font-size: 12px; color: #fff; font-weight: 700; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-user span { font-size: 10px; color: #6d8aa3; }
.s-user button { margin-left: auto; border: none; background: transparent; color: #6d8aa3; padding: 6px; border-radius: 7px; }
.s-user button:hover { background: rgba(255,255,255,.07); color: #fff; }

.main-wrap { flex: 1; margin-left: 258px; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: 66px; background: rgba(255,255,255,.88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 26px;
}
.hamburger { display: none; border: 1px solid var(--line); background: #fff; width: 38px; height: 38px; border-radius: 10px; place-items: center; color: var(--ink-2); }
.top-title { min-width: 0; }
.top-title b { display: block; font-size: 14.5px; font-weight: 800; letter-spacing: -.2px; }
.top-title span { font-size: 11px; color: var(--ink-3); }
.top-search { margin-left: auto; position: relative; width: 240px; }
.top-search input { width: 100%; border: 1px solid var(--line); background: #f7fafc; border-radius: 10px; padding: 8px 12px 8px 34px; font-size: 12.5px; outline: none; }
.top-search input:focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.top-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ink-4); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--ink-3); }
.icon-btn:hover { background: #f7fafc; color: var(--ink); }
.icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--rose); border: 1.5px solid #fff; }
.outlet-pill { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 11px; font-size: 11.5px; font-weight: 700; }
.outlet-pill .op-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-soft); }
.outlet-pill span { color: var(--ink-3); font-weight: 500; }

.page { padding: 24px 26px 40px; max-width: 1440px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 23px; font-weight: 800; letter-spacing: -.7px; }
.page-head p { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stat-grid { grid-template-columns: 1fr; } }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 17px 18px; position: relative; overflow: hidden; }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.stat-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.stat-ico svg { width: 17px; height: 17px; }
.stat-card .delta { font-size: 10.5px; font-weight: 700; padding: 3px 7px; border-radius: 99px; }
.delta.up { background: var(--emerald-soft); color: var(--emerald); }
.delta.down { background: var(--rose-soft); color: var(--rose); }
.stat-card .lbl { font-size: 11px; color: var(--ink-3); font-weight: 600; letter-spacing: .2px; text-transform: uppercase; }
.stat-card .val { font-size: 24px; font-weight: 800; letter-spacing: -.9px; margin-top: 3px; line-height: 1.2; }
.stat-card .sub { font-size: 10.5px; color: var(--ink-4); margin-top: 4px; }

.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: 1fr; } }
.list-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: none; padding-bottom: 0; }
.list-row:first-child { padding-top: 0; }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-action { display: flex; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font-size: 12px; font-weight: 700; color: var(--ink-2); text-align: left; }
.quick-action:hover { border-color: var(--brand); background: #f7fdfb; color: var(--brand-700); }
.quick-action svg { width: 16px; height: 16px; color: var(--brand); }

/* Tables area */
.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input, .toolbar .select { min-height: 36px; padding-top: 7px; padding-bottom: 7px; font-size: 12.5px; width: auto; }
.toolbar .grow { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip:hover { border-color: #c9d6e2; }

/* Order row */
.order-code { font-size: 11px; font-weight: 700; color: var(--brand-700); background: var(--brand-soft); padding: 3px 8px; border-radius: 7px; display: inline-block; }
.items-mini { font-size: 11.5px; color: var(--ink-2); }
.items-mini b { font-weight: 700; }

/* Stepper */
.steps { display: flex; align-items: center; gap: 0; margin: 6px 0 16px; }
.step { flex: 1; text-align: center; position: relative; font-size: 10px; color: var(--ink-4); font-weight: 600; }
.step::before { content: ''; display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--line); margin: 0 auto 6px; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.step.done::before { background: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.step.done { color: var(--brand-700); }

/* POS */
.pos-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: 14px; align-items: start; }
@media (max-width: 980px) { .pos-grid { grid-template-columns: 1fr; } }
.pos-item { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: .15s; }
.pos-item:hover { border-color: var(--brand); background: #fbfefd; }
.pos-item .p-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-700); display: grid; place-items: center; }
.pos-item .p-ico svg { width: 18px; height: 18px; }
.pos-item b { display: block; font-size: 12.5px; }
.pos-item span { font-size: 11px; color: var(--ink-3); }
.pos-item .p-price { margin-left: auto; font-weight: 800; font-size: 12.5px; white-space: nowrap; }
.cart-line { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.cart-line:last-child { border: none; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.qty button { width: 26px; height: 26px; border: none; background: transparent; font-size: 15px; font-weight: 700; color: var(--ink-3); display: grid; place-items: center; }
.qty button:hover { background: var(--line-2); color: var(--ink); }
.qty span { min-width: 26px; text-align: center; font-size: 12px; font-weight: 700; }
.total-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 4px 0; }
.total-row.grand { font-size: 17px; font-weight: 800; padding-top: 10px; border-top: 1px dashed var(--line); margin-top: 6px; }
.pay-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.pay-grid button { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 8px 4px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); }
.pay-grid button.active { border-color: var(--brand); color: var(--brand-700); background: var(--brand-soft); }

/* Policy */
.policy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .policy-grid { grid-template-columns: 1fr; } }
.policy-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fbfcfe; }
.policy-box h4 { font-size: 12px; font-weight: 800; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.policy-box .field { margin-bottom: 8px; }
.policy-box .input { min-height: 34px; padding: 6px 9px; font-size: 12px; background: #fff; }
.policy-box .label { font-size: 10.5px; color: var(--ink-3); }
.zone-badge { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.z-a { background: var(--emerald-soft); color: var(--emerald); } .z-b { background: var(--amber-soft); color: var(--amber); } .z-c { background: var(--violet-soft); color: var(--violet); }

/* Branding preview */
.brand-preview { border-radius: 16px; padding: 22px; color: #fff; position: relative; overflow: hidden; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; }
.brand-preview::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.35), transparent 70%); }
.brand-preview > * { position: relative; z-index: 2; }
.brand-logo-lg { width: 54px; height: 54px; border-radius: 15px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 22px; margin-bottom: auto; backdrop-filter: blur(4px); }
.swatches { display: flex; gap: 7px; }
.swatches button { width: 28px; height: 28px; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }

/* Receipt */
.receipt { font-family: 'Courier New', monospace; font-size: 11.5px; color: #111; background: #fff; padding: 16px; border-radius: 8px; border: 1px dashed #cbd5e1; }
.receipt .r-center { text-align: center; }
.receipt .r-line { border-top: 1px dashed #94a3b8; margin: 8px 0; }
.receipt .r-row { display: flex; justify-content: space-between; gap: 8px; }

/* Finance */
.report-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
@media (max-width: 900px) { .report-summary { grid-template-columns: 1fr 1fr; } }
.rs-box { border: 1px solid var(--line); border-radius: 12px; padding: 13px; background: #fff; }
.rs-box span { font-size: 10.5px; color: var(--ink-3); font-weight: 600; }
.rs-box b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.4px; margin-top: 3px; }

/* Settings layout */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 960px) { .split-2 { grid-template-columns: 1fr; } }
.day-row { display: grid; grid-template-columns: 90px 1fr 1fr 70px; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.day-row:last-child { border: none; }
.day-row b { font-size: 12px; }
.day-row .input { min-height: 34px; padding: 5px 9px; font-size: 12px; }

/* Mobile */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 0 60px rgba(0,0,0,.4); }
  .sidebar.open { transform: none; }
  .main-wrap { margin-left: 0; }
  .hamburger { display: grid; }
  .topbar { padding: 0 16px; gap: 10px; height: 60px; }
  .top-search { display: none; }
  .outlet-pill span { display: none; }
  .page { padding: 18px 16px 32px; }
  .page-head h1 { font-size: 20px; }
}
@media (max-width: 560px) {
  .top-title span { display: none; }
  .page-actions .btn span.lbl { display: none; }
  .stat-card { padding: 14px; }
  .stat-card .val { font-size: 21px; }
}
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(8,20,33,.5); z-index: 55; display: none; }
.sidebar-backdrop.show { display: block; }
