/* Davaya — admin panel (RTL). Uses the same brand CSS variables as the storefront. */
:root {
  --brand-navy: #2C5B80; --brand-cyan: #45A76C; --brand-red: #E53935;
  --navy-dark: color-mix(in srgb, var(--brand-navy) 55%, #000);
  --cyan-50: color-mix(in srgb, var(--brand-cyan) 8%, #fff);
  --cyan-200: color-mix(in srgb, var(--brand-cyan) 32%, #fff);
  /* surfaces, text, neutrals, status, type and shape come from /css/tokens.css (shared with every area) */
  --bg: var(--color-bg); --card: var(--color-surface); --line: var(--color-border); --text: var(--color-text-main); --muted: var(--color-text-muted);
  --s50: var(--n-50); --s100: var(--n-100); --s200: var(--n-200); --s300: var(--n-300); --s400: var(--n-400); --s500: var(--n-500); --s600: var(--n-600);
  --green: var(--color-success); --amber: var(--color-warning); --rose: var(--color-danger);
  --font: var(--font-body);
  --r: var(--radius-md); --shadow: var(--shadow-sm);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.55; background: var(--bg); color: var(--text); }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 16px; font-weight: 800; color: var(--brand-navy); display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
h3 { font-size: 14px; font-weight: 800; margin: 16px 0 8px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); } small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; }
.ltr { direction: ltr; text-align: left; font-family: ui-monospace, monospace; }
.num { font-family: ui-monospace, monospace; font-weight: 700; } .nowrap { white-space: nowrap; } .end { text-align: end; }
.link { color: var(--brand-cyan); font-weight: 700; } .link:hover { text-decoration: underline; }
.empty { padding: 28px; text-align: center; } .mt { margin-top: 12px; } .lead { margin-bottom: 14px; font-size: 15px; }
.warn { color: var(--amber) !important; }
:focus-visible { outline: 2px solid var(--brand-cyan); outline-offset: 2px; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { background: var(--brand-navy); color: #dbeafe; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid rgb(255 255 255 / .1); }
.side-brand b { color: #fff; display: block; font-size: 15px; line-height: 1.2; } .side-brand small { color: #93c5fd; }
.side-logo { width: 38px; height: 38px; border-radius: 12px; background: rgb(255 255 255 / .12); display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; overflow: hidden; flex-shrink: 0; }
.side-logo img { width: 100%; height: 100%; object-fit: contain; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; flex: 1; }
.side-nav a, .side-foot a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 700; color: #cfe3ff; transition: background .12s; }
.side-nav a:hover, .side-foot a:hover { background: rgb(255 255 255 / .08); color: #fff; }
.side-nav a.on { background: var(--brand-cyan); color: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / .2); }
.side-nav em { margin-inline-start: auto; background: var(--brand-red); color: #fff; font-style: normal; font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.side-foot { padding: 10px; border-top: 1px solid rgb(255 255 255 / .1); }
.side-backdrop { display: none; }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 10px 20px; }
.topbar h1 { font-size: 18px; font-weight: 800; color: var(--brand-navy); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-user { display: flex; align-items: center; gap: 8px; }
.who { text-align: end; line-height: 1.25; } .who b { font-size: 13px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; background: var(--s100); border: 0; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--muted); }
.icon-btn:hover { background: var(--s200); color: var(--brand-navy); }
.menu-btn { display: none; width: 38px; height: 38px; border-radius: 10px; border: 0; background: var(--s100); font-size: 20px; align-items: center; justify-content: center; }
.content { padding: 20px; max-width: 1200px; width: 100%; margin-inline: auto; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset-block: 0; right: 0; width: 260px; z-index: 50; transform: translateX(100%); transition: transform .2s; }
  .side.open { transform: none; }
  .side-backdrop.open { display: block; position: fixed; inset: 0; background: rgb(0 0 0 / .5); z-index: 40; }
  .menu-btn { display: flex; }
  .who { display: none; }
  .topbar { padding: 10px 14px; } .content { padding: 14px; }
}

/* ---------- Cards / layout ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; } .card.narrow, .narrow { max-width: 560px; } .card.center { text-align: center; margin-inline: auto; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; } .card-head h2 { margin: 0; } .card-head.pad { padding: 16px 18px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .grid-2.top { align-items: start; } .grid-2 > .card { margin-bottom: 0; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } .grid-2 > .card { margin-bottom: 16px; } }
.cols { display: grid; grid-template-columns: 1fr 280px; gap: 24px; } @media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }
.col { display: flex; flex-direction: column; gap: 12px; }
.row2, .row3 { display: grid; gap: 12px; } .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .row2, .row3 { grid-template-columns: 1fr; } }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cards-grid .card { margin: 0; display: flex; flex-direction: column; gap: 10px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s; }
a.stat:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgb(15 76 129 / .12); }
.stat b { font-size: 24px; font-weight: 800; color: var(--brand-navy); font-family: ui-monospace, monospace; } .stat b em { font-size: 12px; font-style: normal; color: var(--muted); }
.stat small { font-size: 12px; }
.stat-ic { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 6px; }
.c1 { background: #eff6ff; color: #2563eb; } .c2 { background: #ecfeff; color: #0891b2; } .c3 { background: #ecfdf5; color: #059669; } .c4 { background: #f5f3ff; color: #7c3aed; }
.c5 { background: #fff1f2; color: #e11d48; } .c6 { background: #fffbeb; color: #d97706; } .c7 { background: #f0fdf4; color: #16a34a; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 10px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.bar-col i { display: block; width: 100%; max-width: 38px; background: linear-gradient(to top, var(--brand-navy), var(--brand-cyan)); border-radius: 8px 8px 3px 3px; min-height: 4px; }
.bar-n { font-size: 12px; font-weight: 800; font-family: ui-monospace, monospace; } .bar-col small { font-size: 10.5px; }
.list { list-style: none; margin: 0; padding: 0; } .list li + li { border-top: 1px solid var(--s100); }
.list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 4px; border-radius: 8px; } .list a:hover { background: var(--s50); }
.list .end { display: flex; align-items: center; gap: 8px; }

/* ---------- Buttons / forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text); font-weight: 700; font-size: 13px; transition: all .12s; }
.btn:hover { background: var(--s50); border-color: var(--s300); } .btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); } .btn-primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); }
.btn-danger { color: var(--rose); border-color: #fecdd3; background: #fff1f2; } .btn-danger:hover { background: #ffe4e6; }
.btn-wa { background: #25D366; border-color: #25D366; color: #fff; } .btn-wa:hover { background: #1ebe5b; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; } .btn-block { width: 100%; cursor: pointer; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; } .actions form { margin: 0; }
.form { display: flex; flex-direction: column; gap: 14px; }
.fld { display: flex; flex-direction: column; gap: 5px; } .fld > span, .lbl { font-size: 12.5px; font-weight: 800; color: #475569; }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), select, textarea { width: 100%; padding: 9px 12px; border: 1px solid var(--s300); border-radius: 10px; background: #fff; font-size: 14px; outline: none; transition: border-color .12s, box-shadow .12s; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-cyan) 18%, transparent); }
textarea { resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; align-self: end; padding: 9px 0; } .check.inline { padding: 0; align-self: center; }
.check input { width: 18px; height: 18px; accent-color: var(--brand-cyan); }
.hint { font-size: 12px; color: var(--muted); }
.card > .fld, .card > .lbl { margin-bottom: 12px; } .card > .lbl { display: block; }
code { direction: ltr; unicode-bidi: embed; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters input[type=search] { flex: 1; min-width: 200px; } .filters select { width: auto; min-width: 150px; }
.inline { display: inline-block; } .inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; } .inline-form input { flex: 1; min-width: 140px; } .inline-form .w-sm { flex: 0 0 70px; min-width: 70px; }

.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; font-weight: 700; border: 1px solid; }
.flash-success { background: var(--color-success-tint); color: var(--color-success); border-color: var(--color-success-line); } .flash-error { background: var(--color-danger-tint); color: var(--color-danger); border-color: var(--color-danger-line); } .flash-warn { background: var(--color-warning-tint); color: var(--color-warning); border-color: var(--color-warning-line); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: start; background: var(--s50); color: var(--muted); font-size: 12px; font-weight: 800; padding: 10px 14px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--s100); vertical-align: middle; } .table tbody tr:hover { background: var(--s50); }
.table tfoot th { background: #fff; color: var(--brand-navy); font-size: 14px; border-top: 2px solid var(--line); border-bottom: 0; }
tr.dim { opacity: .55; }
.thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--s100); border: 1px solid var(--line); flex-shrink: 0; }
.thumb.ph { display: flex; align-items: center; justify-content: center; color: var(--s300); }
.badge { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: var(--s100); color: #475569; border: 1px solid var(--line); }
.badge-navy { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); } .badge-red { background: var(--brand-red); color: #fff; border-color: var(--brand-red); }
.st-new { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; } .st-preparing { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.st-on_the_way { background: #faf5ff; color: #7e22ce; border-color: #e9d5ff; } .st-delivered { background: #ecfdf5; color: #047857; border-color: #a7f3d0; } .st-cancelled { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.st-select { width: auto !important; padding: 5px 10px !important; font-weight: 800; font-size: 12.5px !important; border-radius: 999px !important; }
.chip { border: 1px solid; border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 800; }
.chip-on { background: #ecfdf5; color: #047857; border-color: #a7f3d0; } .chip-off { background: #f1f5f9; color: #64748b; border-color: var(--s300); }
.rx-flag { color: var(--brand-cyan); margin-inline-start: 4px; }
.pager { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; margin: 4px 0 20px; }
.pager a, .pager .dis { padding: 6px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.pager a.on { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); } .pager .dis { color: var(--s300); } .pager small { margin-inline-start: 10px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 800; font-size: 13px; } .tabs a em { font-style: normal; color: var(--muted); font-size: 12px; margin-inline-start: 4px; }
.tabs a.on { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); } .tabs a.on em { color: #bfdbfe; }

/* ---------- Order view ---------- */
.dl { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; margin: 0; } .dl dt { color: var(--muted); font-weight: 700; } .dl dd { margin: 0; font-weight: 700; }
.status-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.step { cursor: pointer; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); font-weight: 800; font-size: 13px; background: #fff; }
.step input { display: none; } .step.on { border-color: currentColor; }
.rx-view { display: flex; gap: 20px; flex-wrap: wrap; } .rx-img { max-width: 320px; max-height: 360px; border-radius: 12px; border: 1px solid var(--line); object-fit: contain; background: var(--s50); }
.note-box { background: var(--s50); border: 1px solid var(--line); padding: 10px 12px; border-radius: 10px; margin-top: 4px; } audio { width: 100%; max-width: 340px; margin: 6px 0 12px; }

/* ---------- Stock ---------- */
.stock-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; } .stock-head h2 { margin-bottom: 4px; }
.stock-count { text-align: center; background: #fff1f2; color: var(--rose); border-radius: 14px; padding: 8px 20px; } .stock-count b { font-size: 28px; display: block; line-height: 1.1; font-family: ui-monospace, monospace; } .stock-count small { color: var(--rose); }
.bulk { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; } .bulk form { margin: 0; }
.stock-list { list-style: none; margin: 0; padding: 0; }
.stock-list li { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--s100); transition: background .15s; }
.stock-list li.is-out { background: #fff5f6; } .stock-list .nm { flex: 1; min-width: 0; } .stock-list .nm b { display: block; }
.stock-list .state { font-size: 12px; font-weight: 800; color: var(--green); min-width: 84px; text-align: center; } .stock-list .is-out .state { color: var(--rose); }
.stock-list li.busy { opacity: .55; pointer-events: none; }
.switch { position: relative; display: inline-block; width: 50px; height: 28px; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #10b981; transition: background .15s; }
.switch i::after { content: ''; position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform .15s; }
.switch input:checked + i { background: var(--rose); } .switch input:checked + i::after { transform: translateX(-22px); }
.switch input:focus-visible + i { outline: 2px solid var(--brand-cyan); outline-offset: 2px; }

/* ---------- Misc forms ---------- */
.img-box { aspect-ratio: 1; border: 2px dashed var(--s300); border-radius: 14px; background: var(--s50); display: flex; align-items: center; justify-content: center; overflow: hidden; } .img-box.wide { aspect-ratio: 12 / 5; } .img-box.logo { width: 120px; aspect-ratio: 1; flex-shrink: 0; }
.img-box img { width: 100%; height: 100%; object-fit: contain; } .col-img { align-self: start; }
.logo-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.color { display: flex; flex-direction: column; gap: 6px; align-items: center; font-weight: 800; font-size: 12.5px; } .color input { width: 100%; height: 48px; padding: 2px; border: 1px solid var(--s300); border-radius: 10px; background: #fff; cursor: pointer; } .color code { font-size: 12px; color: var(--muted); }
.preview-box { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.pv-head { background: var(--brand-navy); color: #fff; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; } .pv-head span { background: rgb(16 185 129 / .25); color: #6ee7b7; font-size: 11px; padding: 1px 8px; border-radius: 999px; }
.pv-body { padding: 14px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .pv-pill { background: var(--brand-cyan); color: #fff; border-radius: 10px; padding: 4px 12px; font-weight: 800; font-size: 12px; } .pv-btn { background: var(--brand-navy); color: #fff; border-radius: 10px; padding: 6px 14px; font-weight: 800; font-size: 12px; } .pv-tag { background: var(--brand-red); color: #fff; border-radius: 8px; padding: 2px 8px; font-size: 11px; font-weight: 800; }
.icon-picker { display: flex; flex-wrap: wrap; gap: 6px; } .icon-picker label { cursor: pointer; } .icon-picker input { position: absolute; opacity: 0; pointer-events: none; }
.icon-picker span { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--muted); background: #fff; }
.icon-picker input:checked + span { border-color: var(--brand-cyan); color: var(--brand-cyan); background: var(--cyan-50); } .icon-picker input:focus-visible + span { outline: 2px solid var(--brand-cyan); }
.acc { padding: 0; } .acc summary { list-style: none; cursor: pointer; padding: 14px 18px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .acc summary::-webkit-details-marker { display: none; }
.acc summary small { display: inline; } .acc-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--cyan-50); color: var(--brand-cyan); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.acc-body { padding: 4px 18px 18px; border-top: 1px solid var(--s100); }
.subs { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 8px; } .subs li { display: flex; gap: 8px; align-items: center; } .subs li > form:first-child { flex: 1; }
.add-sub { padding-top: 6px; }
.banner-card { padding: 0 !important; overflow: hidden; } .banner-img { aspect-ratio: 12 / 5; background: var(--s100); position: relative; } .banner-img img { width: 100%; height: 100%; object-fit: cover; } .banner-img .badge { position: absolute; top: 8px; right: 8px; }
.banner-body { padding: 0 14px; } .banner-card .actions { padding: 0 14px 14px; margin: 0; } .banner-card h3 { margin: 4px 0; }
.gov-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--s50); border-bottom: 1px solid var(--line); }
.gov-head .inline-form { flex: 1; } .gov-head .inline-form input:first-of-type { max-width: 260px; font-weight: 800; } .gov-ic { color: var(--brand-cyan); font-size: 20px; }

/* ---------- Login ---------- */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; background: linear-gradient(135deg, var(--brand-navy), color-mix(in srgb, var(--brand-navy) 50%, var(--brand-cyan))); }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 22px; padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 25px 60px rgb(0 0 0 / .3); text-align: center; }
.login-logo { width: 64px; height: 64px; margin: 0 auto; border-radius: 18px; background: var(--cyan-50); color: var(--brand-cyan); display: flex; align-items: center; justify-content: center; font-size: 30px; overflow: hidden; } .login-logo img { width: 100%; height: 100%; object-fit: contain; }
.login-card h1 { font-size: 19px; color: var(--brand-navy); } .login-card .fld { text-align: start; } .btn-block { width: 100%; padding: 11px; }
.back-link { font-size: 13px; color: var(--muted); }

/* ---------- Reports ---------- */
.inline-fld { flex-direction: row; align-items: center; gap: 6px; } .inline-fld input { width: auto; }
.daily { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; align-items: end; height: 190px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.dcol { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.dcol i { display: block; width: 100%; max-width: 30px; background: linear-gradient(to top, var(--brand-navy), var(--brand-cyan)); border-radius: 5px 5px 2px 2px; }
.dcol small { position: absolute; bottom: -18px; font-size: 10px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 40px; gap: 10px; align-items: center; margin: 8px 0; font-size: 13px; font-weight: 700; }
.hbar > div { height: 12px; background: var(--s100); border-radius: 999px; overflow: hidden; } .hbar i { display: block; height: 100%; background: var(--brand-cyan); border-radius: 999px; }
.hbar i.st-new { background: #3b82f6; } .hbar i.st-preparing { background: #f59e0b; } .hbar i.st-on_the_way { background: #a855f7; } .hbar i.st-delivered { background: #10b981; } .hbar i.st-cancelled { background: #ef4444; }
.hbar b { text-align: end; font-family: ui-monospace, monospace; }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 170px; align-items: end; padding-bottom: 16px; }
.hcol { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; } .hcol i { width: 100%; background: var(--brand-cyan); border-radius: 4px 4px 1px 1px; } .hcol small { position: absolute; bottom: -16px; font-size: 9px; }

/* ---------- New-order bell ---------- */
.bell { position: relative; } .bell .bell-x { position: absolute; font-weight: 900; color: var(--rose); font-size: 22px; line-height: 1; opacity: 0; }
.bell.off { color: var(--s300); } .bell.off .bell-x { opacity: 1; } .bell.on { color: var(--green); background: #ecfdf5; }
.bell.ring { animation: ring .6s 3; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-18deg); } 75% { transform: rotate(18deg); } }
.new-order-bar { align-items: center; } .new-order-bar span { flex: 1; } .new-order-bar { animation: pulse-bg 1.2s 3; }
@keyframes pulse-bg { 50% { background: #d1fae5; } }

/* ---------- Print ---------- */
@media print {
  .side, .topbar, .side-backdrop, .actions, .filters, .tabs, .new-order-bar, .no-print, form[data-confirm] { display: none !important; }
  .shell { display: block; } body { background: #fff; } .card { box-shadow: none; break-inside: avoid; }
  .content { padding: 0; max-width: none; } .grid-2 { grid-template-columns: 1fr 1fr; }
}

/* ---------- Coupons ---------- */
.master { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-width: 2px; }
.master h2 { margin-bottom: 4px; } .master.is-on { border-color: #a7f3d0; background: #f0fdf9; } .master.is-off { border-color: #fecaca; background: #fff7f7; }
.master.is-on h2 b { color: var(--green); } .master.is-off h2 b { color: var(--rose); }
.chip-warn { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.code-tag { background: var(--s100); border: 1px dashed var(--s300); border-radius: 6px; padding: 1px 8px; font-weight: 800; color: var(--brand-navy); font-family: ui-monospace, monospace; }
small.dark { color: #475569; line-height: 1.7; }
.disc-row td { color: #047857; font-weight: 800; }

.danger-zone { border-color: #fecaca; background: #fff7f7; } .danger-zone h2 { color: var(--rose); }
.forgot { font-size: 12.5px; color: var(--muted); text-align: start; } .forgot summary { cursor: pointer; font-weight: 700; } .forgot p { margin-top: 6px; line-height: 1.8; }

.logo-strip { min-height: 96px; border: 2px dashed var(--s300); border-radius: 14px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 12px; overflow: hidden; }
.logo-strip img { height: var(--lh, 52px); width: auto; max-width: 100%; object-fit: contain; }
input[type=range] { padding: 0 !important; height: 28px; accent-color: var(--brand-cyan); border: 0 !important; box-shadow: none !important; }

.danger-zone .form { gap: 8px; } .danger-zone .check { padding: 4px 0; align-self: flex-start; } .danger-zone .check small { display: inline; margin-inline-start: 6px; }

.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } @media (max-width: 640px) { .kind-pick { grid-template-columns: 1fr; } }
.kind { cursor: pointer; } .kind input { position: absolute; opacity: 0; pointer-events: none; }
.kind > span { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff; } .kind > span .ic { font-size: 20px; color: var(--muted); }
.kind input:checked + span { border-color: var(--brand-cyan); background: var(--cyan-50); } .kind input:checked + span .ic { color: var(--brand-cyan); }
.kind input:focus-visible + span { outline: 2px solid var(--brand-cyan); }
[data-only][hidden] { display: none !important; }
.banner-thumbs { display: flex; gap: 6px; padding: 8px; background: var(--s100); } .banner-thumbs figure { margin: 0; flex: 1; text-align: center; font-size: 11px; color: var(--muted); }
.banner-thumbs img { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 2px; background: #fff; } .banner-thumbs .none { height: 90px; border: 1px dashed var(--s300); border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 4px; }

.pm-ic { display: inline-flex; width: 30px; height: 30px; border-radius: 8px; background: var(--cyan-50); color: var(--brand-cyan); align-items: center; justify-content: center; vertical-align: middle; margin-inline-end: 6px; }

.fav-row { display: flex; gap: 14px; align-items: center; } .fav-box { width: 72px; height: 72px; border: 2px dashed var(--s300); border-radius: 14px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 8px; flex-shrink: 0; } .fav-box img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Grouped sidebar, top search, phone bottom bar ---------- */
.nav-group { font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #7fb0e6; padding: 14px 12px 4px; }
.nav-group:first-child { padding-top: 4px; }
.side-nav { gap: 1px; }
.top-search { display: flex; align-items: center; background: var(--s100); border-radius: 12px; padding-inline: 4px 10px; min-width: 240px; }
.top-search input { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 8px 12px !important; width: 100%; font-size: 13px !important; }
.top-search button { border: 0; background: none; color: var(--muted); font-size: 16px; display: flex; }
.bottom-bar { display: none; }
@media (max-width: 900px) {
  .top-search { display: none; }
  .bottom-bar { display: flex; position: fixed; bottom: 0; inset-inline: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgb(0 0 0 / .06); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-bar a, .bottom-bar button { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; border: 0; background: none; font-size: 10.5px; font-weight: 800; color: var(--muted); }
  .bottom-bar .ic { font-size: 20px; } .bottom-bar .on { color: var(--brand-cyan); }
  .bb-badge { position: absolute; top: 3px; inset-inline-start: 50%; margin-inline-start: 6px; background: var(--brand-red); color: #fff; font-style: normal; min-width: 17px; height: 17px; border-radius: 999px; font-size: 10px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
  .content { padding-bottom: 84px; }
}
@media print { .bottom-bar, .top-search { display: none !important; } }

.steps { margin: 0 0 12px; padding-inline-start: 20px; line-height: 2; } .acc-err { background: #fff7f7; border: 1px solid #fecaca; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; } .acc-err summary { cursor: pointer; } .acc-err ul { margin: 6px 0 0; padding-inline-start: 18px; font-size: 12.5px; color: #b91c1c; }

/* developer credit */
.dev-credit{display:flex;align-items:center;justify-content:center;gap:8px;margin:14px auto 4px;width:max-content;max-width:100%;color:#64748b;font:600 12px/1 system-ui,sans-serif;text-decoration:none;direction:ltr;opacity:.85;transition:opacity .15s}
.dev-credit:hover{opacity:1}
.dev-credit img{height:24px;width:auto;display:block}
.dev-heart{font-style:normal;color:#e11d48;display:inline-block;animation:dev-beat 1.6s ease-in-out infinite}
@keyframes dev-beat{0%,100%{transform:scale(1)}50%{transform:scale(1.25)}}
@media (prefers-reduced-motion:reduce){.dev-heart{animation:none}}
