/* =========================================================
   Bundled stylesheet. This is the only place to edit styles;
   do not add new CSS files. Sections below keep the old
   <link> order so the cascade is unchanged.
   Two files stay separate on purpose: visual-tokens.css (shared
   with the embedded user guide) and user-guide.css (loaded on
   demand by app.js).
   ========================================================= */

/* ---------- style.css ---------- */
/* =========================================================
    GUEST OPERATIONS — GLOBAL DESIGN SYSTEM AND COMPONENT STYLES
    Keep later feature overrides grouped under their section headings.
    ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@500;600;700;800&display=swap');

:root {
  --bg:#f4f6fa;
  --surface:#fff;
  --ink:#14233f;
  --muted:#8490a5;
  --line:#e8edf4;
  --blue:#356df3;
  --blue2:#2457d7;
  --navy:#142747;
  --green:#15966a;
  --amber:#c78525;
  --red:#d65c67;
  --shadow:0 8px 28px rgba(28,48,83,.055);
  --r:20px;
}

* {
  box-sizing:border-box;
}

html {
  scroll-behavior:smooth;
}

body {
  margin:0;
  -webkit-tap-highlight-color:transparent;
}

button,input,select,textarea {
  font:inherit;
}

button {
  cursor:pointer;
}

button:focus-visible,input:focus-visible,select:focus-visible {
  outline:3px solid #356df344;
  outline-offset:2px;
}

.app {
  margin:auto;
  min-height:100dvh;
  padding-bottom:100px;
  position:relative;
}

.top {
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.brand {
  display:flex;
  align-items:center;
  gap:11px;
}

.brandmark {
  display:grid;
  place-items:center;
  color:#fff;
}

.brandmark svg {
  width:21px;
}

.brandmeta {
  font-size:10px;
  color:var(--muted);
  margin-top:2px;
}

.profile {
  width:39px;
  height:39px;
  border-radius:50%;
  display:grid;
  place-items:center;
  font-weight:800;
  font-size:12px;
}

.eyebrow {
  font-size:11px;
  font-weight:700;
  color:var(--muted);
  text-transform:uppercase;
}

.greeting {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
}

.greeting h1 {
  font:800 25px Manrope;
  margin:5px 0 0;
  letter-spacing:-.04em;
}

.date {
  font-size:11px;
  padding:8px 10px;
}

.hero {
  position:relative;
  overflow:hidden;
}

.hero:before {
  content:"";
  position:absolute;
  width:190px;
  height:190px;
  border:1px solid #ffffff16;
  border-radius:50%;
  right:-72px;
  top:-88px;
}

.hero-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  position:relative;
}

.hero-label {
  font-size:11px;
  color:#c4d1e8;
}

.live {
  font-size:10px;
  padding:6px 9px;
  border-radius:20px;
  display:flex;
  align-items:center;
  gap:6px;
}

.dot {
  width:6px;
  height:6px;
  border-radius:50%;
}

.hero-total {
  font:800 43px Manrope;
  letter-spacing:-.05em;
  margin:9px 0 0;
  position:relative;
}

.hero-foot {
  display:flex;
  gap:17px;
  margin-top:13px;
  position:relative;
}

.hero-foot span {
  font-size:11px;
  color:#bdcce3;
}

.hero-foot b {
  font-weight:700;
}

.metrics {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  margin:13px 0 19px;
}

.metric[role="button"] {
  cursor:pointer;
  transition:transform .2s ease,box-shadow .2s ease;
}

.metric[role="button"]:focus-visible {
  outline:3px solid #aaa3e8;
  outline-offset:3px;
}

.metric[role="button"]:active {
  transform:translateY(1px);
}

.metric:nth-child(1) {
  animation-delay:.08s;
}

.metric:nth-child(2) {
  animation-delay:.14s;
}

.metric:nth-child(3) {
  animation-delay:.2s;
}

.metric-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.metric-icon {
  width:29px;
  height:29px;
  display:grid;
  place-items:center;
}

.metric strong {
  font:800 24px Manrope;
  display:block;
  margin-top:8px;
  letter-spacing:-.04em;
}

.metric small {
  font-size:10px;
  font-weight:600;
}

.i-blue {
  background:#edf3ff;
  color:#356df3;
}

.section-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:0 2px 11px;
}

.section-head h2 {
  font:800 16px Manrope;
  margin:0;
  letter-spacing:-.025em;
}

.text-btn {
  border:0;
  background:transparent;
  font-weight:700;
  font-size:11px;
  padding:7px;
}

.primary {
  border:0;
  padding:14px 17px;
  font-weight:700;
  font-size:13px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  width:100%;
  transition:.2s;
  position:relative;
  overflow:hidden;
}

.primary svg {
  width:17px;
}

.quick {
  display:grid;
  grid-template-columns:1fr 1fr;
  margin-bottom:21px;
}

.quick .primary {
  margin:0;
}

.secondary {
  padding:13px 12px;
  font-weight:700;
  font-size:12px;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  transition:.2s;
}

.secondary:active {
  transform:scale(.975);
}

.secondary svg {
  width:16px;
}

.queue-list {
  display:grid;
}

.guest {
  padding:13px;
  transition:transform .2s,border-color .2s;
}

.guest:active {
  transform:scale(.99);
}

.guest-row {
  display:flex;
  align-items:center;
  gap:11px;
}

.ticket {
  width:44px;
  height:48px;
  flex:none;
  display:grid;
  place-items:center;
  font:800 11px Manrope;
  letter-spacing:-.03em;
}

.guest-main {
  min-width:0;
  flex:1;
}

.guest-name {
  font-weight:800;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.guest-meta {
  color:var(--muted);
  margin-top:4px;
  display:flex;
  gap:7px;
  align-items:center;
}

.status {
  font-size:9px;
  font-weight:800;
  padding:6px 8px;
  white-space:nowrap;
}

.s-missed {
  color:#8a5b22;
  background:#fff4df;
}

.guest-bottom {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:11px 0 0 55px;
}

.waittime {
  font-size:10px;
  color:var(--muted);
}

.waittime b {
  color:var(--ink);
}

.actions {
  display:flex;
  gap:6px;
}

.mini {
  padding:7px 9px;
  font-size:10px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  gap:5px;
}

.mini svg {
  width:13px;
  height:13px;
}

.mini .wa-icon {
  width:13px;
  height:13px;
  flex:none;
  color:#25d366;
}

.mini.blue {
  border-color:#dce7ff;
}

.mini.green {
  border-color:#d5f0e3;
}

.mini.red {
  border-color:#ffe0e3;
}

.empty {
  border:1px dashed #d8e0ec;
  background:#fff;
  border-radius:18px;
  text-align:center;
  padding:28px 18px;
  color:var(--muted);
}

.empty-icon {
  width:45px;
  height:45px;
  border-radius:15px;
  background:#eef3ff;
  color:#356df3;
  display:grid;
  place-items:center;
  margin:0 auto 11px;
}

.empty h3 {
  font:800 14px Manrope;
  color:var(--ink);
  margin:0 0 5px;
}

.empty p {
  font-size:11px;
  margin:0;
  line-height:1.5;
}

.pending {
  padding:14px;
  margin-bottom:18px;
}

.pending h3 {
  font-size:12px;
  margin:0 0 5px;
  color:#98671e;
}

.pending p {
  font-size:10px;
  color:#9a845e;
  margin:0 0 10px;
}

.page {
  display:none;
  animation:pageIn .3s both;
}

.page.active {
  display:block;
}

/* BAGIAN: Tombol kembali pada halaman fitur */
.page-back {
  display: inline-flex;
  width: auto;
  min-width: 0;
  min-height: 36px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0 12px 0 10px;
  border: 1px solid rgba(17,18,37,.07);
  border-radius: 12px;
  background: #fff;
  color: #55536d;
  box-shadow: 0 3px 10px rgba(17,18,37,.06);
  font: 700 11px 'DM Sans',sans-serif;
  line-height: 1;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.page-back svg {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page-back span {
  display: block;
  font: inherit;
}

.page-back:active {
  transform: scale(.98);
  background: #f8f8f5;
}

.page-title {
  font:800 23px Manrope;
  letter-spacing:-.04em;
  margin:8px 0 4px;
}

.page-sub {
  font-size:11px;
  margin:0 0 17px;
}

.search {
  position:relative;
  margin-bottom:12px;
}

.search svg {
  position:absolute;
  left:13px;
  top:13px;
  width:16px;
}

.search input {
  width:100%;
  height:43px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:13px;
  padding:0 13px 0 39px;
  font-size:12px;
  color:var(--ink);
}

.filters {
  display:flex;
  overflow:auto;
  padding:2px 0 12px;
  scrollbar-width:none;
}

.filters::-webkit-scrollbar {
  display:none;
}

.filter {
  padding:8px 11px;
  font-weight:700;
  white-space:nowrap;
}

.filter.active {
  border-color:var(--navy);
}

.history-date {
  width:100%;
  height:42px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  padding:0 12px;
  font-size:12px;
  margin-bottom:12px;
  color:var(--ink);
}

.bottomnav {
  position:fixed;
  bottom:0;
  left:50%;
  transform:translateX(-50%);
  width:min(520px,100%);
  padding:10px 12px calc(10px + env(safe-area-inset-bottom));
  grid-template-columns:repeat(4,1fr);
  z-index:20;
}

.navitem {
  border:0;
  background:transparent;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  padding:5px 0;
  font-size:9px;
  font-weight:700;
  position:relative;
}

.navitem svg {
  width:19px;
  height:19px;
  stroke-width:1.9;
}

.navitem.active:before {
  content:"";
  position:absolute;
  top:-10px;
  width:23px;
  height:3px;
  border-radius:5px;
  animation:navIn .25s;
}

.fab {
  position:fixed;
  right:max(20px,calc((100vw - 520px)/2 + 20px));
  width:54px;
  height:54px;
  border:0;
  color:white;
  display:grid;
  place-items:center;
  z-index:15;
  transition:.2s;
}

.fab:active {
  transform:scale(.9) rotate(8deg);
}

.fab svg {
  width:23px;
}

.sheet-backdrop {
  position:fixed;
  inset:0;
  z-index:40;
  opacity:0;
  pointer-events:none;
  transition:opacity .25s;
}

.sheet-backdrop.show {
  opacity:1;
  pointer-events:auto;
}

.sheet {
  position:fixed;
  z-index:41;
  left:50%;
  bottom:0;
  transform:translate(-50%,105%);
  width:min(520px,100%);
  max-height:91dvh;
  overflow:auto;
  padding:10px 20px calc(22px + env(safe-area-inset-bottom));
  transition:transform .38s cubic-bezier(.2,.85,.25,1);
}

.sheet.show {
  transform:translate(-50%,0);
}

.handle {
  width:38px;
  height:4px;
  border-radius:8px;
  margin:0 auto 18px;
}

.sheet-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:17px;
}

.sheet-head h2 {
  font:800 19px Manrope;
  margin:0;
  letter-spacing:-.03em;
}

.close {
  width:32px;
  height:32px;
  border:0;
  border-radius:10px;
  display:grid;
  place-items:center;
}

.close svg {
  width:16px;
}

.field {
  margin-bottom:13px;
}

.field label {
  display:block;
  font-size:11px;
  font-weight:800;
  margin-bottom:7px;
  color:#3d4c65;
}

.field input,.field select,.field textarea {
  width:100%;
  height:46px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:0 13px;
  background:#fbfcfe;
  color:var(--ink);
  font-size:13px;
}

.field textarea {
  height:74px;
  padding:12px;
  resize:vertical;
}

.field small {
  display:block;
  font-size:10px;
  color:var(--muted);
  margin-top:5px;
}

.pack-control {
  display:flex;
  align-items:center;
  justify-content:space-between;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:6px 8px;
  background:#fbfcfe;
  height:46px;
}

.pack-control button {
  width:32px;
  height:32px;
  border:0;
  border-radius:9px;
  font-size:19px;
}

.pack-control strong {
  font:800 15px Manrope;
}

.seg button {
  height:43px;
  font-size:11px;
}

.sheet-actions {
  display:flex;
  gap:9px;
  margin-top:18px;
}

.sheet-actions button {
  flex:1;
}

.sheet-actions .secondary {
  box-shadow:none;
}

.detail-ticket {
  padding:18px;
  text-align:center;
  margin-bottom:16px;
}

.detail-ticket small {
  font-size:10px;
}

.detail-ticket strong {
  display:block;
  font:800 30px Manrope;
  margin:3px;
}

.detail-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin:13px 0;
}

.detail-cell {
  padding:11px;
}

.detail-cell small {
  display:block;
}

.detail-cell b {
  display:block;
  font-size:12px;
  margin-top:4px;
}

.timeline {
  border-left:1px solid #dce4ef;
  margin:12px 0 0 6px;
  padding-left:15px;
}

.timeline-item {
  position:relative;
  margin-bottom:12px;
}

.timeline-item:before {
  content:"";
  position:absolute;
  width:7px;
  height:7px;
  border-radius:50%;
  left:-19px;
  top:4px;
}

.timeline-item b {
  font-size:10px;
}

.timeline-item small {
  display:block;
  color:var(--muted);
  font-size:9px;
  margin-top:3px;
}

.toast {
  position:fixed;
  z-index:70;
  bottom:calc(88px + env(safe-area-inset-bottom));
  left:50%;
  transform:translate(-50%,20px);
  color:#fff;
  padding:11px 16px;
  border-radius:12px;
  font-size:11px;
  font-weight:700;
  opacity:0;
  pointer-events:none;
  transition:.28s;
  white-space:nowrap;
}

.toast.show {
  opacity:1;
  transform:translate(-50%,0);
}

.settings-card {
  background:#fff;
  border:1px solid var(--line);
  border-radius:17px;
  overflow:hidden;
  margin-bottom:14px;
  box-shadow:var(--shadow);
}

.setting-row {
  display:flex;
  align-items:center;
  padding:14px;
  border-bottom:1px solid var(--line);
}

.setting-row:last-child {
  border:0;
}

.setting-icon {
  width:34px;
  height:34px;
  border-radius:11px;
  display:grid;
  place-items:center;
}

.setting-icon svg {
  width:16px;
}

.setting-copy {
  flex:1;
}

.setting-copy b {
  display:block;
}

.setting-copy small {
  color:var(--muted);
  display:block;
  margin-top:3px;
}

.setting-row button {
  border:0;
  background:transparent;
  font-size:11px;
  font-weight:800;
}

@keyframes rise {
  from {
    opacity:0;
    transform:translateY(12px);
  }
  to {
    opacity:1;
    transform:translateY(0);
  }
}

@keyframes drop {
  from {
    opacity:0;
    transform:translateY(-8px);
  }
  to {
    opacity:1;
    transform:translateY(0);
  }
}

@keyframes pageIn {
  from {
    opacity:0;
    transform:translateY(7px);
  }
  to {
    opacity:1;
    transform:translateY(0);
  }
}

@keyframes pulse {
  50% {
    box-shadow:0 0 0 7px #56d6a200;
  }
}

@keyframes navIn {
  from {
    transform:scaleX(.2);
    opacity:0;
  }
  to {
    transform:scaleX(1);
    opacity:1;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    animation-duration:.01ms!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
}

/* ORVIO-INSPIRED WAITLIST DESIGN — visual layer only */

:root {
  --bg:#f6f6f1;
  --surface:#fff;
  --ink:#111225;
  --muted:#858594;
  --line:#eeedf0;
  --blue:#111225;
  --blue2:#24243a;
  --navy:#111225;
  --green:#78a94d;
  --amber:#a58a39;
  --red:#c66b75;
  --shadow:0 2px 12px rgba(17,18,37,.035);
  --r:22px;
  --lime:#d9ee8c;
  --lime-soft:#eef7c7;
  --lav:#aaa3e8;
  --lav-soft:#dedbf5;
  --mint:#a3d8ba;
}

body {
  background:var(--bg);
  color:var(--ink);
}

.app {
  max-width:520px;
  background:var(--bg);
}

.top {
  background:var(--bg);
  padding:20px 22px 14px;
  animation:none;
}

.brandmark {
  background:#111225;
  box-shadow:none;
  border-radius:50%;
  width:42px;
  height:42px;
}

.brandname {
  font:800 15px Manrope;
  letter-spacing:.04em;
}

.brandmeta {
  letter-spacing:.04em;
}

.profile {
  background:#e9e8f6;
  color:#34324f;
  box-shadow:none;
  border:0;
}

.content {
  padding:10px 20px 30px;
}

.greeting {
  margin:8px 0 20px;
}

.greeting h1 {
  font-size:26px;
}

.eyebrow {
  letter-spacing:.08em;
}

.date {
  border:0;
  background:#fff;
  border-radius:12px;
  color:#666678;
}

.hero {
  background:var(--lime);
  color:#111225;
  border-radius:22px;
  animation:none;
  padding:20px;
}

.hero:before {
  border-color:#11122512;
  box-shadow:0 0 0 25px #11122508,0 0 0 52px #11122505;
}

.hero-label,.hero-foot span {
  color:#555b3e;
}

.live {
  background:#1112250d;
  color:#343728;
}

.dot {
  background:#679a42;
  box-shadow:none;
  animation:none;
}

.hero-total {
  font-size:clamp(38px,10vw,48px);
  color:#111225;
}

.hero-foot b {
  color:#111225;
}

.metrics {
  gap:9px;
}

.metric {
  border:0;
  border-radius:18px;
  box-shadow:none;
  animation:none;
  padding:14px;
  background:#fff;
}

.metric:nth-child(n) {
  animation:none;
}

.metric-icon {
  border-radius:10px;
}

.i-amber {
  background:#f4f0d9;
  color:#8f792b;
}

.i-green {
  background:#e4f2e8;
  color:#4c956b;
}

.i-red {
  background:#f8e9eb;
  color:#bd6570;
}

.metric strong {
  font-size:25px;
  color:#111225;
}

.quick {
  gap:10px;
}

.primary {
  background:#111225;
  color:#fff;
  border-radius:14px;
  box-shadow:none;
}

.primary:active {
  transform:scale(.98);
}

.secondary {
  border:0;
  background:#fff;
  color:#111225;
  border-radius:14px;
  box-shadow:none;
}

.secondary svg {
  color:#77748f;
}

.section-head h2,.page-title {
  color:#111225;
}

.text-btn {
  color:#55527f;
}

.queue-list {
  gap:9px;
}

.guest {
  background:#fff;
  border:0;
  border-radius:17px;
  box-shadow:none;
  animation:none;
}

.ticket {
  background:var(--lime-soft);
  color:#414c21;
  border-radius:12px;
}

.status {
  border-radius:9px;
}

.s-waiting {
  color:#826b21;
  background:#f5f0d9;
}

.s-called {
  color:#55518c;
  background:#efedfb;
}

.s-seated {
  color:#4d6992;
  background:#e9eff9;
}

.s-done {
  color:#397b55;
  background:#e6f3e9;
}

.s-cancelled {
  color:#a64f5c;
  background:#f8e9eb;
}

.mini {
  border:0;
  border-radius:9px;
  background:#f4f3f7;
  color:#48485a;
}

.mini.blue {
  background:#efedfb;
  color:#56518e;
  border:0;
}

.mini.green {
  background:#e6f3e9;
  color:#397b55;
  border:0;
}

.mini.red {
  background:#f8e9eb;
  color:#a64f5c;
  border:0;
}

.empty,.settings-card {
  background:#fff;
  border:0;
  border-radius:19px;
  box-shadow:none;
}

.empty-icon,.setting-icon {
  background:#efedfb;
  color:#5c588f;
}

.pending {
  background:#f8f3df;
  border:0;
  border-radius:17px;
}

.page-title {
  font-size:25px;
}

.page-sub {
  color:#858594;
}

.search input,.history-date {
  border:0;
  background:#fff;
  border-radius:13px;
}

.search svg {
  color:#89889b;
}

.filter {
  border:0;
  background:#fff;
  border-radius:10px;
  color:#777687;
}

.filter.active {
  background:#111225;
  color:#fff;
  box-shadow:none;
}

.bottomnav {
  background:#fff;
  border-top:1px solid #eeedf0;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}

.navitem {
  color:#9998a5;
}

.navitem.active {
  color:#111225;
}

.navitem.active:before {
  background:#111225;
}

.fab {
  background:#111225;
  box-shadow:0 6px 18px #11122524;
  border-radius:17px;
}

.sheet-backdrop {
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  background:#11122588;
}

.sheet {
  background:#fff;
  border-radius:24px 24px 0 0;
  box-shadow:0 -8px 30px #11122512;
}

.handle {
  background:#dedde5;
}

.sheet-head h2 {
  color:#111225;
}

.close {
  background:#f2f1f5;
  color:#55546a;
}

.field input,.field select,.field textarea,.pack-control {
  background:#f8f8f6;
  border:1px solid #eeedf0;
}

.pack-control button {
  background:#efedfb;
  color:#55518c;
}

.seg button {
  border-color:#eeedf0;
}

.detail-ticket {
  background:var(--lime);
  color:#111225;
  border-radius:18px;
}

.detail-ticket small {
  color:#5c6243;
}

.timeline {
  border-color:#e6e4ed;
}

.timeline-item:before {
  background:var(--lav);
}

.toast {
  background:#111225;
  box-shadow:none;
}

.setting-row {
  border-color:#f0eff2;
}

.setting-row button {
  color:#55518c;
}

button {
  transition:background-color .18s ease,color .18s ease,border-color .18s ease,transform .18s ease;
}

@media(max-width:899px) {
  .page#page-dashboard {
    display:none;
  }
  .page#page-dashboard.active {
    display:block;
  }
}

@media(max-width:380px) {
  .content {
    padding-left:15px;
    padding-right:15px;
  }
  .hero {
    padding:17px;
  }
  .hero-total {
    font-size:38px;
  }
  .metric {
    padding:11px 9px;
  }
  .metric strong {
    font-size:22px;
  }
  .guest-bottom {
    margin-left:0;
    gap:8px;
    flex-wrap:wrap;
  }
}

/* CUSTOM HISTORY DATE PICKER — Orvio-inspired */

button.history-date {
  width:100%;
  min-height:66px;
  margin:0 0 13px;
  padding:10px 14px;
  display:flex;
  align-items:center;
  gap:12px;
  text-align:left;
  border:0;
  border-radius:16px;
  background:#fff;
  color:var(--ink);
  box-shadow:none;
  cursor:pointer;
}

.history-date-icon {
  width:40px;
  height:40px;
  flex:none;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:#eef7c7;
  color:#4c572a;
}

.history-date-icon svg {
  width:19px;
  height:19px;
}

.history-date-copy {
  display:flex;
  flex:1;
  min-width:0;
  flex-direction:column;
  gap:3px;
}

.history-date-copy small {
  font-weight:600;
}

.history-date-copy strong {
  font-weight:800;
  color:#111225;
}

.history-date-chevron {
  width:17px;
  height:17px;
  color:#8d8b9d;
}

.calendar-backdrop {
  position:fixed;
  inset:0;
  z-index:88;
  background:rgba(17,18,37,.34);
  opacity:0;
  visibility:hidden;
  transition:opacity .2s ease,visibility .2s ease;
}

.calendar-backdrop.show {
  opacity:1;
  visibility:visible;
}

.calendar-dialog {
  position:fixed;
  z-index:89;
  left:50%;
  top:50%;
  width:min(92vw,430px);
  max-height:calc(100dvh - 36px);
  overflow:auto;
  padding:22px;
  border-radius:24px;
  background:#fff;
  color:#111225;
  box-shadow:0 18px 55px rgba(17,18,37,.16);
  opacity:0;
  visibility:hidden;
  transform:translate(-50%,-47%) scale(.98);
  transition:opacity .2s ease,transform .22s ease,visibility .2s ease;
}

.calendar-dialog.show {
  opacity:1;
  visibility:visible;
  transform:translate(-50%,-50%) scale(1);
}

.calendar-dialog-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:17px;
}

.calendar-eyebrow {
  font-size:9px;
  font-weight:800;
  letter-spacing:.13em;
  color:#9694a2;
}

.calendar-dialog-head h2 {
  font:800 21px Manrope,sans-serif;
  margin:5px 0 0;
  color:#111225;
}

.calendar-close {
  width:34px;
  height:34px;
  border:0;
  border-radius:11px;
  background:#f5f5f1;
  color:#555469;
  font-size:23px;
  line-height:1;
}

.calendar-selected {
  padding:14px 16px;
  margin-bottom:17px;
  border-radius:15px;
  background:#eef7c7;
}

.calendar-selected small {
  display:block;
  font-size:10px;
  color:#677044;
  margin-bottom:4px;
}

.calendar-selected strong {
  font:800 20px Manrope,sans-serif;
  color:#111225;
}

.calendar-monthbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:13px;
}

.calendar-monthbar strong {
  font:800 14px Manrope,sans-serif;
  color:#111225;
}

.calendar-monthbar button {
  width:34px;
  height:34px;
  border:0;
  border-radius:10px;
  background:#f5f5f1;
  color:#5d5b70;
  display:grid;
  place-items:center;
}

.calendar-monthbar svg {
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.calendar-weekdays,.calendar-days {
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:5px;
}

.calendar-weekdays {
  margin-bottom:7px;
}

.calendar-weekdays span {
  text-align:center;
  font-size:10px;
  font-weight:800;
  color:#9997a4;
  padding:7px 0;
}

.calendar-day {
  aspect-ratio:1;
  border:0;
  border-radius:50%;
  background:transparent;
  color:#29283c;
  display:grid;
  place-items:center;
  font-size:12px;
  font-weight:600;
  min-width:0;
}

.calendar-day.outside {
  color:#c4c2cc;
}

.calendar-day.today:not(.selected) {
  box-shadow:inset 0 0 0 1px #aaa3e8;
  color:#5c568d;
}

.calendar-day.selected {
  background:#d9ee8c;
  color:#111225;
  font-weight:800;
}

.calendar-dialog-actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid #f0eff2;
}

.calendar-today,.calendar-apply {
  height:42px;
  padding:0 15px;
  border:0;
  border-radius:12px;
  font-size:11px;
  font-weight:800;
}

.calendar-today {
  background:#f3f2f7;
  color:#59576e;
}

.calendar-apply {
  background:#111225;
  color:#fff;
  flex:1;
}

@media(max-width:380px) {
  .calendar-dialog {
    padding:17px;
    border-radius:21px;
  }
  .calendar-weekdays,.calendar-days {
    gap:3px;
  }
  .calendar-day {
    font-size:11px;
  }
}

@media(prefers-reduced-motion:reduce) {
  .calendar-backdrop,.calendar-dialog {
    transition:none;
  }
}

/* RESERVATIONS — standalone local demo module */

.reservation-toolbar,.reservation-day-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.reservation-toolbar {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:9px;
  background:#fff;
  padding:12px 15px;
  border-radius:17px;
  margin:16px 0 10px;
}

.reservation-toolbar-heading,

.reservation-toolbar-month {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:0;
}

.reservation-toolbar-heading {
  min-height:28px;
}

.reservation-toolbar strong {
  min-width:0;
  font:800 17px Manrope;
  color:#111225;
}

.reservation-today-button {
  flex:0 0 auto;
  min-height:29px;
  padding:0 12px;
  border:0;
  border-radius:9px;
  background:#f3f2f7;
  color:#55536d;
  font-size:11px;
  font-weight:800;
}

.reservation-month-nav {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:5px;
  width:auto;
  flex:0 0 auto;
}

.reservation-month-nav button {
  width:34px;
  min-width:34px;
  height:34px;
  padding:0;
  border:0;
  border-radius:10px;
  background:#f3f2f7;
  color:#55536d;
  font-size:14px;
  font-weight:800;
}

.reservation-legend {
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  margin:12px 2px;
  font-weight:700;
}

.reservation-legend span {
  display:flex;
  align-items:center;
  gap:5px;
}

.r-dot {
  width:7px;
  height:7px;
  border-radius:50%;
  display:inline-block;
}

.r-dot.waiting {
  background:#b6a34c;
}

.r-dot.seated {
  background:#76ad88;
}

.r-dot.cancelled {
  background:#cb7b85;
}

.reservation-calendar {
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:5px;
  padding:12px;
  background:#fff;
  border-radius:18px;
}

.reservation-weekday {
  text-align:center;
  padding:5px 0 8px;
  color:#9997a4;
  font-size:10px;
  font-weight:800;
}

.reservation-day {
  position:relative;
  min-height:48px;
  border:0;
  border-radius:12px;
  background:#fafaf7;
  color:#29283c;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  font-size:12px;
  font-weight:700;
}

.reservation-day.outside {
  opacity:.28;
}

.reservation-day.today {
  box-shadow:inset 0 0 0 1px #aaa3e8;
}

.reservation-day.selected {
  background:#d9ee8c;
  color:#111225;
}

.reservation-day-dots {
  display:flex;
  gap:3px;
  height:5px;
}

.reservation-day-dots i {
  width:4px;
  height:4px;
  border-radius:50%;
  background:#b6a34c;
}

.reservation-day-dots i.seated {
  background:#76ad88;
}

.reservation-day-dots i.cancelled {
  background:#cb7b85;
}

.reservation-day-head {
  margin:20px 0 12px;
}

.reservation-day-head h2 {
  font:800 17px Manrope;
  margin:0;
  color:#111225;
}

.reservation-day-head p {
  margin:4px 0 0;
}

.reservation-day-head .primary {
  padding:0 15px;
  min-height:40px;
  font-size:11px;
}

.reservation-list {
  display:grid;
  gap:9px;
}

.reservation-card {
  padding:15px;
  background:#fff;
  border-radius:17px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  box-shadow:none;
}

.reservation-code {
  font-size:11px;
  font-weight:800;
  color:#6b7741;
  letter-spacing:.03em;
}

.reservation-name {
  font:800 15px Manrope;
  color:#111225;
  margin:4px 0;
}

.reservation-meta {
  font-size:11px;
  color:#858492;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.reservation-time {
  align-self:start;
  background:#eef7c7;
  border-radius:12px;
  padding:9px 11px;
  text-align:center;
  color:#505b30;
}

.reservation-time small {
  display:block;
  font-size:8px;
  font-weight:800;
  letter-spacing:.08em;
}

.reservation-time strong {
  font:800 20px Manrope;
}

.reservation-status {
  display:inline-flex;
  padding:5px 8px;
  border-radius:8px;
  font-size:9px;
  font-weight:800;
  margin-top:8px;
}

.reservation-status.pending {
  background:#f5f0d9;
  color:#826b21;
}

.reservation-status.seated {
  background:#e6f3e9;
  color:#397b55;
}

.reservation-status.cancelled {
  background:#f8e9eb;
  color:#a64f5c;
}

.reservation-actions {
  grid-column:1/-1;
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  padding-top:8px;
  border-top:1px solid #f0eff2;
}

.reservation-actions button {
  min-height:32px;
  padding:0 11px;
  border:0;
  border-radius:9px;
  font-size:10px;
  font-weight:800;
  background:#f3f2f7;
  color:#55536d;
}

.reservation-actions .seat-action {
  background:#111225;
  color:#fff;
}

.reservation-actions .cancel-action {
  background:#f8e9eb;
  color:#a64f5c;
}

.reservation-empty {
  padding:28px 18px;
  background:#fff;
  border-radius:17px;
  text-align:center;
  color:#8b8997;
  font-size:12px;
}

.reservation-empty strong {
  display:block;
  color:#111225;
  font:800 15px Manrope;
  margin-bottom:5px;
}

@media(max-width:420px) {
  .reservation-day {
    min-height:42px;
    border-radius:9px;
  }
  .reservation-calendar {
    gap:4px;
    padding:9px;
  }
}

/* TOP HAMBURGER NAVIGATION */

.app {
  padding-bottom:28px;
}

.top-actions {
  display:flex;
  align-items:center;
  gap:10px;
}

.menu-toggle {
  width:42px;
  height:42px;
  border:0;
  border-radius:14px;
  background:#111225;
  color:#fff;
  display:grid;
  place-items:center;
}

.menu-toggle svg {
  width:21px;
  height:21px;
}

.menu-backdrop {
  position:fixed;
  inset:0;
  z-index:60;
  background:rgba(17,18,37,.32);
  backdrop-filter:blur(3px);
  opacity:0;
  visibility:hidden;
  transition:opacity .22s ease,visibility .22s ease;
}

.menu-backdrop.show {
  opacity:1;
  visibility:visible;
}

.menu-drawer {
  position:fixed;
  z-index:61;
  top:0;
  right:0;
  width:min(310px,86vw);
  height:100dvh;
  padding:calc(24px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom));
  background:#fff;
  border-radius:24px 0 0 24px;
  box-shadow:-16px 0 45px rgba(17,18,37,.14);
  transform:translateX(105%);
  transition:transform .28s cubic-bezier(.2,.8,.2,1);
  display:flex;
  flex-direction:column;
}

.menu-drawer.show {
  transform:translateX(0);
}

.drawer-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:4px 2px 22px;
  border-bottom:1px solid #f0eff2;
}

.drawer-head>div {
  display:flex;
  flex-direction:column;
  gap:5px;
}

.drawer-kicker {
  font-size:9px;
  font-weight:800;
  letter-spacing:.14em;
  color:#9997a4;
}

.drawer-head strong {
  font:800 17px Manrope;
  color:#111225;
}

.drawer-close {
  width:34px;
  height:34px;
  border:0;
  border-radius:11px;
  background:#f4f3f7;
  color:#55536d;
  font-size:23px;
}

.drawer-nav {
  display:grid;
  gap:7px;
  padding-top:17px;
}

.drawer-item {
  border:0;
  border-radius:13px;
  background:transparent;
  color:#777585;
  display:flex;
  align-items:center;
  text-align:left;
  font-weight:700;
}

.drawer-foot {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:auto;
  padding:15px 4px 0;
  border-top:1px solid #f0eff2;
  color:#aaa8b2;
  font-size:9px;
  font-weight:800;
  letter-spacing:.13em;
}

.drawer-guide-icon {
  display:grid;
  width:36px;
  height:36px;
  flex:0 0 36px;
  place-items:center;
  border:0;
  border-radius:11px;
  background:#f4f3f7;
  color:#777585;
}

.drawer-guide-icon svg {
  width:19px;
  height:19px;
}

.drawer-guide-icon.active {
  background:#eef7c7;
  color:#111225;
}

.drawer-guide-icon:focus-visible {
  outline:2px solid #111225;
  outline-offset:3px;
}

.fab {
  bottom:24px;
}

.bottomnav {
  display:none!important;
}

/* SOFT BLACK CARD SHADOWS — Orvio-inspired depth */

:root {
  --card-shadow:0 5px 12px rgba(0,0,0,.07),0 14px 28px rgba(0,0,0,.09);
  --card-shadow-strong:0 8px 16px rgba(0,0,0,.10),0 18px 32px rgba(0,0,0,.13);
}

.hero,.metric,.guest,.empty,.settings-card,.reservation-toolbar,
.reservation-calendar,.reservation-card,.reservation-empty,
.history-date,.search input,.date,.quick .primary,.quick .secondary {
  box-shadow:var(--card-shadow);
}

.hero {
  box-shadow:var(--card-shadow-strong);
}

.metric,.guest,.settings-card,.reservation-card {
  transition:box-shadow .22s ease,transform .22s ease;
}

.metric:active,.guest:active,.reservation-card:active {
  box-shadow:var(--card-shadow-strong);
}

.empty,.reservation-empty {
  box-shadow:var(--card-shadow);
}

/* Keep overlays and controls visually separate from content cards */

.calendar-dialog,.sheet,.menu-drawer {
  box-shadow:0 18px 48px rgba(0,0,0,.18);
}

@media(prefers-reduced-motion:reduce) {
  .metric,.guest,.reservation-card {
    transition:none;
  }
}

/* DRAGGABLE BOTTOM SHEET HANDLE */



.handle {
  display:block;
  width:64px;
  height:28px;
  padding:0;
  border:0;
  background:transparent;
  border-radius:20px;
  margin:0 auto 8px;
  position:relative;
  cursor:grab;
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
}

.handle:after {
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:38px;
  height:5px;
  border-radius:99px;
  background:#dedde5;
  transform:translate(-50%,-50%);
  transition:width .18s ease,background .18s ease;
}

.handle:active {
  cursor:grabbing;
}

.handle:active:after {
  width:48px;
  background:#c9c7d3;
}

@media(prefers-reduced-motion:reduce) {
  .handle:after {
    transition:none;
  }
}

/* FIX: centered, full touch target and reliable swipe-to-dismiss */

.sheet-handle-row {
  width:100%!important;
  min-height:38px!important;
  margin:0 0 7px!important;
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  text-align:center!important;
}

.sheet-handle-row .handle {
  appearance:none!important;
  -webkit-appearance:none!important;
  display:block!important;
  position:relative!important;
  left:auto!important;
  top:auto!important;
  flex:0 0 72px!important;
  width:72px!important;
  min-width:72px!important;
  max-width:72px!important;
  height:34px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:20px!important;
  background:transparent!important;
  touch-action:none!important;
  user-select:none!important;
  -webkit-user-select:none!important;
}

.sheet-handle-row .handle:after {
  content:""!important;
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  display:block!important;
  width:42px!important;
  height:5px!important;
  border-radius:99px!important;
  background:#d5d3dd!important;
  transform:translate(-50%,-50%)!important;
}

.sheet-handle-row .handle:active:after {
  width:50px!important;
  background:#bcb9c9!important;
}

.sheet {
  touch-action:pan-y;
}

@media(prefers-reduced-motion:reduce) {
  .sheet-handle-row .handle:after {
    transition:none!important;
  }
}

/* CONSISTENT STAT CARD TITLE + ICON SPACING */

.metric-top {
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:9px;
  min-height:32px;
}

.metric-top .eyebrow {
  flex:0 1 auto;
  min-width:0;
  margin:0;
  line-height:1.25;
  white-space:nowrap;
}

.metric-top .metric-icon {
  flex:0 0 32px;
  width:32px;
  height:32px;
  margin:0;
}

.metric-icon svg {
  width:16px;
  height:16px;
}

/* SUBTLE DEPTH FOR ADD-GUEST SHEET */

#sheet .field input,
#sheet .field select,
#sheet .field textarea,
#sheet .pack-control {
  box-shadow:0 2px 5px rgba(17,18,37,.045),0 1px 2px rgba(17,18,37,.035);
}

#sheet .pack-control button {
  box-shadow:0 1px 3px rgba(17,18,37,.07);
}

#sheet .seg button {
  box-shadow:0 2px 5px rgba(17,18,37,.045);
}

#sheet .seg button.selected {
  box-shadow:0 3px 8px rgba(91,81,142,.11),inset 0 0 0 1px rgba(91,81,142,.035);
}

#sheet .sheet-actions .secondary {
  box-shadow:0 2px 6px rgba(17,18,37,.07);
}

#sheet .close {
  box-shadow:0 2px 6px rgba(17,18,37,.07);
}

/* MICRO-INTERACTIONS: PACK COUNT + INITIAL STATUS SWITCH */

.pack-control strong {
  display:inline-block;
  min-width:24px;
  text-align:center;
  transform-origin:center;
}

.pack-control strong.pack-number-animate {
  animation:packNumberPop .26s cubic-bezier(.2,.8,.25,1);
}

@keyframes packNumberPop {
  0% {
    opacity:.35;
    transform:translateY(6px) scale(.82);
    filter:blur(2px);
  }
  65% {
    opacity:1;
    transform:translateY(-2px) scale(1.09);
    filter:blur(0);
  }
  100% {
    opacity:1;
    transform:translateY(0) scale(1);
    filter:blur(0);
  }
}

.seg {
  position:relative;
  isolation:isolate;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  padding:0;
}

.seg::before {
  content:"";
  position:absolute;
  z-index:0;
  top:0;
  bottom:0;
  left:0;
  width:calc((100% - 8px)/2);
  border-radius:12px;
  background:#eef7c7;
  box-shadow:0 3px 8px rgba(17,18,37,.09),inset 0 0 0 1px rgba(116,140,58,.12);
  transform:translateX(0);
  transition:transform .28s cubic-bezier(.2,.8,.2,1),background-color .2s ease;
  pointer-events:none;
}

.seg[data-selected="seated"]::before,
.seg[data-selected="done"]::before {
  transform:translateX(calc(100% + 8px));
}

.seg button {
  position:relative;
  z-index:2;
  min-width:0;
  pointer-events:auto;
  touch-action:manipulation;
  min-height:46px;
  border:1px solid #dfe3d5!important;
  border-radius:13px;
  background:#fff!important;
  color:#656879!important;
  font-weight:800;
  box-shadow:0 3px 8px rgba(17,18,37,.075),inset 0 1px 0 rgba(255,255,255,.9);
  transition:background-color .2s ease,border-color .2s ease,color .2s ease,transform .16s ease,box-shadow .2s ease;
  -webkit-tap-highlight-color:transparent;
}

.seg button.selected {
  background:#eef7c7!important;
  border-color:#c8dc83!important;
  color:#414b25!important;
  box-shadow:0 4px 10px rgba(116,140,58,.16),inset 0 0 0 1px rgba(116,140,58,.08);
}

.seg button:active {
  transform:scale(.97);
  box-shadow:0 1px 3px rgba(17,18,37,.12);
}

@media(prefers-reduced-motion:reduce) {
  .pack-control strong.pack-number-animate {
    animation:none;
  }
  .seg::before {
    transition:none;
  }
}

/* WAITING LIST CARD — ORIGINAL LAYOUT, FULL-HEIGHT TICKET */

.guest {
  position:relative;
  display:block;
  min-height:104px;
  padding:13px 13px 13px 68px;
}

.guest .ticket {
  position:absolute;
  left:13px;
  top:13px;
  bottom:13px;
  width:44px;
  height:auto;
  min-height:0;
  box-shadow:0 3px 9px rgba(65,76,33,.10);
}

.guest .guest-row {
  display:flex;
  align-items:center;
  gap:11px;
  min-width:0;
}

.guest .guest-main {
  min-width:0;
  flex:1;
}

.guest .guest-bottom {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:11px 0 0;
  gap:8px;
  flex-wrap:wrap;
}

/* GUEST DETAIL — CLEAR, SOFT CARD DEPTH */

#sheet .detail-ticket {
  box-shadow:0 8px 20px rgba(17,18,37,.11),0 2px 5px rgba(17,18,37,.055);
}

#sheet .detail-cell {
  box-shadow:0 4px 11px rgba(17,18,37,.07),0 1px 3px rgba(17,18,37,.035);
}

#sheet .sheet-actions button {
  box-shadow:0 3px 8px rgba(17,18,37,.075),0 1px 2px rgba(17,18,37,.035);
}

#sheet .sheet-actions .primary {
  box-shadow:0 4px 10px rgba(17,18,37,.12),0 1px 3px rgba(17,18,37,.055);
}

/* QUEUE ACTION BUTTON — TACTILE PRESS FEEDBACK */

.guest .actions .mini {
  transition:transform .16s ease,filter .16s ease,box-shadow .16s ease;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}

.guest .actions .mini:active {
  transform:scale(.94);
  filter:brightness(.96);
  box-shadow:0 1px 3px rgba(17,18,37,.10);
}

/* BOTTOM SHEET — NATIVE CONTENT SCROLL */

#sheet {
  overflow-x:hidden;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-y:contain;
  touch-action:pan-y;
}

/* OPERATIONAL DETAIL — CENTERED MOBILE MODAL */

.hero-detail-trigger {
  cursor:pointer;
  outline:none;
}

.hero-detail-trigger .hero-head {
  min-height:20px;
}

.hero-action {
  position:absolute;
  right:0;
  top:28px;
  width:30px;
  height:30px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#11122512;
  color:#111225;
  font-size:17px;
  transition:transform .2s ease,background .2s ease;
}

.hero-detail-trigger:active .hero-action {
  transform:translateY(2px);
  background:#11122520;
}

.hero-detail-trigger:focus-visible {
  outline:3px solid #aaa3e8;
  outline-offset:4px;
}



.sheet.operational-modal {
  top:50%;
  bottom:auto;
  left:50%;
  width:min(92vw,760px);
  max-height:88dvh;
  overflow-y:auto;
  overflow-x:hidden;
  padding:17px 17px calc(18px + env(safe-area-inset-bottom));
  border-radius:27px;
  background:#fff;
  transform:translate(-50%,-46%) scale(.97);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  box-shadow:0 22px 65px rgba(17,18,37,.22);
  transition:transform .28s cubic-bezier(.2,.8,.2,1),opacity .22s ease,visibility .22s ease;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}

.sheet.operational-modal.show {
  transform:translate(-50%,-50%) scale(1);
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.sheet.operational-modal .sheet-handle-row {
  min-height:24px!important;
  margin:0 0 7px!important;
}

.sheet.operational-modal .sheet-handle-row .handle {
  height:24px!important;
}


/* DESKTOP — position the detail popup inside the workspace below the fixed header */
@media (min-width: 900px) {
  .sheet.operational-modal {
    top: calc(50% + 43px);
    max-height: calc(100dvh - 212px);
  }
}

.operational-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin:0 1px 17px;
}

.operational-head h2 {
  font:800 21px Manrope,sans-serif;
  letter-spacing:-.04em;
  color:#111225;
  margin:0;
}

.operational-head p {
  font-size:11px;
  font-weight:600;
  color:#858494;
  margin:5px 0 0;
}

.operational-close {
  width:38px;
  height:38px;
  border-radius:13px;
  font-size:23px;
  flex:none;
}

.operational-summary {
  position:relative;
  display:grid;
  grid-template-columns:minmax(100px,.72fr) minmax(0,1.5fr);
  gap:12px;
  padding:17px 15px;
  border-radius:21px;
  background:linear-gradient(125deg,#eff9c9,#d9ee8c 70%,#cce77b);
  color:#111225;
  overflow:hidden;
  box-shadow:0 7px 17px rgba(89,111,42,.12);
}

.operational-summary:after {
  content:"";
  position:absolute;
  width:150px;
  height:150px;
  border:1px solid #1112250b;
  border-radius:50%;
  right:-54px;
  top:-85px;
  box-shadow:0 0 0 22px #11122506,0 0 0 45px #11122504;
}

.operational-summary-main {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  border-right:1px solid #11122520;
  padding-right:10px;
}

.operational-summary-main>span {
  font-size:11px;
  font-weight:800;
}

.operational-summary-main>strong {
  font:800 42px Manrope;
  letter-spacing:-.06em;
  line-height:1.15;
  margin:3px 0;
}

.operational-summary-main>small {
  font-size:10px;
  font-weight:800;
  color:#398b4e;
}

.operational-summary-main>small span {
  display:block;
  color:#62684a;
  font-weight:600;
  margin-top:2px;
}

.trend-down {
  color:#b65b60!important;
}

.operational-summary-meta {
  display:grid;
  align-content:center;
  gap:0;
  padding-top:12px;
}

.operational-summary-meta>div {
  display:grid;
  grid-template-columns:19px minmax(0,1fr) auto;
  align-items:center;
  gap:6px;
  padding:8px 0;
  border-bottom:1px solid #11122512;
}

.operational-summary-meta>div:last-child {
  border-bottom:0;
}

.operational-summary-meta span:not(.summary-icon) {
  font-size:10px;
  color:#424638;
}

.operational-summary-meta b {
  font-size:11px;
  font-weight:800;
  white-space:nowrap;
}

.summary-icon {
  font-size:15px;
  color:#30354a;
}

.operational-live {
  position:absolute;
  right:12px;
  top:11px;
  display:flex;
  align-items:center;
  gap:5px;
  padding:5px 8px;
  border-radius:20px;
  background:#ffffff9c;
  font-size:8px;
  font-weight:800;
  color:#22251b;
}

.operational-live i {
  width:6px;
  height:6px;
  border-radius:50%;
  background:#16a34a;
}

.operational-chart-card {
  margin-top:15px;
  padding:14px 13px 11px;
  border-radius:20px;
  background:#fff;
  box-shadow:0 5px 18px rgba(17,18,37,.07);
}

.operational-section-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.operational-section-head h3 {
  font:800 14px Manrope,sans-serif;
  letter-spacing:-.025em;
  color:#111225;
  margin:0;
}

.chart-toggle {
  display:flex;
  align-items:center;
  padding:3px;
  border-radius:30px;
  background:#f1f0f7;
}

.chart-toggle button {
  min-width:53px;
  height:29px;
  padding:0 10px;
  border:0;
  border-radius:22px;
  background:transparent;
  color:#777587;
  font-size:10px;
  font-weight:800;
}

.chart-toggle button.active {
  background:#111225;
  color:#fff;
}

.operational-chart {
  height:142px;
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:7px;
  align-items:end;
  padding:14px 2px 0;
}

.operational-chart-hours {
  grid-template-columns:none;
  grid-auto-flow:column;
  grid-auto-columns:44px;
  overflow-x:auto;
  padding-bottom:6px;
}

.operational-bar-column {
  height:100%;
  display:grid;
  grid-template-rows:15px minmax(0,1fr) 19px;
  gap:4px;
  justify-items:center;
  min-width:0;
}

.operational-bar-column>b {
  font-size:10px;
  color:#111225;
}

.operational-bar-track {
  width:100%;
  height:100%;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  border-bottom:1px solid #e8e7ed;
}

.operational-bar-track i {
  display:block;
  width:min(100%,42px);
  min-height:3px;
  border-radius:9px 9px 2px 2px;
  background:linear-gradient(180deg,#83b94d,#d9ee8c);
  transition:height .25s ease;
}

.operational-bar-column small {
  font-size:9px;
  font-weight:700;
  color:#898797;
}

.operational-guests {
  margin-top:18px;
}

.operational-list-head {
  margin-bottom:10px;
}

.operational-list-head small {
  display:block;
  margin-top:3px;
  color:#92909d;
  font-size:10px;
}

.operational-list-total {
  width:29px;
  height:29px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#eef7c7;
  color:#414c21;
  font-size:11px;
  font-weight:800;
}

.operational-list-tools {
  display:grid;
  grid-template-columns:minmax(0,1fr) 104px;
  align-items:start;
  gap:8px;
  margin-bottom:9px;
}

.operational-search {
  height:39px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:0 10px;
  border-radius:11px;
  background:#f6f6f3;
  color:#8a8997;
}

.operational-search>span {
  font-size:20px;
  line-height:1;
}

.operational-search input {
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:#111225;
  font-size:10px;
}

/* BAGIAN: Filter status pada daftar detail operasional */
.operational-filter-wrap {
  position: relative;
  z-index: 12;
  width: 100%;
  min-width: 0;
}

.operational-filter-trigger {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 39px;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid rgba(17,18,37,.06);
  border-radius: 11px;
  background: #f6f6f3;
  color: #55536d;
  font: 700 10px 'DM Sans',sans-serif;
  line-height: 1;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.operational-filter-trigger svg {
  display: block;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}

.operational-filter-trigger[aria-expanded="true"] {
  border-color: #dfe5c6;
  background: #eef4d6;
  color: #414c28;
}

.operational-filter-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.operational-filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: grid;
  width: max-content;
  min-width: 100%;
  max-width: min(190px,70vw);
  max-height: min(280px,42vh);
  gap: 3px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(17,18,37,.07);
  border-radius: 13px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 12px 28px rgba(17,18,37,.16);
  transform-origin: top right;
  animation: operationalFilterIn .16s ease both;
}

.operational-filter-menu[hidden] {
  display: none !important;
}

.operational-filter-menu button {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #55536d;
  text-align: left;
  font: 700 10px 'DM Sans',sans-serif;
  line-height: 1.2;
  white-space: nowrap;
  -webkit-appearance: none;
  appearance: none;
}

.operational-filter-menu button[aria-selected="true"] {
  background: #eef4d6;
  color: #414c28;
}

.operational-filter-menu button:active {
  background: #e7edcf;
}

@keyframes operationalFilterIn {
  from { opacity: 0; transform: translateY(-4px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.operational-guest-list {
  display:grid;
  gap:8px;
}

.operational-guest-row {
  width:100%;
  min-height:62px;
  display:grid;
  grid-template-columns:70px minmax(0,1fr) auto 13px;
  align-items:center;
  gap:8px;
  padding:8px 9px;
  border:0;
  border-radius:15px;
  background:#fff;
  box-shadow:0 4px 13px rgba(17,18,37,.07);
  text-align:left;
  color:#111225;
}

.operational-ticket {
  min-height:39px;
  padding:0 6px;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#eef7c7;
  color:#424c28;
  font:800 10px Manrope;
  white-space:nowrap;
}

.operational-guest-copy {
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:4px;
}

.operational-guest-copy b {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font:800 12px Manrope;
}

.operational-guest-copy small,.operational-guest-state small {
  font-size:9px;
  color:#858494;
  white-space:nowrap;
}

.operational-guest-state {
  display:flex;
  align-items:flex-end;
  flex-direction:column;
  gap:4px;
}

.operational-guest-state .status {
  padding:4px 7px;
  font-size:8px;
}

.operational-chevron {
  font-size:20px;
  color:#777587;
}

.operational-empty {
  padding:20px 12px;
  text-align:center;
  border-radius:14px;
  background:#f8f8f5;
  color:#898797;
  font-size:11px;
}

.operational-all-button {
  width:100%;
  min-height:49px;
  margin-top:16px;
  padding:0 16px;
  border:0;
  border-radius:15px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  background:#111225;
  color:#fff;
  font-size:12px;
  font-weight:800;
  transition:transform .18s ease,background .18s ease;
}

.operational-all-button:active {
  transform:scale(.985);
  background:#292940;
}

@media(max-width:380px) {
  .sheet.operational-modal {
    width:94vw;
    padding-left:13px;
    padding-right:13px;
    border-radius:23px;
  }
  .operational-summary {
    grid-template-columns:minmax(82px,.62fr) minmax(0,1.6fr);
    gap:9px;
    padding:15px 11px;
  }
  .operational-summary-main>strong {
    font-size:36px;
  }
  .operational-summary-meta>div {
    grid-template-columns:16px minmax(0,1fr) auto;
    gap:4px;
  }
  .operational-summary-meta span:not(.summary-icon) {
    font-size:9px;
  }
  .operational-summary-meta b {
    font-size:10px;
  }
  .operational-live {
    right:8px;
    top:8px;
    font-size:7px;
  }
  .operational-chart {
    gap:4px;
  }
  .operational-guest-row {
    grid-template-columns:62px minmax(0,1fr) auto 10px;
    gap:6px;
    padding:7px;
  }
  .operational-ticket {
    font-size:9px;
  }
  .operational-guest-copy b {
    font-size:11px;
  }
}

@media(prefers-reduced-motion:reduce) {
  .hero-action,.sheet.operational-modal,.operational-bar-track i,.operational-all-button {
    transition:none;
  }
}

/* DRAWER NAV — LUCIDE ICON SYSTEM
    All newly added interface icons must use Lucide SVG paths.
*/

.drawer-close {
  display:grid;
  place-items:center;
  flex:none;
}

.drawer-close svg {
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.drawer-item {
  position:relative;
  gap:13px;
  min-height:54px;
  height:54px;
  padding:0 14px;
  font-size:14px;
  transition:background .2s ease,color .2s ease,transform .18s ease;
}

.drawer-item>svg:not(.drawer-chevron) {
  width:19px;
  height:19px;
  flex:none;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.drawer-item>span {
  flex:1;
}

.drawer-item .drawer-chevron {
  width:17px;
  height:17px;
  flex:none;
  fill:none;
  stroke:#aaa8b2;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.drawer-item.active .drawer-chevron {
  display:none;
}

.drawer-item:active {
  transform:scale(.985);
}

@media(prefers-reduced-motion:reduce) {
  .drawer-item {
    transition:none;
  }
}

/* FLOATING QUICK MENU — MOBILE ACTIONS
    Icon paths in this menu follow the Lucide Icons family.
*/

.fab {
  z-index:15;
}

.fab svg {
  transition:transform .28s cubic-bezier(.2,.8,.2,1);
}

.fab.is-open svg {
  transform:rotate(45deg);
}

.quick-menu-backdrop {
  position:fixed;
  inset:0;
  z-index:13;
  background:rgba(17,18,37,.08);
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .2s ease,visibility .2s ease;
}

.quick-menu-backdrop.show {
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.quick-menu {
  transform-origin:bottom right;
}

.quick-menu-heading {
  padding:8px 11px 7px;
  color:#a09eaa;
  font-size:9px;
  font-weight:800;
  letter-spacing:.14em;
}

.quick-menu-item {
  text-align:left;
  font-size:13px;
  font-weight:700;
}

.quick-menu-item+ .quick-menu-item {
  margin-top:2px;
}

.quick-menu-item>svg:first-child {
  width:19px;
  height:19px;
  flex:none;
  fill:none;
  stroke:#777587;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.quick-menu-item>span {
  flex:1;
}

.quick-menu-chevron {
  width:16px;
  height:16px;
  flex:none;
  fill:none;
  stroke:#aaa8b2;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

@media(prefers-reduced-motion:reduce) {
  .fab svg,.quick-menu-backdrop,.quick-menu,.quick-menu-item {
    transition:none;
  }
}

/* Floating action stack: visible actions determine the height, not DOM indexes. */
.quick-menu-backdrop {
  background: rgba(17,18,37,.08);
  backdrop-filter: blur(2px) saturate(.96);
  -webkit-backdrop-filter: blur(2px) saturate(.96);
}

.quick-menu {
  position: fixed;
  z-index: 16;
  right: calc(max(20px, (100vw - 520px) / 2 + 20px) - 5px);
  bottom: calc(82px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 10px;
  width: max-content;
  max-width: calc(100vw - 24px);
  height: auto;
  max-height: calc(100dvh - 98px - env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: none;
  transition: opacity .18s ease, visibility .18s ease;
}

.quick-menu.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.quick-menu[data-context="stock"] {
  flex-direction: column;
}

.quick-menu-heading {
  display: none;
}

.quick-menu-item {
  position: relative;
  display: flex;
  width: max-content;
  min-height: 48px;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row-reverse;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #17172a;
  opacity: 0;
  transform: translateY(9px) scale(.94);
  transform-origin: right center;
  transition: opacity .16s ease, transform .22s cubic-bezier(.2,.8,.2,1);
  -webkit-tap-highlight-color: transparent;
}

.quick-menu-item + .quick-menu-item { margin-top: 0; }

.quick-menu.show .quick-menu-item {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: calc(var(--quick-order, 0) * 35ms);
}

.quick-menu-item > svg:first-child {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  padding: 12px;
  border: 1px solid rgba(30,32,50,.07);
  border-radius: 50%;
  background: #fff;
  color: #202238;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-menu-item > span {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.97);
  color: #25263a;
  box-shadow: 0 2px 8px rgba(17,18,37,.08);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.quick-menu-chevron {
  display: none;
}

.quick-menu-item:active {
  background: transparent;
  transform: scale(.97);
}

@media (hover: hover) and (pointer: fine) {
  .quick-menu-item:hover > svg:first-child {
    background: var(--ui-lime-soft, #eef7c7);
  }
}

.quick-menu-item:focus-visible { outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .fab svg,
  .quick-menu-backdrop,
  .quick-menu,
  .quick-menu-item {
    transition: none;
  }
}

/* Keep labels clear while removing the individual button outlines */
#sheet .seg button,
#sheet .seg button.selected {
  border:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

/* BAGIAN: Animasi liquid toggle untuk status awal tamu */
#sheet .seg.is-switching::before {
  transition: none;
  will-change: transform;
}

#sheet .seg.is-switching[data-selected="seated"]::before {
  transform-origin: left center;
  animation: liquid-toggle-right 0.16s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#sheet .seg.is-switching[data-selected="waiting"]::before {
  transform-origin: right center;
  animation: liquid-toggle-left 0.16s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes liquid-toggle-right {
  0% { transform: translateX(0) scaleX(1); }
  34% { transform: translateX(calc(50% + 4px)) scaleX(1.18); }
  66% { transform: translateX(calc(100% + 8px)) scaleX(1.02); }
  100% { transform: translateX(calc(100% + 8px)) scaleX(1); }
}

@keyframes liquid-toggle-left {
  0% { transform: translateX(calc(100% + 8px)) scaleX(1); }
  34% { transform: translateX(calc(50% + 4px)) scaleX(1.18); }
  66% { transform: translateX(0) scaleX(1.02); }
  100% { transform: translateX(0) scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  #sheet .seg.is-switching::before {
    animation: none;
    transition: none;
  }
}

/* BAGIAN: Animasi pemilihan tanggal pada kalender reservasi */
.reservation-day {
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
  touch-action: manipulation;
}

.reservation-day:active {
  transform: scale(.94);
}

.reservation-day.selected {
  animation: reservation-date-pop .2s ease-out both;
}

.reservation-list.is-changing {
  animation: reservation-list-enter .2s ease-out both;
}

@keyframes reservation-date-pop {
  0% { transform: scale(.92); }
  65% { transform: scale(1.045); }
  100% { transform: scale(1); }
}

@keyframes reservation-list-enter {
  from { opacity: .45; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .reservation-day,
  .reservation-list.is-changing {
    animation: none;
    transition: none;
  }
}

/* BAGIAN: Tata letak ringkas pengaturan Seating Time pada layar mobile */
.seating-settings-card {
  overflow: hidden;
}

.seating-setting-row {
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
}

.seating-setting-row > .setting-icon {
  flex: 0 0 34px;
  margin-top: 0;
}

.seating-setting-row > .setting-copy {
  min-width: 0;
  width: 100%;
}

.seating-setting-control {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
}

.seating-stepper {
  display: grid;
  grid-template-columns: 28px minmax(72px, 1fr) 28px;
  align-items: center;
  gap: 5px;
  flex: 0 1 150px;
  width: 150px;
  max-width: 150px;
  min-width: 0;
}

.seating-stepper input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 38px;
  box-sizing: border-box;
  padding: 0 6px;
  border: 1px solid #e5e3eb;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: #17172a;
  font: 700 16px Manrope, sans-serif;
  text-align: center;
}

.seating-stepper input:focus {
  border-color: #aaa3e8;
  box-shadow: 0 0 0 3px rgba(170, 163, 232, .14);
}

.seating-setting-control .seating-step-button {
  display: grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: #f0eff8;
  color: #55536d;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.seating-setting-control > span {
  flex: 0 0 auto;
  color: #777585;
  font-size: 12px;
  white-space: nowrap;
}

.seating-setting-control > button:not(.seating-step-button) {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  background: #f0eff8;
  color: #55536d;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

@media (max-width: 380px) {
  .seating-setting-row {
    gap: 9px;
    padding: 16px 12px;
  }
  .seating-stepper {
    grid-template-columns: 26px minmax(64px, 1fr) 26px;
    gap: 4px;
    flex-basis: 132px;
    width: 132px;
    max-width: 132px;
  }
  .seating-setting-control .seating-step-button {
    width: 26px;
    min-width: 26px;
  }
  .seating-setting-control {
    gap: 5px;
  }
  .seating-setting-control > span {
    font-size: 11px;
  }
  .seating-setting-control > button:not(.seating-step-button) {
    padding: 0 7px;
  }
}

/* Workspace identity: Master Barang and its child features */
.brandmark.is-master {
  background: #17172a;
  box-shadow: 0 5px 12px rgba(23,23,42,.16);
}
.brandmark.is-master svg {
  width: 22px;
  height: 22px;
}

/* App-wide select styling: consistent dropdowns without Android picker UI */
.app-select-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
}

.app-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
.app-select-trigger {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 13px;
  border: 1px solid var(--line, #e7e7e2);
  border-radius: 12px;
  background: #fff;
  color: var(--ink, #17172a);
  font: 600 16px 'DM Sans', sans-serif;
  text-align: left;
  box-shadow: 0 2px 5px rgba(17,18,37,.045), 0 1px 2px rgba(17,18,37,.035);
  -webkit-tap-highlight-color: transparent;
}
.app-select-trigger:disabled { opacity: .55; }
.app-select-trigger:focus-visible {
  outline: 2px solid rgba(126,115,177,.45);
  outline-offset: 2px;
}
.app-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-select-arrow {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}
.app-select-wrap.is-open .app-select-arrow { transform: rotate(180deg); }
.app-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: min(240px, 34dvh);
  overflow-y: auto;
  padding: 5px;
  border: 1px solid rgba(23,23,42,.08);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(17,18,37,.12), 0 2px 5px rgba(17,18,37,.045);
  overscroll-behavior: contain;
}
.app-select-menu[hidden] { display: none !important; }
.app-select-wrap.opens-up .app-select-menu {
  top: auto;
  bottom: calc(100% + 6px);
}
.app-select-option {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: #fff;
  color: var(--ink, #17172a);
  font: 500 16px 'DM Sans', sans-serif;
  text-align: left;
}
.app-select-option + .app-select-option {
  border-top: 1px solid #f0f0ec;
}
.app-select-option.is-selected {
  background: #f2f6e5;
  color: #526b36;
  font-weight: 700;
}
.app-select-option:disabled { color: #a5a5ad; }
.app-select-option:active { background: #edf2df; }
@media (prefers-reduced-motion: reduce) {
  .app-select-arrow { transition: none; }
}

/* Soft focus layer while a custom dropdown is open */
.app-select-dim {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(23, 23, 42, .10);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  pointer-events: none;
  animation: appSelectDimIn .16s ease-out both;
}
.app-select-wrap.is-open { z-index: 120; }
.app-select-menu { z-index: 121; }
@keyframes appSelectDimIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .app-select-dim { animation: none; }
}

/* Consistent placeholder treatment across every form in the app */
input::placeholder,
textarea::placeholder,
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: #a3a3aa;
  opacity: .78;
  font-weight: 400;
  font-style: normal;
}


/* Respect the native hidden attribute even when component styles set display:flex. */
.drawer-item[hidden] {
  display: none !important;
}


/* FAB shape: keep the existing size, placement, colors, and behavior. */
.fab {
  border-radius: 50%;
}


/* Calendar date hover feedback */
@media (hover: hover) and (pointer: fine) {
  .reservation-day:not(.outside),
  .calendar-day:not(.outside):not(:disabled) {
    cursor: pointer;
    transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease;
  }

  .reservation-day:not(.outside):not(.selected):hover,
  .calendar-day:not(.outside):not(.selected):not(:disabled):hover {
    transform: translateY(-2px) scale(1.05);
    background: #eef4d4;
    box-shadow: 0 4px 10px rgba(17, 18, 37, .10);
  }

  .reservation-day.selected:hover,
  .calendar-day.selected:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 10px rgba(17, 18, 37, .14);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reservation-day,
  .calendar-day {
    transition: none;
  }
}


/* DESKTOP — hero summary is informational; operational detail popup remains mobile-only. */
@media (min-width: 900px) {
  .hero-detail-trigger { cursor: default; }
  .hero-detail-trigger .hero-action { display: none; }
  .hero-detail-trigger:focus-visible { outline: none; }
}


/* Keep seated details readable but secondary in the operational guest list. */
.operational-guest-copy > small + small {
  margin-top:-2px;
  color:#858494;
  font-size:8px;
}


/* Bold table number and seating duration in the operational guest list. */
.operational-guest-copy .operational-guest-highlight {
  font-weight:800;
  color:#55566a;
}


/* MOBILE — compact, clickable guide shortcut in the drawer footer. */
.drawer-mobile-guide-button { display: none; }
@media (max-width: 899px) {
  .drawer-foot > span { flex: 1 1 auto; }
  .drawer-mobile-guide-button {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #f4f3f7;
    color: #777585;
    cursor: pointer;
  }
  .drawer-mobile-guide-button svg { width: 20px; height: 20px; }
  .drawer-mobile-guide-button:focus-visible { outline: 2px solid #111225; outline-offset: 3px; }
}


/* GUEST FORM — Smoking / Non Smoking selection */
#sheet .smoking-seg::before { display:none; }
#sheet .smoking-seg button.selected {
  background:#f9dce8!important;
  border-color:#edb5cc!important;
  color:#8f3f62!important;
  box-shadow:0 4px 10px rgba(190,91,133,.14),inset 0 0 0 1px rgba(190,91,133,.08);
}

#sheet .smoking-seg.has-validation-error button {
  border-color:#d45b65!important;
}
#sheet .field-validation-message {
  margin:8px 0 0;
  color:#bd3545;
  font-size:12px;
  font-weight:700;
  line-height:1.5;
}
#sheet .field-validation-message[hidden] { display:none; }


/* Fill the spare guest-detail grid cell with the table-move action. */
.detail-move-table {
  width:100%;
  min-height:48px;
  height:100%;
  border-radius:12px;
}

/* ---------- auth.css ---------- */
/* AUTHENTICATION — matching the ivory / ink Guest Operations workspace */
.auth-screen{position:fixed;z-index:1000;inset:0;display:grid;place-items:center;overflow:hidden;padding:28px 18px 54px;background:radial-gradient(circle at 12% 12%,rgba(223,226,208,.55),transparent 34%),radial-gradient(circle at 92% 88%,rgba(220,221,210,.5),transparent 32%),#f6f6f1;opacity:1;visibility:visible;transition:opacity .28s ease,visibility .28s ease}
.auth-screen.is-hidden{opacity:0;visibility:hidden;pointer-events:none}
body.auth-locked .app{visibility:hidden}
body.auth-ready .app{visibility:visible}
body.auth-ready .auth-screen{display:none}
.auth-orb{position:absolute;pointer-events:none;border:1px solid rgba(23,23,42,.055);border-radius:50%}
.auth-orb-one{width:min(72vw,580px);aspect-ratio:1;top:-34%;right:-19%;box-shadow:0 0 0 34px rgba(255,255,255,.16),0 0 0 70px rgba(255,255,255,.12)}
.auth-orb-two{width:min(56vw,420px);aspect-ratio:1;bottom:-29%;left:-17%;box-shadow:0 0 0 28px rgba(255,255,255,.16),0 0 0 58px rgba(255,255,255,.12)}
.auth-panel{position:relative;z-index:1;width:min(100%,430px);padding:34px;border:1px solid rgba(23,23,42,.07);border-radius:25px;background:rgba(255,255,255,.91);box-shadow:0 24px 70px rgba(23,23,42,.09),0 3px 12px rgba(23,23,42,.035);animation:auth-panel-enter .55s cubic-bezier(.2,.75,.25,1) both;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}
.auth-intro{margin-bottom:27px}
.auth-eyebrow{font-weight:800;letter-spacing:.17em}
.auth-intro h1{margin:10px 0 8px;font:800 clamp(25px,6vw,31px)/1.15 Manrope,sans-serif;letter-spacing:-.045em}
.auth-screen .auth-intro{margin-bottom:18px}
.auth-screen .auth-title{display:flex;align-items:center;gap:.28em;margin:0}
.auth-mascot{position:relative;display:block;width:1.48em;height:1.1em;flex:0 0 1.48em;overflow:visible;padding:0;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;transform-origin:50% 100%;transform:translate3d(0,var(--mascot-lift,0px),0) rotate(var(--mascot-tilt,0deg));transition:transform .2s ease}
/* Crop values are tuned to the mascot PNG built-in whitespace. */
.auth-mascot img{position:absolute;left:-.67em;top:-.83em;width:2.77em;height:2.77em;max-width:none;clip-path:inset(30% 25% 30% 25%);mix-blend-mode:multiply;transform-origin:50% 88%;animation:mascot-bob 5s ease-in-out infinite}
.auth-mascot:hover img{animation:mascot-wiggle .55s ease-in-out}
.auth-mascot.is-poked img{animation:mascot-poke .55s cubic-bezier(.3,.9,.4,1.2)}
.auth-mascot:focus-visible{outline:2px solid var(--ui-olive,#777b61);outline-offset:2px;border-radius:5px}
.auth-intro p{max-width:310px;margin:0;color:#85848d;font-size:13px;line-height:1.65}
.auth-form{display:grid;}
.auth-screen .auth-form{gap:9px}
.auth-screen .auth-password-label{margin-top:4px}
.auth-form label{color:#343342;font-weight:700}
.auth-input-wrap{display:flex;align-items:center;gap:11px;padding:0 14px;border:1px solid #e9e8e2;background:#fff;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.auth-input-wrap:focus-within{transform:translateY(-1px)}
.auth-input-wrap>svg{width:18px;height:18px;flex:0 0 18px;fill:none;stroke:#9998a1;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.auth-input-wrap input{width:100%;min-width:0;padding:0;border:0;outline:0;background:transparent;color:#17172a;font:500 13px 'DM Sans',sans-serif;box-shadow:none}
.auth-input-wrap input:focus{outline:0;border:0;box-shadow:none}
.auth-input-wrap:has(input:focus-visible){outline:2px solid var(--ui-olive,#777b61)}
.auth-input-wrap input:-webkit-autofill,
.auth-input-wrap input:-webkit-autofill:hover,
.auth-input-wrap input:-webkit-autofill:focus,
.auth-input-wrap input:-webkit-autofill:active{-webkit-text-fill-color:#17172a;caret-color:#17172a;-webkit-box-shadow:inset 0 0 0 100px #fff !important;box-shadow:inset 0 0 0 100px #fff !important}
.auth-password-label{display:flex;justify-content:space-between;margin-top:7px}
.auth-password-toggle{display:grid;place-items:center;flex:0 0 30px;padding:0;border:0;border-radius:8px;background:transparent;color:#85848d}
.auth-password-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.auth-message{min-height:18px;margin:2px 0 0;color:#b94f55;}
.auth-message.is-success{color:#398267}
.auth-submit{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;margin-top:2px;padding:0 18px;border:0;background:#17172a;color:#fff;font:700 12px 'DM Sans',sans-serif;transition:transform .18s ease,background .18s ease,box-shadow .18s ease}
.auth-submit:hover{background:#29293f;box-shadow:0 10px 22px rgba(23,23,42,.19);transform:translateY(-1px)}
.auth-submit:active{transform:scale(.985)}
.auth-submit:disabled{cursor:wait;opacity:.68}
.auth-submit svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.auth-security-note{display:flex;align-items:center;gap:9px;margin-top:25px;padding-top:19px;border-top:1px solid #f0efe9;color:#92919a;line-height:1.4}
.auth-security-icon{display:grid;place-items:center;width:25px;height:25px;flex:0 0 25px;border-radius:8px;}
.auth-security-icon svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.auth-logout-button{display:grid;place-items:center;width:34px;height:34px;padding:0;border:1px solid rgba(23,23,42,.08);border-radius:50%;background:#fff;color:#5c5b68}
.auth-logout-button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@keyframes auth-panel-enter{from{opacity:0;transform:translateY(16px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-width:480px){.auth-screen{padding:18px 16px 48px}.auth-panel{padding:27px 23px 23px;border-radius:21px}.auth-intro{margin-bottom:23px}}
@media(prefers-reduced-motion:reduce){.auth-screen,.auth-panel,.auth-input-wrap,.auth-submit,.auth-mascot,.auth-mascot img{animation:none!important;transition:none!important;transform:none!important}}

/* LOGIN POLISH — soft depth and restrained motion */
.auth-panel {
  background: #fff;
  border-color: rgba(23, 23, 42, .055);
  box-shadow: 0 14px 34px rgba(23, 23, 42, .055), 0 3px 9px rgba(23, 23, 42, .025);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: auth-panel-settle .48s cubic-bezier(.2, .72, .25, 1) both;
}
.auth-intro,
.auth-form > label,
.auth-form > .auth-input-wrap,
.auth-form > .auth-message,
.auth-form > .auth-submit,
.auth-security-note {
  animation: auth-content-enter .38s ease both;
}
.auth-intro { animation-delay: .04s; }
.auth-form > label:nth-of-type(1) { animation-delay: .08s; }
.auth-form > .auth-input-wrap:nth-of-type(1) { animation-delay: .12s; }
.auth-form > label:nth-of-type(2) { animation-delay: .16s; }
.auth-form > .auth-input-wrap:nth-of-type(2) { animation-delay: .20s; }
.auth-form > .auth-submit { animation-delay: .24s; }
.auth-security-note { animation-delay: .28s; }

.auth-input-wrap {
  min-height: 54px;
  box-shadow: 0 2px 7px rgba(23, 23, 42, .018);
}
.auth-input-wrap input {
  height: 52px;
  font-size: 16px;
}
.auth-submit {
  min-height: 54px;
  box-shadow: 0 5px 13px rgba(23, 23, 42, .11);
}
.auth-submit:active { box-shadow: 0 2px 6px rgba(23, 23, 42, .09); }
.auth-security-note { font-size: 12px; }
.auth-password-toggle { width: 40px; height: 40px; flex-basis: 40px; }

@keyframes auth-panel-settle {
  from { opacity: 0; transform: translateY(12px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes auth-content-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-panel, .auth-intro, .auth-form > label,
  .auth-form > .auth-input-wrap, .auth-form > .auth-message,
  .auth-form > .auth-submit, .auth-security-note {
    animation: none !important;
  }
}


/* In-app logout confirmation dialog */
.logout-confirm-overlay {
  position: fixed;
  z-index: 2500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 18, 37, .48);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity .18s ease;
}
.logout-confirm-overlay.is-visible { opacity: 1; }
.logout-confirm-dialog {
  width: min(100%, 390px);
  padding: 25px;
  border: 1px solid rgba(23, 23, 42, .06);
  border-radius: 23px;
  background: #fff;
  box-shadow: 0 22px 65px rgba(17, 18, 37, .2);
  transform: translateY(10px) scale(.985);
  transition: transform .2s cubic-bezier(.2,.75,.25,1);
}
.logout-confirm-overlay.is-visible .logout-confirm-dialog {
  transform: translateY(0) scale(1);
}
.logout-confirm-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 17px;
  border-radius: 14px;
}
.logout-confirm-mark svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.logout-confirm-dialog h2 {
  margin: 0;
  color: #17172a;
  font: 800 20px/1.25 Manrope, sans-serif;
  letter-spacing: -.035em;
}
.logout-confirm-dialog p {
  margin: 10px 0 23px;
  font: 500 13px/1.6 'DM Sans', sans-serif;
}
.logout-confirm-actions {
  display: flex;
  gap: 10px;
}
.logout-confirm-actions button {
  min-width: 0;
  min-height: 46px;
  flex: 1;
  border: 0;
  border-radius: 13px;
  font: 700 13px 'DM Sans', sans-serif;
}
.logout-confirm-cancel {
  background: #f3f3ef;
  color: #343342;
}
.logout-confirm-accept {
  background: #17172a;
  color: #fff;
  box-shadow: 0 5px 13px rgba(23, 23, 42, .13);
}
.logout-confirm-actions button:focus-visible {
  outline: 3px solid rgba(119, 117, 141, .35);
  outline-offset: 2px;
}
@media (max-width: 480px) {
  .logout-confirm-overlay { padding: 20px; }
  .logout-confirm-dialog { padding: 23px; border-radius: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .logout-confirm-overlay, .logout-confirm-dialog { transition: none; }
}


/* DESKTOP — hide the browser's built-in password reveal control; keep the app toggle. */
@media (min-width: 900px) {
  .auth-input-wrap input[type="password"]::-ms-reveal,
  .auth-input-wrap input[type="password"]::-ms-clear {
    display: none;
  }
}

/* ---------- app-overrides.css ---------- */
/* =========================================================
    RESERVATION FORM — MOBILE CONTROL NORMALIZATION
    Fix native button appearance leaking into custom pickers.
    ========================================================= */
#sheet .field .reservation-picker-trigger,
#sheet .field .reservation-select-trigger {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #fbfcfe;
  color: var(--ink);
  box-shadow: 0 2px 5px rgba(17,18,37,.045), 0 1px 2px rgba(17,18,37,.035);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

#sheet .field .reservation-picker-trigger:active,
#sheet .field .reservation-select-trigger:active {
  background: #f5f7fb;
}

#sheet .field .reservation-picker-trigger svg,
#sheet .field .reservation-select-trigger svg {
  display: block;
  width: 19px;
  height: 19px;
  min-width: 19px;
  fill: none;
  stroke: #8490a5;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#sheet .field .reservation-select {
  position: relative;
  width: 100%;
}

#sheet .field .reservation-select-options {
  position: absolute;
  z-index: 45;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 5px;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20,35,63,.12);
}

#sheet .field .reservation-select-options[hidden] {
  display: none !important;
}

#sheet .field .reservation-select-option {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}

#sheet .field .reservation-select-option.selected {
  background: #f1f5fb;
  color: #2457d7;
  font-weight: 700;
}

#sheet .field .reservation-select-option svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 520px) {
  #sheet .field .reservation-picker-trigger,
  #sheet .field .reservation-select-trigger {
    min-height: 52px;
    height: 52px;
    font-size: 16px;
  }
}

/* =========================================================
    RESERVATION TIME PICKER — MOBILE LAYOUT
    Keep hour/minute controls inside the dialog on narrow screens.
    ========================================================= */
.reservation-time-dialog {
  width: min(92vw, 390px);
  padding: 20px;
}

.reservation-time-display {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  padding: 13px 14px;
  margin-bottom: 16px;
  border-radius: 13px;
  background: #f3f6e8;
  color: #25263a;
}

.reservation-time-display small {
  flex-basis: 100%;
  color: #777d5c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.reservation-time-display strong {
  font: 800 27px Manrope, sans-serif;
  line-height: 1.2;
  color: #111225;
}

.reservation-time-display span {
  font-size: 13px;
  font-weight: 700;
  color: #777d5c;
}

.reservation-time-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.reservation-time-unit {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.reservation-time-unit label {
  color: #555469;
  font-size: 13px;
  font-weight: 700;
}

.reservation-time-unit button {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  border: 1px solid #e7e7eb;
  border-radius: 10px;
  background: #f7f7f5;
  color: #343448;
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.reservation-time-unit input {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 8px;
  border: 1px solid #dedee5;
  border-radius: 10px;
  background: #fff;
  color: #111225;
  font-family: 'DM Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  outline: none;
}

.reservation-time-unit input:focus {
  border-color: #a8b77a;
  box-shadow: 0 0 0 3px rgba(168,183,122,.16);
}

.reservation-time-unit label {
  grid-column: 1 / -1;
}

.reservation-time-unit button:first-of-type,
.reservation-time-unit button:last-of-type {
  grid-row: 2;
}

.reservation-time-unit input {
  grid-row: 2;
}

.reservation-time-unit {
  grid-template-columns: 40px minmax(0, 1fr) 40px;
}

.reservation-time-unit button {
  height: 48px;
}

.reservation-time-unit button:first-of-type { grid-column: 1; }
.reservation-time-unit input { grid-column: 2; }
.reservation-time-unit button:last-of-type { grid-column: 3; }

.reservation-time-dialog .calendar-dialog-actions {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
}

.reservation-time-dialog .calendar-today,
.reservation-time-dialog .calendar-apply {
  min-width: 0;
  min-height: 48px;
  height: 48px;
  padding: 0 12px;
  font-size: 13px;
}

@media (max-width: 360px) {
  .reservation-time-dialog {
    padding: 16px;
  }
  .reservation-time-controls {
    gap: 8px;
  }
  .reservation-time-unit {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
  }
  .reservation-time-unit button {
    height: 44px;
  }
  .reservation-time-unit input {
    height: 44px;
    font-size: 18px;
  }
}

/* Status aktif pada halaman pengaturan. */
.settings-status-active {
  color: #15966a;
  font-size: 10px;
  font-weight: 800;
}

/* Elemen detail dan catatan operasional yang sebelumnya memakai style langsung. */
.text-muted-note {
  color: #9aa5b8;
  font-weight: 500;
}

.pending-guest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-top: 1px solid #f3e5d0;
  font-size: 11px;
}

.detail-name {
  font: 800 18px Manrope;
}

.detail-cell-full {
  grid-column: 1 / -1;
}

.detail-history-heading {
  margin-top: 20px;
  font: 800 13px Manrope;
}

/* Jeda animasi kartu antrean tetap mengikuti urutan daftar. */
.guest[data-stagger-index="0"] {
  animation-delay: 0s;
}

.guest[data-stagger-index="1"] {
  animation-delay: 0.035s;
}

.guest[data-stagger-index="2"] {
  animation-delay: 0.07s;
}

.guest[data-stagger-index="3"] {
  animation-delay: 0.10500000000000001s;
}

.guest[data-stagger-index="4"] {
  animation-delay: 0.14s;
}

.guest[data-stagger-index="5"] {
  animation-delay: 0.17500000000000002s;
}

.guest[data-stagger-index="6"] {
  animation-delay: 0.21000000000000002s;
}

.guest[data-stagger-index="7"] {
  animation-delay: 0.24500000000000002s;
}

/* DEVELOPER OUTLET / DIVISION SWITCHER */
.workspace-scope-switcher{display:flex;align-items:center;gap:8px;min-width:0;margin-left:auto;padding:5px;border:1px solid #e6eaf0;border-radius:13px;background:rgba(255,255,255,.9)}
.workspace-scope-switcher .scope-field>span{padding-left:7px;color:#8993a4;font-size:8px;font-weight:800;letter-spacing:.09em}
.scope-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0;max-width:142px;height:34px;padding:0 10px;border:1px solid transparent;border-radius:9px;text-align:left;font-family:inherit;font-size:11px;font-weight:700;line-height:1.2;cursor:pointer;transition:background .18s ease,border-color .18s ease,box-shadow .18s ease}
.scope-trigger>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.scope-trigger svg{flex:0 0 15px;width:15px;height:15px;color:#68758a;transition:transform .18s ease}
.scope-trigger[aria-expanded="true"]{border-color:#d7deea;background:#fff;box-shadow:0 0 0 3px rgba(93,112,150,.09)}
.scope-trigger[aria-expanded="true"] svg{transform:rotate(180deg)}
.scope-native-select{width:1px!important;height:1px!important;padding:0!important;overflow:hidden!important;white-space:nowrap!important;border:0!important}
.scope-picker-backdrop[hidden],.scope-picker-sheet[hidden]{display:none!important}
.scope-picker-backdrop{position:fixed;z-index:1200;inset:0;background:rgba(18,22,34,.42);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);animation:scopeFadeIn .16s ease both}
.scope-picker-sheet{position:fixed;z-index:1201;left:50%;bottom:max(14px,env(safe-area-inset-bottom));width:min(420px,calc(100% - 28px));max-height:min(72vh,520px);padding:10px 16px 14px;overflow:hidden;transform:translateX(-50%);border:1px solid rgba(255,255,255,.8);border-radius:22px;background:#fffefa;box-shadow:0 22px 70px rgba(18,28,45,.22);animation:scopeSheetIn .22s cubic-bezier(.2,.8,.2,1) both}
.scope-picker-grab{width:34px;height:4px;margin:0 auto 12px;border-radius:99px;background:#d9dde4}
.scope-picker-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 2px 12px}
.scope-picker-eyebrow{color:#9aa1ad;font-size:9px;font-weight:800;letter-spacing:.12em}
.scope-picker-header h2{margin:4px 0 0;color:#171b2c;font-size:19px;font-weight:800;letter-spacing:-.025em}
.scope-picker-close{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border:1px solid #edf0f3;border-radius:12px;background:#f7f8fa;color:#687386}
.scope-picker-close svg{width:18px;height:18px}
.scope-picker-options{max-height:calc(min(72vh,520px) - 90px);overflow-y:auto;overscroll-behavior:contain}
.scope-picker-option{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:56px;padding:0 12px;border:0;border-top:1px solid #eef0f3;background:transparent;color:#30394b;text-align:left;font-size:15px;font-weight:650;cursor:pointer;transition:background .15s ease,color .15s ease}
.scope-picker-option:active{background:#f5f6f2}
.scope-picker-option.is-selected{color:#202a40;background:#f7f8f4}
.scope-picker-check{display:grid;place-items:center;flex:0 0 23px;width:23px;height:23px;border:1.5px solid #cbd2dc;border-radius:50%;color:transparent}
.scope-picker-check svg{width:13px;height:13px;opacity:0}
.scope-picker-option.is-selected .scope-picker-check{border-color:#71845e;background:#71845e;color:#fff}
.scope-picker-option.is-selected .scope-picker-check svg{opacity:1}
body.scope-picker-open{overflow:hidden}
@keyframes scopeFadeIn{from{opacity:0}to{opacity:1}}
@keyframes scopeSheetIn{from{opacity:0;transform:translate(-50%,14px)}to{opacity:1;transform:translate(-50%,0)}}
.division-overview-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:18px}
.division-overview-heading .page-title{margin-top:4px}
.division-overview-refresh{min-height:38px;padding:0 12px;border:1px solid var(--line);border-radius:11px;background:#fff;color:#43536d;font-size:11px;font-weight:700}
.division-overview-list{display:grid;gap:12px}
.division-overview-card{padding:16px;border:1px solid #e8edf3;border-radius:17px;background:#fff;box-shadow:0 5px 18px rgba(25,42,70,.035)}
.division-overview-card h2{margin:0 0 12px;font-weight:800}
.division-overview-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.division-overview-metrics div{min-width:0;border-radius:10px;}
.division-overview-metrics span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.division-overview-metrics strong{display:block;margin-top:4px;color:#263752;font-size:18px;font-weight:800;font-variant-numeric:tabular-nums}
.division-overview-note{margin:15px 2px;line-height:1.6}
.division-overview-loading,.division-overview-error{padding:22px 16px;border:1px dashed #dce3ec;border-radius:14px;color:#7c8798;font-size:12px;text-align:center}
@media(max-width:520px){.workspace-scope-switcher{justify-content:stretch;padding:6px}.scope-trigger{max-width:none;height:42px;padding:0 11px;font-size:13px}.scope-picker-sheet{width:calc(100% - 24px);padding-right:14px;padding-left:14px}}
@media(max-width:360px){.division-overview-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Keep the active workspace visible while Developer changes outlet/division. */
body.workspace-switching .app{pointer-events:none;opacity:.62;transition:opacity .18s ease}
body.workspace-switching .app::after{content:'Memuat divisi...';position:fixed;z-index:999;inset:0;display:grid;place-items:center;padding-top:72px;background:rgba(246,246,241,.38);color:#17172a;font-size:14px;font-weight:700;letter-spacing:.01em;pointer-events:all}

/* Dashboard operational date card — subtle elevation */
#page-dashboard > button.history-date {
  box-shadow:var(--card-shadow);
}

/* Outlet and division controls — standalone with subtle elevation */
.workspace-scope-switcher {
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
.workspace-scope-switcher .scope-trigger {
  border-color:#e7eaf0;
  box-shadow:0 3px 8px rgba(20,35,63,.08),0 1px 2px rgba(20,35,63,.04);
}
.workspace-scope-switcher .scope-trigger:active {
  box-shadow:0 2px 5px rgba(20,35,63,.10);
}

/* =========================================================
   DESKTOP DASHBOARD — WIDE WORKSPACE (1280–1920px)
   Mobile layout remains unchanged.
   ========================================================= */
@media (min-width: 900px) {
  .app {
    width: 100%;
    max-width: 1920px;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 0 0 40px;
    background: var(--bg);
  }

  .top {
    position: sticky;
    top: 0;
    z-index: 80;
    width: 100%;
    min-height: 88px;
    padding: 16px clamp(30px, 4vw, 76px);
    gap: 28px;
    background: rgba(246, 246, 241, .94);
    border-bottom: 1px solid rgba(17, 18, 37, .07);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }

  .brand {
    flex: 0 0 auto;
    gap: 14px;
  }

  .brandmark {
    width: 48px;
    height: 48px;
  }

  .brandname {
    font-size: 17px;
  }

  .brandmeta {
    font-size: 11px;
  }

  .workspace-scope-switcher {
    margin-left: auto;
    gap: 14px;
  }

  .workspace-scope-switcher .scope-field {
    flex: 0 1 210px;
  }

  .workspace-scope-switcher .scope-field > span {
    padding-left: 10px;
    font-size: 9px;
  }

  .scope-trigger {
    width: 100%;
    max-width: none;
    min-width: 170px;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 13px;
  }

  .top-actions {
    flex: 0 0 auto;
    gap: 14px;
  }

  .profile,
  .auth-logout-button,
  .menu-toggle {
    width: 48px;
    height: 48px;
  }

  .content {
    width: 100%;
    max-width: none;
    padding: 28px clamp(30px, 4vw, 76px) 48px;
  }

  #page-dashboard.page.active {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, .63fr));
    column-gap: 22px;
    row-gap: 0;
    align-items: stretch;
  }

  #page-dashboard > .greeting {
    grid-column: 1 / 2;
    grid-row: 1;
    align-self: center;
    min-width: 0;
    min-height: 76px;
    margin: 0 0 24px 2px;
  }

  #page-dashboard > .greeting h1 {
    font-size: clamp(27px, 2vw, 34px);
  }

  #page-dashboard > .operational-date-trigger {
    grid-column: 1 / 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    width: clamp(220px, 24vw, 260px);
    min-width: 0;
    height: 52px;
    margin: 0 0 24px;
    padding: 0 11px;
    gap: 8px;
    border: 1px solid rgba(17, 18, 37, .045);
    border-radius: 16px;
    background: #fff;
    text-align: left;
    box-shadow: var(--card-shadow);
  }

  #page-dashboard > .operational-date-trigger .history-date-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 10px;
    background: var(--lime-soft);
    color: #53652d;
  }

  #page-dashboard > .operational-date-trigger .history-date-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
    text-align: left;
  }

  #page-dashboard > .operational-date-trigger .history-date-copy small {
    font-size: 10px;
  }

  #page-dashboard > .operational-date-trigger .history-date-copy strong {
    font-size: 14px;
  }

  #page-dashboard > .operational-date-trigger .history-date-chevron {
    margin-left: auto;
    font-size: 20px;
  }

  #page-dashboard > .hero {
    grid-column: 1 / 2;
    grid-row: 2;
    min-width: 0;
    min-height: 220px;
    height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    border-radius: 24px;
    box-shadow: var(--card-shadow-strong);
  }

  #page-dashboard > .hero .hero-label {
    font-size: 14px;
  }

  #page-dashboard > .hero .hero-total {
    margin-top: 14px;
    font-size: clamp(54px, 4vw, 68px);
  }

  #page-dashboard > .hero .hero-foot {
    gap: 24px;
    margin-top: auto;
    padding-top: 10px;
  }

  #page-dashboard > .hero .hero-foot span {
    font-size: 14px;
  }

  #page-dashboard > .metrics {
    grid-column: 1 / -1;
    grid-row: 4;
    justify-self: start;
    min-width: 0;
    width: min(100%, 510px);
    height: 144px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 8px;
    margin: 24px 0 18px;
  }

  #page-dashboard > .metrics .metric {
    min-width: 0;
    min-height: 144px;
    height: 144px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(17, 18, 37, .035);
    border-radius: 22px;
    box-shadow: var(--card-shadow);
  }

  #page-dashboard > .metrics .metric-top .eyebrow {
    font-size: 13px;
  }

  #page-dashboard > .metrics .metric-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  #page-dashboard > .metrics .metric-icon svg {
    width: 21px;
    height: 21px;
  }

  #page-dashboard > .metrics .metric strong {
    margin-top: auto;
    padding-top: 12px;
    font-size: 40px;
  }

  #page-dashboard > .metrics .metric small {
    font-size: 14px;
  }

  #page-dashboard > #pendingWrap,
  #page-dashboard > .section-head,
  #page-dashboard > #dashboardList {
    grid-column: 1 / -1;
  }

  #page-dashboard > #pendingWrap {
    min-width: 0;
  }

  #page-dashboard > .section-head {
    grid-row: 5;
    margin: 16px 2px 16px;
  }

  #page-dashboard > #pendingWrap {
    grid-row: 3;
  }

  #page-dashboard > #dashboardList {
    grid-row: 6;
  }

  #page-dashboard > .section-head h2 {
    font-size: 25px;
  }

  #page-dashboard > .section-head .text-btn {
    font-size: 14px;
  }

  #page-dashboard > #dashboardList {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
  }

  #page-dashboard > #dashboardList > .empty {
    grid-column: 1 / -1;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(17, 18, 37, .035);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
  }

  .fab {
    right: clamp(30px, 4vw, 76px);
    bottom: 30px;
  }
}

@media (min-width: 900px) and (max-width: 1350px) {
  #page-dashboard.page.active {
    grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, .63fr));
    column-gap: 16px;
  }

  #page-dashboard > .metrics {
    width: min(100%, 510px);
    gap: 8px;
  }

  #page-dashboard > .metrics .metric {
    padding: 12px;
  }
}



/* Wide desktop dashboard: keep the active queue beside the summary. */
@media (min-width: 1150px) {
  #page-dashboard.page.active {
    grid-template-columns: minmax(0, 1fr) minmax(420px, 1.08fr);
    column-gap: 32px;
    row-gap: 0;
    align-items: start;
  }

  #page-dashboard > .greeting {
    grid-column: 1;
    grid-row: 1;
  }

  #page-dashboard > .operational-date-trigger {
    grid-column: 1;
    grid-row: 1;
  }

  #page-dashboard > .hero {
    grid-column: 1;
    grid-row: 2;
  }

  #page-dashboard > #pendingWrap {
    grid-column: 1;
    grid-row: 4;
  }

  #page-dashboard > .metrics {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    width: 100%;
    height: 120px;
    min-height: 120px;
    margin: 0 0 -24px;
  }

  #page-dashboard > .section-head {
    grid-column: 2;
    grid-row: 2;
    margin: 0 2px 16px;
  }

  #page-dashboard > #dashboardList {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    grid-auto-rows: max-content;
    align-content: start;
    gap: 10px;
    min-width: 0;
    align-self: start;
    margin-top: 44px;
    height: 290px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
  }

  #page-dashboard > #dashboardList > .guest {
    align-self: start;
    min-height: 104px;
    height: auto;
  }

  #page-dashboard > #dashboardList > .empty {
    min-height: 290px;
    height: 100%;
  }
}

/* Native workspace dropdowns — use the device/browser picker instead of a fixed header sheet. */
.workspace-scope-switcher {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  margin-left:auto;
  padding:0;
  border:0;
  background:transparent;
}
.workspace-scope-switcher[hidden] { display:none !important; }
.workspace-scope-switcher .scope-field {
  display:grid;
  gap:5px;
  flex:0 1 190px;
  min-width:0;
}
.workspace-scope-switcher .scope-field > span {
  padding-left:3px;
  color:#8993a4;
  font-size:9px;
  font-weight:800;
  letter-spacing:.08em;
}
.scope-native-select {
  position:static !important;
  display:block;
  width:100%;
  min-width:0;
  height:42px;
  margin:0 !important;
  padding:0 34px 0 12px;
  overflow:visible;
  clip:auto !important;
  border:1px solid #e2e7ee;
  border-radius:12px;
  background-color:#fff;
  color:#26354d;
  font-family:inherit;
  font-size:13px;
  font-weight:650;
  line-height:1.2;
  box-shadow:0 3px 9px rgba(20,35,63,.07),0 1px 2px rgba(20,35,63,.035);
  cursor:pointer;
}
.scope-native-select:disabled { opacity:.58; cursor:wait; }
@media(max-width:520px) {
  .top { flex-wrap:wrap; gap:10px; }
  .brand { flex:1 1 auto; min-width:120px; }
  .workspace-scope-switcher {
    order:3;
    width:100%;
    margin:0;
    gap:8px;
  }
  .workspace-scope-switcher .scope-field { flex:1 1 50%; }
  .workspace-scope-switcher .scope-field > span { font-size:9px; }
  .scope-native-select {
    height:44px;
    padding-left:11px;
    font-size:13px;
  }
  .top-actions { margin-left:auto; }
}

/* In-app workspace dropdown: themed menu anchored to each selector, not OS-native. */
.workspace-scope-switcher {
  position:relative;
  z-index:40;
  overflow:visible;
}
.workspace-scope-switcher .scope-field {
  position:relative;
}
.scope-dropdown-menu[hidden] {
  display:none !important;
}
.scope-dropdown-menu {
  position:absolute;
  z-index:160;
  top:calc(100% + 8px);
  left:0;
  width:min(280px, calc(100vw - 32px));
  max-height:min(320px, 52vh);
  padding:6px;
  overflow-y:auto;
  overscroll-behavior:contain;
  border:1px solid rgba(31,42,61,.09);
  border-radius:15px;
  background:#fffefa;
  box-shadow:0 14px 34px rgba(25,35,52,.16),0 3px 9px rgba(25,35,52,.07);
  transform-origin:top left;
  animation:scopeDropdownIn .16s ease-out both;
}
.workspace-scope-switcher .scope-field:last-child .scope-dropdown-menu {
  right:0;
  left:auto;
  transform-origin:top right;
}
.scope-dropdown-option {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
  min-height:44px;
  padding:0 11px;
  border:0;
  border-radius:10px;
  background:transparent;
  color:#30394b;
  text-align:left;
  font:600 13px 'DM Sans',sans-serif;
  cursor:pointer;
  transition:background .15s ease,color .15s ease;
}
.scope-dropdown-option + .scope-dropdown-option {
  margin-top:2px;
}
.scope-dropdown-option:hover,
.scope-dropdown-option:focus-visible {
  outline:0;
  background:#f3f5ee;
}
.scope-dropdown-option.is-selected {
  background:#eef2e7;
  color:#26351f;
  font-weight:800;
}
.scope-dropdown-check {
  display:grid;
  place-items:center;
  flex:0 0 21px;
  width:21px;
  height:21px;
  border-radius:50%;
  background:#71845e;
  color:#fff;
  font-size:12px;
  line-height:1;
}
.scope-dropdown-option:not(.is-selected) .scope-dropdown-check {
  background:transparent;
  border:1px solid #d6dce3;
}
.scope-trigger:disabled {
  opacity:.58;
  cursor:wait;
}
@keyframes scopeDropdownIn {
  from { opacity:0; transform:translateY(-5px) scale(.985); }
  to { opacity:1; transform:translateY(0) scale(1); }
}
@media (max-width:520px) {
  .workspace-scope-switcher {
    order:3;
    width:100%;
    margin:0;
    gap:8px;
  }
  .workspace-scope-switcher .scope-field {
    flex:1 1 50%;
    min-width:0;
  }
  .scope-dropdown-menu {
    width:min(300px, calc(100vw - 32px));
    max-height:min(300px, 48vh);
  }
}


/* Desktop navigation overlay: blur the complete workspace, including its header. */
@media (min-width: 900px) {
  .menu-backdrop {
    z-index: 90;
    background: rgba(17, 18, 37, .34);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
  }

  .menu-drawer {
    z-index: 91;
    top: 0;
    right: 0;
    width: clamp(360px, 27vw, 440px);
    height: 100dvh;
    border-radius: 24px 0 0 24px;
  }
}

/* Desktop quick-menu fan: keep the lowest action clear of the main FAB. */
@media (min-width: 900px) {
  .quick-menu {
    right: calc(clamp(30px, 4vw, 76px) + 27px);
    bottom: 104px;
  }
}

/* Hide the automatic date label on the desktop dashboard only. */
@media (min-width: 900px) {
  #page-dashboard .greeting .date {
    display: none !important;
  }
}


/* Hide visible scrollbar tracks inside popups while preserving scrolling. */
.sheet,
.sheet *,
.calendar-dialog,
.calendar-dialog *,
.scope-picker-sheet,
.scope-picker-sheet * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sheet::-webkit-scrollbar,
.sheet *::-webkit-scrollbar,
.calendar-dialog::-webkit-scrollbar,
.calendar-dialog *::-webkit-scrollbar,
.scope-picker-sheet::-webkit-scrollbar,
.scope-picker-sheet *::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* DESKTOP — keep popups inside the workspace viewport and reduce background blur. */
@media (min-width: 900px) {
  .sheet.operational-modal {
    top: 104px;
    bottom: 16px;
    max-height: calc(100dvh - 120px);
    padding: 14px 16px 16px;
    transform: translate(-50%, 0) scale(.98);
  }
  .sheet.operational-modal.show {
    transform: translate(-50%, 0) scale(1);
  }

  .calendar-dialog {
    top: calc(50% + 44px);
    max-height: calc(100dvh - 124px);
    padding: 18px;
  }

  .scope-picker-sheet {
    bottom: 16px;
    max-height: calc(100dvh - 124px);
  }

  .sheet-backdrop,
  .calendar-backdrop,
  .menu-backdrop,
  .quick-menu-backdrop,
  .scope-picker-backdrop,
  .app-select-dim {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .menu-backdrop {
    background: rgba(17, 18, 37, .28);
  }
  .quick-menu-backdrop {
    background: rgba(17, 18, 37, .06);
  }
}


/* GUEST DETAIL — SHORTER MOBILE SHEET */
@media (max-width: 700px) {
  #sheet:has(.detail-ticket) {
    max-height: 72dvh;
    padding-top: 8px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }

  #sheet:has(.detail-ticket) .sheet-head {
    margin-bottom: 12px;
  }

  #sheet:has(.detail-ticket) .handle {
    margin-bottom: 12px;
  }

  #sheet:has(.detail-ticket) .detail-ticket {
    padding: 13px 16px;
    margin-bottom: 12px;
  }

  #sheet:has(.detail-ticket) .detail-ticket strong {
    font-size: 27px;
  }

  #sheet:has(.detail-ticket) .detail-grid {
    gap: 7px;
    margin: 10px 0;
  }

  #sheet:has(.detail-ticket) .detail-cell {
    padding: 9px 10px;
  }

  #sheet:has(.detail-ticket) .sheet-actions {
    gap: 8px;
    margin-top: 12px;
  }

  #sheet:has(.detail-ticket) .timeline {
    margin-top: 8px;
  }
}

/* =========================================================
   BUTTON MICRO-INTERACTIONS — CONSISTENT TAP FEEDBACK
   Keep existing feature-specific press effects where defined.
   ========================================================= */

button:active,
[role="button"]:active {
  transform:scale(.975);
}

.filters .filter {
  transition:
    transform .16s cubic-bezier(.2,.8,.2,1),
    background-color .2s ease,
    color .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}

.filters .filter:active {
  transform:scale(.96);
}

@media (prefers-reduced-motion:reduce) {
  .filters .filter {
    transition:none;
  }

  button:active,
  [role="button"]:active,
  .filters .filter:active {
    transform:none;
  }
}

/* =========================================================
   GUEST DETAIL CARDS — TACTILE TAP FEEDBACK
   Visual-only interaction. Cards do not trigger data actions.
   ========================================================= */

#sheet .detail-ticket,
#sheet .detail-cell {
  cursor:pointer;
  transform-origin:center;
  -webkit-tap-highlight-color:transparent;
  transition:
    transform .16s cubic-bezier(.2,.8,.2,1),
    box-shadow .18s ease,
    background-color .18s ease,
    filter .18s ease;
}

#sheet .detail-ticket:active {
  transform:scale(.985);
  filter:brightness(.97) saturate(1.04);
  box-shadow:0 3px 9px rgba(17,18,37,.13);
}

#sheet .detail-cell:active {
  transform:scale(.975);
  background-color:#eef1e7;
  box-shadow:0 1px 4px rgba(17,18,37,.10);
}

@media (hover:hover) and (pointer:fine) {
  #sheet .detail-ticket:hover,
  #sheet .detail-cell:hover {
    transform:translateY(-2px);
  }

  #sheet .detail-ticket:hover {
    box-shadow:0 11px 24px rgba(17,18,37,.14),0 3px 7px rgba(17,18,37,.06);
  }

  #sheet .detail-cell:hover {
    box-shadow:0 7px 15px rgba(17,18,37,.10),0 2px 4px rgba(17,18,37,.04);
  }
}

@media (prefers-reduced-motion:reduce) {
  #sheet .detail-ticket,
  #sheet .detail-cell {
    transition:none;
  }

  #sheet .detail-ticket:active,
  #sheet .detail-cell:active,
  #sheet .detail-ticket:hover,
  #sheet .detail-cell:hover {
    transform:none;
  }
}

/* =========================================================
   GUEST STATUS CONFIRMATION
   ========================================================= */
.guest-confirm-backdrop {
  position:fixed;
  inset:0;
  z-index:1200;
  display:grid;
  place-items:center;
  padding:22px;
  background:rgba(17,18,37,.48);
  -webkit-backdrop-filter:blur(5px);
  backdrop-filter:blur(5px);
  animation:guestConfirmFade .18s ease both;
}

.guest-confirm-dialog {
  width:min(100%,360px);
  padding:30px 22px 22px;
  border:1px solid rgba(255,255,255,.72);
  border-radius:24px;
  background:#fff;
  box-shadow:0 22px 60px rgba(17,18,37,.22);
  text-align:center;
  animation:guestConfirmPop .22s cubic-bezier(.2,.8,.2,1) both;
}

.guest-confirm-dialog h2 {
  margin:0;
  color:#171827;
  font:800 19px Manrope,sans-serif;
}

.guest-confirm-dialog p {
  margin:9px 0 22px;
  color:#777b88;
  font-size:13px;
  line-height:1.55;
}

.guest-confirm-actions {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.guest-confirm-actions button {
  min-height:46px;
  padding:0 12px;
  border:0;
  border-radius:14px;
  font:700 13px Manrope,sans-serif;
  cursor:pointer;
  transition:transform .16s ease,box-shadow .16s ease,background-color .16s ease;
  -webkit-tap-highlight-color:transparent;
}

.guest-confirm-cancel {
  background:#f3f3f0;
  color:#343544;
}

.guest-confirm-accept {
  background:#141426;
  color:#fff;
  box-shadow:0 4px 10px rgba(17,18,37,.16);
}

.guest-confirm-actions button:active {
  transform:scale(.96);
}

@keyframes guestConfirmFade {
  from { opacity:0; }
  to { opacity:1; }
}

@keyframes guestConfirmPop {
  from { opacity:0; transform:translateY(9px) scale(.97); }
  to { opacity:1; transform:translateY(0) scale(1); }
}

@media (prefers-reduced-motion:reduce) {
  .guest-confirm-backdrop,
  .guest-confirm-dialog,
  .guest-confirm-actions button {
    animation:none;
    transition:none;
  }
}


/* Logout progress indicator */
.auth-profile-button.is-logging-out,
.profile.is-logging-out,
.auth-logout-button.is-logging-out {
  cursor: wait;
  opacity: .82;
}
.auth-logout-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: auth-logout-spin .7s linear infinite;
}
.profile .auth-logout-spinner {
  width: 17px;
  height: 17px;
}
.auth-logout-button .auth-logout-spinner {
  width: 15px;
  height: 15px;
}
@keyframes auth-logout-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-logout-spinner { animation-duration: 1.8s; }
}




/* Developer outlet/division switcher: drawer entry + modal dialog. */
.drawer-scope-item { display: none; }
body:has(#workspaceScopeSwitcher:not([hidden])) .drawer-scope-item { display: flex; }

.scope-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 22px;
  overflow: visible;
  border: 1px solid rgba(31, 42, 61, .09);
  border-radius: 20px;
  background: #fffefa;
  color: #24334d;
  box-shadow: 0 22px 60px rgba(17, 18, 37, .24);
}
.scope-dialog::backdrop { background: rgba(17, 18, 37, .34); }
.scope-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.scope-dialog-kicker { color: #8993a4; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.scope-dialog h2 { margin: 4px 0 0; color: #111225; font: 800 18px Manrope, sans-serif; letter-spacing: -.02em; }
.scope-dialog-close { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; padding: 0; border: 0; border-radius: 11px; background: #f4f3f7; color: #55536d; cursor: pointer; }
.scope-dialog-close svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.scope-dialog-note { margin: 10px 0 14px; color: #77758d; font-size: 11px; line-height: 1.5; }
.scope-dialog .workspace-scope-switcher { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; }
.scope-dialog .workspace-scope-switcher .scope-field { flex: none; min-width: 0; }
.scope-dialog .scope-trigger { max-width: none; height: 42px; }
.scope-dialog .scope-field:last-child .scope-dropdown-menu { right: 0; left: auto; }
.scope-dialog .scope-dropdown-menu.opens-up { top: auto; bottom: calc(100% + 8px); transform-origin: bottom left; }
.scope-dialog .scope-field:last-child .scope-dropdown-menu.opens-up { transform-origin: bottom right; }
@media (max-width: 520px) {
  .scope-dialog { padding: 18px; }
  .scope-dialog .workspace-scope-switcher { grid-template-columns: 1fr; }
}


/* Required table number in the guest seating confirmation. */
.guest-confirm-field {
  margin:0 0 20px;
  text-align:left;
}
.guest-confirm-field label {
  display:block;
  margin-bottom:8px;
  color:#343544;
  font-size:12px;
  font-weight:800;
}
.guest-confirm-field input {
  width:100%;
  min-height:46px;
  padding:0 13px;
  border:1px solid #dedfe5;
  border-radius:12px;
  background:#fff;
  color:#171827;
  font:600 14px Manrope,sans-serif;
  outline:none;
}
.guest-confirm-field input:focus {
  border-color:#a6c94a;
  box-shadow:0 0 0 3px rgba(190,224,91,.2);
}
.guest-confirm-accept:disabled {
  cursor:not-allowed;
  opacity:.45;
  box-shadow:none;
}


/* Highlight seating details only on guest cards with the seated status. */
.guest-seated-info {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:8px;
  margin:11px 0 0 55px;
}
.guest-seated-metric {
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:0;
  min-height:58px;
  padding:9px 11px;
  border:1px solid #e3edc7;
  border-radius:12px;
  background:linear-gradient(135deg,#f5f9e9 0%,#edf5d8 100%);
}
.guest-seated-metric small {
  color:#68794a;
  font-size:8px;
  font-weight:850;
  letter-spacing:.09em;
}
.guest-seated-metric strong {
  display:block;
  margin-top:3px;
  overflow-wrap:anywhere;
  color:#26351f;
  font-size:17px;
  font-weight:900;
  line-height:1.15;
}
.guest-seated-table {
  border-color:#d9e9a9;
  background:linear-gradient(135deg,#eaf5c9 0%,#dff0a6 100%);
}
.guest-seated-table strong {
  font-size:20px;
  letter-spacing:-.02em;
}
.guest-seated-table.is-missing {
  border-color:#eee4c9;
  background:#fbf7ed;
}
.guest-seated-table.is-missing small,
.guest-seated-table.is-missing strong {
  color:#8b7444;
}
.guest-is-seated .guest-bottom {
  margin-top:9px;
}
@media (max-width:520px) {
  .guest-seated-info {
    margin-left:0;
    gap:7px;
  }
  .guest-seated-metric {
    min-height:56px;
    padding:8px 10px;
  }
  .guest-seated-metric strong {
    font-size:16px;
  }
  .guest-seated-table strong {
    font-size:19px;
  }
}


/* Mobile seated cards: keep actions on one line beside the seated status. */
.guest-seated-mobile-actions {
  display:none;
}
@media (max-width:520px) {
  .guest-seated-mobile-actions {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    min-height:30px;
    margin:9px 0 0 55px;
  }
  .guest-seated-mobile-actions .actions {
    display:flex;
    align-items:center;
    gap:6px;
  }
  .guest-seated-mobile-actions .mini {
    min-height:29px;
    padding:6px 9px;
    font-size:10px;
  }
  .guest-seated-mobile-actions > .status {
    flex:none;
  }
  .guest-seated-info {
    margin-top:8px;
  }
}


/* Mobile seated guest actions belong in the blank space on the guest name row. */
.guest-seated-inline-actions {
  display:none;
}
@media (max-width:520px) {
  .guest-is-seated .guest-status-desktop,
  .guest-is-seated .guest-bottom {
    display:none;
  }
  .guest-seated-inline-actions {
    display:flex;
    flex:0 0 auto;
    align-items:center;
    gap:4px;
  }
  .guest-seated-inline-actions .mini {
    min-height:27px;
    padding:5px 7px;
    font-size:9px;
    line-height:1;
    white-space:nowrap;
  }
  .guest-is-seated .guest-main {
    flex:1 1 auto;
    min-width:0;
  }
  .guest-is-seated .guest-name {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
}


/* Keep the seated status visible beside the actions on mobile. */
@media (max-width:520px) {
  .guest-seated-inline-actions {
    justify-content:flex-end;
    min-width:0;
  }
  .guest-seated-inline-actions .actions {
    display:flex;
    align-items:center;
    gap:4px;
  }
  .guest-seated-inline-status {
    display:inline-flex;
    flex:0 0 auto;
    white-space:nowrap;
  }
}


/* Make the two mobile seated actions and the status badge the same height. */
@media (max-width:520px) {
  .guest-seated-inline-actions .mini,
  .guest-seated-inline-status {
    box-sizing:border-box;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:27px;
    padding:5px 7px;
    font-size:9px;
    line-height:1;
  }
}


/* Force identical rendered height for the mobile seated controls. */
@media (max-width:520px) {
  .guest-is-seated .guest-seated-inline-actions .mini,
  .guest-is-seated .guest-seated-inline-status {
    box-sizing:border-box !important;
    height:27px !important;
    min-height:27px !important;
    max-height:27px !important;
    padding:0 7px !important;
    line-height:27px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    vertical-align:middle;
  }
}


/* Match mobile seated action labels to the Duduk badge typography. */
@media (max-width:520px) {
  .guest-is-seated .guest-seated-inline-actions .mini,
  .guest-is-seated .guest-seated-inline-status {
    font-family:inherit !important;
    font-size:9px !important;
    font-weight:800 !important;
    line-height:1 !important;
    letter-spacing:normal !important;
    text-transform:none !important;
  }
}


/* Desktop waiting list: show guest cards in two columns. */
@media (min-width:900px) {
  #queueList.queue-list {
    grid-template-columns:repeat(2,minmax(0,1fr));
    align-items:start;
  }
}


/* Desktop seated cards: keep actions and status together on the guest row. */
@media (min-width:900px) {
  #queueList.queue-list {
    align-items:stretch;
  }
  #queueList .guest-is-seated .guest-seated-inline-actions {
    display:flex;
    flex:0 0 auto;
    align-items:center;
    justify-content:flex-end;
    gap:7px;
    min-width:0;
  }
  #queueList .guest-is-seated .guest-status-desktop,
  #queueList .guest-is-seated .guest-bottom {
    display:none;
  }
  #queueList .guest-is-seated .guest-seated-inline-actions .mini,
  #queueList .guest-is-seated .guest-seated-inline-status {
    box-sizing:border-box;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:27px;
    min-height:27px;
    padding:0 8px;
    font-family:inherit;
    font-size:9px;
    font-weight:800;
    line-height:1;
    letter-spacing:normal;
    white-space:nowrap;
  }
}


/* Desktop seated detail panels fill the full content area after the ticket. */
@media (min-width:900px) {
  #queueList .guest-is-seated .guest-seated-info {
    width:100%;
    margin-left:0;
    grid-template-columns:repeat(2,minmax(0,1fr));
    box-sizing:border-box;
  }
}


/* Guest actions: show an inline progress indicator and prevent repeat taps. */
.guest-action-loading {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  cursor:progress !important;
  opacity:.78;
  pointer-events:none;
}
.guest-confirm-accept.guest-action-loading {
  opacity:.88;
}
.guest-action-spinner {
  display:inline-block;
  width:13px;
  height:13px;
  flex:0 0 13px;
  border:2px solid currentColor;
  border-right-color:transparent;
  border-radius:50%;
  animation:guest-action-spin .7s linear infinite;
}
@keyframes guest-action-spin {
  to { transform:rotate(360deg); }
}
@media (prefers-reduced-motion:reduce) {
  .guest-action-spinner { animation-duration:1.8s; }
}

/* ---------- masterdata.css ---------- */
/* MASTER BARANG — Guest Operations visual language */
.md-page {
  display: grid;
  gap: 14px;
  min-width: 0;
  animation: pageIn .28s both;
}
.md-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.md-page-heading h1 {
  margin: 5px 0 4px;
  color: var(--ink);
  font: 800 24px Manrope, sans-serif;
  letter-spacing: -.045em;
}
.md-page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.md-eyebrow {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
}
.md-primary {
  min-height: 42px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 13px;
  padding: 10px 13px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease;
}
.md-primary:active { transform: scale(.97); }
.md-count-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
}
.md-count-grid>div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.md-count-grid span,.md-item-prices small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}
.md-count-grid b {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font: 800 21px Manrope, sans-serif;
}
.md-count-grid>div:nth-child(2) b { color: #668c3e; }
.md-count-grid>div:nth-child(3) b { color: #8b83c8; }
.md-search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--muted);
}
.md-search span { font-size: 23px; line-height: 1; }
.md-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}
.md-filter-row {
  display: flex;
  gap: 7px;
}
.md-filter-row button {
  min-height: 34px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.md-filter-row button.is-selected {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.md-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}
.md-list-heading h2 {
  margin: 0;
  color: var(--ink);
  font: 800 14px Manrope, sans-serif;
}
.md-list-heading span {
  color: var(--muted);
  font-size: 10px;
}
.md-item-list { display: grid; gap: 10px; }
.md-item-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.md-item-heading {
  display: grid;
  grid-template-columns: minmax(72px,.6fr) minmax(0,1.7fr);
  align-items: stretch;
  gap: 8px;
}
.md-item-copy { min-width: 0; }
.md-item-title-row {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  flex-wrap: wrap;
}
.md-item-copy h3 {
  margin: 0;
  color: var(--ink);
  font: 800 16px Manrope, sans-serif;
  overflow-wrap: anywhere;
}
.md-base-unit-label {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}
.md-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
}
.md-status.is-active { background: #eef7c7; color: #526f2d; }
.md-status.is-inactive { background: #eceaf8; color: #6c639e; }
.md-item-prices {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  min-width: 0;
  margin: 0;
}
.md-item-prices>div {
  display: flex;
  min-width: 0;
  min-height: 58px;
  flex-direction: column;
  justify-content: center;
  padding: 7px 8px;
  border-radius: 10px;
  background: #f8f8f4;
}
.md-item-prices small {
  display: block;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.md-item-prices b {
  display: block;
  color: var(--ink);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.md-price-reference b span {
  color: var(--muted);
  font-weight: 700;
}
.md-more,.md-status-action {
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: #f5f5f0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.md-status-action { background: #f0eff9; color: #6e659d; }
.md-unit-section {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 10px;
}
.md-unit-caption {
  padding-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.md-unit-list {
  display: flex;
  flex: 1 1 180px;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
.md-unit-chip {
  display: inline-flex;
  max-width: 100%;
  min-height: 30px;
  align-items: center;
  padding: 5px 8px;
  border-radius: 8px;
  background: #f0eff9;
  color: #655e95;
  font-size: 11px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.md-supply-chip {
  align-items: center;
  min-height: 24px;
  margin: 0;
}
.md-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
}
.md-item-footer>span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.md-item-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
}
.md-item-actions .md-more { background: #f5f5f0; }
.md-item-actions .md-status-action { background: #f0eff9; text-align: center; }
.md-empty,.md-error {
  padding: 28px 18px;
  border: 1px dashed #dcdce5;
  border-radius: 16px;
  background: #fff;
  text-align: center;
}
.md-empty-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin: 0 auto 9px;
  border-radius: 12px;
  background: var(--lime-soft);
  color: var(--ink);
  font-size: 20px;
}
.md-empty b,.md-error b { color: var(--ink); font-size: 12px; }
.md-empty p,.md-error p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.md-error .md-primary { margin-top: 12px; }
.md-sheet { display: grid; gap: 14px; }
.md-sheet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}
.md-sheet-heading h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font: 800 19px Manrope, sans-serif;
  letter-spacing: -.035em;
}
.md-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 11px;
  background: #f1f1ed;
  color: var(--ink);
  font-size: 22px;
}
.md-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #55576a;
  font-size: 10px;
  font-weight: 800;
}
.md-field i { color: #9b8bd7; font-style: normal; }
.md-field input,.md-field select {
  width: 100%;
  min-width: 0;
  height: 43px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: #fbfbf8;
  color: var(--ink);
  font-size: 13px;
}
.md-field input:focus,.md-field select:focus {
  border-color: #aaa3e8;
  box-shadow: 0 0 0 3px rgba(170,163,232,.16);
}
.md-form-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
}
.md-form-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fcfcf9;
}
.md-form-section> b { color: var(--ink); font: 800 12px Manrope, sans-serif; }
.md-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}
.md-section-heading>div { display: grid; gap: 3px; }
.md-section-heading b { color: var(--ink); font-size: 11px; }
.md-section-heading small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.md-add-unit {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid #dcd9f2;
  border-radius: 9px;
  background: #f0eff9;
  color: #625b92;
  font-size: 10px;
  font-weight: 800;
}
.md-base-unit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  background: var(--lime-soft);
  color: #526f2d;
  font-size: 10px;
}
.md-base-unit-row strong { font: 800 12px Manrope, sans-serif; }
.md-conversion-rows { display: grid; gap: 8px; }
.md-conversion-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) 30px;
  align-items: end;
  gap: 7px;
}
.md-remove-unit {
  width: 30px;
  height: 39px;
  border: 1px solid #f1dfe2;
  border-radius: 9px;
  background: #fff3f3;
  color: #b45e6a;
  font-size: 18px;
}
.md-conversion-preview {
  display: grid;
  gap: 5px;
}
.md-conversion-preview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
}
.md-conversion-preview-row b { color: var(--ink); font-size: 9px; }
.md-price-result {
  display: grid;
  gap: 5px;
  padding: 11px;
  border-radius: 11px;
  background: #eef7e9;
}
.md-price-result span { color: #69824a; font-size: 9px; font-weight: 700; }
.md-price-result strong { color: #3e5e2b; font: 800 15px Manrope, sans-serif; }
.md-price-result strong.is-muted { color: #77778a; font: 600 10px 'DM Sans',sans-serif; }
.md-form-note {
  margin: -3px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}
.md-sheet-actions { display: flex; gap: 8px; margin-top: 2px; }
.md-sheet-actions button {
  min-height: 43px;
  flex: 1;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
}
.md-cancel {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.md-save {
  border: 0;
  background: var(--ink);
  color: #fff;
}
@media (max-width: 390px) {
  .md-page-heading { align-items: stretch; flex-direction: column; }
  .md-page-heading .md-primary { width: 100%; }
  .md-count-grid>div { padding: 10px 8px; }
  .md-count-grid span { font-size: 8px; }
  .md-item-prices { grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr); }
  .md-form-grid { grid-template-columns: minmax(0,1fr); }
  .md-conversion-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 28px; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .md-page,.md-primary { animation: none; transition: none; }
}

.md-supply-toggle { display:flex; align-items:center; gap:10px; padding:11px 12px; border:1px solid var(--line); border-radius:12px; background:#fcfcf9; color:var(--ink); cursor:pointer; }
.md-supply-toggle input { width:17px; height:17px; accent-color:#8ea95a; }
.md-supply-toggle span { display:grid; gap:3px; }
.md-supply-toggle b { font-size:10px; }
.md-supply-toggle small { color:var(--muted); font-size:9px; line-height:1.4; }
.md-supply-chip { display:inline-flex; width:max-content; margin-top:7px; padding:3px 8px; border-radius:20px; background:#f0eff9; color:#625b92; font-size:9px; font-weight:800; }


/* Simplified Master Barang entry form */
.md-sheet-simple { gap: 18px; }
.md-sheet-simple form { display: grid; }
.md-sheet-simple .md-sheet-heading { margin-bottom: 2px; }
.md-sheet-simple .md-close { width: 44px; height: 44px; flex: 0 0 44px; }
.md-sheet-simple .md-field input,
.md-sheet-simple .md-field select {
  padding: 0 14px;
  background: #fff;
}
.md-sheet-simple .md-field i { color: #d96a19; }
.md-sheet-simple .md-supply-toggle {
  border-radius: 12px;
  background: #fbfbf8;
}
.md-sheet-simple .md-supply-toggle input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}
.md-advanced {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.md-advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}
.md-advanced summary::-webkit-details-marker { display: none; }
.md-advanced summary>span:first-child { display: grid; gap: 4px; }
.md-advanced summary b { color: var(--ink); }
.md-advanced summary small { color: var(--muted); line-height: 1.4; }
.md-advanced-mark {
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 9px;
  background: #f0f0eb;
  color: var(--ink);
  transition: transform .18s ease;
}
.md-advanced[open] .md-advanced-mark { transform: rotate(45deg); }
.md-advanced-content { display: grid; padding: 0 0 14px; }
.md-advanced-content .md-section-heading { align-items: center; }
.md-advanced-content .md-field input { height: 44px; }
.md-sheet-simple .md-price-result {
  border-radius: 12px;
}
.md-sheet-simple .md-form-note { margin-top: -8px; }
.md-sheet-actions-simple { margin-top: 2px; }
.md-sheet-actions-simple .md-save {
  width: 100%;
  min-height: 54px;
  border-radius: 13px;
  font-size: 16px;
}
@media (max-width: 390px) {
}


.md-sheet-simple .md-price-result small {
  display: block;
  color: #526b43;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.md-sheet-simple .md-price-result small[hidden] { display: none; }

@media (max-width: 390px) {
  .md-item-title-row { gap: 5px; }
  .md-item-prices { gap: 5px; }
  .md-item-prices>div { min-height: 56px; padding: 6px 7px; }
  .md-price-reference b span { font-size: 10px; }
  .md-item-footer>span { font-size: 10px; }
  .md-item-actions .md-more,.md-item-actions .md-status-action { padding: 0 7px; font-size: 12px; }
}


/* Final compact alignment for Master Barang item cards */
.md-item-heading {
  align-items: start;
  gap: 6px;
}
.md-item-copy {
  align-self: start;
}
.md-item-title-row {
  gap: 3px;
}
.md-item-copy h3 {
  font-size: 14px;
}
.md-base-unit-label {
  margin-top: 4px;
  font-size: 10px;
}
.md-item-prices {
  align-content: start;
  align-self: start;
  gap: 4px;
}
.md-item-prices > div {
  min-height: 46px;
  padding: 5px 6px;
}
.md-item-prices small {
  font-size: 9px;
}
.md-item-prices b {
  margin-top: 2px;
  font-size: 11px;
}
.md-price-reference b span {
  font-size: 9px;
}
.md-item-footer {
  margin-top: 4px;
  padding-top: 4px;
}
.md-item-footer > span {
  font-size: 10px;
}
.md-item-actions {
  gap: 3px;
}
.md-item-actions .md-more,
.md-item-actions .md-status-action {
  min-height: 38px;
  padding: 0 7px;
  font-size: 11px;
}
@media (max-width: 390px) {
  .md-item-card { padding: 10px; }
  .md-item-heading {
    grid-template-columns: minmax(68px,.58fr) minmax(0,1.72fr);
    gap: 6px;
  }
  .md-base-unit-label { font-size: 10px; }
  .md-item-prices > div { min-height: 44px; padding: 4px 5px; }
  .md-item-footer { margin-top: 3px; padding-top: 3px; }
  .md-item-footer > span { font-size: 9px; }
  .md-item-actions { gap: 2px; }
  .md-item-actions .md-more,
  .md-item-actions .md-status-action {
    min-height: 36px;
    padding: 0 6px;
    font-size: 10px;
  }
}


/* Compact Master Barang form controls */
.md-sheet-simple { gap: 14px; }
.md-sheet-simple form { gap: 12px; }
.md-sheet-simple .md-sheet-heading h2 { font-size: 20px; }
.md-sheet-simple .md-field input,
.md-sheet-simple .md-field select {
  height: 48px;
  border-radius: 11px;
  box-shadow: 0 2px 5px rgba(17,18,37,.045), 0 1px 2px rgba(17,18,37,.035);
}
.md-sheet-simple .md-supply-toggle {
  min-height: 54px;
  padding: 10px 12px;
  box-shadow: 0 2px 5px rgba(17,18,37,.035);
}
.md-advanced summary { min-height: 56px; }
.md-advanced-content { gap: 10px; }
.md-advanced-content .md-add-unit {
  min-height: 38px;
  box-shadow: 0 2px 5px rgba(17,18,37,.045);
}
.md-sheet-simple .md-close {
  box-shadow: 0 2px 5px rgba(17,18,37,.055);
}
.md-sheet-simple .md-price-result {
  padding: 10px 12px;
  box-shadow: 0 2px 6px rgba(17,18,37,.035);
}
.md-sheet-simple .md-save {
  box-shadow: 0 3px 8px rgba(17,18,37,.10), 0 1px 2px rgba(17,18,37,.045);
}
.md-sheet-simple .md-remove-unit {
  box-shadow: 0 1px 3px rgba(17,18,37,.035);
}
@media (max-width: 390px) {
  .md-sheet-simple form { gap: 11px; }
  .md-sheet-simple .md-field input { height: 46px; }
  .md-advanced summary { min-height: 52px; }
}


/* Refined typography for Master Barang form */
.md-sheet-simple .md-sheet-heading h2 { letter-spacing: -.025em; }
.md-sheet-simple .md-eyebrow {
  font-size: 8px;
  letter-spacing: .12em;
}
.md-sheet-simple .md-field {
  line-height: 1.25;
}
.md-sheet-simple .md-field input,
.md-sheet-simple .md-field select {
  font-size: 16px;
}
.md-sheet-simple .app-select-trigger {
  box-shadow: 0 2px 5px rgba(17,18,37,.04), 0 1px 2px rgba(17,18,37,.03);
}
.md-sheet-simple .md-supply-toggle small {
  line-height: 1.35;
}
.md-advanced-mark {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 18px;
}
.md-advanced-content .md-section-heading b {
  font-size: 10px;
}
.md-advanced-content .md-section-heading small {
  font-size: 9px;
}
.md-advanced-content .md-field input {
  font-size: 16px;
}
.md-sheet-simple .md-price-result strong.is-muted {
  font-size: 11px;
}
.md-sheet-simple .md-price-result small {
  line-height: 1.35;
}
.md-sheet-simple .md-form-note {
  line-height: 1.4;
}
@media (max-width: 390px) {
  .md-sheet-simple .app-select-trigger { font-size: 14px; }
}


/* Match Master Barang form typography to the compact price summary card */
.md-sheet-simple .md-sheet-heading h2 { font-size: 16px; }
.md-sheet-simple .md-field {
  font-size: 10px;
  gap: 5px;
}
.md-sheet-simple .md-field input {
  font-size: 14px;
}
.md-sheet-simple .app-select-trigger {
  min-height: 44px;
  font-size: 12px;
}
.md-sheet-simple .app-select-option {
  min-height: 40px;
  font-size: 12px;
}
.md-sheet-simple .md-supply-toggle b { font-size: 10px; }
.md-sheet-simple .md-supply-toggle small { font-size: 9px; }
.md-advanced summary b { font-size: 10px; }
.md-advanced summary small { font-size: 9px; }
.md-advanced-content .md-field { font-size: 9px; }
.md-advanced-content .md-add-unit { font-size: 10px; }
.md-sheet-simple .md-price-result span { font-size: 9px; }
.md-sheet-simple .md-price-result small { font-size: 9px; }
.md-sheet-simple .md-form-note { font-size: 9px; }
.md-sheet-simple .md-save { font-size: 13px; }
@media (max-width: 390px) {
  .md-sheet-simple .md-sheet-heading h2 { font-size: 16px; }
  .md-sheet-simple .md-field { font-size: 9px; }
  .md-sheet-simple .md-field input { font-size: 14px; }
  .md-sheet-simple .app-select-trigger,
  .md-sheet-simple .app-select-option { font-size: 12px; }
}

/* Desktop only: Master Barang uses three cards per row on wide screens. */
@media (min-width: 1100px) {
  .md-item-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 14px;
  }

  .md-item-card {
    display: flex;
    flex-direction: column;
    padding: 16px;
  }

  .md-item-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .md-item-prices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md-item-footer {
    align-items: flex-end;
    margin-top: auto;
    padding-top: 12px;
  }
}

/* ---------- wip.css ---------- */
/* =========================================================
   RESEP WIP — mobile-first, shared Guest Operations tokens
   ========================================================= */
.wip-page { padding: 4px 0 90px; animation: md-page-in .22s ease both; }
.wip-page-heading { display:flex; align-items:flex-end; justify-content:space-between; }
.wip-page-heading h1 { margin:4px 0 5px; color:var(--ink); font:800 23px Manrope,'DM Sans',sans-serif; letter-spacing:-.045em; }
.wip-page-heading p { max-width:270px; margin:0; color:var(--muted); }
.wip-eyebrow { color:#77728f; font-weight:800; letter-spacing:.12em; }
.wip-primary { border:0; background:var(--ink); color:#fff; font-weight:800; white-space:nowrap; }
.wip-count-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.wip-count-grid>div { display:grid; min-width:0; border:1px solid var(--line); background:var(--surface); }
.wip-count-grid span { color:var(--muted); }
.wip-count-grid b { color:var(--ink); font:800 20px Manrope,sans-serif; }
.wip-search {
  display:flex;
  align-items:center;
  gap:9px;
  height:44px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:#858594;
  box-shadow:0 2px 5px rgba(17,18,37,.035);
}
.wip-search>span { font-size:20px; line-height:1; }
.wip-search input { width:100%; min-width:0; border:0; outline:0; background:transparent; color:var(--ink); font:500 12px 'DM Sans',sans-serif; }
.wip-filter-row { display:flex; }
.wip-filter-row button { border:1px solid var(--line); border-radius:20px; background:#fff; color:var(--muted); font-weight:800; }
.wip-filter-row button.is-selected { border-color:#dce8b8; background:#eef7d6; color:#526f2d; }
.wip-list-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.wip-list-heading h2 { margin:0; color:var(--ink); font:800 13px Manrope,sans-serif; }
.wip-list-heading>span { color:var(--muted); }
.wip-list { display:grid; }
.wip-card { min-width:0; border:1px solid var(--line); background:#fff; }
.wip-card-heading { justify-content:space-between; }
.wip-card-heading h3 { color:var(--ink); font:800 14px Manrope,sans-serif; overflow-wrap:anywhere; }
.wip-status { display:inline-flex; align-items:center; border-radius:20px; font-weight:800; }
.wip-status.is-active { background:#eef7c7; color:#526f2d; }
.wip-status.is-inactive { background:#eceaf8; color:#6c639e; }
.wip-edit { padding:5px 3px; border:0; background:transparent; color:var(--ink); font-size:10px; font-weight:800; }
.wip-card-yield { display:flex; justify-content:space-between; gap:8px; margin-top:13px; padding:9px 10px; border-radius:10px; background:#f8f8f4; color:var(--muted); font-size:9px; }
.wip-card-yield b { color:var(--ink); font-size:10px; }
.wip-hpp { display:grid; gap:5px; margin-top:11px; }
.wip-hpp small { color:var(--muted); font-size:9px; font-weight:700; }
.wip-hpp strong { color:#3e5e2b; font:800 15px Manrope,sans-serif; overflow-wrap:anywhere; }
.wip-hpp strong.is-invalid { color:#9a5a63; font:700 10px 'DM Sans',sans-serif; }
.wip-invalid-reason { color:#9a5a63; line-height:1.45; }
.wip-card-footer { display:flex; align-items:center; justify-content:space-between; border-top:1px solid var(--line); }
.wip-card-footer span { color:var(--muted); }
.wip-card-footer button { padding:3px 0; border:0; background:transparent; color:#6e659d; font-size:9px; font-weight:800; }
.wip-empty {
  padding:22px 14px;
  border:1px dashed #dcdce5;
  border-radius:14px;
  background:#fff;
  text-align:center;
}
.wip-empty b { color:var(--ink); }
.wip-empty p { margin:5px 0 0; color:var(--muted); line-height:1.5; }
.wip-sheet { display:grid; gap:13px; }
.wip-sheet-heading { display:flex; align-items:center; justify-content:space-between; }
.wip-sheet-heading h2 { margin:4px 0 0; color:var(--ink); font:800 19px Manrope,sans-serif; letter-spacing:-.035em; }
.wip-close { border:0; background:#f1f1ed; color:var(--ink); }
.wip-field { display:grid; min-width:0; color:#55576a; font-weight:800; }
.wip-field i { color:#9b8bd7; font-style:normal; }
.wip-field input,.wip-field select { width:100%; min-width:0; height:41px; padding:0 10px; border:1px solid var(--line); border-radius:10px; outline:0; background:#fbfbf8; color:var(--ink); font-size:12px; }
.wip-field input:focus,.wip-field select:focus { border-color:#aaa3e8; box-shadow:0 0 0 3px rgba(170,163,232,.16); }
.wip-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.wip-recipe-section { display:grid; border:1px solid var(--line); background:#fcfcf9; }
.wip-recipe-heading { display:flex; align-items:center; justify-content:space-between; }
.wip-recipe-heading>div { display:grid; gap:3px; }
.wip-recipe-heading b { color:var(--ink); }
.wip-recipe-heading small { color:var(--muted); }
.wip-add-row { white-space:nowrap; }
#wipRecipeRows { display:grid; }
.wip-recipe-row { display:grid; border:1px solid #e9e8ed; background:#fff; }
.wip-row-top { display:grid; gap:8px; }
.wip-row-bottom { display:grid; gap:8px; }
.wip-remove-row { border:1px solid #f1dfe2; background:#fff3f3; color:#b45e6a; }
.wip-form-note { color:var(--muted); }
.wip-sheet-actions { display:flex; }
.wip-sheet-actions button { flex:1; font-weight:800; }
.wip-cancel { border:1px solid var(--line); background:#fff; color:var(--ink); }
.wip-save { border:0; background:var(--ink); color:#fff; }
@media(max-width:390px) {
 .wip-page-heading { align-items:stretch; flex-direction:column; }
 .wip-page-heading .wip-primary { width:100%; }
 .wip-form-grid { grid-template-columns:minmax(0,1fr); }
}
@media(prefers-reduced-motion:reduce) { .wip-page { animation:none; } }

/* Master Barang visual language — Resep WIP */
.wip-page { padding-top: 2px; }
.wip-page-heading { margin: 12px 0 14px; gap: 10px; }
.wip-page-heading h1 { font-size: 20px; }
.wip-page-heading p { font-size: 9px; line-height: 1.4; }
.wip-eyebrow { font-size: 8px; }
.wip-primary { min-height: 42px; padding: 0 12px; border-radius: 11px; font-size: 10px; box-shadow: 0 3px 8px rgba(17,18,37,.10), 0 1px 2px rgba(17,18,37,.04); }
.wip-count-grid { gap: 7px; margin-bottom: 11px; }
.wip-count-grid>div { gap: 4px; padding: 10px; border-radius: 12px; box-shadow: 0 2px 5px rgba(17,18,37,.035); }
.wip-count-grid span { font-size: 8px; }
.wip-count-grid b { font-size: 18px; }
.wip-search input { font-size: 12px; }
.wip-filter-row { gap: 7px; margin: 10px 0 13px; }
.wip-filter-row button { min-height: 34px; padding: 0 12px; font-size: 10px; box-shadow: 0 1px 3px rgba(17,18,37,.035); }
.wip-list-heading { margin-bottom: 8px; }
.wip-list-heading h2 { font-size: 12px; }
.wip-list-heading>span { font-size: 9px; }
.wip-list { gap: 8px; }
.wip-card { padding: 11px; border-radius: 15px; box-shadow: 0 3px 10px rgba(17,18,37,.045), 0 1px 2px rgba(17,18,37,.025); }
.wip-card-heading { display: grid; grid-template-columns: minmax(74px,.68fr) minmax(0,1.55fr); align-items: start; gap: 7px; }
.wip-card-copy { min-width: 0; }
.wip-card-title-row { display: flex; align-items: flex-start; flex-direction: column; gap: 4px; }
.wip-card-heading h3 { margin: 0; font-size: 13px; line-height: 1.2; }
.wip-status { min-height: 21px; padding: 2px 8px; font-size: 9px; }
.wip-card-base { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
.wip-card-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; min-width: 0; }
.wip-card-metrics>div { display: flex; min-width: 0; min-height: 46px; flex-direction: column; justify-content: center; gap: 3px; padding: 5px 6px; border-radius: 9px; background: #f8f8f4; box-shadow: 0 1px 3px rgba(17,18,37,.025); }
.wip-card-metrics small { color: var(--muted); font-size: 8px; font-weight: 700; line-height: 1.2; }
.wip-card-metrics b { color: var(--ink); font-size: 10px; line-height: 1.2; overflow-wrap: anywhere; }
.wip-card-metrics b.is-invalid { color: #9a5a63; font-size: 9px; }
.wip-invalid-reason { margin: 7px 0 0; font-size: 9px; }
.wip-card-footer { margin-top: 5px; padding-top: 5px; gap: 6px; }
.wip-card-footer span { min-width: 0; font-size: 9px; line-height: 1.3; }
.wip-card-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 3px; }
.wip-card-actions button { min-height: 36px; padding: 0 7px; border: 0; border-radius: 9px; background: #f5f5f0; color: var(--ink); font-size: 10px; font-weight: 800; box-shadow: 0 1px 3px rgba(17,18,37,.04); }
.wip-card-actions .wip-status-action { background: #f0eff9; color: #6e659d; }
.wip-empty b { font-size: 11px; }
.wip-empty p { font-size: 9px; }

/* Compact WIP form and controls */
.wip-sheet { gap: 10px; }
.wip-close { border-radius: 10px; font-size: 20px; box-shadow: 0 2px 5px rgba(17,18,37,.055); }
.wip-field input { background: #fff; box-shadow: 0 2px 5px rgba(17,18,37,.04), 0 1px 2px rgba(17,18,37,.03); }
.wip-sheet .app-select-trigger { box-shadow: 0 2px 5px rgba(17,18,37,.04), 0 1px 2px rgba(17,18,37,.03); }

.wip-recipe-section { box-shadow: 0 2px 5px rgba(17,18,37,.025); }
.wip-add-row { box-shadow: 0 2px 5px rgba(17,18,37,.035); }
.wip-recipe-row { box-shadow: 0 1px 4px rgba(17,18,37,.025); }


.wip-remove-row { border-radius: 9px; font-size: 17px; box-shadow: 0 1px 3px rgba(17,18,37,.035); }
.wip-sheet-actions button { box-shadow: 0 2px 6px rgba(17,18,37,.06); }
@media(max-width:390px) {
  .wip-page-heading h1 { font-size: 19px; }
  .wip-count-grid>div { padding: 9px 7px; }
  .wip-card { padding: 10px; }
  .wip-card-heading { grid-template-columns: minmax(68px,.62fr) minmax(0,1.58fr); gap: 6px; }
  .wip-card-heading h3 { font-size: 12px; }
  .wip-card-base { font-size: 9px; }
  .wip-card-metrics { gap: 3px; }
  .wip-card-metrics>div { min-height: 43px; padding: 4px 5px; }
  .wip-card-metrics small { font-size: 7px; }
  .wip-card-metrics b { font-size: 9px; }
  .wip-card-footer span { font-size: 8px; }
  .wip-card-actions { gap: 2px; }
  .wip-card-actions button { min-height: 35px; padding: 0 6px; font-size: 9px; }
  
}

/* Compact entry form — align dimensions with Master Barang */
.wip-sheet { gap: 8px; }
.wip-sheet-heading { gap: 8px; margin-bottom: 0; }
.wip-sheet-heading h2 { font-size: 16px; line-height: 1.2; }
.wip-sheet .wip-eyebrow { font-size: 8px; }
.wip-close { width: 40px; height: 40px; flex: 0 0 40px; }
.wip-sheet form { display: grid; gap: 8px; }
.wip-field { gap: 4px; font-size: 11px; line-height: 1.25; }
.wip-field input { height: 44px; padding: 0 10px; border-radius: 10px; font-size: 16px; }
.wip-sheet .app-select-trigger { min-height: 44px; padding: 0 11px; border-radius: 10px; font-size: 13px; }
.wip-sheet .app-select-option { min-height: 40px; padding: 8px 10px; font-size: 13px; }
.wip-form-grid { gap: 7px; }
.wip-recipe-section { gap: 7px; padding: 8px; border-radius: 11px; }
.wip-recipe-heading { gap: 6px; }
.wip-recipe-heading b { font-size: 10px; }
.wip-recipe-heading small { font-size: 8px; line-height: 1.3; }
.wip-add-row { padding: 0 8px; }
#wipRecipeRows { gap: 6px; }
.wip-recipe-row { border-radius: 10px; }
.wip-row-top { grid-template-columns: minmax(0,1fr) 36px; }
.wip-row-bottom { grid-template-columns: repeat(2,minmax(0,1fr)); }
.wip-remove-row { width: 36px; height: 44px; }
.wip-form-note { margin: 0; font-size: 9px; line-height: 1.35; }
.wip-sheet-actions { gap: 7px; margin-top: 0; }
.wip-sheet-actions button { min-height: 44px; border-radius: 10px; font-size: 10px; }
@media(max-width:390px) {
  .wip-sheet form { gap: 7px; }
  .wip-field { font-size: 10px; }
  .wip-field input { height: 44px; }
  .wip-form-grid { gap: 6px; }
  .wip-recipe-section { padding: 8px; }
  .wip-recipe-row { padding: 7px; }
}

/* Two-row ingredient layout */
.wip-recipe-row { position:relative; padding:10px 8px 8px; }
.wip-row-top,.wip-row-bottom { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.wip-row-top { align-items:end; }
.wip-row-top .wip-field { min-width:0; }
.wip-row-top .wip-field select { width:100%; min-width:0; }
.wip-recipe-row .wip-remove-row { position:absolute; top:-7px; right:-7px; z-index:2; }
.wip-row-bottom { margin-top:7px; }

/* Searchable component picker */
.wip-component-search {
  position:relative;
  min-width:0;
}
.wip-component-search input { width:100%; height:44px; padding:0 10px; border:1px solid var(--line); border-radius:10px; outline:0; background:#fbfbf8; color:var(--ink); font-size:13px; }
.wip-component-search input:focus { border-color:#c9c5dc; box-shadow:0 0 0 2px rgba(121,111,158,.08); }
.wip-component-options {
  position:absolute;
  z-index:50;
  top:calc(100% + 4px);
  left:0;
  right:0;
  max-height:180px;
  overflow:auto;
  padding:4px;
  border:1px solid #e6e4eb;
  border-radius:9px;
  background:rgba(255,255,255,.97);
  box-shadow:0 5px 14px rgba(25,25,40,.09);
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
}
.wip-component-options[hidden] { display:none; }
.wip-component-option {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  width:100%;
  min-height:40px;
  padding:8px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#171725;
  text-align:left;
  font-size:13px !important;
}

.wip-component-empty {
  padding:9px 7px;
  color:#85838f;
  font-size:11px;
}

/* Compact four-column recipe editor with 25 prepared rows */
.wip-recipe-section { gap:8px; }
.wip-recipe-labels,.wip-recipe-row { display:grid; align-items:center; }
.wip-recipe-labels { padding:0 0 4px; color:#85838f; font-weight:800; }
.wip-recipe-labels span { min-width:0; }
.wip-recipe-row { padding:4px 0; border-bottom:1px solid #eeedf0; }
.wip-recipe-row:last-child { border-bottom:0; }
.wip-recipe-row .wip-field { min-width:0; margin:0; }
.wip-recipe-row .wip-field select,.wip-recipe-row .wip-field input,.wip-component-search input { box-sizing:border-box; width:100%; min-width:0; height:44px; min-height:44px; border:1px solid #e8e7e9; border-radius:8px; background:#fff; color:#171725; font-size:12px; font-weight:600; }
.wip-recipe-row .wip-field input::placeholder,.wip-component-search input::placeholder { color:#aaa8b0; font-weight:400; }
.wip-component-option:active { background:#f0f3e7; }
.wip-recipe-row .wip-remove-row { width:44px; height:44px; min-height:44px; padding:0; border:1px solid #f1dfe2; border-radius:8px; background:#fff5f5; color:#a95d67; font-size:17px; }
.wip-add-row { width:100%; min-height:44px; margin-top:6px; border:1px solid #dedbed; border-radius:9px; background:#f2f0f8; color:#625b92; font-size:12px; font-weight:700; }

.wip-recipe-row { gap:5px; }
.wip-recipe-labels { gap:5px; font-size:8px; letter-spacing:0; }
.wip-recipe-row .wip-field select,.wip-recipe-row .wip-field input,.wip-component-search input { padding:0 5px; }
.wip-recipe-row .wip-field select { text-overflow:ellipsis; }

/* Three compact actions share one bottom row */
.wip-recipe-actions { display:grid; grid-template-columns:1.2fr 1fr .78fr; gap:7px; margin-top:8px; }
.wip-recipe-actions button { min-width:0; min-height:44px; height:44px; padding:0 5px; border-radius:9px; font-size:11px; font-weight:700; white-space:nowrap; }
.wip-recipe-actions .wip-add-row { width:auto; min-height:44px; height:44px; margin:0; border:1px solid #dedbed; background:#f2f0f8; color:#625b92; box-shadow:none; }
.wip-recipe-actions .wip-save { background:var(--ink); color:#fff; }
.wip-recipe-actions .wip-cancel { border:1px solid var(--line); background:#fff; color:var(--ink); }

/* Match recipe values to the section title and suppress the legacy picker */
.wip-recipe-row [data-wip-component] { display:none !important; }
.wip-recipe-row .wip-field select,
.wip-recipe-row .wip-field input,
.wip-component-search input { font-size:13px !important; font-weight:500; }

/* Final recipe typography: consistent and compact on mobile */
.wip-recipe-heading b { font-size:13px; }
.wip-recipe-row .wip-field input,
.wip-recipe-row .wip-field select,
.wip-component-search input,
.wip-recipe-row .wip-field input::placeholder,
.wip-component-search input::placeholder { font-size:13px !important; }
.wip-recipe-row .app-select-trigger { font-size:13px !important; }

.wip-recipe-row, .wip-recipe-labels { grid-template-columns:minmax(54px,.72fr) minmax(0,1.65fr) minmax(52px,.72fr) minmax(58px,.78fr); }
.wip-recipe-type { min-width:0; min-height:44px; display:flex; align-items:center; padding:0 6px; color:#55546a; font-size:13px; font-weight:600; }
.wip-component-option small { flex:none; color:#77758a; font-size:11px; }

.wip-unit-display {
  min-width:0;
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  padding:0 6px;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  color:#55546a;
  font-size:13px;
  font-weight:600;
  overflow-wrap:anywhere;
}

/* Unit display follows the plain type label: no nested border or card */

/* ---------- menu.css ---------- */
/* =========================================================
   MENU / COGS — mobile-first, shared Guest Operations tokens
   ========================================================= */
.menu-page { padding:4px 0 90px; animation:md-page-in .22s ease both; }
.menu-page-heading { display:flex; align-items:flex-end; justify-content:space-between; }
.menu-page-heading h1 { margin:4px 0 5px; color:var(--ink); font:800 23px Manrope,'DM Sans',sans-serif; letter-spacing:-.045em; }
.menu-page-heading p { max-width:270px; margin:0; color:var(--muted); }
.menu-eyebrow { color:#77728f; font-weight:800; letter-spacing:.12em; }
.menu-primary { border:0; background:var(--ink); color:#fff; font-weight:800; white-space:nowrap; }
.menu-count-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.menu-count-grid>div { display:grid; min-width:0; border:1px solid var(--line); background:#fff; }
.menu-count-grid span { color:var(--muted); }
.menu-count-grid b { color:var(--ink); font:800 20px Manrope,sans-serif; }
.menu-search {
  display:flex;
  align-items:center;
  gap:9px;
  height:44px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:#858594;
  box-shadow:0 2px 5px rgba(17,18,37,.035);
}
.menu-search>span { font-size:20px; line-height:1; }
.menu-search input { width:100%; min-width:0; border:0; outline:0; background:transparent; color:var(--ink); font:500 12px 'DM Sans',sans-serif; }
.menu-filter-row { display:flex; }
.menu-filter-row button { border:1px solid var(--line); border-radius:20px; background:#fff; color:var(--muted); font-weight:800; }
.menu-filter-row button.is-selected { border-color:#dce8b8; background:#eef7d6; color:#526f2d; }
.menu-list-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.menu-list-heading h2 { margin:0; color:var(--ink); font:800 13px Manrope,sans-serif; }
.menu-list-heading>span { color:var(--muted); }
.menu-list { display:grid; }
.menu-card { min-width:0; border:1px solid var(--line); background:#fff; }
.menu-card-heading { justify-content:space-between; }
.menu-card-heading h3 { color:var(--ink); font:800 14px Manrope,sans-serif; overflow-wrap:anywhere; }
.menu-status { display:inline-flex; align-items:center; border-radius:20px; font-weight:800; }
.menu-status.is-active { background:#eef7c7; color:#526f2d; }
.menu-status.is-inactive { background:#eceaf8; color:#6c639e; }
.menu-edit { padding:5px 3px; border:0; background:transparent; color:var(--ink); font-size:10px; font-weight:800; }
.menu-card-prices { margin-top:13px; }
.menu-card-prices small { display:block; color:var(--muted); }
.menu-card-prices b { display:block; color:var(--ink); overflow-wrap:anywhere; }
.menu-card-prices b.is-invalid { color:#9a5a63; }
.menu-margin { display:flex; align-items:center; justify-content:space-between; gap:8px; background:#eef7e9; color:#69824a; font-weight:700; }
.menu-margin b { color:#3e5e2b; }
.menu-invalid-reason { color:#9a5a63; line-height:1.45; }
.menu-card-footer { display:flex; align-items:center; justify-content:space-between; border-top:1px solid var(--line); }
.menu-card-footer span { color:var(--muted); }
.menu-card-footer button { padding:3px 0; border:0; background:transparent; color:#6e659d; font-size:9px; font-weight:800; }

/* Rincian HPP resep: rincian bertingkat untuk komponen WIP. */
.menu-breakdown-toggle, .wip-breakdown-toggle {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--ui-olive, #526f2d);
  font: 700 11px/1.4 var(--ui-font);
}
.menu-breakdown-toggle[aria-expanded="true"], .wip-breakdown-toggle[aria-expanded="true"] { color: var(--ui-ink); }
.menu-breakdown, .wip-breakdown {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--ui-line);
}
.recipe-breakdown-head { display:flex; align-items:baseline; justify-content:space-between; gap:8px; margin-bottom:8px; }
.recipe-breakdown-head b { color:var(--ui-ink); font-size:12px; }
.recipe-breakdown-head span { color:var(--ui-muted); font-size:10px; }
.recipe-breakdown-level { display:grid; gap:7px; min-width:0; }
.recipe-breakdown-item { min-width:0; }
.recipe-breakdown-line { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:9px; padding:8px 9px; border:1px solid var(--ui-line); border-radius:10px; background:var(--ui-surface); }
.recipe-breakdown-name { display:grid; min-width:0; gap:2px; }
.recipe-breakdown-name span { color:var(--ui-muted); font-size:9px; }
.recipe-breakdown-name b { color:var(--ui-ink); font-size:11px; overflow-wrap:anywhere; }
.recipe-breakdown-qty { color:var(--ui-muted); font-size:10px; white-space:nowrap; }
.recipe-breakdown-cost { color:var(--ui-ink); font-size:11px; text-align:right; white-space:nowrap; }
.recipe-breakdown-item.is-wip > .recipe-breakdown-line { border-color:var(--ui-olive); background:var(--ui-surface-soft); }
.recipe-breakdown-nested {
  position: relative;
  margin: 7px 0 0 16px;
  padding: 2px 0 2px 17px;
  border-left: 2px solid var(--ui-olive);
  transform-origin: top;
}
.recipe-breakdown-nested.is-opening { animation: recipe-wip-expand .22s ease-out both; }
.recipe-breakdown-nested.is-closing { animation: recipe-wip-collapse .18s ease-in both; }
.recipe-breakdown-nested > .recipe-breakdown-level > .recipe-breakdown-item {
  position: relative;
}
.recipe-breakdown-nested > .recipe-breakdown-level > .recipe-breakdown-item::before {
  content: "";
  position: absolute;
  top: 21px;
  left: -17px;
  width: 12px;
  border-top: 1.5px solid var(--ui-olive);
}
.recipe-breakdown-nested > .recipe-breakdown-level > .recipe-breakdown-item::after {
  content: "";
  position: absolute;
  top: 17px;
  left: -7px;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--ui-olive);
  border-radius: 50%;
  background: var(--ui-card, #fff);
}
.recipe-breakdown-line[data-menu-action="toggle-wip-details"] {
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease;
}
.recipe-breakdown-line[data-menu-action="toggle-wip-details"]:hover {
  background: var(--ui-surface-soft);
  border-color: var(--ui-olive);
}
.recipe-breakdown-line[data-menu-action="toggle-wip-details"]:focus-visible {
  outline: 2px solid var(--ui-olive);
  outline-offset: 2px;
}
@keyframes recipe-wip-expand {
  from { opacity: 0; transform: translateY(-7px) scaleY(.97); }
  to { opacity: 1; transform: translateY(0) scaleY(1); }
}
@keyframes recipe-wip-collapse {
  from { opacity: 1; transform: translateY(0) scaleY(1); }
  to { opacity: 0; transform: translateY(-5px) scaleY(.97); }
}
@media (prefers-reduced-motion: reduce) {
  .recipe-breakdown-nested.is-opening,
  .recipe-breakdown-nested.is-closing { animation-duration: .01ms; }
}
.recipe-breakdown-nested[hidden] { display: none; }
.recipe-breakdown-summary { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:7px; padding:9px 10px; border-radius:9px; background:var(--ui-surface-soft); color:var(--ui-muted); font-size:11px; }
.recipe-breakdown-summary b { color:var(--ui-ink); font-size:12px; }
.recipe-breakdown-summary.is-margin { background:var(--ui-lime-soft, var(--ui-surface-soft)); color:var(--ui-ink); }
.recipe-breakdown-empty, .menu-breakdown-empty, .wip-breakdown-empty { margin:0; color:var(--ui-muted); font-size:11px; }
.menu-breakdown[hidden], .wip-breakdown[hidden] { display:none; }
@media(max-width:520px) {
  .recipe-breakdown-line { grid-template-columns:minmax(0,1fr) auto; gap:5px 8px; }
  .recipe-breakdown-qty { grid-column:1; grid-row:2; }
  .recipe-breakdown-cost { grid-column:2; grid-row:1 / span 2; }
  .recipe-breakdown-nested { margin-left:7px; padding-left:7px; }
}

.menu-empty {
  padding:22px 14px;
  border:1px dashed #dcdce5;
  border-radius:14px;
  background:#fff;
  text-align:center;
}
.menu-empty b { color:var(--ink); }
.menu-empty p { margin:5px 0 0; color:var(--muted); line-height:1.5; }
.menu-sheet { display:grid; gap:13px; }
.menu-sheet-heading { display:flex; align-items:center; justify-content:space-between; }
.menu-sheet-heading h2 { margin:4px 0 0; color:var(--ink); font:800 19px Manrope,sans-serif; letter-spacing:-.035em; }
.menu-close { border:0; background:#f1f1ed; color:var(--ink); }
.menu-field { display:grid; min-width:0; color:#55576a; font-weight:800; }
.menu-field i { color:#9b8bd7; font-style:normal; }
.menu-field input,.menu-field select { width:100%; min-width:0; height:41px; padding:0 10px; border:1px solid var(--line); border-radius:10px; outline:0; background:#fbfbf8; color:var(--ink); font-size:12px; }
.menu-field input:focus,.menu-field select:focus { border-color:#aaa3e8; box-shadow:0 0 0 3px rgba(170,163,232,.16); }
.menu-recipe-section { display:grid; border:1px solid var(--line); background:#fcfcf9; }
.menu-recipe-heading { display:flex; align-items:center; justify-content:space-between; }
.menu-recipe-heading>div { display:grid; gap:3px; }
.menu-recipe-heading b { color:var(--ink); }
.menu-recipe-heading small { color:var(--muted); }
.menu-add-row { white-space:nowrap; }
#menuRecipeRows { display:grid; }
.menu-recipe-row { display:grid; border:1px solid #e9e8ed; background:#fff; }
.menu-row-top { display:grid; gap:8px; }
.menu-row-bottom { display:grid; gap:8px; }
.menu-remove-row { border:1px solid #f1dfe2; background:#fff3f3; color:#b45e6a; }
.menu-form-note { color:var(--muted); }
.menu-sheet-actions { display:flex; }
.menu-sheet-actions button { flex:1; font-weight:800; }
.menu-cancel { border:1px solid var(--line); background:#fff; color:var(--ink); }
.menu-save { border:0; background:var(--ink); color:#fff; }
@media(max-width:390px) {
 .menu-page-heading { align-items:stretch; flex-direction:column; }
 .menu-page-heading .menu-primary { width:100%; }
}
@media(prefers-reduced-motion:reduce) { .menu-page { animation:none; } }

/* Master Barang visual language — Menu */
.menu-page { padding-top: 2px; }
.menu-page-heading { margin: 12px 0 14px; gap: 10px; }
.menu-page-heading h1 { font-size: 20px; }
.menu-page-heading p { font-size: 9px; line-height: 1.4; }
.menu-eyebrow { font-size: 8px; }
.menu-primary { min-height: 42px; padding: 0 12px; border-radius: 11px; font-size: 10px; box-shadow: 0 3px 8px rgba(17,18,37,.10), 0 1px 2px rgba(17,18,37,.04); }
.menu-count-grid { gap: 7px; margin-bottom: 11px; }
.menu-count-grid>div { gap: 4px; padding: 10px; border-radius: 12px; box-shadow: 0 2px 5px rgba(17,18,37,.035); }
.menu-count-grid span { font-size: 8px; }
.menu-count-grid b { font-size: 18px; }
.menu-search input { font-size: 12px; }
.menu-filter-row { gap: 7px; margin: 10px 0 13px; }
.menu-filter-row button { min-height: 34px; padding: 0 12px; font-size: 10px; box-shadow: 0 1px 3px rgba(17,18,37,.035); }
.menu-list-heading { margin-bottom: 8px; }
.menu-list-heading h2 { font-size: 12px; }
.menu-list-heading>span { font-size: 9px; }
.menu-list { gap: 8px; }
.menu-card { padding: 11px; border-radius: 15px; box-shadow: 0 3px 10px rgba(17,18,37,.045), 0 1px 2px rgba(17,18,37,.025); }
.menu-card-heading { display: grid; grid-template-columns: minmax(74px,.68fr) minmax(0,1.55fr); align-items: start; gap: 7px; }
.menu-card-copy { min-width: 0; }
.menu-card-title-row { display: flex; align-items: flex-start; flex-direction: column; gap: 4px; }
.menu-card-heading h3 { margin: 0; font-size: 13px; line-height: 1.2; }
.menu-status { min-height: 21px; padding: 2px 8px; font-size: 9px; }
.menu-card-base { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.menu-card-prices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; min-width: 0; margin: 0; }
.menu-card-prices>div { display: flex; min-width: 0; min-height: 46px; flex-direction: column; justify-content: center; gap: 3px; padding: 5px 6px; border-radius: 9px; background: #f8f8f4; box-shadow: 0 1px 3px rgba(17,18,37,.025); }
.menu-card-prices small { font-size: 8px; font-weight: 700; line-height: 1.2; }
.menu-card-prices b { margin-top: 0; font-size: 10px; line-height: 1.2; }
.menu-card-prices b.is-invalid { font-size: 9px; }
.menu-margin { margin-top: 7px; padding: 7px 9px; border-radius: 9px; font-size: 9px; box-shadow: 0 1px 3px rgba(17,18,37,.025); }
.menu-margin b { font-size: 10px; }
.menu-invalid-reason { margin: 6px 0 0; font-size: 9px; }
.menu-card-footer { margin-top: 5px; padding-top: 5px; gap: 6px; }
.menu-card-footer span { min-width: 0; font-size: 9px; line-height: 1.3; }
.menu-card-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 3px; }
.menu-card-actions button { min-height: 36px; padding: 0 7px; border: 0; border-radius: 9px; background: #f5f5f0; color: var(--ink); font-size: 10px; font-weight: 800; box-shadow: 0 1px 3px rgba(17,18,37,.04); }
.menu-card-actions .menu-status-action { background: #f0eff9; color: #6e659d; }
.menu-empty b { font-size: 11px; }
.menu-empty p { font-size: 9px; }

/* Compact Menu form and controls */
.menu-sheet { gap: 10px; }
.menu-close { border-radius: 10px; font-size: 20px; box-shadow: 0 2px 5px rgba(17,18,37,.055); }
.menu-field input { background: #fff; box-shadow: 0 2px 5px rgba(17,18,37,.04), 0 1px 2px rgba(17,18,37,.03); }
.menu-sheet .app-select-trigger { box-shadow: 0 2px 5px rgba(17,18,37,.04), 0 1px 2px rgba(17,18,37,.03); }
.menu-recipe-section { box-shadow: 0 2px 5px rgba(17,18,37,.025); }
.menu-add-row { box-shadow: 0 2px 5px rgba(17,18,37,.035); }
.menu-recipe-row { box-shadow: 0 1px 4px rgba(17,18,37,.025); }


.menu-remove-row { border-radius: 9px; font-size: 17px; box-shadow: 0 1px 3px rgba(17,18,37,.035); }
.menu-sheet-actions button { box-shadow: 0 2px 6px rgba(17,18,37,.06); }
@media(max-width:390px) {
  .menu-page-heading h1 { font-size: 19px; }
  .menu-count-grid>div { padding: 9px 7px; }
  .menu-card { padding: 10px; }
  .menu-card-heading { grid-template-columns: minmax(68px,.62fr) minmax(0,1.58fr); gap: 6px; }
  .menu-card-heading h3 { font-size: 12px; }
  .menu-card-base { font-size: 9px; }
  .menu-card-prices { gap: 3px; }
  .menu-card-prices>div { min-height: 43px; padding: 4px 5px; }
  .menu-card-prices small { font-size: 7px; }
  .menu-card-prices b { font-size: 9px; }
  .menu-margin { margin-top: 6px; padding: 6px 8px; font-size: 8px; }
  .menu-margin b { font-size: 9px; }
  .menu-card-footer span { font-size: 8px; }
  .menu-card-actions { gap: 2px; }
  .menu-card-actions button { min-height: 35px; padding: 0 6px; font-size: 9px; }
  
}

/* Compact entry form — align dimensions with Master Barang */
.menu-sheet { gap: 8px; }
.menu-sheet-heading { gap: 8px; margin-bottom: 0; }
.menu-sheet-heading h2 { font-size: 16px; line-height: 1.2; }
.menu-sheet .menu-eyebrow { font-size: 8px; }
.menu-close { width: 40px; height: 40px; flex: 0 0 40px; }
.menu-sheet form { display: grid; gap: 8px; }
.menu-field { gap: 4px; font-size: 11px; line-height: 1.25; }
.menu-field input { height: 44px; padding: 0 10px; border-radius: 10px; font-size: 16px; }
.menu-sheet .app-select-trigger { min-height: 44px; padding: 0 11px; border-radius: 10px; font-size: 13px; }
.menu-sheet .app-select-option { min-height: 40px; padding: 8px 10px; font-size: 13px; }
.menu-recipe-section { gap: 7px; padding: 8px; border-radius: 11px; }
.menu-recipe-heading { gap: 6px; }
.menu-recipe-heading b { font-size: 10px; }
.menu-recipe-heading small { font-size: 8px; line-height: 1.3; }
.menu-add-row { padding: 0 8px; }
#menuRecipeRows { gap: 6px; }
.menu-recipe-row { border-radius: 10px; }
.menu-row-top { grid-template-columns: minmax(0,1fr) 36px; }
.menu-row-bottom { grid-template-columns: repeat(2,minmax(0,1fr)); }
.menu-remove-row { width: 36px; height: 44px; }
.menu-form-note { margin: 0; font-size: 9px; line-height: 1.35; }
.menu-sheet-actions { gap: 7px; margin-top: 0; }
.menu-sheet-actions button { min-height: 44px; border-radius: 10px; font-size: 10px; }
@media(max-width:390px) {
  .menu-sheet form { gap: 7px; }
  .menu-field { font-size: 10px; }
  .menu-field input { height: 44px; }
  .menu-recipe-section { padding: 8px; }
  .menu-recipe-row { padding: 7px; }
}

/* Two-row ingredient layout */
.menu-recipe-row { position:relative; padding:10px 8px 8px; }
.menu-row-top,.menu-row-bottom { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.menu-row-top { align-items:end; }
.menu-row-top .menu-field { min-width:0; }
.menu-row-top .menu-field select { width:100%; min-width:0; }
.menu-recipe-row .menu-remove-row { position:absolute; top:-7px; right:-7px; z-index:2; }
.menu-row-bottom { margin-top:7px; }

/* Searchable component picker */
.menu-component-search {
  position:relative;
  min-width:0;
}
.menu-component-search input { width:100%; height:44px; padding:0 10px; border:1px solid var(--line); border-radius:10px; outline:0; background:#fbfbf8; color:var(--ink); font-size:13px; }
.menu-component-search input:focus { border-color:#c9c5dc; box-shadow:0 0 0 2px rgba(121,111,158,.08); }
.menu-component-options {
  position:absolute;
  z-index:50;
  top:calc(100% + 4px);
  left:0;
  right:0;
  max-height:180px;
  overflow:auto;
  padding:4px;
  border:1px solid #e6e4eb;
  border-radius:9px;
  background:rgba(255,255,255,.97);
  box-shadow:0 5px 14px rgba(25,25,40,.09);
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
}
.menu-component-options[hidden] { display:none; }
.menu-component-option {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  width:100%;
  min-height:40px;
  padding:8px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#171725;
  text-align:left;
  font-size:13px !important;
}

.menu-component-empty {
  padding:9px 7px;
  color:#85838f;
  font-size:11px;
}

/* Compact four-column recipe editor with 25 prepared rows */
.menu-recipe-section { gap:8px; }
.menu-recipe-labels,.menu-recipe-row { display:grid; align-items:center; }
.menu-recipe-labels { padding:0 0 4px; color:#85838f; font-weight:800; }
.menu-recipe-labels span { min-width:0; }
.menu-recipe-row { padding:4px 0; border-bottom:1px solid #eeedf0; }
.menu-recipe-row:last-child { border-bottom:0; }
.menu-recipe-row .menu-field { min-width:0; margin:0; }
.menu-recipe-row .menu-field select,.menu-recipe-row .menu-field input,.menu-component-search input { box-sizing:border-box; width:100%; min-width:0; height:44px; min-height:44px; border:1px solid #e8e7e9; border-radius:8px; background:#fff; color:#171725; font-size:12px; font-weight:600; }
.menu-recipe-row .menu-field input::placeholder,.menu-component-search input::placeholder { color:#aaa8b0; font-weight:400; }
.menu-component-option:active { background:#f0f3e7; }
.menu-recipe-row .menu-remove-row { width:44px; height:44px; min-height:44px; padding:0; border:1px solid #f1dfe2; border-radius:8px; background:#fff5f5; color:#a95d67; font-size:17px; }
.menu-add-row { width:100%; min-height:44px; margin-top:6px; border:1px solid #dedbed; border-radius:9px; background:#f2f0f8; color:#625b92; font-size:12px; font-weight:700; }

.menu-recipe-row { gap:5px; }
.menu-recipe-labels { gap:5px; font-size:8px; letter-spacing:0; }
.menu-recipe-row .menu-field select,.menu-recipe-row .menu-field input,.menu-component-search input { padding:0 5px; }
.menu-recipe-row .menu-field select { text-overflow:ellipsis; }

/* Three compact actions share one bottom row */
.menu-recipe-actions { display:grid; grid-template-columns:1.2fr 1fr .78fr; gap:7px; margin-top:8px; }
.menu-recipe-actions button { min-width:0; min-height:44px; height:44px; padding:0 5px; border-radius:9px; font-size:11px; font-weight:700; white-space:nowrap; }
.menu-recipe-actions .menu-add-row { width:auto; min-height:44px; height:44px; margin:0; border:1px solid #dedbed; background:#f2f0f8; color:#625b92; box-shadow:none; }
.menu-recipe-actions .menu-save { background:var(--ink); color:#fff; }
.menu-recipe-actions .menu-cancel { border:1px solid var(--line); background:#fff; color:var(--ink); }

/* Match recipe values to the section title and suppress the legacy picker */
.menu-recipe-row [data-menu-component] { display:none !important; }
.menu-recipe-row .menu-field select,
.menu-recipe-row .menu-field input,
.menu-component-search input { font-size:13px !important; font-weight:500; }

/* Final recipe typography: consistent and compact on mobile */
.menu-recipe-heading b { font-size:13px; }
.menu-recipe-row .menu-field input,
.menu-recipe-row .menu-field select,
.menu-component-search input,
.menu-recipe-row .menu-field input::placeholder,
.menu-component-search input::placeholder { font-size:13px !important; }
.menu-recipe-row .app-select-trigger { font-size:13px !important; }

.menu-recipe-row, .menu-recipe-labels { grid-template-columns:minmax(54px,.72fr) minmax(0,1.65fr) minmax(52px,.72fr) minmax(58px,.78fr); }
.menu-recipe-type { min-width:0; min-height:44px; display:flex; align-items:center; padding:0 6px; color:#55546a; font-size:13px; font-weight:600; }
.menu-component-option small { flex:none; color:#77758a; font-size:11px; }

.menu-unit-display {
  min-width:0;
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  padding:0 6px;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  color:#55546a;
  font-size:13px;
  font-weight:600;
  overflow-wrap:anywhere;
}

/* Unit display follows the plain type label: no nested border or card */

/* ---------- masterdata-export.css ---------- */
/* Toolbar export Excel — hanya digunakan pada tiga halaman Master Data. */
.md-export-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.md-export-toolbar > .md-search,
.md-export-toolbar > .wip-search,
.md-export-toolbar > .menu-search {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}
.md-export-toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.md-export-button {
  display: inline-flex;
  min-height: 42px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line, #e7e7e2);
  border-radius: 11px;
  background: #fff;
  color: var(--ink, #17172a);
  font: 800 10px 'DM Sans', sans-serif;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(17,18,37,.04);
  transition: background .18s ease, border-color .18s ease, transform .18s ease, opacity .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.md-export-button:active:not(:disabled) { transform: scale(.97); }
.md-export-button:disabled { cursor: wait; opacity: .62; }
.md-export-button:focus-visible {
  outline: 2px solid rgba(126,115,177,.48);
  outline-offset: 2px;
}
@media (hover: hover) {
  .md-export-button:hover:not(:disabled) {
    border-color: #cbcbd3;
    background: #fafaf7;
  }
}
@media (max-width: 560px) {
  .md-export-toolbar { flex-wrap: wrap; }
  .md-export-toolbar > .md-search,
  .md-export-toolbar > .wip-search,
  .md-export-toolbar > .menu-search {
    flex: 1 1 100%;
    width: 100%;
  }
  .md-export-toolbar-actions {
    width: 100%;
  }
  .md-export-toolbar-actions > .md-filter-row,
  .md-export-toolbar-actions > .wip-filter-row,
  .md-export-toolbar-actions > .menu-filter-row {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 0;
  }
  .md-export-toolbar-actions > .md-filter-row button,
  .md-export-toolbar-actions > .wip-filter-row button,
  .md-export-toolbar-actions > .menu-filter-row button {
    min-height: 38px;
    padding: 0 7px;
    font-size: 9px;
    white-space: nowrap;
  }
}
@media (max-width: 360px) {
  .md-export-toolbar-actions { gap: 3px; }
  .md-export-toolbar-actions > .md-filter-row,
  .md-export-toolbar-actions > .wip-filter-row,
  .md-export-toolbar-actions > .menu-filter-row { gap: 3px; }
  .md-export-toolbar-actions > .md-filter-row button,
  .md-export-toolbar-actions > .wip-filter-row button,
  .md-export-toolbar-actions > .menu-filter-row button {
    padding: 0 6px;
    font-size: 8px;
  }
  .md-export-button { padding: 0 7px; font-size: 8px; }
  .md-export-toolbar-actions > .md-primary,
  .md-export-toolbar-actions > .wip-primary,
  .md-export-toolbar-actions > .menu-primary {
    padding: 0 7px;
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .md-export-button { transition: none; }
}


/* Master Barang: filter status sejajar dengan aksi toolbar pada layar mobile. */
@media (max-width: 560px) {
  .md-export-toolbar-actions {
    justify-content: space-between;
    gap: 4px;
  }
  .md-export-toolbar-actions .md-filter-row {
    flex: 0 0 auto;
    gap: 4px;
    padding: 0;
  }
  .md-export-toolbar-actions .md-filter-row button {
    min-height: 38px;
    padding: 0 7px;
    font-size: 9px;
  }
  .md-export-toolbar-actions .md-export-button {
    min-height: 38px;
    padding: 0 8px;
    font-size: 9px;
  }
  .md-export-toolbar-actions > .md-primary {
    min-height: 38px;
    padding: 0 8px;
    font-size: 9px;
    white-space: nowrap;
  }
}

/* Compact mobile toolbar controls across Master Barang, Resep WIP, and Menu. */
@media (max-width: 560px) {
  .md-export-toolbar-actions {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 3px;
  }
  .md-export-toolbar-actions > .md-filter-row,
  .md-export-toolbar-actions > .wip-filter-row,
  .md-export-toolbar-actions > .menu-filter-row {
    flex: 0 0 auto;
    gap: 3px;
  }
  .md-export-toolbar-actions > .md-filter-row button,
  .md-export-toolbar-actions > .wip-filter-row button,
  .md-export-toolbar-actions > .menu-filter-row button {
    box-sizing: border-box;
    min-height: 32px;
    padding: 0 7px;
    font-size: 8px;
    line-height: 1;
  }
  .md-export-toolbar-actions > .md-export-button {
    min-height: 34px;
    padding: 0 8px;
    font-size: 8px;
  }
  .md-export-toolbar-actions > .md-primary,
  .md-export-toolbar-actions > .wip-primary,
  .md-export-toolbar-actions > .menu-primary {
    min-height: 34px;
    padding: 0 9px;
    border-radius: 10px;
    font-size: 8px;
    line-height: 1;
  }
}
@media (max-width: 390px) {
  .md-export-toolbar-actions > .md-filter-row button,
  .md-export-toolbar-actions > .wip-filter-row button,
  .md-export-toolbar-actions > .menu-filter-row button { padding: 0 6px; }
  .md-export-toolbar-actions > .md-export-button { padding: 0 7px; }
  .md-export-toolbar-actions > .md-primary,
  .md-export-toolbar-actions > .wip-primary,
  .md-export-toolbar-actions > .menu-primary { padding: 0 7px; }
}

/* Toolbar alignment: consistent control height and compact spacing on all Master Data pages. */
.md-export-toolbar-actions {
  justify-content: flex-start;
  gap: 8px;
}
.md-export-toolbar-actions > .md-filter-row,
.md-export-toolbar-actions > .wip-filter-row,
.md-export-toolbar-actions > .menu-filter-row {
  align-items: center;
  gap: 8px;
  margin: 0;
}
.md-export-toolbar-actions > .md-filter-row button,
.md-export-toolbar-actions > .wip-filter-row button,
.md-export-toolbar-actions > .menu-filter-row button,
.md-export-toolbar-actions > .md-export-button,
.md-export-toolbar-actions > .md-primary,
.md-export-toolbar-actions > .wip-primary,
.md-export-toolbar-actions > .menu-primary {
  box-sizing: border-box;
  display: inline-flex;
  min-height: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 11px;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .md-export-toolbar-actions {
    justify-content: flex-start;
    gap: 6px;
  }
  .md-export-toolbar-actions > .md-filter-row,
  .md-export-toolbar-actions > .wip-filter-row,
  .md-export-toolbar-actions > .menu-filter-row {
    gap: 6px;
    margin: 0;
  }
  .md-export-toolbar-actions > .md-filter-row button,
  .md-export-toolbar-actions > .wip-filter-row button,
  .md-export-toolbar-actions > .menu-filter-row button,
  .md-export-toolbar-actions > .md-export-button,
  .md-export-toolbar-actions > .md-primary,
  .md-export-toolbar-actions > .wip-primary,
  .md-export-toolbar-actions > .menu-primary {
    min-height: 38px;
    height: 38px;
    padding: 0 9px;
    font-size: 9px;
  }
}
@media (max-width: 390px) {
  .md-export-toolbar-actions { gap: 4px; }
  .md-export-toolbar-actions > .md-filter-row,
  .md-export-toolbar-actions > .wip-filter-row,
  .md-export-toolbar-actions > .menu-filter-row { gap: 4px; }
  .md-export-toolbar-actions > .md-filter-row button,
  .md-export-toolbar-actions > .wip-filter-row button,
  .md-export-toolbar-actions > .menu-filter-row button,
  .md-export-toolbar-actions > .md-export-button,
  .md-export-toolbar-actions > .md-primary,
  .md-export-toolbar-actions > .wip-primary,
  .md-export-toolbar-actions > .menu-primary {
    min-height: 36px;
    height: 36px;
    padding: 0 7px;
    font-size: 8px;
  }
}

/* Keep status filters on the left and export/create actions grouped on the right. */
.md-export-toolbar-actions {
  flex: 1 1 auto;
  min-width: 0;
}
.md-export-toolbar-actions > .md-export-button {
  margin-left: auto;
}

/* ---------- desktop.css ---------- */
/* =========================================================
   DESKTOP WORKSPACE — sidebar and dashboard layout
   Desktop-only rules. Mobile navigation/layout remain unchanged.
   ========================================================= */
@media (min-width: 900px) {
  .top {
    box-shadow: 0 5px 18px rgba(20,35,63,.07);
  }
  :root { --desktop-sidebar-width: 250px; }

  body { min-width: 900px; }
  .app {
    width: calc(100% - var(--desktop-sidebar-width));
    max-width: none;
    min-height: 100dvh;
    margin: 0 0 0 var(--desktop-sidebar-width);
    padding: 0;
  }

  .top {
    position: sticky;
    top: 0;
    z-index: 80;
    min-height: 82px;
    padding: 14px 32px;
    gap: 22px;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
  }
  .top > .brand { display: none; }
  .workspace-scope-switcher { margin-left: 0; }
  .top-actions { margin-left: auto; gap: 10px; }
  .menu-toggle { display: none !important; }
  .profile, .auth-logout-button { width: 42px; height: 42px; }

  .menu-backdrop { display: none !important; }
  .menu-drawer {
    position: fixed;
    z-index: 70;
    inset: 0 auto 0 0;
    width: var(--desktop-sidebar-width);
    height: 100dvh;
    padding: 26px 18px 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transform: none !important;
    visibility: visible !important;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0;
    background: #fff;
    box-shadow: 8px 0 28px rgba(20,35,63,.045);
  }
  .drawer-head {
    padding: 4px 2px 22px;
    border-bottom: 1px solid var(--line);
  }
  .drawer-head strong { color: var(--ink); font: 800 16px Manrope,sans-serif; }
  .drawer-kicker { color: var(--muted); }
  .drawer-close { display: none !important; }
  .drawer-nav { display: grid; gap: 7px; padding-top: 20px; }
  .drawer-item {
    width: 100%;
    min-height: 46px;
    height: 46px;
    justify-content: flex-start;
    padding: 0 12px;
    border-radius: 12px;
    color: #111225;
    font-size: 13px;
  }
  .drawer-item.active {
    background: #eff6c7;
    color: #111225;
  }
  .drawer-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: #899b4d;
  }
  .drawer-item .drawer-chevron { display: none; }
  .drawer-foot {
    margin-top: auto;
    border-top-color: var(--line);
    color: var(--muted);
  }

  .content {
    width: 100%;
    max-width: none;
    padding: 30px 32px 48px;
  }
  #page-dashboard.page.active {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    column-gap: 28px;
    row-gap: 18px;
    align-items: start;
  }
  #page-dashboard > .greeting {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    margin: 0 0 4px;
    align-items: center;
  }
  #page-dashboard > .greeting h1 {
    margin-top: 4px;
    font-size: 29px;
  }
  #page-dashboard > .greeting .date {
    display: block !important;
    font-size: 12px;
    padding: 10px 13px;
    border-radius: 12px;
  }
  #page-dashboard > .hero {
    grid-column: 1;
    grid-row: 2;
    min-height: 190px;
    height: auto;
    padding: 22px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(20,35,63,.09);
  }
  #page-dashboard > .hero .hero-total { font-size: 56px; }
  #page-dashboard > .hero .hero-label { font-size: 13px; }
  #page-dashboard > .hero .hero-foot span { font-size: 12px; }

  #page-dashboard > .metrics {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
    height: auto;
    min-height: 112px;
    margin: 0;
    gap: 12px;
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  #page-dashboard > .metrics .metric {
    min-height: 112px;
    height: auto;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(20,35,63,.045);
  }
  #page-dashboard > .metrics .metric-top .eyebrow { font-size: 11px; }
  #page-dashboard > .metrics .metric-icon { width: 34px; height: 34px; border-radius: 11px; }
  #page-dashboard > .metrics .metric-icon svg { width: 17px; height: 17px; }
  #page-dashboard > .metrics .metric strong { padding-top: 5px; font-size: 30px; }
  #page-dashboard > .metrics .metric small { font-size: 10px; }

  #page-dashboard > #pendingWrap {
    grid-column: 1;
    grid-row: 4;
    min-width: 0;
  }
  #page-dashboard > .section-head {
    grid-column: 2;
    grid-row: 1;
    margin: 0 0 4px;
    align-self: center;
  }
  #page-dashboard > .section-head h2 { font-size: 20px; }
  #page-dashboard > .section-head .text-btn { font-size: 12px; }
  #page-dashboard > #dashboardList {
    grid-column: 2;
    grid-row: 2 / span 2;
    align-self: stretch;
    display: grid;
    grid-template-columns: minmax(0,1fr);
    grid-auto-rows: max-content;
    align-content: start;
    gap: 10px;
    width: 100%;
    min-width: 0;
    height: auto;
    max-height: 290px;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
  }

  #page-dashboard > #dashboardList > .guest {
    align-self: start;
    height: auto;
    min-height: 104px;
  }
  #page-dashboard > #dashboardList .guest {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 10px 14px;
    padding: 13px 14px 13px 68px;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(20,35,63,.04);
  }
  #page-dashboard > #dashboardList .guest-row { min-width: 0; }
  #page-dashboard > #dashboardList .guest-bottom {
    margin: 0;
    justify-content: flex-end;
    gap: 10px;
  }
  #page-dashboard > #dashboardList .guest-bottom .actions { gap: 5px; }
  #page-dashboard > #dashboardList .guest-bottom .mini { padding: 6px 8px; }
  #page-dashboard > #dashboardList > .empty {
    grid-column: 1;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(20,35,63,.045);
  }

  /* Consistent elevation for every dashboard card on desktop. */
  #page-dashboard > .hero {
    box-shadow: 0 8px 24px rgba(20,35,63,.10);
  }
  #page-dashboard > .metrics .metric,
  #page-dashboard > #dashboardList .guest,
  #page-dashboard > #dashboardList > .empty,
  #page-dashboard > #pendingWrap .pending {
    box-shadow: 0 5px 18px rgba(20,35,63,.075);
  }


  /* Reservation calendar on the desktop dashboard; hidden on mobile. */
  #page-dashboard > .dashboard-reservations { display: none; }
  #page-dashboard > .dashboard-reservations {
    display: block;
    grid-column: 1 / -1;
    grid-row: 5;
    min-width: 0;
    margin-top: 8px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(20,35,63,.075);
  }
  .dashboard-reservations-head,
  .dashboard-reservation-month,
  .dashboard-reservation-details-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }
  .dashboard-reservations-head { margin-bottom: 18px; }
  .dashboard-reservations-head h2 {
    margin: 4px 0 0;
    color: var(--ink);
    font: 800 20px Manrope,sans-serif;
  }
  .dashboard-reservations-layout {
    display: grid;
    grid-template-columns: minmax(300px,.88fr) minmax(0,1.12fr);
    gap: 22px;
    align-items: stretch;
  }
  .dashboard-reservation-calendar-panel {
    min-width: 0;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fafbf8;
  }
  .dashboard-reservation-month strong {
    color: var(--ink);
    font: 800 16px Manrope,sans-serif;
    text-transform: capitalize;
  }
  .dashboard-reservation-calendar {
    gap: 6px;
    padding: 8px 0 0;
    background: transparent;
  }
  .dashboard-reservation-calendar .reservation-day { min-height: 43px; }
  .dashboard-reservation-details {
    min-width: 0;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
  }
  .dashboard-reservation-details-head { margin-bottom: 14px; }
  .dashboard-reservation-details-head h3 {
    margin: 0;
    color: var(--ink);
    font: 800 16px Manrope,sans-serif;
    text-transform: capitalize;
  }
  .dashboard-reservation-details-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
  }
  .dashboard-reservation-list { display: grid; gap: 9px; }
  .dashboard-reservation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
  }
  .dashboard-reservation-item-main {
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
  }
  .dashboard-reservation-item-main strong {
    overflow: hidden;
    color: var(--ink);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dashboard-reservation-item-main small { color: var(--muted); font-size: 10px; }
  .dashboard-reservation-item-main .reservation-status {
    justify-self: start;
    width: fit-content;
    max-width: 100%;
  }
  .dashboard-reservation-item-side {
    display: grid;
    justify-items: end;
    gap: 7px;
    flex: 0 0 auto;
  }
  .dashboard-reservation-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }
  .dashboard-reservation-item-side .dashboard-reservation-actions button {
    min-height: 27px;
    padding: 5px 8px;
    font-size: 10px;
  }
  .dashboard-reservation-item-side .dashboard-reservation-actions .dashboard-reservation-wa {
    background: #111225;
    color: #fff;
  }
  .dashboard-reservation-item-side .dashboard-reservation-actions .dashboard-reservation-seat {
    background: #111225;
    color: #fff;
  }
  .dashboard-reservation-item-side button {
    padding: 5px 9px;
    border: 0;
    border-radius: 8px;
    background: #edf3ff;
    color: var(--blue);
    font-size: 10px;
    font-weight: 800;
  }
  .dashboard-reservation-list .reservation-empty {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--line);
    border-radius: 13px;
    color: var(--muted);
    text-align: center;
    font-size: 11px;
  }
  .dashboard-reservation-list .reservation-empty strong {
    margin-bottom: 5px;
    color: var(--ink);
    font-size: 13px;
  }
  @media (max-width: 1150px) {
    .dashboard-reservations-layout { grid-template-columns: minmax(260px,.85fr) minmax(0,1.15fr); gap: 14px; }
    #page-dashboard > .dashboard-reservations { padding: 16px; }
  }

  .fab { right: 32px; bottom: 28px; }
  .quick-menu { right: 27px; bottom: 86px; max-height: calc(100dvh - 102px); }
  .sheet.operational-modal { left: calc(50% + 125px); }
}

@media (min-width: 900px) and (max-width: 1150px) {
  .content { padding-right: 22px; padding-left: 22px; }
  #page-dashboard.page.active { grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr); gap: 18px; }
  #page-dashboard > #dashboardList .guest { grid-template-columns: 1fr; }
  #page-dashboard > #dashboardList .guest-bottom { justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-drawer, .drawer-item, #page-dashboard .metric, #page-dashboard .guest { animation: none !important; transition: none !important; }
}


/* Desktop sidebar can be collapsed without affecting mobile navigation. */
@media (min-width: 900px) {
  .desktop-sidebar-toggle {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .2s;
  }
  .desktop-sidebar-toggle:hover { background: #f3f6fb; border-color: #cbd5e4; }
  .desktop-sidebar-toggle:active { transform: scale(.96); }
  .desktop-sidebar-toggle svg { width: 19px; height: 19px; }
  .app { transition: width .25s ease, margin-left .25s ease; }
  .menu-drawer { transition: width .25s ease, transform .25s ease, box-shadow .25s ease; }

  /* Collapsed = icon rail: the drawer stays visible and only the icons remain. */
  :root { --desktop-rail-width: 76px; }
  body.desktop-sidebar-collapsed .app {
    width: calc(100% - var(--desktop-rail-width));
    margin-left: var(--desktop-rail-width);
  }
  body.desktop-sidebar-collapsed .menu-drawer {
    width: var(--desktop-rail-width);
    padding: 22px 0 16px;
    transform: none !important;
    visibility: visible !important;
    box-shadow: none;
  }
  /* Remove the hidden header's layout space so the icon rail starts at the top. */
  body.desktop-sidebar-collapsed .drawer-head {
    display: none;
  }
  body.desktop-sidebar-collapsed .drawer-nav { padding-top: 20px; justify-items: center; }
  body.desktop-sidebar-collapsed .drawer-item {
    width: 48px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    justify-content: center;
  }
  body.desktop-sidebar-collapsed .drawer-item > span { display: none; }
  body.desktop-sidebar-collapsed .drawer-item.active::before { left: -14px; }
  body.desktop-sidebar-collapsed .drawer-foot {
    flex-direction: column;
    align-items: center;
    padding: 14px 0 0;
  }
  body.desktop-sidebar-collapsed .drawer-foot > span { display: none; }
  body.desktop-sidebar-collapsed .desktop-sidebar-toggle { color: var(--blue); }
}
@media (max-width: 899px) {
  .desktop-sidebar-toggle { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .app, .menu-drawer, .desktop-sidebar-toggle { transition: none !important; }
}

/* Desktop dashboard cards: flat statistic surfaces and a restrained lime hero gradient. */
.desktop-queue-date { display: none; }
.greeting-dates { display: none; }

@media (min-width: 900px) {
  #page-dashboard > .hero {
    background: linear-gradient(135deg, var(--lime) 0%, #d5e985 58%, #deef9a 100%);
  }

  #page-dashboard > .metrics .metric {
    background: #fff;
    background-image: none;
    border-color: #e3e7ed;
  }

  #page-dashboard > .metrics .metric-icon {
    background: #e9edf2;
    color: #273247;
  }

  #page-dashboard > .greeting .date {
    display: none !important;
  }

  .top-actions .desktop-queue-date {
    display: block !important;
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 12px;
    padding: 8px 11px;
    margin-right: 2px;
  }
}


/* DESKTOP — show four active queue cards with a quiet framed list surface. */
@media (min-width: 900px) {
  #page-dashboard > #dashboardList {
    max-height: min(550px, calc(100dvh - 180px));
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    border: 1px solid rgba(17, 18, 37, .08);
    border-radius: 20px;
    background: rgba(255, 255, 255, .52);
    box-shadow: inset 0 1px 2px rgba(17, 18, 37, .025);
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  

  #page-dashboard > #dashboardList > .guest {
    min-height: 108px;
    border: 1px solid rgba(17, 18, 37, .065);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(17, 18, 37, .055);
  }

  #page-dashboard > #dashboardList > .guest:hover {
    border-color: rgba(17, 18, 37, .13);
    box-shadow: 0 7px 18px rgba(17, 18, 37, .085);
  }
}


/* DESKTOP — subtle pointer and keyboard feedback for sidebar navigation. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .drawer-item {
    position: relative;
    transition:
      background-color .18s ease,
      color .18s ease,
      transform .18s cubic-bezier(.2,.75,.25,1),
      box-shadow .18s ease;
  }

  .drawer-item > svg {
    transition: transform .18s cubic-bezier(.2,.75,.25,1), color .18s ease;
  }

  .drawer-item:not(.active):hover {
    background: #f4f6fa;
    color: #111225;
    transform: translateX(3px);
    box-shadow: 0 3px 10px rgba(20,35,63,.045);
  }

  .drawer-item:not(.active):hover > svg:first-child {
    transform: scale(1.08);
    color: #111225;
  }

  .drawer-item.active:hover {
    background: #e6efad;
    box-shadow: 0 4px 12px rgba(104,126,43,.10);
  }

  .drawer-item.active:hover > svg:first-child {
    transform: scale(1.07);
  }
}

@media (min-width: 900px) {
}

@media (prefers-reduced-motion: reduce) {
  .drawer-item,
  .drawer-item > svg {
    transition: none !important;
  }
}


/* DESKTOP — keep the active queue panel in view while the dashboard page scrolls. */
@media (min-width: 900px) {
  #page-dashboard > .section-head {
    position: sticky;
    top: 18px;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    align-self: start;
    grid-column: 2;
    grid-row: 1;
    padding: 17px 0 0;
    background: var(--page-bg, #f7f7f3);
  }

  #page-dashboard > .section-head h2 {
    font-size: 29px;
    margin: 0;
  }

  #page-dashboard > .section-head .text-btn {
    flex: 0 0 auto;
    margin-left: auto;
  }

  #page-dashboard > #dashboardList {
    position: sticky;
    top: 76px;
    z-index: 11;
    align-self: start;
    grid-column: 2;
    grid-row: 2 / span 2;
    height: min(520px, calc(100dvh - 150px));
    max-height: min(520px, calc(100dvh - 150px));
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  #page-dashboard > #dashboardList::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
}


/* DESKTOP — keep statistic cards directly below the hero.
   The tall sticky queue panel must not enlarge the left dashboard grid rows. */
@media (min-width: 900px) {
  #page-dashboard.page.active {
    grid-template-rows: auto 190px 112px auto;
  }

  #page-dashboard > .hero {
    min-height: 190px;
    height: 190px;
    align-self: start;
  }

  #page-dashboard > .metrics {
    grid-row: 3;
    min-height: 112px;
    height: 112px;
    align-self: start;
  }

  #page-dashboard > #dashboardList {
    align-self: start;
    min-height: 0;
  }
}


/* Align desktop hamburger control with the Outlet/Divisi dropdown fields. */
@media (min-width: 900px) {
  .desktop-sidebar-toggle {
    align-self: center;
    transform: translateY(10px);
  }
  .desktop-sidebar-toggle:active {
    transform: translateY(10px) scale(.96);
  }
  .desktop-sidebar-toggle svg {
    width: 20px;
    height: 20px;
  }
}

/* Match desktop waiting-list ticket badges to the dashboard hero surface. */
@media (min-width: 900px) {
  #page-dashboard > #dashboardList .guest .ticket {
    background: linear-gradient(135deg, var(--lime) 0%, #d5e985 58%, #deef9a 100%);
    color: #424c28;
  }
}

/* Stronger elevation for the desktop hero and its three summary cards. */
@media (min-width: 900px) {
  #page-dashboard > .hero {
    box-shadow: 0 12px 30px rgba(20,35,63,.16);
  }

  #page-dashboard > .metrics .metric {
    box-shadow: 0 8px 22px rgba(20,35,63,.11);
  }
}

/* Desktop overlays must sit above the sticky header so it dims and blurs too. */
@media (min-width: 900px) {
  .sheet-backdrop {
    z-index: 81;
  }
  .sheet {
    z-index: 82;
  }

  .quick-menu-backdrop {
    z-index: 81;
  }
  .quick-menu {
    z-index: 82;
  }

  .calendar-backdrop {
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
  }
}


/* DESKTOP — prevent the sticky queue panel from overlapping the reservation calendar. */
@media (min-width: 900px) {
  #page-dashboard > .section-head {
    position: static;
    top: auto;
    z-index: auto;
  }

  #page-dashboard > #dashboardList {
    position: static;
    top: auto;
    z-index: auto;
    height: auto;
    max-height: min(550px, calc(100dvh - 180px));
  }
}


/* DESKTOP — reserve enough grid height for the queue before the reservation calendar. */
@media (min-width: 900px) {
  #page-dashboard.page.active {
    grid-template-rows: auto 190px 112px auto auto;
  }

  #page-dashboard > #dashboardList {
    grid-row: 2 / span 3;
    min-height: min(550px, calc(100dvh - 180px));
    height: min(550px, calc(100dvh - 180px));
    max-height: min(550px, calc(100dvh - 180px));
  }

  #page-dashboard > .dashboard-reservations {
    grid-row: 5;
  }
}


/* DESKTOP — flatten the reservation calendar surface and empty-state card. */
@media (min-width: 900px) {
  .dashboard-reservation-calendar-panel,
  .dashboard-reservation-calendar,
  .dashboard-reservation-list .reservation-empty {
    border: 0;
    box-shadow: none;
  }
}


/* DESKTOP — show up to three reservation cards, then scroll within the list. */
@media (min-width: 900px) {
  .dashboard-reservation-list {
    grid-template-rows: repeat(3, max-content);
    grid-auto-rows: max-content;
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding-right: 4px;
  }
}


/* DESKTOP — restore a subtle border around the outer reservation calendar panel. */
@media (min-width: 900px) {
  .dashboard-reservation-calendar-panel {
    border: 1px solid var(--line);
  }
}


/* DESKTOP — add reservation action and subtle elevation to calendar panels. */
.dashboard-reservation-add-button {
  display: none;
}
@media (min-width: 900px) {
  .dashboard-reservations-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
  }
  .dashboard-reservation-add-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: var(--ink);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(20,35,63,.12);
    transition: transform .18s ease, box-shadow .18s ease;
  }
  .dashboard-reservation-add-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(20,35,63,.17);
  }
  .dashboard-reservation-calendar-panel,
  .dashboard-reservation-details {
    box-shadow: 0 5px 16px rgba(20,35,63,.07);
  }
}


/* MOBILE — keep the dashboard focused; reservations remain available in their own page. */
@media (max-width: 899px) {
  #page-dashboard > .dashboard-reservations {
    display: none !important;
  }
}


/* DESKTOP — compact the summary card and align the active queue panel with both left rows. */
@media (min-width: 900px) {
  #page-dashboard.page.active {
    grid-template-rows: auto 112px 112px auto auto;
  }

  #page-dashboard > .hero {
    min-height: 112px;
    height: 112px;
    padding: 12px 18px;
    align-self: start;
  }

  #page-dashboard > .hero .hero-total {
    margin-top: 0;
    font-size: 38px;
    line-height: 1;
  }

  #page-dashboard > .hero .hero-foot {
    margin-top: 4px;
    gap: 14px;
  }

  #page-dashboard > .hero .hero-action {
    top: 0;
  }

  #page-dashboard > .metrics {
    min-height: 112px;
    height: 112px;
    align-self: start;
  }

  #page-dashboard > #dashboardList {
    grid-row: 2 / span 2;
    align-self: stretch;
    min-height: 0;
    height: auto;
    max-height: none;
  }
}


/* DESKTOP — contain queue content within the two summary rows. */
@media (min-width: 900px) {
  #page-dashboard > #dashboardList {
    grid-row: 2 / 4;
    align-self: stretch;
    min-height: 0;
    height: auto;
    max-height: none;
    margin-bottom: 0;
    contain: size;
  }
}


/* DESKTOP — keep both reservation cards at the empty-state height. */
@media (min-width: 900px) {
  .dashboard-reservations-layout {
    height: 490px;
    align-items: stretch;
  }

  .dashboard-reservation-calendar-panel,
  .dashboard-reservation-details {
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
  }

  .dashboard-reservation-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .dashboard-reservation-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
  }
}


/* DESKTOP — stronger, consistent shadows across dashboard cards. */
@media (min-width: 900px) {
  #page-dashboard > .hero {
    box-shadow: 0 14px 34px rgba(20,35,63,.20);
  }

  #page-dashboard > .metrics .metric,
  #page-dashboard > #dashboardList .guest,
  #page-dashboard > #dashboardList > .empty,
  #page-dashboard > #pendingWrap .pending,
  .dashboard-reservation-calendar-panel,
  .dashboard-reservation-details {
    box-shadow: 0 9px 24px rgba(20,35,63,.14);
  }
}


/* DESKTOP — make reservation time the most visible detail in each guest card. */
@media (min-width: 900px) {
  .dashboard-reservation-time {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 116px;
    min-width: 116px;
    height: 28px;
    flex: 0 0 116px;
    margin: 0;
    padding: 2px 6px;
    border-radius: 9px;
    background: #eff6c7;
    color: #56613a;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .dashboard-reservation-time small {
    color: #626d43;
    font-size: 6px;
    font-weight: 800;
    letter-spacing: .04em;
  }
  .dashboard-reservation-time strong {
    color: #4f5b35;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
  }
}


/* DESKTOP — monthly guest trend below the reservation calendar. */
@media (min-width: 900px) {
  #page-dashboard > .dashboard-trend-card {
    display: block;
    grid-column: 1 / -1;
    grid-row: 6;
    min-width: 0;
    margin-top: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 9px 24px rgba(20,35,63,.14);
  }
  .dashboard-trend-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
  }
  .dashboard-trend-head h2 {
    margin: 4px 0 0;
    color: var(--ink);
    font: 800 20px Manrope,sans-serif;
  }
  .dashboard-trend-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    text-transform: capitalize;
  }
  .dashboard-trend-toggle {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: #f0eff5;
  }
  .dashboard-trend-toggle button {
    min-width: 112px;
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #777586;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
  }
  .dashboard-trend-toggle button.active {
    background: #111225;
    color: #fff;
    box-shadow: 0 2px 7px rgba(17,18,37,.16);
  }
  .dashboard-trend-chart {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: repeat(31, minmax(0, 1fr));
    align-items: end;
    gap: 8px;
    min-height: 250px;
    padding: 10px 0 0;
  }
  .dashboard-trend-gridlines {
    position: absolute;
    inset: 45px 0 29px;
    z-index: 0;
    pointer-events: none;
  }
  .dashboard-trend-gridline {
    position: absolute;
    right: 0;
    left: 0;
    height: 1px;
    background: color-mix(in srgb, var(--ink) 12%, transparent);
  }
  .dashboard-trend-column {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: 18px minmax(0, 1fr) 22px;
    align-items: end;
    gap: 7px;
    min-width: 0;
    height: 230px;
    text-align: center;
  }
  .dashboard-trend-value {
    color: var(--ink);
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }
  .dashboard-trend-track {
    display: flex;
    align-items: end;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-bottom: 1px solid #e6e7e2;
  }
  .dashboard-trend-bar {
    display: block;
    width: min(100%, 28px);
    min-height: 0;
    border-radius: 7px 7px 2px 2px;
    background: linear-gradient(180deg, #8fbd4d 0%, #c7e77a 100%);
    box-shadow: 0 2px 5px rgba(125,166,65,.15);
    transition: height .25s ease;
  }
  .dashboard-trend-day {
    color: #777586;
    font-size: 10px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
  }
}
@media (max-width: 899px) {
  #page-dashboard > .dashboard-trend-card { display: none !important; }
}


/* DESKTOP — liquid lime feedback and hover response for the monthly guest trend. */
@media (min-width: 900px) {
  .dashboard-trend-toggle button {
    position: relative;
    overflow: hidden;
    transition: color .28s ease, background-color .28s ease, box-shadow .28s ease, transform .28s ease;
  }

  .dashboard-trend-toggle button.active {
    background: linear-gradient(135deg, #d9ed80 0%, #c5e86a 58%, #b7df58 100%);
    color: #283516;
    box-shadow: 0 4px 13px rgba(132, 166, 55, .22);
    animation: dashboard-trend-drop .62s cubic-bezier(.2,.8,.25,1);
  }

  .dashboard-trend-toggle button.active::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 125%;
    aspect-ratio: 1;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(.2);
    animation: dashboard-trend-ripple .72s ease-out;
  }

  .dashboard-trend-column {
    position: relative;
    cursor: default;
    outline: none;
  }

  .dashboard-trend-track {
    transition: background-color .2s ease;
  }

  .dashboard-trend-bar {
    transform-origin: center bottom;
    animation: dashboard-trend-grow .72s cubic-bezier(.2,.75,.25,1) both;
    transition: height .25s ease, translate .22s ease, scale .22s ease, filter .22s ease, box-shadow .22s ease;
  }

  .dashboard-trend-bar {
    position: relative;
  }

  .dashboard-trend-bar:hover {
    filter: saturate(1.18) brightness(1.025);
    box-shadow: 0 5px 13px rgba(125,166,65,.27);
  }

  .dashboard-trend-column:focus-visible {
    border-radius: 8px;
    outline: 2px solid #a8cf4d;
    outline-offset: 3px;
  }

  @media (hover: hover) and (pointer: fine) {
    .dashboard-trend-column:hover {
      z-index: 2;
    }

    .dashboard-trend-column:hover .dashboard-trend-value,
    .dashboard-trend-column:focus-visible .dashboard-trend-value {
      color: #789d32;
    }

    .dashboard-trend-column:hover .dashboard-trend-track,
    .dashboard-trend-column:focus-visible .dashboard-trend-track {
      background: rgba(198, 230, 119, .13);
      border-radius: 8px 8px 0 0;
    }

    .dashboard-trend-column:hover .dashboard-trend-bar,
    .dashboard-trend-column:focus-visible .dashboard-trend-bar {
      translate: 0 -3px;
      scale: 1.12 1;
      filter: saturate(1.18) brightness(1.025);
      box-shadow: 0 5px 13px rgba(125,166,65,.27);
    }

    .dashboard-trend-column:hover .dashboard-trend-day,
    .dashboard-trend-column:focus-visible .dashboard-trend-day {
      color: #536f27;
      font-weight: 800;
    }
  }
}

@keyframes dashboard-trend-drop {
  0% { transform: scale(.94, 1.06); }
  42% { transform: translateY(1px) scale(1.035, .96); }
  72% { transform: translateY(-1px) scale(.99, 1.015); }
  100% { transform: scale(1, 1); }
}

@keyframes dashboard-trend-ripple {
  0% { opacity: .5; transform: translate(-50%, -50%) scale(.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25); }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-trend-toggle button,
  .dashboard-trend-bar,
  .dashboard-trend-track,
  .dashboard-trend-value {
    animation: none !important;
    transition: none !important;
  }
  .dashboard-trend-toggle button.active::after { animation: none !important; }
}


/* DESKTOP — enlarge reservation calendar dates to suit the calendar card. */
@media (min-width: 900px) {
  .dashboard-reservation-calendar .reservation-day {
    min-height: 50px;
    font-size: 16px;
    font-weight: 800;
  }

  .dashboard-reservation-calendar .reservation-weekday {
    font-size: 11px;
  }
}


@keyframes dashboard-trend-grow {
  0% { transform: scaleY(.025); }
  68% { transform: scaleY(1.035); }
  100% { transform: scaleY(1); }
}


/* DESKTOP — flatten date and logout controls in the top bar. */
@media (min-width: 900px) {
  .top-actions .desktop-queue-date {
    border: 0;
    box-shadow: none;
  }

  .top-actions .auth-logout-button {
    border: 0;
  }
}


/* DESKTOP — responsive hover feedback for active queue and reservation guest cards. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  #page-dashboard > #dashboardList > .guest,
  .dashboard-reservation-list > .dashboard-reservation-item {
    transition:
      transform .2s cubic-bezier(.2,.75,.25,1),
      box-shadow .2s ease,
      border-color .2s ease;
  }

  #page-dashboard > #dashboardList > .guest:hover,
  .dashboard-reservation-list > .dashboard-reservation-item:hover {
    transform: translateY(-3px);
    border-color: rgba(137,155,77,.38);
    box-shadow: 0 10px 22px rgba(20,35,63,.13);
  }
}


/* DESKTOP — remove only the outer surface behind the reservation calendar and guest list. */
@media (min-width: 900px) {
  #page-dashboard > .dashboard-reservations {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
}


/* DESKTOP — keep the icon rail as the only sidebar state. */
@media (min-width: 900px) {
  :root {
    --desktop-sidebar-width: 76px;
    --desktop-rail-width: 76px;
  }

  .app {
    width: calc(100% - var(--desktop-rail-width));
    margin-left: var(--desktop-rail-width);
  }

  .menu-drawer {
    width: var(--desktop-rail-width);
    padding: 22px 0 16px;
    transform: none !important;
    visibility: visible !important;
    box-shadow: none;
  }

  .drawer-head {
    visibility: hidden;
    border-bottom-color: transparent;
  }

  .drawer-nav {
    padding-top: 20px;
    justify-items: center;
  }

  .drawer-item {
    position: relative;
    width: 48px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    justify-content: center;
  }

  .drawer-item > span { display: none; }
  .drawer-item.active::before { left: -14px; }

  .drawer-foot {
    flex-direction: column;
    align-items: center;
    padding: 14px 0 0;
  }

  .drawer-foot > span { display: none; }
  .desktop-sidebar-toggle { display: none !important; }

  /* Native title tooltips on each existing navigation icon remain available on hover. */
  .drawer-item[title] { cursor: pointer; }
}


/* DESKTOP — remove the rail surface; retain compact backgrounds only on icon controls. */
@media (min-width: 900px) {
  .menu-drawer {
    background: transparent;
    border-right-color: transparent;
    box-shadow: none;
  }

  .drawer-item {
    background: transparent;
    border-radius: 12px;
  }

  .drawer-item.active {
    background: #eff6c7;
    box-shadow: 0 3px 10px rgba(104,126,43,.09);
  }

  .drawer-foot {
    border-top-color: transparent;
  }
}

@media (min-width: 900px) {
  .drawer-item {
    transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease, outline-color .18s ease;
  }

  .drawer-item svg {
    transition: transform .18s ease, color .18s ease;
  }

  .drawer-item:focus-visible {
    outline: 2px solid #9aae55;
    outline-offset: 3px;
  }
}

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .drawer-item:not(.active):hover {
    background: #e1edaa;
    color: #111225;
    box-shadow: 0 8px 19px rgba(78,96,38,.22);
    outline: 1px solid rgba(137,155,77,.45);
    transform: translateY(-2px) scale(1.06);
  }

  .drawer-item:not(.active):hover svg {
    transform: scale(1.08);
  }

  .drawer-item.active:hover {
    background: #d5e78a;
    box-shadow: 0 8px 20px rgba(78,96,38,.24);
    outline: 1px solid rgba(119,143,48,.55);
    transform: translateY(-2px) scale(1.06);
  }

  .drawer-item.active:hover svg {
    transform: scale(1.08);
  }
}


/* DESKTOP — extend the workspace header across the sidebar rail. */
@media (min-width: 900px) {
  .top {
    width: calc(100% + var(--desktop-rail-width));
    margin-left: calc(-1 * var(--desktop-rail-width));
    padding-left: calc(32px + var(--desktop-rail-width));
  }
}

/* Desktop application pages — headerless workspace with scope controls in the top content row. */
@media (min-width: 1280px) {
  body:has(.page.active) .app {
    position: relative;
  }

  body:has(.page.active) .top {
    position: static;
    display: block;
    width: 0;
    height: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body:has(.page.active) .top > .brand,
  body:has(.page.active) .top > .desktop-sidebar-toggle,
  body:has(.page.active) .top-actions > .desktop-queue-date,
  body:has(.page.active) .top-actions > .profile,
  body:has(.page.active) .top-actions > .menu-toggle {
    display: none !important;
  }

  body:has(.page.active) .top-actions {
    display: block;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  body.desktop-sidebar-collapsed:has(.page.active) .drawer-head {
    display: none;
  }

  body.desktop-sidebar-collapsed:has(.page.active) .drawer-nav {
    padding-top: 18px;
  }

  body:has(.page.active) #authLogoutButton {
    position: fixed;
    z-index: 95;
    left: 14px;
    bottom: 68px;
    display: grid !important;
    place-items: center;
    width: 48px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #111225;
    box-shadow: none;
  }

  body:has(.page.active) #authLogoutButton svg {
    width: 20px;
    height: 20px;
  }

  body.desktop-sidebar-collapsed:has(.page.active) .drawer-guide-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #111225;
    box-shadow: none;
  }

  body.desktop-sidebar-collapsed:has(.page.active) .drawer-guide-icon svg {
    width: 20px;
    height: 20px;
  }
}

/* Desktop icon rail: navigation order and a compact card under every icon. */
@media (min-width: 900px) {
  .drawer-nav > .drawer-item[data-page="dashboard"] { order: 1; }
  .drawer-nav > .drawer-item[data-page="user-monitoring"] { order: 2; }
  .drawer-nav > .drawer-item[data-page="stock-opname"] { order: 3; }
  .drawer-nav > .drawer-item[data-page="master-items"] { order: 4; }
  .drawer-nav > .drawer-item.drawer-scope-item { order: 5; }
  .drawer-nav > .drawer-item[data-page="settings"] { order: 6; }

  .drawer-nav > .drawer-item:not(.active),
  body.desktop-sidebar-collapsed:has(.page.active) .drawer-guide-icon,
  body:has(.page.active) #authLogoutButton {
    background: #fff;
    box-shadow: 0 3px 10px rgba(20, 35, 63, .07);
  }

  .drawer-nav > .drawer-item.active {
    box-shadow: 0 3px 10px rgba(104, 126, 43, .09);
  }

  body.desktop-sidebar-collapsed:has(.page.active) .drawer-guide-icon.active {
    background: #eff6c7;
  }
}

/* Guest forms and details open as centered desktop dialogs. */
@media (min-width: 900px) {
  #sheet:has(#guestName),
  #sheet:has(.detail-ticket) {
    top: 50%;
    bottom: auto;
    width: min(640px, calc(100vw - 48px));
    max-height: min(820px, calc(100dvh - 64px));
    padding: 26px 30px 30px;
    border-radius: 26px;
    transform: translate(-50%, -50%) scale(.98);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }

  #sheet:has(#guestName).show,
  #sheet:has(.detail-ticket).show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  #sheet:has(#guestName) .sheet-handle-row,
  #sheet:has(.detail-ticket) .sheet-handle-row {
    display: none !important;
  }

  body:has(#sheet.show .detail-ticket) #backdrop {
    background: rgba(36, 42, 50, .46);
  }
}

@media (min-width: 900px) and (prefers-reduced-motion: reduce) {
  #sheet:has(#guestName), #sheet:has(.detail-ticket) { transition: none; }
}

.sidebar-mascot { display: none; }

@media (min-width: 900px) {
  .sidebar-tooltip {
    position: fixed;
    z-index: 150;
    max-width: min(240px, calc(100vw - 90px));
    padding: 8px 11px;
    border: 1px solid var(--ui-line, #e4e5dc);
    border-radius: 9px;
    background: var(--ui-surface, #fff);
    color: var(--ui-ink, #111225);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
    font: 700 12px/1.3 'DM Sans', sans-serif;
    overflow-wrap: anywhere;
    pointer-events: none;
    transform: translateY(-50%);
  }
  .sidebar-tooltip[hidden] { display: none; }
}
@media (min-width: 900px) and (max-width: 1279px) {
  body:has(.page.active) .app {
    position: relative;
  }
  body:has(.page.active) .top {
    position: static;
    display: block;
    width: 0;
    height: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  body:has(.page.active) .top > .brand,
  body:has(.page.active) .top > .desktop-sidebar-toggle,
  body:has(.page.active) .top-actions > .desktop-queue-date,
  body:has(.page.active) .top-actions > .profile,
  body:has(.page.active) .top-actions > .menu-toggle {
    display: none !important;
  }
  body:has(.page.active) .top-actions {
    display: block;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  body:has(.page.active) #authLogoutButton {
    position: fixed;
    z-index: 95;
    left: 14px;
    bottom: 68px;
    width: 48px;
    height: 46px;
  }
}
@keyframes mascot-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}

@keyframes mascot-wiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-7deg) scale(1.04); }
  55% { transform: rotate(6deg) scale(1.04); }
  80% { transform: rotate(-2deg) scale(1); }
}

@keyframes mascot-poke {
  0% { transform: scale(1, 1); }
  30% { transform: scale(1.15, .84); }
  55% { transform: scale(.93, 1.12); }
  75% { transform: scale(1.06, .95); }
  100% { transform: scale(1, 1); }
}

@media (min-width: 900px) {
  .sidebar-mascot {
    position: fixed;
    left: 14px;
    bottom: 122px;
    width: 48px;
    height: 34px;
    display: block;
    overflow: hidden;
    pointer-events: auto;
    cursor: pointer;
    background: transparent;
    mix-blend-mode: multiply;
    transform-origin: 50% 100%;
    transform: translate3d(0, var(--mascot-lift, 0px), 0) rotate(var(--mascot-tilt, 0deg));
    transition: transform .2s ease;
  }
  .sidebar-mascot__face {
    position: absolute;
    inset: 0;
    display: block;
    transform-origin: 50% 88%;
    animation: mascot-bob 6s ease-in-out infinite;
  }
  .sidebar-mascot__body {
    position: absolute;
    left: -19px;
    top: -25px;
    width: 86px;
    height: 86px;
    max-width: none;
  }
  .sidebar-mascot__eyes {
    position: absolute;
    left: 27.5px;
    top: 11.3px;
    width: 8.5px;
    height: 9.6px;
    transform: translate3d(var(--gaze-x, 0px), var(--gaze-y, 0px), 0) scaleY(var(--blink-scale, 1));
    transform-origin: 50% 50%;
    transition: transform .12s ease-out;
  }
  .sidebar-mascot__eye {
    position: absolute;
    top: 0;
    width: 3.2px;
    height: 9.6px;
    border-radius: 999px;
    background: #060643;
  }
  .sidebar-mascot__eye--left {
    left: 0;
    transform: rotate(9deg);
  }
  .sidebar-mascot__eye--right {
    left: 5.3px;
    transform: rotate(-9deg);
  }
  .sidebar-mascot.is-blinking .sidebar-mascot__eyes {
    --blink-scale: .08;
  }
  .sidebar-mascot:hover .sidebar-mascot__face {
    animation: mascot-wiggle .55s ease-in-out;
  }
  .sidebar-mascot.is-poked .sidebar-mascot__face {
    animation: mascot-poke .55s cubic-bezier(.3, .9, .4, 1.2);
  }
}

@media (min-width: 900px) and (prefers-reduced-motion: reduce) {
  .sidebar-mascot,
  .sidebar-mascot__face,
  .sidebar-mascot__body,
  .sidebar-mascot__eyes {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}


/* DESKTOP — keep the sidebar rail controls inside the available viewport height. */
@media (min-width: 900px) {
  .drawer-nav {
    min-height: 0;
    max-height: calc(100dvh - 270px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
}

@media (min-width: 900px) and (max-height: 700px) {
  /* Preserve the intended bottom-to-top order: guide, Logout, mascot. */
  .sidebar-mascot { display: block; bottom: 122px; }
  body:has(.page.active) #authLogoutButton { bottom: 68px; }
  body:has(.page.active) .drawer-guide-icon {
    position: fixed;
    z-index: 95;
    left: 14px;
    bottom: 14px;
    display: grid !important;
    place-items: center;
    width: 48px;
    height: 46px;
    flex: 0 0 46px;
    padding: 0;
  }
  .drawer-nav { max-height: calc(100dvh - 210px); }
}

@media (min-width: 900px) and (max-height: 560px) {
  /* Add clear vertical gaps between mascot, Logout, and guide on short screens. */
  .sidebar-mascot { bottom: 150px; }
  body:has(.page.active) #authLogoutButton { bottom: 82px; }
  body:has(.page.active) .drawer-guide-icon { bottom: 14px; }
  .drawer-nav { max-height: calc(100dvh - 170px); }
}


/* DESKTOP — make the icon rail a full-height column with one continuous scroll area. */
@media (min-width: 900px) {
  body.desktop-sidebar-collapsed .menu-drawer {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }
  body.desktop-sidebar-collapsed .drawer-nav {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    min-height: 0;
    max-height: none;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    gap: 7px;
    padding: 18px 0 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  body.desktop-sidebar-collapsed .drawer-nav::-webkit-scrollbar { display: none; }
  body.desktop-sidebar-collapsed .drawer-nav > .drawer-logout-item,
  body.desktop-sidebar-collapsed .drawer-nav > .drawer-guide-icon {
    position: relative;
    z-index: auto;
    left: auto;
    bottom: auto;
    display: grid !important;
    place-items: center;
    width: 48px;
    height: 46px;
    min-height: 46px;
    flex: 0 0 46px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: #111225;
    box-shadow: 0 3px 10px rgba(20, 35, 63, .07);
  }
  body.desktop-sidebar-collapsed .drawer-nav > .drawer-logout-item svg,
  body.desktop-sidebar-collapsed .drawer-nav > .drawer-guide-icon svg {
    width: 20px;
    height: 20px;
  }
  body.desktop-sidebar-collapsed .drawer-nav > .drawer-logout-item > span,
  body.desktop-sidebar-collapsed .drawer-nav > .drawer-guide-icon > span { display: none; }
  body.desktop-sidebar-collapsed .drawer-nav > .sidebar-mascot {
    position: relative;
    left: auto;
    bottom: auto;
    inset: auto;
    display: block;
    width: 48px;
    height: 34px;
    flex: 0 0 34px;
    margin: 0;
  }
  /* Keep the requested order directly after Pengaturan. */
  body.desktop-sidebar-collapsed .drawer-nav > .sidebar-mascot { order: 7; }
  body.desktop-sidebar-collapsed .drawer-nav > .drawer-logout-item { order: 8; }
  body.desktop-sidebar-collapsed .drawer-nav > .drawer-guide-icon { order: 9; }
  body.desktop-sidebar-collapsed .drawer-foot { display: none; }
}

/* Keep logout visible directly below Settings in the mobile drawer. */
@media (max-width: 899px) {
  .drawer-nav > .drawer-logout-item {
    display: flex !important;
    width: 100%;
    height: 54px;
    min-height: 54px;
    justify-content: flex-start;
    padding: 0 14px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: inherit;
  }
  .drawer-nav > .sidebar-mascot,
  .drawer-nav > .drawer-guide-icon { display: none !important; }
}



/* DESKTOP — keep every collapsed-rail control inside its single scroll area. */
@media (min-width: 900px) {
  body.desktop-sidebar-collapsed .menu-drawer {
    box-sizing: border-box;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  body.desktop-sidebar-collapsed .drawer-nav {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
  }

  body.desktop-sidebar-collapsed:has(.page.active) .drawer-nav > #authLogoutButton {
    position: relative;
    inset: auto;
    z-index: auto;
    display: grid !important;
    place-items: center;
    width: 48px;
    height: 46px;
    min-height: 46px;
    flex: 0 0 46px;
    margin: 0;
  }

  body.desktop-sidebar-collapsed:has(.page.active) .drawer-nav > .drawer-guide-icon {
    position: relative;
    inset: auto;
    z-index: auto;
    display: grid !important;
    width: 48px;
    height: 46px;
    min-height: 46px;
    flex: 0 0 46px;
    margin: 0;
  }

  body.desktop-sidebar-collapsed .drawer-nav > .sidebar-mascot {
    position: relative;
    inset: auto;
    flex: 0 0 34px;
    margin: 0;
  }
}

/* ---------- user-monitoring.css ---------- */
/* USER MONITORING — Developer-only, mobile-first interface */

.user-monitoring-page {
  padding-bottom: 28px;
}

.monitor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.monitor-heading .eyebrow {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}

.monitor-heading .page-title {
  margin-top: 5px;
}

.monitor-refresh {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.monitor-updated {
  margin: -8px 0 14px;
  color: var(--muted);
  font-size: 11px;
}

.monitor-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.monitor-stat {
  min-width: 0;
  padding: 13px 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.monitor-stat span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.monitor-stat strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font: 800 23px Manrope, sans-serif;
  font-variant-numeric: tabular-nums;
}

.monitor-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #edf1f7;
}

.monitor-tab {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #68758a;
  font-size: 12px;
  font-weight: 700;
}

.monitor-tab.is-active {
  background: var(--surface);
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(28,48,83,.08);
}

.monitor-panel[hidden] {
  display: none !important;
}

.monitor-account {
  padding: 15px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.monitor-account-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.monitor-account-identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.monitor-account-name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.monitor-account-email {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
}

.monitor-device-count {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 20px;
  background: #edf2fb;
  color: #4a628c;
  font-size: 10px;
  font-weight: 800;
}

.monitor-account-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 11px 0 12px;
}

.monitor-role,
.monitor-outlet {
  padding: 5px 8px;
  border-radius: 7px;
  background: #f4f6fa;
  color: #66748a;
  font-size: 10px;
  font-weight: 700;
}

.monitor-device {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.monitor-device-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: #f1f4fa;
  color: #536783;
  font-size: 9px;
  font-weight: 900;
}

.monitor-device-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.monitor-device-title {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.4;
}

.monitor-device-detail {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.monitor-status,
.monitor-event-badge {
  align-self: start;
  padding: 5px 7px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.monitor-status.is-online,
.monitor-event-badge.is-success {
  background: #e8f6ef;
  color: #18845b;
}

.monitor-status.is-offline,
.monitor-event-badge.is-logout {
  background: #eef1f5;
  color: #6d7889;
}

.monitor-status.is-logged_out {
  background: #f0edf7;
  color: #78629d;
}

.monitor-event-badge.is-failed,
.monitor-event-badge.is-error {
  background: #fff0ef;
  color: #c34e55;
}

.monitor-filter {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}

.monitor-filter label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.monitor-filter select {
  width: 100%;
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
}

.monitor-activity-item {
  padding: 13px 14px;
  margin-bottom: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.monitor-activity-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.monitor-activity-title {
  color: var(--ink);
  font-size: 12px;
}

.monitor-activity-time {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.monitor-activity-detail {
  margin: 7px 0 9px;
  overflow-wrap: anywhere;
}

.monitor-activity-reason {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  text-transform: capitalize;
}

.monitor-empty {
  padding: 28px 16px;
  border: 1px dashed #d7dfeb;
  border-radius: 15px;
  color: var(--muted);
  background: rgba(255,255,255,.55);
  font-size: 12px;
  text-align: center;
}

/* Desktop account overview: compact cards with activity in a modal. */
@media (min-width: 900px) {
  #monitorLiveUsers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 14px;
  }

  #monitorLiveUsers > .monitor-empty {
    grid-column: 1 / -1;
  }

  #monitorLiveUsers .monitor-account {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0;
    padding: 17px;
    margin: 0;
    border-radius: 16px;
  }

  #monitorLiveUsers .monitor-account-head {
    align-items: flex-start;
  }

  #monitorLiveUsers .monitor-account-name {
    font-size: 14px;
  }

  #monitorLiveUsers .monitor-account-email {
    overflow-wrap: anywhere;
  }

  #monitorLiveUsers .monitor-account-meta {
    margin: 12px 0 15px;
  }

  .monitor-account-status {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 0;
    margin-top: auto;
    border-top: 1px solid var(--line);
  }

  .monitor-status-lamp {
    position: relative;
    display: inline-block;
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    border-radius: 50%;
  }

  .monitor-status-lamp.is-online {
    background: #20bd70;
    box-shadow: 0 0 0 3px rgba(32,189,112,.13), 0 0 11px rgba(32,189,112,.72);
  }

  .monitor-status-lamp.is-offline {
    background: #e34b52;
    box-shadow: 0 0 0 3px rgba(227,75,82,.12), 0 0 11px rgba(227,75,82,.58);
  }

  .monitor-status-lamp.is-logged_out {
    background: #98a2b3;
    box-shadow: 0 0 0 3px rgba(152,162,179,.14);
  }

  .monitor-account-status-label {
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
  }

  .monitor-detail-button {
    width: 100%;
    min-height: 37px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f7f8fa;
    color: var(--ink);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease;
  }

  .monitor-detail-button:hover {
    border-color: #c5ceda;
    background: #eef2f7;
  }

  .monitor-modal-overlay {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(15, 24, 39, .48);
    backdrop-filter: blur(5px);
  }

  .monitor-account-modal {
    width: min(680px, 100%);
    max-height: min(78vh, 760px);
    overflow: auto;
    padding: 23px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(16, 28, 48, .24);
    animation: monitor-modal-in .2s ease-out;
  }

  .monitor-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
  }

  .monitor-modal-title-wrap {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
  }

  .monitor-modal-title {
    color: var(--ink);
    font-size: 18px;
    font-weight: 800;
  }

  .monitor-modal-subtitle {
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  .monitor-modal-close {
    display: grid;
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex: 0 0 40px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 13px;
    background: #f1f4f8;
    color: #52627a;
    font: inherit;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    cursor: pointer;
  }

  .monitor-modal-close svg {
    display: block;
    width: 18px;
    height: 18px;
    pointer-events: none;
  }

  .monitor-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 15px 0;
    margin-bottom: 3px;
    border-bottom: 1px solid var(--line);
  }

  .monitor-modal-section-title {
    margin: 17px 0 7px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
  }

  .monitor-modal-device {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
  }

  .monitor-modal-device:last-child {
    border-bottom: 0;
  }

  @keyframes monitor-modal-in {
    from { opacity: 0; transform: translateY(8px) scale(.99); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .monitor-detail-button,
  .monitor-account-modal {
    animation: none !important;
    transition: none !important;
  }
}


/* Custom outlet filter: prevents the browser's native Android select menu. */
.monitor-filter {
  position: relative;
  z-index: 1;
}

.monitor-filter.has-open-menu {
  z-index: 30;
}

.monitor-filter select[hidden] {
  display: none !important;
}

.monitor-select-control {
  position: relative;
  width: 100%;
}

.monitor-select-trigger {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(20,35,63,.045);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.monitor-select-trigger:hover,
.monitor-select-control.is-open .monitor-select-trigger {
  border-color: #b8c4d5;
  box-shadow: 0 5px 16px rgba(20,35,63,.09);
}

.monitor-select-trigger svg {
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform .2s ease;
}

.monitor-select-control.is-open .monitor-select-trigger svg {
  transform: rotate(180deg);
}

.monitor-select-menu {
  position: absolute;
  z-index: 31;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  max-height: min(280px, 45vh);
  overflow: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(18,30,50,.17);
  transform-origin: top center;
  animation: monitor-select-in .16s ease-out;
  overscroll-behavior: contain;
}

.monitor-select-menu[hidden] {
  display: none !important;
}

.monitor-select-option {
  display: flex;
  width: 100%;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}

.monitor-select-option + .monitor-select-option {
  margin-top: 2px;
}

.monitor-select-option:hover,
.monitor-select-option:focus-visible {
  outline: none;
  background: #f1f4f8;
}

.monitor-select-option[aria-selected="true"] {
  font-weight: 800;
}

.monitor-select-radio {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  place-items: center;
  border: 1.7px solid #aab4c2;
  border-radius: 50%;
}

.monitor-select-option[aria-selected="true"] .monitor-select-radio {
  border-color: var(--blue);
}

.monitor-select-option[aria-selected="true"] .monitor-select-radio::after {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  content: "";
}

@keyframes monitor-select-in {
  from { opacity: 0; transform: translateY(-5px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Account cards respond to pointer hover and touch/press. */
.monitor-account {
  transition:
    transform .2s cubic-bezier(.2,.75,.25,1),
    box-shadow .2s ease,
    border-color .2s ease;
  transform-origin: center;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .monitor-account:hover {
    transform: translateY(-3px);
    border-color: #c8d2df;
    box-shadow: 0 12px 26px rgba(24,39,63,.11);
  }

  .monitor-account:active {
    transform: translateY(-1px) scale(.995);
  }
}

@media (hover: none), (pointer: coarse) {
  .monitor-account:active {
    transform: scale(.99);
    box-shadow: 0 3px 10px rgba(24,39,63,.08);
  }
}

.monitor-detail-button:active,
.monitor-activity-item:active {
  transform: scale(.99);
}

.monitor-detail-button,
.monitor-activity-item {
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

@media (prefers-reduced-motion: reduce) {
  .monitor-select-trigger,
  .monitor-select-trigger svg,
  .monitor-select-option,
  .monitor-account,
  .monitor-detail-button,
  .monitor-activity-item,
  .monitor-select-menu {
    animation: none !important;
    transition: none !important;
  }
}


/* Mobile User Monitoring: compact account cards, activity inside detail popup. */
@media (max-width: 899px) {
  #monitorLiveUsers .monitor-account {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 17px;
  }

  #monitorLiveUsers .monitor-account-head {
    align-items: flex-start;
    gap: 10px;
  }

  #monitorLiveUsers .monitor-account-name {
    font-size: 14px;
    line-height: 1.35;
  }

  #monitorLiveUsers .monitor-account-email {
    font-size: 11px;
    overflow-wrap: anywhere;
  }

  #monitorLiveUsers .monitor-device-count {
    font-size: 10px;
    white-space: nowrap;
  }

  #monitorLiveUsers .monitor-account-meta {
    margin: 11px 0 13px;
  }

  #monitorLiveUsers .monitor-account-status {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 0;
    margin-top: 0;
    border-top: 1px solid var(--line);
  }

  #monitorLiveUsers .monitor-status-lamp {
    display: inline-block;
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    border-radius: 50%;
  }

  #monitorLiveUsers .monitor-status-lamp.is-online {
    background: #20bd70;
    box-shadow: 0 0 0 3px rgba(32,189,112,.13), 0 0 11px rgba(32,189,112,.72);
  }

  #monitorLiveUsers .monitor-status-lamp.is-offline {
    background: #e34b52;
    box-shadow: 0 0 0 3px rgba(227,75,82,.12), 0 0 11px rgba(227,75,82,.58);
  }

  #monitorLiveUsers .monitor-status-lamp.is-logged_out {
    background: #98a2b3;
    box-shadow: 0 0 0 3px rgba(152,162,179,.14);
  }

  #monitorLiveUsers .monitor-account-status-label {
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
  }

  #monitorLiveUsers .monitor-detail-button {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #f7f8fa;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, transform .16s ease;
  }

  #monitorLiveUsers .monitor-detail-button:active {
    transform: scale(.99);
    background: #eef2f7;
  }

  .monitor-modal-overlay {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: grid;
    place-items: end center;
    padding: 12px;
    background: rgba(15, 24, 39, .5);
    backdrop-filter: blur(4px);
  }

  .monitor-account-modal {
    width: 100%;
    max-height: min(84dvh, 760px);
    overflow: auto;
    padding: 19px 16px max(18px, env(safe-area-inset-bottom));
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 20px 20px 16px 16px;
    background: var(--surface);
    box-shadow: 0 18px 55px rgba(16, 28, 48, .24);
    animation: monitor-mobile-modal-in .22s ease-out;
  }

  .monitor-modal-title {
    font-size: 16px;
  }

  .monitor-modal-subtitle {
    font-size: 11px;
  }

  .monitor-modal-meta {
    gap: 6px;
    padding: 12px 0;
  }

  .monitor-modal-section-title {
    margin: 15px 0 5px;
    font-size: 12px;
  }

  .monitor-modal-device {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    padding: 12px 0;
  }

  .monitor-modal-device .monitor-status {
    grid-column: 2;
    justify-self: start;
    margin-top: -2px;
  }

  .monitor-modal-device .monitor-device-title {
    font-size: 12px;
  }

  .monitor-modal-device .monitor-device-detail {
    font-size: 10px;
  }

  @keyframes monitor-mobile-modal-in {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (min-width: 900px) {
  #monitorLiveUsers .monitor-account-status {
    margin-top: auto;
  }
}


/* Device-level login history inside account detail. */
.monitor-modal-device-group {
  margin-top: 8px;
}

.monitor-device-history {
  margin: -2px 0 12px 50px;
  padding: 0 0 0 12px;
  border-left: 2px solid var(--line);
}

.monitor-device-history-entry {
  display: grid;
  gap: 4px;
  padding: 8px 0;
}

.monitor-device-history-entry + .monitor-device-history-entry {
  border-top: 1px dashed var(--line);
}

@media (max-width: 899px) {
  .monitor-device-history {
    margin-left: 46px;
  }
}


/* Mobile detail modal polish: app-styled header, device cards and login timeline. */
@media (max-width: 899px) {
  .monitor-modal-overlay {
    place-items: end center;
    padding: 0;
    background: rgba(15, 24, 39, .54);
    backdrop-filter: blur(6px);
  }

  .monitor-account-modal {
    display: flex;
    width: 100%;
    max-height: min(90dvh, 820px);
    flex-direction: column;
    gap: 0;
    overflow: auto;
    padding: 22px 20px max(22px, env(safe-area-inset-bottom));
    border: 0;
    border-radius: 26px 26px 0 0;
    background: var(--surface, #fff);
    box-shadow: 0 -12px 40px rgba(16, 28, 48, .18);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .monitor-modal-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    align-items: start;
    gap: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
  }

  .monitor-modal-title-wrap {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
  }

  .monitor-modal-title {
    display: block;
    font-size: 18px;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .monitor-modal-subtitle {
    display: block;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .monitor-modal-close {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #f4f6f9;
    color: var(--ink);
    font-family: inherit;
    font-size: 22px;
    font-weight: 500;
    line-height: 1;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    cursor: pointer;
  }

  .monitor-modal-close:hover {
    background: #e9edf3;
    color: var(--ink);
  }

  .monitor-modal-close:active {
    background: #e4eaf2;
    transform: scale(.94);
  }

  .monitor-modal-close:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
  }

  .monitor-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 15px 0 13px;
    margin: 0;
    border-bottom: 1px solid var(--line);
  }

  .monitor-modal-meta > span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .monitor-modal-section-title {
    margin: 18px 0 10px;
    font-size: 13px;
    line-height: 1.4;
  }

  .monitor-modal-device-group {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px 12px;
    align-items: center;
    padding: 14px;
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fbfcfe;
  }

  .monitor-modal-device-group + .monitor-device-history {
    margin: 0 0 14px 18px;
    padding: 10px 0 4px 17px;
    border-left: 2px solid #e7ebf1;
  }

  .monitor-modal-device-group .monitor-device-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .monitor-modal-device-group .monitor-device-info {
    gap: 4px;
  }

  .monitor-modal-device-group .monitor-device-title {
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .monitor-modal-device-group .monitor-device-detail {
    font-size: 11px;
    line-height: 1.45;
  }

  .monitor-modal-device-group .monitor-status {
    grid-column: 2;
    justify-self: start;
    margin: -2px 0 0;
    padding: 5px 9px;
    font-size: 10px;
  }

  .monitor-device-history-entry {
    gap: 5px;
    padding: 8px 0;
  }

  .monitor-device-history-entry .monitor-device-detail {
    font-size: 11px;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .monitor-modal-close {
    transition: none !important;
  }
}

/* ---------- visual-polish.css ---------- */
/* Presentation only. Loaded last; preserve visibility, actions, animation names,
   timing, overlay placement and the application's responsive navigation. */
:root {
  --bg: var(--ui-bg);
  --surface: var(--ui-surface);
  --ink: var(--ui-ink);
  --navy: var(--ui-ink);
  --muted: var(--ui-muted);
  --line: var(--ui-line);
  --lime: var(--ui-lime);
  --lime-soft: var(--ui-lime-soft);
  --shadow: var(--ui-shadow-card);
  --card-shadow: var(--ui-shadow-card);
  --card-shadow-strong: var(--ui-shadow-raised);
}
body { font-family: var(--ui-font); }
button, input, select, textarea { font-family: var(--ui-font); }
.page-title, .greeting h1,
:is(.md-page-heading, .wip-page-heading, .menu-page-heading) h1 {
  font-family: var(--ui-heading-font);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.25;
}
.page-sub, :is(.md-page-heading, .wip-page-heading, .menu-page-heading) p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.eyebrow, .md-eyebrow, .wip-eyebrow, .menu-eyebrow {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .1em;
}
.section-head h2, .reservation-day-head h2,
:is(.md-list-heading, .wip-list-heading, .menu-list-heading) h2 {
  font-family: var(--ui-heading-font);
  font-size: 18px;
  letter-spacing: -.025em;
  line-height: 1.35;
}
.text-btn, .page-back { font-size: 12px; }
:is(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--ui-olive);
  outline-offset: 3px;
}

/* Login: same entrance motion, readable labels and a stronger grounded surface. */
.auth-panel {
  border-color: var(--line);
  border-radius: var(--ui-radius-dialog);
  box-shadow: var(--ui-shadow-raised);
}
.auth-intro h1 { color: var(--ink); line-height: 1.2; }
.auth-intro p, .auth-security-note { color: var(--muted); }
.auth-eyebrow { color: var(--ui-olive); font-size: 10px; }
.auth-form { gap: 12px; }
.auth-form label { font-size: 13px; }
.auth-input-wrap { border-color: var(--line); border-radius: var(--ui-radius-control); }
.auth-input-wrap:focus-within {
  border-color: var(--ui-olive);
  box-shadow: 0 0 0 3px rgba(83,104,44,.12);
}
.auth-input-wrap input::placeholder { color: #777985; }
.auth-submit { font-size: 14px; border-radius: var(--ui-radius-control); }
.auth-message { font-size: 12px; line-height: 1.5; }
.auth-security-icon { background: var(--lime-soft); color: var(--ui-olive); }

/* Shared controls; semantic destructive/success treatments remain separate. */
.primary, .secondary, .md-primary, .wip-primary, .menu-primary,
.md-export-button, .monitor-refresh, .division-overview-refresh {
  border-radius: var(--ui-radius-control);
  box-shadow: var(--ui-shadow-control);
}
.filter.active, .monitor-tab.is-active,
.md-filter-row button.is-selected, .wip-filter-row button.is-selected,
.menu-filter-row button.is-selected {
  background: var(--lime);
  border-color: var(--ui-lime-strong);
  color: var(--ink);
}
.drawer-item.active { background: var(--lime-soft); color: var(--ink); }
.drawer-item.active::before { background: var(--ui-olive); }
.scope-trigger { color: var(--ink); background: var(--ui-surface-soft); box-shadow: var(--ui-shadow-control); }
.quick-menu-item > svg:first-child { border-color: var(--line); box-shadow: var(--ui-shadow-control); }
.quick-menu-item { border-radius: var(--ui-radius-control); }
.search input, .md-search, .wip-search, .menu-search,
.monitor-select-trigger, .app-select-trigger {
  border-color: var(--line);
  border-radius: var(--ui-radius-control);
  box-shadow: var(--ui-shadow-control);
}
.md-search input, .wip-search input, .menu-search input { font-size: 14px; }
.md-search:focus-within, .wip-search:focus-within, .menu-search:focus-within {
  border-color: var(--ui-olive);
  box-shadow: 0 0 0 3px rgba(83,104,44,.12);
}
.app-select-option.is-selected, .scope-dropdown-option.is-selected {
  background: var(--lime-soft); color: var(--ink);
}
.monitor-select-option[aria-selected="true"] { background: var(--lime-soft); color: var(--ink); }

/* Guest Operations: ticket remains the signature; depth has a clear hierarchy. */
.hero { box-shadow: var(--ui-shadow-raised); }
.metric, .guest, .reservation-card, .settings-card {
  border-color: var(--line);
  box-shadow: var(--ui-shadow-card);
}
.metric, .guest, .reservation-card { border-radius: var(--ui-radius-card); }
.guest-name { font-size: 14px; line-height: 1.4; }
.guest-meta { font-size: 12px; flex-wrap: wrap; row-gap: 4px; }
.guest .ticket { background: var(--lime); color: var(--ink); }
.guest .actions .mini { font-size: 12px; }
.hero-total, .metric strong, .detail-cell b,
.reservation-time-display, .dashboard-trend-value { font-variant-numeric: tabular-nums; }
.metric small { color: var(--muted); line-height: 1.45; }
.metric-top { flex-wrap: wrap; }
.metric-top .eyebrow { font-size: 10px; letter-spacing: .05em; }
.empty p, .reservation-empty p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.history-date { border-color: var(--line); box-shadow: var(--ui-shadow-control); }
.history-date-copy small { color: var(--muted); font-size: 11px; }
.history-date-copy strong { font-size: 14px; }
.filters { gap: 8px; }
.filter { font-size: 12px; }
.reservation-toolbar, .reservation-calendar { border-color: var(--line); box-shadow: var(--ui-shadow-card); }
.reservation-legend { color: var(--muted); font-size: 11px; }
.reservation-day.selected, .calendar-day.selected {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--ui-lime-strong);
}
.reservation-day-head { gap: 12px; }
.reservation-day-head p { color: var(--muted); font-size: 12px; }
.setting-copy b { font-size: 14px; line-height: 1.4; }
.setting-copy small { font-size: 12px; line-height: 1.55; }
.setting-icon { background: var(--ui-surface-soft); color: var(--ink); }
.setting-row { gap: 12px; }

/* Sheets and nested forms: no changes to the opening/closing transforms. */
.sheet, .sheet.operational-modal, .calendar-dialog, .logout-confirm-dialog,
.monitor-account-modal { box-shadow: var(--ui-shadow-overlay); }
.sheet-head h2, .md-sheet-heading h2, .md-sheet-simple .md-sheet-heading h2,
.wip-sheet-heading h2, .menu-sheet-heading h2, .monitor-modal-title {
  font-family: var(--ui-heading-font);
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -.025em;
}
#sheet .field label, .md-field, .md-sheet-simple .md-field, .wip-field, .menu-field {
  font-size: 12px;
  line-height: 1.5;
}
#sheet .field input, #sheet .field select, #sheet .field textarea,
.md-field input, .md-field select, .wip-field input, .wip-field select,
.menu-field input, .menu-field select {
  border-color: var(--line);
  border-radius: var(--ui-radius-control);
  background: var(--surface);
  color: var(--ink);
}
#sheet .field input:focus, #sheet .field select:focus, #sheet .field textarea:focus,
.md-field input:focus, .md-field select:focus, .wip-field input:focus,
.wip-field select:focus, .menu-field input:focus, .menu-field select:focus {
  border-color: var(--ui-olive);
  box-shadow: 0 0 0 3px rgba(83,104,44,.12);
}
.md-sheet, .wip-sheet, .menu-sheet { gap: 16px; }
.md-sheet-simple form, .wip-sheet form, .menu-sheet form { gap: 12px; }
.md-form-note, .md-sheet-simple .md-form-note, .wip-form-note, .menu-form-note {
  color: var(--muted); font-size: 12px; line-height: 1.5;
}
.md-sheet-simple .md-supply-toggle small, .md-advanced summary small,
.md-sheet-simple .md-price-result span, .md-sheet-simple .md-price-result small {
  color: var(--muted); font-size: 11px; line-height: 1.5;
}
.md-sheet-simple .md-supply-toggle b, .md-advanced summary b,
.md-advanced-content .md-field, .md-advanced-content .md-add-unit { font-size: 12px; }
.md-sheet-simple .md-price-result strong { font-size: 16px; }
.wip-recipe-section, .menu-recipe-section {
  padding: 16px;
  border-color: var(--line);
  background: var(--ui-surface-soft);
  border-radius: 16px;
}
.wip-recipe-row, .menu-recipe-row { padding: 12px; background: var(--surface); border-color: var(--line); }
.md-sheet-actions button, .wip-sheet-actions button, .menu-sheet-actions button {
  min-height: 44px; font-size: 13px; border-radius: var(--ui-radius-control);
}
.md-sheet-actions-simple .md-save { background: var(--ink); color: #fff; }
.detail-cell { background: var(--ui-surface-soft); border-radius: var(--ui-radius-control); }
.detail-cell small { font-size: 11px; color: var(--muted); }
.logout-confirm-mark { background: var(--lime-soft); color: var(--ink); }
.logout-confirm-dialog p { color: var(--muted); }

/* Master Barang, WIP and Menu share one reading rhythm. */
.md-page, .wip-page, .menu-page { gap: 16px; }
.wip-page > .md-export-toolbar + .wip-list-heading,
.menu-page > .md-export-toolbar + .menu-list-heading { margin-top: 20px; }
.md-item-list, .wip-list, .menu-list { gap: 12px; }
.md-item-card, .wip-card, .menu-card {
  padding: 16px;
  border-color: var(--line);
  border-radius: var(--ui-radius-card);
  box-shadow: var(--ui-shadow-card);
}
.md-item-copy h3, .wip-card-copy h3, .menu-card-copy h3 {
  font-family: var(--ui-heading-font); font-size: 15px; line-height: 1.4;
}
.md-base-unit-label, .wip-card-base, .menu-card-base { font-size: 12px; line-height: 1.5; }
.md-item-prices small, .wip-card-metrics small, .menu-card-prices small {
  font-size: 11px; line-height: 1.4; color: var(--muted);
}
.md-item-prices b, .wip-card-metrics b, .menu-card-prices b {
  font-size: 13px; line-height: 1.4; font-variant-numeric: tabular-nums;
}
.md-item-prices > div, .wip-card-metrics > div, .menu-card-prices > div {
  padding: 10px; background: var(--ui-surface-soft); border-radius: 12px;
}
.md-item-footer, .wip-card-footer, .menu-card-footer {
  gap: 12px; margin-top: 12px; padding-top: 12px; border-color: var(--line);
}
.md-item-footer > span, .wip-card-footer > span, .menu-card-footer > span { font-size: 11px; line-height: 1.5; }
.md-count-grid, .wip-count-grid, .menu-count-grid { gap: 12px; }
.md-count-grid > div, .wip-count-grid > div, .menu-count-grid > div {
  padding: 14px; border-color: var(--line); border-radius: 16px; box-shadow: var(--ui-shadow-card);
}
.md-count-grid span, .wip-count-grid span, .menu-count-grid span { font-size: 11px; line-height: 1.4; }
.md-count-grid b, .wip-count-grid b, .menu-count-grid b { font-variant-numeric: tabular-nums; }
.md-export-toolbar, .md-export-toolbar-actions { gap: 12px; flex-wrap: wrap; }
.md-export-toolbar-actions > :is(.md-filter-row, .wip-filter-row, .menu-filter-row) { gap: 6px; flex-wrap: wrap; }
.md-export-toolbar-actions > :is(.md-filter-row, .wip-filter-row, .menu-filter-row) button,
.md-export-toolbar-actions > :is(.md-export-button, .md-primary, .wip-primary, .menu-primary) {
  min-height: 40px; height: auto; padding: 10px 12px; font-size: 12px; line-height: 1.3;
}
.md-item-actions .md-more, .md-item-actions .md-status-action,
.wip-card-actions button, .menu-card-actions button { min-height: 40px; font-size: 12px; }
.md-empty p, .md-error p, .wip-empty p, .menu-empty p { font-size: 12px; line-height: 1.6; }

/* Monitoring and division summaries keep their original status meanings. */
.monitor-stat, .monitor-account, .monitor-activity-item, .division-overview-card {
  border-color: var(--line); border-radius: var(--ui-radius-card); box-shadow: var(--ui-shadow-card);
}
.monitor-stat span, .monitor-updated, .monitor-role, .monitor-outlet,
.monitor-device-detail, .monitor-activity-time, .monitor-activity-reason { font-size: 12px; line-height: 1.5; }
.monitor-activity-title, .monitor-device-title { font-size: 14px; line-height: 1.4; }
.monitor-activity-detail { color: var(--muted); font-size: 13px; line-height: 1.5; }
.monitor-stat strong, .division-overview-metrics strong { font-variant-numeric: tabular-nums; }
.monitor-role, .monitor-outlet, .monitor-device-icon { background: var(--ui-surface-soft); color: var(--muted); }
.monitor-modal-device-group { border-color: var(--line); background: var(--ui-surface-soft); }
.division-overview-card h2 { color: var(--ink); font-family: var(--ui-heading-font); font-size: 18px; }
.division-overview-metrics div { background: var(--ui-surface-soft); padding: 12px; }
.division-overview-metrics span { color: var(--muted); font-size: 11px; }
.division-overview-note { color: var(--muted); font-size: 12px; }

/* Desktop: align sections without changing rail geometry or list capacity. */
@media (min-width: 900px) {
  .content { padding: 32px 32px 48px; }
  #page-dashboard.page.active {
    column-gap: 24px; row-gap: 20px;
    grid-template-rows: auto 112px minmax(112px, auto) auto auto;
  }
  #page-dashboard > .metrics { height: auto; align-self: stretch; }
  #page-dashboard > .greeting h1 { font-size: 28px; line-height: 1.25; }
  #page-dashboard > .section-head h2 { font-size: 22px; line-height: 1.3; }
  #page-dashboard > .hero {
    background: linear-gradient(135deg, var(--lime), var(--ui-lime-strong));
    box-shadow: var(--ui-shadow-raised); border-radius: var(--ui-radius-card);
  }
  #page-dashboard > .metrics .metric {
    border-color: var(--line); border-radius: var(--ui-radius-card); box-shadow: var(--ui-shadow-card);
  }
  #page-dashboard > .metrics .metric-top .eyebrow { font-size: 11px; letter-spacing: .07em; }
  #page-dashboard > .metrics .metric small { font-size: 12px; }
  #page-dashboard > .metrics .metric-icon { background: var(--ui-surface-soft); color: var(--ink); }
  #page-dashboard > #dashboardList .guest { box-shadow: var(--ui-shadow-control); border-color: var(--line); }
  #page-dashboard > #dashboardList .guest .ticket { background: var(--lime); color: var(--ink); }
  .dashboard-reservations-layout { gap: 20px; }
  .dashboard-reservations-head h2, .dashboard-trend-head h2 { font-size: 20px; line-height: 1.3; }
  .dashboard-reservation-calendar-panel, .dashboard-reservation-details, .dashboard-trend-card {
    border-color: var(--line); border-radius: var(--ui-radius-card); box-shadow: var(--ui-shadow-card);
  }
  .dashboard-reservation-item { box-shadow: var(--ui-shadow-control); border-color: var(--line); }
  .dashboard-reservation-item-main small { font-size: 12px; line-height: 1.45; }
  .dashboard-trend-day, .dashboard-trend-value { font-size: 11px; }
  .dashboard-trend-toggle button.active {
    background: linear-gradient(135deg, var(--lime), var(--ui-lime-strong));
    color: var(--ink); box-shadow: var(--ui-shadow-control);
  }
  .dashboard-trend-bar {
    background: linear-gradient(180deg, #9aba56, var(--lime));
  }
  #page-dashboard > .hero, #page-dashboard > .metrics .metric { min-width: 0; }
  .md-item-card, .wip-card, .menu-card { padding: 20px; }
}

/* Dashboard date range and workspace controls. */
#page-dashboard > .greeting .greeting-dates {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
#page-dashboard .dashboard-date-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #24334d;
}
#page-dashboard .dashboard-date-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
#page-dashboard .dashboard-date-trigger:hover { color: #172b42; }
#page-dashboard .dashboard-date-trigger:focus-visible {
  outline: 2px solid #b6c978;
  outline-offset: 2px;
  box-shadow: none;
}
@media (min-width: 1280px) {
  #page-dashboard > .greeting .greeting-dates {
    align-self: center;
    transform: translateY(9px);
  }
}

.dashboard-date-dialog {
  width: min(470px, calc(100vw - 28px));
  max-width: none;
  max-height: 90dvh;
  padding: 20px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 18px 55px rgba(17, 18, 37, .16);
}
.dashboard-date-dialog::backdrop { background: rgba(17, 18, 37, .38); backdrop-filter: blur(3px); }
.dashboard-date-dialog {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.dashboard-date-dialog::-webkit-scrollbar {
  display: none;
}
@media (prefers-reduced-motion: no-preference) {
  .dashboard-date-dialog[open] { animation: dashboard-range-enter .22s ease-out both; }
  .dashboard-date-dialog[open]::backdrop { animation: dashboard-range-backdrop .2s ease-out both; }
  @keyframes dashboard-range-enter { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
  @keyframes dashboard-range-backdrop { from { opacity: 0; } to { opacity: 1; } }
}
.dashboard-date-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dashboard-date-dialog > header small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.dashboard-date-dialog > header h2 { margin: 4px 0 0; font: 750 18px Manrope, sans-serif; }
.dashboard-date-close,
.dashboard-calendar-nav button { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 12px; background: #f3f4f0; color: var(--ink); font-size: 21px; }
.dashboard-calendar-nav { display: flex; align-items: center; justify-content: space-between; margin: 18px 0 12px; }
.dashboard-calendar-nav strong { font-size: 14px; }
.dashboard-calendar-nav button:disabled { opacity: .35; cursor: default; }
.dashboard-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.dashboard-calendar-weekday { display: grid; place-items: center; height: 30px; color: #9997a4; font-size: 11px; font-weight: 800; }
.dashboard-calendar-empty,
.dashboard-calendar-day { display: grid; place-items: center; min-width: 0; height: 46px; }
.dashboard-calendar-day { border: 0; border-radius: 12px; background: #fafaf7; color: var(--ink); font-size: 14px; font-weight: 700; }
.dashboard-calendar-day:hover:not(:disabled) { background: #eff3e3; }
.dashboard-calendar-day.is-today:not(.is-range-start):not(.is-range-end) { font-weight: 800; }
.dashboard-calendar-day:disabled { color: #c2c7cf; cursor: default; }
.dashboard-calendar-limit { margin: 14px 0 0; color: var(--muted); font-size: 11px; text-align: center;
}
.dashboard-range-summary { display: flex; align-items: center; gap: 9px; margin: 18px 0; }
.dashboard-range-summary > div { flex: 1; min-width: 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; }
.dashboard-range-summary small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.dashboard-range-summary strong { font-size: 13px; white-space: nowrap; }
.dashboard-range-summary > span { color: var(--muted); }
.dashboard-calendar-panel { padding: 16px; border: 0; border-radius: 20px; background: #fff; box-shadow: 0 10px 26px rgba(17, 18, 37, .1); }
.dashboard-calendar-panel .dashboard-calendar-nav { margin: 0 0 12px; }
.dashboard-calendar-nav > div { display: flex; gap: 6px; }
.dashboard-calendar-day.is-in-range { background: var(--ui-lime-soft); }
.dashboard-calendar-day.is-range-start,
.dashboard-calendar-day.is-range-end { background: #d9ee8c; color: #111225; font-weight: 800; }
.dashboard-calendar-day.is-today:not(.is-range-start):not(.is-range-end) { box-shadow: inset 0 0 0 1px #aaa3e8; }
.dashboard-calendar-day:disabled { opacity: .35; }
.dashboard-calendar-day:focus-visible { outline: 2px solid var(--ui-olive); outline-offset: -2px; }
.dashboard-date-dialog > footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.dashboard-date-dialog > footer button { min-height: 39px; padding: 0 14px; border: 0; border-radius: 11px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.dashboard-range-clear { background: var(--ui-surface-soft); color: var(--ink); }
.dashboard-range-apply { background: var(--ink); color: var(--surface); }
.dashboard-range-apply:disabled { opacity: .4; cursor: default; }
@media (max-width: 520px) {
  .dashboard-date-dialog { padding: 16px; }
  .dashboard-calendar-panel { padding: 9px; }
  .dashboard-calendar-grid { gap: 3px; }
  .dashboard-calendar-day { height: 40px; }
  .dashboard-date-dialog > footer button { flex: 1; }
  #page-dashboard > .greeting .greeting-dates { flex-wrap: wrap; }
  #page-dashboard .greeting-dates > small { padding: 0; }
}
#page-dashboard .greeting-dates > small {
  padding-bottom: 0;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
#page-dashboard .dashboard-date-separator { padding-bottom: 10px; color: var(--muted); }
#page-dashboard > .section-head .queue-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  margin-left: auto;
}
#page-dashboard .queue-head-actions .workspace-scope-switcher {
  flex: 0 1 330px;
  width: 330px;
  margin: 0;
  gap: 8px;
}
#page-dashboard .queue-head-actions .workspace-scope-switcher .scope-field { flex: 1 1 0; }
#page-dashboard .queue-head-actions .scope-trigger { width: 100%; min-width: 0; }

@media (min-width: 900px) {
  #page-dashboard > .greeting .greeting-dates { display: flex; }
}
@media (min-width: 900px) and (max-width: 1279px) {
  #page-dashboard > .greeting { flex-wrap: nowrap; gap: 16px; }
  #page-dashboard > .greeting .greeting-dates { flex: 0 0 auto; justify-content: flex-end; transform: translateY(9px); }
  #page-dashboard > .section-head { flex-wrap: wrap; row-gap: 8px; }
  #page-dashboard > .section-head .queue-head-actions { flex: 1 1 100%; justify-content: flex-start; margin-left: 0; }
  #page-dashboard .queue-head-actions .workspace-scope-switcher { flex: 1 1 auto; width: auto; }
  #page-dashboard .queue-head-actions .workspace-scope-switcher { order: 0; }
}
@media (max-width: 899px) {
  #page-dashboard > .greeting { flex-wrap: wrap; gap: 10px; }
  #page-dashboard > .greeting .greeting-dates { flex: 1 1 100%; justify-content: flex-start; }
  #page-dashboard > .section-head { flex-wrap: wrap; row-gap: 10px; }
  #page-dashboard > .section-head .queue-head-actions { flex: 1 1 100%; justify-content: space-between; margin-left: 0; }
  #page-dashboard .queue-head-actions .workspace-scope-switcher { flex: 1 1 auto; width: auto; order: 0; }
}
@media (max-width: 420px) {
  #page-dashboard > .greeting .greeting-dates { gap: 6px; }
  #page-dashboard .dashboard-date-trigger { width: 42px; min-width: 42px; min-height: 42px; padding: 0; }
  #page-dashboard .dashboard-date-icon { width: 20px; height: 20px; }
  #page-dashboard .greeting-dates > small { font-size: 9px; }
  #page-dashboard .queue-head-actions .workspace-scope-switcher { gap: 6px; }
  #page-dashboard .queue-head-actions .scope-trigger { padding-right: 8px; padding-left: 8px; font-size: 12px; }
}

/* Mobile: wrap controls instead of shrinking text to 8px. */
@media (max-width: 899px) {
  .content { padding-left: 20px; padding-right: 20px; }
  .auth-panel { padding: 28px 24px; }
  .search input, .md-search input, .wip-search input, .menu-search input,
  #sheet .field input, #sheet .field select, #sheet .field textarea,
  .md-field input, .md-field select, .wip-field input, .wip-field select,
  .menu-field input, .menu-field select { font-size: 16px; }
  .md-sheet-simple .md-field input { font-size: 16px; }
  .md-export-toolbar .md-export-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
  }
  .md-export-toolbar-actions > :is(.md-filter-row, .wip-filter-row, .menu-filter-row) {
    grid-column: 1 / -1;
    display: flex;
    flex: none;
    gap: 8px;
    min-width: 0;
  }
  .md-export-toolbar-actions > :is(.md-filter-row, .wip-filter-row, .menu-filter-row) button {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 12px;
  }
  .md-export-toolbar-actions > :is(.md-export-button, .md-primary, .wip-primary, .menu-primary) {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin-left: 0;
    padding: 8px;
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
  }
  .guest .actions .mini { min-height: 40px; }
  #monitorLiveUsers .monitor-account-email { font-size: 12px; }
  #monitorLiveUsers .monitor-detail-button { min-height: 44px; font-size: 13px; }
  .monitor-modal-device-group .monitor-device-detail { font-size: 12px; }
  .monitor-summary { gap: 8px; }
}
@media (max-width: 390px) {
  .content { padding-left: 16px; padding-right: 16px; }
  .page-title, .greeting h1,
  :is(.md-page-heading, .wip-page-heading, .menu-page-heading) h1 { font-size: 24px; }
  .md-item-heading, .wip-card-heading, .menu-card-heading { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .md-item-footer, .wip-card-footer, .menu-card-footer { flex-wrap: wrap; }
  .md-count-grid, .wip-count-grid, .menu-count-grid { gap: 8px; }
  .md-count-grid > div, .wip-count-grid > div, .menu-count-grid > div { padding: 12px 8px; }
  .md-item-copy h3 { font-size: 15px; }
  .md-item-prices small { font-size: 11px; }
  .md-item-prices b { font-size: 13px; }
  .monitor-activity-top { flex-wrap: wrap; }
}

/* Only refine easing on existing transitions. Keep original delays/durations,
   keyframes and reduced-motion behavior; no JS animation lifecycle changes. */
@media (prefers-reduced-motion: no-preference) {
  .auth-panel, .auth-intro, .auth-input-wrap, .auth-submit,
  .guest, .metric, .reservation-card, .reservation-day, .calendar-day,
  .dashboard-reservation-item, .dashboard-trend-bar, .dashboard-trend-toggle button,
  .monitor-account, .monitor-select-trigger, .md-primary, .wip-primary, .menu-primary {
    transition-timing-function: var(--ui-ease);
  }
}
@media (hover: hover) and (pointer: fine) {
  #page-dashboard > #dashboardList > .guest:hover,
  .dashboard-reservation-list > .dashboard-reservation-item:hover,
  .monitor-account:hover { box-shadow: var(--ui-shadow-raised); border-color: #c6d5a7; }
  .drawer-item.active:hover { background: var(--lime); }
}

/* Desktop dashboard — tighten the handoff between summary, reservations, and trend. */
@media (min-width: 900px) {
  #page-dashboard.page.active {
    row-gap: 12px;
  }

  #page-dashboard > .dashboard-reservations {
    margin-top: 0;
  }

  #page-dashboard:has(> #pendingWrap:empty) > .dashboard-reservations {
    grid-row: 4;
  }

  #page-dashboard:has(> #pendingWrap:empty) > .dashboard-trend-card {
    grid-row: 5;
  }
}

/* Desktop dashboard: make operational details easier to scan. */
@media (min-width: 900px) {
  #page-dashboard > .hero { box-shadow: 0 8px 22px rgba(20, 35, 63, .12); }
  #page-dashboard > .metrics .metric strong { font-variant-numeric: tabular-nums; }
  #page-dashboard > #dashboardList {
    scrollbar-width: thin;
    scrollbar-color: #c5cbb7 transparent;
  }
  #page-dashboard > #dashboardList::-webkit-scrollbar { display: block; width: 7px; }
  #page-dashboard > #dashboardList::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #c5cbb7;
  }
  #page-dashboard .dashboard-reservation-time { height: 36px; }
  #page-dashboard .dashboard-reservation-time small { font-size: 10px; line-height: 1.1; }
  #page-dashboard .dashboard-reservation-time strong { line-height: 1.15; }
  #page-dashboard .dashboard-reservation-item-main strong { font-size: 14px; }
  #page-dashboard .dashboard-reservation-item-side .dashboard-reservation-actions button {
    min-height: 32px;
    font-size: 11px;
  }
}

/* Operational date filters: one web-style control for each guest list. */
#page-waiting .operational-page-head,
#page-history .operational-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 10px 0 16px;
}
.operational-page-heading { min-width: 0; }
.operational-page-heading .page-title { margin: 0; }
.operational-page-heading .page-sub { margin: 5px 0 0; }
.operational-page-head .operational-date-range-trigger {
  width: min(100%, 370px);
  min-height: 58px;
  margin: 0;
  padding: 8px 12px;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: none;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.operational-page-head .operational-date-range-trigger:hover,
.operational-page-head .operational-date-range-trigger:focus-visible {
  border-color: #b6c978;
  outline: none;
  box-shadow: 0 0 0 3px rgba(190, 218, 113, .18);
}
.operational-date-range-trigger .history-date-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ui-lime-soft);
  color: var(--ui-olive);
}
.operational-date-range-trigger .history-date-copy { gap: 4px; }
.operational-date-range-trigger .history-date-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.operational-date-range-trigger .history-date-copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.operational-date-range-meta {
  display: grid;
  justify-items: end;
  gap: 2px;
  flex: 0 0 auto;
}
.operational-date-range-meta small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
}
.operational-date-range-meta .history-date-chevron { width: 15px; height: 15px; }
.dashboard-calendar-day.is-in-range { border-radius: 9px; }
.dashboard-calendar-day.is-range-start,
.dashboard-calendar-day.is-range-end { border-radius: 11px; }
@media (max-width: 899px) {
  #page-waiting .operational-page-head,
  #page-history .operational-page-head {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .operational-page-head .operational-date-range-trigger { width: 100%; max-width: 420px; }
}

/* Mobile dashboard: move workspace scope above the cards and its date range
   below the active-queue heading. Desktop order remains unchanged. */
@media (max-width: 899px) {
  #page-dashboard.page.active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "welcome welcome"
      "scope scope"
      "hero hero"
      "metrics metrics"
      "pending pending"
      "queue-title queue-action"
      "date date"
      "queue-list queue-list"
      "reservations reservations"
      "trend trend";
    column-gap: 12px;
    row-gap: 0;
    align-items: start;
  }

  #page-dashboard > .greeting,
  #page-dashboard > .section-head,
  #page-dashboard > .section-head > .queue-head-actions {
    display: contents;
  }

  #page-dashboard > .greeting > div:first-child {
    grid-area: welcome;
    margin: 8px 2px 16px;
  }
  #page-dashboard #workspaceScopeSwitcher {
    grid-area: scope;
    width: 100%;
    max-width: 420px;
    margin: 0 0 16px;
  }
  #page-dashboard > .hero { grid-area: hero; }
  #page-dashboard > .metrics { grid-area: metrics; }
  #page-dashboard > #pendingWrap { grid-area: pending; }
  #page-dashboard > .section-head h2 {
    grid-area: queue-title;
    align-self: center;
    margin: 20px 2px 10px;
  }
  #page-dashboard > .section-head .text-btn {
    grid-area: queue-action;
    align-self: center;
    justify-self: end;
    margin: 20px 2px 10px;
    white-space: nowrap;
  }
  #page-dashboard > .greeting .greeting-dates {
    grid-area: date;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin: 0 0 16px;
  }
  #page-dashboard .dashboard-date-trigger { width: 42px; }
  #page-dashboard > #dashboardList { grid-area: queue-list; }
  #page-dashboard > .dashboard-reservations { grid-area: reservations; }
  #page-dashboard > .dashboard-trend-card { grid-area: trend; }
}


/* Gentle hover feedback on master-data cards and controls for mouse users. */
@media (hover: hover) and (pointer: fine) {
  :is(#page-master-items, #page-wips, #page-menus) :is(.md-item-card, .wip-card, .menu-card, .md-count-grid > div, .wip-count-grid > div, .menu-count-grid > div) {
    transition: transform .2s var(--ui-ease), box-shadow .2s var(--ui-ease), border-color .2s var(--ui-ease);
  }
  :is(#page-master-items, #page-wips, #page-menus) :is(.md-item-card, .wip-card, .menu-card, .md-count-grid > div, .wip-count-grid > div, .menu-count-grid > div):hover {
    transform: translateY(-2px);
    border-color: #c6d5a7;
    box-shadow: var(--ui-shadow-raised);
  }
  :is(#page-master-items, #page-wips, #page-menus) :is(.md-filter-row, .wip-filter-row, .menu-filter-row, .md-item-actions, .wip-card-actions, .menu-card-actions) button,
  :is(#page-master-items, #page-wips, #page-menus) .md-export-toolbar-actions > button {
    transition: box-shadow .2s var(--ui-ease), border-color .2s var(--ui-ease);
  }
  :is(#page-master-items, #page-wips, #page-menus) :is(.md-filter-row, .wip-filter-row, .menu-filter-row, .md-item-actions, .wip-card-actions, .menu-card-actions) button:hover:not(:disabled),
  :is(#page-master-items, #page-wips, #page-menus) .md-export-toolbar-actions > button:hover:not(:disabled) {
    border-color: #b7cf86;
    box-shadow: 0 3px 10px rgba(49, 66, 24, .14);
  }
}
@media (prefers-reduced-motion: reduce) {
  :is(#page-master-items, #page-wips, #page-menus) :is(.md-item-card, .wip-card, .menu-card, .md-count-grid > div, .wip-count-grid > div, .menu-count-grid > div):hover { transform: none; }
  :is(#page-master-items, #page-wips, #page-menus) :is(.md-item-card, .wip-card, .menu-card, .md-count-grid > div, .wip-count-grid > div, .menu-count-grid > div),
  :is(#page-master-items, #page-wips, #page-menus) :is(.md-filter-row, .wip-filter-row, .menu-filter-row, .md-item-actions, .wip-card-actions, .menu-card-actions) button,
  :is(#page-master-items, #page-wips, #page-menus) .md-export-toolbar-actions > button { transition: none; }
}

/* Match the wide-screen Master Barang card grid for WIP and Menu. */
@media (min-width: 1100px) {
  .wip-list, .menu-list { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
  .wip-list > .wip-empty, .menu-list > .menu-empty { grid-column: 1 / -1; }
  .wip-card, .menu-card { display: flex; flex-direction: column; }
  .wip-card-heading, .menu-card-heading { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .wip-card-footer, .menu-card-footer { align-items: flex-end; margin-top: auto; padding-top: 12px; }
}

/* ---------- stock-opname.css ---------- */
/* Stock Opname shares Master Data typography, controls and elevation. */
#page-stock-opname {
  --so-ink: var(--ui-ink);
  --so-muted: var(--ui-muted);
  --so-line: var(--ui-line);
  --so-shortage: #9c2828;
  color: var(--so-ink); max-width: 1200px; margin-inline: auto; padding-bottom: 100px; min-width: 0;
}
.so-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.so-head > div { min-width: 0; }
.so-head h1 { margin: 0; font: 800 28px/1.25 var(--ui-heading-font); letter-spacing: -.035em; }
.so-head p { margin: 4px 0 0; color: var(--so-muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.so-overview {
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 16px 18px;
  background: var(--ui-surface);
  border: 1px solid var(--so-line);
  border-inline-start: 4px solid var(--ui-lime-strong);
  border-radius: var(--ui-radius-card);
  box-shadow: var(--ui-shadow-card);
}
.so-overview:is([data-so-period-status="reopened"], [data-so-period-status="opening_pending"], [data-so-period-status="closed"]) {
  border-inline-start-color: #c69639;
}
.so-period-copy { display: grid; min-width: 0; gap: 3px; overflow-wrap: anywhere; }
.so-period-copy span { color: var(--so-muted); font-size: 12px; }
.so-period-copy strong { font: 800 16px/1.4 var(--ui-heading-font); }
.so-month-nav { display: flex; align-items: center; gap: 6px; }
.so-month-nav button { min-width: 30px; padding: 2px 8px; font-size: 15px; line-height: 1.3; }
.so-period-copy .so-month-name { color: var(--so-ink); font: 800 16px/1.4 var(--ui-heading-font); text-transform: capitalize; }
.so-overview .so-actions { margin: 0; }

.so-dashboard-row { display: grid; gap: 16px; margin: 16px 0; }
.so-dashboard-row > * { margin: 0; height: 100%; min-width: 0; }
.so-dashboard-row > .so-panel { margin: 0; }
.so-overview {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
}
.so-overview .so-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}
.so-overview .so-actions > button { flex: 1 1 180px; min-width: 0; }
.so-transaction-actions { display: flex; align-items: stretch; }
.so-transaction-actions .so-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  align-items: stretch;
  width: 100%;
  height: 100%;
  margin: 0;
}
.so-transaction-actions .so-actions > button {
  width: 100%;
  min-width: 0;
  justify-content: center;
}
@media (min-width: 900px) {
  .so-dashboard-row {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: stretch;
  }
}
.so-panel {
  min-width: 0; margin: 20px 0; padding: 20px;
  background: var(--ui-surface); border: 1px solid var(--so-line);
  border-radius: var(--ui-radius-card); box-shadow: var(--ui-shadow-card);
}
.so-panel h2 { margin: 0 0 12px; font: 800 18px/1.35 var(--ui-heading-font); letter-spacing: -.025em; }
.so-form { animation: pageIn .24s var(--ui-ease) both; }
.so-form-head { border-bottom: 1px solid var(--so-line); }
.so-form-head h2 { margin-bottom: 6px; font-size: 20px; }
.so-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin: 16px 0; }
.so-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 136px), 1fr));
  align-items: end;
  gap: 12px;
  max-width: 640px;
  margin: 16px 0;
  padding: 12px;
  background: var(--ui-surface-soft);
  border-radius: var(--ui-radius-control);
}
.so-toolbar label { display: grid; gap: 6px; min-width: 0; color: var(--so-muted); font-size: 12px; font-weight: 700; }
#page-stock-opname button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 13px/1.35 var(--ui-font); min-height: 44px; padding: 10px 14px;
  border: 1px solid var(--so-line); border-radius: var(--ui-radius-control);
  background: var(--ui-surface); color: var(--so-ink); box-shadow: var(--ui-shadow-control); cursor: pointer;
  transition: background .18s var(--ui-ease), border-color .18s var(--ui-ease), transform .18s var(--ui-ease);
}
#page-stock-opname button.so-primary { background: var(--ui-lime); border-color: var(--ui-lime-strong); }
#page-stock-opname button:active:not(:disabled) { transform: scale(.98); }
#page-stock-opname button:disabled { opacity: .55; cursor: not-allowed; }
#page-stock-opname input, #page-stock-opname select {
  display: block; font: 500 16px/1.3 var(--ui-font); width: 100%; min-width: 0; min-height: 44px;
  border: 1px solid var(--so-line); border-radius: var(--ui-radius-control); padding: 9px 10px;
  background: var(--ui-surface); color: var(--so-ink); box-shadow: var(--ui-shadow-control);
  box-sizing: border-box; font-variant-numeric: tabular-nums;
  transition: border-color .18s var(--ui-ease), box-shadow .18s var(--ui-ease);
}
#page-stock-opname input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
#page-stock-opname input::-webkit-inner-spin-button, #page-stock-opname input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
#page-stock-opname input:disabled, #page-stock-opname select:disabled { background: var(--ui-surface-soft); box-shadow: none; color: var(--so-muted); }
#page-stock-opname :focus-visible { outline: 2px solid var(--ui-olive); outline-offset: 3px; }
#page-stock-opname input:focus, #page-stock-opname select:focus { border-color: #858a94; box-shadow: none; }
#page-stock-opname input:focus-visible, #page-stock-opname select:focus-visible { outline: 2px solid #858a94; outline-offset: 2px; }
#page-stock-opname button.so-picker-trigger { display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; font-weight: 600; cursor: pointer; user-select: none; -webkit-user-select: none; }
#page-stock-opname button.so-picker-trigger > span { cursor: pointer; user-select: none; -webkit-user-select: none; }
.so-picker-trigger span:first-child { min-width: 0; overflow-wrap: anywhere; }
#page-stock-opname .so-picker-trigger:disabled { background: var(--ui-surface-soft); box-shadow: none; color: var(--so-muted); }
.so-picker-chevron { width: 8px; height: 8px; flex: 0 0 auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .7; }
.so-picker-dialog { position: fixed; width: min(440px,calc(100vw - 32px)); max-width: none; max-height: min(720px,calc(100dvh - 32px)); margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--ui-line); border-radius: var(--ui-radius-dialog); background: var(--ui-surface); color: var(--ui-ink); box-shadow: var(--ui-shadow-overlay); font-family: var(--ui-font); box-sizing: border-box; }
.so-picker-dialog::backdrop { background: rgba(17,18,37,.48); backdrop-filter: blur(4px); }
.so-picker-dialog button { color: var(--ui-ink); background: var(--ui-surface); font: 600 14px/1.35 var(--ui-font); border: 1px solid var(--ui-line); border-radius: var(--ui-radius-control); cursor: pointer; }
.so-picker-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--ui-line); }
.so-picker-dialog > header h2 { margin: 0; font: 800 17px/1.35 var(--ui-heading-font); }
.so-picker-dialog > header button, .so-picker-dialog footer button { min-height: 42px; padding: 8px 14px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius-control); background: var(--ui-surface); color: var(--ui-ink); font: 700 13px var(--ui-font); cursor: pointer; }
.so-picker-dialog button:focus-visible { outline: 2px solid var(--ui-olive); outline-offset: 2px; }
.so-picker-content { max-height: min(580px,calc(100dvh - 150px)); overflow-y: auto; padding: 16px 20px; }
.so-choice-list { display: grid; gap: 6px; }
.so-choice-list button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 9px 12px; text-align: left; }
.so-choice-check { color: var(--ui-olive); font-weight: 800; }
.so-picker-dialog footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--ui-line); }
.so-picker-dialog footer .so-primary { background: var(--ui-lime); border-color: var(--ui-lime-strong); }
.so-calendar-nav { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; margin-bottom: 16px; }
.so-calendar-nav strong { text-align: center; text-transform: capitalize; font-size: 15px; }
.so-calendar-nav button, .so-calendar-grid button { min-height: 42px; padding: 6px; }
.so-calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px; text-align: center; }
.so-calendar-grid > span { display: grid; min-height: 34px; place-items: center; color: var(--ui-muted); font-size: 11px; font-weight: 700; }
.so-calendar-grid button { width: 100%; border-color: transparent; background: transparent; }
.so-choice-list button.is-selected, .so-calendar-grid button.is-selected { background: var(--ui-lime); border-color: var(--ui-lime-strong); }
.so-calendar-selected { margin: 14px 0 0; color: var(--ui-muted); font-size: 13px; }
.so-ledger { width: 100%; border-collapse: collapse; table-layout: fixed; }
.so-ledger th {
  padding: 10px 6px;
  background: var(--ui-surface-soft);
  color: var(--so-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
}
.so-ledger th:first-child { border-start-start-radius: 8px; border-end-start-radius: 8px; }
.so-ledger th:last-child { border-start-end-radius: 8px; border-end-end-radius: 8px; }
.so-ledger td { padding: 12px 6px; border-top: 1px solid var(--so-line); vertical-align: middle; overflow-wrap: anywhere; }
.so-ledger th:first-child { padding-inline-start: 8px; }
.so-ledger td:first-child { padding-inline-start: 0; }
.so-ledger td:last-child { padding-inline-end: 0; }
.so-ledger th.so-quantity { width: 110px; }
.so-ledger th.so-unit { width: 120px; }
.so-ledger th.so-invoice { width: 160px; }
.so-ledger strong { display: block; font-size: 13px; font-weight: 700; line-height: 1.45; }
.so-ledger small { display: block; font-size: 11px; line-height: 1.5; color: var(--so-muted); margin-top: 4px; }
.so-ledger tr:focus-within { background: var(--ui-lime-soft); }
.so-ledger .so-error { color: var(--so-shortage); }
.so-notice { padding: 0; background: transparent; border: 0; border-radius: 0; font-size: 12px; line-height: 1.45; margin: 7px 0; overflow-wrap: anywhere; color: var(--so-muted); }
.so-warning { background: transparent; border: 0; color: #765315; }
.so-warning::before { content: '⚠'; display: inline-block; margin-inline-end: 6px; font-size: 12px; }
.so-form-head { padding-bottom: 10px; }
.so-form-head p { margin: 0; color: var(--so-muted); font-size: 12px; line-height: 1.45; }
.so-status { margin: 0 0 6px; font-size: 11px; line-height: 1.4; color: var(--so-muted); }
.so-form-footer { margin-top: 10px; padding-top: 4px; border-top: 1px solid var(--so-line); }
.so-form-footer .so-actions { margin-bottom: 0; }
.so-form-footer .so-primary { margin-left: auto; }
.so-history-head { margin-bottom: 12px; }
.so-history-head h2 { margin: 0; }
.so-history-tabs {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 6px;
  padding: 6px;
  background: var(--ui-surface-soft);
  border-radius: var(--ui-radius-control);
}
#page-stock-opname .so-history-tabs button {
  justify-content: space-between;
  min-width: 0;
  padding: 7px 9px;
  border-color: transparent;
  box-shadow: none;
  text-align: left;
  font-size: 11px;
}
.so-history-tabs button span {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.so-history-tabs button small { color: var(--so-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
#page-stock-opname .so-history-tabs button.is-active { background: var(--ui-lime); border-color: var(--ui-lime-strong); }
.so-history { list-style: none; padding: 0; margin: 0; min-width: 0; }
.so-history-panel {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--ui-line);
}
.so-history-panel > .so-history { margin-top: 0; }
.so-history-date {
  min-width: 0;
  margin: 0;
  padding: 8px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ui-line);
  border-radius: 0;
  box-shadow: none;
}
.so-history > .so-history-date:last-child { border-bottom: 0; }
.so-history-date:has(> details[open]) { border-bottom-color: var(--ui-lime-strong); }
.so-history-date > details { min-width: 0; }
.so-history summary { min-height: 44px; padding: 10px 0; cursor: pointer; font-weight: 600; }
.so-history-date > details > summary, .so-history-compact-details > summary, .so-sales-menu > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
:is(.so-history-date > details, .so-history-compact-details, .so-sales-menu) > summary::-webkit-details-marker { display: none; }
:is(.so-history-date > details, .so-history-compact-details, .so-sales-menu) > summary::after {
  content: '';
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-inline-end: 3px;
  border: solid var(--ui-muted);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg);
  transition: transform .18s var(--ui-ease);
}
:is(.so-history-date > details, .so-history-compact-details, .so-sales-menu)[open] > summary::after { transform: rotate(135deg); }
.so-history-date > details > summary {
  min-height: 44px;
  padding: 0;
  color: var(--ui-ink);
  font: 700 14px/1.4 var(--ui-heading-font);
}
.so-history-date > details > summary:focus-visible,
.so-history-compact-details > summary:focus-visible,
.so-sales-menu > summary:focus-visible {
  outline: 2px solid var(--ui-lime-strong);
  outline-offset: 3px;
  border-radius: var(--ui-radius-control);
}
.so-history-date > details > summary > span, .so-sales-menu > summary > span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.so-history-date > details > summary small { flex: 0 0 auto; color: var(--ui-muted); font: 600 11px/1.4 var(--ui-font); white-space: nowrap; }
.so-history-nested { margin: 8px 0 0; }
.so-history-nested > li { padding: 10px 0; overflow-wrap: anywhere; }
.so-history-nested > li + li { border-top: 1px solid var(--ui-line); }
.so-history-nested > .so-history-compact { padding: 0; }
.so-history-entry { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-width: 0; }
.so-history-entry > div { min-width: 0; }
.so-history-entry strong { font-size: 13px; line-height: 1.45; }
.so-history-entry small { display: block; margin-top: 3px; color: var(--ui-muted); font-size: 11px; line-height: 1.5; }
.so-history-tag {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--ui-lime-soft);
  color: var(--ui-olive);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.so-history-tag.is-void { background: var(--ui-surface-soft); color: var(--ui-muted); }
.so-history details { font-size: 13px; line-height: 1.6; }
.so-history-compact-details > summary { padding-inline: 4px; }
.so-history-compact-name { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 700; }
.so-history-compact-meta, .so-history-compact-cue { color: var(--ui-muted); font-size: 11px; }
.so-history-compact-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.so-history-compact-meta:empty { display: none; }
.so-history-compact-details > .so-opening-lines, .so-sales-menu-list { margin-bottom: 8px; }
.so-opening-lines { padding: 4px 12px; border-radius: var(--ui-radius-control); background: var(--ui-surface-soft); }
.so-history .so-opening-lines > div {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid var(--ui-line);
  font-size: 13px;
}
.so-opening-lines > div:last-child { border-bottom: 0; }
.so-opening-lines span { min-width: 0; overflow-wrap: anywhere; }
.so-opening-lines strong { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.so-history .so-opening-lines strong.is-negative,
.so-history .so-date-material-row strong.is-negative { color: var(--so-shortage); font-weight: 800; }
.so-history-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 0; }
#page-stock-opname .so-history-actions .so-history-link {
  position: relative;
  appearance: none;
  min-height: 0;
  margin: 0;
  padding: 0 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ui-ink);
  font: 600 13.5px/1.4 var(--ui-font);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
#page-stock-opname .so-history-link::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1.5px;
  background: currentColor;
  content: '';
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 260ms cubic-bezier(.16,1,.3,1);
}
#page-stock-opname .so-history-link:hover::after,
#page-stock-opname .so-history-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}
#page-stock-opname .so-history-link:focus-visible {
  outline: 2px solid var(--ui-lime-strong);
  outline-offset: 4px;
  border-radius: 2px;
}
#page-stock-opname .so-history-link:disabled { opacity: .55; cursor: wait; }
@media (prefers-reduced-motion: reduce) {
  #page-stock-opname .so-history-link::after { transition: none; }
}
.so-history-more { padding-top: 14px; text-align: center; }
.so-empty { padding: 24px 0 8px; color: var(--ui-muted); text-align: center; font-size: 13px; }
.so-empty strong { font-weight: 700; }
.so-history .so-date-materials { padding: 8px 0 0; }
.so-history .so-date-material-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: start;
  gap: 12px;
  min-width: 0;
  padding: 5px 0;
  border-bottom: 1px solid var(--ui-line);
}
.so-history .so-date-material-row:last-child { border-bottom: 0; }
.so-history .so-date-material-row span { min-width: 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 600; }
.so-history .so-date-material-row small { display: block; margin-top: 2px; color: var(--ui-muted); font-size: 11px; font-weight: 400; }
.so-history .so-date-material-row strong { min-width: 0; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.so-history .so-date-material-category + .so-date-material-category {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--ui-line);
}
.so-history .so-date-material-category h4.so-history-category-chip {
  display: inline-flex;
  align-items: center;
  margin: 0 0 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ui-lime-soft);
  color: var(--ui-olive);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.so-history-transactions {
  display: grid;
  margin: 12px 0 0;
  border-top: 1px solid var(--ui-line);
}
.so-history-transaction {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.so-history-transaction + .so-history-transaction { border-top: 1px solid var(--ui-line); }
.so-history-transaction-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.so-history-transaction-copy strong { font-size: 13px; line-height: 1.4; }
.so-history-transaction-copy small { color: var(--ui-muted); font-size: 11px; line-height: 1.4; }
.so-history-transaction .so-history-actions { padding: 0; }
.so-history .so-result-item { background: var(--ui-surface); border-color: var(--ui-line); }
.so-history .so-result-item > summary { min-height: 44px; cursor: pointer; }
.so-history .so-result-total { font-variant-numeric: tabular-nums; }
@media (max-width: 420px) {
  .so-history-date { padding: 8px 0; }
  .so-history-date > details > summary { font-size: 15px; }
  .so-history-transaction { grid-template-columns: minmax(0,1fr); }
  .so-history .so-date-material-row,
  .so-history .so-opening-lines > div { grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
  .so-history .so-date-material-row span,
  .so-history .so-opening-lines span { overflow-wrap: anywhere; }
  .so-history .so-date-material-row strong,
  .so-history .so-opening-lines strong { white-space: normal; text-align: right; }
}

.so-result { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 275px),1fr)); gap: 8px; }
.so-result-item { min-width: 0; background: var(--ui-surface-soft); border: 1px solid var(--so-line); border-radius: var(--ui-radius-control); }
.so-result-item > summary { position: relative; display: grid; gap: 4px; padding: 10px 12px 10px 25px; list-style: none; line-height: 1.4; }
.so-result-item > summary::-webkit-details-marker { display: none; }
.so-result-item > summary::before {
  position: absolute;
  top: 16px;
  left: 11px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  content: '';
}
.so-result-item[open] > summary::before { transform: rotate(45deg); }
.so-result-item[open] > summary { background: var(--ui-lime-soft); border-radius: var(--ui-radius-control) var(--ui-radius-control) 0 0; }
.so-result-top, .so-result-bottom { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: 6px; min-width: 0; }
.so-result-top { font-size: 13px; }
.so-result-top strong, .so-result-bottom span { overflow-wrap: anywhere; }
.so-result-top b, .so-result-bottom { font-variant-numeric: tabular-nums; }
.so-result-top [data-so-variance="-1"] { color: var(--so-shortage); }
.so-result-top [data-so-variance="1"] { color: var(--ui-olive); }
.so-result-bottom { color: var(--so-muted); font-size: 11px; }
.so-result-bottom span:last-child { text-align: right; }
.so-result-item > dl {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 6px;
  margin: 0;
  padding: 12px;
  border-top: 1px solid var(--so-line);
  font-size: 12px;
}
.so-result-item dd { margin: 0; font-variant-numeric: tabular-nums; }
.so-result-item dt { color: var(--so-muted); }
.so-result-total {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 12px;
  background: var(--ui-lime-soft);
  border-radius: var(--ui-radius-control);
  font-size: 13px;
  font-weight: 700;
}
.so-result-total strong { font: 800 16px/1.4 var(--ui-heading-font); font-variant-numeric: tabular-nums; }
#page-stock-opname .so-desktop-only { display: none; }
@media (hover: hover) and (pointer: fine) {
  #page-stock-opname button:hover:not(:disabled) { background: var(--ui-surface-soft); border-color: #c8d1ba; }
  #page-stock-opname button.so-primary:hover:not(:disabled),
  #page-stock-opname .so-history-tabs button.is-active:hover { background: var(--ui-lime-strong); }
  #page-stock-opname .so-unit-options button:hover:not(:disabled) { background: var(--ui-lime-soft); }
  #page-stock-opname .so-receipt-reference-form .so-receipt-clear:hover:not(:disabled)::before {
    background: #fbe3df;
  }
  #page-stock-opname .so-receipt-reference-form .so-receipt-clear:hover:not(:disabled) {
    background: transparent;
    border-color: transparent;
    color: var(--so-shortage);
  }
  #page-stock-opname .so-receipt-reference-form .so-receipt-search-results button:hover:not(:disabled),
  #page-stock-opname .so-receipt-reference-form .so-unit-options button:hover:not(:disabled) {
    background: var(--ui-lime-soft);
    color: var(--ui-ink);
  }
  #page-stock-opname .so-receipt-reference-form .so-receipt-cancel:hover:not(:disabled) {
    background: var(--ui-surface-soft);
  }
  #page-stock-opname .so-receipt-reference-form .so-receipt-extra-head button:hover:not(:disabled) {
    background: #fbe3df;
    color: var(--so-shortage);
  }
  html[data-desktop-theme="dark"] #page-stock-opname .so-receipt-reference-form .so-receipt-extra-head button:hover:not(:disabled) {
    background: var(--ui-surface-soft);
  }
  #page-stock-opname .so-receipt-reference-form .so-primary:hover:not(:disabled) {
    background: var(--ui-lime-strong);
    border-color: var(--ui-lime-strong);
  }
  html[data-desktop-theme="dark"] #page-stock-opname .so-receipt-reference-form .so-receipt-clear:hover:not(:disabled)::before {
    background: var(--ui-surface-soft);
  }
}
@media (max-width: 600px) {
  .so-head { gap: 10px; margin-bottom: 12px; }
  .so-overview { gap: 10px; padding: 12px; }
  .so-overview .so-actions { width: 100%; }
  #page-stock-opname .so-overview button { padding-inline: 10px; font-size: 12px; }
  .so-head h1 { font-size: 23px; }
  .so-head p { font-size: 12px; }
  #page-stock-opname .so-head button { flex-shrink: 0; padding-inline: 10px; font-size: 12px; }
  .so-panel { padding: 14px; margin: 16px 0; }
  .so-form-head { padding-bottom: 12px; }
  .so-form-head h2 { font-size: 18px; }
  .so-toolbar { gap: 8px; padding: 10px; }
  #page-stock-opname .so-toolbar .so-picker-trigger { padding-inline: 9px; }
  .so-ledger th.so-quantity { width: 64px; }
  .so-ledger th.so-unit { width: 76px; }
  #page-stock-opname .so-ledger input, #page-stock-opname .so-ledger .so-picker-trigger { padding: 8px 6px; }
  .so-ledger th { padding: 10px 4px; }
  .so-ledger td { padding: 10px 4px; }
  .so-ledger strong { font-size: 12px; }
  .so-form-footer .so-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .so-form-footer .so-primary { grid-column: 1 / -1; margin-left: 0; }
  #page-stock-opname .so-history-tabs button {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
  }
  /* Receipt fields get a labelled line below the name; counting stays one line. */
  .so-receipt-ledger, .so-receipt-ledger tbody { display: block; }
  .so-receipt-ledger thead { display: none; }
  .so-receipt-ledger tr { display: grid; grid-template-columns: 64px 76px minmax(0,1fr); gap: 10px 8px; padding: 14px 0; border-top: 1px solid var(--so-line); }
  .so-receipt-ledger td { display: block; padding: 0; border: 0; min-width: 0; }
  .so-receipt-ledger td:first-child { grid-column: 1 / -1; }
  .so-receipt-ledger td[data-so-label]::before { content: attr(data-so-label); display: block; margin-bottom: 6px; font-size: 11px; font-weight: 600; color: var(--so-muted); }
  .so-receipt-ledger input::placeholder { font-size: 12px; }
}
@media (max-width: 380px) {
  .so-history-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (min-width: 900px) {
  .so-history-tabs { grid-template-columns: repeat(6,minmax(0,1fr)); }
  #page-stock-opname .so-desktop-only { display: table-cell; }
  .so-count-ledger th.so-stock { width: 130px; }
  .so-count-ledger th.so-conversion { width: 150px; }
  .so-count-ledger .so-system-mobile { display: none; }
  .so-count-ledger td.so-stock, .so-count-ledger td.so-conversion { font-variant-numeric: tabular-nums; }
}
@media (prefers-reduced-motion: reduce) {
  #page-stock-opname * { transition: none !important; animation: none !important; }
}

/* Stock Opname confirmations stay inside the app on Android and desktop. */
.so-confirm-dialog {
  position: fixed;
  width: min(390px, calc(100vw - 40px));
  max-width: none;
  margin: auto;
  padding: 24px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-dialog);
  background: var(--ui-surface);
  color: var(--ui-ink);
  box-shadow: var(--ui-shadow-overlay);
  font-family: var(--ui-font);
  box-sizing: border-box;
}
.so-confirm-dialog[open] { animation: so-confirm-in .2s var(--ui-ease) both; }
.so-confirm-dialog::backdrop { background: rgba(17,18,37,.48); backdrop-filter: blur(4px); }
.so-confirm-dialog h2 { margin: 0; font: 800 20px/1.3 var(--ui-heading-font); letter-spacing: -.025em; }
.so-confirm-dialog p { margin: 10px 0 22px; color: var(--ui-muted); font-size: 13px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; max-height: 48vh; overflow-y: auto; }
#soFieldError { display: block; color: var(--so-shortage); font-size: 13px; }
.so-confirm-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.so-confirm-actions button {
  min-height: 46px; padding: 10px;
  border: 1px solid var(--ui-line); border-radius: var(--ui-radius-control);
  background: var(--ui-surface-soft); color: var(--ui-ink);
  font: 700 13px var(--ui-font); cursor: pointer;
}
.so-confirm-actions [data-so-accept] { background: var(--ui-lime); border-color: var(--ui-lime-strong); }
.so-confirm-actions button:focus-visible { outline: 2px solid var(--ui-olive); outline-offset: 3px; }
@keyframes so-confirm-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .so-confirm-dialog[open] { animation: none; } }

/* Sales lists the saved menu quantities and opens their ingredient detail. */
.so-sales-menu-list { display: grid; gap: 6px; }
.so-sales-menu { border: 1px solid var(--so-line); border-radius: var(--ui-radius-control); }
.so-sales-menu > summary { padding: 8px 10px; }
.so-sales-menu > summary strong { flex: 0 0 auto; font-size: 12px; font-variant-numeric: tabular-nums; }
.so-sales-menu-static { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; color: var(--so-muted); }
.so-sales-menu-static span { min-width: 0; overflow-wrap: anywhere; }
.so-sales-menu-static strong { flex: 0 0 auto; font-size: 12px; font-variant-numeric: tabular-nums; }
.so-sales-ingredients { border-top: 1px solid var(--so-line); }
.so-sales-ingredients > span { display: block; padding: 8px 12px 0; color: var(--so-muted); font-size: 11px; font-weight: 700; }
.so-sales-ingredients .so-opening-lines { border-radius: 0 0 var(--ui-radius-control) var(--ui-radius-control); }
.so-sales-fallback .so-opening-lines { border-top: 1px solid var(--so-line); border-radius: 0 0 var(--ui-radius-control) var(--ui-radius-control); }
.so-sales-unavailable { margin: 0; padding: 10px; color: var(--so-muted); font-size: 12px; }

/* Barang Masuk search shares the input styles used by the ledger. */
.so-receipt-search:not(.so-receipt-reference-field) {
  margin: 16px 0;
  padding: 12px;
  background: var(--ui-surface-soft);
  border: 1px solid var(--so-line);
  border-radius: var(--ui-radius-control);
}
.so-receipt-search:not(.so-receipt-reference-field) label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.so-receipt-search-results { display: grid; gap: 4px; margin-top: 6px; max-height: 265px; overflow-y: auto; }
.so-receipt-search-results p { margin: 3px 0; color: var(--so-muted); font-size: 12px; }
.so-receipt-search-results button span { min-width: 0; overflow-wrap: anywhere; }
.so-receipt-search-results button small { color: var(--so-muted); }
#page-stock-opname .so-receipt-remove { min-height: 36px; padding: 4px 8px; margin-top: 5px; background: transparent; box-shadow: none; font-size: 11px; }

/* Keep the material totals visible above the original transactions. */
.so-date-materials { padding: 4px 8px; }
.so-date-material-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 6px 0;
  border-bottom: 1px solid var(--so-line);
  font-size: 13px;
}
.so-date-material-row:last-child { border-bottom: 0; }
.so-date-material-row span { min-width: 0; overflow-wrap: anywhere; }
.so-date-material-row small { display: block; color: var(--so-muted); font-size: 11px; }
.so-date-material-row strong { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.so-date-material-category + .so-date-material-category { margin-top: 14px; }
.so-date-material-category h4 { margin: 0; padding: 10px 12px; color: var(--ui-ink); background: var(--ui-lime, #d9ef91); border-left: 4px solid var(--ui-olive, #617b2c); border-radius: 8px; font-size: 14px; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.so-date-original-transactions { margin: 0 8px; border-top: 1px solid var(--so-line); }
.so-date-original-transactions > summary { color: var(--so-muted); font-size: 12px; }
.so-date-original-transactions .so-history-nested { margin: 0; }
.so-date-original-transactions .so-history-nested > li { padding-top: 8px; }
@media (max-width: 600px) {
  .so-history-compact-meta, .so-history-compact-cue { font-size: 10px; }
  .so-date-material-row { font-size: 12px; }
}

/* Unit picker: app-styled desktop dropdown, existing mobile picker. */
#page-stock-opname .so-unit-dropdown, #page-stock-opname .so-unit-disabled { display: none; }
#page-stock-opname .so-unit-picker { display: block; }
@media (min-width: 900px) {
  #page-stock-opname .so-unit-picker { display: none; }
  #page-stock-opname .so-unit-disabled { display: flex; width: 100%; }
  #page-stock-opname .so-unit-dropdown { display: block; position: relative; }
  #page-stock-opname .so-unit-dropdown[open] { z-index: 20; }
  #page-stock-opname .so-unit-dropdown > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 9px 10px; border: 1px solid var(--so-line); border-radius: var(--ui-radius-control); background: var(--ui-surface); color: var(--so-ink); box-shadow: var(--ui-shadow-control); font: 700 13px/1.35 var(--ui-font); cursor: pointer; list-style: none; }
  #page-stock-opname .so-unit-dropdown > summary::-webkit-details-marker { display: none; }
  #page-stock-opname .so-unit-options { position: absolute; top: calc(100% + 4px); left: 0; z-index: 21; width: max(100%, 130px); max-height: 220px; overflow-y: auto; padding: 5px; border: 1px solid var(--so-line); border-radius: 12px; background: var(--ui-surface); box-shadow: var(--ui-shadow-card); }
  #page-stock-opname .so-unit-options button { display: flex; justify-content: flex-start; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 8px; box-shadow: none; text-align: left; }
  #page-stock-opname .so-unit-options button[aria-pressed="true"] { background: var(--ui-lime); }

}
#page-stock-opname .so-excel-import {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 14px; box-sizing: border-box; cursor: pointer;
  font: 700 13px/1.35 var(--ui-font); color: var(--so-ink); background: var(--ui-surface);
  border: 1px solid var(--so-line); border-radius: var(--ui-radius-control); box-shadow: var(--ui-shadow-control);
}
#page-stock-opname .so-excel-import input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
#page-stock-opname .so-excel-import:focus-within { outline: 2px solid var(--ui-lime-strong); outline-offset: 2px; }

/* Category menu is positioned beside its trigger on all screen sizes. */
.so-category-field { display: grid; gap: 6px; min-width: 0; color: var(--so-muted); font-size: 12px; font-weight: 700; }
.so-category-dropdown { position: relative; min-width: 0; }
.so-category-dropdown[open] { z-index: 25; }
.so-category-dropdown > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--so-line); border-radius: var(--ui-radius-control); background: var(--ui-surface); color: var(--so-ink); box-shadow: var(--ui-shadow-control); font: 700 13px/1.35 var(--ui-font); cursor: pointer; list-style: none; }
.so-category-dropdown > summary::-webkit-details-marker { display: none; }
.so-category-dropdown > summary:focus-visible { outline: 2px solid var(--ui-lime-strong); outline-offset: 2px; }
.so-category-options { position: absolute; top: calc(100% + 4px); left: 0; z-index: 26; width: 100%; max-height: 220px; overflow-y: auto; box-sizing: border-box; padding: 5px; border: 1px solid var(--so-line); border-radius: 12px; background: var(--ui-surface); box-shadow: var(--ui-shadow-card); }
#page-stock-opname .so-category-options button { display: flex; justify-content: flex-start; width: 100%; min-height: 40px; padding: 8px 10px; border: 0; border-radius: 8px; box-shadow: none; text-align: left; }
#page-stock-opname .so-category-options button[aria-pressed="true"] { background: var(--ui-lime); }
#page-stock-opname .so-category-options button:hover { background: var(--ui-lime-soft); }

/* Stock Opname master-item table: initial layout shell. */
#page-stock-opname .so-layout-table {
  display: block;
  margin: 18px 0 32px;
  padding: 14px;
  border: 1px solid var(--so-line);
  border-radius: 20px;
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-card);
}
.so-layout-table-scroll { width: 100%; }
.so-scroll-hint { display: none; }
.so-count-link { display: inline-flex; align-items: center; min-height: 44px; color: inherit; font-weight: 700; text-decoration: underline; }
#soCountTable, #soCountConfirm { scroll-margin-top: 5rem; }
.so-layout-ledger { width: 100%; border-collapse: separate; border-spacing: 0; color: var(--so-ink); }
.so-layout-ledger th, .so-layout-ledger td { padding: 13px 10px; border-bottom: 1px solid var(--so-line); text-align: right; font-size: 12px; }
.so-layout-ledger thead th { color: var(--so-muted); font-size: 10px; font-weight: 800; letter-spacing: .035em; line-height: 1.35; white-space: normal; }
.so-layout-ledger thead th:first-child, .so-layout-ledger tbody th { text-align: left; }
.so-layout-ledger thead th:first-child { min-width: 170px; }
.so-layout-ledger tbody th { font-size: 13px; font-weight: 750; overflow-wrap: anywhere; }
.so-layout-ledger tbody .so-table-group th { padding: 5px 12px; border-top: 2px solid currentColor; color: var(--so-muted); font-size: 11px; font-weight: 850; letter-spacing: .06em; text-align: left; text-transform: uppercase; }

.so-layout-ledger tbody tr:last-child th, .so-layout-ledger tbody tr:last-child td { border-bottom: 0; }
.so-layout-ledger .so-table-placeholder { color: var(--so-muted); }
.so-layout-ledger .so-table-negative { color: var(--so-shortage); font-weight: 800; }
.so-layout-ledger .so-table-empty { padding: 24px 12px; color: var(--so-muted); text-align: center; }
@media (max-width: 700px) {
  #page-stock-opname .so-layout-table { margin: 10px 0 20px; padding: 6px; }
  .so-scroll-hint { display: block; margin: 4px 6px 8px; font-size: 13px; color: var(--so-muted); }
  .so-layout-table-scroll { max-height: 70vh; overflow: auto; scroll-padding-inline-start: min(38vw, 152px); }
  .so-layout-ledger { min-width: 840px; table-layout: fixed; }
  .so-layout-ledger thead th:first-child,
  .so-layout-ledger tbody th[scope="row"] { position: sticky; left: 0; min-width: 0; width: min(38vw, 152px); background: var(--ui-surface); }
  .so-layout-ledger tbody th[scope="row"] { z-index: 2; }
  .so-layout-ledger thead th:first-child { z-index: 9; }
  .so-layout-ledger tbody td { font-size: 14px; }
}


/* Stock Opname table polish: clear header surface, lime header pills and Excel-like grid. */
.so-layout-ledger { border-collapse: collapse; }
.so-layout-ledger thead th { padding: 8px 6px; border: 1px solid var(--so-line); }
.so-layout-ledger thead th .so-table-header-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  box-sizing: border-box;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--ui-lime, #d9ef91);
  color: var(--ui-ink, #20251a);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: .025em;
  text-align: center;
}
.so-layout-ledger tbody th,
.so-layout-ledger tbody td { border: 1px solid var(--so-line); }
.so-layout-ledger .so-physical-input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  box-sizing: border-box;
  padding: 5px 6px;
  border: 1px solid var(--ui-lime-strong, #9bbd48);
  border-radius: 7px;
  background: var(--ui-surface);
  color: var(--so-ink);
  font: 700 12px/1.2 var(--ui-font);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.so-layout-ledger .so-physical-input:focus {
  outline: 2px solid var(--ui-lime-strong, #9bbd48);
  outline-offset: 1px;
}
@media (max-width: 700px) {
  .so-layout-ledger thead th { padding: 5px 2px; }
  .so-layout-ledger thead th .so-table-header-pill { min-height: 36px; padding: 4px 6px; font-size: 12px; }
}

/* Center the WIP section label and reuse the lime table-header pill. */
.so-layout-ledger tbody .so-table-group th { text-align: center; }
.so-layout-ledger tbody .so-table-group .so-table-header-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  box-sizing: border-box;
  padding: 6px 18px;
  border-radius: 8px;
  background: var(--ui-lime, #d9ef91);
  color: var(--ui-ink, #20251a);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: .025em;
  text-align: center;
}
@media (max-width: 700px) {
  .so-layout-ledger tbody .so-table-group th { text-align: left; }
  .so-layout-ledger tbody .so-table-group .so-table-header-pill { position: sticky; left: 6px; }
}

/* Center every Stock Opname column heading, including ITEM, within its own column. */
.so-layout-ledger thead th,
.so-layout-ledger thead th:first-child { text-align: center; }


/* Sticky Stock Opname column headings and WIP section marker while scrolling. */
.so-layout-ledger { border-collapse: separate; border-spacing: 0; --so-sticky-header-height: 58px; }
.so-layout-ledger thead th {
  position: sticky;
  top: 0;
  z-index: 8;
  background: var(--ui-surface, #fff) !important;
}
.so-layout-ledger tbody .so-table-group th {
  position: sticky;
  top: var(--so-sticky-header-height);
  z-index: 7;
  background: var(--ui-surface, #fff);
  box-shadow: 0 2px 3px rgba(0, 0, 0, .06);
}
@media (max-width: 700px) {
  .so-layout-ledger { --so-sticky-header-height: 48px; }
}


/* Desktop context label for the latest Stock Opname period. */
.so-table-period-label { display: none; }
@media (min-width: 701px) {
  .so-table-period-label {
    display: flex;
    align-items: center;
    min-height: 34px;
    margin: 0 0 10px;
    color: var(--so-muted);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .01em;
  }
}

/* ---------- desktop-theme.css ---------- */
.desktop-theme-setting { display: none; }
/* Master data forms and menu cards in desktop dark mode. */
@media (min-width: 900px) {
  html[data-desktop-theme="dark"] .md-sheet-simple .md-supply-toggle,
  html[data-desktop-theme="dark"] :is(.md-base-unit-row, .md-conversion-preview-row) {
    background: var(--ui-surface-soft); color: var(--ui-ink); border-color: var(--ui-line);
  }
  html[data-desktop-theme="dark"] .md-sheet-simple .md-supply-toggle :is(b, small) { color: var(--ui-ink); }
  html[data-desktop-theme="dark"] .md-advanced-mark,
  html[data-desktop-theme="dark"] :is(.md-close, .wip-close, .menu-close, .md-add-unit) {
    background: var(--ui-surface-soft); color: var(--ui-ink); border-color: var(--ui-line);
  }
  html[data-desktop-theme="dark"] .md-sheet-simple .md-price-result,
  html[data-desktop-theme="dark"] .menu-margin { background: var(--ui-lime-soft); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] .md-sheet-simple .md-price-result :is(span, strong, small),
  html[data-desktop-theme="dark"] .menu-margin :is(span, b),
  html[data-desktop-theme="dark"] :is(.md-base-unit-row, .md-conversion-preview-row) :is(b, strong) { color: var(--ui-ink); }
  html[data-desktop-theme="dark"] :is(.wip-recipe-type, .menu-recipe-type, .wip-unit-display, .menu-unit-display, .wip-recipe-labels, .menu-recipe-labels) { color: var(--ui-muted); }
  html[data-desktop-theme="dark"] :is(.wip-recipe-actions, .menu-recipe-actions) :is(.wip-add-row, .menu-add-row, .wip-cancel, .menu-cancel) {
    background: var(--ui-surface-soft); color: var(--ui-ink); border-color: var(--ui-line);
  }
  html[data-desktop-theme="dark"] :is(.wip-component-options, .menu-component-options) { background: var(--ui-surface); color: var(--ui-ink); border-color: var(--ui-line); }
  html[data-desktop-theme="dark"] :is(.wip-component-option, .menu-component-option) { color: var(--ui-ink); }
  html[data-desktop-theme="dark"] :is(.wip-component-option, .menu-component-option):is(:hover, :focus-visible) { background: var(--ui-surface-soft); color: var(--ui-ink); }
}
/* Keep the original mascot artwork visible without its white background. */
@media (min-width: 900px) {
  html[data-desktop-theme="dark"] .sidebar-mascot { mix-blend-mode: normal; }
  html[data-desktop-theme="dark"] :is(.sidebar-mascot__body, .auth-mascot img) {
    mix-blend-mode: normal;
    filter: url(#mascot-remove-white);
  }
  html[data-desktop-theme="dark"] .logout-confirm-dialog h2 { color: var(--ui-ink); }
  html[data-desktop-theme="dark"] .logout-confirm-dialog p { color: var(--ui-muted); }
  html[data-desktop-theme="dark"] .logout-confirm-mark { background: var(--ui-lime-soft); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] .logout-confirm-actions .logout-confirm-cancel { background: var(--ui-surface-soft); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] .logout-confirm-actions .logout-confirm-accept { background: var(--ui-lime); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] .logout-confirm-actions button:focus-visible { outline-color: var(--ui-lime-strong); }
}
@media (min-width: 900px) {
  .desktop-theme-setting { display: block; }
  #page-settings .desktop-theme-toggle { display: inline-grid; place-items: center; width: 44px; height: 44px; min-width: 44px; padding: 10px; border: 1px solid var(--ui-line); border-radius: 12px; background: var(--ui-surface-soft); color: var(--ui-ink); }
  .desktop-theme-toggle svg { width: 22px; height: 22px; }
  .desktop-theme-sun { display: none; }
  html[data-desktop-theme="dark"] .desktop-theme-moon { display: none; }
  html[data-desktop-theme="dark"] .desktop-theme-sun { display: block; }

  html[data-desktop-theme="dark"] {
    color-scheme: dark;
    --ui-bg: #141815; --ui-surface: #202622; --ui-surface-soft: #2b332d;
    --ui-ink: #f1f4eb; --ui-muted: #b8c2b5; --ui-line: #465147;
    --ui-lime: #455b2d; --ui-lime-soft: #35462d; --ui-lime-strong: #a5c85e; --ui-olive: #c4df82;
    --ui-shadow-control: 0 2px 8px #0005; --ui-shadow-card: 0 6px 18px #0005;
    --ui-shadow-raised: 0 10px 26px #0008; --ui-shadow-overlay: 0 18px 48px #000a;
  }
  html[data-desktop-theme="dark"] body { background: var(--ui-bg); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] :is(.top, .menu-drawer, .drawer-nav, .drawer-foot) { background-color: var(--ui-bg); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] :is(.drawer-item, .drawer-guide-icon, .auth-logout-button, .scope-trigger) { color: var(--ui-ink); }
  html[data-desktop-theme="dark"] :is(.hero, .metric, .guest, .settings-card, .empty, .reservation-card, .reservation-toolbar, .dashboard-reservation-card, .dashboard-trend-card, .monitor-stat, .monitor-account, .monitor-activity-item, .division-overview-card, .md-item-card, .wip-card, .menu-card, .md-count-grid > div, .wip-count-grid > div, .menu-count-grid > div, .so-panel, .so-overview, .sd-card, .sd-chart-panel, .sheet, .calendar-dialog, .logout-confirm-dialog, .so-picker-dialog, .so-confirm-dialog, .sd-dialog, .scope-dropdown, .app-select-menu) {
    background-color: var(--ui-surface); color: var(--ui-ink); border-color: var(--ui-line);
  }
  html[data-desktop-theme="dark"] :is(.md-search, .wip-search, .menu-search, .search, .md-item-prices > div, .wip-card-metrics > div, .menu-card-prices > div, .so-toolbar, .so-receipt-search, .so-ledger th, .so-category-options, .so-unit-options, .sd-production-summary, .sd-ledger-summary, .md-recipe-section, .wip-recipe-section, .menu-recipe-section, .wip-recipe-row, .menu-recipe-row, .md-conversion-row) {
    background-color: var(--ui-surface-soft); color: var(--ui-ink); border-color: var(--ui-line);
  }
  html[data-desktop-theme="dark"] :is(input, textarea, select) { background-color: var(--ui-surface-soft); color: var(--ui-ink); border-color: var(--ui-line); }
  html[data-desktop-theme="dark"] :is(.md-search input, .wip-search input, .menu-search input, .search input) { background: transparent; color: var(--ui-ink); }
  html[data-desktop-theme="dark"] :is(.page-title, .greeting h1, .setting-copy b, .md-item-copy h3, .wip-card-copy h3, .menu-card-copy h3, .md-list-heading h2, .wip-list-heading h2, .menu-list-heading h2, .sheet-head h2, .wip-sheet-heading h2, .menu-sheet-heading h2, .md-sheet-heading h2) { color: var(--ui-ink); }
  html[data-desktop-theme="dark"] :is(.md-filter-row button, .wip-filter-row button, .menu-filter-row button, .md-item-actions button, .wip-card-actions button, .menu-card-actions button, .md-export-button, .so-picker-trigger, .so-unit-dropdown > summary, .so-category-dropdown > summary, .so-unit-options button, .so-category-options button, .so-excel-import, .so-receipt-search-results button, .seating-step-button) {
    background-color: var(--ui-surface-soft); color: var(--ui-ink); border-color: var(--ui-line);
  }
  html[data-desktop-theme="dark"] :is(.md-filter-row button.is-selected, .wip-filter-row button.is-selected, .menu-filter-row button.is-selected, .so-unit-options button[aria-pressed="true"], .so-category-options button[aria-pressed="true"], .drawer-item.active, .sd-card-sales, .so-primary) {
    background-color: var(--ui-lime); color: var(--ui-ink); border-color: var(--ui-lime-strong);
  }
}
@media (min-width: 900px) {
  html[data-desktop-theme="dark"] :is(.primary, .md-primary, .wip-primary, .menu-primary, .md-save, .wip-save, .menu-save) { background-color: var(--ui-lime); color: var(--ui-ink); border-color: var(--ui-lime-strong); }
  html[data-desktop-theme="dark"] :is(.md-field, .wip-field, .menu-field, .setting-copy, .md-sheet-simple .md-field, .md-advanced-content .md-field) { color: var(--ui-ink); }
  html[data-desktop-theme="dark"] :is(.md-item-actions .md-status-action, .wip-card-actions .wip-status-action, .menu-card-actions .menu-status-action) { background: #363245; color: #dfd4ff; }
}
@media (min-width: 900px) {
  html[data-desktop-theme="dark"] #page-dashboard > .hero { background: linear-gradient(135deg, #344e29, #26382b); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] :is(.hero-label, .hero-foot span, .hero-foot b, .hero-total) { color: var(--ui-ink); }
}

/* Desktop dashboard and rail have more specific light-theme styles. */
@media (min-width: 900px) {
  html[data-desktop-theme="dark"] #page-dashboard > .dashboard-trend-card,
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-reservation-calendar-panel,
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-reservation-details,
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-reservation-list .reservation-empty {
    background: var(--ui-surface);
    border-color: var(--ui-line);
    color: var(--ui-ink);
  }
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-reservation-calendar { background: transparent; }
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-reservation-calendar .reservation-day:not(.selected) {
    background: var(--ui-surface-soft);
    color: var(--ui-ink);
  }
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-reservation-calendar .reservation-day.selected {
    background: #c5df74;
    color: #172012;
  }
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-reservation-list > .dashboard-reservation-item {
    background: var(--ui-surface-soft);
    border-color: var(--ui-line);
    color: var(--ui-ink);
  }
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-trend-toggle { background: var(--ui-surface-soft); }
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-trend-toggle button { color: var(--ui-muted); }
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-trend-toggle button.active { color: #172012; }
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-trend-day { color: var(--ui-muted); }
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-trend-track { border-color: var(--ui-line); }
  html[data-desktop-theme="dark"] .drawer-nav > .drawer-item:not(.active),
  html[data-desktop-theme="dark"] body.desktop-sidebar-collapsed:has(.page.active) .drawer-guide-icon,
  html[data-desktop-theme="dark"] body:has(.page.active) #authLogoutButton {
    background: var(--ui-surface-soft);
    color: var(--ui-ink);
    border-color: var(--ui-line);
  }
  html[data-desktop-theme="dark"] .drawer-nav > .drawer-item.active,
  html[data-desktop-theme="dark"] body.desktop-sidebar-collapsed:has(.page.active) .drawer-guide-icon.active {
    background: var(--ui-lime);
    color: var(--ui-ink);
  }
  html[data-desktop-theme="dark"] .drawer-nav > .drawer-item:not(.active):hover { background: #3a4838; color: var(--ui-ink); }
  html[data-desktop-theme="dark"] .drawer-nav > .drawer-item:not(.active):hover > svg:first-child { color: var(--ui-ink); }
}
@media (min-width: 900px) {
  html[data-desktop-theme="dark"] #page-dashboard > .metrics .metric {
    background: var(--ui-surface);
    border-color: var(--ui-line);
    color: var(--ui-ink);
  }
  html[data-desktop-theme="dark"] #page-dashboard > .metrics .metric-icon {
    background: var(--ui-surface-soft);
    color: var(--ui-ink);
  }
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-reservation-list .reservation-empty strong { color: var(--ui-ink); }
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-reservation-calendar .reservation-day:not(.selected):hover { background: #3a4838; color: var(--ui-ink); }
}

/* Desktop dark mode: shared surfaces and readable controls across features. */
@media (min-width: 900px) {
  html[data-desktop-theme="dark"] #page-dashboard > .section-head { background: transparent; }
  html[data-desktop-theme="dark"] #page-dashboard > .section-head h2,
  html[data-desktop-theme="dark"] #page-dashboard > .metrics .metric strong,
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-date-trigger,
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-date-trigger:hover { color: var(--ui-ink); }
  html[data-desktop-theme="dark"] #page-dashboard > #dashboardList { background: var(--ui-surface-soft); border-color: var(--ui-line); }
  html[data-desktop-theme="dark"] #page-dashboard > #dashboardList > .guest { background: var(--ui-surface); border-color: var(--ui-line); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-reservation-add-button { background: var(--ui-lime); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] :is(.page-back, .secondary) { background: var(--ui-surface-soft); border-color: var(--ui-line); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] :is(.text-btn, .page-back svg, .history-date-chevron) { color: var(--ui-olive); }

  /* Empty and error cards on Master Barang, WIP, Menu and monitoring. */
  html[data-desktop-theme="dark"] :is(.md-empty, .md-error, .wip-empty, .menu-empty, .monitor-empty) { background: var(--ui-surface); border-color: var(--ui-line); color: var(--ui-muted); }
  html[data-desktop-theme="dark"] :is(.md-empty b, .md-error b, .wip-empty b, .menu-empty b) { color: var(--ui-ink); }
  html[data-desktop-theme="dark"] :is(.md-empty-mark, .monitor-tabs, .monitor-select-menu, .monitor-modal-device-group, .monitor-detail-button, .monitor-modal-close) { background: var(--ui-surface-soft); border-color: var(--ui-line); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] :is(.monitor-tab, .monitor-modal-subtitle, .monitor-activity-detail) { color: var(--ui-muted); }
  html[data-desktop-theme="dark"] .monitor-tab.is-active { background: var(--ui-lime); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] .monitor-account-modal { background: var(--ui-surface); color: var(--ui-ink); border-color: var(--ui-line); }

  /* Guest history and reservation pages. */
  html[data-desktop-theme="dark"] :is(.history-date, button.history-date, .reservation-toolbar, .reservation-calendar, .reservation-empty, .reservation-card) { background: var(--ui-surface); color: var(--ui-ink); border-color: var(--ui-line); }
  html[data-desktop-theme="dark"] :is(.history-date-copy strong, .reservation-toolbar strong, .reservation-day-head h2, .reservation-empty strong, .reservation-name) { color: var(--ui-ink); }
  html[data-desktop-theme="dark"] :is(.history-date-copy small, .reservation-day-head p, .reservation-meta, .reservation-empty p) { color: var(--ui-muted); }
  html[data-desktop-theme="dark"] :is(.reservation-today-button, .reservation-month-nav button) { background: var(--ui-surface-soft); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] .reservation-calendar .reservation-day:not(.selected):not(.outside) { background: var(--ui-surface-soft); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] .reservation-calendar .reservation-day:not(.selected):not(.outside):hover { background: #3a4838; color: var(--ui-ink); }
  html[data-desktop-theme="dark"] .reservation-calendar .reservation-day.selected { background: #c5df74; color: #172012; }
  html[data-desktop-theme="dark"] #page-dashboard .dashboard-reservation-calendar { background: transparent; }

  /* Floating actions retain their existing order, icons and motion. */
  html[data-desktop-theme="dark"] .quick-menu-item > svg:first-child { background: var(--ui-surface-soft); color: var(--ui-ink); border-color: var(--ui-line); }
  html[data-desktop-theme="dark"] .quick-menu-item > span { background: var(--ui-surface-soft); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] .quick-menu-item:hover > svg:first-child { background: var(--ui-lime); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] .fab { background: var(--ui-lime); color: var(--ui-ink); }

  /* Sheets, form fields and the initial-status control. */
  html[data-desktop-theme="dark"] #sheet .field label { color: var(--ui-ink); }
  html[data-desktop-theme="dark"] #sheet .field :is(input, textarea, select),
  html[data-desktop-theme="dark"] #sheet .pack-control { background: var(--ui-surface-soft); border-color: var(--ui-line); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] #sheet .pack-control strong { color: var(--ui-ink); }
  html[data-desktop-theme="dark"] #sheet .pack-control button { background: #455249; color: var(--ui-ink); }
  html[data-desktop-theme="dark"] #sheet .seg button { color: var(--ui-ink) !important; }
  html[data-desktop-theme="dark"] #sheet .seg button.selected { color: #172012 !important; }
  html[data-desktop-theme="dark"] #sheet .close { background: var(--ui-surface-soft); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] #sheet .field :is(.reservation-picker-trigger, .reservation-select-trigger, .reservation-select-options, .reservation-select-option) { background: var(--ui-surface-soft); color: var(--ui-ink); border-color: var(--ui-line); }
  html[data-desktop-theme="dark"] #sheet .field .reservation-select-option.selected { background: var(--ui-lime); color: var(--ui-ink); }
  html[data-desktop-theme="dark"] :is(.reservation-time-display, .reservation-time-unit input, .reservation-time-unit button) { background: var(--ui-surface-soft); color: var(--ui-ink); border-color: var(--ui-line); }
  html[data-desktop-theme="dark"] :is(.reservation-time-display small, .reservation-time-display strong, .reservation-time-display span, .reservation-time-unit label) { color: var(--ui-ink); }

  /* Inventory warning colors remain distinct against dark surfaces. */
  html[data-desktop-theme="dark"] #page-stock-opname { --so-shortage: #ff9e9e; }
  html[data-desktop-theme="dark"] .so-warning { background: #4d3e1f; border-color: #927d43; color: #ffdf98; }
  html[data-desktop-theme="dark"] :is(.md-field input, .md-field select, .wip-field input, .wip-field select, .menu-field input, .menu-field select, .wip-component-search input, .menu-component-search input) { background: var(--ui-surface-soft); border-color: var(--ui-line); color: var(--ui-ink); }
}


/* Stock Opname — refine period status, month navigation, and primary actions. */
#page-stock-opname .so-period-copy .so-period-status {
  margin: 0;
  color: var(--so-muted);
  font: 500 13px/1.35 var(--ui-font);
}
#page-stock-opname .so-period-copy .so-month-name {
  color: var(--so-ink);
  font: 700 20px/1.25 var(--ui-heading-font);
  white-space: nowrap;
}
#page-stock-opname .so-overview .so-month-nav > button {
  display: inline-flex;
  flex: 0 0 42px;
  width: 42px;
  min-width: 42px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 13px;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s cubic-bezier(.2,.8,.2,1), background-color .18s ease, border-color .18s ease;
}
#page-stock-opname .so-overview .so-actions > button {
  box-shadow: 0 4px 11px rgba(17,18,37,.09);
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s cubic-bezier(.2,.8,.2,1), background-color .18s ease, border-color .18s ease;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  #page-stock-opname .so-overview .so-month-nav > button:hover:not(:disabled) {
    transform: translateY(-2px);
  }
  #page-stock-opname .so-overview .so-actions > button:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 9px 19px rgba(17,18,37,.15);
  }
  #page-stock-opname .so-overview .so-actions > button.so-primary:hover:not(:disabled) {
    box-shadow: 0 10px 20px rgba(124,153,43,.24);
  }
}
@media (prefers-reduced-motion: reduce) {
  #page-stock-opname .so-overview .so-month-nav > button,
  #page-stock-opname .so-overview .so-actions > button {
    transition: none;
  }
}


/* Let the month heading use the full period-card width between its arrows. */
#page-stock-opname .so-period-copy {
  width: 100%;
}
#page-stock-opname .so-period-copy .so-month-nav {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  width: 100%;
}
#page-stock-opname .so-period-copy .so-month-name {
  width: 100%;
  min-width: 0;
  text-align: center;
}


/* Stock Opname — strengthen month arrows and remove the period-card accent. */
#page-stock-opname .so-overview,
#page-stock-opname .so-overview:is([data-so-period-status="reopened"], [data-so-period-status="opening_pending"], [data-so-period-status="closed"]) {
  border-inline-start: 1px solid var(--so-line);
}
#page-stock-opname .so-overview .so-month-nav > button {
  color: var(--so-ink);
  background: #fff;
  border: 1px solid #d5d8e0;
  box-shadow: 0 4px 12px rgba(17,18,37,.16);
  font: 800 24px/1 var(--ui-font);
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  #page-stock-opname .so-overview .so-month-nav > button:hover:not(:disabled) {
    color: #17172b;
    background: #f8f9fc;
    border-color: #aeb4c1;
    box-shadow: 0 7px 16px rgba(17,18,37,.22);
  }
}

/* Stock Opname transaction shortcuts — clear, gentle hover feedback. */
#page-stock-opname .so-transaction-actions .so-actions > button {
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  #page-stock-opname .so-transaction-actions .so-actions > button:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.01);
    background: var(--ui-surface-soft);
    border-color: #c8d1ba;
    box-shadow: 0 8px 17px rgba(17,18,37,.15);
  }
  #page-stock-opname .so-transaction-actions .so-actions > button:active:not(:disabled) {
    transform: translateY(0) scale(.995);
    box-shadow: 0 3px 8px rgba(17,18,37,.12);
  }
}
@media (prefers-reduced-motion: reduce) {
  #page-stock-opname .so-transaction-actions .so-actions > button { transition: none; }
}


/* Lucide icons for Stock Opname transaction shortcuts. */
#page-stock-opname .so-transaction-actions .so-transaction-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}
#page-stock-opname .so-transaction-actions .so-transaction-icon {
  display: block;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  stroke: currentColor;
}
#page-stock-opname .so-transaction-actions .so-transaction-button span {
  line-height: 1.25;
}


/* Barang Masuk uses the same type scale in entry and history. */
#page-stock-opname .so-receipt-reference-form {
  font: 500 14px/1.5 var(--ui-font);
  padding: 18px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-card);
  background: var(--ui-surface);
  color: var(--ui-ink);
  box-shadow: var(--ui-shadow-card);
}
#page-stock-opname .so-receipt-reference-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 16px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--ui-line);
}
#page-stock-opname .so-receipt-heading-icon {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-control);
  background: var(--ui-lime-soft);
  color: var(--ui-olive);
}
#page-stock-opname .so-receipt-heading-icon svg { width: 23px; height: 23px; }
#page-stock-opname .so-receipt-reference-form h2 {
  margin: 0;
  color: var(--ui-ink);
  font: 600 18px/1.3 var(--ui-font);
}
#page-stock-opname .so-receipt-reference-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
#page-stock-opname .so-receipt-reference-field,
#page-stock-opname .so-receipt-search {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ui-ink);
  font-size: 13px;
  font-weight: 700;
}
#page-stock-opname .so-receipt-reference-field > span:not(.flt-label) {
  display: block;
  margin: 0;
  color: var(--ui-ink);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 700;
}
#page-stock-opname .so-receipt-reference-field small {
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 500;
}
#page-stock-opname .so-receipt-reference-field > input,
#page-stock-opname .so-receipt-reference-field > textarea,
#page-stock-opname .so-receipt-search input,
#page-stock-opname .so-receipt-reference-field > .so-picker-trigger {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 11px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-control);
  background: var(--ui-surface);
  color: var(--ui-ink);
  box-shadow: none;
  font: 500 14px/1.4 var(--ui-font);
  transition: background 140ms var(--ui-ease), border-color 140ms var(--ui-ease), box-shadow 140ms var(--ui-ease), transform 140ms var(--ui-ease);
}
#page-stock-opname .so-receipt-reference-field > button.so-picker-trigger {
  display: flex;
  align-items: center;
  caret-color: transparent;
}
#page-stock-opname .so-receipt-reference-field > input::placeholder,
#page-stock-opname .so-receipt-reference-field > textarea::placeholder,
#page-stock-opname .so-receipt-search input::placeholder {
  color: var(--ui-muted);
  opacity: 1;
}
#page-stock-opname .so-receipt-search { position: relative; }
#page-stock-opname .so-receipt-search-input-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  min-width: 0;
}
#page-stock-opname .so-receipt-search-input-wrap input {
  flex: 1 1 auto;
  min-width: 0;
  width: 1%;
  padding-right: 44px;
}
#page-stock-opname .so-receipt-search-input-wrap input[readonly] { cursor: default; }
#page-stock-opname .so-receipt-search-input-wrap input[type="search"]::-webkit-search-cancel-button,
#page-stock-opname .so-receipt-search-input-wrap input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
#page-stock-opname .so-receipt-search-input-wrap input[type="search"]::-ms-clear {
  display: none;
}
#page-stock-opname .so-receipt-search-input-wrap .so-receipt-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ui-muted);
  box-shadow: none;
  font: 600 20px/1 var(--ui-font);
  isolation: isolate;
  transition: color 140ms var(--ui-ease), transform 140ms var(--ui-ease);
}
#page-stock-opname .so-receipt-search-input-wrap .so-receipt-clear::before {
  position: absolute;
  inset: 8px;
  z-index: -1;
  border-radius: 50%;
  background: transparent;
  content: "";
  transition: background 140ms var(--ui-ease);
}
#page-stock-opname .so-receipt-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 5;
  max-height: min(300px, 45vh);
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-control);
  background: var(--ui-surface);
  color: var(--ui-ink);
  box-shadow: var(--ui-shadow-card);
}
#page-stock-opname .so-receipt-search.has-results .so-receipt-search-results,
#page-stock-opname .so-receipt-reference-form.is-receipt-searching .so-receipt-search-results { display: grid; }
#page-stock-opname .so-receipt-search-results button {
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--ui-ink);
  text-align: left;
  transition: background 140ms var(--ui-ease), border-color 140ms var(--ui-ease), box-shadow 140ms var(--ui-ease), transform 140ms var(--ui-ease);
}
#page-stock-opname .so-receipt-search-results button span { min-width: 0; overflow-wrap: anywhere; }
#page-stock-opname .so-receipt-search-results button small,
#page-stock-opname .so-receipt-search-results button [data-so-subtext] { color: var(--ui-muted); }
#page-stock-opname .so-receipt-meta,
#page-stock-opname .so-receipt-details-grid { display: grid; gap: 12px; min-width: 0; }
@media (min-width: 640px) {
  #page-stock-opname .so-receipt-meta { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
}
#page-stock-opname .so-receipt-quantity-unit-grid {
  display: grid;
  grid-template-columns: minmax(0,0.8fr) minmax(0,1.2fr);
  gap: 10px;
  min-width: 0;
}
#page-stock-opname .so-receipt-unit-control { min-width: 0; }
#page-stock-opname .so-receipt-unit-placeholder:disabled {
  justify-content: center;
  width: 100%;
  background: var(--ui-surface-soft);
  color: var(--ui-muted);
  cursor: not-allowed;
}
#page-stock-opname .so-receipt-extra-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-card);
  background: var(--ui-surface);
  color: var(--ui-ink);
  box-shadow: var(--ui-shadow-card);
}
#page-stock-opname .so-receipt-extra-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--ui-ink);
  font-size: 13px;
}
#page-stock-opname .so-receipt-extra-head button {
  min-height: 44px;
  padding: 8px;
  border: 0;
  border-radius: var(--ui-radius-control);
  background: transparent;
  color: var(--so-shortage);
  box-shadow: none;
  font: 600 11px/1.3 var(--ui-font);
}
#page-stock-opname .so-receipt-extra-head strong { min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
#page-stock-opname .so-receipt-extra-item .so-receipt-reference-field > input { min-height: 48px; }
#page-stock-opname .so-receipt-reference-footer { margin-top: 18px; padding-top: 0; border-top: 0; }
#page-stock-opname .so-receipt-reference-footer .so-actions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  width: 100%;
  gap: 9px;
  margin: 0;
}
#page-stock-opname .so-receipt-reference-footer .so-actions > button {
  min-height: 48px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-control);
  font: 800 12px/1.3 var(--ui-font);
  box-shadow: var(--ui-shadow-control);
  transition: background 140ms var(--ui-ease), border-color 140ms var(--ui-ease), box-shadow 140ms var(--ui-ease), transform 140ms var(--ui-ease);
}
#page-stock-opname .so-receipt-reference-footer .so-receipt-cancel {
  background: var(--ui-surface);
  border-color: var(--ui-line);
  color: var(--ui-ink);
}
#page-stock-opname .so-receipt-reference-footer .so-primary {
  background: var(--ui-lime);
  border-color: var(--ui-lime-strong);
  color: var(--ui-ink);
}
#page-stock-opname .so-receipt-reference-form :is(
  input, textarea, .so-picker-trigger, .so-unit-dropdown > summary,
  .so-unit-options button, .so-receipt-clear, .so-receipt-search-results button,
  .so-receipt-extra-head button, .so-receipt-reference-footer button
):focus-visible {
  outline: 2px solid var(--ui-olive);
  outline-offset: 2px;
  box-shadow: none;
}
#page-stock-opname .so-receipt-reference-form input:focus:not(:focus-visible),
#page-stock-opname .so-receipt-reference-form textarea:focus:not(:focus-visible),
#page-stock-opname .so-receipt-reference-form .so-picker-trigger:focus:not(:focus-visible),
#page-stock-opname .so-receipt-reference-form .so-unit-dropdown > summary:focus:not(:focus-visible) {
  border-color: var(--ui-olive);
  box-shadow: none;
}
#page-stock-opname .so-receipt-reference-form :is(
  input:disabled, textarea:disabled, button:disabled,
  .so-picker-trigger:disabled, .so-unit-dropdown > summary:disabled
) {
  background: var(--ui-surface-soft);
  color: var(--ui-muted);
  cursor: not-allowed;
  box-shadow: none;
}
#page-stock-opname .so-receipt-reference-form button:active:not(:disabled):not(.so-receipt-clear) {
  transform: translateY(1px);
}
#page-stock-opname .so-receipt-search-input-wrap .so-receipt-clear:active:not(:disabled) {
  transform: translateY(calc(-50% + 1px));
}
@media (min-width: 900px) {
  #page-stock-opname .so-receipt-details-grid {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(0,1.5fr);
    align-items: end;
    gap: 12px;
    min-width: 0;
  }
  #page-stock-opname .so-receipt-details-grid > .so-receipt-quantity-unit-grid { display: contents; }
  #page-stock-opname .so-receipt-details-grid > .so-receipt-reference-field { min-width: 0; }
}
#page-stock-opname .so-receipt-unit-control > .so-unit-dropdown { display: block; position: relative; }
#page-stock-opname .so-receipt-unit-control > .so-unit-dropdown[open] { z-index: 30; }
#page-stock-opname .so-receipt-reference-field:has(> .so-receipt-unit-control) > .flt-label { z-index: 31; }
#page-stock-opname .so-receipt-unit-placeholder,
#page-stock-opname .so-receipt-unit-control > .so-unit-dropdown > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 11px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-control);
  background: var(--ui-surface);
  color: var(--ui-ink);
  box-shadow: none;
  font: 500 14px/1.4 var(--ui-font);
  list-style: none;
  cursor: pointer;
  transition: background 140ms var(--ui-ease), border-color 140ms var(--ui-ease), box-shadow 140ms var(--ui-ease), transform 140ms var(--ui-ease);
}
#page-stock-opname .so-receipt-unit-control > .so-unit-dropdown[open] > summary {
  border-color: var(--ui-olive);
}
#page-stock-opname .so-receipt-unit-control > .so-unit-dropdown > summary::-webkit-details-marker { display: none; }
#page-stock-opname .so-receipt-unit-control > .so-unit-dropdown .so-unit-options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 31;
  max-height: 220px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-control);
  background: var(--ui-surface);
  color: var(--ui-ink);
  box-shadow: var(--ui-shadow-card);
}
#page-stock-opname .so-receipt-unit-control > .so-unit-dropdown .so-unit-options button {
  font-size: 11px;
  display: flex;
  justify-content: flex-start;
  width: 100%;
  min-height: 44px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ui-ink);
  box-shadow: none;
  text-align: left;
  transition: background 140ms var(--ui-ease), border-color 140ms var(--ui-ease), box-shadow 140ms var(--ui-ease), transform 140ms var(--ui-ease);
}
#page-stock-opname .so-receipt-unit-control > .so-unit-dropdown .so-unit-options button[aria-pressed="true"] {
  background: var(--ui-lime);
  color: var(--ui-ink);
}
@media (max-width: 899px) {
  #page-stock-opname:has(.so-receipt-reference-form) { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  #page-stock-opname .so-receipt-quantity-unit-grid { align-items: start; }
}
@media (max-width: 420px) {
  #page-stock-opname .so-receipt-reference-form { padding: 14px; }
  #page-stock-opname .so-receipt-reference-fields { gap: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  #page-stock-opname .so-receipt-reference-form :is(
    input, textarea, .so-picker-trigger, .so-unit-dropdown > summary, .so-unit-options button,
    .so-receipt-clear, .so-receipt-search-results button,
    .so-receipt-extra-head button, .so-receipt-reference-footer button
  ) {
    transition: none;
  }
  #page-stock-opname .so-receipt-reference-form button:active:not(:disabled):not(.so-receipt-clear) {
    transform: none;
  }
  #page-stock-opname .so-receipt-search-input-wrap .so-receipt-clear::before {
    transition: none;
  }
  #page-stock-opname .so-receipt-search-input-wrap .so-receipt-clear:active:not(:disabled) {
    transform: translateY(-50%);
  }
}


/* STOCK OPNAME — action button hover matching the desktop sidebar interaction. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  #page-stock-opname :is(.so-overview .so-actions, .so-transaction-actions .so-actions, .so-form-footer .so-actions) > button {
    position: relative;
    transform-origin: center;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s cubic-bezier(.2,.75,.25,1), box-shadow .18s ease, outline-color .18s ease;
  }
  #page-stock-opname :is(.so-overview .so-actions, .so-transaction-actions .so-actions, .so-form-footer .so-actions) > button:not(:disabled):not(.so-primary):hover {
    background: var(--ui-lime-soft);
    border-color: var(--ui-lime-strong);
    color: var(--ui-ink);
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 8px 19px rgba(78,96,38,.22);
    outline: 1px solid rgba(137,155,77,.45);
  }
  #page-stock-opname :is(.so-overview .so-actions, .so-transaction-actions .so-actions, .so-form-footer .so-actions) > button.so-primary:not(:disabled):hover {
    background: var(--ui-lime-strong);
    border-color: var(--ui-lime-strong);
    color: var(--ui-ink);
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 8px 20px rgba(78,96,38,.24);
    outline: 1px solid rgba(119,143,48,.55);
  }
}
@media (prefers-reduced-motion: reduce) {
  #page-stock-opname :is(.so-overview .so-actions, .so-transaction-actions .so-actions, .so-form-footer .so-actions) > button { transition: none !important; }
}


/* STOCK OPNAME — keep Barang Masuk cancel and submit actions side by side on mobile. */
@media (max-width: 600px) {
  #page-stock-opname .so-receipt-reference-footer .so-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
  #page-stock-opname .so-receipt-reference-footer .so-actions > button,
  #page-stock-opname .so-receipt-reference-footer .so-actions > .so-primary {
    grid-column: auto;
    width: 100%;
    min-width: 0;
    margin-left: 0;
  }
}


/* Floating label (#031): petunjuk duduk di field sampai fokus atau terisi. */
.flt { position: relative; display: block; min-width: 0; }
.flt > input,
.flt > textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius-control);
  background: var(--ui-surface);
  color: var(--ui-ink);
  font: 500 14px/1.3 var(--ui-font);
}
.flt > .flt-label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  padding: 0 5px;
  background: var(--ui-surface);
  color: var(--ui-muted);
  font: 500 13px/1.2 var(--ui-font);
  white-space: nowrap;
  pointer-events: none;
  transition: top 220ms cubic-bezier(.16,1,.3,1), font-size 220ms ease, color 180ms ease;
}
.flt:focus-within > .flt-label,
.flt:has(> input:not(:placeholder-shown)) > .flt-label,
.flt:has(> textarea:not(:placeholder-shown)) > .flt-label,
.flt.flt--static > .flt-label {
  top: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--ui-ink);
}
.flt:focus-within > input,
.flt:focus-within > textarea { border-color: var(--ui-olive); }
.flt > input:disabled,
.flt > textarea:disabled { background: var(--ui-surface-soft); color: var(--ui-muted); }
.flt:has(> input:disabled) > .flt-label { color: var(--ui-muted); }
.flt.so-receipt-search-input-wrap { display: flex; }
@media (prefers-reduced-motion: reduce) {
  .flt > .flt-label { transition: none; }
}

/* GLOBAL FORM FIELDS — use clean surface backgrounds consistently across features. */
html:not([data-desktop-theme="dark"]) :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  select,
  textarea
) {
  background-color: var(--ui-surface, #fff);
}

/* Chrome autofill mengecat latar biru; pertahankan warna permukaan aplikasi. */
:-webkit-autofill {
  -webkit-text-fill-color: var(--ui-ink, #17172a);
  caret-color: var(--ui-ink, #17172a);
  -webkit-box-shadow: inset 0 0 0 1000px var(--ui-surface, #fff) !important;
  box-shadow: inset 0 0 0 1000px var(--ui-surface, #fff) !important;
}


/* GLOBAL LIGHT THEME — remove remaining soft-gray surfaces used by feature panels and table headers. */
html:not([data-desktop-theme="dark"]) {
  --ui-surface-soft: #fff;
}


/* Keep history actions attached to the material row they affect. */
.so-history .so-date-material-row--actions {
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: center;
}
.so-history .so-date-material-row--actions .so-history-actions {
  justify-content: flex-end;
  gap: 12px;
}
@media (max-width: 640px) {
  .so-history .so-date-material-row--actions {
    grid-template-columns: minmax(0,1fr) auto;
  }
  .so-history .so-date-material-row--actions .so-history-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

.so-receipt-reference-form .so-history-panel { margin-top: 24px; padding-top: 20px; }
.so-receipt-reference-form .so-history-head { margin-bottom: 6px; }
.so-receipt-reference-form .so-history-panel .so-empty { padding: 0 0 8px; text-align: left; font-size: 11px; }
.so-receipt-reference-form .so-empty strong { font-weight: 500; }
.so-receipt-reference-form .so-history-date,
.so-receipt-reference-form .so-history > .so-history-date:last-child {
  padding: 0;
  margin-block: 8px;
  border: 1px solid var(--ui-line);
  border-radius: 10px;
  background: var(--ui-surface);
}
.so-receipt-reference-form .so-history-date > details > summary {
  padding: 0 12px;
  border-radius: 9px;
  font: 600 13px/1.4 var(--ui-font);
}
.so-receipt-reference-form .so-history-date > details > summary small { font-weight: 500; }
.so-receipt-reference-form .so-history-date > details[open] > summary {
  border-radius: 9px 9px 0 0;
  background: var(--ui-lime-soft);
}
.so-receipt-reference-form .so-history-date > details > summary::after {
  border-color: var(--ui-olive);
  transform: rotate(45deg);
}
.so-receipt-reference-form .so-history-date > details[open] > summary::after { transform: rotate(225deg); }
.so-receipt-reference-form .so-history .so-date-materials { display: grid; gap: 8px; padding: 8px; }
.so-receipt-reference-form .so-history .so-date-material-row {
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 2px 8px;
  padding: 10px;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
}
.so-receipt-reference-form .so-date-material-row > span { font-weight: 650; }
.so-receipt-reference-form .so-date-material-row > strong {
  padding: 3px 7px;
  border-radius: 6px;
  color: var(--ui-olive);
  background: var(--ui-lime-soft);
  font-size: 12px;
}
.so-receipt-reference-form .so-date-material-row > strong::before { content: '+'; }
.so-receipt-history-detail { grid-column: 1 / -1; min-width: 0; overflow-wrap: anywhere; }
.so-receipt-history-detail + .so-receipt-history-detail { padding-top: 6px; border-top: 1px solid var(--ui-line); }
.so-receipt-history-detail dl {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 4px 12px;
  font-size: 12px;
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--ui-line);
}
.so-receipt-history-detail dt { color: var(--ui-muted); }
.so-receipt-history-detail dd { margin: 0; }
.so-receipt-reference-form .so-receipt-history-detail .so-history-actions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 0;
  margin-top: 8px;
  border-top: 1px solid var(--ui-line);
}
#page-stock-opname .so-receipt-reference-form .so-history-link {
  min-height: 44px;
  justify-content: center;
  gap: 5px;
  padding: 0 4px;
  color: var(--ui-olive);
  font-size: 12px;
}
.so-receipt-history-detail .so-history-link + .so-history-link::before {
  position: absolute;
  left: 0;
  height: 14px;
  border-left: 1px solid var(--ui-line);
  content: '';
}

#page-stock-opname .so-receipt-reference-form .so-history-more button { font-size: 11px; }
#page-stock-opname .so-receipt-reference-form .flt > .flt-label { font-size: 11px; }
#page-stock-opname .so-receipt-reference-form .flt:is(
  :focus-within, .flt--static, :has(> input:not(:placeholder-shown))
) > .flt-label { font-size: 9px; }
