/* Rift product back offices (POS, Check-in): the client's own app, deliberately not the studio admin's look.
   A sidebar app shell, Inter, rounded cards, the client's logo and accent colour. Loaded after pos-admin.css /
   checkin-admin.css and restyles their shared components (.panel, .btn, .stat, tables, forms) in place. */
:root {
  --bg: #f4f5f7; --panel: #ffffff; --paper: #fafbfc; --tint: #f1f3f6; --ink: #111827; --ink-2: #374151; --muted: #6b7280; --muted-2: #9ca3af;
  --line: #e5e7eb; --line-2: #d1d5db; --dark: #111827; --good: #047857; --good-bg: #ecfdf5; --bad: #b91c1c; --bad-bg: #fef2f2; --warn: #b45309; --warn-bg: #fffbeb;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --r: 10px; --r-sm: 7px; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
}
body { font: 14.5px/1.55 var(--sans); background: var(--bg); color: var(--ink); }
h1 { font-family: var(--sans); font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
h2 { font-family: var(--sans); font-size: 1.02rem; font-weight: 650; letter-spacing: -.01em; }
.mono { font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .04em; }
.num, td.num, .kv span:last-child, .stat b { font-family: var(--sans); font-variant-numeric: tabular-nums; }
a { color: var(--accent); }

/* ---- shell */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; gap: 18px; overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px; color: var(--ink); font-weight: 700; }
.side-brand:hover { color: var(--ink); }
.side-brand img { width: 38px; height: 38px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); padding: 2px; }
.side-brand .initial { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 1.05rem; }
.side-brand span { line-height: 1.2; min-width: 0; }
.side-brand small { display: block; font-size: .74rem; font-weight: 500; color: var(--muted); }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 550; font-size: .92rem; }
.side-nav a svg { width: 18px; height: 18px; flex: none; color: var(--muted-2); }
.side-nav a:hover { background: var(--tint); color: var(--ink); }
.side-nav a.on { background: color-mix(in srgb, var(--accent) 11%, #fff); color: var(--ink); }
.side-nav a.on svg { color: var(--accent); }
.side-nav .sep { height: 1px; background: var(--line); margin: 8px 6px; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.side-launch { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-radius: var(--r-sm); background: var(--accent); color: #fff; font-weight: 600; }
.side-launch:hover { color: #fff; filter: brightness(1.07); }
.side-launch svg { width: 17px; height: 17px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 10px 8px 0; border-top: 1px solid var(--line); }
.side-user .av { width: 32px; height: 32px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: var(--ink-2); flex: none; }
.side-user div { flex: 1; min-width: 0; line-height: 1.25; font-size: .86rem; font-weight: 600; }
.side-user small { display: block; color: var(--muted); font-weight: 500; }
.side-user form { margin: 0; }
.side-user button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; }
.side-user button:hover { background: var(--tint); color: var(--ink); }
.side-user button svg { width: 18px; height: 18px; display: block; }
.powered { font-size: .72rem; color: var(--muted-2); text-align: center; }
.content { min-width: 0; }
.content .wrap { max-width: 1240px; padding: 0 32px; margin: 0 auto; }
.demo-bar { background: #1f2937; color: #e5e7eb; font-size: .85rem; }
.demo-bar .wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 42px; padding-top: 6px; padding-bottom: 6px; }
.demo-bar b { color: #fff; }
.demo-bar span { flex: 1; min-width: 240px; }
.demo-bar a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---- page head */
.page-head { padding: 28px 0 20px; align-items: center; }
.page-head .eyebrow { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); margin-bottom: 4px; }

/* ---- components */
.btn { font-family: var(--sans); font-size: .86rem; font-weight: 600; letter-spacing: 0; text-transform: none; border-radius: var(--r-sm); border-color: var(--line-2); box-shadow: var(--shadow); min-height: 38px; }
.btn.sm { font-size: .8rem; min-height: 32px; border-radius: 6px; }
.btn.primary { box-shadow: none; }
.panel { border-radius: var(--r); border-color: var(--line); box-shadow: var(--shadow); }
.stats { border: 0; background: none; gap: 14px; }
.stat { background: #fff; border: 1px solid var(--line) !important; border-radius: var(--r); box-shadow: var(--shadow); }
.stat .mono { font-size: .8rem; text-transform: none; letter-spacing: 0; font-weight: 550; color: var(--muted); }
.stat b { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; }
.stat small { font-family: var(--sans); font-size: .8rem; }
.table-wrap { border-radius: var(--r); box-shadow: var(--shadow); border-color: var(--line); }
th { font-family: var(--sans); font-size: .74rem; font-weight: 600; letter-spacing: .02em; text-transform: none; color: var(--muted); background: var(--paper); }
td { border-bottom-color: #f0f1f3; }
label.f > span, .mono.muted { font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.input, select.input, textarea.input { border-radius: var(--r-sm); border-color: var(--line-2); font-family: var(--sans); }
textarea.input { font-family: var(--sans); font-size: .9rem; }
.pill { font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: 0; text-transform: none; border-radius: 999px; padding: 2px 9px; }
.status, .errors, .alert-box { border-radius: var(--r-sm); }
.tabs { border-radius: var(--r-sm); overflow: hidden; }
.tabs a { font-family: var(--sans); font-size: .82rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.kv { border-bottom-style: solid; border-bottom-color: #f0f1f3; }
.meter { border-radius: 99px; overflow: hidden; }
.bars .b i { border-radius: 4px 4px 0 0; }
.bars .b small, .bars .b span, .heat, .code-tag, .kiosk-url { font-family: var(--sans); }
.code-tag { font-family: var(--mono); border-radius: 5px; }
.kiosk-url { border-radius: var(--r-sm); font-family: var(--mono); }
.avatar { border-radius: 50%; }
.avatar.lg, .avatar.xl { border-radius: 16px; }
.sess, .checks .check, details.edit, .results, .desk-search input { border-radius: var(--r-sm); }
.desk-search input { border-width: 1px; border-color: var(--line-2); box-shadow: var(--shadow); }
.week .col h3 { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.tt-head { font-family: var(--sans); font-size: .74rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.hint, label.f > small { color: var(--muted); }
.feed-row .t { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.toast { border-radius: var(--r-sm); }

/* ---- sign-in screen */
.login { background: var(--bg); background-image: none; }
.login .card { border-radius: 14px; box-shadow: 0 10px 40px rgba(16,24,40,.08); border: 1px solid var(--line); }
.login .card .mono { text-transform: none; font-size: .82rem; }
.demo-cta { display: block; text-align: center; margin-top: 12px; padding: 11px; border-radius: var(--r-sm); border: 1px dashed var(--accent); color: var(--accent); font-weight: 600; }
.demo-cta:hover { background: color-mix(in srgb, var(--accent) 7%, #fff); color: var(--accent); }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: column; padding: 12px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-nav { display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav a { white-space: nowrap; padding: 7px 10px; }
  .side-nav .sep, .powered { display: none; }
  .side-foot { flex-direction: row; display: flex; align-items: center; }
  .side-launch { flex: 1; }
  .side-user { border-top: 0; padding: 0; flex: none; }
  .side-user div { display: none; }
  .content .wrap { padding: 0 16px; }
}

/* ---- fit: grid children may shrink, charts never push the page wider */
.grid-2 > *, .grid-3 > *, .panel, .content main { min-width: 0; }
.bars { overflow: hidden; }
.bars .b small, .bars .b span { display: block; height: 18px; line-height: 18px; margin: 0; }
.mono, a.mono { text-transform: none; letter-spacing: 0; }
.panel-head .mono { font-size: .82rem; }
.heat { grid-template-columns: 34px repeat(24, minmax(0, 1fr)); overflow: hidden; }
.heat span { white-space: nowrap; overflow: visible; font-size: .6rem; min-width: 0; }
.heat i { min-height: 0; }
.bars { padding-left: 14px; }
.bars .b i { max-height: calc(100% - 38px); }
