/* Mass Biriyani Command Center — brand: deep plum + logo gold */
:root {
  color-scheme: dark;
  --bg: #1a0220;
  --surface-1: #24052b;
  --surface-2: #2f0a37;
  --surface-3: #3b1145;
  --line: rgba(232, 200, 108, .16);
  --line-strong: rgba(232, 200, 108, .38);
  --text: #fbf1dc;
  --text-2: #d9c6dd;
  --muted: #a88fae;
  --gold: #e8c86c;
  --gold-2: #f1d27e;
  --gold-deep: #e8941a;
  --orange: #f89048;
  --gold-grad: linear-gradient(180deg, #fff3c4 0%, #f1d27e 35%, #e8a93a 70%, #c97c12 100%);
  /* status (reserved) */
  --good: #3fbf7f;
  --warn: #f2b33d;
  --bad: #ff6b6b;
  --info: #79a9ff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Cinzel', Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
a { color: var(--gold); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: .5px; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 14px; letter-spacing: 1px; }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------------------------------------------------------------- layout */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: linear-gradient(180deg, #2a0330, #1d0223); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand img { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 2px var(--gold); }
.brand b { font-family: var(--display); font-size: 16px; display: block; line-height: 1.1; }
.brand span { font-size: 10px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 13px; position: relative; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: linear-gradient(90deg, rgba(232, 200, 108, .18), rgba(232, 200, 108, .04)); color: var(--gold-2); }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--gold); }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.side-foot b { color: var(--text); }
.main { min-width: 0; padding: 22px 26px 60px; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.topbar h1 { margin-right: auto; }
.mob-head { display: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; left: 0; top: 0; width: 260px; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--shadow); }
  .side.open { transform: none; }
  .mob-head { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40; background: rgba(26, 2, 32, .94); backdrop-filter: blur(8px); padding: 10px 16px; border-bottom: 1px solid var(--line); }
  .mob-head img { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 0 2px var(--gold); }
  .mob-head b { font-family: var(--display); }
  .main { padding: 16px 16px 80px; }
  .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 45; }
}

/* ---------------------------------------------------------------- cards & grids */
.card { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.card > h2, .card > h3, .card-head { margin-bottom: 12px; }
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; margin-right: auto; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }

.kpi { position: relative; overflow: hidden; }
.kpi .label { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpi .value { font-family: var(--display); font-size: 28px; font-weight: 700; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12px; color: var(--text-2); }
.kpi.hero { background: radial-gradient(ellipse at 80% 0%, rgba(232, 148, 26, .22), transparent 60%), linear-gradient(160deg, #4a0c50, #2a0330); border-color: var(--line-strong); }
.kpi.hero .value { font-size: 34px; }
.delta { font-weight: 700; font-size: 12px; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }

/* ---------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); padding: 9px 14px; border-radius: 10px; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; transition: background .15s, transform .05s; text-decoration: none; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--gold-grad); color: #2a0330; border-color: transparent; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.wa { background: #1f9d55; border-color: transparent; color: #fff; }
.btn.wa:hover { background: #22b05f; }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(255, 107, 107, .5); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn.lg { padding: 14px 20px; font-size: 15px; border-radius: 12px; }
.btn svg { width: 16px; height: 16px; }
.icon-btn { background: none; border: 0; cursor: pointer; color: var(--text); padding: 6px; border-radius: 8px; display: inline-flex; }
.icon-btn svg { width: 22px; height: 22px; }
input, select, textarea { background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 12px; width: 100%; outline: none; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 200, 108, .15); }
select option { background: var(--surface-2); }
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { background: none; border: 0; padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 12px; color: var(--text-2); }
.seg button.on { background: var(--gold-grad); color: #2a0330; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip { flex: none; border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 30px; padding: 7px 14px; font-weight: 600; font-size: 12px; cursor: pointer; color: var(--text-2); }
.chip.on { background: var(--gold-grad); color: #2a0330; border-color: transparent; }
.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--surface-3); border-radius: 22px; cursor: pointer; transition: .2s; border: 1px solid var(--line-strong); }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: var(--text-2); border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--bad); }
.switch input:checked + span::after { transform: translateX(18px); background: #fff; }

/* ---------------------------------------------------------------- badges / pills */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: .3px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.good { background: rgba(63, 191, 127, .16); color: #7ee2ae; }
.badge.warn { background: rgba(242, 179, 61, .16); color: #ffd27a; }
.badge.bad { background: rgba(255, 107, 107, .16); color: #ff9c9c; }
.badge.info { background: rgba(121, 169, 255, .16); color: #a9c7ff; }
.badge.gold { background: rgba(232, 200, 108, .18); color: var(--gold-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---------------------------------------------------------------- tables & lists */
.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid rgba(232, 200, 108, .08); vertical-align: middle; }
tr.click { cursor: pointer; }
tr.click:hover td { background: rgba(232, 200, 108, .04); }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(232, 200, 108, .08); }
.list-item:last-child { border-bottom: 0; }
.empty { padding: 26px; text-align: center; color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; color: var(--gold); flex: none; font-size: 13px; }

/* ---------------------------------------------------------------- charts */
.chart { width: 100%; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.chart .grid-line { stroke: rgba(232, 200, 108, .1); }
.chart .bar { fill: var(--gold); }
.chart .bar.dim { fill: rgba(232, 200, 108, .35); }
.chart .hit { fill: transparent; }
.chart .hit:hover + .bar, .chart g:hover .bar { fill: var(--gold-2); }
.chart .line { fill: none; stroke: var(--text-2); stroke-width: 2; stroke-dasharray: 4 4; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; }
.tip { position: fixed; z-index: 200; pointer-events: none; background: #0f0113; border: 1px solid var(--line-strong); padding: 7px 10px; border-radius: 8px; font-size: 12px; box-shadow: var(--shadow); max-width: 240px; white-space: pre-line; }
.hbar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; gap: 10px; align-items: center; margin: 8px 0; font-size: 12px; }
.hbar .track { height: 10px; background: var(--surface-3); border-radius: 6px; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--gold); border-radius: 6px; }
.meter { height: 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--gold); border-radius: 6px; }
.meter.warn > i { background: var(--warn); }
.meter.bad > i { background: var(--bad); }

/* ---------------------------------------------------------------- modal / toast */
.modal-back { position: fixed; inset: 0; background: rgba(8, 0, 10, .7); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 20px; box-shadow: var(--shadow); }
.modal.wide { width: min(860px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.modal-head h2 { margin-right: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: #0f0113; border: 1px solid var(--line-strong); padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; animation: fade .2s; }
.toast.good { border-color: var(--good); }
.toast.bad { border-color: var(--bad); }
.loader { padding: 40px; text-align: center; color: var(--muted); }
.loader::before { content: ""; display: block; width: 28px; height: 28px; margin: 0 auto 10px; border: 3px solid var(--surface-3); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.demo-banner { background: repeating-linear-gradient(135deg, rgba(232, 148, 26, .12) 0 12px, rgba(232, 148, 26, .05) 12px 24px); border: 1px dashed rgba(232, 148, 26, .5); color: #ffd7a8; padding: 8px 14px; border-radius: 10px; font-size: 12px; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse 70% 45% at 50% 20%, rgba(232, 148, 26, .16), transparent 70%), radial-gradient(ellipse at 50% 40%, #6a1a6c 0%, #580a5a 35%, #3d0644 70%, #2a0330 100%); }
.login-card { width: min(420px, 100%); text-align: center; }
.login-card .logo { width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 14px; box-shadow: 0 0 0 3px var(--gold), 0 0 0 9px rgba(42, 3, 48, .6), 0 0 0 10px rgba(232, 200, 108, .5), 0 20px 50px rgba(0, 0, 0, .5); }
.login-card h1 { font-size: 26px; }
.login-card .tag { letter-spacing: 4px; font-size: 11px; color: var(--text-2); margin: 6px 0 22px; text-transform: uppercase; }
.who { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.who button { background: rgba(42, 3, 48, .6); border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 6px; cursor: pointer; color: var(--text); }
.who button.on { background: var(--gold-grad); color: #2a0330; }
.who button small { display: block; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; opacity: .75; margin-top: 2px; }
.pin-dots { display: flex; justify-content: center; gap: 12px; margin: 6px 0 16px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--gold); }
.pin-dots i.on { background: var(--gold); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.keypad button { height: 58px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(42, 3, 48, .6); font-size: 22px; font-weight: 600; cursor: pointer; color: var(--text); }
.keypad button:active { background: var(--surface-3); }

/* ---------------------------------------------------------------- POS */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.pos-menu .search { margin: 10px 0; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mi { position: relative; text-align: left; background: var(--surface-1); border: 1px solid var(--line); border-radius: 12px; padding: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 96px; transition: border-color .15s, transform .05s; color: var(--text); }
.mi:hover { border-color: var(--gold); }
.mi:active { transform: scale(.97); }
.mi .n { font-weight: 700; font-size: 13px; line-height: 1.25; }
.mi .v { font-size: 11px; color: var(--orange); font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.mi .p { margin-top: auto; font-family: var(--display); font-weight: 700; color: var(--gold); }
.mi.out { opacity: .4; pointer-events: none; }
.mi.out::after { content: "SOLD OUT"; position: absolute; top: 8px; right: 8px; font-size: 9px; font-weight: 800; color: var(--bad); letter-spacing: 1px; }
.mi .qty { position: absolute; top: -7px; right: -7px; background: var(--gold-grad); color: #2a0330; border-radius: 20px; min-width: 24px; height: 24px; display: grid; place-items: center; font-weight: 800; font-size: 12px; padding: 0 6px; }
.cart { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 32px); overflow-y: auto; }
.cart > * { flex-shrink: 0; }
.cart-lines { overflow-y: auto; max-height: 34vh; }
.cl { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(232, 200, 108, .08); }
.cl .n { font-weight: 600; font-size: 13px; }
.qtyc { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.qtyc button { background: var(--surface-2); border: 0; width: 28px; height: 28px; cursor: pointer; font-size: 16px; color: var(--text); }
.qtyc span { width: 30px; text-align: center; font-weight: 700; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; color: var(--text-2); }
.totals .grand { font-family: var(--display); font-size: 22px; color: var(--text); font-weight: 700; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 6px; }
.cust-hint { background: rgba(232, 200, 108, .08); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 12px; }
.stamps { display: flex; gap: 3px; margin-top: 6px; }
.stamps i { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--gold); }
.stamps i.on { background: var(--gold); }
.mob-cart-btn { display: none; }
@media (max-width: 1000px) {
  .pos { grid-template-columns: minmax(0, 1fr); }
  .cart { position: fixed; inset: auto 0 0 0; z-index: 60; max-height: 88vh; overflow-y: auto; border-radius: 18px 18px 0 0; transform: translateY(105%); transition: transform .2s; }
  .cart.open { transform: none; }
  .mob-cart-btn { display: flex; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 55; }
}

/* ---------------------------------------------------------------- KDS */
.kds-body { background: #120016; }
.kds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; min-height: calc(100vh - 160px); align-items: start; }
.kds-col { background: rgba(255, 255, 255, .02); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kds-col > h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 4px 6px; }
.kds-col > h2 .badge { margin-left: auto; font-size: 13px; }
.kds-col.new > h2 { color: var(--warn); }
.kds-col.cooking > h2 { color: var(--info); }
.kds-col.ready > h2 { color: var(--good); }
.kds-col.out > h2 { color: var(--orange); }
.ticket { background: var(--surface-1); border: 1px solid var(--line-strong); border-left: 5px solid var(--warn); border-radius: 12px; padding: 12px; cursor: pointer; user-select: none; transition: transform .08s; }
.ticket:active { transform: scale(.98); }
.ticket.cooking { border-left-color: var(--info); }
.ticket.ready { border-left-color: var(--good); }
.ticket.out { border-left-color: var(--orange); }
.ticket.late { border-color: var(--bad); border-left-color: var(--bad); box-shadow: 0 0 0 2px rgba(255, 107, 107, .4); animation: pulse 1.6s infinite; }
.ticket.fresh { animation: flash 1s 3; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255, 107, 107, .15); } }
@keyframes flash { 50% { background: #5b3a00; } }
.ticket .t-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ticket .no { font-family: var(--display); font-size: 22px; font-weight: 900; }
.ticket .timer { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 16px; }
.ticket.late .timer { color: var(--bad); }
.ticket ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.ticket li { font-size: 15px; font-weight: 600; display: flex; gap: 8px; }
.ticket li b { color: var(--gold); min-width: 26px; }
.ticket .note { margin-top: 8px; font-size: 12px; color: #ffd27a; background: rgba(242, 179, 61, .1); padding: 6px 8px; border-radius: 8px; }
.ticket .tap { margin-top: 8px; font-size: 11px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
@media (max-width: 900px) { .kds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .kds { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- heatmap & matrix */
.heat { display: grid; grid-template-columns: 44px repeat(18, minmax(0, 1fr)); gap: 3px; font-size: 10px; }
.heat .c { aspect-ratio: 1; border-radius: 4px; background: var(--surface-2); min-width: 0; }
.heat .lab { color: var(--muted); display: flex; align-items: center; font-size: 10px; }
.heat .hl { text-align: center; color: var(--muted); font-size: 9px; }
.quad { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quad .q { border-radius: 12px; padding: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.quad .q h3 { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.quad .q p { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.quad .q li { list-style: none; font-size: 12px; padding: 3px 0; display: flex; justify-content: space-between; gap: 8px; }
@media (max-width: 640px) { .quad { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- mess card & calendar */
.mess-card { width: 340px; max-width: 100%; aspect-ratio: 1.6; border-radius: 16px; padding: 16px; position: relative; overflow: hidden; color: var(--text); background: radial-gradient(ellipse at 20% 0%, rgba(232, 148, 26, .3), transparent 60%), linear-gradient(150deg, #6a1a6c, #2a0330); border: 2px solid var(--gold); display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 0 auto; }
.mess-card .qr { background: #fff; padding: 6px; border-radius: 8px; width: 118px; height: 118px; align-self: center; }
.mess-card .qr svg { width: 100%; height: 100%; }
.mess-card .nm { font-family: var(--display); font-size: 18px; font-weight: 700; }
.mess-card .cd { font-family: monospace; font-size: 15px; letter-spacing: 2px; color: var(--gold); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .d { min-height: 92px; background: var(--surface-1); border: 1px solid var(--line); border-radius: 10px; padding: 6px; font-size: 11px; min-width: 0; }
.cal .d.today { border-color: var(--gold); }
.cal .d .dn { font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.cal .p { display: block; border-radius: 6px; padding: 3px 6px; margin-bottom: 3px; font-size: 10px; font-weight: 700; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid transparent; }
.cal .p.feed { background: rgba(232, 200, 108, .18); color: var(--gold-2); }
.cal .p.story { background: rgba(121, 169, 255, .16); color: #a9c7ff; }
.cal .p.reel { background: rgba(248, 144, 72, .18); color: #ffb88a; }
.cal .p.posted { opacity: .55; text-decoration: line-through; }
@media (max-width: 700px) { .cal { grid-template-columns: 1fr; } .cal .d { min-height: 0; } .cal .blank { display: none; } }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 10px; overflow-x: auto; }
.kanban .col { background: var(--surface-1); border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-height: 160px; }
.kanban .col h3 { margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.kanban .k { background: var(--surface-2); border-radius: 10px; padding: 10px; margin-bottom: 8px; font-size: 12px; }

/* ---------------------------------------------------------------- receipt (print) */
.receipt { background: #fff; color: #000; font-family: 'Courier New', monospace; width: 300px; margin: 0 auto; padding: 16px; font-size: 12px; border-radius: 6px; }
.receipt h3 { font-family: inherit; text-align: center; font-size: 15px; letter-spacing: 1px; }
.receipt .c { text-align: center; }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: 8px 0; }
.receipt .l { display: flex; justify-content: space-between; gap: 8px; }
@media print {
  body * { visibility: hidden !important; }
  .receipt, .receipt *, .print-area, .print-area * { visibility: visible !important; }
  .receipt, .print-area { position: absolute; left: 0; top: 0; }
  .modal-back { background: none; }
}
@media (max-width: 520px) {
  .kpi .value { font-size: 22px; }
  .kpi.hero .value { font-size: 24px; }
  .topbar h1 { font-size: 19px; }
  .card { padding: 14px; }
}
