/* server/public/admin.css - the MineIt admin dashboard. Light, readable on a
   phone outdoors, MineIt green as the accent. Desktop: a sidebar. Phone: a
   top bar and a bottom tab bar within thumb reach (Spec 11). No web fonts. */
:root {
  --bg: #f4f6f8; --card: #fff; --text: #0f172a; --muted: #64748b; --line: #e2e8f0; --line2: #cbd5e1;
  --brand: #16a34a; --brand-dark: #15803d; --brand-bg: #ecfdf3; --ink: #0f172a;
  --green: #15803d; --green-bg: #dcfce7; --yellow: #a16207; --yellow-bg: #fef3c7;
  --grey: #475569; --grey-bg: #e2e8f0; --red: #b91c1c; --red-bg: #fee2e2; --focus: #2563eb;
  --radius: 12px; --side: 240px; --t: .24s cubic-bezier(.4, 0, .2, 1);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 15px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.45; -webkit-text-size-adjust: 100%; }
a { color: var(--brand-dark); }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---- shell ---- */
.shell { min-height: 100vh; }
.side { position: fixed; inset: 0 auto 0 0; z-index: 6; width: var(--side); background: var(--ink); color: #cbd5e1; display: flex; flex-direction: column; padding: 18px 12px 14px; transition: width var(--t); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: #fff; white-space: nowrap; }
.side .brand { padding: 0 6px; height: 36px; }
.logo { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #22c55e, var(--brand-dark)); color: #fff; font-weight: 800; box-shadow: 0 2px 8px rgba(22,163,74,.35); }
.label { white-space: nowrap; overflow: hidden; transition: opacity var(--t), max-width var(--t); max-width: 180px; }

/* the brand, and the fold button at the right of it */
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-toggle { width: 34px; height: 34px; padding: 0; flex: none; border: 0; border-radius: 9px; background: transparent; color: #94a3b8; }
.side-toggle:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-toggle .ico { width: 20px; height: 20px; }

.side-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 28px; flex: 1; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 10px; color: #94a3b8; text-decoration: none; font-weight: 500; transition: background var(--t), color var(--t), gap var(--t), padding var(--t); }
.side-nav a .ico { width: 22px; height: 22px; flex: none; transition: transform .18s ease; }
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a:hover .ico { transform: translateX(2px); }
.side-nav a::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); transform: scaleY(0); transition: transform var(--t); }
.side-nav a.on { background: rgba(34,197,94,.14); color: #fff; }
.side-nav a.on .ico { color: #4ade80; }
.side-nav a.on::before { transform: scaleY(1); }

/* who is signed in, and Sign out, in one row */
.side-foot { display: flex; align-items: center; gap: 8px; height: 51px; padding: 12px 6px 0; border-top: 1px solid rgba(255,255,255,.08); }
.me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: #1e293b; color: #4ade80; font-weight: 700; border: 1px solid rgba(74,222,128,.35); }
.who b { display: block; color: #fff; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.who small { display: block; color: #94a3b8; font-size: 12px; }
.icon-btn { width: 36px; height: 36px; padding: 0; flex: none; background: transparent; border: 0; color: #94a3b8; border-radius: 9px; }
.icon-btn:hover { background: rgba(248,113,113,.12); color: #fca5a5; }
.icon-btn .ico { width: 20px; height: 20px; }

/* folded: icons only, names as tooltips */
.rail { --side: 76px; }
.rail .side .label { opacity: 0; max-width: 0; }
.rail .side .brand { gap: 0; padding: 0 10px; }
.rail .side-head { flex-direction: column; gap: 10px; }
.rail .side-nav a { gap: 0; padding: 0 15px; }
.rail .side-foot { flex-direction: column; height: auto; padding: 12px 0 0; }
.rail .me { flex: none; gap: 0; }
:where([data-tip]) { position: relative; }
.rail .side [data-tip]::after { content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%; transform: translate(-4px, -50%); background: var(--ink); color: #fff; font-size: 13px; font-weight: 500; padding: 6px 10px; border-radius: 8px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s, transform .15s; box-shadow: 0 4px 14px rgba(15,23,42,.25); z-index: 10; }
.rail .side [data-tip]:hover::after, .rail .side [data-tip]:focus-visible::after { opacity: 1; transform: translate(0, -50%); }

.content { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; transition: margin-left var(--t); }
.has-shell .content { margin-left: var(--side); }
.topbar { display: none; }
.menu-btn, .scrim { display: none; }
main { flex: 1; width: 100%; max-width: 1600px; margin: 0 auto; padding: 28px 40px 48px; }
/* the footer: at the bottom of the window on a short page, after the
   content on a long one. Across the whole page, and as tall as the
   sidebar's account row (51px, and the sidebar's 14px below it), so its
   line and its text sit level with the line and the name beside it. */
.site-foot { width: 100%; min-height: 65px; padding: 0 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; color: var(--muted); font-size: 13px; }
.site-foot .foot-sep { color: var(--line2); }
main > * { animation: rise .22s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- pages ---- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 24px; margin: 0; letter-spacing: -.01em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
h2 { font-size: 17px; margin: 0 0 4px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.card > p:first-of-type { margin-top: 4px; }
.hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

/* ---- modals ---- */
.modal { border: 0; padding: 0; background: transparent; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: visible; color: var(--text); }
.modal::backdrop { background: rgba(15,23,42,.5); backdrop-filter: blur(2px); animation: fade .2s ease-out; }
.modal[open] { animation: pop .22s cubic-bezier(.2, .9, .3, 1.2); }
.modal-box { background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(15,23,42,.3); max-height: calc(100vh - 32px); overflow: auto; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 0 24px; }
.modal-head h2 { font-size: 19px; margin: 4px 0 0; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.modal-x { color: var(--muted); margin-right: -4px; }
.modal-x:hover { background: #f1f5f9; color: var(--text); }
.modal-body { padding: 4px 24px 24px; }
.modal-text { margin: 12px 0 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
button.primary.danger-fill { background: var(--red); border-color: var(--red); }
button.primary.danger-fill:hover { background: #991b1b; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

main > .card.narrow, .card.narrow { max-width: 560px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }

/* ---- sign-in pages ---- */
.auth { min-height: calc(100vh - 120px); display: grid; place-items: center; padding: 24px 16px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box .card { padding: 24px; }
.auth-box .brand { color: var(--text); justify-content: center; margin-bottom: 18px; font-size: 18px; }
.auth-box h1 { font-size: 22px; margin: 0 0 6px; }
.auth-box .sub { color: var(--muted); margin: 0 0 8px; }
.auth-links { margin-top: 18px; font-size: 14px; color: var(--muted); display: grid; gap: 6px; text-align: center; }

/* ---- forms ---- */
label.field { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=date], select, textarea { transition: border-color .15s, box-shadow .15s; width: 100%; height: 44px; padding: 0 12px; font-size: 16px; color: var(--text); border: 1px solid var(--line2); border-radius: 10px; background: #fff; }
input.invalid { border-color: var(--red); background: #fffafa; }
input.invalid:focus-visible { outline-color: var(--red); }
.field-error { color: var(--red); font-size: 13px; margin-top: 6px; }
.input { position: relative; }
.with-eye input { padding-right: 50px; }
.eye { position: absolute; right: 4px; top: 4px; width: 40px; height: 36px; padding: 0; border: 0; background: transparent; color: var(--muted); border-radius: 8px; }
.eye:hover { background: #f1f5f9; color: var(--text); }
.eye .ico { width: 20px; height: 20px; }
textarea:focus, select:focus, input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line2); border-radius: 10px; margin-top: 8px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-bg); }
.choice input { margin-top: 3px; accent-color: var(--brand); }
.choice b { display: block; font-size: 14px; }
.choice span { color: var(--muted); font-size: 13px; }
.check { display: flex; gap: 10px; align-items: center; margin-top: 16px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; align-items: center; }
.error { display: flex; gap: 8px; align-items: flex-start; color: var(--red); background: var(--red-bg); border: 1px solid #fecaca; border-radius: 10px; padding: 10px 12px; margin-top: 16px; font-size: 14px; animation: rise .2s ease-out; }
.error .ico { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.error + .form-actions, .error + .modal-actions { margin-top: 14px; }
.notice { background: var(--yellow-bg); color: #713f12; border-radius: 10px; padding: 12px 14px; font-size: 14px; margin: 12px 0; }

/* ---- buttons ---- */
button { transition: background .15s, border-color .15s, color .15s, transform .1s; font: inherit; cursor: pointer; border-radius: 10px; border: 1px solid var(--line2); background: #fff; color: var(--text); padding: 0 14px; height: 38px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
button:hover { background: #f8fafc; }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; height: 44px; padding: 0 18px; font-size: 15px; }
button.primary:hover { background: var(--brand-dark); }
button.primary:active:not(:disabled) { transform: scale(.98); }
.auth-box button.primary { width: 100%; }
button.danger { color: var(--red); border-color: #fecaca; }
button.danger:hover { background: var(--red-bg); }
button.ghost { background: transparent; }
button:disabled { opacity: .55; cursor: default; }
button[aria-busy] { opacity: .85; cursor: progress; }
.spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
button .ico { width: 18px; height: 18px; }

/* ---- secrets and codes ---- */
.secret { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.secret code { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 15px; background: #f8fafc; border: 1px dashed #94a3b8; border-radius: 10px; padding: 11px 12px; overflow-wrap: anywhere; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; list-style: none; padding: 0; margin: 14px 0 0; counter-reset: c; }
.codes li { font-family: ui-monospace, Consolas, monospace; font-size: 15px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; counter-increment: c; }
.codes li::before { content: counter(c) "."; color: var(--muted); margin-right: 8px; display: inline-block; width: 1.6em; }

/* ---- licences: status tabs, attention chips, list ---- */
.tabs-status { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs-status::-webkit-scrollbar { display: none; }
.tab-s { height: 42px; border: 0; border-radius: 0; background: none; padding: 0 14px; color: var(--muted); font-weight: 600; position: relative; gap: 8px; }
.tab-s:hover { background: none; color: var(--text); }
.tab-s b { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--grey-bg); color: var(--grey); transition: background .15s, color .15s; }
.tab-s::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); transform: scaleX(0); transition: transform var(--t); }
.tab-s.on { color: var(--text); }
.tab-s.on::after { transform: scaleX(1); }
.tab-s.on b { background: var(--brand); color: #fff; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chips:empty { display: none; }
.chip { height: 32px; border-radius: 999px; padding: 0 12px; font-size: 13px; font-weight: 600; gap: 6px; }
.chip .ico { width: 16px; height: 16px; }
.chip.c-overdue { color: var(--red); border-color: #fecaca; background: #fff5f5; }
.chip.c-trial_ending { color: #92400e; border-color: #fde68a; background: #fffbeb; }
.chip.c-addons_active { color: #6d28d9; border-color: #ddd6fe; background: #faf5ff; }
.chip.on { color: #fff; border-color: transparent; }
.chip.c-overdue.on { background: var(--red); } .chip.c-trial_ending.on { background: #d97706; } .chip.c-addons_active.on { background: #7c3aed; }

.list-card { padding: 0; overflow: hidden; }
.list-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1 1 260px; }
.search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search input { padding-left: 38px; height: 40px; background: #f8fafc; }
.search input:focus { background: #fff; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
select { width: auto; min-width: 128px; height: 40px; padding: 0 32px 0 12px; appearance: none; cursor: pointer; font: inherit; font-size: 14px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }

select:hover { border-color: #94a3b8; }

/* The open list. Where the browser lets a page style it (Chrome and Edge
   135+, appearance: base-select) it is a MineIt card: rounded, a soft
   shadow, the chosen line in green with a tick. Elsewhere the browser's
   own list shows, with the same closed box. */
@supports (appearance: base-select) {
  select, ::picker(select) { appearance: base-select; }
  select { display: inline-flex; align-items: center; }
  select::picker-icon { display: none; }
  ::picker(select) { margin-top: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
    box-shadow: 0 12px 32px rgba(15,23,42,.14), 0 2px 6px rgba(15,23,42,.06); min-width: anchor-size(width); max-height: 320px; overflow: auto;
    opacity: 0; transform: translateY(-4px); transition: opacity .14s, transform .14s, overlay .14s allow-discrete, display .14s allow-discrete; }
  ::picker(select):popover-open { opacity: 1; transform: none; }
  @starting-style { ::picker(select):popover-open { opacity: 0; transform: translateY(-4px); } }
  select option { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px; border-radius: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
  select option::checkmark { order: 1; margin-left: auto; content: "\2713"; color: var(--brand); font-weight: 700; }
  select option:hover, select option:focus-visible { background: #f1f5f9; outline: none; }
  select option:checked { background: var(--brand-bg); color: var(--brand-dark); font-weight: 600; }
  select option:disabled { color: var(--muted); cursor: default; }
}

#list { transition: opacity .15s; }
#list.loading { opacity: .5; }
.licences th { background: #fff; padding: 12px 16px; white-space: nowrap; }
.licences td { padding: 14px 16px; font-size: 14px; }
.licences tbody tr { cursor: pointer; transition: background .12s; }
.licences tbody tr:hover, .licences tbody tr:focus-visible { background: #f8fafc; outline: none; }
.licences tbody tr:hover .c-go .ico { transform: translateX(3px); color: var(--text); }
.who2 { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who2 > div { min-width: 0; }
.who2 b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who2 code, .key-line code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--muted); letter-spacing: .03em; white-space: nowrap; }
.av { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; font-weight: 700; font-size: 15px; }
.av.big { width: 56px; height: 56px; border-radius: 14px; font-size: 24px; }
.av.h0 { background: #dcfce7; color: #15803d; } .av.h1 { background: #e0f2fe; color: #0369a1; } .av.h2 { background: #ede9fe; color: #6d28d9; }
.av.h3 { background: #ffedd5; color: #c2410c; } .av.h4 { background: #fce7f3; color: #be185d; } .av.h5 { background: #ccfbf1; color: #0f766e; }
.av.h6 { background: #fef9c3; color: #a16207; } .av.h7 { background: #e0e7ff; color: #4338ca; }
.licences .page { display: inline-block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; color: var(--grey); }
.licences td.c-plan span { display: block; }
.addon { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; }
.addon::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; margin-right: 6px; vertical-align: 1px; }
.addon.a-active { color: #6d28d9; } .addon.a-active::before { background: #8b5cf6; }
.addon.a-expired { color: #b45309; } .addon.a-expired::before { background: #f59e0b; }
.when2 { white-space: nowrap; }
.when2 small { display: block; font-size: 12px; color: var(--muted); }
.when2.bad span, .when2.bad small { color: var(--red); } .when2.bad span { font-weight: 600; }
.when2.warn span, .when2.warn small { color: #b45309; } .when2.warn span { font-weight: 600; }
.licences td.c-seen { white-space: nowrap; color: var(--grey); }
.licences .c-go { width: 1%; padding-left: 0; color: var(--line2); }
.c-go .ico { width: 18px; height: 18px; transition: transform .15s, color .15s; }
tr.row-overdue td:first-child { box-shadow: inset 3px 0 0 var(--red); }
tr.row-trial td:first-child { box-shadow: inset 3px 0 0 #f59e0b; }
.pill.s-active { background: var(--green-bg); color: var(--green); }
.pill.s-trial { background: var(--yellow-bg); color: var(--yellow); }
.pill.s-suspended { background: var(--grey-bg); color: var(--grey); }
.pill.s-revoked { background: var(--red-bg); color: var(--red); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.pager > span { display: flex; gap: 12px; align-items: center; }
.pager > div { display: flex; gap: 8px; }
.pg { display: flex; align-items: center; gap: 6px; }
.pg-nums { display: flex; align-items: center; gap: 4px; }
.pg button { height: 36px; border-radius: 9px; font-size: 14px; }
.pg-num { min-width: 36px; padding: 0 8px; border-color: transparent; background: transparent; color: var(--grey); font-weight: 600; font-variant-numeric: tabular-nums; }
.pg-num:hover { background: #f1f5f9; border-color: transparent; color: var(--text); }
.pg-num[aria-current=page], .pg-num[aria-current=page]:hover { background: var(--brand); border-color: var(--brand); color: #fff; cursor: default; }
.pg-end { padding: 0 12px; gap: 4px; }
.pg-end .ico { width: 16px; height: 16px; }
.pg-end:disabled { opacity: .45; cursor: default; background: #fff; }
.pg-gap { color: var(--muted); padding: 0 2px; letter-spacing: .05em; }
.pg-of { display: none; color: var(--muted); font-size: 13px; white-space: nowrap; }
button.linkish { height: auto; padding: 0; border: 0; background: none; color: var(--brand-dark); text-decoration: underline; font-weight: 600; }
.list-card .empty p { margin: 0 0 12px; }

/* ---- one licence ---- */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.back .ico { width: 18px; height: 18px; transition: transform .15s; }
.back:hover { color: var(--text); } .back:hover .ico { transform: translateX(-3px); }
.hero { padding: 24px; }
.hero-top { display: flex; align-items: center; gap: 16px; }
.hero-name { flex: 1; min-width: 0; }
.hero-name h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; }
.key-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.key-line code { font-size: 14px; color: var(--grey); }
.hero-status .pill { font-size: 13px; padding: 5px 12px; }
button.small { height: 28px; padding: 0 10px; font-size: 12px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.tile { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.tile small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.tile b { display: block; font-size: 16px; margin: 4px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.bad { background: #fff5f5; border-color: #fecaca; } .tile.bad b, .tile.bad span { color: var(--red); }
.tile.warn { background: #fffbeb; border-color: #fde68a; } .tile.warn b, .tile.warn span { color: #b45309; }
.tile.a-active span { color: #6d28d9; } .tile.a-expired span { color: #b45309; }
.split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.row2 { display: grid; grid-template-columns: 20px 140px 1fr; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.row2:last-child { border-bottom: 0; padding-bottom: 0; }
.card h2 + .row2 { margin-top: 6px; }
.row2 .ico { width: 18px; height: 18px; color: var(--muted); }
.row2 .k { color: var(--muted); }
.row2 .v { font-weight: 500; overflow-wrap: anywhere; }
.notes { white-space: pre-wrap; margin: 10px 0 0; }
.seg { display: flex; gap: 4px; background: #f1f5f9; border-radius: 10px; padding: 4px; margin: 12px 0 6px; }
.seg button { flex: 1; min-width: 0; padding: 0 6px; height: 34px; border: 0; background: none; font-size: 13px; color: var(--muted); border-radius: 8px; }
.seg button small { font-weight: 600; color: var(--muted); margin-left: 2px; }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.feed { list-style: none; margin: 0; padding: 0; animation: rise .2s ease-out; }
.feed li { display: flex; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.feed .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-bg); }
.feed .dot.warn { background: #f59e0b; box-shadow: 0 0 0 3px #fef3c7; }
.feed .dot.info { background: #3b82f6; box-shadow: 0 0 0 3px #dbeafe; }
.feed b { display: block; font-size: 14px; font-weight: 600; }
.feed span { font-size: 13px; color: var(--muted); }
.tab-panel { max-height: 560px; overflow-y: auto; }
.feed-empty { padding: 14px 2px; margin: 0; }
.alert { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; margin: 18px 0 0; font-weight: 500; font-size: 14px; }
.hero .alert + .tiles { margin-top: 12px; }
.alert .ico { width: 20px; height: 20px; flex: none; }
.alert.bad { background: var(--red-bg); color: var(--red); }
.alert.warn { background: var(--yellow-bg); color: #92400e; }

@media (max-width: 1180px) {
  .licences .c-page { display: none; }
}
@media (max-width: 1000px) {
  .licences .c-seen { display: none; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- licence actions ---- */
.actions-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 16px; }
.act { height: 40px; padding: 0 14px; gap: 8px; background: #fff; }
.act .ico { width: 18px; height: 18px; color: var(--muted); }
.act:hover .ico { color: var(--text); }
.act.go { background: var(--brand); border-color: var(--brand); color: #fff; }
.act.go .ico { color: #fff; }
.act.go:hover { background: var(--brand-dark); }
.act.danger { color: var(--red); border-color: #fecaca; }
.act.danger .ico { color: var(--red); }
.act.danger:hover { background: var(--red-bg); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
textarea { width: 100%; height: auto; min-height: 84px; padding: 10px 12px; font: inherit; font-size: 15px; resize: vertical; line-height: 1.45; }
.choices3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choices4 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.choices3 .choice, .choices4 .choice { margin-top: 0; }
.choices4 .choice { padding: 10px; align-items: center; }
.two { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; }
.two select { width: 100%; }
.check.switch { margin: 0 0 10px; font-weight: 600; }
.other-days { margin-top: 10px; }
.big-key { margin: 18px 0 6px; }
.big-key code { font-size: 20px; text-align: center; letter-spacing: .06em; font-weight: 600; border-style: solid; border-color: var(--brand); background: var(--brand-bg); color: var(--text); }

/* ---- payment groups ---- */
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.groups .card { margin: 0; }
.group-top { display: flex; align-items: flex-start; gap: 12px; }
.cal { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--brand-bg); color: var(--brand-dark); }
.cal .ico { width: 22px; height: 22px; }
.group-name { flex: 1; min-width: 0; }
.group-name h2 { margin: 2px 0 2px; }
.group-name p { margin: 0; color: var(--muted); font-size: 14px; }
.group-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.group-stats > div { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.group-stats small { display: block; font-size: 12px; color: var(--muted); }
.group-stats b { font-size: 15px; white-space: nowrap; }
.group-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.group-foot button { height: 34px; font-size: 13px; }
.group-foot .ico { width: 16px; height: 16px; }
.group-stats .bad { background: #fff5f5; border-color: #fecaca; } .group-stats .bad b { color: var(--red); }
.sched { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sched select { min-width: 110px; }
.row-link { margin-left: 10px; }
.row-link .linkish { font-size: 13px; }
.act.pay { color: var(--brand-dark); border-color: #bbf7d0; }
.act.pay .ico { color: var(--brand-dark); }
.act.pay:hover { background: var(--brand-bg); }

/* ---- broadcast ---- */
.app-banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 10px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; font-size: 14px; margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.app-banner .ico { width: 20px; height: 20px; flex: none; color: #2563eb; }
.app-banner > span:nth-child(2) { flex: 1; }
.app-banner .x .ico { width: 16px; height: 16px; color: #93c5fd; }
.live { border-color: #86efac; box-shadow: 0 0 0 3px #dcfce7; }
.live h2 { display: flex; align-items: center; gap: 8px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 rgba(22,163,74,.5); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.45); } 70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.live .meta { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.live .card-head button { height: 34px; font-size: 13px; }
.none-live { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.none-live .ico { width: 20px; height: 20px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.count { font-size: 12px; color: var(--muted); }
.count.near { color: #b45309; font-weight: 600; }
.pick-box { margin-top: 10px; }
.pick-box .search input { height: 40px; }
.results { display: grid; gap: 4px; margin-top: 6px; }
.result { justify-content: flex-start; gap: 10px; height: 40px; font-weight: 500; background: #f8fafc; }
.result code { color: var(--muted); font-size: 12px; margin-right: auto; }
.picked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pick { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 999px; background: var(--brand-bg); border: 1px solid #bbf7d0; font-size: 13px; }
.pick code { color: var(--muted); font-size: 11px; }
.pick button { width: 24px; height: 24px; padding: 0; border: 0; background: none; border-radius: 50%; }
.pick button .ico { width: 14px; height: 14px; }
select[name=groupId] { margin-top: 10px; width: 100%; }

/* ---- audit log ---- */
.audit-tools { display: grid; grid-template-columns: 1.2fr 1fr 180px auto auto; gap: 10px; align-items: center; }
.audit-tools .search { flex: none; min-width: 0; }
.audit-tools > * { min-width: 0; }
.audit-tools select { width: 100%; }
.date-f { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.date-f .dp-btn { width: 160px; }

/* ---- date picker ---- */
.dp { position: relative; }
.dp-btn { width: 100%; height: 44px; justify-content: flex-start; gap: 8px; padding: 0 12px; border-radius: 10px; border-color: var(--line2); font-weight: 500; font-size: 15px; color: var(--text); }
.dp-btn:hover { border-color: #94a3b8; background: #fff; }
.dp-btn[aria-expanded=true] { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.dp-btn .ico { width: 18px; height: 18px; color: var(--muted); flex: none; }
.dp-text { overflow: hidden; text-overflow: ellipsis; }
.list-tools .dp-btn { height: 40px; font-size: 14px; }
.dp-pop { position: fixed; inset: auto; margin: 0; width: min(296px, calc(100vw - 16px)); padding: 12px; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15,23,42,.16), 0 2px 6px rgba(15,23,42,.06); }
.dp-pop:popover-open { animation: pop .16s ease-out; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-head b { font-size: 15px; }
.dp-nav { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--muted); }
.dp-nav:hover { background: #f1f5f9; color: var(--text); }
.dp-nav .ico { width: 18px; height: 18px; }
.dp-week, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-week span { text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 4px 0 6px; }
.dp-day { height: 36px; padding: 0; border: 0; border-radius: 9px; background: transparent; font-weight: 500; font-size: 14px; color: var(--text); }
.dp-day:hover { background: #f1f5f9; }
.dp-day.out { color: #cbd5e1; }
.dp-day.today { box-shadow: inset 0 0 0 1.5px var(--brand); color: var(--brand-dark); font-weight: 700; }
.dp-day.sel, .dp-day.sel:hover { background: var(--brand); color: #fff; font-weight: 700; box-shadow: none; }
.dp-day:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.dp-foot .linkish { font-size: 14px; text-decoration: none; }
.dp-foot .linkish:hover { text-decoration: underline; }
.dp-foot .linkish:disabled { color: var(--muted); cursor: default; text-decoration: none; }
#audit { transition: opacity .15s; }
#audit.loading { opacity: .5; }
.audit-day h3 { margin: 0; padding: 10px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #f8fafc; border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.audit { list-style: none; margin: 0; padding: 0; }
.audit li { display: grid; grid-template-columns: 70px 36px 1fr auto; gap: 12px; align-items: start; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.audit .at { color: var(--muted); font-size: 13px; padding-top: 8px; white-space: nowrap; }
.av.seller { background: #e0f2fe; color: #0369a1; }
.av.seller .ico { width: 18px; height: 18px; }
.audit .who { font-weight: 600; font-size: 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.audit .what p { margin: 2px 0 0; font-size: 14px; color: var(--grey); overflow-wrap: anywhere; }
.tag-s, .tag-d { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.tag-s { background: #e0f2fe; color: #0369a1; }
.tag-d { background: var(--grey-bg); color: var(--grey); }
.key-chip { font-family: ui-monospace, Consolas, monospace; font-size: 12px; padding: 4px 8px; border-radius: 6px; background: #f1f5f9; color: var(--text); text-decoration: none; white-space: nowrap; margin-top: 6px; }
.key-chip:hover { background: var(--brand-bg); color: var(--brand-dark); }
@media (max-width: 1100px) {
  .audit-tools { grid-template-columns: 1fr 1fr; }
  .date-f .dp { flex: 1; }
  .date-f .dp-btn { width: 100%; }
}

/* ---- toasts ---- */
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; flex-direction: column; gap: 8px; width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 12px 10px 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(15,23,42,.16), 0 2px 6px rgba(15,23,42,.06); font-size: 14px; font-weight: 500; color: var(--text); animation: toast-in .24s cubic-bezier(.2, .9, .3, 1.15); position: relative; overflow: hidden; }
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--brand); transform-origin: left; animation: toast-time 5s linear forwards; opacity: .5; }
.toast.bad::after { background: var(--red); animation-duration: 10s; }
.toast.leaving { animation: toast-out .18s ease-in forwards; }
.toast-ico { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--green-bg); color: var(--green); }
.toast.bad .toast-ico { background: var(--red-bg); color: var(--red); }
.toast-ico .ico { width: 16px; height: 16px; }
.toast-text { flex: 1; padding-top: 2px; line-height: 1.4; }
.toast-x { width: 28px; height: 28px; padding: 0; flex: none; border: 0; background: none; color: var(--muted); border-radius: 8px; }
.toast-x:hover { background: #f1f5f9; color: var(--text); }
.toast-x .ico { width: 16px; height: 16px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(16px); } }
@keyframes toast-time { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---- table ---- */
.list { padding: 0; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #f8fafc; }
td.person b { display: block; font-weight: 600; }
td.person span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
td.when { color: var(--muted); font-size: 14px; white-space: nowrap; }
th.actions, td.actions { text-align: right; }
.row-actions { display: inline-flex; flex-wrap: nowrap; gap: 6px; justify-content: flex-end; }
.row-actions button { height: 34px; padding: 0 11px; font-size: 13px; }
td.actions { width: 1%; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.active { background: var(--green-bg); color: var(--green); }
.pill.disabled { background: var(--grey-bg); color: var(--grey); }
.pill.pending { background: var(--yellow-bg); color: var(--yellow); }
.role { font-size: 13px; color: var(--muted); }
.you { color: var(--muted); font-size: 13px; }

/* ---- phone ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .spin { animation: spin 1.4s linear infinite !important; }
}

@media (max-width: 760px) {
  .has-shell .content { margin-left: 0; }
  /* the sidebar becomes a drawer over the page */
  .side { width: min(300px, 86vw); transform: translateX(-102%); transition: transform .26s cubic-bezier(.2, .8, .3, 1), box-shadow .26s; z-index: 70; box-shadow: none; padding-top: max(18px, env(safe-area-inset-top)); }
  .drawer-open .side { transform: none; box-shadow: 0 0 40px rgba(15,23,42,.35); }
  .side-toggle { display: none; }
  .rail .side .label { opacity: 1; max-width: 200px; }
  .rail .side .brand { gap: 10px; padding: 0 6px; }
  .rail .side-head { flex-direction: row; }
  .rail .side-nav a { gap: 12px; padding: 0 12px; }
  .rail .side-foot { flex-direction: row; padding: 12px 6px 0; }
  .rail .me { flex: 1; gap: 10px; }
  .rail .side [data-tip]::after { display: none; }
  .side-nav a { height: 48px; }
  .has-shell .scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(15,23,42,.45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .drawer-open .scrim { opacity: 1; pointer-events: auto; }
  .drawer-open { overflow: hidden; }
  .rail { --side: 0px; }
  .has-shell .topbar { display: flex; position: sticky; top: 0; z-index: 5; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; padding-top: max(8px, env(safe-area-inset-top)); background: var(--ink); }
  .topbar .brand { flex: 1; min-width: 0; font-size: 16px; }
  .topbar .brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .logo { width: 28px; height: 28px; font-size: 14px; }
  .has-shell .menu-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; background: none; color: #fff; border-radius: 10px; }
  .menu-btn:hover, .menu-btn:active { background: rgba(255,255,255,.08); }
  .menu-btn .ico { width: 24px; height: 24px; }
  .topbar .signout { color: #e2e8f0; border-color: rgba(255,255,255,.25); height: 34px; }
  main { padding: 20px 16px 32px; }
  .site-foot { min-height: 0; padding: 16px 16px max(18px, env(safe-area-inset-bottom)); }
  .toasts { right: 16px; left: 16px; width: auto; bottom: 16px; }
  .toasts { bottom: max(16px, env(safe-area-inset-bottom)); }
  @keyframes toast-out { to { opacity: 0; transform: translateY(12px); } }
  .page-head h1 { font-size: 21px; }
  .page-head .primary { width: 100%; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tbody tr { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; }
  tbody tr:last-child { border-bottom: 0; }
  td { border: 0; padding: 0; }
  td.person { grid-column: 1; }
  td.status { grid-column: 2; grid-row: 1; text-align: right; }
  td.role-cell, td.when { grid-column: 1 / -1; font-size: 13px; }
  td.when::before { content: "Last sign-in: "; }
  td.actions { grid-column: 1 / -1; text-align: left; margin-top: 6px; }
  .row-actions { justify-content: flex-start; flex-wrap: wrap; }
  td.actions { width: 100%; white-space: normal; }
  .row-actions button { height: 38px; font-size: 14px; }
  .codes { grid-template-columns: 1fr; }
  .tabs-status { margin: 0 -16px 12px; padding: 0 12px; }
  .tab-s { padding: 0 10px; flex: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .list-tools { padding: 12px; }
  .search { flex: 1 1 100%; }
  .filters { display: grid; grid-template-columns: 1fr 1fr 1fr; width: 100%; }
  select { width: 100%; min-width: 0; padding-right: 26px; background-position: right 6px center; font-size: 13px; }
  .licences tbody tr { grid-template-columns: 1fr auto; gap: 8px 12px; padding: 14px 14px; }
  .licences td { padding: 0; }
  .licences td.seller { grid-column: 1; }
  .licences td.c-status { grid-column: 2; grid-row: 1; }
  .licences .c-page, .licences .c-seen, .licences .c-go { display: none; }
  .licences td.c-plan { grid-column: 1; padding-left: 48px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
  .licences td.c-plan span { display: inline; font-size: 13px; color: var(--grey); }
  .licences td.c-date { grid-column: 2; text-align: right; }
  .licences td.c-date:has(.muted) { visibility: hidden; }
  .when2 small { font-size: 11px; }
  .pager { padding: 12px 14px; }
  .pg { width: 100%; justify-content: space-between; }
  .pg-nums { display: none; }
  .pg-of { display: inline; }
  .pg-end span { display: none; }
  .pg-end { width: 40px; padding: 0; }
  .hero { padding: 18px; }
  .hero-top { flex-wrap: wrap; }
  .hero-status { width: 100%; order: 3; }
  .av.big { width: 48px; height: 48px; font-size: 20px; }
  .hero-name h1 { font-size: 19px; }
  .tiles { gap: 8px; }
  .row2 { grid-template-columns: 18px auto 1fr; gap: 10px; padding: 12px 0; }
  .row2 .v { text-align: right; }
  .card h2 { font-size: 16px; }
  .modal { width: 100vw; max-width: 100vw; margin: auto 0 0; max-height: 92vh; }
  .modal[open] { animation: sheet .26s cubic-bezier(.2, .8, .3, 1); }
  .modal-box { border-radius: 18px 18px 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom); }
  .modal-actions { flex-direction: column-reverse; }
  .actions-bar { display: grid; grid-template-columns: 1fr 1fr; }
  .act { justify-content: flex-start; }
  .choices3 { grid-template-columns: 1fr; }
  .groups { grid-template-columns: 1fr; }
  .group-foot button { flex: 1; }
  .audit li { grid-template-columns: 36px 1fr; gap: 4px 12px; }
  .audit .at { grid-column: 2; grid-row: 2; padding-top: 0; font-size: 12px; }
  .audit li > .av { grid-row: 1 / span 3; }
  .audit .key-chip { grid-column: 2; justify-self: start; margin-top: 2px; }
  .audit-tools .search, .audit-tools select { grid-column: 1 / -1; }
  .date-f { flex-direction: column; align-items: stretch; gap: 4px; }
  .date-f .dp-btn { width: 100%; min-width: 0; }
  .choices4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modal-actions button { width: 100%; }
}
