:root {
  --bg: #F4F3EF; --surface: #FFFFFF; --surface-2: #FAF9F6; --ink: #1A1F2B; --ink-2: #4A5468; --ink-3: #7C8597;
  --line: #E3E1DA; --line-2: #EEEDE8;
  --brand: #233876; --brand-2: #3550A8; --brand-tint: #E9EDF8;
  --accent: #F2B33D; --accent-tint: #FDF3DE;
  --open: #2E8B57; --open-tint: #E3F3EA; --closed: #C2412D; --closed-tint: #FBE6E2; --warn: #B7791F;
  --weekend: #F7F2E6;
  --r: 8px; --shadow: 0 1px 2px rgba(20,25,40,.06), 0 4px 16px rgba(20,25,40,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
input, select, textarea, button { font: inherit; color: inherit; }
a { color: var(--brand-2); }
.num, td, .kpi b { font-variant-numeric: tabular-nums; }
h1 { font-size: 20px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0 0 12px; }
h3 { font-size: 13px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.muted { color: var(--ink-3); } .small { font-size: 12px; }
.hidden { display: none !important; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 274px 1fr; grid-template-rows: 56px 1fr; height: 100vh; height: 100dvh; }
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--brand); color: #fff; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; width: 196px; letter-spacing: -.01em; }
.bm { display: flex; flex-direction: column; line-height: 1.1; } .bm b { font-size: 16px; } .bm small { font-size: 11px; font-weight: 500; opacity: .8; letter-spacing: .02em; }
.lm { width: 32px; height: 32px; flex: none; filter: drop-shadow(0 2px 6px rgba(10,15,40,.25)); }
.login-logo { width: auto; gap: 12px; } .login-logo .lm { width: 44px; height: 44px; } .login-logo .bm b { font-size: 20px; } .login-logo .bm small { font-size: 12.5px; }
.login-logo.mob { display: none; color: var(--ink); margin-bottom: 18px; } .login-logo.mob .bm small { color: var(--ink-2); opacity: 1; }
.top select { background: #ffffff18; border: 1px solid #ffffff30; color: #fff; border-radius: 6px; padding: 6px 10px; max-width: 320px; }
.top select option { color: var(--ink); }
.top .sp { flex: 1; }
.syncpill { display: flex; align-items: center; gap: 6px; font-size: 12px; background: #ffffff14; padding: 5px 10px; border-radius: 99px; cursor: pointer; border: 0; color: #fff; }
.syncpill i { width: 8px; height: 8px; border-radius: 50%; background: #6EE7A0; }
.syncpill.busy i { background: var(--accent); animation: pulse 1s infinite; } .syncpill.bad i { background: #FF8A7A; }
@keyframes pulse { 50% { opacity: .3; } }
.usermenu { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.usermenu small { opacity: .7; display: block; font-size: 11px; }
/* Sidebar — floating card (same look as the Patron app) */
.side { padding: 12px 0 12px 12px; min-height: 0; display: flex; }
.side-card { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; box-shadow: 0 1px 2px rgba(20,25,40,.05), 0 8px 28px rgba(20,25,40,.07); border: 1px solid var(--line-2); }
.side-head, .side-foot { display: none; }
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 12px 10px; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 2px; }
.side svg { width: 18px; height: 18px; flex: none; }
.ni, .ngh { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 500; background: none; border: 0; cursor: pointer; text-align: left; min-height: 40px; }
.ni span, .ngh span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ni:hover, .ngh:hover { background: var(--surface-2); color: var(--ink); }
.ni.on:not(.sub) { background: #14171F; color: #fff; }
.nb { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #14171F; color: #fff; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.nb:empty { display: none; }
.ni.on:not(.sub) .nb { background: #fff; color: #14171F; }
.ng { margin: 2px 0; }
.ng.open > .ngh { background: var(--surface-2); color: var(--ink); }
.ng.open.cur > .ngh { background: #14171F; color: #fff; }
.ng.open.cur > .ngh .nb { background: #fff; color: #14171F; }
.ng.open .ngh .nb { display: none; }
.pm { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; border: 1px solid currentColor; opacity: .55; }
.pm svg { width: 13px; height: 13px; } .pm svg + svg { display: none; }
.ng.open .pm svg { display: none; } .ng.open .pm svg + svg { display: block; }
.ngc { display: none; margin: 6px 0 6px 21px; padding-left: 12px; border-left: 1.5px solid var(--line); flex-direction: column; gap: 2px; }
.ng.open .ngc { display: flex; }
.ni.sub { padding: 7px 12px; min-height: 36px; font-size: 13.5px; }
.ni.sub.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(20,25,40,.08), 0 4px 12px rgba(20,25,40,.10); }
.side-bg { display: none; }
.main { overflow: auto; padding: 20px 24px 60px; min-width: 0; }
.pagehead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.pagehead .sp { flex: 1; }
.menu-btn { display: none; background: none; border: 0; color: #fff; padding: 6px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 7px 12px; border-radius: 6px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.primary:hover { background: var(--brand-2); }
.btn.danger { color: var(--closed); } .btn.sm { padding: 4px 9px; font-size: 12px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: 12px; color: var(--ink-2); font-weight: 500; }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=password], input[type=search], select, textarea {
  border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 7px 9px; min-width: 0; width: 100%; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--brand-2); outline-offset: -1px; border-color: transparent; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1 1 140px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 4px 11px; font-size: 12px; cursor: pointer; user-select: none; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 6px 12px; cursor: pointer; font-weight: 500; color: var(--ink-2); }
.seg button.on { background: var(--brand); color: #fff; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.checks label, label.ck { display: flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; }
.toggle { position: relative; width: 36px; height: 20px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle i { position: absolute; inset: 0; background: #CBD0DA; border-radius: 99px; transition: .15s; cursor: pointer; }
.toggle i::after { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .15s; }
.toggle input:checked + i { background: var(--open); } .toggle input:checked + i::after { left: 18px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.cards { display: grid; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.kpi span { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.kpi b { display: block; font-size: 24px; letter-spacing: -.02em; margin-top: 2px; }
.kpi em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.dash { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; }
.dash > *, .cards > *, .grid2 > *, .grid3 > * { min-width: 0; }
.modal .body > .seg, .modal .body > .chips { justify-self: start; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.b-ok { background: var(--open-tint); color: var(--open); } .b-bad { background: var(--closed-tint); color: var(--closed); }
.b-q { background: var(--accent-tint); color: var(--warn); } .b-n { background: var(--line-2); color: var(--ink-2); }
.alert { padding: 10px 14px; border-radius: var(--r); background: var(--accent-tint); color: #7A5310; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; }
.alert.bad { background: var(--closed-tint); color: var(--closed); }
.empty { text-align: center; padding: 36px; color: var(--ink-3); }

/* ---------- tables ---------- */
.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { text-align: left; font-weight: 600; font-size: 12px; color: var(--ink-2); background: var(--surface-2); padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
.t td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.t tr:last-child td { border-bottom: 0; }
.t td.r, .t th.r { text-align: right; }
.t tbody tr.click { cursor: pointer; } .t tbody tr.click:hover { background: var(--surface-2); }
.t tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line); }

/* ---------- calendar grid ---------- */
.calbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.cal { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: auto; max-height: calc(100vh - 190px); }
.cal table { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.cal th, .cal td { border-bottom: 1px solid var(--line-2); padding: 0; height: 34px; }
.cal thead th { position: sticky; top: 0; z-index: 3; background: var(--brand); color: #fff; font-weight: 500; text-align: center; min-width: 62px; height: auto; padding: 5px 2px; line-height: 1.15; border-right: 1px solid #ffffff22; }
.cal thead th b { display: block; font-size: 15px; }
.cal thead th.we { background: #1B2D63; }
.cal thead th.today { background: var(--accent); color: var(--ink); }
.cal .lbl { position: sticky; left: 0; z-index: 2; background: var(--surface); min-width: 230px; max-width: 230px; padding: 0 10px; border-right: 1px solid var(--line); text-align: left; }
.cal thead .lbl { z-index: 4; background: var(--brand); }
.cal tr.room td { background: var(--surface-2); height: 36px; }
.cal tr.room .lbl { background: var(--surface-2); font-weight: 700; font-size: 13px; }
.cal td.c { text-align: center; border-right: 1px solid var(--line-2); }
.cal td.we { background: var(--weekend); }
.cal .lbl .sub { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.cal .lbl .sub .muted { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cal .lbl .sub.l2 { padding-left: 18px; color: var(--ink-2); } .cal .lbl .sub.l3 { padding-left: 34px; color: var(--ink-3); }
.cal .exp { border: 0; background: none; cursor: pointer; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); padding: 0; }
.cal .exp:hover { background: var(--line-2); }
.cal .lbl a { font-size: 11px; cursor: pointer; text-decoration: underline; margin-left: auto; }
.cell { width: 52px; border: 1px solid transparent; background: transparent; text-align: center; padding: 4px 2px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.cell:hover { border-color: var(--line); background: #fff; }
.cell:focus { background: #fff; }
.cell.saving { background: var(--accent-tint); } .cell.saved { background: var(--open-tint); transition: background 1s; } .cell.err { background: var(--closed-tint); }
.cell.ovr { color: var(--brand-2); font-weight: 700; }
.inv { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 3px 0; }
.ss { width: 40px; height: 5px; border-radius: 3px; background: var(--open); border: 0; cursor: pointer; padding: 0; }
.ss.off { background: var(--closed); }
.inv .cell.zero { color: var(--closed); font-weight: 700; }
.marks { display: flex; gap: 2px; justify-content: center; height: 10px; }
.marks i { font-style: normal; font-size: 9px; font-weight: 700; line-height: 10px; padding: 0 2px; border-radius: 2px; background: var(--accent-tint); color: var(--warn); }
.sell { font-size: 12px; } .sell small { display: block; font-size: 10px; color: var(--ink-3); }
.sell.zero { color: var(--closed); font-weight: 700; }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15,20,35,.42); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; z-index: 50; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 12px; width: min(720px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { width: min(1000px, 100%); }
.modal header { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal header h2 { margin: 0; flex: 1; font-size: 16px; }
.modal .body { padding: 18px 20px; display: grid; gap: 14px; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 12px 12px; }
.x { border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--ink-3); line-height: 1; }
.range-row { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; align-items: end; }
pre.code { background: #11162A; color: #D7DEF0; padding: 12px; border-radius: 6px; overflow: auto; max-height: 300px; font: 12px/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; }

/* ---------- toasts ---------- */
#toasts { position: fixed; bottom: 18px; right: 18px; display: grid; gap: 8px; z-index: 99; }
.toast { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); max-width: 380px; font-size: 13px; animation: in .2s; }
.toast.bad { background: var(--closed); } .toast.ok { background: var(--open); }
@keyframes in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.15fr 1fr; background: var(--bg); }
.login .art { position: relative; overflow: hidden; color: #fff; padding: 44px 52px; display: flex; flex-direction: column; gap: 28px;
  background: radial-gradient(1200px 600px at 85% -10%, #4A68E8 0%, transparent 55%), radial-gradient(800px 500px at -10% 110%, #2B3F8F 0%, transparent 60%), linear-gradient(160deg, #1B2A6B 0%, #111A45 100%); }
.login .art > * { position: relative; z-index: 2; }
.login .stars, .login .moon, .login .scene { position: absolute !important; z-index: 0 !important; pointer-events: none; }
.login .stars { inset: 0; } .login .stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; animation: twinkle 3.6s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .15; } }
.login .moon { width: 110px; height: 110px; right: 10%; top: 8%; border-radius: 50%; background: transparent; box-shadow: inset 30px -12px 0 0 #F6C25A; filter: drop-shadow(0 0 28px rgba(246,194,90,.55)); transform: rotate(-18deg); }
.login .scene { left: 0; right: 0; bottom: 0; width: 100%; height: 42%; }
.login .art .login-logo .bm b { color: #fff; }
.login .pitch { margin-top: auto; max-width: 470px; }
.login .eyebrow { display: inline-block; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: #FFD66B; background: #ffffff12; border: 1px solid #ffffff22; padding: 5px 11px; border-radius: 99px; margin-bottom: 18px; }
.login .art h1 { font-size: clamp(30px, 3.2vw, 44px); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 22px; font-weight: 800; }
.login .art h1 em { font-style: normal; background: linear-gradient(90deg, #FFE7A8, #F2A41A); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login .feats { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.login .feats li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: #DCE3FA; }
.login .feats b { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: #ffffff14; border: 1px solid #ffffff22; color: #FFD66B; }
.login .feats svg { width: 17px; height: 17px; }
.login .synccard { position: absolute !important; right: 7%; top: 30%; width: 250px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 20px 50px rgba(5,10,35,.35); font-size: 12.5px; animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
.sc-h { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; } .sc-h em { margin-left: auto; font-style: normal; font-weight: 500; opacity: .7; font-size: 11.5px; }
.sc-h .dot { width: 8px; height: 8px; border-radius: 50%; background: #6EE7A0; box-shadow: 0 0 0 4px rgba(110,231,160,.2); animation: pulse 1.6s infinite; }
.sc-r { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.1); color: #DCE3FA; }
.sc-r b { font-weight: 600; } .sc-r b.ok { color: #86EFAC; } .sc-r b.busy { color: #FFD66B; }
.sc-f { display: flex; justify-content: space-between; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255,214,107,.14); color: #FFE7A8; } .sc-f b { color: #fff; }
.login .art-foot { font-size: 12px; opacity: .55; }
.login .form-side { display: grid; place-items: center; padding: 32px 20px; background: radial-gradient(600px 400px at 100% 0%, #E9EDF8 0%, transparent 60%), var(--bg); }
.lcard { width: min(400px, 100%); display: grid; gap: 16px; background: var(--surface); padding: 34px 30px 26px; border-radius: 20px; border: 1px solid var(--line-2); box-shadow: 0 1px 2px rgba(20,25,40,.04), 0 24px 60px rgba(20,30,70,.10); }
.lcard h2 { font-size: 26px; margin: 0; letter-spacing: -.02em; } .lcard .sub { margin: -8px 0 4px; }
.iwrap { position: relative; display: flex; align-items: center; }
.iwrap > svg { position: absolute; left: 13px; width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.iwrap input { width: 100%; padding: 12px 44px 12px 42px !important; border-radius: 12px !important; font-size: 15px; background: var(--surface-2); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s, background .15s; }
.iwrap input:focus { outline: none; background: var(--surface); border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(53,80,168,.14); }
.iwrap:focus-within > svg { color: var(--brand-2); }
.eye { position: absolute; right: 6px; width: 34px; height: 34px; border: 0; background: none; border-radius: 8px; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.eye svg { width: 18px; height: 18px; } .eye.on { color: var(--brand-2); background: var(--brand-tint); }
.lbtn { justify-content: center; gap: 8px; padding: 13px !important; border-radius: 12px !important; font-size: 15px; font-weight: 600; background: linear-gradient(135deg, #3550A8, #1B2A6B) !important; border: 0 !important; box-shadow: 0 8px 20px rgba(35,56,118,.28); transition: transform .12s, box-shadow .12s; }
.lbtn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(35,56,118,.34); } .lbtn svg { width: 18px; height: 18px; }
.lbtn.busy { opacity: .75; pointer-events: none; } .lbtn.busy svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lerr { color: var(--closed); font-size: 13px; min-height: 0; } .lerr:empty { display: none; } .lerr:not(:empty) { background: var(--closed-tint); padding: 9px 12px; border-radius: 10px; }
.lcard .help { text-align: center; margin: 2px 0 0; line-height: 1.5; }
.shake { animation: shake .35s; } @keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .login *, .lcard { animation: none !important; } }
@media (max-width: 1240px) { .login .synccard { display: none; } }

/* ---------- derived / chain ---------- */
.chain { display: grid; gap: 6px; }
.chain .link { display: grid; grid-template-columns: 28px 1fr 64px 110px 74px; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.chain .link.base { background: var(--brand-tint); }
.tag { font-size: 11px; font-weight: 700; background: var(--brand); color: #fff; padding: 2px 7px; border-radius: 4px; }
.pivot td.h { background: var(--brand-tint); }
.offer-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.offer { border: 1px solid var(--line); border-radius: 8px; padding: 10px; cursor: pointer; text-align: center; font-weight: 600; font-size: 13px; }
.offer small { display: block; font-weight: 400; color: var(--ink-3); font-size: 11px; }
.offer.on { border-color: var(--brand); background: var(--brand-tint); color: var(--brand); }
.donut-wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.legend { display: grid; gap: 6px; font-size: 13px; }
.legend div { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.occbars { display: flex; align-items: flex-end; gap: 4px; height: 110px; }
.occbars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10px; color: var(--ink-3); height: 100%; justify-content: flex-end; }
.occbars b { width: 100%; background: var(--brand-2); border-radius: 3px 3px 0 0; min-height: 2px; }
.voucher { border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.voucher dl { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; margin: 0 0 14px; font-size: 13px; }
.voucher dt { color: var(--ink-3); } .voucher dd { margin: 0; font-weight: 500; }
.conf { display: inline-block; border: 2px solid var(--accent); color: #7A5310; padding: 4px 10px; border-radius: 6px; font-weight: 700; margin: 6px 0 14px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; top: 0; left: 0; height: 100vh; height: 100dvh; width: min(310px, 86vw); z-index: 60; padding: 10px; transform: translateX(-105%); transition: transform .22s ease; }
  .side.open { transform: none; }
  .side-bg { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(15,20,35,.45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .side.open + .side-bg { opacity: 1; pointer-events: auto; }
  body.side-lock { overflow: hidden; }
  .side-head { display: flex; align-items: center; gap: 8px; padding: 14px 12px 6px 16px; }
  .side-head .logo { font-size: 15px; gap: 10px; color: var(--ink); flex: 1; } .side-head .lm { width: 36px; height: 36px; } .side-head .bm small { color: var(--ink-2); opacity: 1; }
  .side-x { background: var(--surface-2); border: 0; border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--ink-2); cursor: pointer; }
  .side-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); }
  .side-foot .who { flex: 1 1 100%; display: flex; flex-direction: column; } .side-foot .who small { color: var(--ink-3); }
  .side-foot .btn { flex: 1; justify-content: center; }
  .ni, .ngh { min-height: 44px; } .ni.sub { min-height: 40px; }
  .menu-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: -4px; border-radius: 10px; background: #ffffff14; cursor: pointer; flex: none; }
  .menu-btn svg { width: 22px; height: 22px; }
  .top > .logo { display: none; }
  #outBtn { display: none; }
  .usermenu div, #pwBtn, .syncpill span { display: none; }
  .top { gap: 8px; padding: 0 10px; } .top select { flex: 1; max-width: none; }
  .seg { flex-wrap: wrap; } .pagehead h1 { width: 100%; }
  .main { padding: 16px; }
  .dash, .grid2, .grid3 { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; } .login .art { display: none; } .login-logo.mob { display: flex; justify-content: center; margin-bottom: 6px; }
  .login .form-side { align-items: start; padding: 0 0 24px; background: linear-gradient(180deg, #1B2A6B 0, #2A3E9C 210px, var(--bg) 210px); }
  .lcard { margin: 56px 16px 0; width: auto; padding: 26px 20px 22px; } .lcard h2, .lcard .sub { text-align: center; }
  .lcard .login-logo.mob { margin-top: -62px; flex-direction: column; gap: 8px; text-align: center; } .lcard .login-logo.mob .lm { width: 64px; height: 64px; filter: drop-shadow(0 8px 18px rgba(10,15,40,.35)); }
  .lcard .login-logo.mob .bm { align-items: center; }
  .offer-types { grid-template-columns: repeat(2, 1fr); }
  .cal .lbl { min-width: 150px; max-width: 150px; }
  .range-row { grid-template-columns: 1fr 1fr; }
}
@media print {
  .top, .side, .modal footer, .modal header .x, #toasts { display: none !important; }
  .modal-bg { position: static; background: none; padding: 0; } .modal { box-shadow: none; }
  body > #app { display: none; }
}

.lockic svg { width: 24px; height: 24px; }
.kpi.warn b { color: var(--warn); } .kpi.bad b { color: var(--closed); } .kpi.ok b { color: var(--open); }
.dl2 { display: grid; grid-template-columns: 170px 1fr; gap: 7px 12px; font-size: 13px; margin: 0; } .dl2 dt { color: var(--ink-3); } .dl2 dd { margin: 0; font-weight: 500; }
