/* Staff portal polish (admin and front desk): no black buttons, a gentle feel to every tap, trends, charts, rings and the Today board.
   Loads last on every staff page. Colours: soft gold for actions, rosewood for chosen states and emphasis. */
:root { --sp-tint: #f6e4e6; --sp-gold-3: #dcb56f; --sp-gold-1: #f1dba6; --sp-gold-2: #d4aa62; --sp-gold-hi: #f6e5b9; --sp-ink: #4a2a2f; --sp-rose: #8a4552; --sp-rose-2: #a15866; --sp-up: #3f8a5a; --sp-down: #b6483f; --sp-line: rgba(120, 90, 60, .16); }

/* ---------- no black buttons ---------- */
body.admin-app .btn-primary, body.pos-app .btn-primary, body.pos-app .pos-btn--primary, body.pos-app .pos-btn.pos-btn--primary {
  background: linear-gradient(135deg, var(--sp-gold-1) 0%, var(--sp-gold-2) 100%) !important; background-image: linear-gradient(135deg, var(--sp-gold-1) 0%, var(--sp-gold-2) 100%) !important;
  color: var(--sp-ink) !important; border-color: transparent !important; box-shadow: 0 10px 22px -16px rgba(160, 110, 50, .9) !important; }
body.admin-app .btn-primary:hover:not(:disabled), body.pos-app .btn-primary:hover:not(:disabled), body.pos-app .pos-btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--sp-gold-hi) 0%, var(--sp-gold-3) 100%) !important; background-image: linear-gradient(135deg, var(--sp-gold-hi) 0%, var(--sp-gold-3) 100%) !important; color: #3d2126 !important; }
body.admin-app .btn-primary:disabled, body.pos-app .pos-btn--primary:disabled { opacity: .55; filter: saturate(.7); }
body.pos-app .pos-add-btn { background: linear-gradient(135deg, var(--sp-gold-1), var(--sp-gold-2)) !important; color: var(--sp-ink) !important; }
body.pos-app .pos-item-card.is-in-cart .pos-add-btn { background: var(--sp-rose) !important; color: #fff !important; }
body.pos-app .pos-add-btn:disabled { background: var(--pos-line-strong, #d9d1c3) !important; }
body.pos-app .pos-bar > i { background: linear-gradient(90deg, var(--sp-gold-1), var(--sp-gold-2)); }
body.admin-app .pf-tab.is-active, body.pos-app .pf-tab.is-active { background: var(--sp-rose) !important; border-color: var(--sp-rose) !important; color: #fff !important; }
body.admin-app .mini-cal-day.is-today { background: var(--sp-rose) !important; color: #fff !important; }
body.admin-app .rev-bars i.treatment, body.admin-app .rev-legend i.treatment { background: var(--sp-rose) !important; }

/* ---------- a gentle feel to every tap ---------- */
body.admin-app .btn, body.pos-app .btn, body.pos-app .pos-btn, body.pos-app .pos-add-btn, body.admin-app .icon-btn, body.pos-app .icon-btn, body.admin-app .stat-card--link, body.pos-app .pos-stat {
  position: relative; overflow: hidden; transition: transform 140ms ease, box-shadow 220ms ease, background-color 200ms ease, filter 200ms ease; -webkit-tap-highlight-color: transparent; }
body.admin-app .btn:not(:disabled):hover, body.pos-app .btn:not(:disabled):hover, body.pos-app .pos-btn:not(:disabled):hover { transform: translateY(-1px); }
body.admin-app .btn:not(:disabled):active, body.pos-app .btn:not(:disabled):active, body.pos-app .pos-btn:not(:disabled):active, body.pos-app .pos-add-btn:not(:disabled):active, body.admin-app .icon-btn:active, body.pos-app .icon-btn:active { transform: translateY(1px) scale(.965); }
.fx-ripple { position: absolute; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--sp-rose) 38%, transparent), color-mix(in srgb, var(--sp-rose) 14%, transparent) 45%, color-mix(in srgb, var(--sp-rose) 0%, transparent) 70%); transform: scale(0); opacity: 1; animation: fxRipple 640ms cubic-bezier(.2,.7,.2,1) forwards; z-index: 0; }
@keyframes fxRipple { to { transform: scale(1); opacity: 0; } }
.fx-bump { animation: fxBump 420ms cubic-bezier(.3, 1.6, .5, 1); }
@keyframes fxBump { 0% { transform: scale(1); } 40% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* success toasts: a tick that pops, with a ring of light */
.toast.success svg { animation: fxTick 520ms cubic-bezier(.3, 1.6, .5, 1) both; border-radius: 50%; box-shadow: 0 0 0 0 rgba(63, 138, 90, .45); }
.toast.success svg { animation: fxTick 520ms cubic-bezier(.3, 1.6, .5, 1) both, fxRing 900ms ease-out 120ms both; }
@keyframes fxTick { 0% { transform: scale(.2) rotate(-40deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes fxRing { 0% { box-shadow: 0 0 0 0 rgba(63, 138, 90, .5); } 100% { box-shadow: 0 0 0 14px rgba(63, 138, 90, 0); } }
.toast .toast-act { margin-left: 12px; padding: 4px 12px; border-radius: 999px; border: 1px solid currentColor; font: 600 .78rem/1 var(--font-body, system-ui); color: inherit; text-decoration: none; background: transparent; cursor: pointer; white-space: nowrap; }
.toast .toast-act:hover { background: rgba(255,255,255,.18); }

/* ---------- trend chip and sparkline on the number tiles ---------- */
body.admin-app .stat-sub { overflow: visible; white-space: normal; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
body.admin-app .stat-delta { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: rgba(120, 90, 60, .1); color: var(--a-ink-2, #6b6256); }
body.admin-app .stat-delta.up { background: rgba(63, 138, 90, .14); color: var(--sp-up); }
body.admin-app .stat-delta.down { background: rgba(182, 72, 63, .14); color: var(--sp-down); }
body.admin-app .stat-spark { display: block; width: 100%; height: 34px; margin-top: 4px; overflow: visible; }
body.admin-app .stat-spark path.line { fill: none; stroke: var(--sp-rose); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: fxDraw 1100ms ease-out .15s forwards; }
body.admin-app .stat-spark path.area { fill: url(#spGrad); opacity: 0; animation: fxFade 700ms ease-out .7s forwards; }
body.admin-app .stat-spark circle { fill: var(--sp-rose); opacity: 0; animation: fxFade 300ms ease-out 1.1s forwards; }
@keyframes fxDraw { to { stroke-dashoffset: 0; } }
@keyframes fxFade { to { opacity: 1; } }

/* ---------- revenue card: range switch, bars that grow, a tooltip ---------- */
.fx-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(120, 90, 60, .1); gap: 2px; }
.fx-seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font: 600 .78rem/1 var(--font-body, system-ui); color: var(--a-ink-2, #6b6256); cursor: pointer; transition: background .2s, color .2s, transform .12s; }
.fx-seg button:active { transform: scale(.95); }
.fx-seg button.is-on { background: var(--sp-rose); color: #fff; }
.fx-rev { position: relative; }
.fx-rev-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.fx-rev-total { font: 600 1.7rem/1.1 var(--font-display, Georgia, serif); }
.fx-rev-sub { font-size: .8rem; color: var(--a-ink-3, #8a7f70); }
.fx-rev-legend { display: flex; gap: 14px; font-size: .78rem; color: var(--a-ink-3, #8a7f70); }
.fx-rev-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }
.fx-chart { position: relative; height: 210px; }
.fx-chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.fx-bar { transform-origin: 50% 100%; transform-box: fill-box; animation: fxGrow 700ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes fxGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.fx-tip { position: absolute; z-index: 5; pointer-events: none; padding: 8px 12px; border-radius: 12px; background: var(--sp-rose); color: #fff; font-size: .78rem; line-height: 1.35; box-shadow: 0 12px 28px -14px rgba(60, 20, 30, .6); opacity: 0; transform: translate(-50%, 6px); transition: opacity .15s, transform .15s; white-space: nowrap; }
.fx-tip.is-on { opacity: 1; transform: translate(-50%, 0); }
.fx-tip b { display: block; font-size: .9rem; }

/* ---------- goal ring and split donut ---------- */
.fx-ring-wrap { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.fx-ring { width: 132px; height: 132px; position: relative; }
.fx-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.fx-ring circle { fill: none; stroke-width: 12; stroke-linecap: round; }
.fx-ring .track { stroke: rgba(120, 90, 60, .14); }
.fx-ring .val { stroke: url(#spRingGrad); stroke-dasharray: 340; stroke-dashoffset: 340; transition: stroke-dashoffset 1.2s cubic-bezier(.2, .8, .2, 1); }
.fx-ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.fx-ring-label b { font: 600 1.5rem/1 var(--font-display, Georgia, serif); }
.fx-ring-label small { font-size: .7rem; color: var(--a-ink-3, #8a7f70); }
.fx-goal-text { display: grid; gap: 6px; font-size: .86rem; }
.fx-goal-text .big { font: 600 1.15rem/1.2 var(--font-body, system-ui); }
.fx-link { background: none; border: 0; padding: 0; color: var(--sp-rose); font: 600 .8rem/1 var(--font-body, system-ui); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.fx-split { display: grid; gap: 10px; margin-top: 6px; }
.fx-split-row { display: flex; align-items: center; gap: 10px; font-size: .86rem; }
.fx-split-row i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.fx-split-row span { flex: 1; }
.fx-split-bar { height: 12px; border-radius: 999px; background: rgba(120, 90, 60, .12); overflow: hidden; display: flex; }
.fx-split-bar b { display: block; height: 100%; transition: width 1s cubic-bezier(.2, .8, .2, 1); }

/* ---------- this week strip ---------- */
.fx-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.fx-day { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border-radius: 16px; border: 1px solid var(--sp-line); background: var(--a-surface, #fff); text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .2s ease, border-color .2s; }
.fx-day:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -16px rgba(80, 50, 30, .6); border-color: var(--sp-gold-2); }
.fx-day small { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--a-ink-3, #8a7f70); }
.fx-day b { font: 600 1.15rem/1 var(--font-display, Georgia, serif); }
.fx-day .dots { display: flex; gap: 3px; min-height: 8px; }
.fx-day .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--sp-gold-2); }
.fx-day .dots i.done { background: var(--sp-up); }
.fx-day em { font-style: normal; font-size: .72rem; color: var(--a-ink-3, #8a7f70); }
.fx-day.is-today { background: var(--sp-rose); color: #fff; border-color: var(--sp-rose); }
.fx-day.is-today small, .fx-day.is-today em { color: rgba(255, 255, 255, .85); }
.fx-day.is-today .dots i { background: #fff; }

/* ---------- Today board (front desk) ---------- */
.fx-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.fx-col { background: rgba(120, 90, 60, .07); border-radius: 18px; padding: 10px; min-height: 180px; transition: background .2s, box-shadow .2s; }
.fx-col.is-over { background: color-mix(in srgb, var(--sp-gold-2) 22%, transparent); box-shadow: inset 0 0 0 2px var(--sp-gold-2); }
.fx-col h3 { display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 10px; font: 600 .9rem/1 var(--font-body, system-ui); }
.fx-col h3 span { min-width: 24px; padding: 3px 8px; border-radius: 999px; background: #fff; font-size: .75rem; text-align: center; }
.fx-card { background: #fff; border: 1px solid var(--sp-line); border-radius: 14px; padding: 12px; margin-bottom: 10px; cursor: grab; display: grid; gap: 4px; touch-action: none; transition: transform .18s ease, box-shadow .2s ease; animation: fxCardIn .35s ease both; }
.fx-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(80, 50, 30, .55); }
.fx-card.is-drag { opacity: .45; transform: scale(.98); }
.fx-card .time { font: 600 .95rem/1 var(--font-display, Georgia, serif); }
.fx-card .who { font-weight: 600; font-size: .9rem; }
.fx-card .what { font-size: .78rem; color: var(--a-ink-3, #8a7f70); }
.fx-card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.fx-card .next { border: 0; border-radius: 999px; padding: 6px 12px; font: 600 .74rem/1 var(--font-body, system-ui); background: linear-gradient(135deg, var(--sp-gold-1), var(--sp-gold-2)); color: var(--sp-ink); cursor: pointer; }
.fx-card .owe { font-size: .74rem; font-weight: 600; color: var(--sp-down); }
@keyframes fxCardIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.fx-empty { text-align: center; color: var(--a-ink-3, #8a7f70); font-size: .8rem; padding: 26px 8px; }
@media (max-width: 760px) { .fx-board { grid-template-columns: 1fr; } .fx-ring-wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; } .fx-week { gap: 5px; } }
@media (prefers-reduced-motion: reduce) { .fx-bar, .fx-card, .stat-spark path, .fx-ripple, .fx-bump, .toast.success svg { animation: none !important; } .stat-spark path.line { stroke-dashoffset: 0; } .stat-spark path.area, .stat-spark circle { opacity: 1; } .fx-ring .val { transition: none; } }
/* revenue columns */
.fx-bars { display: flex; align-items: flex-end; gap: 10px; height: 100%; padding-bottom: 24px; border-bottom: 1px solid var(--sp-line); }
.fx-bars.is-dense { gap: 3px; }
.fx-b { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; border-radius: 10px; transition: background-color .15s; }
.fx-b:hover { background: color-mix(in srgb, var(--sp-gold-2) 16%, transparent); }
.fx-b-stack { width: min(100%, 34px); height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.fx-bars.is-dense .fx-b-stack { width: 100%; }
.fx-b-stack i { display: block; width: 100%; transform-origin: 50% 100%; animation: fxGrow 700ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 28ms); transition: height .5s; }
.fx-b-stack i.t { background: var(--ch-t); border-radius: 6px 6px 0 0; }
.fx-b-stack i.s { background: var(--ch-s); border-radius: 6px 6px 0 0; margin-bottom: 1px; }
.fx-b-stack i.s + i.t { border-radius: 0; }
.fx-b span { position: absolute; bottom: -22px; font-size: .68rem; color: var(--a-ink-3, #8a7f70); white-space: nowrap; }
.fx-bars.is-dense .fx-b:nth-child(5n+1) span { display: block; } .fx-bars.is-dense .fx-b:not(:nth-child(5n+1)) span { display: none; }
@keyframes fxGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.fx-split-row b { font-weight: 600; } .fx-split-row small { color: var(--a-ink-3, #8a7f70); min-width: 34px; text-align: right; }
.fx-ring .val { stroke-dasharray: 339.3; stroke-dashoffset: 339.3; }
.fx-card a.next { text-decoration: none; display: inline-block; }
body.pos-app .fr-tabs button[aria-pressed="true"], body.admin-app .fr-tabs button[aria-pressed="true"] { background: var(--sp-rose) !important; color: #fff !important; }
/* counts on filter tabs */
.seg-btn .seg-n { display: inline-block; margin-left: 7px; min-width: 20px; padding: 2px 7px; border-radius: 999px; font: 600 .68rem/1.2 var(--font-body, system-ui); font-style: normal; background: rgba(120, 90, 60, .12); color: var(--a-ink-2, #6b6256); vertical-align: 1px; }
.seg-btn[aria-pressed="true"] .seg-n { background: rgba(255, 255, 255, .75); color: var(--sp-ink); }
.seg-btn .seg-n.is-hot { background: var(--sp-gold-2); color: var(--sp-ink); }

/* the page settles in: cards rise one after another the first time it opens (not on every redraw) */
body.fx-enter .workspace-body > *, body.fx-enter .pos-main > #app > *, body.fx-enter #app > .fd-card, body.fx-enter #app > .pos-page-head { animation: fxRise 520ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--fx-i, 0) * 55ms); }
@keyframes fxRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { body.fx-enter .workspace-body > *, body.fx-enter #app > * { animation: none !important; } }
/* revenue as pills: full-round bars, today stronger, empty days hatched, the best day marked */
.fx-bars.is-pill { gap: 14px; }
.fx-bars.is-pill.is-dense { gap: 4px; }
.fx-bars.is-pill .fx-b-stack { width: min(100%, 38px); }
.fx-bars.is-pill .fx-b-stack i.pill { display: block; width: 100%; border-radius: 999px; min-height: 0; background: linear-gradient(to top, var(--ch-t) calc(100% - var(--sp, 0%)), var(--ch-s) calc(100% - var(--sp, 0%))); opacity: .82; transform-origin: 50% 100%; animation: fxGrow 700ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 40ms); transition: opacity .2s, filter .2s; }
.fx-bars.is-pill .fx-b:hover i.pill, .fx-bars.is-pill .fx-b.is-now i.pill { opacity: 1; }
.fx-bars.is-pill .fx-b.is-empty .fx-b-stack::before { content: ""; width: min(100%, 38px); height: 26%; border-radius: 999px; background: repeating-linear-gradient(135deg, rgba(120, 90, 60, .28) 0 2px, transparent 2px 6px); }
.fx-bars.is-pill .fx-b-stack { justify-content: flex-end; align-items: center; }
.fx-peak { position: absolute; top: -2px; font-style: normal; font: 600 .62rem/1 var(--font-body, system-ui); padding: 4px 8px; border-radius: 999px; background: var(--sp-ink); background: #4a2a2f; color: #fff; animation: fxFade 500ms ease-out 900ms both; }
.fx-b { position: relative; }
/* revenue as a line, with last period dashed behind it */
.fx-line { height: 230px; margin-bottom: 18px; }
.fx-line svg { position: absolute; inset: 0; width: calc(100% - 38px); left: 38px; height: calc(100% - 4px); }
.fx-line svg .grid { stroke: rgba(120, 90, 60, .14); stroke-width: 1; vector-effect: non-scaling-stroke; }
.fx-line svg .line { fill: none; stroke: var(--ch-t); stroke-width: 2.6; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: fxDraw 1400ms ease-out forwards; }
.fx-line svg .prev { fill: none; stroke: rgba(120, 90, 60, .55); stroke-width: 1.6; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; opacity: 0; animation: fxFade 700ms ease-out .5s forwards; }
.fx-line svg .area { fill: url(#spArea); opacity: 0; animation: fxFade 900ms ease-out .6s forwards; }
.fx-line svg .cross { stroke: var(--sp-rose); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .15s; }
.fx-yl, .fx-xl { position: absolute; pointer-events: none; font-size: .66rem; color: var(--a-ink-3, #8a7f70); }
.fx-yl { left: 0; top: 0; bottom: 0; width: 34px; } .fx-yl span { position: absolute; right: 0; transform: translateY(-50%); }
.fx-xl { left: 38px; right: 0; bottom: -18px; height: 14px; } .fx-xl span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.fx-dot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; border: 3px solid var(--ch-t); pointer-events: none; opacity: 0; transition: opacity .15s; transform: translateX(0); }
.fx-dot.is-on { opacity: 1; }
.fx-line .fx-dot { left: 38px; }
.fx-rev-legend i.dash { width: 16px; height: 0; border-top: 2px dashed rgba(120, 90, 60, .6); border-radius: 0; background: none; margin-top: 4px; }
.fx-tip-prev { opacity: .8; font-size: .72rem; }
.fx-bars.is-pill { padding-top: 26px; }
.fx-peak { top: -24px; left: 50%; transform: translateX(-50%); }
.fx-seg button { white-space: nowrap; }
@media (max-width: 640px) {
  .panel-head:has(.fx-seg) { flex-wrap: wrap; row-gap: 10px; }
  .panel-head > .row:has(.fx-seg) { flex-wrap: wrap; width: 100%; row-gap: 8px; }
  .fx-seg button { padding-left: 10px; padding-right: 10px; }
  .fx-line { height: 200px; }
  .fx-bars.is-pill { gap: 6px; }
}
/* slim number cards on Home: label, number, trend line, nothing else */
.stats-grid.is-slim { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.stats-grid.is-slim .stat-card { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "top top" "val spark" "sub sub"; align-items: end; padding: 14px 16px; min-height: 0; gap: 4px 10px; border-radius: 18px; }
.stats-grid.is-slim .stat-top { grid-area: top; }
.stats-grid.is-slim .stat-icon { width: 30px; height: 30px; border-radius: 10px; } .stats-grid.is-slim .stat-icon svg { width: 16px; height: 16px; }
.stats-grid.is-slim .stat-label { font-size: .74rem; }
.stats-grid.is-slim .stat-value { grid-area: val; font-size: 1.7rem; line-height: 1.05; margin: 0; }
.stats-grid.is-slim .stat-cur { font-size: .62rem; display: block; margin-bottom: 2px; }
.stats-grid.is-slim .stat-sub { grid-area: sub; margin: 0; }
.stats-grid.is-slim .stat-spark { grid-area: spark; width: 84px; height: 34px; margin: 0; }
.stats-grid.is-slim .stat-card:not(.stat-card--link):hover { transform: none; }
.stats-grid.is-slim .stat-card--link:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(74, 42, 47, .12); }
@media (max-width: 640px) { .stats-grid.is-slim { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .stats-grid.is-slim .stat-value { font-size: 1.35rem; } .stats-grid.is-slim .stat-spark { width: 54px; height: 26px; } .stats-grid.is-slim .stat-card { padding: 12px; } }

/* clicks you can see: every tappable thing presses in, then leaves the page softly */
body.admin-app .seg-btn, body.pos-app .seg-btn, .fx-seg button, body.admin-app .card-link, body.pos-app .card-link, body.admin-app .pf-tab, body.pos-app .pf-tab, body.admin-app a.stat-card, body.admin-app .nav-item, body.admin-app .admin-bottom-nav a, body.pos-app .pos-bottom-nav a, body.admin-app tbody tr[data-href], body.admin-app .list-row { position: relative; overflow: hidden; transition: transform 140ms ease, background-color 200ms, box-shadow 200ms; -webkit-tap-highlight-color: transparent; }
body.admin-app .seg-btn:active, body.pos-app .seg-btn:active, .fx-seg button:active, body.admin-app .pf-tab:active, body.pos-app .pf-tab:active, body.admin-app a.stat-card:active, body.admin-app .admin-bottom-nav a:active, body.pos-app .pos-bottom-nav a:active { transform: scale(.94); }
body.fx-leave #workspace-body, body.fx-leave .pos-main { opacity: 0; transform: translateY(8px); transition: opacity 170ms ease, transform 170ms ease; }
.fx-done { animation: fxDone 600ms ease-out; }
@keyframes fxDone { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sp-gold-2) 65%, transparent); } 100% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--sp-gold-2) 0%, transparent); } }
@media (prefers-reduced-motion: reduce) { body.fx-leave #workspace-body, body.fx-leave .pos-main { transition: none; } .fx-done { animation: none; } }
body.admin-app .stats-grid.is-slim { display: grid !important; overflow: visible !important; grid-auto-flow: row !important; grid-auto-columns: auto !important; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important; scroll-snap-type: none; padding-bottom: 0; }
@media (max-width: 640px) { body.admin-app .stats-grid.is-slim { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (min-width: 641px) { body.admin-app .stats-grid.is-slim:has(.stat-card:nth-child(6)) { grid-template-columns: repeat(3, 1fr) !important; } body.admin-app .stats-grid.is-slim:has(.stat-card:nth-child(6)) .stat-card { grid-template-columns: 1fr auto; } body.admin-app .stats-grid.is-slim:not(:has(.stat-card:nth-child(5))) { grid-template-columns: repeat(4, 1fr) !important; } }
/* toast with a button (Undo) */
.toast .toast-action { margin-left: 14px; padding: 6px 14px; border: 0; border-radius: 999px; font: 600 .78rem/1 inherit; cursor: pointer; background: linear-gradient(135deg, var(--sp-gold-1, #f1dba6), var(--sp-gold-2, #d4aa62)); color: var(--sp-ink, #4a2a2f); transition: transform 140ms; }
.toast .toast-action:active { transform: scale(.93); }
.toast .toast-action:disabled { opacity: .5; }
/* front-desk category tabs: the chosen tab is a soft gold pill that sits inside the track, never over its border */
body.pos-app .pos-tabs { padding: 5px; gap: 4px; }
body.pos-app .pos-tabs button.is-active, body.pos-app .pos-tab.is-active { border-radius: 999px; background: linear-gradient(135deg, var(--sp-gold-1), var(--sp-gold-2)); color: var(--sp-ink); box-shadow: 0 2px 8px color-mix(in srgb, var(--sp-rose) 18%, transparent); font-weight: 700; }
body.pos-app .pos-tab.is-active em { background: rgba(255, 255, 255, .55); color: var(--sp-ink); }
body.pos-app .pos-tabs button { border-radius: 999px; }
@media (max-width: 640px) { body.pos-app .pos-tabs { padding: 5px; gap: 3px; } body.pos-app .pos-tab { min-height: 40px; padding: 0 2px; font-size: .72rem; } }
/* less gold: soft rose for chosen tabs and hovers, sage for progress; gold only on the one main button */
body.pos-app .pos-tabs button.is-active, body.pos-app .pos-tab.is-active { background: var(--sp-tint); color: var(--sp-rose); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--sp-rose) 45%, transparent); }
body.pos-app .pos-tab.is-active em { background: #fff; color: var(--sp-rose); }
.cal-next .when { background: #e6efe8 !important; color: #3d6b4c !important; }
.cal-next .when.is-now { background: var(--sp-rose) !important; color: #fff !important; }
.cal-dh:hover .num-c, .cal-cell:hover { background: var(--sp-tint) !important; }
.cal-day.is-today .cal-dh .num-c, .cal-cell.is-today .d { background: var(--sp-rose) !important; color: #fff !important; }
.cal-cell.is-today { outline-color: var(--sp-rose) !important; }
.cal-day.is-today { background: color-mix(in srgb, var(--sp-rose) 5%, transparent) !important; }
.pf-com-bar i { background: linear-gradient(90deg, #a9cdb2, #5f9a72) !important; }
.pf-dial .val { stroke: #b9aca0 !important; } .pf-dial.is-on .val { stroke: #5f9a72 !important; }
.toast .toast-action { background: var(--sp-tint) !important; color: var(--sp-rose) !important; }
.fx-done { animation-name: fxDoneRose; } @keyframes fxDoneRose { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sp-rose) 45%, transparent); } 100% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--sp-rose) 0%, transparent); } }

/* phones: a tighter welcome so the number cards come into view sooner */
@media (max-width: 640px) {
  body.admin-app .home-hero { padding: 16px 16px 14px; gap: 10px; }
  body.admin-app .home-hero h2 { font-size: 1.45rem; }
  body.admin-app .home-hero .lede { font-size: .84rem; margin-top: 4px; }
  body.admin-app .home-hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  body.admin-app .home-hero-actions .btn { min-height: 40px; padding: 0 8px; font-size: .8rem; justify-content: center; }
}
/* front-desk money cards: a small TZS above the amount */
body.pos-app .pos-kpi-value .pos-cur { display: block; font-size: .62rem; font-weight: 600; letter-spacing: .06em; color: var(--pos-ink-faint); margin-bottom: 3px; }

/* cards follow the screen: phones 2 across, tablets 3, wide screens fill */
body.pos-app .pos-catalog-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important; }
@media (max-width: 700px) { body.pos-app .pos-catalog-grid, body.pos-app .pos-catalog-grid.is-dense { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; } body.pos-app .pos-item-card { border-radius: 18px; } }
@media (min-width: 701px) and (max-width: 1000px) { body.pos-app .pos-catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
/* small count inside a filter chip */
.pos-subchip .pos-n { font-style: normal; font-size: .68rem; font-weight: 600; margin-left: 7px; padding: 1px 7px; border-radius: 999px; background: rgba(120, 90, 60, .12); }
.pos-subchip.is-active .pos-n { background: #fff; color: var(--sp-rose); }
.pos-subchip .pos-n.is-hot { background: var(--sp-tint); color: var(--sp-rose); }

/* chart colours: a clear raspberry and a fresh teal, easy to tell apart */
:root { --ch-t: #a63f5f; --ch-s: #2f9c86; }
.fx-bars.is-pill .fx-b:hover i.pill, .fx-bars.is-pill .fx-b.is-now i.pill { opacity: 1; filter: saturate(1.1); }
.fx-peak { background: var(--ch-t) !important; }
/* the item that flew to the sale */
.fx-fly { position: fixed; z-index: 10000; pointer-events: none; border-radius: 50%; background: var(--sp-tint) center / cover no-repeat; border: 3px solid #fff; box-shadow: 0 10px 24px rgba(74, 42, 47, .35); }
.pos-item-card.fx-picked { animation: fxPick 480ms cubic-bezier(.3, 1.6, .5, 1); }
@keyframes fxPick { 0% { transform: scale(1); } 35% { transform: scale(.96); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sp-rose) 50%, transparent); } 100% { transform: scale(1); } }
.pos-item-card.is-in-cart { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--sp-rose) 55%, transparent); }
@keyframes posSavePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
/* the workspace colour theme (Settings) also colours the buttons, tabs, charts and highlights */
html[data-ws="rose"] { --sp-gold-1: #f6cdd6; --sp-gold-2: #cf7387; --sp-gold-hi: #fbd9e0; --sp-gold-3: #c4687c; --sp-ink: #4a1a27; --sp-rose: #96394e; --sp-rose-2: #b5546a; --sp-tint: #f8e1e5; --ch-t: #a63f5f; --ch-s: #2f9c86; }
html[data-ws="emerald"] { --sp-gold-1: #c6e6d4; --sp-gold-2: #52a67c; --sp-gold-hi: #d6efe0; --sp-gold-3: #489a71; --sp-ink: #12382a; --sp-rose: #1f5c41; --sp-rose-2: #2f7a57; --sp-tint: #ddefe5; --ch-t: #1f7a52; --ch-s: #d19a3a; }
html[data-ws="ocean"] { --sp-gold-1: #c9ddf4; --sp-gold-2: #5b9be0; --sp-gold-hi: #d9e8f8; --sp-gold-3: #4f8fd4; --sp-ink: #14304f; --sp-rose: #1f5489; --sp-rose-2: #2f6fb5; --sp-tint: #dce8f6; --ch-t: #2f6fb5; --ch-s: #e08a5b; }
html[data-ws="violet"] { --sp-gold-1: #dccdf2; --sp-gold-2: #9c74d6; --sp-gold-hi: #e8dcf7; --sp-gold-3: #8f66cc; --sp-ink: #2f1a4d; --sp-rose: #5e3a92; --sp-rose-2: #7a4fb5; --sp-tint: #eadff7; --ch-t: #7a4fb5; --ch-s: #e0a15b; }
html[data-ws][data-admin-theme="dark"] { --sp-ink: #1d1417; }

/* messages and the saving pill: light glass instead of black */
body.admin-app .toast, body.pos-app .toast { background: rgba(255, 255, 255, .92) !important; color: var(--sp-ink) !important; border: 1px solid rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 16px 34px -18px color-mix(in srgb, var(--sp-rose) 55%, transparent); }
body.admin-app .toast svg, body.pos-app .toast svg { color: var(--sp-rose); }
body.admin-app .toast.success svg, body.pos-app .toast.success svg { color: #3f8a5a; }
body.admin-app .toast.error svg, body.pos-app .toast.error svg { color: #c0473a; }
/* ---- charts: two series colours per workspace theme, checked with the dataviz validator (light and dark, colour-blind safe) ---- */
:root, html[data-ws="rose"] { --ch-t: #a63f5f; --ch-s: #2f9c86; }
html[data-ws="emerald"] { --ch-t: #1f7a52; --ch-s: #c07d12; }
html[data-ws="ocean"] { --ch-t: #2f6fb5; --ch-s: #d8693a; }
html[data-ws="violet"] { --ch-t: #7a4fb5; --ch-s: #c27410; }
html[data-admin-theme="dark"], html[data-admin-theme="dark"][data-ws="rose"] { --ch-t: #c9506f; --ch-s: #3d8fc9; }
html[data-admin-theme="dark"][data-ws="emerald"] { --ch-t: #3f9d71; --ch-s: #b76ba3; }
html[data-admin-theme="dark"][data-ws="ocean"] { --ch-t: #4f8fd4; --ch-s: #cf7040; }
html[data-admin-theme="dark"][data-ws="violet"] { --ch-t: #8f66cc; --ch-s: #c9801f; }

/* marks: thin columns (24px at most), a 4px rounded top, a 2px gap between the two parts, a quiet baseline, a plain ink label for the best day */
.fx-bars.is-pill .fx-b-stack, .frc-b .frc-col i, .rc-col i { max-width: 24px; }
.fx-bars.is-pill .fx-b-stack { width: min(100%, 24px) !important; }
.fx-bars.is-pill .fx-b-stack i.pill { border-radius: 4px 4px 0 0 !important; opacity: 1 !important; background: linear-gradient(to top, var(--ch-t) 0, var(--ch-t) calc(100% - var(--sp, 0%) - 1px), transparent calc(100% - var(--sp, 0%) - 1px), transparent calc(100% - var(--sp, 0%) + 1px), var(--ch-s) calc(100% - var(--sp, 0%) + 1px)) !important; }
.frc-col i, .rc-col i { width: min(100%, 24px) !important; border-radius: 4px 4px 0 0 !important; opacity: 1 !important; background: linear-gradient(to top, var(--ch-t) 0, var(--ch-t) calc(100% - var(--sp, 0%) - 1px), transparent calc(100% - var(--sp, 0%) - 1px), transparent calc(100% - var(--sp, 0%) + 1px), var(--ch-s) calc(100% - var(--sp, 0%) + 1px)) !important; }
.fx-bars.is-pill .fx-b:not(:hover):not(.is-now) i.pill, .frc-b:not(:hover) .frc-col i, .rc-b:not(:hover) .rc-col i { filter: saturate(.92) brightness(1.02); }
.fx-bars, .frc-bars, .rc-bars { border-bottom: 1px solid var(--sp-line, rgba(120, 90, 60, .16)); }
.fx-peak, .frc-best, .rc-best { background: var(--sp-ink) !important; color: #fff !important; }
.frc-split i, .rc-split i, .fx-split-bar b:first-child { background: var(--ch-t) !important; }
.frc-split, .rc-split { background: var(--ch-s) !important; }
.frc-leg .t, .rc-leg .t, .fx-rev-legend i[style*="--ch-t"] { background: var(--ch-t) !important; }
.frc-leg .s, .rc-leg .s { background: var(--ch-s) !important; }
.fx-line svg .line { stroke-width: 2px !important; }
.fx-dot { width: 10px !important; height: 10px !important; margin: -5px 0 0 -5px !important; background: var(--ch-t) !important; border: 2px solid var(--a-raised, #fff) !important; }
.fx-rev-legend, .frc-leg, .rc-leg { color: var(--a-ink-2, #52514e); }
/* ---- staff sign in: a luminous beauty photo in the workspace colour, one screen, very few words ---- */
body.admin-login { background: var(--sp-tint, #f6e4e6); }
body.admin-login .login-shell { min-height: 100svh; padding: clamp(10px, 2.4vh, 28px); background: radial-gradient(60% 50% at 0% 0%, color-mix(in srgb, var(--sp-gold-1) 70%, transparent), transparent 70%), radial-gradient(50% 45% at 100% 100%, color-mix(in srgb, var(--sp-gold-2) 35%, transparent), transparent 70%), var(--sp-tint, #f6e4e6); }
body.admin-login .login-card { width: min(1020px, 100%); max-height: calc(100svh - 24px); border-radius: 26px; border: 1px solid color-mix(in srgb, var(--sp-gold-2) 55%, transparent); box-shadow: 0 40px 80px -40px color-mix(in srgb, var(--sp-rose) 60%, transparent); overflow: hidden; }
body.admin-login .login-story { background: var(--sp-rose) url(../img/hero-glow.jpg) center / cover no-repeat; padding: clamp(24px, 4vh, 40px); justify-content: space-between; }
body.admin-login .login-story::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--sp-rose) 8%, transparent) 25%, color-mix(in srgb, var(--sp-rose) 86%, transparent) 100%); }
body.admin-login .login-story::after { right: auto; bottom: auto; inset: 14px; width: auto; aspect-ratio: auto; border-radius: 0; border: 1px solid rgba(255, 255, 255, .6); box-shadow: none; }
body.admin-login .login-brand, body.admin-login .login-story-note { position: relative; z-index: 2; }
body.admin-login .login-story-note { display: none; }
body.admin-login .login-brand .logo-mark { width: 60px; height: 60px; border-radius: 50%; padding: 0; background: #fff; border: 2px solid #fff; box-shadow: 0 0 0 1px color-mix(in srgb, var(--sp-gold-2) 80%, transparent), 0 12px 26px -12px rgba(0, 0, 0, .5); }
body.admin-login .login-brand .logo-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
body.admin-login .login-title { max-width: 12ch; color: #fff; font-family: 'Cormorant', Georgia, serif; font-style: italic; font-weight: 500; font-size: clamp(2.2rem, 3.6vw, 3.2rem); line-height: 1.04; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); position: relative; z-index: 2; margin-top: auto; }
body.admin-login .login-brand { height: 100%; justify-content: space-between; }
body.admin-login .login-access { padding: clamp(24px, 4vh, 52px) clamp(24px, 4vw, 52px); background: #fff; }
body.admin-login .login-access-head { margin-bottom: clamp(14px, 3vh, 26px); }
body.admin-login .login-access-head h2 { margin: 0; font-family: 'Cormorant', Georgia, serif; font-size: clamp(2.4rem, 3.6vw, 3.2rem); font-weight: 500; letter-spacing: -.01em; }
body.admin-login .login-access-head h2 em { font-style: italic; color: var(--sp-rose); }
body.admin-login .login-field label { font-size: .8rem; letter-spacing: .02em; text-transform: none; font-weight: 500; }
body.admin-login .login-submit { border-radius: 12px; }
@media (max-width: 900px) { body.admin-login .login-card { max-width: 460px; } body.admin-login .login-access { padding: 30px 24px; } }
body.admin-login .login-logo-m { display: none; }
@media (max-width: 900px) { body.admin-login .login-logo-m { display: block; width: 58px; height: 58px; border-radius: 50%; object-fit: cover; margin: 0 0 12px; box-shadow: 0 0 0 3px #fff, 0 0 0 4px color-mix(in srgb, var(--sp-gold-2) 80%, transparent), 0 10px 22px -12px rgba(0,0,0,.5); } }
/* phone: the beauty photo stays, as a banner on top of the form; the "Private clinic access" line is back */
body.admin-login .login-form-intro { margin: 0 0 6px; font-size: .62rem; letter-spacing: .24em; }
body.admin-login .login-access-head h2 { margin-top: 6px; }
@media (max-width: 900px) {
  body.admin-login .login-card { display: block; max-width: 460px; }
  body.admin-login .login-story { display: flex !important; height: clamp(130px, 22svh, 190px); min-height: 0; padding: 14px 18px; }
  body.admin-login .login-story .login-brand { flex-direction: row; align-items: flex-end; gap: 12px; height: 100%; max-width: none; }
  body.admin-login .login-brand .logo-mark { width: 46px; height: 46px; flex: none; }
  body.admin-login .login-title { margin: 0; font-size: 1.45rem; max-width: 14ch; }
  body.admin-login .login-logo-m { display: none !important; }
  body.admin-login .login-access { padding: 18px 22px 20px; }
  body.admin-login .login-access-head { margin-bottom: 12px; }
  body.admin-login .login-access-head h2 { font-size: 2.2rem; }
}
/* staff sign in is its own door: no portrait, a calm panel in the workspace colour with a fine champagne lattice */
body.admin-login .login-story { background: radial-gradient(70% 60% at 18% 12%, color-mix(in srgb, var(--sp-gold-1) 55%, transparent), transparent 70%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath d='M28 0L56 28L28 56L0 28Z' fill='none' stroke='%23ffffff' stroke-opacity='.13' stroke-width='1'/%3E%3Cpath d='M28 14L42 28L28 42L14 28Z' fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='1'/%3E%3C/svg%3E") center / 56px 56px, linear-gradient(160deg, color-mix(in srgb, var(--sp-rose) 78%, var(--sp-gold-2)) 0%, var(--sp-rose) 100%) !important; }
body.admin-login .login-story::before { background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .18) 100%); }
body.admin-login .login-story::after { border-color: color-mix(in srgb, var(--sp-gold-1) 75%, transparent); }
body.admin-login .login-title { margin-top: auto; }
body.admin-login .login-card, body.admin-login .login-field .input, body.admin-login .login-submit { border-radius: 10px; }
body.admin-login .login-card { border-radius: 16px; }
/* ===== staff sign in: a paper-cut botanical panel in the workspace colour, a frosted-leaf backdrop, a white card with pill fields ===== */
body.admin-login { background: #eef0ef !important; overflow: hidden; }
.login-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.login-bg svg { position: absolute; inset: -6%; width: 112%; height: 112%; filter: blur(16px); opacity: .9; }
.login-bg .lb-a { fill: color-mix(in srgb, var(--sp-rose) 55%, #4a8a5c); }
.login-bg .lb-b { fill: color-mix(in srgb, var(--sp-gold-2) 60%, #5a9a6a); }
body.admin-login .login-shell { position: relative; z-index: 1; background: transparent !important; min-height: 100svh; }
body.admin-login .login-card { width: min(1000px, 100%); height: min(600px, calc(100svh - 28px)); border-radius: 30px; background: #fff; border: 0; box-shadow: 0 40px 90px -40px rgba(30, 40, 35, .55); overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
body.admin-login .login-access { order: 1; background: transparent; justify-content: center; padding: clamp(24px, 4vh, 48px) clamp(26px, 5vw, 70px); }
body.admin-login .login-story { order: 2; display: block !important; position: relative; padding: 0; background: none !important; min-height: 0; height: 100%; }
body.admin-login .login-story::before, body.admin-login .login-story::after { display: none !important; }
.login-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.login-art .la-l0 { fill: #f3f4f3; }
.login-art .la-l1 { fill: color-mix(in srgb, var(--sp-tint) 70%, #fff); }
.login-art .la-l2 { fill: color-mix(in srgb, var(--sp-gold-2) 55%, #fff); }
.login-art .la-l3 { fill: color-mix(in srgb, var(--sp-rose) 92%, #000); }
.login-art .la-leaf { fill: color-mix(in srgb, var(--sp-rose) 55%, #08140c); opacity: .96; }
.login-art-line { position: absolute; right: 26px; bottom: 24px; z-index: 2; max-width: 14ch; margin: 0; text-align: right; font: italic 500 clamp(1.5rem, 2.4vw, 2.1rem)/1.08 'Cormorant', Georgia, serif; color: #fff; text-shadow: 0 2px 16px rgba(0, 0, 0, .45); }
body.admin-login .login-logo-m { display: block !important; width: 54px; height: 54px; border-radius: 50%; object-fit: cover; margin: 0 0 clamp(10px, 2vh, 20px); box-shadow: 0 0 0 3px #fff, 0 0 0 4px color-mix(in srgb, var(--sp-gold-2) 80%, transparent), 0 10px 22px -12px rgba(0, 0, 0, .45); }
body.admin-login .login-form-intro { margin: 0 0 6px; }
body.admin-login .login-field .input { height: 48px; border-radius: 999px; padding: 0 20px; background: #fff; border: 1.5px solid #cfd6d1; }
body.admin-login .login-field .input:focus { border-color: var(--sp-rose); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sp-rose) 20%, transparent); }
body.admin-login .login-submit { height: 50px; border-radius: 999px; background: var(--sp-rose) !important; background-image: none !important; color: #fff !important; border: 0 !important; box-shadow: 0 14px 24px -14px color-mix(in srgb, var(--sp-rose) 80%, #000) !important; font-weight: 600; letter-spacing: .02em; }
body.admin-login .login-submit:hover:not(:disabled) { background: color-mix(in srgb, var(--sp-rose) 88%, #000) !important; transform: translateY(-1px); }
@media (max-width: 900px) {
  body.admin-login .login-card { display: flex !important; flex-direction: column; max-width: 440px; height: min(640px, calc(100svh - 20px)); }
  body.admin-login .login-story { order: 0; display: block !important; flex: none; height: clamp(120px, 20svh, 170px) !important; }
  body.admin-login .login-access { order: 1; padding: 16px 22px 18px; overflow: auto; }
  body.admin-login .login-logo-m { width: 44px; height: 44px; margin-bottom: 8px; }
  .login-art-line { font-size: 1.15rem; right: 18px; bottom: 14px; }
}
/* staff sign in extras: caps lock note, privacy line, welcome splash, an opening animation */
.login-caps { display: block; margin-top: 6px; font-size: .78rem; font-weight: 600; color: #a66a00; }
.login-caps::before { content: "\21EA\00a0"; }
.login-lock { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 0 0; font-size: .74rem; color: #8a8f8b; }
.login-welcome { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; text-align: center; background: radial-gradient(60% 50% at 50% 40%, color-mix(in srgb, var(--sp-gold-1) 80%, #fff), color-mix(in srgb, var(--sp-tint) 90%, #fff)); opacity: 0; transition: opacity .45s ease; }
.login-welcome.on { opacity: 1; }
.login-welcome .lw-in { display: grid; gap: 10px; justify-items: center; padding: 20px; transform: translateY(14px); transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.login-welcome.on .lw-in { transform: none; }
.login-welcome h2 { margin: 0; font: italic 500 clamp(2.4rem, 6vw, 4rem)/1.05 'Cormorant', Georgia, serif; color: var(--sp-rose); }
.login-welcome p { margin: 0; font-size: .92rem; color: #5a4f52; }
.lw-spark { color: var(--sp-gold-2); animation: lwSpin 2.4s ease-in-out infinite; }
@keyframes lwSpin { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(90deg) scale(1.2); } }
.lw-bar { width: 180px; height: 4px; border-radius: 99px; background: color-mix(in srgb, var(--sp-rose) 18%, transparent); overflow: hidden; margin-top: 8px; }
.lw-bar i { display: block; height: 100%; width: 100%; background: var(--sp-rose); transform-origin: left; animation: lwFill 1.8s ease-in-out both; }
@keyframes lwFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* opening: the paper layers slide in one after another, the leaves rise, then sway a little */
.login-art .la-l1, .login-art .la-l2, .login-art .la-l3 { animation: laSlide .9s cubic-bezier(.2, .8, .2, 1) both; }
.login-art .la-l2 { animation-delay: .12s; } .login-art .la-l3 { animation-delay: .24s; }
@keyframes laSlide { from { transform: translateX(70px); opacity: 0; } to { transform: none; opacity: 1; } }
.login-art .la-leaf use { transform-box: fill-box; transform-origin: 50% 100%; animation: laSway 7s ease-in-out infinite; }
.login-art .la-leaf use:nth-child(2) { animation-delay: -2s; } .login-art .la-leaf use:nth-child(3) { animation-delay: -4s; } .login-art .la-leaf use:nth-child(4) { animation-delay: -1s; }
@keyframes laSway { 0%, 100% { translate: 0 0; } 50% { translate: -4px -3px; } }
body.admin-login .login-card { animation: lcRise .8s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes lcRise { from { opacity: 0; transform: translateY(24px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .login-art .la-l1, .login-art .la-l2, .login-art .la-l3, .login-art .la-leaf use, body.admin-login .login-card, .lw-spark, .lw-bar i { animation: none !important; } .login-welcome, .login-welcome .lw-in { transition: none; } }
/* =====================================================================
   ONE CONSISTENT SET OF CONTROLS across the staff portal and the front desk
   - tabs and segmented switches: one calm row that scrolls sideways (never cut-off words), the chosen one a white pill
   - choice chips (payment method, "Add", filters): the chosen one is a soft tint, never black or wine
   - the main button is the same soft gold gradient on every page
   - the connection pill sits at the bottom, never over a page or form (see pos.js)
   ===================================================================== */
body.admin-app .seg-control, body.pos-app .seg-control, .rpt-seg, .fx-seg, body.pos-app .pos-tabs, .dc-kindf, .apo-chips {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; max-width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.seg-control::-webkit-scrollbar, .rpt-seg::-webkit-scrollbar, .fx-seg::-webkit-scrollbar, .pos-tabs::-webkit-scrollbar, .dc-kindf::-webkit-scrollbar { display: none; }
.dc-kindf { flex-wrap: wrap; overflow: visible; }
.seg-control .seg-btn, .rpt-seg button, .fx-seg button, body.pos-app .pos-tabs button {
  flex: 0 0 auto; width: auto; min-width: 0; max-width: none; overflow: visible; text-overflow: clip; white-space: nowrap; border-radius: 999px; padding: 8px 14px; font: 600 .8rem/1.1 var(--font-body, system-ui);
}
.seg-control .seg-btn[aria-pressed="true"], .rpt-seg button.on, .rpt-seg button[aria-selected="true"], .fx-seg button.is-on, body.pos-app .pos-tabs button.is-active {
  background: #fff !important; color: var(--sp-ink) !important; box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--sp-rose) 55%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--sp-gold-2) 45%, transparent); font-weight: 700;
}
.seg-control .seg-btn:focus-visible, .rpt-seg button:focus-visible, .fx-seg button:focus-visible, .chip:focus-visible, .dc-chip:focus-visible, .pos-subchip:focus-visible, .btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--sp-gold-2) 70%, transparent); outline-offset: 2px;
}
/* choice chips: payment method, kind filter, status filter */
.dc-chip.is-on, .dc-chip[aria-checked="true"], .dc-kindf button[aria-pressed="true"], body.admin-app .chip[aria-pressed="true"], body.admin-app .chip.active, body.pos-app .chip[aria-pressed="true"], body.pos-app .chip.active {
  background: var(--sp-tint) !important; border-color: var(--sp-gold-2) !important; color: var(--sp-ink) !important; box-shadow: 0 6px 14px -9px color-mix(in srgb, var(--sp-rose) 55%, transparent); font-weight: 700;
}
.dc-chip, .dc-kindf button { transition: background .18s, border-color .18s, box-shadow .18s; }
/* the main button, everywhere */
body.pos-app .pos-btn--gold, body.pos-app .pos-btn--gold:hover { background: linear-gradient(135deg, var(--sp-gold-1) 0%, var(--sp-gold-2) 100%) !important; color: var(--sp-ink) !important; border: 0 !important; box-shadow: 0 14px 24px -14px color-mix(in srgb, var(--sp-gold-3) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, .55); font-weight: 700; }
/* the front desk day bar: wraps instead of cutting the search off */
body.pos-app *:has(> .fd-search) { flex-wrap: wrap; row-gap: 8px; }
body.pos-app .fd-search { min-width: 0; flex: 1 1 160px; }
@media (max-width: 700px) { body.pos-app .fd-spacer { display: none; } }
/* totals under a table: a clean card, not a tinted block */
body.admin-app .data-total, body.admin-app .table-foot, body.admin-app .rpt-total { border-radius: 16px; }
@media (max-width: 700px) { .seg-control, .rpt-seg, .apo-chips { -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent 100%); mask-image: linear-gradient(90deg, #000 90%, transparent 100%); padding-right: 22px; } }

/* every item in the bottom bar looks the same (a button and a link were two different greys) */
body.admin-app .admin-bottom-nav a, body.admin-app .admin-bottom-nav button { color: var(--a-ink, #17140f); font-weight: 600; }
/* the front desk bar reads from its own tokens, so the words stay clear in the dark theme too (they were dark-on-dark before) */
body.pos-app .pos-bottom a, body.pos-app .pos-bottom button { color: var(--pos-ink-soft, #5b5348); font-weight: 600; }
body.pos-app .pos-bottom a.is-active, body.pos-app .pos-bottom button.is-active { color: var(--pos-ink, #17140f); background: var(--pos-card); box-shadow: inset 0 0 0 1px var(--pos-line-strong, var(--pos-line)); }
html[data-admin-theme="dark"] body.pos-app .pos-bottom a, html[data-admin-theme="dark"] body.pos-app .pos-bottom button { color: #d9d2c4; }
html[data-admin-theme="dark"] body.pos-app .pos-bottom a.is-active, html[data-admin-theme="dark"] body.pos-app .pos-bottom button.is-active { color: #fff; background: rgba(255,255,255,.10); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
html[data-admin-theme="dark"] body.pos-app .pos-bottom .is-active svg { color: var(--pos-gold, #7ccfa4); }
body.pos-app .pos-bottom button { background: none; border: 0; font-family: inherit; }

/* the staff sign in always fits one screen on a phone: no scrolling inside the card, whatever the screen height */
@media (max-width: 900px) {
  body.admin-login .login-card { height: auto !important; max-height: calc(100svh - 16px); }
  body.admin-login .login-story { height: clamp(88px, 15svh, 140px) !important; }
  body.admin-login .login-access { padding: 12px 22px 14px; overflow: visible; }
  body.admin-login .login-access .stack, body.admin-login .login-access form { gap: 11px; }
  body.admin-login .login-field { gap: 4px; }
  body.admin-login .login-field .input { height: 44px; }
  body.admin-login .login-submit { height: 46px; }
  body.admin-login .login-return { margin-top: 8px; }
  body.admin-login .login-lock { margin-top: 2px; }
}
@media (max-width: 900px) and (max-height: 700px) {
  body.admin-login .login-lock { display: none; }
  body.admin-login .login-logo-m { width: 36px; height: 36px; margin-bottom: 4px; }
  body.admin-login .login-story { height: clamp(70px, 12svh, 100px) !important; }
}
/* the page header actions sit on one tidy row (switch on the left, main button filling the rest), and the bottom bar's words fit their pill */
@media (max-width: 900px) {
  body.pos-app .pos-page-head, body.admin-app .pos-page-head { flex-wrap: wrap; row-gap: 10px; }
  body.pos-app .pos-page-head > .row { display: flex; flex: 1 1 100%; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
  body.pos-app .pos-page-head > .row > .fx-seg { flex: 0 0 auto; height: 44px; align-items: center; }
  body.pos-app .pos-page-head > .row > .pos-btn, body.pos-app .pos-page-head > .row > .btn { flex: 1 1 auto; min-height: 44px; height: 44px; justify-content: center; white-space: nowrap; }
  body.pos-app .pos-bottom a, body.pos-app .pos-bottom button { padding: 6px 0; font-size: .64rem; letter-spacing: -.005em; white-space: nowrap; }
}
/* number boxes have no up/down arrows: they cause wrong amounts. Type the number. */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; display: none; }
/* Admin home: the four "today" cards slide sideways; the two cashbook cards stay put underneath and never move. */
.stats-rail { display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 2px 8px; margin: 0 -2px 6px; }
.stats-rail::-webkit-scrollbar { display: none; }
.stats-rail > * { flex: 0 0 min(74%, 270px); scroll-snap-align: start; }
.stats-cash { margin-top: 4px; }
@media (max-width: 600px) { .stats-rail { -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent 100%); mask-image: linear-gradient(90deg, #000 90%, transparent 100%); padding-right: 24px; } }
@media (min-width: 601px) { .stats-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; scroll-snap-type: none; margin-bottom: 12px; } .stats-rail > * { flex: initial; } .stats-cash { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: no-preference) { .stats-rail { scroll-behavior: smooth; } }
/* Admin home on a phone: exactly two of the four cards fit the screen at a time (like the two cash cards below), and the rest slide in as a pair. */
@media (max-width: 600px) {
  .stats-rail { padding: 2px 0 8px; margin: 0 0 6px; scroll-snap-type: x mandatory; -webkit-mask-image: none; mask-image: none; scroll-padding: 0; }
  .stats-rail > * { flex: 0 0 calc((100% - 12px) / 2); min-width: 0; max-width: calc((100% - 12px) / 2); scroll-snap-align: start; scroll-snap-stop: always; }
}
/* Admin home: Customise Home */
.home-tools { display: flex; justify-content: flex-end; margin: -2px 0 6px; }
.home-custom { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.stats-rail [data-clone] { }
/* on a computer every card is shown once: the helper copies used for the endless sliding on a phone are never drawn (!important, because the card styles below are more specific) */
@media (min-width: 601px) { .stats-rail > [data-clone], body.admin-app .stats-rail > a[data-clone], body.admin-app .stats-rail > .stat-card[data-clone] { display: none !important; } }
.home-grid [hidden], .home-grid + * [hidden] { display: none !important; }
.hc-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.hc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--sp-line); border-radius: 14px; background: #fff; }
.hc-name { font-weight: 600; font-size: .9rem; }
.hc-act { display: inline-flex; gap: 6px; }
.hc-act .icon-btn[disabled] { opacity: .35; }
.hc-lab { display: block; margin: 12px 0 8px; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--a-ink-3, #6b6256); }
.hc-more { display: flex; flex-wrap: wrap; gap: 8px; }
.hc-more .hc-lab { flex: 0 0 100%; margin-bottom: 0; }
.hc-add { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px dashed var(--sp-gold-2); border-radius: 999px; background: var(--sp-tint); color: var(--sp-ink); font: 600 .8rem/1 inherit; cursor: pointer; }
.hc-secs { display: grid; gap: 8px; }
.hc-sec { display: flex; align-items: center; gap: 10px; font-size: .9rem; }.stat-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 120px; border: 1.5px dashed var(--sp-gold-2); border-radius: 18px; background: color-mix(in srgb, var(--sp-tint) 60%, #fff); color: var(--sp-ink); font: 600 .85rem/1.2 inherit; cursor: pointer; }
.stat-add-plus { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 8px 14px -10px rgba(0, 0, 0, .35); }
@media (min-width: 601px) { .stats-rail { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
/* Admin home, customising: hold the screen to start. Cards and sections wiggle gently; × removes, ‹ › moves. */
.home-tools { display: none; }
.stat-add { display: none; }
.is-customising .stat-add { display: flex; }
.home-tip { margin: 22px 0 6px; text-align: center; font-size: .78rem; color: var(--a-ink-3, #8a7f70); }
.home-editbar { position: sticky; top: 8px; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; padding: 10px 12px 10px 16px; border-radius: 18px; background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid color-mix(in srgb, var(--sp-gold-2) 55%, transparent); box-shadow: 0 18px 30px -20px color-mix(in srgb, var(--sp-rose) 60%, transparent); }
.home-editbar[hidden] { display: none; }
.home-editbar-text { display: grid; line-height: 1.25; }
.home-editbar-text b { font-size: .92rem; }
.home-editbar-text small { font-size: .72rem; color: var(--a-ink-3, #6b6256); }
.home-editbar-act { display: inline-flex; gap: 8px; }
.stats-rail > *, .home-grid > .panel, .home-grid > aside, .home-grid > div { position: relative; }
.card-ctl { position: absolute; inset: 0; pointer-events: none; }
.card-x, .card-mv, .sec-x { pointer-events: auto; position: absolute; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; font: 700 1.1rem/1 inherit; cursor: pointer; background: var(--sp-ink, #4a2a2f); color: #fff; box-shadow: 0 6px 12px -6px rgba(0, 0, 0, .55); }
.card-x { top: -8px; left: -8px; }
.card-mv { bottom: 8px; background: #fff; color: var(--sp-ink, #4a2a2f); border: 1px solid var(--sp-line); width: 30px; height: 30px; }
.card-mv[data-act="left"] { right: 46px; }
.card-mv[data-act="right"] { right: 10px; }
.sec-x { top: 10px; right: 10px; z-index: 5; }
@keyframes homeWiggle { 0%, 100% { transform: rotate(-.6deg); } 50% { transform: rotate(.6deg); } }
@media (prefers-reduced-motion: no-preference) {
  .is-customising .stats-rail > [data-home-id], .is-customising .home-grid > section:not([hidden]), .is-customising .home-grid > aside:not([hidden]) { animation: homeWiggle .34s ease-in-out infinite; }
  .is-customising .stats-rail > [data-home-id]:nth-child(even) { animation-delay: -.17s; }
}
.is-customising .stats-rail { overflow-y: visible; padding-top: 14px; }
.is-customising .stats-rail > a, .is-customising .stats-rail > div { user-select: none; -webkit-user-select: none; }
body.admin-app { -webkit-touch-callout: none; }
/* a notification opens as a glass bubble with the whole message */
.dialog.notif-bubble { background: linear-gradient(160deg, rgba(255,253,246,.62), rgba(250,238,208,.46)); -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%); border: 1px solid rgba(255,255,255,.7); border-radius: 26px; box-shadow: 0 26px 70px rgba(70,45,10,.3), inset 0 1px 0 rgba(255,255,255,.7); max-width: min(420px, calc(100vw - 28px)); }
.notif-bubble .dialog-header, .notif-bubble .dialog-footer { border-color: transparent; background: transparent; }
html body .dialog.notif-bubble .dialog-title { font-size: 1.15rem; }
.nb { display: flex; gap: 14px; align-items: flex-start; }
.nb-tone { flex: none; width: 10px; align-self: stretch; border-radius: 999px; background: #B98A2F; opacity: .8; }
.nb-tone--ok { background: #5aa17c; } .nb-tone--warn { background: #d49a2a; } .nb-tone--bad { background: #c2564b; }
.nb-body { margin: 0 0 10px; font-size: .98rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.nb-when { margin: 0; font-size: .78rem; opacity: .65; }
html[data-admin-theme="dark"] .dialog.notif-bubble { background: linear-gradient(160deg, rgba(44,38,28,.72), rgba(26,22,16,.6)); border-color: rgba(255,255,255,.16); }

/* on a phone the bubble floats in the middle of the screen instead of sliding up as a sheet */
.dialog-backdrop:has(.notif-bubble) { align-items: center !important; justify-content: center !important; padding: 18px !important; }
.dialog-backdrop .dialog.notif-bubble { position: relative; inset: auto !important; width: min(420px, 100%) !important; max-width: 100% !important; border-radius: 28px !important; margin: 0 auto; transform: none; background: linear-gradient(160deg, rgba(255,253,246,.66), rgba(250,238,208,.5)) !important; -webkit-backdrop-filter: blur(26px) saturate(170%) !important; backdrop-filter: blur(26px) saturate(170%) !important; max-height: 80vh; overflow: auto; }
html[data-admin-theme="dark"] .dialog-backdrop .dialog.notif-bubble { background: linear-gradient(160deg, rgba(44,38,28,.74), rgba(26,22,16,.62)) !important; }

/* Notification window: a clean message card (icon, title, time, then the message in a speech bubble) */
html body .dialog.notif-bubble .dialog-header { position: absolute; top: 12px; right: 12px; left: auto; width: auto; justify-content: flex-end; padding: 0; min-height: 0; z-index: 2; border: 0; background: none; }
html body .dialog.notif-bubble .dialog-title { display: none; }
html body .dialog.notif-bubble .dialog-body { padding: 24px 22px 6px; }
html body .dialog.notif-bubble .dialog-footer { border: 0; padding: 14px 22px 22px; gap: 10px; justify-content: stretch; }
html body .dialog.notif-bubble .dialog-footer .btn { flex: 1; min-height: 46px; border-radius: 14px; font-weight: 600; justify-content: center; }
.nb2-head { display: flex; align-items: center; gap: 14px; padding-right: 36px; }
.nb2-ico { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #8a6a22; background: radial-gradient(circle at 30% 25%, #fff7e2, #f1deaf 88%); box-shadow: inset 0 0 0 1px rgba(184, 147, 63, .38), 0 8px 16px -10px rgba(138, 106, 34, .6); }
.nb2-ico--ok { color: #2f7a55; background: radial-gradient(circle at 30% 25%, #f1fbf5, #cdeadb 88%); box-shadow: inset 0 0 0 1px rgba(47, 122, 85, .3), 0 8px 16px -10px rgba(47, 122, 85, .5); }
.nb2-ico--warn { color: #9a6a12; background: radial-gradient(circle at 30% 25%, #fff3d6, #f4d99a 88%); }
.nb2-ico--bad { color: #b04339; background: radial-gradient(circle at 30% 25%, #fff1ee, #f5cdc7 88%); box-shadow: inset 0 0 0 1px rgba(176, 67, 57, .28); }
.nb2-meta { min-width: 0; }
.nb2-title { font-family: var(--font-body, 'Poppins', system-ui, sans-serif); font-weight: 600; font-size: 1.08rem; line-height: 1.25; color: #2b241d; overflow-wrap: anywhere; }
.nb2-when { margin-top: 3px; font-size: .8rem; color: #85796a; }
.nb2-msg { position: relative; margin-top: 20px; padding: 15px 17px; border-radius: 6px 20px 20px 20px; background: rgba(255, 255, 255, .88); border: 1px solid rgba(184, 147, 63, .26); box-shadow: 0 12px 26px -18px rgba(70, 45, 10, .55); }
.nb2-msg::before { content: ""; position: absolute; left: 21px; top: -8px; width: 14px; height: 14px; background: rgba(255, 255, 255, .95); border-left: 1px solid rgba(184, 147, 63, .26); border-top: 1px solid rgba(184, 147, 63, .26); transform: rotate(45deg); border-radius: 3px 0 0 0; }
.nb2-msg p { margin: 0; font-size: 1rem; line-height: 1.62; color: #3d362e; white-space: pre-wrap; overflow-wrap: anywhere; }
.nb2-ref { font-weight: 600; color: #8a6a22; }
.nb2-amt { font-weight: 600; color: #2b241d; white-space: nowrap; }
html[data-admin-theme="dark"] .nb2-title { color: #f3eee4; }
html[data-admin-theme="dark"] .nb2-when { color: #bdb2a0; }
html[data-admin-theme="dark"] .nb2-msg, html[data-admin-theme="dark"] .nb2-msg::before { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); }
html[data-admin-theme="dark"] .nb2-msg p { color: #ece5d8; }
html[data-admin-theme="dark"] .nb2-ref { color: #d9b866; } html[data-admin-theme="dark"] .nb2-amt { color: #f3eee4; }

/* Admin home: the top cards are compact. The graph stays, beside the number on a computer and under it on a phone. */
body.admin-app .stats-rail .stat-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "top top" "val spark" "sub spark"; align-items: end; gap: 4px 10px; padding: 14px 16px; min-height: 0; }
body.admin-app .stats-rail .stat-top { grid-area: top; align-self: start; }
body.admin-app .stats-rail .stat-icon { width: 30px; height: 30px; border-radius: 10px; }
body.admin-app .stats-rail .stat-icon svg { width: 16px; height: 16px; }
body.admin-app .stats-rail .stat-label { font-size: .8rem; }
body.admin-app .stats-rail .stat-value { grid-area: val; margin: 0; font-size: 1.65rem; line-height: 1.05; }
body.admin-app .stats-rail .stat-cur { display: block; margin-bottom: 2px; font-size: .62rem; }
body.admin-app .stats-rail .stat-sub { grid-area: sub; margin: 0; }
body.admin-app .stats-rail .stat-spark { grid-area: spark; align-self: end; width: 96px; height: 44px; margin: 0; }
body.admin-app .stats-rail .stat-card:not(:has(.stat-spark)) { grid-template-areas: "top top" "val val" "sub sub"; }
@media (max-width: 600px) {
  body.admin-app .stats-rail .stat-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "val" "sub" "spark"; gap: 3px; padding: 11px 12px; }
  body.admin-app .stats-rail .stat-card:not(:has(.stat-spark)) { grid-template-areas: "top" "val" "sub"; }
  body.admin-app .stats-rail .stat-value { font-size: 1.3rem; }
  body.admin-app .stats-rail .stat-label { font-size: .74rem; }
  body.admin-app .stats-rail .stat-spark { width: 100%; height: 26px; }
}
/* cash row: on a computer the three cards (shop, treatment, total) share the whole width; a phone keeps just the two cashbooks */
@media (min-width: 641px) { body.admin-app .stats-grid.is-slim.stats-cash:has(.stat-total) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 640px) { body.admin-app .stats-cash .stat-total { display: none; } }

/* a summary card that only makes sense on a wide screen (for example a category count) */
@media (max-width: 640px) { body.admin-app .stat-hide-mobile { display: none !important; } }

/* Expenses: the circular "by cashbook" card */
body.admin-app .stat-donut .stat-value { font-size: inherit; font-weight: 400; line-height: 1.2; margin: 2px 0 0; }
.ex-donut { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ex-donut svg { flex: none; width: 64px; height: 64px; }
.ex-legend { display: grid; gap: 1px; font-size: .78rem; min-width: 0; }
.ex-legend .lg { display: flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.ex-legend i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.ex-legend small { margin: 0 0 4px 15px; opacity: .7; font-size: .72rem; white-space: nowrap; }
@media (min-width: 641px) and (max-width: 1000px) { .ex-donut svg { width: 52px; height: 52px; } .ex-donut { gap: 8px; } .ex-legend { font-size: .72rem; } }
.stat-donut .stat-icon { display: none; }
.stat-donut .stat-top { min-height: 0; }

/* Home: the right-hand column holds the goal and, when the schedule runs long, a short "worth a look" list */
body.admin-app .home-side { display: flex; flex-direction: column; gap: 24px; min-width: 0; align-self: start; }
.is-customising .home-side > aside:not([hidden]) { animation: homeWiggle .34s ease-in-out infinite; }
.home-fill-row { display: flex; align-items: center; gap: 12px; }

/* Detail windows: a label on the left, its value on the right (this row style had no rule on the staff pages, so the two ran together) */
body.admin-app .summary-line, body.pos-app .summary-line { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
body.admin-app .summary-line > :last-child, body.pos-app .summary-line > :last-child { text-align: right; min-width: 0; overflow-wrap: anywhere; }
body.admin-app .summary-line > .muted:first-child, body.pos-app .summary-line > .muted:first-child { flex: none; }

/* scroll reveal in the admin console: a card below the fold rises and fades in as it is scrolled to (see staff-fx.js) */
body.admin-app .fx-rv, body.pos-app .fx-rv { opacity: 0; translate: 0 22px; transition: opacity .7s cubic-bezier(.2, .8, .2, 1) var(--rv-d, 0ms), translate .7s cubic-bezier(.2, .8, .2, 1) var(--rv-d, 0ms); }
body.admin-app .fx-rv.is-in, body.pos-app .fx-rv.is-in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) { body.admin-app .fx-rv, body.pos-app .fx-rv { opacity: 1; translate: none; transition: none; } }
@media print { body.admin-app .fx-rv, body.pos-app .fx-rv { opacity: 1; translate: none; transition: none; } }

/* bottom bar: five equal cells; the chosen tab is a soft pill kept inside its own cell, so it never covers or crowds its neighbours */
@media (max-width: 1024px) {
  body.pos-app .pos-bottom { grid-auto-columns: minmax(0, 1fr); gap: 4px; }
  body.pos-app .pos-bottom a, body.pos-app .pos-bottom button { min-width: 0; margin: 0; overflow: hidden; padding: 7px 0; font-size: clamp(.5rem, 2.4vw, .68rem); letter-spacing: -.01em; }
  body.pos-app .pos-bottom a > span, body.pos-app .pos-bottom button > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  body.pos-app .pos-bottom a.is-active, body.pos-app .pos-bottom button.is-active { margin: 0; z-index: auto; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--sp-rose, #a4452d) 40%, transparent); background: var(--sp-tint, var(--pos-card)); }
}
@media (max-width: 360px) { body.pos-app .pos-bottom { left: 8px; right: 8px; padding: 4px; gap: 2px; } }

/* Summary cards that filter the list below them (Bookings): tap one to show just those; the chosen one is outlined. */
body.admin-app button.stat-card--go { appearance: none; font: inherit; color: inherit; text-align: left; cursor: pointer; width: 100%; }
body.admin-app .stat-card--go { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease; }
body.admin-app .stat-card--go:hover { transform: translateY(-2px); }
body.admin-app .stat-card--go:active { transform: translateY(0) scale(.985); }
body.admin-app .stat-card--go:focus-visible { outline: 2px solid var(--a-gold, #B8933F); outline-offset: 2px; }
body.admin-app .stat-card--go.is-active { border-color: var(--a-gold, #B8933F); box-shadow: inset 0 0 0 1px var(--a-gold, #B8933F), var(--a-shadow-2, 0 6px 18px rgba(0,0,0,.08)); background: linear-gradient(180deg, color-mix(in srgb, var(--a-gold, #B8933F) 10%, var(--a-surface, #fff)), var(--a-surface, #fff)); }
body.admin-app .stat-card--go.is-hot .stat-value { color: var(--a-danger, #B5482F); }
body.admin-app .stat-card--go .stat-sub b { font-weight: 700; }

/* Revenue card: the chart uses the whole card, so the bars grow to the height of the column beside it and nothing is left empty below them. */
@media (min-width: 769px) {
  body.admin-app [aria-labelledby="rev-title"] { display: flex; flex-direction: column; }
  body.admin-app [aria-labelledby="rev-title"] > .panel-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
  body.admin-app [aria-labelledby="rev-title"] .fx-rev { flex: 1; display: flex; flex-direction: column; min-height: 0; }
  body.admin-app [aria-labelledby="rev-title"] .fx-chart { flex: 1; height: auto; min-height: 210px; }
  body.admin-app [aria-labelledby="rev-title"] .fx-chart > .fx-bars, body.admin-app [aria-labelledby="rev-title"] .fx-chart > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
}

/* Notification details: label / value rows under the message */
.nb2-det { margin: 14px 0 0; display: grid; gap: 0; border: 1px solid rgba(120, 100, 60, .16); border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .55); }
.nb2-det > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 9px 14px; border-bottom: 1px solid rgba(120, 100, 60, .12); align-items: baseline; }
.nb2-det > div:last-child { border-bottom: 0; }
.nb2-det dt { margin: 0; font-size: .74rem; color: #85796a; }
.nb2-det dd { margin: 0; font-size: .9rem; font-weight: 600; color: #3d362e; overflow-wrap: anywhere; }
.nb2-det dd::first-letter { text-transform: uppercase; }
.notif-bubble .dialog-body, .notif-bubble .modal-body { max-height: min(62vh, 520px); overflow-y: auto; }

/* Front desk list toolbars on a phone: one joined date bar, then search + filter */
@media (max-width: 768px) {
  body .fd-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 8px; align-items: center; }
  body .fd-tools .fd-datenav { grid-column: 1 / -1; display: flex; align-items: stretch; width: 100%; height: 46px; gap: 0; overflow: hidden; border: 1px solid var(--pos-line-strong); border-radius: 999px; background: var(--pos-card); }
  body .fd-tools .fd-datenav .fd-btn, body .fd-tools .fd-datenav .fd-date { height: auto; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  body .fd-tools .fd-datenav .fd-btn { flex: none; width: 48px; padding: 0; justify-content: center; }
  body .fd-tools .fd-datenav .fd-date { flex: 1 1 0; min-width: 0; justify-content: center; padding: 0 8px; font-size: .9rem; font-weight: 700; white-space: nowrap; border-left: 1px solid var(--pos-line); border-right: 1px solid var(--pos-line); }
  body .fd-tools .fd-datenav .fd-btn#apo-today { display: none; }
  body .fd-tools .fd-datenav .fd-date > svg { display: none; }
  body .fd-tools .fd-spacer { display: none; }
  body .fd-tools .fd-search { grid-column: 1; flex: none; min-width: 0; width: 100%; }
  body .fd-tools > .fd-btn, body .fd-tools > button:not(.fd-btn) { grid-column: 2; }
  body .fd-tools .fd-search .pos-input, body .fd-tools .fd-search .input { height: 46px; }
  body .fd-tools > .fd-btn, body .fd-tools > button:not(.fd-btn) { height: 46px; }
  body .fd-tools #apo-due { grid-column: 1 / -1; justify-content: center; height: 40px; }
}

/* Appointment cards: calm, precise, premium */
.fx-card { position: relative; padding: 14px 14px 12px 18px; gap: 3px; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 0 rgba(80, 50, 30, .04); }
.fx-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #d9a94a; }
.fx-card[data-st="confirmed"]::before { background: #b98a2f; }
.fx-card[data-st="pending_payment"]::before { background: #d99a2b; }
.fx-card[data-st="checked_in"]::before { background: #5b9bd5; }
.fx-card[data-st="completed"]::before { background: #3fae6a; }
.fx-card > .row:first-child { margin-top: 0; align-items: baseline; }
.fx-card .time { font: 700 1.02rem/1.1 var(--font-body, system-ui); letter-spacing: -.01em; }
.fx-card > .row:first-child .what { padding: 3px 9px; border-radius: 999px; background: rgba(120, 90, 60, .08); font-size: .7rem; font-weight: 600; }
.fx-card .who { font-size: 1rem; font-weight: 700; margin-top: 4px; }
.fx-card .what { line-height: 1.35; }
.fx-card > .row:nth-of-type(2), .fx-card > .row:last-of-type:not(.fx-links) { margin-top: 10px; }
.fx-card .owe { display: grid; gap: 1px; font-size: .92rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fx-card .owe small { font-size: .64rem; font-weight: 600; letter-spacing: .02em; color: var(--a-ink-3, #8a7f70); }
.fx-card .next { min-height: 38px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; font-size: .8rem; box-shadow: 0 6px 14px -8px rgba(185, 138, 47, .7); }
.fx-card .fx-links { display: flex; gap: 0; margin: 12px -14px -12px -18px; padding: 0; border-top: 1px solid var(--sp-line, rgba(60, 45, 20, .1)); }
.fx-card .fx-link { flex: 1; min-height: 40px; background: none; border: 0; border-left: 1px solid var(--sp-line, rgba(60, 45, 20, .1)); color: #8a6a22; font: 600 .76rem/1 var(--font-body, system-ui); cursor: pointer; }
.fx-card .fx-link:first-child { border-left: 0; padding-left: 4px; }
.fx-card .fx-link:hover { background: rgba(185, 138, 47, .08); }
.fx-card a.next { display: inline-flex; text-decoration: none; }
.fx-card .fx-link { text-decoration: none; }

.bk-tel { text-decoration: none !important; }

/* Expenses on a phone: only the two main cards (this month, all time). The others must really go, whatever else styles the card row. */
@media (max-width: 640px) { html body.admin-app .stats-grid .stat-card.stat-hide-mobile, html body.admin-app #page-summary .stat-card.stat-hide-mobile { display: none !important; } }
@media (max-width: 640px) { html body.admin-app #page-summary:has(.stat-hide-mobile) .stat-card:not(.stat-hide-mobile) { flex: 1 1 0 !important; min-width: 0 !important; } }

/* Phone: the Bookings filters fit the card. The tabs are one row that slides sideways with a finger, and the search box takes the full width. */
@media (max-width: 768px) {
  html body .bk-tools { width: 100%; max-width: 100%; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  html body .bk-tools .seg-control { display: flex; flex-wrap: nowrap; width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x; scroll-snap-type: x proximity; scrollbar-width: none; }
  html body .bk-tools .seg-control::-webkit-scrollbar { display: none; }
  html body .bk-tools .seg-btn { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }
  html body .bk-tools .search-box { width: 100%; max-width: 100%; min-width: 0; }
  html body .bk-tools .search-box .input { width: 100%; min-width: 0; }
  html body .panel-head:has(.bk-tools) { min-width: 0; }
}
/* Phone Home: no big "Open front desk" button; the greeting and the alert are enough (Desk is in the bottom menu). */
@media (max-width: 768px) { html body.admin-app .home-hero-actions { display: none !important; } }

/* "Create your login" is taller than sign in (username, two passwords, a message): the form side scrolls instead of being cut off */
body.admin-login .login-access { overflow-y: auto !important; justify-content: safe center; min-height: 0; -webkit-overflow-scrolling: touch; }
@media (max-width: 900px) { body.admin-login .login-card { height: auto !important; max-height: calc(100svh - 16px); } body.admin-login .login-access { overflow-y: auto !important; } }
/* the form still scrolls, but without a visible scrollbar */
body.admin-login .login-access { scrollbar-width: none; -ms-overflow-style: none; }
body.admin-login .login-access::-webkit-scrollbar { display: none; width: 0; height: 0; }
