/* TRCG Admin Console — design tokens, layout and components.
   Mobile first: base rules are for phones, @media (min-width) adds desktop layout. */

@font-face { font-family: "Montserrat Variable"; src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter Variable"; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --red: #D71920; --red-600: #B8141B; --red-700: #9B1017; --red-50: #FDECEC; --red-100: #FAD5D7;
  --ink: #0E0F12; --ink-2: #17181C; --ink-3: #23252B; --ink-text: #E9EAEE; --ink-muted: #9A9FAB;
  --bg: #F4F4F6; --surface: #FFFFFF; --surface-2: #FAFAFB; --line: #E6E7EB; --line-2: #D5D8DE;
  --text: #15171C; --muted: #5F6572; --faint: #8E94A0;
  --ok: #0C7A53; --ok-bg: #E3F5EC; --warn: #8F5A00; --warn-bg: #FFF2D6; --info: #1B4FD1; --info-bg: #E7EEFE; --bad: #B42318; --bad-bg: #FDEBE9;
  --radius: 14px; --radius-sm: 10px; --radius-xs: 7px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 1px rgba(16, 24, 40, .03);
  --shadow-lg: 0 18px 44px rgba(10, 12, 20, .22);
  --font-display: "Montserrat Variable", "Montserrat", "Segoe UI", system-ui, sans-serif;
  --font: "Inter Variable", Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --sidebar-w: 248px; --topbar-h: 64px; --bottomnav-h: 62px;
  --focus: 0 0 0 3px rgba(215, 25, 32, .28);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0B0C0F; --surface: #141519; --surface-2: #1A1B20; --line: #25272E; --line-2: #343740;
  --text: #ECEDF0; --muted: #A0A6B2; --faint: #6F7581;
  --red-50: rgba(215, 25, 32, .16); --red-100: rgba(215, 25, 32, .28);
  --ok: #4CD7A0; --ok-bg: rgba(76, 215, 160, .12); --warn: #F5B945; --warn-bg: rgba(245, 185, 69, .13);
  --info: #86A8FF; --info-bg: rgba(134, 168, 255, .13); --bad: #FF8A80; --bad-bg: rgba(255, 138, 128, .13);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); letter-spacing: -.01em; line-height: 1.2; }
p { margin: 0; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92em; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: .6; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 1px 2px rgba(155, 16, 23, .35); }
.btn-primary:hover { background: var(--red-600); }
.btn-secondary { background: var(--surface); border-color: var(--line-2); color: var(--text); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--faint); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.btn-danger:hover { background: var(--bad); color: #fff; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }
.btn .spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-secondary .spinner, .btn-ghost .spinner { border-color: var(--line-2); border-top-color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--text); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .icon { position: absolute; left: 14px; color: var(--faint); pointer-events: none; }
.input, .select, .textarea { width: 100%; min-height: 46px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.input-wrap > .input { padding-left: 42px; }
.input-wrap > .input.has-action { padding-right: 46px; }
.textarea { padding: 12px 14px; min-height: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238E94A0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--red); box-shadow: var(--focus); }
.input.invalid, .select.invalid { border-color: var(--bad); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input-action { position: absolute; right: 6px; width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 8px; cursor: pointer; }
.input-action:hover { background: var(--surface-2); color: var(--text); }
.field-error { display: flex; gap: 6px; align-items: flex-start; color: var(--bad); font-size: 13px; }
.form-error { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--bad-bg); color: var(--bad); border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13.5px; }
.form-error ul { margin: 4px 0 0; padding-left: 18px; }
.form-ok { display: flex; gap: 10px; padding: 12px 14px; background: var(--ok-bg); color: var(--ok); border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13.5px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; user-select: none; }
.check input { appearance: none; width: 20px; height: 20px; flex: none; margin: 0; border: 1.5px solid var(--line-2); border-radius: 6px; background: var(--surface); display: grid; place-content: center; cursor: pointer; transition: .12s; }
.check input:checked { background: var(--red); border-color: var(--red); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
.check input:focus-visible { box-shadow: var(--focus); }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { appearance: none; position: absolute; inset: 0; margin: 0; border-radius: 99px; background: var(--line-2); cursor: pointer; transition: background .15s; }
.switch input:checked { background: var(--red); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; pointer-events: none; }
.switch:has(input:checked)::after { transform: translateX(18px); }
.switch input:focus-visible { box-shadow: var(--focus); }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grid-2 { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.strength { display: grid; gap: 8px; margin-top: 2px; }
.strength-bar { height: 5px; border-radius: 9px; background: var(--line); overflow: hidden; }
.strength-bar i { display: block; height: 100%; width: 0; background: var(--bad); transition: width .2s, background .2s; }
.strength ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.strength li { display: flex; align-items: center; gap: 7px; }
.strength li .dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; }
.strength li.ok { color: var(--ok); }
.strength li.ok .dot { background: var(--ok); border-color: var(--ok); }
.strength li.ok .dot::after { content: ""; width: 6px; height: 3px; border: solid #fff; border-width: 0 0 1.6px 1.6px; transform: rotate(-45deg) translate(.5px, -.5px); }

.otp { display: flex; gap: 8px; justify-content: center; }
.otp input { width: 100%; max-width: 54px; height: 60px; text-align: center; font: 600 24px var(--font-display); border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .15s, box-shadow .15s; caret-color: var(--red); }
.otp input:focus { border-color: var(--red); box-shadow: var(--focus); }
.otp.invalid input { border-color: var(--bad); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; border: 1px solid transparent; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.info { background: var(--info-bg); color: var(--info); }
.chip.red { background: var(--red-50); color: var(--red); }
.chip.outline { background: transparent; border-color: var(--line-2); }
.chip.dark { background: var(--ink-3); color: #fff; }
.delta { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--ok-bg); color: var(--ok); }
.delta.down { background: var(--bad-bg); color: var(--bad); }

.filter-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.filter-chips::-webkit-scrollbar { display: none; }
.fchip { height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.fchip:hover { border-color: var(--faint); color: var(--text); }
.fchip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
:root[data-theme="dark"] .fchip.active { background: var(--red); border-color: var(--red); }
.fchip .count { font-size: 11.5px; padding: 1px 7px; border-radius: 99px; background: rgba(127, 127, 127, .18); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 12px 16px; border: 0; background: none; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; position: relative; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--red); border-radius: 2px; }
.tab .count { font-size: 11.5px; padding: 1px 7px; border-radius: 99px; background: var(--red-50); color: var(--red); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.card-head h3 { font-size: 15px; font-weight: 700; }
.card-head .link { font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.card-body { padding: 14px 18px 18px; }
.stack { display: grid; gap: 16px; }
.stack-lg { display: grid; gap: 24px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.kv { display: grid; gap: 14px; }
.kv > div { display: grid; gap: 2px; }
.kv dt { font-size: 12.5px; color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
@media (min-width: 640px) { .kv.cols { grid-template-columns: repeat(2, 1fr); } }

/* ---------- auth screens ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; background: var(--surface); }
.auth-hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; padding: 22px 22px 26px; isolation: isolate; }
.auth-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(900px 420px at 85% 110%, rgba(215, 25, 32, .55), transparent 60%), linear-gradient(120deg, #0B0C0F 20%, #1A0B0D 100%); }
.auth-hero .hero-photo { position: absolute; inset: 0; z-index: -1; background: var(--hero-img, none) center / cover no-repeat; opacity: .42; mix-blend-mode: luminosity; }
.auth-hero .barcode { position: absolute; z-index: -1; right: -20px; bottom: -10px; width: 420px; height: 220px; opacity: .13; }
.auth-hero h1 { font-size: 28px; font-weight: 800; line-height: 1.08; margin-top: 22px; letter-spacing: -.025em; }
.auth-hero h1 em { font-style: normal; color: #FF3C44; }
.auth-hero .rule { width: 64px; height: 3px; background: var(--red); border-radius: 3px; margin: 18px 0; }
.auth-hero p.lead { font-size: 15px; color: #D6D8DE; max-width: 34ch; line-height: 1.45; }
.auth-pillars { display: none; }
.auth-panel { display: grid; place-items: start center; padding: 28px 18px 40px; background: var(--surface); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .brand-top { display: flex; justify-content: center; margin-bottom: 18px; }
.auth-card h2 { font-size: 24px; font-weight: 800; text-align: center; }
.auth-card .sub { text-align: center; color: var(--muted); margin: 6px 0 24px; font-size: 14px; }
.auth-card.left h2, .auth-card.left .sub { text-align: left; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--muted); }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; font-weight: 600; margin: 18px 0; }
.or::before, .or::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.notice { display: flex; gap: 12px; padding: 14px; border-radius: var(--radius-sm); background: var(--red-50); color: var(--text); font-size: 13px; line-height: 1.45; margin-top: 20px; }
.notice .icon { color: var(--red); margin-top: 1px; }
.notice b { display: block; color: var(--red); margin-bottom: 2px; font-size: 13px; }
.google-slot { min-height: 44px; display: flex; justify-content: center; width: 100%; }
.google-slot > div, .google-slot iframe { border-radius: 12px; }
.google-slot > div { max-width: 100%; overflow: hidden; color-scheme: light; }
.steps { display: grid; gap: 14px; margin: 0 0 20px; padding: 0; list-style: none; counter-reset: s; }
.steps > li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; counter-increment: s; }
.steps > li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff; font: 700 13px var(--font-display); display: grid; place-items: center; }
.steps > li > div > b { display: block; font-size: 14px; }
.qr-box { display: grid; place-items: center; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); width: max-content; margin: 10px auto 6px; }
.qr-box svg, .qr-box img { width: 188px; height: 188px; image-rendering: pixelated; }
.secret-key { display: flex; align-items: center; gap: 8px; justify-content: center; font-family: ui-monospace, Consolas, monospace; font-size: 13px; letter-spacing: .08em; padding: 10px 12px; background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: var(--radius-sm); word-break: break-all; }
.codes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.codes-grid code { text-align: center; padding: 10px 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; font: 600 14px ui-monospace, Consolas, monospace; letter-spacing: .06em; }

@media (min-width: 960px) {
  .auth { grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); grid-template-rows: none; }
  .auth-hero { padding: 44px 56px 40px 56px; display: flex; flex-direction: column; min-height: 100vh; clip-path: polygon(0 0, 100% 0, calc(100% - 90px) 100%, 0 100%); margin-right: -90px; padding-right: 150px; z-index: 1; }
  .auth-hero h1 { font-size: clamp(40px, 4.2vw, 62px); margin-top: auto; }
  .auth-hero .rule { margin: 26px 0 22px; width: 76px; }
  .auth-hero p.lead { font-size: 21px; max-width: 24ch; }
  .auth-pillars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); }
  .auth-pillars > div { display: grid; gap: 10px; padding: 0 14px; font-size: 13px; color: #D7D9DF; line-height: 1.25; border-left: 1px solid rgba(255, 255, 255, .1); }
  .auth-pillars > div:first-child { border-left: 0; padding-left: 0; }
  .auth-pillars .icon { width: 30px; height: 30px; stroke-width: 1.3; color: #fff; }
  .auth-panel { place-items: center; padding: 40px 48px 40px 120px; }
  .auth-hero .barcode { width: 520px; height: 260px; }
}

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; color: inherit; }
.logo-mark { width: 44px; height: 44px; flex: none; }
.logo-words { display: grid; line-height: .95; font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em; }
.logo-words .the { font-size: 11px; font-weight: 600; opacity: .8; margin-left: 3px; }
.logo-words .name { font-size: 21px; color: var(--red); }
.logo-words .name b { font-weight: 800; }
.logo-words .group { font-size: 12px; font-weight: 600; opacity: .7; margin-left: auto; margin-top: 1px; }
.logo.lg .logo-mark { width: 62px; height: 62px; }
.logo.lg .logo-words .name { font-size: 28px; }
.logo.lg .logo-words .the { font-size: 14px; }
.logo.lg .logo-words .group { font-size: 15px; }
.logo.on-dark .the, .logo.on-dark .group { color: #fff; opacity: .85; }
.logo.on-dark .name { color: #FF2D36; }

/* ---------- app shell ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }
.sidebar { position: fixed; z-index: 60; inset: 0 auto 0 0; width: min(86vw, 300px); background: var(--ink); color: var(--ink-text); display: flex; flex-direction: column; transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
.shell.nav-open .sidebar { transform: none; }
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(8, 9, 12, .55); opacity: 0; pointer-events: none; transition: opacity .2s; }
.shell.nav-open .scrim { opacity: 1; pointer-events: auto; }
.side-brand { padding: 22px 20px 18px; }
.side-nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; display: grid; align-content: start; gap: 2px; }
.side-nav .group-label { margin: 18px 12px 6px; font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: 10px; color: #C8CBD3; font-weight: 600; font-size: 14px; text-decoration: none !important; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; transition: background .12s, color .12s; }
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active { background: var(--red); color: #fff; box-shadow: 0 6px 16px -6px rgba(215, 25, 32, .7); }
.nav-item .badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: rgba(255, 255, 255, .14); font-size: 11.5px; display: grid; place-items: center; }
.nav-item.active .badge { background: rgba(255, 255, 255, .25); }
.side-foot { padding: 14px 20px 18px; font-size: 12px; color: var(--ink-muted); border-top: 1px solid rgba(255, 255, 255, .07); line-height: 1.4; }

.main { min-width: 0; padding-bottom: calc(var(--bottomnav-h) + 20px); }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; height: var(--topbar-h); padding: 0 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar .menu-btn { display: inline-grid; }
.topbar .mobile-logo { display: inline-flex; }
.search { position: relative; flex: 1; max-width: 560px; display: none; }
.search.open { display: block; position: absolute; left: 10px; right: 10px; top: 8px; z-index: 3; max-width: none; }
.search .input { min-height: 42px; background: var(--surface-2); padding-left: 40px; }
.search .kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 600; color: var(--faint); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; pointer-events: none; display: none; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 60vh; overflow: auto; padding: 6px; z-index: 5; }
.search-results .hit { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 9px; color: var(--text); text-decoration: none !important; }
.search-results .hit:hover, .search-results .hit.sel { background: var(--surface-2); }
.search-results .hit small { color: var(--muted); display: block; }
.search-results .hit .type { margin-left: auto; font-size: 11.5px; color: var(--faint); font-weight: 600; }
.search-results .none { padding: 16px; color: var(--muted); text-align: center; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.icon-btn { position: relative; width: 42px; height: 42px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; border-radius: 10px; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .pip { position: absolute; top: 5px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 14px; text-align: center; border: 2px solid var(--surface); box-sizing: border-box; }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border: 0; background: none; border-radius: 99px; cursor: pointer; }
.user-btn:hover { background: var(--surface-2); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font: 700 12.5px var(--font-display); flex: none; letter-spacing: .02em; }
.avatar.red { background: var(--red); }
.avatar.lg { width: 64px; height: 64px; font-size: 21px; }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.user-btn .who { display: none; text-align: left; line-height: 1.2; }
.user-btn .who b { font-size: 13px; display: block; }
.user-btn .who span { font-size: 12px; color: var(--muted); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; }
.menu .menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu .menu-head b { display: block; }
.menu .menu-head span { font-size: 12.5px; color: var(--muted); word-break: break-all; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--text); font-size: 14px; text-align: left; text-decoration: none !important; }
.menu-item:hover { background: var(--surface-2); }
.menu-item.danger { color: var(--bad); }
.pop-wrap { position: relative; }
.notif-item { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px; border-radius: 10px; color: var(--text); text-decoration: none !important; }
.notif-item:hover { background: var(--surface-2); }
.notif-item b { display: block; font-size: 13.5px; }
.notif-item span { font-size: 12.5px; color: var(--muted); }
.tile-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--red-50); color: var(--red); flex: none; }
.tile-icon.warn { background: var(--warn-bg); color: var(--warn); }
.tile-icon.info { background: var(--info-bg); color: var(--info); }
.tile-icon.ok { background: var(--ok-bg); color: var(--ok); }

.page { padding: 20px 16px 8px; max-width: 1360px; margin: 0 auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.page-head h1 { font-size: 24px; font-weight: 800; }
.page-head .sub { color: var(--muted); margin-top: 4px; font-size: 14px; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 13.5px; margin-bottom: 12px; }
.back:hover { color: var(--text); text-decoration: none; }

.bottom-nav { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; height: var(--bottomnav-h); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.bottom-nav a, .bottom-nav button { display: grid; justify-items: center; align-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); background: none; border: 0; text-decoration: none !important; cursor: pointer; position: relative; }
.bottom-nav .active { color: var(--red); }
.bottom-nav .active::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--red); }

@media (min-width: 1000px) {
  .sidebar { transform: none; box-shadow: none; width: var(--sidebar-w); }
  .scrim, .bottom-nav, .topbar .menu-btn, .topbar .mobile-logo { display: none !important; }
  .main { margin-left: var(--sidebar-w); padding-bottom: 32px; }
  .topbar { padding: 0 28px; }
  .search { display: block; }
  .search .kbd { display: block; }
  .user-btn .who { display: block; }
  .page { padding: 28px 28px 12px; }
  .page-head h1 { font-size: 26px; }
}

/* ---------- dashboard ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { padding: 16px; display: grid; gap: 12px; align-content: start; }
.stat .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.stat .tile-icon { width: 42px; height: 42px; border-radius: 12px; }
.stat .num { font: 800 28px/1 var(--font-display); letter-spacing: -.02em; }
.stat .label { font-weight: 600; font-size: 13px; margin-top: 4px; }
.stat .cap { font-size: 12px; color: var(--muted); }
@media (min-width: 1100px) { .stats { gap: 16px; } .stat { padding: 18px; } }
.dash-grid { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 1100px) { .dash-grid.three { grid-template-columns: 1fr 1.7fr 1fr; } .dash-grid.releases { grid-template-columns: 1.7fr 1fr 1fr; } }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.donut { position: relative; width: 148px; height: 148px; }
.donut .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut .center b { font: 800 30px/1 var(--font-display); }
.donut .center span { font-size: 11.5px; color: var(--muted); }
.legend { display: grid; gap: 10px; font-size: 13px; }
.legend div { display: flex; align-items: center; gap: 8px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; }
.chart { position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; padding: 6px 10px; border-radius: 8px; transform: translate(-50%, -120%); white-space: nowrap; box-shadow: var(--shadow-lg); }
.sync-ok { display: flex; gap: 12px; align-items: center; }
.sync-badge { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); flex: none; }
.sync-badge.bad { background: var(--bad-bg); color: var(--bad); }
.sync-badge.off { background: var(--surface-2); color: var(--faint); }
.pulse { position: relative; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--ok); opacity: 0; animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.85); opacity: .5; } 80%, 100% { transform: scale(1.25); opacity: 0; } }
.activity { list-style: none; margin: 0; padding: 0; display: grid; }
.activity li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.activity li:last-child { border: 0; }
.activity b { display: block; font-size: 13.5px; font-weight: 600; }
.activity span { font-size: 12.5px; color: var(--muted); }
.activity time { font-size: 12px; color: var(--faint); white-space: nowrap; }
.quick { display: grid; gap: 10px; grid-template-columns: 1fr; }
.quick a, .quick button { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; cursor: pointer; color: var(--text); text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .15s; }
.quick a:hover, .quick button:hover { border-color: var(--red); box-shadow: 0 6px 18px -10px rgba(215, 25, 32, .6); }
.quick b { font-size: 13.5px; display: block; }
.quick span { font-size: 12px; color: var(--muted); line-height: 1.35; }

/* ---------- apps ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.toolbar .grow { flex: 1 1 260px; min-width: 0; }
.apps-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .apps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .apps-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1500px) { .apps-grid { grid-template-columns: repeat(4, 1fr); } }
.app-card { display: grid; gap: 14px; padding: 18px; align-content: start; color: var(--text); text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .15s; cursor: pointer; }
.app-card:hover { border-color: var(--line-2); box-shadow: 0 10px 26px -14px rgba(16, 24, 40, .35); transform: translateY(-1px); }
.app-card.archived { opacity: .65; }
.app-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex: none; box-shadow: inset 0 -8px 14px rgba(0, 0, 0, .14), 0 4px 10px -4px var(--c, #D71920); background: var(--c, #D71920); }
.app-icon.lg { width: 64px; height: 64px; border-radius: 18px; }
.app-icon.lg .icon { width: 30px; height: 30px; }
.app-icon.sm { width: 28px; height: 28px; border-radius: 8px; }
.app-icon.sm .icon { width: 15px; height: 15px; }
.app-card h3 { font-size: 16px; font-weight: 700; }
.app-card .desc { color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.app-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line); }
.app-meta b { color: var(--text); font-weight: 700; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.table th:first-child { border-top-left-radius: 10px; } .table th:last-child { border-top-right-radius: 10px; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover td { background: var(--surface-2); }
.table .cell-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.table .cell-main b { display: block; font-weight: 600; }
.table .cell-main span { font-size: 12.5px; color: var(--muted); }
.table td.actions { text-align: right; white-space: nowrap; }
.table.compact td { padding: 9px 12px; }
@media (max-width: 719px) {
  .table.stack-m thead { display: none; }
  .table.stack-m, .table.stack-m tbody, .table.stack-m tr, .table.stack-m td { display: block; width: 100%; }
  .table.stack-m tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .table.stack-m tr:last-child { border: 0; }
  .table.stack-m td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 14px; align-items: center; text-align: right; }
  .table.stack-m td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; font-weight: 500; text-align: left; flex: none; }
  .table.stack-m td.primary { display: block; text-align: left; padding-bottom: 8px; }
  .table.stack-m td.primary::before { content: none; }
  .table.stack-m td.actions { justify-content: flex-end; padding-top: 10px; }
  .table.stack-m td.actions::before { content: none; }
}
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); flex-wrap: wrap; }

/* ---------- details ---------- */
.detail-head { display: grid; gap: 16px; padding: 20px; }
@media (min-width: 720px) { .detail-head { grid-template-columns: auto 1fr auto; align-items: center; } }
.detail-head h1 { font-size: 22px; font-weight: 800; }
.layout-2 { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1100px) { .layout-2 { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.timeline li:last-child { border: 0; }
.timeline .node { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); margin: 0 auto; }
.timeline .node.latest { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 4px var(--red-50); }
.file-row { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
@media (min-width: 640px) { .file-row { grid-template-columns: auto 1fr auto; align-items: center; } }
.file-ic { width: 42px; height: 42px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.hash { display: inline-flex; align-items: center; gap: 6px; font: 12px ui-monospace, Consolas, monospace; color: var(--muted); background: var(--surface-2); padding: 3px 8px; border-radius: 6px; cursor: pointer; border: 0; max-width: 100%; }
.hash:hover { color: var(--text); }
.dropzone { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 26px 16px; border: 2px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); cursor: pointer; transition: .15s; background: var(--surface-2); }
.dropzone:hover, .dropzone.over { border-color: var(--red); background: var(--red-50); color: var(--text); }
.progress { height: 8px; border-radius: 9px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--red); transition: width .15s; }
.prose { font-size: 14.5px; line-height: 1.65; }
.prose h1, .prose h2, .prose h3 { margin: 18px 0 8px; font-size: 16px; }
.prose h1 { font-size: 18px; }
.prose ul, .prose ol { padding-left: 22px; margin: 8px 0; }
.prose li { margin: 3px 0; }
.prose code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
.prose p { margin: 8px 0; }
.prose :first-child { margin-top: 0; }
.role-pick { display: grid; gap: 10px; }
.role-opt { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 14px; border: 1.5px solid var(--line-2); border-radius: 12px; cursor: pointer; background: var(--surface); transition: .12s; }
.role-opt:hover { border-color: var(--faint); }
.role-opt:has(input:checked) { border-color: var(--red); background: var(--red-50); }
.role-opt input { accent-color: var(--red); width: 18px; height: 18px; margin: 2px 0 0; }
.role-opt b { display: block; font-size: 14px; }
.role-opt span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 2px var(--surface); }
.swatch[aria-checked="true"] { border-color: var(--text); }
.icon-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.icon-pick button { height: 44px; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.icon-pick button[aria-checked="true"] { border-color: var(--red); color: var(--red); background: var(--red-50); }

/* ---------- states ---------- */
.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .ring { width: 64px; height: 64px; border-radius: 50%; background: var(--red-50); color: var(--red); display: grid; place-items: center; margin-bottom: 4px; }
.empty .ring .icon { width: 28px; height: 28px; }
.empty h3 { color: var(--text); font-size: 16px; }
.empty p { max-width: 42ch; }
.skeleton { background: linear-gradient(100deg, var(--line) 30%, var(--surface-2) 50%, var(--line) 70%); background-size: 300% 100%; animation: shimmer 1.4s linear infinite; border-radius: 8px; min-height: 14px; }
@keyframes shimmer { to { background-position: -150% 0; } }
.sk-card { height: 120px; border-radius: var(--radius); }
.full-center { min-height: 60vh; display: grid; place-items: center; }
.big-spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
.error-page { text-align: center; max-width: 440px; margin: 10vh auto; padding: 0 20px; display: grid; gap: 14px; justify-items: center; }
.error-page .big { font: 800 72px/1 var(--font-display); color: var(--red); letter-spacing: -.04em; }

/* ---------- overlay: modal / toast ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(8, 9, 12, .6); display: grid; align-items: end; justify-items: center; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-height: 92dvh; display: flex; flex-direction: column; background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg); animation: sheet .22s cubic-bezier(.2, .9, .3, 1); }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 4px; }
.modal-head h2 { font-size: 18px; font-weight: 800; }
.modal-body { padding: 12px 20px 8px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-foot .btn { flex: 1 1 auto; }
@media (min-width: 640px) {
  .overlay { align-items: center; padding: 24px; }
  .modal { max-width: 520px; border-radius: 18px; max-height: 88vh; }
  .modal.wide { max-width: 640px; }
  .modal-foot .btn { flex: none; }
}
.toasts { position: fixed; z-index: 200; left: 12px; right: 12px; bottom: calc(var(--bottomnav-h) + 14px + env(safe-area-inset-bottom)); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 460px; width: 100%; padding: 12px 14px; background: var(--ink); color: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: 13.5px; animation: toast-in .25s cubic-bezier(.2, .9, .3, 1); }
.toast.ok .icon:first-child { color: #4CD7A0; } .toast.bad .icon:first-child { color: #FF8A80; }
.toast button { margin-left: auto; background: none; border: 0; color: #C8CBD3; cursor: pointer; font-weight: 700; }
@keyframes toast-in { from { transform: translateY(14px); opacity: 0; } }
@media (min-width: 1000px) { .toasts { left: auto; right: 24px; bottom: 24px; justify-items: end; } }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn); font-size: 13.5px; margin-bottom: 16px; }
.banner.info { background: var(--info-bg); color: var(--info); }
.banner a, .banner button.link { color: inherit; font-weight: 700; text-decoration: underline; background: none; border: 0; cursor: pointer; padding: 0; }

@media print { .sidebar, .topbar, .bottom-nav, .btn, .toasts { display: none !important; } .main { margin: 0; } body { background: #fff; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- additions: skip link, mobile-only helpers, view focus ---------- */
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 300; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none !important; transition: top .15s; }
.skip-link:focus { top: 12px; }
.view { outline: none; }
@media (min-width: 1000px) { .only-mobile { display: none !important; } }
.avatar { color: #fff !important; }
.side-brand .logo-words .name { font-size: 19px; }
@media (max-width: 719px) { .toolbar .select, .toolbar input[type=date] { flex: 1 1 140px; max-width: none !important; } .page-head .actions { width: 100%; } .page-head .actions .btn { flex: 1 1 auto; } }
.mobile-logo .logo-words { display: none; }
.mobile-logo .logo-mark { width: 40px; height: 40px; }
.file-row { grid-template-columns: auto 1fr; align-items: start; }
.file-row > .row { grid-column: 1 / -1; }
@media (min-width: 640px) { .file-row { grid-template-columns: auto 1fr auto; align-items: center; } .file-row > .row { grid-column: auto; } }
.grid-2 { align-items: start; }

/* Company logo (image from trcgllc.com); sits on a white chip so it reads on dark panels too */
.logo-img { display: block; height: 40px; width: auto; max-width: 100%; object-fit: contain; background: #fff; border-radius: 9px; padding: 5px 11px; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.logo.lg .logo-img { height: 58px; border-radius: 12px; padding: 7px 16px; }
.side-brand .logo-img { height: 38px; }
.mobile-logo .logo-img { height: 34px; padding: 4px 9px; }
.brand-top .logo-img { height: 42px; }

/* Choice cards (radio) */
.choices { display: grid; gap: 10px; grid-template-columns: 1fr; margin-bottom: 14px; }
@media (min-width: 640px) { .choices { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; display: block; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 14px 14px 44px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.choice input { position: absolute; left: 14px; top: 16px; width: 18px; height: 18px; margin: 0; accent-color: var(--red); }
.choice:has(input:checked) { border-color: var(--red); background: color-mix(in srgb, var(--red) 6%, var(--surface)); }
.choice:has(input:focus-visible) { box-shadow: var(--focus); }
.choice-body { display: flex; gap: 10px; align-items: flex-start; }
.choice-body > svg { flex: none; margin-top: 2px; color: var(--red); }
.choice-body > span { display: grid; gap: 2px; }
.choice-body .muted { font-size: 13px; font-weight: 400; }
[hidden] { display: none !important; }

/* App assignment picker */
.app-pick { display: grid; gap: 6px; max-height: 220px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
@media (min-width: 640px) { .app-pick { grid-template-columns: 1fr 1fr; } }
.app-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; cursor: pointer; min-height: 44px; }
.app-opt:hover { background: var(--surface-2, rgba(0,0,0,.04)); }
.app-opt input { width: 18px; height: 18px; accent-color: var(--red); flex: none; margin: 0; }
.app-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* Logo refinements: the company logo is a white-background image, so it gets a clean white band instead of a floating chip */
.side-brand { background: #fff; padding: 16px 20px; border-bottom: 3px solid var(--red); }
.side-brand .logo-img { height: 44px; background: transparent; padding: 0; border-radius: 0; box-shadow: none; }
.mobile-logo .logo-img { height: 32px; background: transparent; padding: 0; border-radius: 0; box-shadow: none; }
.brand-top .logo-img { height: 46px; background: transparent; padding: 0; border-radius: 0; box-shadow: none; }
.logo.lg .logo-img { height: 64px; border-radius: 14px; padding: 12px 22px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.side-brand .logo.on-dark .the, .side-brand .logo.on-dark .group { color: var(--ink); }

/* Logo without its white background (no image editing needed):
   light surfaces: multiply makes the white vanish; dark surfaces: invert + hue-rotate flips the dark text to white, keeps red, then screen makes the black vanish. */
.side-brand { background: none; border-bottom: 0; padding: 22px 20px 18px; }
.logo-img, .side-brand .logo-img, .mobile-logo .logo-img, .brand-top .logo-img, .logo.lg .logo-img { background: transparent; padding: 0; border-radius: 0; box-shadow: none; mix-blend-mode: multiply; }
.logo.lg .logo-img { height: 60px; }
.logo.on-dark .logo-img, :root[data-theme="dark"] .logo-img { filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; }

/* notification centre */
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.link-btn { background: none; border: 0; padding: 4px 6px; color: var(--red); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; border-radius: 6px; }
.link-btn:hover { background: var(--surface-2); }
.notif-item.unread { background: color-mix(in srgb, var(--red) 6%, transparent); box-shadow: inset 3px 0 0 var(--red); }
.notif-item .when { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.notif-item .tile-icon.ok { background: color-mix(in srgb, #16a34a 14%, transparent); color: #16a34a; }
@media (max-width: 640px) { .pop-wrap .menu { position: fixed; left: 8px; right: 8px; top: 64px; min-width: 0 !important; max-height: 70vh; overflow: auto; } }
.sync-ok-text { display: flex; gap: 6px; align-items: flex-start; color: var(--ok); }
