/* hellocoffee Counter: seller app layout. Tokens and base components come from /ui/tokens.css. */
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }
.media { position: relative; overflow: hidden; background: var(--surface-2); }
.media > img, .media > svg { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- sign-in ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; background: radial-gradient(1200px 600px at 20% 10%, var(--bean), var(--roast) 60%, var(--espresso)); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.auth-art::after { content: ""; position: absolute; inset: 0; opacity: .08; background-image: radial-gradient(ellipse 10px 7px at 24px 24px, #fff 60%, transparent 62%); background-size: 56px 56px; }
.auth-art h1 { font-size: 40px; line-height: 1.1; max-width: 460px; position: relative; z-index: 1; }
.auth-art p { color: #e8d7c7; max-width: 420px; margin-top: 14px; font-size: 16px; position: relative; z-index: 1; }
.auth-art .feats { display: grid; gap: 12px; position: relative; z-index: 1; }
.auth-art .feat { display: flex; gap: 12px; align-items: center; color: #f3e6d9; font-weight: 600; }
.auth-art .feat .icon { width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: rgba(255,255,255,.12); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; position: relative; z-index: 1; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(400px, 100%); display: grid; gap: 18px; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); font-weight: 700; font-size: 15px; cursor: pointer; transition: background .15s, box-shadow .15s; }
.gbtn:hover { background: var(--surface-2); box-shadow: var(--sh-1); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (max-width: 880px) { .auth { grid-template-columns: 1fr; } .auth-art { padding: 28px 22px; min-height: 0; } .auth-art h1 { font-size: 26px; } .auth-art .feats { display: none; } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; background: var(--espresso); color: #efe3d7; }
:root[data-theme="dark"] .side, .side { --side-hover: rgba(255,255,255,.07); }
.side .brand { padding: 4px 8px 16px; color: #fff; }
.shop-brand-initial { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px; background: var(--brand-cream); color: var(--espresso); font-size: 17px; }
.nav { display: grid; gap: 2px; }
.nav button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r); background: transparent; color: #d9c8b8; font-weight: 650; cursor: pointer; text-align: left; transition: background .15s, color .15s; }
.nav button:hover { background: var(--side-hover); color: #fff; }
.nav button.on { background: rgba(255,255,255,.12); color: #fff; }
.nav button.on .icon { color: var(--brand-highlight); }
.nav .count { margin-left: auto; }
.side-foot { margin-top: auto; display: grid; gap: 8px; }
.shopmini { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: var(--r); background: rgba(255,255,255,.07); }
.shopmini .avatar { background: var(--accent); color: #fff; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 20px; }
.topbar-shop-name { display: none; }
.content { padding: 22px 24px 40px; max-width: 1280px; width: 100%; }
.tabbar { display: none; }
.statusctl .seg button.on.open { color: var(--success); } .statusctl .seg button.on.busy { color: var(--warn); } .statusctl .seg button.on.paused, .statusctl .seg button.on.closed { color: var(--danger); }
.livechip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.livechip.on { color: var(--success); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 230px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: 6px; z-index: 30; animation: pop .15s var(--ease); }
.menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer; font-weight: 600; text-align: left; color: var(--text); }
.menu-pop button:hover { background: var(--surface-2); }
.menu-pop .who { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { padding: 10px 14px; }
  .topbar-shop-name { display: block; font-size: 17px; font-weight: 800; line-height: 1.25; }
  .topbar h1 { color: var(--muted); font-size: 12px; }
  .content { padding: 14px 14px 96px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar button { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; border-radius: var(--r-sm); }
  .tabbar button.on { color: var(--accent-strong); }
  .tabbar .count { position: absolute; top: 0; right: calc(50% - 22px); }
  .hide-sm { display: none !important; }
  .show-sm { display: inline-flex !important; }
}
.show-sm { display: none; }

/* ---------- pages ---------- */
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .grow h2 { font-size: 22px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 12px; min-height: 200px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 12px; }
.col-head h3 { font-size: 15px; }
.col-head .dot { width: 10px; height: 10px; border-radius: 50%; }
.col .stack { gap: 10px; }
.ocard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--sh-1); display: grid; gap: 10px; }
.ocard.flag { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.ocard .lines { display: grid; gap: 4px; font-size: 14px; }
.ocard .lines .opt { color: var(--muted); font-size: 13px; }
.ocard .who { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.ocard .code-tag { font-size: 16px; }
@media (max-width: 960px) { .board { grid-template-columns: 1fr; } .board .col:not(.show) { display: none; } }

.claim { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; }
.claim .thumb { width: 120px; height: 150px; border-radius: var(--r); object-fit: cover; background: var(--surface-2); border: 1px solid var(--line); }
.checklist { display: grid; gap: 8px; }
.checklist .row { justify-content: space-between; font-size: 14px; }
.checklist .bad { color: var(--danger); font-weight: 700; }
.receipt-full { width: 100%; max-height: 60vh; object-fit: contain; border-radius: var(--r); background: var(--surface-2); }

.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.icard { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); transition: box-shadow .2s, transform .2s var(--ease); }
.icard:hover { box-shadow: var(--sh-2); transform: translateY(-1px); }
.icard .media { aspect-ratio: 16 / 10; cursor: pointer; }
.icard .body { padding: 12px 14px; display: grid; gap: 6px; }
.icard.off .media { filter: grayscale(.8) opacity(.6); }
.icard .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.icard .foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface-2); }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 14px; }
.form-card > h3 { display: flex; align-items: center; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; align-items: center; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.photo-edit { display: grid; grid-template-columns: 160px 1fr; gap: 14px; align-items: center; }
.photo-edit .media { aspect-ratio: 4 / 3; border-radius: var(--r); }
.gpick { display: grid; gap: 8px; }
.gpick label { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer; background: var(--surface); }
.gpick label.on { border-color: var(--accent); background: var(--accent-soft); }
.gpick input { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 2px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 6px; }
.kpi .v { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 13px; color: var(--muted); font-weight: 650; display: flex; align-items: center; gap: 6px; }
.bars { display: grid; gap: 10px; }
.barrow { display: grid; grid-template-columns: 140px 1fr 40px; gap: 10px; align-items: center; font-size: 14px; }
.barrow .track { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.barrow .fill { height: 100%; border-radius: 6px; background: var(--accent); }
.review { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review .stars { color: #e0a100; letter-spacing: 2px; }
.reply { padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); font-size: 14px; }

.offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.offer-card { display: grid; gap: 10px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.offer-card .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); }
.offer-card.off { opacity: .6; }
.typepick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.typepick button { display: grid; gap: 4px; padding: 14px; text-align: left; border-radius: var(--r); border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; }
.typepick button.on { border-color: var(--accent); background: var(--accent-soft); }

.settings-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.hours { display: grid; gap: 8px; }
.hours .day { display: grid; grid-template-columns: 70px auto 1fr; gap: 12px; align-items: center; padding: 8px 12px; border-radius: var(--r); background: var(--surface-2); }
.hours .times { display: flex; gap: 8px; align-items: center; }
.hours .times .input { width: 130px; min-height: 38px; padding: 6px 10px; }
.staff-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.staff-row:last-child { border-bottom: 0; }
.cover { height: 160px; border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(135deg, var(--espresso), var(--bean) 55%, var(--brand-highlight)); position: relative; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .btn { position: absolute; right: 12px; bottom: 12px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r-lg); background: var(--accent-soft); color: var(--accent-strong); font-weight: 650; margin-bottom: 16px; }

.ocard .code-tag { white-space: nowrap; }
.topbar h1 { flex: 1; min-width: 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shopmini { color: inherit; font: inherit; }
.page-head .grow { flex: 1 1 240px; min-width: 200px; }
.page-head .grow h2:only-child, .page-head .grow p:only-child { margin: 0; }

.remark { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--r-sm); background: var(--warn-bg); color: var(--text); font-size: 13.5px; font-weight: 600; }
.remark .icon { color: var(--warn); margin-top: 2px; flex: none; }

/* Counter themes pair an accent with a lighter tint and retain semantic status colors. */
[data-palette="espresso"] { --counter-ink: #30160d; --counter-accent: #754627; --counter-tint: #e6ad80; }
[data-counter-theme="forest"], [data-palette="forest"] { --counter-ink: #16382a; --counter-accent: #286449; --counter-tint: #9ccead; }
[data-counter-theme="ocean"], [data-palette="ocean"] { --counter-ink: #142f48; --counter-accent: #275f88; --counter-tint: #9bc9ec; }
[data-counter-theme="plum"], [data-palette="plum"] { --counter-ink: #382344; --counter-accent: #704481; --counter-tint: #d7b2ea; }
[data-counter-theme="terracotta"], [data-palette="terracotta"] { --counter-ink: #45251e; --counter-accent: #943f2f; --counter-tint: #efb29f; }
[data-counter-theme="slate"], [data-palette="slate"] { --counter-ink: #25303f; --counter-accent: #465a74; --counter-tint: #b2c5df; }

:root[data-counter-theme]:not([data-counter-theme="espresso"]) {
  --accent: light-dark(var(--counter-accent), var(--counter-tint));
  --accent-strong: light-dark(var(--counter-ink), color-mix(in srgb, var(--counter-tint) 75%, white));
  --accent-soft: light-dark(color-mix(in srgb, var(--counter-tint) 28%, white), color-mix(in srgb, var(--counter-ink) 60%, #1b120e));
  --on-accent: light-dark(white, var(--counter-ink));
  --brand-highlight: var(--counter-tint);
  --bg: light-dark(color-mix(in srgb, var(--counter-tint) 12%, white), color-mix(in srgb, var(--counter-ink) 22%, #1b120e));
}
:root[data-counter-theme] .side { background: var(--counter-ink, var(--espresso)); }
:root[data-counter-theme] .shop-brand-initial { background: var(--counter-tint, var(--brand-cream)); color: var(--counter-ink, var(--espresso)); }
:root[data-counter-theme] .shopmini .avatar { background: var(--accent); color: var(--on-accent); }

.counter-theme-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.counter-theme-option { display: flex; align-items: center; flex-wrap: wrap; column-gap: 8px; row-gap: 6px; padding: 10px; border: 1px solid var(--line-strong); border-radius: var(--r); cursor: pointer; }
.counter-theme-option:has(:checked) { border-color: var(--accent); background: var(--accent-soft); }
.counter-theme-option:has(:disabled) { cursor: default; }
.counter-theme-option input { margin: 0; accent-color: var(--accent); }
.counter-theme-swatches { display: inline-flex; gap: 2px; }
.counter-theme-swatches i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--counter-ink); }
.counter-theme-swatches i:nth-child(2) { background: var(--counter-accent); }
.counter-theme-swatches i:nth-child(3) { background: var(--counter-tint); }

.queue-toolbar { gap: 8px; margin-bottom: 12px; }
.queue-toolbar input { max-width: 340px; }
.queue-match-count { margin-bottom: 8px; }
.queue-tabs { display: none; }
@media (max-width: 960px) {
  .queue-toolbar input { max-width: none; }
  .queue-tabs { display: flex; margin-bottom: 12px; }
  .queue-tabs button { flex: 1; }
}
