/* ==========================================================================
   The Moto Art — owner dashboard (admin.html only, loaded after styles.css).
   Built for the counter: big readable text, large tap targets, a labelled
   menu, and on every card one obvious button for the next step.
   Light by default; dark mode has its own steps.
   ========================================================================== */

html[data-theme="light"] .admin-body {
  --canvas: #f3f3f0;
  --bg: #f3f3f0;
  --bg-2: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #f6f6f3;
  --surface-3: #ebebe7;
  --soft: #efefeb;
  --line: #e5e5e0;
  --line-2: #d4d4ce;
  --text: #141414;
  --muted: #66665f;
  --ink: #161616;
  --ink-text: #ffffff;
  --shadow: 0 1px 2px rgba(20, 20, 20, .05);
  --pop: 0 18px 40px -18px rgba(20, 20, 20, .35);
  --glow: rgba(196, 114, 6, .18);
}
html:not([data-theme="light"]) .admin-body {
  --canvas: #0d0d0f;
  --bg: #0d0d0f;
  --bg-2: #121214;
  --surface: #17171a;
  --surface-2: #1d1d21;
  --surface-3: #27272c;
  --soft: #222226;
  --line: #26262b;
  --line-2: #36363c;
  --text: #f3f1eb;
  --muted: #a29e94;
  --ink: #f3efe7;
  --ink-text: #141414;
  --shadow: none;
  --pop: 0 18px 40px -16px rgba(0, 0, 0, .8);
}

.admin-body {
  --radius: 18px;
  background: var(--canvas);
  font-size: 16px;
  line-height: 1.5;
  padding: 0;
}
.admin-body h1, .admin-body h2, .admin-body h3, .admin-body h4 {
  font-family: var(--font-body); font-style: normal; text-transform: none; letter-spacing: -.015em; font-weight: 650;
}
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- the frame ---------- */
.app { min-height: 100vh; }
@media (min-width: 900px) { .app { display: grid; grid-template-columns: 248px minmax(0, 1fr); } }

/* computers: the labelled menu on the left */
.side { display: none; }
@media (min-width: 900px) {
  .side {
    display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    padding: 18px 14px; background: var(--surface); border-right: 1px solid var(--line);
  }
}
.side-brand {
  display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; margin-bottom: 6px;
  border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.side-brand img { width: 42px; height: 37px; object-fit: contain; flex: none; }
.side-brand span { min-width: 0; line-height: 1.25; }
.side-brand b { display: block; font-size: 1rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-brand small { display: block; font-size: .76rem; color: var(--muted); }
.side-nav { display: grid; gap: 2px; }
.side-label { margin: 14px 12px 4px; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.side-link {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 12px; border: 0; border-radius: 12px;
  background: transparent; color: var(--muted); font: inherit; font-size: .95rem; font-weight: 500; text-align: left;
  cursor: pointer; text-decoration: none; transition: background .15s ease, color .15s ease;
}
.side-link .ico { width: 20px; height: 20px; flex: none; }
.side-link:hover { background: var(--soft); color: var(--text); }
.side-link.active { background: var(--ink); color: var(--ink-text); }
.side-count {
  margin-left: auto; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center;
  font-size: .75rem; font-weight: 700; background: var(--soft); color: var(--text);
}
.side-count.hot { background: var(--gold); color: #1a1100; }
.side-count:empty { display: none; }
.side-link.active .side-count:not(.hot) { background: rgba(255, 255, 255, .18); color: inherit; }
.side-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 2px; }

/* phones: a slim bar on top */
.phone-bar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; background: color-mix(in srgb, var(--canvas) 90%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) { .phone-bar { display: none; } }
.phone-brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; min-width: 0; }
.phone-brand img { width: 36px; height: 32px; object-fit: contain; }
.phone-brand b { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.round-btn {
  position: relative; width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); cursor: pointer; padding: 0; text-decoration: none;
}
.round-btn:hover { background: var(--soft); }
.round-btn .ico { width: 20px; height: 20px; }
.dot-count {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center; font-style: normal; font-size: .66rem; font-weight: 800; line-height: 1;
  background: var(--gold); color: #1a1100; box-shadow: 0 0 0 2px var(--canvas);
}
.dot-count:empty { display: none; }

.main { min-width: 0; padding: 18px 14px 150px; }
@media (min-width: 900px) { .main { padding: 30px clamp(20px, 3vw, 40px) 60px; max-width: 1320px; } }

/* ---------- page heads ---------- */
.admin-body .panel { padding: 0; }
.admin-body .panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 20px; }
.admin-body .panel-head > div:first-child { min-width: 0; flex: 1 1 280px; }
.admin-body .panel-head h2 { margin: 0; font-size: clamp(1.45rem, 3vw, 1.85rem); font-weight: 700; letter-spacing: -.025em; }
.lead-help, .admin-body .panel-head .muted.small { margin: 4px 0 0; color: var(--muted); font-size: .94rem; line-height: 1.45; }
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
@media (max-width: 899px) {
  .hide-phone { display: none !important; }
  .head-actions { width: 100%; }
  .head-actions > .btn { flex: 1 1 0; }
}
.admin-body .cust-grid { align-items: start; }
.date-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--muted);
}
.date-pill .ico { width: 18px; height: 18px; flex: none; }
.admin-body .date-pill input { border: 0; padding: 0; min-height: 0; height: 46px; width: 150px; background: transparent; box-shadow: none; color: var(--text); font-size: .95rem; }
.date-pill:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--glow); }

/* ---------- buttons ---------- */
.admin-body .btn { border-radius: 12px; font-size: .95rem; font-weight: 600; min-height: 44px; padding: .65em 1.15em; }
.admin-body .btn .ico { width: 1.15em; height: 1.15em; }
.admin-body .btn-sm { min-height: 38px; font-size: .86rem; padding: .45em .85em; border-radius: 10px; }
.btn-big { min-height: 48px !important; padding: .7em 1.3em !important; }
.admin-body .btn-primary { background: var(--ink); color: var(--ink-text); box-shadow: none; }
.admin-body .btn-primary:hover { box-shadow: none; filter: none; opacity: .9; }
.admin-body .btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--text); }
.admin-body .btn-ghost:hover { background: var(--soft); border-color: var(--line-2); }
.admin-body .btn-amber { background: var(--gold); color: #1a1100; }
.admin-body .btn-danger { background: var(--surface); }
html[data-theme="light"] .admin-body .btn-green, html[data-theme="light"] .admin-body .btn-in { color: #fff; }
.btn-in { background: var(--green); color: #03240f; }
.btn-out { background: var(--surface); color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.btn-out:hover { filter: none; background: color-mix(in srgb, var(--red) 8%, var(--surface)); }

/* ---------- form fields: 16px text so phones don't zoom in ---------- */
.admin-body input, .admin-body select, .admin-body textarea {
  font-size: 1rem; min-height: 48px; border-radius: 12px; background: var(--surface); border-color: var(--line-2);
}
.admin-body textarea { min-height: 110px; }
.admin-body .card input, .admin-body .card select, .admin-body .card textarea,
.admin-body .drawer input, .admin-body .drawer select, .admin-body .drawer textarea { background: var(--surface-2); border-color: var(--line); }
.admin-body .field label { font-size: .86rem; font-weight: 600; color: var(--text); letter-spacing: 0; }
.admin-body .hint { font-size: .84rem; }
.admin-body .check { font-size: .95rem; }
.admin-body .toolbar { gap: 10px; margin-bottom: 16px; }

/* ---------- cards ---------- */
.admin-body .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(16px, 2vw, 20px); }
.admin-body .card h3 { font-size: 1.08rem; margin: 0 0 8px; }

/* ---------- queue: the summary strip ---------- */
.summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.sum { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; min-width: 0; }
.sum span { display: block; font-size: .8rem; color: var(--muted); font-weight: 500; }
.sum b { display: block; font-size: clamp(1.15rem, 3.4vw, 1.5rem); font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sum-gold { background: var(--gold); border-color: transparent; color: #1a1100; }
.sum-gold span { color: rgba(26, 17, 0, .72); }

/* queue: Waiting / Washing / Done tabs (one column at a time until the screen is wide) */
.seg-tabs {
  display: flex; gap: 4px; padding: 5px; margin-bottom: 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; position: sticky; top: 64px; z-index: 5;
}
@media (min-width: 900px) { .seg-tabs { top: 12px; } }
.seg-tab {
  flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 0 8px;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
}
.seg-tab b { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font-size: .78rem; background: var(--soft); color: var(--text); }
.seg-tab.active { background: var(--ink); color: var(--ink-text); }
.seg-tab.active b { background: rgba(255, 255, 255, .2); color: inherit; }
html:not([data-theme="light"]) .seg-tab.active b { background: rgba(0, 0, 0, .12); }
.seg-tab .dot, .col-head .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.admin-body .dot-wait { background: var(--amber); }
.admin-body .dot-wash { background: var(--info); }
.admin-body .dot-done { background: var(--green); }

.admin-body .kanban { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.admin-body .col { background: transparent; border: 0; padding: 0; }
.admin-body .col-head { display: none; }
.admin-body .col-list { display: grid; gap: 12px; }
@media (max-width: 1179px) {
  .admin-body .kanban[data-filter="waiting"] .col:not([data-col="waiting"]),
  .admin-body .kanban[data-filter="washing"] .col:not([data-col="washing"]),
  .admin-body .kanban[data-filter="done"] .col:not([data-col="done"]) { display: none; }
}
@media (min-width: 700px) and (max-width: 1179px) { .admin-body .col-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
@media (min-width: 1180px) {
  .admin-body .kanban { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .seg-tabs.queue-filter { display: none; }
  .admin-body .col-head {
    display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 12px;
    font-family: var(--font-body); font-weight: 650; font-size: 1rem; letter-spacing: 0;
  }
  .admin-body .col-head span { display: inline-flex; align-items: center; gap: 8px; }
  .admin-body .col-head b { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; display: grid; place-items: center; font-size: .8rem; background: var(--surface); border: 1px solid var(--line); }
}
.admin-body .empty {
  background: var(--surface); border: 1px dashed var(--line-2); border-radius: 18px; padding: 28px 16px;
  color: var(--muted); font-size: .95rem; text-align: center;
}

/* ---------- a vehicle ---------- */
.admin-body .job {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px;
  display: grid; gap: 12px; box-shadow: var(--shadow); min-width: 0;
}
.admin-body .job.st-washing { border-color: color-mix(in srgb, var(--info) 50%, var(--line)); }
.job-top { display: flex; align-items: flex-start; gap: 12px; }
.admin-body .job-token {
  width: 50px; height: 50px; flex: none; border-radius: 14px; display: grid; place-items: center; border: 0;
  font-family: var(--font-body); font-style: normal; font-weight: 750; font-size: 1.1rem; background: var(--soft); color: var(--text);
}
.admin-body .st-waiting .job-token { background: color-mix(in srgb, var(--amber) 14%, var(--surface)); color: var(--amber); }
.admin-body .st-washing .job-token { background: color-mix(in srgb, var(--info) 14%, var(--surface)); color: var(--info); }
.admin-body .st-done .job-token { background: color-mix(in srgb, var(--green) 14%, var(--surface)); color: var(--green); }
.job-id, .item-id { flex: 1 1 auto; min-width: 0; }
.admin-body .job-plate { font-weight: 700; font-size: 1.08rem; letter-spacing: .03em; overflow-wrap: anywhere; }
.job-who, .item-sub { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.job-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .9rem; color: var(--muted); }
.job-facts > * { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.job-facts .ico { width: 16px; height: 16px; flex: none; }
.job-facts a { color: var(--text); text-decoration: none; font-weight: 500; }
.job-facts a:hover { text-decoration: underline; }
.job-stamps { display: flex; align-items: center; gap: 10px; }
.job-stamps .meter { flex: 1 1 auto; }
.job-stamps span { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.job-stamps.big { flex-direction: column; align-items: stretch; gap: 6px; }
.job-stamps.big span { font-size: .88rem; color: var(--text); }
.job-stamps.big span:empty { display: none; }
/* a quieter WhatsApp button where it is not the main step */
.btn-wa-soft { background: color-mix(in srgb, var(--wa) 10%, var(--surface)); color: var(--wa); border-color: color-mix(in srgb, var(--wa) 35%, transparent); }
.btn-wa-soft:hover { filter: none; background: color-mix(in srgb, var(--wa) 16%, var(--surface)); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: .3em .75em; border-radius: 999px;
  font-size: .8rem; font-weight: 600; background: var(--soft); color: var(--text);
}
.tag .ico { width: 14px; height: 14px; stroke-width: 2; }
.t-ok { background: color-mix(in srgb, var(--green) 14%, var(--surface)); color: var(--green); }
.t-due { background: color-mix(in srgb, var(--red) 13%, var(--surface)); color: var(--red); }
.t-gift { background: color-mix(in srgb, var(--brand) 15%, var(--surface)); color: var(--brand); }
.admin-body .job-note { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font-size: .9rem; }
.admin-body .job-note .ico { width: 15px; height: 15px; vertical-align: -3px; margin-right: 6px; color: var(--muted); }
.job-next { display: grid; gap: 8px; }
.btn-next { width: 100%; min-height: 52px !important; font-size: 1.02rem !important; }
.btn-second { width: 100%; }

/* the "⋯" menu */
details.more { position: relative; flex: none; }
details.more > summary {
  list-style: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; cursor: pointer;
  color: var(--muted); border: 1px solid transparent;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary:hover, details.more[open] > summary { background: var(--soft); color: var(--text); border-color: var(--line); }
details.more > summary .ico { width: 22px; height: 22px; }
details.more .menu {
  position: absolute; right: 0; top: 48px; z-index: 30; min-width: 240px; display: grid; gap: 2px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--pop);
}
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text); font: inherit; font-size: .94rem; font-weight: 500; text-align: left; cursor: pointer; text-decoration: none;
}
.menu-item:hover { background: var(--soft); }
.menu-item .ico, .menu-item .wa-icon { width: 18px; height: 18px; flex: none; }
.menu-item .wa-icon { color: var(--wa); }
.menu-item.danger { color: var(--red); }

/* ---------- list cards: bookings, stamp cards, credit clients ---------- */
.admin-body .cust-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.admin-body .item { display: grid; gap: 12px; align-content: start; border-radius: 18px; }
.item-top { display: flex; align-items: flex-start; gap: 10px; }
.item-id h4 { margin: 0; font-size: 1.08rem; font-weight: 650; overflow-wrap: anywhere; }
.admin-body .item .badge { margin-top: 2px; }
.admin-body .cust-count { font-family: var(--font-body); font-size: 1.45rem; font-weight: 700; color: var(--text); white-space: nowrap; line-height: 1.1; padding-top: 2px; }
.admin-body .cust-count small { font-size: .85rem; color: var(--muted); font-weight: 600; }
.admin-body .bal { font-family: var(--font-body); font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; }
.admin-body .bal span { letter-spacing: .06em; }
.admin-body .bk-new { border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); box-shadow: 0 0 0 3px var(--glow); }
.admin-body .reward-banner {
  display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px; border-radius: 14px; text-align: left;
  background: color-mix(in srgb, var(--brand) 11%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); color: var(--text);
}
.admin-body .reward-banner > .ico { color: var(--brand); width: 22px; height: 22px; }
.admin-body .reward-banner span { flex: 1 1 auto; font-size: .92rem; }

/* ---------- stat tiles (stamps, credit, account book, queries) ---------- */
.admin-body .stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
@media (min-width: 760px) { .admin-body .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.admin-body .stat { display: grid; gap: 4px; padding: 14px 16px; border-radius: 16px; }
.stat-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.admin-body .stat .stat-top span { color: var(--muted); font-size: .84rem; font-weight: 500; line-height: 1.3; }
.stat-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; font-style: normal; border: 1px solid var(--line-2); color: var(--text); }
.stat-ico .ico { width: 16px; height: 16px; }
.admin-body .stat strong { font-family: var(--font-body); font-weight: 700; font-size: clamp(1.3rem, 3vw, 1.7rem); letter-spacing: -.02em; color: var(--text); white-space: nowrap; }
.admin-body .stat.s-wait strong, .admin-body .stat.s-wash strong, .admin-body .stat.s-done strong, .admin-body .stat.s-red strong { color: var(--text); }
.stat.s-wait .stat-ico { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
.stat.s-wash .stat-ico { color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); }
.stat.s-done .stat-ico { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.stat.s-red .stat-ico { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.admin-body .stat.hl { background: var(--gold); border-color: transparent; }
.admin-body .stat.hl strong { color: #1a1100 !important; }
.admin-body .stat.hl .stat-top span { color: rgba(26, 17, 0, .72); }
.stat.hl .stat-ico { border-color: rgba(26, 17, 0, .22); color: #1a1100; background: rgba(255, 255, 255, .28); }

/* filter chips (account book periods, queries) */
.admin-body .filter-chips { gap: 8px; margin-bottom: 16px; }
.admin-body .chip { min-height: 40px; padding: 0 1em; font-size: .9rem; font-weight: 500; background: var(--surface); border-color: var(--line-2); color: var(--text); }
.admin-body .chip b { margin-left: 3px; font-weight: 700; }
.admin-body .filter-chips .chip.active { background: var(--ink); color: var(--ink-text); border-color: transparent; }

/* ---------- account book ---------- */
.mode-split { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 18px; font-size: .88rem; }
.mode-split > span { color: var(--muted); }
.mode-split b { display: inline-flex; align-items: center; gap: 6px; padding: .4em .85em; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 500; }
.mode-split b .ico { width: 16px; height: 16px; color: var(--muted); }
.mode-split em { font-style: normal; font-weight: 700; }
.admin-body .acc-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1150px) { .admin-body .acc-layout { grid-template-columns: minmax(0, 1fr) 340px; } }
.admin-body .list-card { padding: 0; overflow: hidden; }
.list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.list-head h3 { margin: 0 !important; }
.list-head .toolbar { margin: 0; flex: 1 1 360px; justify-content: flex-end; }
.admin-body .list-head .toolbar input, .admin-body .list-head .toolbar select { flex: 1 1 160px; min-height: 42px; }
.admin-body .list-card .table-wrap { border: 0; border-radius: 0; box-shadow: none; }
.admin-body th { background: var(--surface-2); text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 600; color: var(--muted); }
.admin-body td { font-size: .92rem; }
.due-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.due-row:last-child { border-bottom: 0; padding-bottom: 0; }
.due-row .job-token { width: 44px; height: 44px; font-size: .98rem; }
.due-row .item-id { flex: 1 1 0; min-width: 150px; }
.due-actions { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; }
.due-actions .btn { flex: 1 1 auto; }
.empty-line { display: flex; align-items: center; gap: 8px; margin: 6px 0 0; color: var(--green); font-size: .92rem; font-weight: 500; }
.empty-line .ico { width: 18px; height: 18px; }

/* ---------- segmented choices (money in/out, cash/UPI/card) ---------- */
.admin-body .seg { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; }
.admin-body .seg label { min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 10px; font-size: .95rem; }
.admin-body .seg label:has(input:checked) { background: var(--ink); color: var(--ink-text); }
.admin-body .seg label.inc:has(input:checked) { background: var(--green); color: #fff; }
.admin-body .seg label.exp:has(input:checked) { background: var(--red); color: #fff; }
html:not([data-theme="light"]) .admin-body .seg label.inc:has(input:checked) { color: #03240f; }
.admin-body .seg.pay-modes label { padding: 0 .4em; }
.admin-body .seg.pay-modes label .ico { width: 18px; height: 18px; }

/* ---------- drawer, pop-ups, toast ---------- */
.admin-body .drawer-backdrop, .admin-body .modal, .sheet-backdrop { background: rgba(10, 10, 10, .45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.admin-body .drawer { background: var(--surface); border-top-left-radius: 24px; border-top-right-radius: 24px; }
@media (min-width: 760px) {
  .admin-body .drawer { inset: 12px 12px 12px auto; width: 500px; border-radius: 24px; border: 1px solid var(--line); max-height: calc(100vh - 24px); }
}
.admin-body .drawer-head h3 { font-size: 1.3rem; }
.admin-body .modal-card { border-radius: 24px; }
.admin-body .modal-card .big-check { width: 60px; height: 60px; font-size: 0; color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.admin-body .modal-card .big-check .ico { width: 28px; height: 28px; stroke-width: 2.2; }
.admin-body .preview { background: var(--surface-2); border-radius: 14px; font-size: .9rem; }
.admin-body .pay-box { background: var(--surface-2); border-radius: 16px; }
.admin-body .pay-done { color: var(--green); }
.admin-body .pay-done .ico { width: 18px; height: 18px; vertical-align: -3px; stroke-width: 2.2; }
.admin-body .toast {
  background: var(--ink); color: var(--ink-text); border-radius: 999px; font-size: .95rem; padding: .8em 1.3em;
  bottom: calc(146px + env(safe-area-inset-bottom)); box-shadow: var(--pop);
}
@media (min-width: 900px) { .admin-body .toast { bottom: 28px; } }

/* ---------- phones: bottom bar, More sheet, the add button ---------- */
.admin-body .bottom-nav {
  position: fixed; inset: auto 0 0 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px env(safe-area-inset-bottom);
}
@media (min-width: 900px) { .admin-body .bottom-nav, .more-sheet, .sheet-backdrop, .fab { display: none !important; } }
.admin-body .bottom-nav .tab-btn {
  position: relative; display: grid; justify-items: center; gap: 2px; min-height: 60px; padding: 8px 2px 6px; border: 0; border-radius: 14px;
  background: transparent; color: var(--muted); font: inherit; font-size: .74rem; font-weight: 600; cursor: pointer;
}
.admin-body .bottom-nav .tab-btn .ico { width: 23px; height: 23px; }
.admin-body .bottom-nav .tab-btn.active { color: var(--text); }
.admin-body .bottom-nav .tab-btn.active .ico { color: var(--brand); }
.admin-body .bottom-nav .tab-btn.active::before {
  content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand);
}
.admin-body .tab-count {
  position: absolute; top: 5px; left: 50%; margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center; font-size: .64rem; font-weight: 800; background: var(--gold); color: #1a1100;
}
.admin-body .tab-count:empty { display: none; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 46; display: none; }
.sheet-backdrop.open { display: block; }
.more-sheet {
  position: fixed; left: 10px; right: 10px; bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 47;
  display: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--pop);
}
.more-sheet.open { display: grid; }
.more-item {
  display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 84px; padding: 10px 6px; border-radius: 16px; border: 0;
  cursor: pointer; background: var(--surface-2); color: var(--text); font: inherit; font-size: .84rem; font-weight: 500; text-align: center; text-decoration: none;
}
.more-item .ico { width: 22px; height: 22px; }
.more-item.active { background: var(--ink); color: var(--ink-text); }
.fab {
  position: fixed; right: 14px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 44;
  display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 22px 0 18px; border: 0; border-radius: 999px;
  background: var(--ink); color: var(--ink-text); font: inherit; font-size: 1rem; font-weight: 650; cursor: pointer; box-shadow: var(--pop);
}
.fab .ico { width: 22px; height: 22px; stroke-width: 2.2; }
.admin-body:not([data-view="queue"]) .fab { display: none; }

/* ---------- login ---------- */
.admin-body .gate { background: var(--canvas); }
.admin-body .gate .card { border-radius: 24px; padding: 32px 28px; }
.admin-body .gate h2 { font-size: 1.45rem; }

/* ---------- print: just the day book ---------- */
@media print {
  .side, .phone-bar, .bottom-nav, .more-sheet, .sheet-backdrop, .fab, .head-actions, .mode-split, .list-head .toolbar, #duesCard { display: none !important; }
  .admin-body, .app { background: #fff; display: block; }
  .main { padding: 0; }
}
