/* Expert for a Day analytics — single application stylesheet. */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e3e8ef;
  --border-soft: #eef2f6;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #eff4ff;
  --ok: #047857; --ok-soft: #e7f6ef;
  --warn: #b45309; --warn-soft: #fef5e7;
  --danger: #b91c1c; --danger-soft: #fdecec;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .04);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sidebar: 236px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
code, pre { font-family: var(--mono); font-size: 12.5px; }
code { color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border-soft); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
pre { margin: .6rem 0 0; padding: .7rem .85rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); white-space: pre-wrap; word-break: break-all; }
pre code { border: 0; padding: 0; background: none; }
small { display: block; color: var(--muted); font-size: 12px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Buttons & controls */
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); font: 600 13px/1 inherit; font-family: inherit; white-space: nowrap; cursor: pointer; text-decoration: none; transition: background .12s, border-color .12s; }
button:hover, .button:hover { background: var(--surface-2); border-color: #cbd5e1; text-decoration: none; }
button.primary, .button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
button.primary:hover, .button.primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); }
.button.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.button.small, button.small { min-height: 30px; padding: 0 10px; font-size: 12.5px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.icon-button { min-height: 34px; width: 34px; padding: 0; border-color: transparent; background: transparent; color: var(--muted); font-size: 18px; }
.icon-button:hover { background: var(--surface-2); color: var(--text); }
input, select, textarea { width: 100%; min-height: 36px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
input[type="checkbox"], input[type="radio"] { width: 16px; min-height: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
input[type="file"] { padding: 5px; }
label { display: grid; gap: 5px; color: var(--text-2); font-size: 12.5px; font-weight: 600; }
label small { display: inline; font-weight: 500; }

/* App shell */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); z-index: 40; }
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 14px; }
.sidebar-brand a { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 14px; text-decoration: none; }
.sidebar-brand small { font-weight: 500; font-size: 11.5px; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff; font-weight: 800; }
.ops-sidebar-close { display: none; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.nav-group + .nav-group { margin-top: 18px; }
.nav-heading { padding: 0 10px 6px; color: var(--faint); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 1px 0; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 550; text-decoration: none; }
.sidebar-nav a:hover { background: var(--surface-2); color: var(--text); }
.sidebar-nav a.active { background: var(--primary-soft); color: var(--primary-strong); }
.sidebar-nav a.active .ops-nav-icon { color: var(--primary); }
.ops-nav-icon { flex: none; color: var(--faint); }
.sidebar-account { display: flex; align-items: center; gap: 6px; padding: 12px; border-top: 1px solid var(--border-soft); }
.sidebar-account form { margin: 0; }
.account-link { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px; border-radius: var(--radius-sm); color: var(--text); font-weight: 600; font-size: 13px; text-decoration: none; }
.account-link:hover, .account-link.active { background: var(--surface-2); text-decoration: none; }
.account-link small { font-size: 11.5px; font-weight: 500; }
.avatar { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-strong); font-weight: 700; }
.mobile-bar { display: none; }
.app-main { min-width: 0; }
.page { max-width: 1240px; margin: 0 auto; padding: 28px 32px 48px; }
.ops-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 30; }

/* Page header, tabs, filters */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head h1 { font-size: 24px; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; }
.page-head p { margin-top: 4px; color: var(--muted); }
.page-actions, .row-actions, .actions, .filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row-actions { justify-content: flex-end; }
.back-link { display: inline-block; margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.tabs { display: flex; gap: 4px; margin: -4px 0 18px; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs a { padding: 9px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--text); }
.tabs a.active { border-bottom-color: var(--primary); color: var(--primary-strong); }
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-bottom: 20px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.filter-bar label { font-size: 11.5px; color: var(--muted); }
.filter-bar select { min-width: 170px; }
.filter-bar input[type="date"] { width: 150px; }
.filter-bar .filter-search { flex: 1 1 220px; }
.filter-actions { margin-left: auto; }
.filter-bar.compact { flex: 1; margin: 0; }
.filter-bar.slim { display: inline-flex; }
.filter-bar.slim .filter-actions { margin-left: 0; }
.presets { display: inline-flex; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.presets button { min-height: 30px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); font-size: 12.5px; }
.presets button:hover { background: var(--surface); color: var(--text); }
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.toolbar .page-actions { padding-bottom: 13px; }

/* Panels & layout helpers */
.panel { margin-bottom: 20px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel > h2, .panel-head h2 { font-size: 15px; font-weight: 650; }
.panel > h2 { margin-bottom: 12px; }
.panel > .muted { margin: -6px 0 12px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel.narrow { max-width: 560px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-head > span { color: var(--muted); font-size: 12.5px; }
.panel.flush > .panel-head { margin: 0; padding: 14px 20px; border-bottom: 1px solid var(--border-soft); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.stack > .panel:last-child { margin-bottom: 0; }
.grid-2, .grid-main { margin-bottom: 20px; }
.grid-2 > .panel, .grid-main > .panel { margin-bottom: 0; }
.section-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.section-title h2 { font-size: 16px; font-weight: 650; }
.section-title span, .footnote { color: var(--muted); font-size: 12.5px; }
.footnote { margin: -8px 0 20px; }
.notice { margin: 0 0 16px; padding: 10px 14px; border: 1px solid #c7d7fe; border-radius: var(--radius-sm); background: var(--primary-soft); color: #1e3a8a; }
.notice.success { border-color: #b7e4cf; background: var(--ok-soft); color: var(--ok); }
.notice.error, .errorlist { border-color: #f5c2c2; background: var(--danger-soft); color: var(--danger); }
.notice.warn, .notice.warning { border-color: #f6d9a8; background: var(--warn-soft); color: var(--warn); }
.errorlist { list-style: none; margin: 4px 0 0; padding: 6px 10px; border: 1px solid; border-radius: 6px; font-size: 12.5px; }
.empty { padding: 28px 20px; color: var(--muted); text-align: center; }
.help { color: var(--muted); font-size: 12.5px; }

/* KPIs & chart */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: border-color .12s, box-shadow .12s; }
.kpi:hover { border-color: #bfd0f6; box-shadow: 0 4px 14px rgba(37, 99, 235, .08); text-decoration: none; }
.kpi-label { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi strong { font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.delta { color: var(--muted); font-size: 12px; font-weight: 600; }
.delta em { font-style: normal; font-weight: 500; color: var(--faint); }
.delta.up { color: var(--ok); }
.delta.down { color: var(--danger); }
.trend { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 8px; border-bottom: 1px solid var(--border); background: repeating-linear-gradient(to top, transparent 0 34px, var(--border-soft) 34px 35px); }
.trend .bar { position: relative; flex: 1; height: max(3px, var(--height)); border-radius: 4px 4px 0 0; background: #dbe4f3; }
.trend .bar.has-value { background: var(--primary); }
.trend .bar:hover { background: var(--primary-strong); }
.trend .bar i { display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 4px 8px; border-radius: 6px; background: var(--text); color: #fff; font: 600 11.5px/1.3 inherit; font-style: normal; white-space: nowrap; z-index: 2; }
.trend .bar:hover i { display: block; }
.trend-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--faint); font-size: 11.5px; }

/* Lists */
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.rank-list li:first-child { border-top: 0; }
.rank-list li > div:first-child { min-width: 0; }
.rank-list strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rank-list li.empty { justify-content: center; }
.panel.flush .rank-list li { padding-left: 20px; padding-right: 20px; }
.num { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.rank-list form { margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--border-soft); text-align: left; vertical-align: middle; }
th { background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
th.num { text-align: right; }
td { color: var(--text-2); font-size: 13px; }
td strong { color: var(--text); font-weight: 600; }
td small { margin-top: 2px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfd; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
td.right { text-align: right; }
.nowrap { white-space: nowrap; }
code.nowrap { overflow-wrap: normal; }
td.wide { min-width: 220px; }
.cell-link { display: block; margin-top: 4px; font-size: 12px; }
td audio { display: block; height: 32px; margin-top: 6px; max-width: 240px; }
.strong-link { font-weight: 600; }
.inline-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.inline-form select { width: auto; min-width: 120px; min-height: 30px; padding: 3px 8px; font-size: 12.5px; }

/* Badges & status dots */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: #f1f5f9; color: var(--text-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.info { background: var(--primary-soft); color: var(--primary-strong); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #cbd5e1; vertical-align: middle; }
.dot.ok { background: #10b981; }

/* Forms */
.simple { display: grid; gap: 14px; }
.simple p { display: grid; gap: 5px; margin: 0; }
.simple p label { display: block; }
.simple .helptext { color: var(--muted); font-size: 12px; }
.check-row { display: flex; align-items: center; gap: 8px; }
.check-row label { display: inline; font-weight: 500; color: var(--text-2); font-size: 13px; }
.form-footer { display: flex; justify-content: flex-end; gap: 8px; padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--border-soft); }
#routing-form > .form-footer { padding: 16px 0 0; }
.explain { margin: 0; }
.explain > div + div { margin-top: 14px; }
.explain dt { font-weight: 600; color: var(--text); }
.explain dd { margin: 3px 0 0; color: var(--muted); }
.steps { margin: 0; padding-left: 20px; color: var(--text-2); }
.steps li + li { margin-top: 10px; }
.menu-button { position: relative; }
.menu-button summary { list-style: none; }
.menu-button summary::-webkit-details-marker { display: none; }
.menu-button .menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 10px 30px rgba(15, 23, 42, .12); z-index: 20; }
.menu-button .menu a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--text-2); font-weight: 550; }
.menu-button .menu a:hover { background: var(--surface-2); text-decoration: none; }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 0 0 20px; }
.facts > div { padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.facts dt { color: var(--muted); font-size: 11.5px; font-weight: 650; letter-spacing: .03em; text-transform: uppercase; }
.facts dd { margin: 4px 0 0; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.submission-detail .facts > div { background: var(--surface-2); }

/* Form submissions */
.submission-row { border-top: 1px solid var(--border-soft); }
.submission-row:first-child { border-top: 0; }
.submission-row summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 14px 20px; cursor: pointer; list-style: none; }
.submission-row summary::-webkit-details-marker { display: none; }
.submission-row summary:hover { background: #fafbfd; }
.submission-row summary strong { display: block; font-weight: 600; }
.submission-row[open] summary { background: var(--surface-2); }
.submission-detail { padding: 6px 20px 18px; }
.submission-detail .facts { margin: 8px 0 12px; }
.submission-message { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2); }

/* Pagination */
.report-pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--border-soft); color: var(--muted); font-size: 13px; }
.panel:not(.flush) .report-pagination { padding: 12px 0 0; }

/* Visit log */
.ops-results-bar { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.ops-results-bar strong { color: var(--text); }
.ta-vlog { list-style: none; margin: 0 0 20px; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.ta-vlog-entry { position: relative; display: grid; grid-template-columns: 110px minmax(150px, 1fr) minmax(150px, 1fr) minmax(0, 2fr) 28px; gap: 20px; align-items: start; padding: 16px 20px; border-top: 1px solid var(--border-soft); }
.ta-vlog-entry:first-child { border-top: 0; }
.ta-vlog-entry:hover { background: #fafbfd; }
.ta-vlog-when strong { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.ta-vlog-when span, .ta-vlog-visitor > span, .ta-vlog-system > span, .ta-vlog-system small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.ta-vlog-visitor strong { display: block; font-weight: 600; }
.ta-vlog-ip { display: block; margin-top: 4px; font-family: var(--mono); font-size: 12px; }
.ta-vlog-asn a { color: var(--muted); }
.ta-vlog-icons { display: flex !important; gap: 8px; color: var(--faint); margin: 0 0 4px !important; }
.ta-vlog-return { color: var(--primary); }
.ta-vlog-identity { color: var(--text-2) !important; font-size: 12.5px !important; }
.ta-vlog-activity { min-width: 0; }
.ta-vlog-summary { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12.5px; }
.ta-vlog-summary strong { color: var(--text); }
.ta-vlog-pages { list-style: none; margin: 0; padding: 0; }
.ta-vlog-pages li { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; min-width: 0; }
.ta-page-arrow { flex: none; padding-top: 2px; color: var(--faint); }
.ta-vlog-pages li:first-child .ta-page-arrow { color: #10b981; }
.ta-page-arrow.exit { color: #f59e0b; }
.ta-page-body { display: flex; flex-direction: column; min-width: 0; }
.ta-page-body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.ta-page-urlline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; }
.ta-page-urlline code { font-size: 11.5px; }
.ta-page-meta { color: var(--faint); font-size: 11.5px; white-space: nowrap; }
.ta-vlog-status { display: none; }
.ta-vlog-go { align-self: center; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--faint); font-size: 20px; text-decoration: none !important; }
.ta-vlog-entry:hover .ta-vlog-go { background: var(--primary-soft); color: var(--primary); }
.ta-vlog-empty { padding: 32px; text-align: center; color: var(--muted); }
.ta-timeline { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.ta-timeline li { position: relative; padding: 10px 0 10px 40px; border-top: 1px solid var(--border-soft); counter-increment: step; }
.ta-timeline li:first-child { border-top: 0; }
.ta-timeline li::before { content: counter(step); position: absolute; left: 0; top: 10px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-strong); font-size: 11.5px; font-weight: 700; }
.ta-timeline strong { display: block; font-weight: 600; }
.ta-timeline .visit-path { display: inline-block; margin-top: 3px; }
.ta-timeline span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }

/* Login */
.login { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card { width: min(100%, 380px); padding: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 10px 40px rgba(15, 23, 42, .08); }
.login-card .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; font-weight: 700; }
.login-card .mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff; }
.login-card h1 { font-size: 22px; letter-spacing: -.02em; }
.login-card > .muted { margin: 6px 0 20px; }
.login-card form { display: grid; gap: 14px; }
.login-card form p { display: grid; gap: 5px; margin: 0; }
.login-card button { width: 100%; min-height: 40px; }

/* Printable report page */
.print-report { min-height: 100vh; padding: 24px 0 48px; background: #f3f5f9; }
.report-toolbar { width: min(100% - 2rem, 680px); margin: 0 auto 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.report-toolbar-title { font-size: 13px; font-weight: 600; color: var(--muted); }
.report-toolbar .primary { border-radius: 999px; padding: 0 18px; }
.print-report .report-card td, .print-report .report-card th { padding: 0; border-bottom: 0; font-size: inherit; background: none; text-transform: none; letter-spacing: normal; }
.print-report tbody tr:hover td { background: none; }
.print-report h1 { color: #fff; }
.print-report [align="right"] { text-align: right; }
.print-report > table { table-layout: fixed; }

/* Review additions */
.text-warn { color: var(--warn) !important; }
small.inline { display: inline; }
.trend.leads .bar.has-value { background: #10b981; }
.trend.leads .bar.has-value:hover { background: var(--ok); }
.facts.compact { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-bottom: 14px; }
.facts.compact > div { background: var(--surface-2); }
.link-row { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-weight: 600; font-size: 13px; }
.panel audio { width: 100%; margin-top: 12px; }
.panel textarea { min-height: 110px; resize: vertical; }
.copy-field { display: flex; gap: 8px; margin-bottom: 4px; }
.copy-field input { font-family: var(--mono); font-size: 12px; background: var(--surface-2); }
.empty-inline { color: var(--muted); }
.empty-state { display: grid; justify-items: center; gap: 8px; padding: 44px 20px; text-align: center; }
.empty-state strong { font-size: 15px; }
.empty-state p { max-width: 420px; color: var(--muted); }
.empty-state .button { margin-top: 6px; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.segmented a { padding: 6px 12px; color: var(--text-2); font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.segmented a + a { border-left: 1px solid var(--border); }
.segmented a:hover { background: var(--primary-soft); color: var(--primary-strong); }
.page-actions .badge { font-size: 12.5px; padding: 4px 11px; }
td .badge + small { margin-top: 4px; }
.panel > .help { margin: -4px 0 12px; }

/* Responsive */
@media (max-width: 1100px) {
  .ta-vlog-entry { grid-template-columns: 100px minmax(0, 1fr) minmax(0, 1.4fr) 28px; }
  .ta-vlog-system { display: none; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; width: 272px; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.is-open { transform: none; box-shadow: 0 10px 40px rgba(15, 23, 42, .2); }
  .ops-sidebar-close { display: inline-flex; }
  .mobile-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .mobile-title { font-weight: 650; }
  .page { padding: 20px 16px 40px; }
  .grid-2, .grid-main { grid-template-columns: minmax(0, 1fr); }
  .page-head { flex-direction: column; align-items: stretch; }
  .filter-bar select, .filter-bar input[type="date"] { width: 100%; min-width: 0; }
  .filter-bar label { flex: 1 1 140px; }
  .filter-actions { margin-left: 0; }
  .ta-vlog-entry { grid-template-columns: minmax(0, 1fr) 28px; gap: 8px; }
  .ta-vlog-when { grid-column: 1; }
  .ta-vlog-visitor, .ta-vlog-activity { grid-column: 1; }
  .ta-vlog-go { grid-column: 2; grid-row: 1 / span 3; }
  .submission-row summary { grid-template-columns: minmax(0, 1fr) auto; }
  .rank-list li { flex-wrap: wrap; }
  .rank-list li > .row-actions { width: 100%; justify-content: flex-start; }
  .segmented { flex: 1 1 100%; }
  .rank-list li > .row-actions { flex-wrap: wrap; }
  .segmented a { flex: 1; text-align: center; padding: 7px 6px; }
  .facts.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-head { flex-wrap: wrap; }
  .submission-row summary > .nowrap { grid-column: 1 / -1; }
}
@media print {
  :root, body { background: white; }
  .report-toolbar { display: none; }
  .print-report { min-height: 0; padding: 0; background: white; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-report .report-card { box-shadow: none !important; }
  .print-report tr { break-inside: avoid; }
}
@media screen and (max-width: 540px) {
  .print-report { padding-top: 16px; }
  .print-report .report-hero, .print-report .report-content, .print-report .report-footer { padding-inline: 20px !important; }
}
