/* opia look & feel: Readex Pro, opia navy (#122E52) + opia violet (#8484EB),
   soft lavender backgrounds, rounded cards. */
:root {
  --navy: #122e52;       /* opiaDarkBlue */
  --navy-deep: #0d2240;
  --accent: #8484eb;     /* opia violet (Events capsule) */
  --accent-soft: #b5b5fc;
  --lav: #ededf9;        /* light lavender app background */
  --lav-2: #e3e3f4;
  --card: #ffffff;
  --border: #e4e4f1;
  --ink: #122e52;
  --muted: #6f7390;
  --ok: #1f9d57;
  --err: #d23b3b;
  --amber: #ffd76c;
  --radius: 16px;
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Readex Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--lav);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
.tiny { font-size: 12px; }
.error { color: var(--err); font-size: 13px; min-height: 1em; margin: 8px 0 0; }

/* Brand wordmark / logo */
.brand { display: flex; align-items: baseline; gap: 8px; font-weight: 700; font-size: 22px; color: #fff; letter-spacing: -0.5px; }
.brand span { color: var(--accent-soft); font-weight: 500; font-size: 14px; text-transform: lowercase; }
.brand-sub { margin: 10px 0 22px; color: var(--muted); font-weight: 500; letter-spacing: 2px; text-transform: uppercase; font-size: 12px; }

/* opia logo (navy SVG). Invert to white on the dark sidebar. */
.logo { display: block; height: 26px; width: auto; }
.logo--lg { height: 52px; margin: 4px auto 2px; }
/* Spotlight mark above the wordmark on the login card; beams are animated. */
.mark { width: 84px; height: 84px; margin: -4px auto 6px; }
.mark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.mark .beam { transition: opacity .12s linear; }
.logo--white { height: 24px; filter: brightness(0) invert(1); }

/* Buttons */
.btn {
  font: inherit; font-weight: 600; cursor: pointer; border: none;
  border-radius: 11px; padding: 11px 18px; background: var(--navy); color: #fff;
  transition: transform .04s ease, opacity .15s ease;
}
.btn:hover { opacity: 0.92; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--accent); }
.btn.block { width: 100%; }
.link { background: none; border: none; cursor: pointer; color: var(--accent); padding: 8px 4px; font: inherit; font-weight: 600; text-decoration: underline; }
.link.light { color: var(--accent-soft); }

/* Inputs */
label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 5px; }
input, select, textarea {
  width: 100%; font: inherit; padding: 11px 13px;
  border: 1.5px solid var(--border); border-radius: 11px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { min-height: 140px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

/* ---- Login ---- */
.login-view {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 50% -10%, #f6f6fd 0%, var(--lav) 60%);
  padding: 24px; position: relative; overflow: hidden;
}
/* Point cloud behind the card; the card gets a frosted look so dots passing
   behind it read as depth rather than clutter. */
.login-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.login-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 380px; background: rgba(255, 255, 255, 0.36);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 22px; padding: 32px;
  box-shadow: 0 18px 50px rgba(18, 46, 82, 0.10);
  text-align: center;
}

/* Now playing — quiet pill in the corner */
.now-playing {
  position: fixed; left: 18px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.7); box-shadow: 0 6px 20px rgba(18, 46, 82, 0.08);
  font-size: 12px; color: var(--ink); max-width: calc(100vw - 36px);
  transition: opacity .6s ease;
}
.np-toggle {
  width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--navy); color: #fff; font-size: 10px; display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.np-toggle:hover { background: var(--accent); }
.np-next { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; padding: 4px 2px; flex-shrink: 0; }
.np-next:hover { color: var(--accent); }
@media (pointer: coarse) {
  .np-toggle { width: 38px; height: 38px; font-size: 12px; }
  .np-cover { width: 38px; height: 38px; }
}
.np-cover { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }

/* In the sidebar after signing in: flows with the nav instead of floating, and
   wears the dark surface. */
/* Full column width — the sidebar already provides the gutter. */
.nav-player { padding: 0; }
.now-playing--nav {
  position: static; width: 100%; max-width: none; margin: 0 0 10px;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
/* 248px of sidebar does not fit art as well as a readable title; the cover
   stays on the login screen, where there is room. */
.now-playing--nav .np-cover { display: none; }
.now-playing--nav .np-text span { color: var(--accent-soft); }
.now-playing--nav .np-toggle { background: var(--accent); }
.now-playing--nav .np-toggle:hover { background: var(--accent-soft); color: var(--navy); }
.now-playing--nav .np-next { color: var(--accent-soft); }
.now-playing--nav .np-next:hover { color: #fff; }
.np-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.np-text b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-text span { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-card form { text-align: left; }
.login-card input, .login-card select { background: rgba(255, 255, 255, 0.62); }
.login-card .btn { margin-top: 18px; }
.login-card .muted { margin-top: 16px; text-align: center; }
/* Second sign-in step: 2FA code, set-up, recovery codes */
.step { text-align: left; }
.step-title { margin: 0 0 6px; font-size: 16px; text-align: center; }
.step-lead { margin: 0 0 12px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.step-list { margin: 0 0 12px; padding-left: 20px; font-size: 13px; line-height: 1.45; }
.step-links { display: flex; justify-content: space-between; margin-top: 4px; }
.step-links .link { font-size: 13px; }
.step-actions { display: flex; gap: 8px; margin-top: 12px; }
.step-actions .btn { flex: 1; margin-top: 0; padding: 9px 12px; font-size: 13px; }
.step-check { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; }
.step-check input { width: auto; margin: 0; }
.code-input { font-size: 20px; letter-spacing: 3px; text-align: center; font-variant-numeric: tabular-nums; }
.totp-qr { display: block; width: 180px; height: 180px; margin: 4px auto 10px; border-radius: 10px; background: #fff; padding: 6px; }
.totp-key { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.totp-key summary { cursor: pointer; }
.totp-key code { display: block; margin-top: 6px; font-size: 13px; color: var(--ink); word-break: break-all; user-select: all; }
.recovery-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; margin: 0; padding-left: 22px; font-size: 14px; }
.recovery-codes code { font-variant-numeric: tabular-nums; user-select: all; }
.login-card .version { margin: 14px 0 0; text-align: center; font-size: 11px; color: var(--muted); opacity: 0.8; letter-spacing: 0.3px; font-variant-numeric: tabular-nums; }

/* ---- App shell ---- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--navy);
  color: #fff; display: flex; flex-direction: column; padding: 22px 16px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 6px 10px 18px; }
/* min-height: a long list scrolls inside the sidebar instead of pushing the
   player and Sign out off the screen. */
.nav { position: relative; display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; margin: 0 -4px; padding: 0 4px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  border-radius: 11px; color: #c7cee4; text-decoration: none; font-weight: 600; font-size: 14px;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active { background: var(--accent); color: #fff; }
.nav-item:focus-visible, .nav-group-head:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: -2px; }
.nav-icon { width: 18px; height: 18px; display: inline-flex; flex-shrink: 0; }
.nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Groups: a head that folds them (To do, Events, Profiles, System). */
.nav-group { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.nav-group-head {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 8px 5px 12px;
  border: none; border-radius: 9px; background: transparent; color: #9aa6c6;
  font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0.2px; text-align: left; cursor: pointer;
}
.nav-group-head:hover { background: rgba(255,255,255,0.05); color: #fff; }
.nav-group-head[aria-disabled="true"] { cursor: default; }
.nav-group-head[aria-disabled="true"]:hover { background: transparent; color: #9aa6c6; }
.nav-group-title { flex: 1; }
.nav-chevron { display: inline-flex; width: 14px; height: 14px; transition: transform 0.15s ease; }
.nav-chevron svg { width: 14px; height: 14px; }
.nav-group:not(.open) .nav-chevron { transform: rotate(-90deg); }
.nav-group-head[aria-disabled="true"] .nav-chevron { opacity: 0.35; }
.nav-group-items { display: flex; flex-direction: column; gap: 2px; }
.nav-group-items[hidden] { display: none; }
/* How many are open: reports, verification requests */
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  display: inline-grid; place-items: center; background: var(--err); color: #fff;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.nav-item.active .nav-badge { background: #fff; color: var(--accent); }
/* The group's sum: red while folded (the entries are out of sight), quiet
   while open (each entry shows its own). */
.nav-badge--sum { margin-left: 0; }
.nav-group.open .nav-badge--sum { background: rgba(255,255,255,0.14); color: #dfe4f3; }
/* phones: the menu is folded away, so the button says something is open */
.nav-toggle { position: relative; }
.nav-toggle.has-badge::after {
  content: ""; position: absolute; top: 5px; right: 4px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--err); box-shadow: 0 0 0 2px var(--navy);
}
.nav-icon svg { width: 18px; height: 18px; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 12px; }

/* Hamburger toggle — hidden on desktop, shown as the mobile menu button. */
.nav-toggle { display: none; border: none; background: transparent; cursor: pointer; padding: 8px; border-radius: 9px; }
.nav-toggle:hover { background: rgba(255,255,255,0.08); }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; }
.nav-toggle span + span { margin-top: 5px; }

/* A page's tabs (Drafts from MCP: Events | Profiles, Health: Health | Status) */
/* The line under the tabs is a shadow, so the active tab's underline covers it. */
.page-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: -6px 0 18px; box-shadow: inset 0 -1.5px 0 var(--border); }
.page-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px;
  border-bottom: 2.5px solid transparent; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap;
}
.page-tab:hover { color: var(--ink); }
.page-tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.page-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px 6px 0 0; }
.tab-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center;
  background: var(--err); color: #fff; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}

.content { flex: 1; min-width: 0; padding: 30px 36px; max-width: 1100px; } /* min-width: wide tables scroll in their .tablewrap instead of widening the page */
.topbar { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.topbar h2 { margin: 0; font-size: 26px; }
.topbar .muted { margin: 4px 0 0; }

/* ---- Cards / feature content ---- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
h3 { margin: 22px 0 8px; }

.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.field-row > label { flex: 1; min-width: 200px; }
.file input { padding: 9px; }
.actions { display: flex; gap: 12px; align-items: center; margin-top: 16px; flex-wrap: wrap; }

.help { margin: 4px 0 16px; font-size: 13px; background: var(--lav); border-radius: 12px; padding: 12px 14px; }
.help summary { cursor: pointer; font-weight: 700; }
.help ul { margin: 8px 0 4px; padding-left: 18px; }
.help li { margin: 3px 0; }
.help code { background: #fff; border: 1px solid var(--border); padding: 1px 6px; border-radius: 5px; }

/* Info panel: the summary reads as a button, the body explains each control
   using small replicas of the controls themselves. */
.help--info summary {
  display: inline-flex; align-items: center; gap: 7px; list-style: none;
  color: var(--accent); user-select: none;
}
.help--info summary::-webkit-details-marker { display: none; }
.help--info summary::after { content: "▾"; font-size: 15px; line-height: 1; transition: transform .15s ease; }
.help--info[open] summary::after { transform: rotate(180deg); }
.help--info[open] summary { margin-bottom: 4px; }
.help--info h4 {
  margin: 16px 0 8px; font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--muted);
}
.mod-lead { margin: 10px 0 2px; line-height: 1.5; }

/* The options, as a scannable grid: Content | Author, one line per button. */
.mod-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 4px 28px; }
.mod-grid section { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 2px 14px 10px; }
.mod-grid h4 { margin-top: 12px; }
.mod-opts { display: grid; grid-template-columns: max-content 1fr; gap: 9px 12px; align-items: center; margin: 0; }
.mod-opts dt { margin: 0; }
.mod-opts dd { margin: 0; line-height: 1.35; }

/* The fine print, one short line each. */
.mod-notes { list-style: none; padding: 0; margin: 0; }
.mod-notes li { position: relative; padding-left: 16px; margin: 7px 0; line-height: 1.45; }
.mod-notes li::before { content: ""; position: absolute; left: 3px; top: 0.6em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

@media (max-width: 640px) {
  .mod-grid { grid-template-columns: 1fr; gap: 10px; }
}

/* A label-sized copy of a control, so the help points at what is on screen. */
.chip {
  display: inline-block; padding: 1px 9px; border-radius: 7px;
  border: 1.5px solid var(--border); background: #fff; color: var(--ink);
  font-weight: 600; font-size: 12px; line-height: 1.6; white-space: nowrap; vertical-align: 1px;
}
.chip--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip--warn { background: #d98a17; border-color: #d98a17; color: #fff; }
.chip--danger { background: var(--err); border-color: var(--err); color: #fff; }
.chip--field { font-weight: 400; color: var(--muted); }

.summary { font-size: 14px; margin: 10px 0; font-weight: 600; }
.summary > span { display: inline-block; margin-right: 16px; }

/* ---- Tables ---- */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: #f6f6fc; font-weight: 700; }
tr:last-child td { border-bottom: none; }
tr.filters th { padding: 5px 6px; background: #fbfbfe; }
tr.filters input { padding: 5px 8px; font-size: 12px; border-radius: 7px; min-width: 70px; }
tr.bad td { background: #fdf1f1; }
tr.good td { background: #f3faf6; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge.ok { background: #e2f5ea; color: var(--ok); }
.badge.err { background: #fbe3e3; color: var(--err); }
.errlist { color: var(--err); }

/* Segmented control — a group of selectable buttons (one active). */
.seg { display: inline-flex; border: 1.5px solid var(--border); border-radius: 11px; overflow: hidden; background: #fff; }
.seg button { border: none; border-right: 1.5px solid var(--border); background: #fff; color: var(--ink); padding: 7px 14px; font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; }
.seg button:last-child { border-right: none; }
.seg button:hover:not(:disabled):not(.sel) { background: #f4f4fb; }
.seg button:disabled { opacity: 0.4; cursor: not-allowed; }
.seg button.sel { background: var(--accent); color: #fff; }
.seg button.sel.warn { background: #d98a17; }
.seg button.sel.danger { background: var(--err); }
.seg-group { display: flex; flex-direction: column; gap: 4px; }

/* ---- Dashboard ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.stat {
  background: var(--card);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(24, 27, 58, 0.08);
}
.stat-value { font-size: 28px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.stat-label { font-weight: 600; margin-top: 4px; }
.stat-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dash-cols .card { margin-bottom: 18px; }
@media (max-width: 860px) { .dash-cols { grid-template-columns: 1fr; } }
.card h3 { margin: 0 0 12px; font-size: 15px; }

.bar-row { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.bar-label { flex: 0 0 38%; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 10px; background: rgba(132, 132, 235, 0.14); border-radius: 5px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.bar-count { flex: 0 0 34px; text-align: right; font-size: 13px; font-weight: 600; }

.cols { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.col { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.col-fill { display: block; width: 100%; background: var(--accent-soft); border-radius: 3px 3px 0 0; }
.col:hover .col-fill { background: var(--accent); }
.card h3 .muted { font-weight: 500; font-size: 12px; margin-left: 6px; }
.dash-block { margin-bottom: 18px; }
.dash-note { margin: 12px 0 0; }
/* «Messages sent»: the total big, then the weeks */
.msg-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 14px; }
.msg-total .stat-sub { color: var(--muted); font-size: 13px; }
.msg-left { opacity: 0.8; }
.dash-scope { margin: 0 0 14px; line-height: 1.45; }
.dash-scope b { color: var(--ink); font-weight: 600; }
/* Accounts: the role of an account you may change */
.ac-table td { vertical-align: middle; }
.ac-email { display: inline-block; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.ac-2fa { white-space: nowrap; }
.ac-link { padding: 2px 0; font-size: 12px; }
.ac-test { margin-top: 18px; }
.ac-test h3 { margin: 0 0 4px; font-size: 15px; }
.role-select { width: auto; padding: 4px 8px; font-size: 12px; border-radius: 8px; }
.badge.test { background: #dff3f5; color: #137a85; }
.field-row > label.ac-filter { flex: 0 0 auto; min-width: 0; font-size: 13px; }
.ac-filter select.ac-type { width: auto; padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.role-select.role-saved { border-color: var(--ok, #1f9d55); box-shadow: 0 0 0 2px rgba(31, 157, 85, 0.25); }
.dash-note a { color: var(--accent); font-weight: 600; }
.ver-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ver-tile { background: #f6f6fc; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.ver-num { font-size: 30px; font-weight: 700; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.ver-label { font-weight: 600; font-size: 14px; }
.ver-tile .bar-track { display: block; flex: none; height: 8px; margin: 4px 0 2px; }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.dash-head h3 { margin: 0; }
.rank-table td { vertical-align: middle; }
.rank-table td .muted { font-size: 12px; }
.rank-table th.num, .rank-table td.num { text-align: right; }
.rank { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: #f0f0f8; font-weight: 700; font-size: 12px; }
.rank-1 { background: #f6d365; }
.rank-2 { background: #dcdfe6; }
.rank-3 { background: #ecc39b; }
.rank-bar { min-width: 150px; }
.rank-bar .bar-track { display: inline-block; width: calc(100% - 40px); vertical-align: middle; margin-right: 8px; }
.rank-table th { white-space: nowrap; }
@media (max-width: 640px) {
  .rank-bar { min-width: 0; }
  .rank-bar .bar-track, .rank-table .rank-last { display: none; }
  .rank-table th, .rank-table td { padding: 9px 5px; }
  .rank-table th:first-child, .rank-table td:first-child { padding-left: 10px; }
}

/* Column chart x-axis + current-period highlight */
.colchart { display: flex; flex-direction: column; gap: 4px; }
.col-axis { display: flex; gap: 3px; }
.col-tick { flex: 1; font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; overflow: visible; min-width: 0; }
.col.current .col-fill { background: var(--accent); }
.col.current { position: relative; }
.col.current::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--navy); border-radius: 1px; }

/* Inline SVG line chart */
.linechart { width: 100%; min-height: 200px; }
.linechart svg { display: block; overflow: visible; }
.linechart .grid { stroke: var(--border); stroke-width: 1; }
.linechart .tick { fill: var(--muted); font-size: 11px; font-family: inherit; font-variant-numeric: tabular-nums; }
.linechart .area { fill: var(--accent); fill-opacity: 0.1; }
.linechart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.linechart .endlabel { fill: var(--ink); font-size: 12px; font-weight: 600; font-family: inherit; }
.linechart .enddot, .linechart .hoverdot { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.linechart .crosshair { stroke: var(--navy); stroke-width: 1; stroke-opacity: 0.4; vector-effect: non-scaling-stroke; }
.linechart .hidden { display: none; }

/* Shared hover tooltip */
.charttip {
  position: absolute; z-index: 50; pointer-events: none; display: none;
  background: var(--navy); color: #fff; font-size: 12px; line-height: 1.4;
  padding: 6px 10px; border-radius: 8px; box-shadow: 0 6px 20px rgba(18, 46, 82, 0.2);
  white-space: nowrap;
}
.charttip .muted { color: #c7cee4; font-size: 11px; }

/* ---- Status (raw JSON) ---- */
label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
label.inline input { width: auto; padding: 0; }
.st-search { margin: 0 0 12px; }
.st-search input { flex: 1; min-width: 220px; max-width: 480px; padding: 9px 12px; }
pre.raw mark { background: var(--amber); color: var(--ink); border-radius: 3px; padding: 0 1px; }
pre.raw mark.active { background: var(--accent); color: #fff; }
pre.raw {
  position: relative; /* so a match's offsetTop is relative to the <pre> */
  margin: 0; padding: 14px 16px; background: var(--lav); border: 1px solid var(--border);
  border-radius: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
  line-height: 1.45; white-space: pre-wrap; word-break: break-word; max-height: 75vh; overflow: auto;
}

/* ---------- Responsive: tablet + phone ----------
   Kept at the end of the file so these overrides win over the component rules
   above (media queries add no specificity — only source order breaks ties). */
@media (max-width: 820px) {
  /* The sidebar becomes a top bar: a burger (top-left) toggles the nav drawer,
     the logo sits on the right. The nav + Sign out are hidden until opened. */
  .app { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: relative;
    flex-direction: column; padding: 0; gap: 0;
  }
  .sidebar-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
  }
  .nav-toggle { display: flex; flex-direction: column; justify-content: center; }
  .sidebar .brand { padding: 0; font-size: 19px; }

  /* Drawer: hidden until the sidebar is toggled open. */
  .nav { display: none; flex-direction: column; gap: 4px; padding: 2px 12px 10px; margin: 0; flex: none; overflow: visible; }
  .sidebar.nav-open .nav { display: flex; }
  .nav-item { padding: 11px 12px; font-size: 14px; }
  .nav-group-head { padding: 9px 8px 9px 12px; font-size: 13px; }
  /* The player stays visible even with the drawer shut — music running with
     no way to pause it is worse than a slightly taller bar. */
  .nav-player { padding: 0 16px; }
  .sidebar-foot { display: none; border: none; padding: 4px 16px 14px; }
  .sidebar.nav-open .sidebar-foot { display: block; }

  .content { flex: none; padding: 20px 16px; max-width: none; }
  .topbar { margin-bottom: 16px; }
  .topbar h2 { font-size: 21px; }
  .card { padding: 18px; }
}

@media (max-width: 480px) {
  .content { padding: 16px 12px; }
  .topbar { gap: 10px; }
  .topbar h2 { font-size: 19px; }
  .card { padding: 15px; border-radius: 14px; }
  .btn { padding: 10px 15px; }
  .login-card { padding: 26px 20px; border-radius: 18px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat-value { font-size: 23px; }
  .seg button { padding: 7px 11px; }
  /* Report cards: note field and Resolve take their own full-width rows so the
     two segmented controls sit cleanly on the line above. */
  [data-report] input[data-note] { flex: 1 1 100%; min-width: 0; }
  [data-report] [data-resolve] { flex: 1 1 100%; }
}

/* ---- Public status page (/health) ---- */
.status-view {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 50% -10%, #f6f6fd 0%, var(--lav) 60%);
  padding: 24px;
}
.status-card {
  width: 100%; max-width: 440px; background: var(--card);
  border: 1px solid var(--border); border-radius: 22px; padding: 32px;
  box-shadow: 0 18px 50px rgba(18, 46, 82, 0.10); text-align: center;
}
.status-headline { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0 22px; }
.status-title { font-size: 19px; font-weight: 600; }
.dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; background: var(--muted); }
.dot--ok { background: var(--ok); box-shadow: 0 0 0 4px rgba(31, 157, 87, 0.15); }
.dot--warn { background: var(--amber); box-shadow: 0 0 0 4px rgba(255, 215, 108, 0.22); }
.dot--err { background: var(--err); box-shadow: 0 0 0 4px rgba(210, 59, 59, 0.15); }
.dot--wait { background: var(--accent-soft); }
.status-list { list-style: none; margin: 0; padding: 0; text-align: left; }
.status-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  margin-bottom: 8px; font-size: 14px;
}
.status-name { flex: 1; font-weight: 600; }
.status-detail { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.status-card .muted { margin-top: 16px; }

/* A report's reason badge opens its rule. */
button.badge { border: 0; font-family: inherit; color: inherit; cursor: pointer; }
button.badge:hover { filter: brightness(1.1); }

/* ---- Event import: the preview as an editable list, one line per CSV row ---- */
.ed-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 6px; }
.ed-bar select, .ed-bar input { width: auto; padding: 8px 11px; font-size: 13px; border-radius: 9px; }
.ed-bar input[type="search"] { flex: 1; min-width: 180px; }
.ed-bar .link { padding: 6px 2px; font-size: 13px; }
.ed-rows { display: flex; flex-direction: column; gap: 6px; }
.ed-row { background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--ok); border-radius: 12px; }
.ed-row.bad { border-left-color: var(--err); }

.ed-row.removed { opacity: 0.55; border-left-color: var(--muted); }
.ed-row.removed .ed-name { text-decoration: line-through; }
.ed-row > summary {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  cursor: pointer; list-style: none; user-select: none;
}
.ed-row > summary::-webkit-details-marker { display: none; }
.ed-row > summary::before { content: "▸"; color: var(--muted); font-size: 12px; transition: transform 0.15s ease; }
.ed-row[open] > summary::before { transform: rotate(90deg); }
.ed-row[open] > summary { border-bottom: 1px solid var(--border); }
.ed-line { min-width: 26px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.ed-name { flex: 0 1 auto; min-width: 0; max-width: 40%; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-meta { flex: 1; min-width: 0; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-remove { flex: none; border: 0; background: none; padding: 2px 4px; color: var(--muted); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.ed-remove:hover { color: var(--err); }
.ed-body { padding: 12px 14px 14px; }
.ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.ed-field { margin: 0; font-weight: 400; font-size: 14px; }
.ed-field.wide { grid-column: 1 / -1; }
.ed-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 600; }
.ed-field input, .ed-field textarea { padding: 8px 11px; border-radius: 9px; font-size: 14px; }
.ed-field textarea { min-height: 62px; font-family: inherit; }
.ed-field.has-err input, .ed-field.has-err textarea { border-color: var(--err); background: #fdf6f6; }
.ed-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 5px; color: var(--muted); font-size: 12px; }
.ed-hint a { color: var(--navy); }
.ed-err { display: block; margin-top: 5px; color: var(--err); font-size: 12px; font-weight: 600; }
.ed-row.changed .ed-hint, .ed-row.changed .ed-err { opacity: 0.45; } /* until re-validated */
.ed-inline { display: flex; gap: 8px; align-items: center; }
.ed-swatch { flex: none; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 9px; }
.ed-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--lav); }
.ed-thumb.broken { display: none; }
.ed-note.warn { color: #b3700f; }
.ed-note.err { color: var(--err); font-weight: 600; }
.badge.warn { background: #fdf0dc; color: #b3700f; }
.ed-row .badge:not(.ok):not(.err):not(.warn):not(.chg):not(.managed) { background: var(--lav-2); color: var(--muted); }
/* Mass edit: a row with changes, one without, and the changed columns. */
.ed-row.chg { border-left-color: var(--accent); }
.ed-row.same { border-left-color: var(--lav-2); }
.badge.chg { background: #ececfd; color: #5b5bd6; }
.ed-field.is-changed input, .ed-field.is-changed textarea { border-color: var(--accent); background: #f7f7fe; }
.ed-id { margin-bottom: 10px; }
.ed-id code { background: var(--lav); padding: 1px 6px; border-radius: 5px; }
.ed-row.changed { border-left-color: #d98a17; } /* edited here, not yet re-checked */

/* Stays in view while scrolling through the rows. */
.ed-sticky {
  position: sticky; bottom: 12px; z-index: 5;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin-top: 14px; padding: 10px 12px;
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(18, 46, 82, 0.12);
}
.ed-sticky .grow { flex: 1; min-width: 160px; margin: 0; }
.ed-sticky .btn { padding: 9px 14px; }

/* Drafts: the import's rows, with where they come from and what became of them. */
.ed-row.dup { border-left-color: #d98a17; }
.ed-check { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.dr-meta { margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.dr-meta p { margin: 0 0 6px; }
.dr-meta b { color: var(--ink); }
.dr-meta code { background: var(--lav); padding: 1px 6px; border-radius: 5px; color: var(--ink); }
.dr-sources ul { margin: 0 0 8px; padding-left: 18px; }
.dr-sources li { margin: 2px 0; overflow-wrap: anywhere; }
.dr-sources a { color: var(--navy); }
.dr-note p { margin: 0; color: var(--ink); white-space: pre-wrap; }
.dr-dup { margin: 0 0 14px; padding: 10px 14px; border: 1.5px solid #e9b25e; border-radius: 12px; background: #fdf3e2; color: #7a4c06; font-size: 13px; }
.dr-dup ul { margin: 6px 0 0; padding-left: 18px; }
.dr-dup code { background: #fff; padding: 1px 6px; border-radius: 5px; }
/* The managed profile a draft will be created for. */
.dr-for { margin: 0 0 14px; padding: 10px 14px; border: 1.5px solid #cbbbf0; border-radius: 12px; background: #f7f4fe; font-size: 13px; }
.dr-for.bad { border-color: #e6a3a3; background: #fdf1f1; }
.dr-for p { margin: 0 0 4px; }
.dr-for .dr-for-head { font-size: 14px; overflow-wrap: anywhere; }
.dr-for .dr-for-err { color: #8f2222; }
.dr-for-warn { margin: 6px 0; padding-left: 18px; color: #7a4c06; }
.dr-for-acts { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.dr-for-acts .link { padding: 4px 0; font-size: 13px; }
.mp-inline { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.mp-inline > .link { margin-top: 8px; font-size: 13px; }
.dr-fields { margin: 0; padding: 0; border: 0; min-width: 0; }
.dr-fields:disabled input, .dr-fields:disabled textarea { background: #f8f8fc; color: var(--ink); }
.dr-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.dr-actions .grow { flex: 1; }
.dr-actions input { width: auto; flex: 1 1 220px; padding: 8px 11px; font-size: 13px; border-radius: 9px; }
.dr-actions .btn { padding: 9px 14px; }
.dr-all { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; }
.dr-all input { width: auto; margin: 0; }
.seg button span:empty { display: none; }
/* Drafts: a line-up change — what it changes, and the line-ups side by side. */
.dr-change { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fafaff; font-size: 13px; }
.dr-diff { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.dr-diff > .ed-label { flex-basis: 100%; }
.dr-diff p { margin: 0; }
.dr-diff-group { min-width: 180px; }
.dr-diff-group ul { margin: 4px 0 0; padding: 0; list-style: none; }
.dr-diff-group li { margin: 2px 0; padding: 2px 8px; border-radius: 6px; overflow-wrap: anywhere; }
.dr-diff-group li.add { background: #e2f5ea; color: #155f36; }
.dr-diff-group li.del { background: #fbe3e3; color: #8f2222; }
.dr-diff-group li.chg { background: #ececfd; color: #3f3fae; }
.dr-diff-group li s { opacity: 0.7; }
.dr-sign { display: inline-block; width: 14px; font-weight: 700; }
.dr-drift .dr-diff { margin: 8px 0; }
.dr-drift p { margin: 6px 0 8px; }
.dr-drift .btn { padding: 8px 13px; }
.dr-compare { margin-top: 10px; }
.dr-compare > summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.dr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.dr-lineup { margin: 4px 0 0; padding-left: 22px; }
.dr-lineup > li { margin: 3px 0; }
.dr-lineup ul { margin: 1px 0 0; padding-left: 16px; color: var(--muted); }
@media (max-width: 640px) { .dr-cols { grid-template-columns: 1fr; } }

@media (max-width: 640px) {
  .ed-grid { grid-template-columns: 1fr; }
  .ed-meta { display: none; }
  .ed-name { max-width: none; flex: 1; }
  /* A draft's badges go below its name when they don't fit next to it. */
  .ed-row:has(> .ed-body .dr-meta) > summary { flex-wrap: wrap; }
  .ed-row:has(> .ed-body .dr-meta) .ed-name { flex-basis: calc(100% - 60px); }
  .ed-sticky .btn { flex: 1; }
}

/* Verifications queue */
.vf-card { padding: 14px 16px; }
.vf-card.vf-done { opacity: 0.6; }
.vf-row { display: flex; align-items: center; gap: 12px; }
.vf-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.vf-avatar--empty { display: flex; align-items: center; justify-content: center;
  background: var(--lav-2); color: var(--muted); font-weight: 700; }
.vf-who { flex: 1 1 auto; min-width: 0; }
.vf-name { font-weight: 700; }
.vf-actions { display: flex; gap: 8px; justify-content: flex-end; }
.vf-approve { background: var(--accent); border-color: var(--accent); color: #fff; }
.vf-reject { background: #fff; border-color: var(--err); color: var(--err); }
.vf-status.err { color: var(--err); }
.vf-note { margin-top: 8px; }

/* Event requests (features/eventRequests.js): a card per request — cover and
   event, description, line-up, who asked — and the reject dialog. */
.er-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.er-card { padding: 16px 18px; }
.er-card.vf-done { opacity: 0.6; }
.er-main { display: flex; gap: 16px; align-items: flex-start; }
.er-cover { flex: 0 0 auto; display: block; width: 168px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--lav); }
.er-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.er-cover .media-none { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 0; }
.er-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.er-title { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.er-title .badge { vertical-align: 2px; margin-left: 4px; }
.er-line { font-size: 14px; overflow-wrap: anywhere; }
.er-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.er-tags .badge { background: var(--lav); color: var(--ink); font-weight: 600; }
.er-desc { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; max-height: 14em; overflow-y: auto; }
.er-lineup { margin-top: 12px; }
.er-lineup > summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.er-lineup > summary .muted { font-weight: 500; margin-left: 4px; }
.er-decision { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #fbe3e3; }
.er-decision .ed-label { color: var(--err); margin-bottom: 2px; }
.er-reason { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.er-requester { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.er-requester .vf-name .badge { font-weight: 700; margin-left: 2px; }
.er-actions { margin-top: 12px; }
.er-actions .vf-reject { box-shadow: inset 0 0 0 1.5px var(--err); }
.er-notice { margin: 8px 0 0; padding: 8px 12px; border-radius: 10px; font-size: 13px; background: var(--lav); }
.er-notice.warn { background: #fdf0dc; color: #8a5509; }
.er-dialog { width: min(520px, calc(100vw - 32px)); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; color: var(--ink); }
.er-dialog::backdrop { background: rgba(18, 46, 82, 0.35); }
.er-dialog h3 { margin: 0 0 8px; font-size: 17px; }
.er-dialog textarea { min-height: 96px; font-family: inherit; font-size: 14px; }
.er-count { text-align: right; margin-top: 4px; }
.er-dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.er-cancel { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--border); }
.er-danger { background: var(--err); }

/* Profile claims (features/profileClaims.js): what someone asked for, on a public
   form, and where it stands. Their text may be long and have no spaces. */
.pc-tabs { flex-wrap: wrap; }
.pc-title { overflow-wrap: anywhere; }
.pc-title .badge { font-weight: 700; margin-left: 2px; }
.pc-card .vf-who a { color: var(--navy); }
.pc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 16px; margin: 14px 0 0; }
.pc-facts dt { color: var(--muted); font-size: 12px; font-weight: 600; }
.pc-facts dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.pc-message, .pc-note { margin-top: 12px; }
.pc-message p, .pc-note p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.pc-message p { max-height: 14em; overflow-y: auto; padding: 10px 12px; border-radius: 10px; background: #f6f6fc; }
.pc-state { margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 13px; background: var(--lav); overflow-wrap: anywhere; }
.pc-state.ok { background: #e2f5ea; color: #155f36; }
.pc-state.warn { background: #fdf0dc; color: #7a4c06; }
.pc-state.err { background: #fbe3e3; color: #8f2222; }
.pc-state > span { display: block; margin-top: 2px; }
.pc-actions { flex-wrap: wrap; }
.pc-outcome { margin: 10px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.pc-outcome.ok { color: var(--ok); }
.pc-outcome.err { color: var(--err); }
.pc-dialog p { overflow-wrap: anywhere; }
.pc-warning { padding: 10px 12px; border: 1.5px solid #e9b25e; border-radius: 10px; background: #fdf3e2; color: #7a4c06; font-size: 13px; }
.pc-warning b { display: block; margin-bottom: 2px; }
.pc-after-label { margin-top: 14px; }
.pc-after { margin: 0 0 12px; padding-left: 18px; font-size: 13px; overflow-wrap: anywhere; }
.pc-after li { margin: 4px 0; }
.pc-check { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0; font-size: 14px; font-weight: 600; cursor: pointer; }
.pc-check input { flex: none; width: auto; margin: 3px 0 0; }
.pc-notify-hint { margin: -4px 0 0; }
.pc-dialog .btn[disabled], .pc-actions .btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.pc-facts .pc-wide { grid-column: 1 / -1; }
.pc-site { color: var(--navy); font-weight: 600; overflow-wrap: anywhere; }
.pc-facts dd .badge { vertical-align: 1px; }
.pc-host { display: block; margin-top: 2px; }
a.btn.pc-write { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.pc-text { margin-top: 12px; font-size: 14px; }
.pc-text > summary { cursor: pointer; font-weight: 600; }
.pc-text > p { margin: 6px 0 8px; }
.pc-text div p { margin: 0 0 8px; padding: 10px 12px; border-radius: 10px; background: #f6f6fc; white-space: pre-wrap; overflow-wrap: anywhere; }
.pc-dialog-facts { margin: 12px 0 4px; }
@media (max-width: 480px) {
  .pc-dialog { padding: 18px; }
  .pc-dialog .er-dialog-actions { flex-direction: column-reverse; }
  .pc-actions .btn { flex: 1 1 auto; }
}
@media (max-width: 640px) {
  .er-main { flex-direction: column; }
  .er-cover { width: 100%; aspect-ratio: 16 / 9; }
  .er-actions .btn { flex: 1; }
}

/* Reported media in the reports queue (media.js, showMedia): small previews,
   and a video as its first frame with a play button until it's clicked. */
.media-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; margin-top: 8px; }
.media-thumb { display: block; max-width: 220px; max-height: 220px; border-radius: 8px; background: var(--lav); object-fit: contain; }
.media-none { display: inline-block; padding: 10px 12px; border-radius: 8px; background: var(--lav); color: var(--muted); }
.media-video { position: relative; display: block; width: 220px; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: #1c1f33; cursor: pointer; }
.media-video--portrait { width: 124px; aspect-ratio: 9 / 16; }
.media-video img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-play { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 0, 0, 0.55); transition: background 0.15s; }
.media-play::after { content: ""; position: absolute; left: 17px; top: 13px; border-style: solid; border-width: 9px 0 9px 14px; border-color: transparent transparent transparent #fff; }
.media-video:hover .media-play, .media-video:focus-visible .media-play { background: rgba(0, 0, 0, 0.8); }
.media-dur { position: absolute; right: 6px; bottom: 6px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 11px; }
.media-player { display: block; max-width: min(100%, 420px); max-height: 420px; border-radius: 8px; background: #000; }

/* Event page (features/eventPage.js): one event's form — #/events/{id}/edit. */
.ep-card { padding-bottom: 8px; }
.ep-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ep-top code { background: var(--lav); padding: 1px 6px; border-radius: 5px; }
.ep-back { color: var(--accent); font-weight: 600; text-decoration: none; font-size: 14px; }
.ep-back:hover { text-decoration: underline; }
.ep-title { margin: 10px 0 4px; font-size: 21px; overflow-wrap: anywhere; }
.ep-notice { margin-top: 10px; }
.ep-fieldset { border: none; margin: 0; padding: 0; min-width: 0; }
.ep-fieldset:disabled { opacity: 0.6; }
.card .ep-h { margin: 26px 0 10px; font-size: 15px; }
.card .ep-h .muted { font-weight: 500; margin-left: 4px; }
.ep-note { margin: 8px 0 0; }
.ep-inline { display: flex; gap: 8px; align-items: center; }
.ep-inline input { flex: 1; min-width: 0; }
.ep-inline .btn { padding: 8px 14px; flex: none; }
.ep-inline input[type="color"] { flex: none; width: 42px; height: 38px; padding: 3px; }
.ep-tag-group { margin-bottom: 8px; }
.ep-tag-group > .tiny { display: block; margin-bottom: 4px; }
.ep-tags { display: flex; flex-wrap: wrap; gap: 6px; }
label.ep-tag { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 4px 10px 4px 8px;
  border: 1.5px solid var(--border); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 500; cursor: pointer; }
label.ep-tag input { width: 14px; height: 14px; margin: 0; padding: 0; accent-color: var(--accent); }
label.ep-tag:has(input:checked) { border-color: var(--accent); background: #f2f2fd; }
.ed-field.is-changed .ep-tags label.ep-tag:has(input:checked) { background: #ebebfc; }
.ed-field.is-changed > .ed-label::after, .ep-cover-row.is-changed .ep-cover-pick::before { content: " · changed"; color: var(--accent); }
.ep-cover-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.ep-cover { display: flex; flex-direction: column; gap: 4px; width: 200px; }
.ep-cover img, .ep-cover-none { display: block; width: 200px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--lav); }
.ep-cover-none { display: flex; align-items: center; justify-content: center; }
.ep-cover .media-none { display: flex; align-items: center; justify-content: center; width: 200px; aspect-ratio: 4 / 3; border-radius: 10px; background: var(--lav); }
.ep-cover-pick { flex: 1; min-width: 220px; display: flex; flex-direction: column; align-items: flex-start; }
.ep-cover-pick::before { font-size: 12px; font-weight: 600; }
.ep-cover-pick .ep-inline { width: 100%; }
.ep-cover-pick label.file { position: relative; margin: 0; display: inline-block; }
.ep-cover-pick label.file input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; padding: 0; }
.ep-cover-pick .link { padding-left: 0; }
.ep-cover-row.has-err .ep-cover-pick input[type="url"] { border-color: var(--err); }
textarea[data-f="lineup"] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
@media (max-width: 640px) {
  .ep-cover, .ep-cover img, .ep-cover-none { width: 100%; }
}
/* Reports: «Edit event» next to a reported event. */
.rp-event { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rp-edit { padding: 7px 13px; font-size: 13px; text-decoration: none; }
/* Reports: filters, child endangerment first, legal hold, evidence. */
.rp-filters { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.rp-filters label { margin: 0; font-size: 12px; color: var(--muted); }
.rp-filters select { width: auto; min-width: 170px; padding: 7px 10px; font-size: 13px; margin-top: 4px; display: block; }
.rp-filters label[hidden] { display: none; }
.rp-old { color: #b3700f; }
label.rp-lift-box { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--err); white-space: nowrap; }
label.rp-lift-box input { width: auto; margin: 0; }
label.rp-lift-box:has(input:disabled) { color: var(--muted); opacity: 0.6; }
[data-lift-slot]:empty { display: none; }
.rp-card { margin-bottom: 10px; }
.rp-card.rp-handled { opacity: 0.55; }
.rp-card.rp-child { border: 2px solid var(--err); box-shadow: 0 0 0 3px rgba(210, 59, 59, 0.12); }
.rp-card.rp-child.rp-handled { box-shadow: none; }
.rp-urgent { margin: -4px 0 10px; padding: 6px 10px; border-radius: 10px; background: var(--err); color: #fff; font-weight: 700; font-size: 13px; }
.rp-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-head-left { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.rp-reason { background: var(--err); color: #fff; border: none; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; }
.rp-child .rp-reason { font-size: 12px; padding: 3px 11px; }
.badge.rp-target { background: var(--lav); color: var(--ink); font-weight: 600; }
.rp-hold { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.rp-hold:empty { display: none; }
.rp-hold-btn { padding: 5px 12px; font-size: 12px; }
.badge.rp-held { background: #fbe3e3; color: #9d2222; font-size: 12px; }
[data-hold-result]:empty { display: none; }
.rp-guard { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding: 10px 12px; border: 1.5px dashed var(--border); border-radius: 12px; }
.rp-show-media { padding: 6px 12px; font-size: 13px; }
.rp-lift-child { color: var(--err); font-size: 13px; font-weight: 600; }
.rp-evidence { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
.rp-evidence h4 { margin: 18px 0 6px; font-size: 14px; }
.rp-facts { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 4px 14px; margin: 0; font-size: 13px; }
.rp-facts dt { color: var(--muted); }
.rp-facts dd { margin: 0; overflow-wrap: anywhere; }
.rp-facts code, .rp-table code { font-size: 12px; overflow-wrap: anywhere; }
.rp-pre { white-space: pre-wrap; }
.rp-table-wrap { overflow-x: auto; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rp-table th, .rp-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.rp-table th { color: var(--muted); font-weight: 600; }
.rp-break { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .rp-facts { grid-template-columns: 1fr; gap: 0; }
  .rp-facts dd { margin-bottom: 6px; }
  .rp-filters select { min-width: 140px; }
}
.ep-card [hidden] { display: none !important; }
.ep-card .ed-sticky .grow:empty { display: none; }
@media (max-width: 640px) { .ep-card .ed-sticky .btn { padding: 9px 10px; white-space: nowrap; } }

/* ─── Managed profiles ─────────────────────────────────────────────────────── */
.badge.managed { background: #efe9fb; color: #5d3fb3; white-space: nowrap; }
.mg-avatar { display: block; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--lav); }
.mg-avatar--none { display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--muted); }
.btn.mg-edit, .btn.mg-new, .btn.mg-cancel { display: inline-block; text-decoration: none; padding: 7px 14px; font-size: 13px; }
.btn.mg-new { margin-left: auto; }
.btn.mg-cancel { background: var(--muted); }
.mg-form-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mg-form-head h3 { margin: 0; }
.mg-formcard { margin-bottom: 18px; }
.mg-grid { margin-top: 14px; }
.mg-grid select { padding: 8px 11px; border-radius: 9px; font-size: 14px; }
.mg-dup { margin: 12px 0 0; }
.mg-free { color: var(--ok); font-weight: 600; }
.mg-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.mg-pic-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.mg-pic-frame { display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--lav); }
.mg-pic-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mg-pic-frame img[hidden], .mg-pic-frame [hidden] { display: none; }
.mg-pic-frame--profile { width: 96px; height: 96px; border-radius: 50%; }
.mg-pic-frame--banner { width: 200px; height: 96px; border-radius: 10px; }
.mg-pic-do { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.mg-pic-do label.file { position: relative; margin: 0; padding: 7px 14px; font-size: 13px; }
.mg-pic-do label.file input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; padding: 0; }
.mg-pic-do .link { padding: 4px 0; font-size: 13px; }
.mg-warnings { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.ed-field select { padding: 8px 11px; border-radius: 9px; font-size: 14px; }
.ed-field.has-err select { border-color: var(--err); background: #fdf6f6; }
.dr-fields:disabled select { background: #f8f8fc; color: var(--ink); }
@media (max-width: 720px) {
  .mg-pics { grid-template-columns: 1fr; }
  /* The status filters of the two drafts pages: every one stays in reach on a phone. */
  .ed-bar .seg[data-el="filter"] { flex-wrap: wrap; }
}

/* «Create as»: your account, or a managed profile (Event Import, Drafts). */
.mp { margin: 14px 0; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; }
.mp [hidden] { display: none !important; }
.mp-head { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.mp-head .ed-label { margin: 0; }
.mp-head .seg { flex-wrap: wrap; }
.mp-body { margin-top: 10px; }
.mp-results { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.mp-result { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.mp-result:hover { background: #f4f4fb; }
.mp-name { color: var(--muted); overflow-wrap: anywhere; }
.mp-chosen { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding: 8px 10px; border-radius: 9px; background: var(--lav); font-size: 13px; }
.mp-chosen > span { overflow-wrap: anywhere; }
.mp-chosen .link { padding: 2px 0; font-size: 13px; }
.mp p.tiny { margin: 8px 0 0; }
.ed-hint.ed-on-profile[hidden] { display: none; }
.ed-hint.ed-on-profile code { background: var(--lav); padding: 0 4px; border-radius: 4px; }

/* ---- Timetable (program-calendar.js): stages as columns, time downwards ---- */
.tt [hidden] { display: none !important; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.tt-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.tt-grow { flex: 1; }
.tt-days button { padding: 6px 10px; }
.tt-count { display: inline-block; min-width: 16px; margin-left: 5px; padding: 0 5px; border-radius: 999px; background: var(--lav-2); color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; }
.tt-count:empty { display: none; }
.tt-days button.sel .tt-count { background: rgba(255, 255, 255, 0.3); color: #fff; }
.tt-ctl { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--muted); }
.tt-ctl select { width: auto; padding: 6px 8px; font-size: 13px; }
.tt-zoom button { padding: 6px 12px; font-size: 15px; line-height: 1; }
.tt-problems { list-style: none; margin: 0 0 8px; padding: 0; }
.tt-problem { margin: 0 0 4px; padding: 6px 10px; border-radius: 9px; background: #fdf0dc; color: #8a5509; font-size: 13px; font-weight: 600; }
.tt-problem--limit, .tt-problem--overlap { background: #fbe3e3; color: var(--err); }
.tt-problem::before { content: "⚠ "; }
.tt-empty { padding: 18px; border: 1px dashed var(--border); border-radius: 12px; text-align: center; }
.tt-scroll { position: relative; overflow: auto; max-height: min(72vh, 760px); border: 1px solid var(--border); border-radius: 12px; background: #fff; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.tt-table { display: grid; min-width: min-content; }
.tt-corner, .tt-head { position: sticky; top: 0; z-index: 4; background: #f6f6fc; border-bottom: 1px solid var(--border); }
.tt-corner { left: 0; z-index: 5; }
.tt-head { display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 4px; border-left: 1px solid var(--border); font-size: 13px; font-weight: 700; }
.tt-head--none { color: var(--muted); font-weight: 600; }
.tt-stage-btn { max-width: 100%; border: 0; background: none; padding: 4px 6px; border-radius: 7px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-stage-btn:hover:not(:disabled) { background: var(--lav-2); }
.tt-stage-btn:disabled { cursor: default; }
.tt-new { color: var(--muted); font-weight: 500; font-size: 11px; }
.tt-times { position: sticky; left: 0; z-index: 3; background: #fbfbfe; border-right: 1px solid var(--border); }
.tt-hour { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tt-hour:first-child { transform: none; }
.tt-hour b { display: block; color: var(--ink); font-size: 10px; font-weight: 700; text-align: right; }
.tt-midnight { color: var(--ink); font-weight: 700; }
.tt-col {
  position: relative; border-left: 1px solid var(--border); touch-action: pan-x pan-y; cursor: crosshair;
  background-image: linear-gradient(to bottom, #dedeef 1px, transparent 1px), linear-gradient(to bottom, transparent 50%, #f1f1f8 50%, #f1f1f8 calc(50% + 1px), transparent calc(50% + 1px));
}
.tt-out { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(18, 46, 82, 0.04) 0 6px, transparent 6px 12px); pointer-events: none; }
.tt-set {
  position: absolute; z-index: 1; display: flex; flex-direction: column; overflow: hidden; padding: 3px 7px;
  border: 1.5px solid var(--accent); border-left-width: 4px; border-radius: 8px; background: #ececfd; color: var(--ink);
  font-size: 12px; line-height: 1.3; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
}
.tt-set:focus-visible { outline: 3px solid var(--navy); outline-offset: 1px; z-index: 2; }
.tt-set.tt-name { background: #f6f6fb; border-color: #a9abc8; }
.tt-set.tt-openend { border-bottom-style: dashed; }
.tt-set.tt-warn { border-color: var(--err); background: #fdeeee; }
.tt-set.tt-dragging { z-index: 3; cursor: grabbing; opacity: 0.92; box-shadow: 0 6px 18px rgba(18, 46, 82, 0.22); }
.tt-who { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-when { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tt-short { flex-direction: row; gap: 6px; align-items: center; padding-top: 0; padding-bottom: 0; }
.tt-grip { position: absolute; z-index: 1; left: 0; right: 0; height: 9px; cursor: ns-resize; }
.tt-grip--top { top: -2px; }
.tt-grip--bottom { bottom: -2px; }
.tt-set:hover .tt-grip--bottom::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 22px; height: 3px; margin-left: -11px; border-radius: 2px; background: currentColor; opacity: 0.35; }
.tt-ghost { position: absolute; left: 2px; right: 2px; z-index: 2; border: 2px dashed var(--accent); border-radius: 8px; background: rgba(132, 132, 235, 0.14); color: var(--accent); font-size: 12px; font-weight: 700; padding: 2px 6px; pointer-events: none; }
.tt-locked .tt-col, .tt-locked .tt-set { cursor: default; }
.tt-locked .tt-help { display: none; }
.tt-help { margin: 6px 0 0; }
.tt-lineup { margin-top: 14px; }
.tt-lineup-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.tt-lineup-head .link { padding: 4px 0; font-size: 13px; }
.tt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tt-artist { display: inline-flex; align-items: center; gap: 2px; white-space: normal; }
.tt-x { border: 0; background: none; padding: 0 2px 0 4px; color: var(--muted); font: inherit; font-size: 15px; line-height: 1; cursor: pointer; }
.tt-x:hover { color: var(--err); }
.tt-sub { margin: 12px 0 4px; }
.tt-list { margin: 0; padding-left: 18px; font-size: 13px; }
.tt-list li { margin: 2px 0; }
.tt-list .link { padding: 2px 4px; font-size: 12px; }
.tt-bad code { background: var(--lav); padding: 1px 5px; border-radius: 5px; }
.tt-dialog .tt-field { margin: 12px 0 4px; }
.tt-times-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.tt-suggest { display: flex; flex-direction: column; gap: 2px; margin: 4px 0; max-height: 220px; overflow: auto; }
.tt-sug { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; text-align: left; border: 1px solid var(--border); border-radius: 8px; background: #fff; padding: 7px 10px; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.tt-sug:hover, .tt-sug:focus { border-color: var(--accent); background: #f7f7fe; outline: none; }
.btn.tt-danger { background: #fff; color: var(--err); border: 1.5px solid #f1c4c4; }
@media (max-width: 640px) {
  .tt-times-row { grid-template-columns: 1fr; }
  .tt-bar .btn.small { flex: 1; }
  .tt-scroll { max-height: 64vh; }
}

/* ---- Add event by hand (features/eventManual.js) ---- */
.mf-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.mf-intro { margin: 6px 0 0; }
.mf-tz { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.mf-tz select { width: auto; padding: 4px 8px; font-size: 13px; }
.mf-color { display: flex; gap: 8px; align-items: center; }
.mf-color input[type="color"] { flex: none; width: 44px; height: 38px; padding: 2px; }
.mf-thumb { display: block; max-width: 220px; max-height: 140px; margin-top: 6px; border-radius: 10px; object-fit: cover; background: var(--lav); }
.mf-stale [data-hint], .mf-stale [data-err], .mf-stale .mf-errors { opacity: 0.45; }
.mf-errors { margin: 10px 0 0; padding-left: 18px; color: var(--err); font-size: 13px; font-weight: 600; }
.mf-result { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #e9f7ef; font-size: 14px; }
.mf-result.bad { background: #fbe9e9; color: var(--err); }
.mf-result a { color: var(--navy); font-weight: 600; }
.ed-field input[type="datetime-local"] { min-width: 0; }
.mf-cell textarea { min-height: 70px; }
.import-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.import-head p { margin: 0; }
a.btn { display: inline-block; text-decoration: none; }
@media (max-width: 640px) {
  .mf-card .ed-sticky { gap: 8px; padding: 8px; }
  .mf-card .ed-sticky .grow:empty { display: none; }
  .mf-card .ed-sticky .btn { padding: 8px 10px; font-size: 14px; }
}

/* ---- All events (features/eventList.js): the list and «Move to a managed profile» ---- */
.el-table .el-check { width: 28px; padding-right: 0; }
.el-table td { overflow-wrap: break-word; }
.el-table td:nth-child(2) { min-width: 140px; }
.el-table .el-when { white-space: nowrap; }
.el-table tr.el-on td { background: #f7f7fe; }
.el-table .badge { vertical-align: 1px; }
.el-bar .btn { white-space: nowrap; }
.el-dialog { width: min(860px, calc(100vw - 32px)); }
.el-all { margin: 0 0 8px; }
.el-all .link { padding: 4px 0; font-size: 13px; }
.el-plans { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.el-plan { padding: 9px 12px; border: 1px solid var(--border); border-left: 4px solid var(--lav-2); border-radius: 10px; background: #fff; font-size: 13px; }
.el-plan--on { border-left-color: var(--accent); }
.el-plan-event { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; overflow-wrap: anywhere; }
.el-plan-target { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; margin-top: 5px; overflow-wrap: anywhere; }
.el-plan-do { display: inline-flex; gap: 10px; margin-left: auto; }
.el-plan-do .link, .el-fits .link { padding: 2px 0; font-size: 12px; }
.el-fits { flex-basis: 100%; color: var(--muted); }
.el-search { margin-top: 8px; }
.el-search input { padding: 8px 11px; font-size: 13px; border-radius: 9px; }
.el-sum { margin: 4px 0 10px; padding-left: 18px; font-size: 13px; }
.el-sum li { margin: 6px 0; overflow-wrap: anywhere; }
.el-sum .tiny { display: block; margin-top: 2px; }
.el-results { max-height: 50vh; overflow-y: auto; }
@media (max-width: 640px) {
  .el-table .el-when { white-space: normal; min-width: 96px; }
  .el-plan-do { margin-left: 0; }
  .el-dialog .er-dialog-actions { flex-direction: column-reverse; }
}
.el-dialog .badge:not(.ok):not(.err):not(.warn):not(.chg):not(.managed), .el-table .badge:not(.ok):not(.err):not(.warn):not(.chg):not(.managed) { background: var(--lav-2); color: var(--muted); }
/* The dialog's buttons stay in reach below a long list. */
.el-dialog .er-dialog-actions { position: sticky; bottom: -22px; z-index: 1; margin: 14px -24px -22px; padding: 12px 24px 16px; background: #fff; border-top: 1px solid var(--border); }

/* App versions: one card per platform. */
.av-intro p { margin: 0 0 8px; }
.av-intro p:last-child { margin: 0; }
.av-card, .av-old, #av-list > .card { margin-top: 16px; }
.av-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.av-head h3 { margin: 0; }
.av-now { margin-top: 8px; font-size: 13px; overflow-wrap: anywhere; }
.av-now a { color: var(--accent); }
.field-row > label.av-build { flex: 0 0 160px; min-width: 140px; }
