:root {
  --bg: #d3d8e0;
  --card: #ffffff;
  --card-2: #e8ebf0;
  --line: rgba(140, 146, 158, 0.45);
  --line-strong: #9a7412;
  --text: #2c3038;
  --muted: #6d7380;
  --gold: #9a7412;
  --gold-2: #6b4e08;
  --ink: #1c1c1c;
  --green: #0f7a4a;
  --red: #c24141;
  --amber: #c4922a;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  background:
    radial-gradient(720px 280px at 0% 0%, rgba(154, 116, 18, 0.16), transparent 58%),
    linear-gradient(180deg, #e6e9ee, #c8ced6);
  color: var(--text);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, canvas { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, .brand-name, .lobby h1 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; }
h2, h3 { font-family: var(--sans); font-weight: 650; letter-spacing: 0; }
h2 { font-size: 16px; color: var(--gold-2); }
h3 { font-size: 18px; color: var(--text); }
a { color: var(--gold-2); }

.boot, .auth-card, .panel, .card, .item, .stat, .booking-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(44, 48, 56, 0.05);
}
.boot { max-width: 520px; margin: 12vh auto; padding: 36px; }

.auth-layout { min-height: 100vh; display: grid; grid-template-columns: 1fr; align-content: start; }
.auth-brand, .auth-card { padding: 28px 20px; }
.auth-card { margin: 8px 14px 18px; padding: 16px; align-self: start; }
.auth-brand {
  display: flex; flex-direction: column; gap: 4px; justify-content: flex-start;
  padding: 20px 16px 12px; border-bottom: 1px solid var(--line);
}
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.logo { display: block; object-fit: contain; background: transparent; }
.logo-mark { width: 36px; height: 36px; flex: none; }
.logo-nav { width: 26px; height: 26px; flex: none; }
.welcome {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: safe center;
  text-align: center; gap: 8px; padding: 28px 22px 36px;
}
.welcome-kicker {
  color: var(--gold); text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 13px; font-weight: 700;
}
.welcome .brand-name { font-size: 36px; }
.logo-welcome { width: min(148px, 42vw); height: auto; margin: 4px 0; }
.welcome .lede { max-width: 260px; }
.welcome .qr-box { width: min(168px, 48vw); min-height: 0; padding: 8px; border: 1px solid var(--line); }
.welcome .qr-box img, .welcome .qr-box canvas, .welcome .qr-box svg { width: 100% !important; height: auto !important; }
.welcome-scan { margin: 0; max-width: 240px; font-size: 12px; }
.welcome .btn { min-width: 168px; margin-top: 8px; }
.brand-name {
  font-size: 32px; line-height: 0.95;
  background: linear-gradient(180deg, #c9a44a, #9a7410 58%, #6b4e08);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: 13px; line-height: 1.4; max-width: 460px; color: var(--gold-2); }
.auth-stage { display: none; }
.auth-stage .lamp:not(.is-on) { opacity: 0.4; }
.auth-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; }
.text-link {
  border: 0; background: none; padding: 0; min-height: 0;
  color: var(--gold-2); font-size: 14px; font-weight: 650;
  text-decoration: underline; text-underline-offset: 3px;
}
.eyebrow {
  color: var(--gold); text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 12px; font-weight: 700;
}
.eq { display: flex; align-items: flex-end; gap: 6px; height: 46px; }
.eq span {
  width: 7px; height: 100%; border-radius: 99px;
  background: linear-gradient(#fff4dc, var(--gold));
  transform-origin: bottom; animation: bounce 1.05s ease-in-out infinite;
}
.eq span:nth-child(2) { height: 62%; animation-delay: .12s; }
.eq span:nth-child(3) { height: 86%; animation-delay: .24s; }
.eq span:nth-child(4) { height: 40%; animation-delay: .05s; }
.eq span:nth-child(5) { height: 74%; animation-delay: .3s; }
.eq span:nth-child(6) { height: 55%; animation-delay: .18s; }
.eq span:nth-child(7) { height: 90%; animation-delay: .4s; }
@keyframes bounce { 50% { transform: scaleY(.4); } }

.shell { min-height: 100vh; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 60px; padding: 8px 16px; position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; text-align: left; }
.brand b { font-family: var(--serif); font-size: 22px; color: var(--gold-2); display: block; line-height: 1; }
.brand small, .who span, .muted, .field span, .stat span, .item span, .file-row span, .booking-main span { color: var(--muted); }
.who { display: flex; align-items: center; gap: 10px; }
.who strong { display: block; font-size: 14px; }
.role-tag {
  display: inline-flex; margin-top: 2px; border-radius: 999px; padding: 2px 8px;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--line-strong); color: var(--gold-2);
}
.role-banner { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.header-lamp { width: 12px; height: 12px; border-radius: 50%; background: #444; display: inline-block; flex: 0 0 auto; }
.header-lamp[data-header-state="available"] { background: var(--green); box-shadow: 0 0 10px var(--green); }
.header-lamp[data-header-state="recording"] { background: var(--red); box-shadow: 0 0 10px var(--red); }
.header-lamp[data-header-state="maintenance"] { background: var(--amber); box-shadow: 0 0 10px var(--amber); }

.layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); align-items: start; min-height: calc(100vh - 60px); }
.side {
  position: sticky; top: 60px; height: calc(100vh - 60px); overflow: auto;
  padding: 18px 12px 24px; border-right: 1px solid var(--line); background: #dde1e8;
}
.nav-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }
.nav-group nav { display: flex; flex-direction: column; gap: 4px; }
.nav-board {
  border: 1px solid #9a7412;
  border-radius: 14px;
  padding: 8px;
  background: #ffffff;
}
.side .nav-board { margin-bottom: 10px; }
.nav-board .side-kicker {
  margin: 2px 8px 8px; padding-bottom: 6px;
  border-bottom: 1px solid rgba(154, 116, 18, 0.35);
  font-size: 15px; letter-spacing: 0; text-transform: none; font-weight: 750; color: #1c1404;
}
.nav-board .nav-link { color: var(--text); font-weight: 650; }
.side-kicker {
  margin: 0 10px 6px; font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold);
}
.nav-link, .chip-btn, .btn, .tab, .sheet-link {
  border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--text);
}
.nav-link {
  display: flex; align-items: center; text-align: left; padding: 0 12px;
  width: 100%; min-height: 42px; color: var(--muted); font-size: 15px;
}
.nav-link:hover { color: var(--gold-2); }
.nav-link.is-active { background: linear-gradient(180deg, #c4a04a, #9a7412); color: #1c1404; font-weight: 700; }
.main {
  width: min(1040px, 100%); margin: 0 auto;
  padding: 24px 22px 64px; display: flex; flex-direction: column; gap: 16px;
}
.greet { display: flex; flex-direction: column; gap: 2px; padding: 6px 0 2px; }
.greet p { color: var(--gold); font-size: 16px; letter-spacing: 0.02em; }
.greet h1 {
  font-size: clamp(36px, 8vw, 56px); line-height: 1.02;
  background: linear-gradient(180deg, #c9a44a, #9a7410 58%, #6b4e08);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.catalog-head { display: flex; flex-direction: column; gap: 2px; }
.catalog-head p { margin: 0; }
.catalog-list { display: flex; flex-direction: column; gap: 8px; }
.catalog-item, .catalog-toggle {
  display: grid; align-items: center; gap: 12px;
  width: 100%; text-align: left; padding: 14px 14px 14px 16px; min-height: 64px;
  border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #eef0f3);
}
.catalog-item { grid-template-columns: minmax(0, 1fr) auto auto; }
.catalog-toggle { grid-template-columns: minmax(0, 1fr) auto; }
.catalog-item:hover, .catalog-item:focus-visible,
.catalog-toggle:hover, .catalog-toggle:focus-visible,
.catalog-toggle[aria-expanded="true"] { border-color: var(--gold); }
.catalog-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.catalog-kicker { color: var(--gold); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700; }
.catalog-copy strong { font-size: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catalog-price { color: var(--gold-2); font-family: var(--serif); font-size: 20px; line-height: 1; text-align: right; }
.catalog-price small { display: block; margin-top: 4px; font-family: var(--sans); font-size: 11px; color: var(--muted); font-weight: 550; }
.catalog-go { color: var(--gold); font-size: 22px; line-height: 1; }
.catalog-expand { color: var(--gold); font-size: 18px; line-height: 1; }
.catalog-toggle[aria-expanded="true"] .catalog-expand { display: inline-block; transform: rotate(180deg); }
.page-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.page-head:has(.back-btn) { flex-direction: column; align-items: flex-start; gap: 2px; }
.page-head:has(.back-btn) .back-btn { order: -1; }
.page-head > div { min-width: 0; }
.back-btn { margin: 0; padding: 6px 0; border: 0; background: none; color: var(--gold); font-size: 15px; font-weight: 650; }
.page-head h1, .panel h1, .auth-card h1 { font-size: 32px; line-height: 1.1; color: var(--text); }
.page-head p, .panel > p, .lede, .auth-card p { line-height: 1.5; }

.panel, .card, .item, .stat, .booking-card { padding: 16px; }
.cards, .stats, .grid-2 { display: grid; gap: 12px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.best-seller h2 { font-size: 32px; line-height: 1.1; }
.sale-list { display: flex; flex-direction: column; gap: 12px; }
.sale-row { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sale-top { display: flex; justify-content: space-between; gap: 8px 12px; align-items: baseline; flex-wrap: wrap; }
.sale-top span { color: var(--muted); font-size: 13px; }
.sale-track { height: 8px; border-radius: 999px; background: #e8ebf0; overflow: hidden; }
.sale-track span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #c4a04a, #9a7412); }
.sales-graph, .sales-note, .stat, .stats, .stats-3 { min-width: 0; max-width: 100%; }
.sales-note { overflow-wrap: anywhere; }
.stat span { overflow-wrap: anywhere; }
.bar-chart { display: grid; gap: 6px; min-width: 0; width: 100%; }
.bar-col { display: grid; grid-template-rows: 16px 112px auto; gap: 4px; min-width: 0; justify-items: stretch; }
.bar-money { height: 16px; font-size: 10px; font-weight: 700; color: #6b4e08; line-height: 16px; text-align: center; overflow: hidden; }
.bar-track { height: 112px; display: flex; align-items: flex-end; min-width: 0; }
.bar-track span { display: block; width: 100%; height: 4px; border-radius: 7px 7px 3px 3px; background: #e8ebf0; }
.bar-track span.is-on { background: linear-gradient(180deg, #c4a04a, #9a7412); min-height: 8px; }
.bar-name { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.15; overflow-wrap: anywhere; }
.service-popup:has(.editor-sheet) { align-items: flex-start; padding-top: 18px; }
.service-sheet.editor-sheet { width: min(420px, 100%); max-height: min(86vh, 720px); }
.editor-sheet .form-grid { grid-template-columns: 1fr; }
.page-head > .btn { align-self: flex-start; }
.cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: 1.15fr .85fr; }
.stat strong { display: block; font-size: 28px; color: var(--gold-2); line-height: 1.1; }
button.stat { width: 100%; text-align: left; cursor: pointer; }
button.stat:hover, button.stat:focus-visible { border-color: var(--gold); }
.card h3 { font-size: 22px; margin: 8px 0; color: var(--gold-2); }
.card p { color: var(--muted); line-height: 1.45; }
.price { color: var(--text) !important; font-size: 28px; font-family: var(--serif); margin: 12px 0 !important; }
.price small { font-family: var(--sans); font-size: 13px; color: var(--muted); }
.chip, .badge, .chip-btn {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 4px 10px; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
}
.chip { border: 1px solid var(--line); color: var(--gold-2); }
.row, .filters, .choices { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.span-2 { grid-column: 1 / -1; }
.panel h3, .stack > h3 {
  font-size: 12px; color: var(--gold); text-transform: uppercase; letter-spacing: 0.08em;
}

.btn { padding: 11px 16px; border-color: var(--line); min-height: 46px; font-weight: 650; }
.btn-block { width: 100%; }
.action-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.action-row .btn { flex: 0 0 auto; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.item-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.btn-primary {
  background: linear-gradient(180deg, #c4a04a, #9a7412 60%, #7a5c0c);
  color: #1c1404; border-color: transparent;
}
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--gold-2); }
.btn-danger { background: transparent; border-color: rgba(194, 65, 65, 0.45); color: #a33b3b; }
.btn-small { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.chip-btn { border-color: var(--line); padding: 8px 12px; min-height: 36px; color: var(--muted); background: transparent; }
.chip-btn.is-active { background: linear-gradient(180deg, #c4a04a, #9a7412); color: #1c1404; border-color: transparent; font-weight: 700; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.form-grid { display: grid; gap: 12px; }
input, select, textarea {
  width: 100%; background: #ffffff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 13px; font-size: 16px; outline: none;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}
.check { display: flex; gap: 8px; align-items: center; }
.check input, .choices input, .slot input { width: auto; }
.choices label {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  display: flex; gap: 8px; align-items: center; min-height: 46px;
}

.badge-pending, .badge-unpaid { background: rgba(196, 163, 90, 0.2); color: #8a6412; }
.badge-accepted { background: rgba(47, 111, 196, 0.14); color: #1d4f91; }
.badge-progress { background: rgba(196, 106, 32, 0.14); color: #b45309; }
.badge-approved, .badge-verified { background: rgba(15, 122, 74, 0.12); color: var(--green); }
.badge-completed { background: rgba(15, 122, 74, 0.14); color: #0f7a4a; }
.badge-delivered { background: rgba(109, 40, 217, 0.12); color: #6d28d9; }
.badge-rejected, .badge-cancelled { background: rgba(194, 65, 65, 0.12); color: #a33b3b; }

.item, .file-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.item > div:first-child, .file-row > div:first-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.booking-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; }
.card-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.lamp-short { display: none; }
.session-list { gap: 10px; }
.session-panel { display: flex; flex-direction: column; gap: 10px; }
.session-card { align-items: start; }
.receipt-live { width: 100%; min-width: 0; }
.receipt-live[hidden] { display: none; }
.receipt-live img {
  width: 100%; max-height: 220px; object-fit: contain; border-radius: 12px;
  background: #fff; border: 1px solid var(--line);
}
.session-proof { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; min-width: 0; }
.session-proof .media-preview, .session-proof img { max-width: 100%; }
.session-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-self: start; }
.booking-card > .badge { width: max-content; justify-self: start; }
.booking-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.booking-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.booking-actions > input { flex: 1 1 180px; width: auto; min-height: 46px; }
.booking-card .pair { grid-template-columns: 120px 120px; width: max-content; }
.booking-card .pair .btn { width: 120px; min-width: 0; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.order-actions .btn { width: auto; flex: 0 0 auto; min-width: 88px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.facts div { background: #f6f7f9; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.facts dt { color: var(--gold); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.facts dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.prose { white-space: pre-wrap; line-height: 1.55; }
.due { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.due strong { font-family: var(--serif); font-size: 32px; color: var(--gold-2); }
.gcash-payment {
  display: flex; flex-direction: column; gap: 12px;
  padding: 14px; border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, #f8f9fb, #eef1f5);
}
.gcash-payment-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.gcash-label { color: #1675d1; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.gcash-payment-head strong { font-size: 16px; }
.gcash-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gcash-option {
  min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 7px;
  text-align: center; padding: 12px; border: 1px solid var(--line);
  border-radius: 14px; background: #fff;
}
.gcash-option > strong { color: var(--text); font-size: 15px; }
.gcash-option > span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.gcash-option .btn { width: 100%; text-align: center; margin-top: 2px; }
.gcash-qr { display: block; width: 156px; height: 156px; object-fit: contain; }
.gcash-number-icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 50%; background: #e8f2ff; color: #1675d1;
  font-size: 28px; font-weight: 800;
}
.gcash-option .gcash-number { color: #1675d1; font-size: 18px; font-weight: 800; overflow-wrap: anywhere; }
.gcash-admin-qr { display: block; width: 220px; max-width: 100%; height: auto; margin: 8px auto 0; }
.ok-note { color: var(--green); }
.warn { color: #9b2c2c; }

.status-pick { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.status-now, .status-option {
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 999px; border: 1px solid transparent; font-weight: 700;
}
.status-now { min-height: 46px; padding: 0 16px; }
.status-caret { font-size: 12px; line-height: 1; }
.status-now[aria-expanded="true"] .status-caret { display: inline-block; transform: rotate(180deg); }
.status-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 28%, transparent);
}
.status-read { margin: 0; }
.status-menu {
  position: absolute; z-index: 6; top: 52px; left: 0; min-width: 240px;
  display: flex; flex-direction: column; gap: 4px; padding: 8px;
  background: #ffffff; border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 12px 28px rgba(44, 48, 56, 0.12);
}
.status-menu-label {
  margin: 4px 8px 2px; font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.status-option {
  width: 100%; min-height: 44px; text-align: left; padding: 8px 12px;
  border-radius: 10px; background: transparent; font-weight: 650;
}
.status-check { margin-left: auto; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.status-now[data-status="pending"] { background: #f0ddb0; color: #6b4e08; border-color: #9a7412; }
.status-option[data-status="pending"] { color: #6b4e08; }
.status-option[data-status="pending"]:hover,
.status-option[data-status="pending"][aria-current="true"] { background: #f0ddb0; border-color: #9a7412; }
.status-now[data-status="accepted"] { background: #e7f0ff; color: #1d4f91; border-color: #5b8def; }
.status-option[data-status="accepted"] { color: #1d4f91; }
.status-option[data-status="accepted"]:hover,
.status-option[data-status="accepted"][aria-current="true"] { background: #e7f0ff; border-color: #5b8def; }
.status-now[data-status="in_progress"] { background: #fff1e4; color: #b45309; border-color: #e08a3c; }
.status-option[data-status="in_progress"] { color: #b45309; }
.status-option[data-status="in_progress"]:hover,
.status-option[data-status="in_progress"][aria-current="true"] { background: #fff1e4; border-color: #e08a3c; }
.status-now[data-status="completed"] { background: #e7f8f0; color: #0f7a4a; border-color: #3cbf86; }
.status-option[data-status="completed"] { color: #0f7a4a; }
.status-option[data-status="completed"]:hover,
.status-option[data-status="completed"][aria-current="true"] { background: #e7f8f0; border-color: #3cbf86; }
.status-now[data-status="delivered"] { background: #f3eaff; color: #6d28d9; border-color: #b794f4; }
.status-option[data-status="delivered"] { color: #6d28d9; }
.status-option[data-status="delivered"]:hover,
.status-option[data-status="delivered"][aria-current="true"] { background: #f3eaff; border-color: #b794f4; }
.hold-note { color: var(--gold); font-size: 13px; font-weight: 650; }
.tracker { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 0; margin: 0; }
.step { min-width: 0; }
.step span, .step button {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px;
  text-align: center; background: #f6f7f9; color: var(--muted); font-size: 13px; font-weight: 650;
  border-radius: 12px; padding: 8px 4px; border: 1px solid var(--line);
}
.step.is-done span, .step.is-done button { color: var(--gold-2); border-color: var(--line-strong); }
.step.is-current span, .step.is-current button { color: var(--ink); background: var(--gold); border-color: transparent; }
.progress-log { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.progress-log li {
  display: grid; grid-template-columns: 12px 108px minmax(0, 1fr);
  gap: 8px; align-items: center; min-height: 28px; font-size: 13px;
}
.progress-log .status-dot { width: 8px; height: 8px; box-shadow: none; }
.progress-log .progress-name { font-weight: 700; }
.progress-log .progress-meta { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-log li[data-status="pending"] { color: #8a6412; }
.progress-log li[data-status="accepted"] { color: #1d4f91; }
.progress-log li[data-status="in_progress"] { color: #b45309; }
.progress-log li[data-status="completed"] { color: #0f7a4a; }
.progress-log li[data-status="delivered"] { color: #6d28d9; }
.progress-log li[data-status="cancelled"] { color: #a33b3b; }
.history { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.history li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }

.rack {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 28px 16px 16px; border-radius: 22px; border: 1px solid var(--line);
  background:
    radial-gradient(circle at 16px 16px, var(--gold) 0 3px, transparent 4px),
    radial-gradient(circle at calc(100% - 16px) 16px, var(--gold) 0 3px, transparent 4px),
    linear-gradient(180deg, #ffffff, #e4e7ed);
}
.lamp {
  background: #ffffff; border-radius: 16px; padding: 14px 8px 12px; text-align: center;
  border: 1px solid var(--line); color: var(--text);
}
.lamp-kicker { display: block; color: var(--gold); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 4px; }
.lens {
  width: 58px; height: 58px; border-radius: 50%; display: block; margin: 0 auto 8px;
  background: radial-gradient(circle at 35% 30%, #f4f5f7, #b7bdc8 62%);
}
.lamp.is-on[data-lamp="available"] .lens, .lamp.show-available .lens {
  background: radial-gradient(circle at 35% 30%, #e9fff4, #3ee0a0 42%, #0e7a45);
  box-shadow: 0 0 18px rgba(62, 224, 160, .8);
}
.lamp.is-on[data-lamp="recording"] .lens, .lamp.show-recording .lens {
  background: radial-gradient(circle at 35% 30%, #ffe0e0, #ff5d5d 42%, #9d1d1d);
  box-shadow: 0 0 18px rgba(255, 93, 93, .8);
  animation: pulse 1.3s ease-in-out infinite;
}
.lamp.is-on[data-lamp="maintenance"] .lens, .lamp.show-maintenance .lens {
  background: radial-gradient(circle at 35% 30%, #fff4cc, #f5c451 45%, #a07812);
  box-shadow: 0 0 18px rgba(245, 196, 81, .8);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { filter: brightness(.72); } }

.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; width: 100%; }
.week-name { text-align: center; color: var(--gold-2); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 0 4px; }
.day {
  min-width: 0; min-height: 64px; border-radius: 12px; border: 1px solid var(--line); background: #f6f7f9;
  color: var(--text); padding: 8px; text-align: left; display: flex; flex-direction: column; gap: 6px;
}
.day.is-selected { border-color: var(--gold); background: rgba(154, 116, 18, 0.28); }
.day.is-unavailable { background: #f8e8e8; border-color: #c24141; }
.day.is-unavailable strong { color: #7a3030; text-decoration: line-through; }
.day-off { color: #a33b3b; font-size: 10px; font-style: normal; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.day:disabled { opacity: 0.35; }
.dots { display: flex; gap: 4px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.dot.pending { background: var(--gold); }
.slots { display: grid; grid-template-columns: 1fr; gap: 8px; }
.slot { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 52px; display: flex; flex-direction: row; align-items: center; gap: 10px; background: #f6f7f9; }
.slot input { margin: 0; flex: none; }
.slot-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.slot-copy strong { font-size: 15px; line-height: 1.25; }
.slot:has(input:checked) { border-color: var(--gold); background: rgba(154, 116, 18, 0.28); }
.slot.is-closed { opacity: 0.45; }

.pipeline { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0; margin: 0; }
.pipeline li { background: #f6f7f9; border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.pipeline span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.poster { display: grid; grid-template-columns: 280px 1fr; gap: 22px; align-items: center; }
.qr-box {
  width: 280px; min-height: 280px; background: #fff; border-radius: 16px; padding: 12px;
  display: grid; place-items: center;
}
.qr-box img, .qr-box canvas, .qr-box svg { width: 250px !important; height: 250px !important; }
pre.rules, #hardware-payload {
  white-space: pre-wrap; background: #f6f7f9; border-radius: 12px; padding: 12px; overflow: auto;
  border: 1px solid var(--line); font-size: 12px; line-height: 1.45; color: var(--text);
}
.file-row { flex-direction: column; align-items: flex-start; }
.file-list { display: flex; flex-direction: column; gap: 10px; }
.file-card {
  width: 100%; display: flex; flex-direction: column; gap: 10px;
  padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #f6f7f9;
}
.file-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.file-card-top span { color: var(--muted); font-size: 13px; }
.file-card-top > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.file-card-top strong { overflow-wrap: anywhere; }
.file-card-top .btn { flex: 0 0 auto; }
.file-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.zoom-hit {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left;
}
.zoom-hit span { color: var(--gold); font-size: 13px; font-weight: 650; }
.service-popup {
  position: fixed; inset: 0; z-index: 80; display: flex;
  align-items: center; justify-content: center; padding: 16px;
}
.service-sheet {
  position: relative; z-index: 1; width: min(380px, 100%);
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px; border-radius: 16px; border: 1px solid var(--line-strong);
  background: #ffffff; max-height: min(70vh, 480px); overflow: auto;
  box-shadow: 0 16px 40px rgba(44, 48, 56, 0.16);
}
.service-sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.service-sheet h2 { font-size: 18px; color: var(--gold-2); }
.service-sheet p { font-size: 14px; line-height: 1.4; }
.service-sheet .price { font-size: 22px; margin: 2px 0 4px !important; }
.service-x {
  width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--gold-2); font-size: 14px;
}
.lightbox {
  position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; padding: 20px;
}
.lightbox-back { position: absolute; inset: 0; border: 0; background: rgba(0, 0, 0, 0.86); }
.lightbox figure, .lightbox-x { position: relative; z-index: 1; }
.lightbox img {
  max-width: min(960px, 100%); max-height: calc(100vh - 120px);
  object-fit: contain; border-radius: 12px; border: 1px solid var(--line-strong); background: #000;
}
.media-preview { width: 100%; }
.file-card img, .media-preview img {
  width: 100%; max-height: 240px; object-fit: contain; border-radius: 12px; background: #000;
  border: 1px solid var(--line);
}
.file-card audio, .media-preview audio, .audio-live audio {
  width: 100%; height: 48px; min-height: 48px; display: block;
  border-radius: 12px; background: #fff; border: 1px solid var(--line);
}
.audio-live { width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.audio-live[hidden] { display: none; }
.audio-pick { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.audio-pick p { margin: 0; overflow-wrap: anywhere; }
label.btn { display: inline-flex; align-items: center; justify-content: center; position: relative; cursor: pointer; }
.upload-btn input[type="file"] {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important;
  margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; opacity: 0 !important;
}
.empty { padding: 20px; border: 1px dashed var(--line-strong); border-radius: 16px; }
.empty p { color: var(--muted); margin-top: 6px; }
.demo-card { display: flex; flex-direction: column; gap: 8px; }
.lobby {
  min-height: 100vh; padding: 28px 18px 40px; display: flex; flex-direction: column;
  align-items: center; text-align: center; gap: 16px; background: var(--bg);
}
.lobby h1 { font-size: clamp(42px, 8vw, 80px); color: var(--gold-2); }
.lobby .rack { width: min(760px, 100%); }
.lobby .lens { width: 84px; height: 84px; }
.nav-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; margin-left: 8px; padding: 0 5px;
  border-radius: 999px; background: #c24141; color: #fff; font-size: 11px; font-weight: 700;
}
.nav-link .nav-count, .sheet-link .nav-count { margin-left: auto; }
.tab-dot {
  width: 8px; height: 8px; margin-left: 4px; border-radius: 50%;
  background: #c24141; display: inline-block;
}
.chat-log {
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  min-height: 220px; max-height: min(52vh, 520px); overflow: auto;
  padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px;
}
.chat-empty { margin: auto; text-align: center; }
.bubble {
  align-self: flex-start; max-width: min(100%, 420px);
  padding: 10px 12px; border-radius: 14px 14px 14px 4px;
  background: #eef0f3; border: 1px solid var(--line);
}
.bubble p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.bubble span { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.bubble.mine {
  align-self: flex-end; border-radius: 14px 14px 4px 14px;
  background: linear-gradient(180deg, #c4a04a, #9a7412); border-color: transparent; color: #1c1404;
}
.bubble.mine span { color: #4a3708; }
.chat-compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.chat-compose textarea { min-height: 52px; }
.chat-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center;
  width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: #fff;
}
.chat-row .catalog-copy span {
  color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chat-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chat-meta small { color: var(--muted); font-size: 11px; }
.toast {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%);
  background: var(--gold); color: var(--ink); padding: 12px 16px; border-radius: 999px;
  z-index: 90; max-width: min(92vw, 520px); font-weight: 650;
}
.toast.error { background: #ffd7d7; color: #5c1a1a; }

.tabbar, .sheet, .sheet-back { display: none; }

@media (min-width: 960px) {
  .auth-layout { grid-template-columns: 1.05fr .95fr; align-items: stretch; }
  .auth-brand { padding: 64px; justify-content: center; gap: 14px; border-bottom: 0; border-right: 1px solid var(--line); }
  .brand-name { font-size: 76px; }
  .logo-mark { width: 78px; height: 78px; }
  .welcome .brand-name { font-size: 64px; }
  .logo-welcome { width: 210px; }
  .welcome .qr-box { width: 200px; }
  .lede { font-size: 18px; }
  .auth-stage { display: flex; flex-direction: column; gap: 16px; }
  .auth-card { margin: 48px; padding: 28px; align-self: center; }
  .auth-card h1 { font-size: 32px; }
  .form-grid.two { grid-template-columns: 1fr 1fr; }
  .slots { grid-template-columns: 1fr 1fr; }
  .toast { bottom: 24px; }
}

@media (max-width: 959px) {
  .login { display: flex; flex-direction: column; }
  .login .auth-brand { display: contents; }
  .login .brand-lockup { order: 1; padding: 16px 16px 0; }
  .login .lede { order: 2; padding: 2px 16px 12px; border-bottom: 1px solid var(--line); }
  .login .auth-card { order: 3; }
  .login .auth-stage {
    order: 4; display: flex; flex-direction: column; align-items: stretch; gap: 6px;
    width: 100%; padding: 0 14px 20px;
  }
  .login .auth-stage .eq { display: none; }
  .login .auth-stage .muted { text-align: center; font-size: 11px; }
  .login .auth-stage .rack { padding: 8px 6px 6px; gap: 6px; border-radius: 14px; }
  .login .auth-stage .lamp { padding: 6px 4px 6px; border-radius: 10px; }
  .login .auth-stage .lamp-kicker { font-size: 8px; letter-spacing: 0.08em; margin-bottom: 1px; }
  .login .auth-stage .lamp strong { font-size: 10px; line-height: 1.15; }
  .login .auth-stage .lens { width: 22px; height: 22px; margin-bottom: 3px; }
  .auth-card.stack { gap: 8px; }
  .auth-card h1 { font-size: 18px; }
  .auth-card input { padding: 9px 12px; font-size: 15px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .main, .page-head, .filters, .booking-card, .panel, .file-card { min-width: 0; max-width: 100%; }
  .page-head { align-items: stretch; }
  .page-head > .btn { width: auto; }
  .page-head p, .booking-main strong, .booking-main span { overflow-wrap: anywhere; }
  .is-admin .dash-queue { order: 3; }
  .is-admin .dash-lamps { order: 4; }
  .is-admin .dash-sales { order: 5; }
  .is-admin .pipeline { display: none; }
  .dash-sales .stats-3 {
    grid-template-columns: 1fr; gap: 0; overflow: hidden;
    border: 1px solid var(--line); border-radius: 14px; background: #fff;
  }
  .dash-sales .stat {
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center;
    border: 0; border-radius: 0; box-shadow: none; padding: 10px 12px;
    border-bottom: 1px solid var(--line);
  }
  .dash-sales .stat:last-child { border-bottom: 0; }
  .dash-sales .stat strong { font-size: 16px; }
  .dash-sales .stat span { font-size: 13px; }
  .main .lamp-long { display: none; }
  .main .lamp-short { display: inline; }
  .main .rack { padding: 14px 8px 8px; gap: 6px; }
  .main .lamp { padding: 8px 4px; }
  .main .lamp strong { font-size: 13px; line-height: 1.2; }
  .card-tools { justify-content: flex-start; }
  .card-tools .btn { min-height: 36px; }
  .side { display: none; }
  .main { padding: 16px 14px calc(96px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: #ffffff; border-top: 1px solid var(--line);
  }
  .tab {
    min-height: 52px; padding: 6px 2px; color: var(--muted); font-size: 12px; font-weight: 650;
  }
  .tab.is-active { background: linear-gradient(180deg, #c4a04a, #9a7412); color: #1c1404; }
  .sheet-back { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.55); border: 0; }
  .sheet {
    display: flex; flex-direction: column; gap: 8px;
    position: fixed; left: 12px; right: 12px; z-index: 32;
    bottom: calc(70px + env(safe-area-inset-bottom));
    max-height: min(72vh, 560px); overflow: auto;
    background: #ffffff; border: 1px solid var(--line-strong); border-radius: 18px; padding: 14px;
  }
  .sheet .nav-board { display: flex; flex-direction: column; gap: 6px; margin: 0; }
  .sheet-link {
    display: flex; align-items: center;
    min-height: 48px; text-align: left; padding: 0 14px; border: 1px solid var(--line); color: var(--gold-2);
  }
  .sheet-link.is-active { background: var(--gold); color: var(--ink); border-color: transparent; }
  .stats, .grid-2, .pipeline, .poster { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats-3 { grid-template-columns: 1fr; }
  .tracker { display: flex; overflow-x: auto; padding-bottom: 2px; }
  .step { flex: 0 0 auto; min-width: 108px; }
  .panel.stack > .btn, .action-row .btn, .panel.stack > .upload-btn, .stack > .upload-btn, .form-grid > .upload-btn { width: 100%; }
  .row { width: 100%; }
  .row .btn { flex: 1 1 140px; }
  .action-row { flex-direction: column; align-items: stretch; }
  .booking-card { grid-template-columns: 1fr; }
  .session-badges { justify-content: flex-start; }
  .booking-actions > input { flex-basis: 100%; width: 100%; }
  .booking-card .pair { width: 100%; grid-template-columns: 1fr 1fr; }
  .booking-card .pair .btn { width: 100%; }
  .order-actions { justify-content: flex-start; }
  .page-head h1, .panel h1 { font-size: 22px; }
  .greet { padding: 0; }
  .greet p { font-size: 13px; }
  .greet h1 { font-size: 26px; }
  .main { gap: 10px; }
  .panel, .card, .item, .stat, .booking-card { padding: 12px; border-radius: 14px; }
  .card h3 { font-size: 17px; margin: 4px 0; }
  .price { font-size: 22px; margin: 6px 0 !important; }
  .due strong { font-size: 24px; }
  .gcash-options { grid-template-columns: 1fr; }
  .gcash-qr { width: 180px; height: 180px; }
  .stat strong { font-size: 22px; }
  .btn { min-height: 40px; padding: 8px 12px; font-size: 14px; }
  .catalog-item, .catalog-toggle { min-height: 48px; padding: 8px 12px; border-radius: 12px; gap: 8px; }
  .catalog-copy strong { font-size: 14px; }
  .catalog-kicker { font-size: 10px; }
  .catalog-price { font-size: 15px; }
  .catalog-price small { font-size: 10px; margin-top: 2px; }
  .status-now { min-height: 40px; }
  .rack { padding: 18px 10px 10px; }
  .lens { width: 40px; height: 40px; }
  .service-popup { align-items: flex-end; padding: 12px 12px calc(76px + env(safe-area-inset-bottom)); }
  .tab { min-height: 46px; font-size: 11px; }
  .brand-name { font-size: 30px; }
  .qr-box { width: min(260px, 100%); }
  .filters {
    min-width: 0; max-width: 100%; flex-wrap: nowrap; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .filters .chip-btn { flex: none; }
  .order-actions { max-width: 100%; }
  .progress-log li { grid-template-columns: 12px minmax(0, 1fr); }
  .progress-log .progress-name { overflow-wrap: anywhere; }
  .progress-log .progress-meta { grid-column: 2; white-space: normal; }
}

@media (max-width: 640px) {
  .day { min-height: 48px; padding: 4px; }
  .days { gap: 4px; }
  .week-name { font-size: 10px; letter-spacing: 0; }
  .day-off { font-size: 8px; }
  .topbar { padding: max(8px, env(safe-area-inset-top)) 12px 8px; gap: 8px; }
  .brand { gap: 6px; min-width: 0; }
  .brand b { font-size: 18px; }
  .brand small { display: none; }
  .who { gap: 6px; }
  .who strong { display: none; }
  .role-tag { margin-top: 0; }
  .who .btn { min-height: 34px; padding: 4px 10px; font-size: 13px; }
  .is-admin .tab { font-size: 10px; letter-spacing: 0; padding-left: 1px; padding-right: 1px; }
  .chat-log { max-height: min(46vh, 420px); }
  .chat-compose .btn { width: auto; min-height: 48px; }
  .facts { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
@media print {
  .topbar, .side, .tabbar, .sheet, .sheet-back, .no-print { display: none !important; }
  body { background: white; color: black; }
  .poster, .panel { box-shadow: none; }
}
