:root {
  color-scheme: light dark;
  --bg: #f7f7f8;
  --shell: #ffffff;
  --panel: #ffffff;
  --panel-2: #fbfbfc;
  --text: #121316;
  --muted: #666b76;
  --line: #e5e7eb;
  --line-strong: #d7dae0;
  --accent: #ff4f0a;
  --accent-2: #ff6b1a;
  --accent-soft: #fff0e8;
  --green: #25b15a;
  --blue: #2c7be5;
  --purple: #7c3aed;
  --amber: #d98b05;
  --danger: #ff3232;
  --shadow: 0 14px 40px rgba(16, 24, 40, .06);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080b0d;
    --shell: #0d1013;
    --panel: #111519;
    --panel-2: #0d1115;
    --text: #f5f6f7;
    --muted: #a7adb7;
    --line: #252a30;
    --line-strong: #333941;
    --accent-soft: #4a210d;
    --shadow: 0 20px 60px rgba(0, 0, 0, .35);
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f7f8;
  --shell: #ffffff;
  --panel: #ffffff;
  --panel-2: #fbfbfc;
  --text: #121316;
  --muted: #666b76;
  --line: #e5e7eb;
  --line-strong: #d7dae0;
  --accent-soft: #fff0e8;
  --shadow: 0 14px 40px rgba(16, 24, 40, .06);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080b0d;
  --shell: #0d1013;
  --panel: #111519;
  --panel-2: #0d1115;
  --text: #f5f6f7;
  --muted: #a7adb7;
  --line: #252a30;
  --line-strong: #333941;
  --accent-soft: #4a210d;
  --shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; background: var(--bg); color: var(--text); }
body { font-size: 14px; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; letter-spacing: 0; }
select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.1; font-weight: 780; }
h1:focus { outline: none; }
h2 { font-size: 18px; line-height: 1.25; }
h3 { font-size: 15px; line-height: 1.25; }
p, small, span, td, th, input, button, a { line-height: 1.35; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: color-mix(in oklab, var(--shell) 92%, transparent);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 18px;
  padding: 0 6px;
}

.brand strong { font-size: 24px; font-weight: 850; white-space: nowrap; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.nav-group { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.nav-group:first-of-type { border-top: 0; }
.nav-group p, .label {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  margin: 0 0 8px;
}

.nav-item {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 7px;
  padding: 0 12px;
  color: var(--text);
  font-weight: 600;
}

.nav-item.active, .nav-item:hover {
  color: var(--accent);
  background: linear-gradient(90deg, var(--accent-soft), transparent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.icon { width: 22px; text-align: center; color: inherit; }

.sidebar-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.status-card { margin-top: auto; display: grid; gap: 14px; }
.service-row { display: flex; gap: 8px; }
.service-row span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 12px;
}
.service-row b, .ok-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-left: 5px;
}
.status-card small { color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.help-card { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; }
.help-card small { display: block; color: var(--muted); margin-top: 4px; }

.main { min-width: 0; }
.topbar {
  height: 70px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklab, var(--shell) 92%, transparent);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 34px;
  gap: 12px;
}
.topbar-spacer { flex: 1; }
.profile { display: flex; align-items: center; gap: 12px; }
.profile-menu { position: relative; }
.profile-button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  min-height: 48px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
}
.profile-button small { display: block; color: var(--muted); text-align: left; }
.profile-button strong { display: block; text-align: left; }
.chevron {
  width: 9px;
  height: 9px;
  margin-left: 2px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .16s ease, border-color .16s ease;
}
.profile-button:hover .chevron { border-color: var(--accent); }
.chevron.open { transform: rotate(-135deg); }
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 246px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
  padding: 8px;
  z-index: 20;
}
.dropdown-identity {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 8px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.dropdown-identity small { display: block; color: var(--muted); margin-top: 2px; }
.dropdown-menu a,
.dropdown-menu button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-weight: 700;
  text-align: left;
}
.dropdown-menu a:hover,
.dropdown-menu button:hover { background: var(--accent-soft); color: var(--accent); }
.theme-toggle {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 7px;
  min-height: 36px;
  padding: 0 12px;
  font-weight: 800;
}
.theme-toggle.icon-theme {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  font-size: 19px;
  line-height: 1;
  box-shadow: var(--shadow);
}
.theme-toggle.icon-theme:hover {
  color: var(--accent);
  border-color: rgba(255, 79, 10, .32);
  background: var(--accent-soft);
}
.profile small { display: block; color: var(--muted); }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f6b28f, #1f2937);
  color: #fff;
  font-weight: 800;
  border: 2px solid color-mix(in oklab, var(--panel), #fff 20%);
}
.avatar.small { width: 32px; height: 32px; font-size: 11px; flex: 0 0 auto; }
.avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  background: var(--line);
  border: 2px solid color-mix(in oklab, var(--panel), #fff 20%);
}
.avatar-img.small { width: 32px; height: 32px; flex: 0 0 auto; }

.content { padding: 34px; max-width: 1680px; }
.page-head { display: flex; justify-content: space-between; align-items: start; gap: 24px; margin-bottom: 22px; }
.page-head p, .breadcrumb { color: var(--muted); margin-top: 6px; }
.page-head.compact { margin-bottom: 16px; }
.breadcrumb { margin-bottom: 12px; }
.actions, .publish-bar { display: flex; gap: 14px; }
.button {
  min-height: 42px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 750;
  background: var(--panel);
  color: var(--text);
}
.button.primary {
  color: #fff;
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: 0 10px 20px rgba(255, 79, 10, .18);
}
.button.secondary { background: var(--panel); }
.button.slim { min-height: 36px; margin-left: auto; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.metric {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: 14px;
  align-items: center;
  box-shadow: var(--shadow);
}
.metric-icon {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 900;
}
.metric strong { font-size: 28px; }
.metric small, .metric em { grid-column: 2; color: var(--muted); font-style: normal; }
.metric em { color: var(--green); font-weight: 700; font-size: 12px; }
.metric em.warn { color: var(--accent); }
.metric em.muted { color: var(--muted); }

.filters {
  display: grid;
  grid-template-columns: 1.6fr .8fr .7fr .7fr .55fr;
  gap: 14px;
  margin-bottom: 14px;
}
.filters label, .filters button, .search, .copy-field {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.filters label:not(.search) { flex-direction: column; align-items: start; gap: 0; font-size: 11px; }
.filters strong { color: var(--text); font-size: 13px; }
.filters label span:last-child { margin-left: auto; }
input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}
.search.hot { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 79, 10, .06); }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
}
.panel h3 { margin-bottom: 7px; }
.panel p { color: var(--muted); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }

.data-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.data-table th, .data-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}
.data-table th { color: var(--muted); font-size: 12px; font-weight: 800; background: var(--panel-2); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table span { color: var(--muted); }
.title-link { font-weight: 800; }
.path { white-space: normal; overflow-wrap: anywhere; }
.copy, .dots {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px 6px;
  font-weight: 900;
}
.copy.danger { color: var(--danger); }

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 6px;
  padding: 3px 9px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.chip.success { color: #14803d; background: color-mix(in oklab, var(--green) 16%, transparent); border-color: color-mix(in oklab, var(--green) 25%, transparent); }
.chip.review { color: var(--amber); background: rgba(217, 139, 5, .12); border-color: rgba(217, 139, 5, .22); }
.chip.draft, .chip.subtle { color: var(--muted); background: color-mix(in oklab, var(--line) 45%, transparent); border-color: var(--line); }
.chip.admin { color: var(--accent); background: var(--accent-soft); border-color: rgba(255, 79, 10, .16); }
.chip.team { color: var(--blue); background: rgba(44, 123, 229, .12); }
.chip.external { color: #0f9f68; background: rgba(15, 159, 104, .12); }
.chip.purple { color: var(--purple); background: rgba(124, 58, 237, .12); }

.avatars { display: flex; align-items: center; }
.avatars span, .avatars em {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-right: -7px;
  border: 2px solid var(--panel);
  background: linear-gradient(145deg, #f6b28f, #273343);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.avatars em { background: color-mix(in oklab, var(--line) 70%, var(--panel)); color: var(--text); margin-left: 8px; margin-right: 0; }

.flow-panel { margin-top: 20px; }
.flow-panel h2 { margin-bottom: 2px; }
.flow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 36px; align-items: center; margin-top: 20px; }
.flow-step {
  min-height: 106px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
  position: relative;
}
.flow-step span { color: var(--accent); font-size: 24px; }
.flow-step small { color: var(--muted); }
.flow-step b {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
}
.flow-step:not(:last-child)::after { content: "→"; position: absolute; right: -26px; color: var(--muted); font-size: 22px; }

.stepper { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 20px; margin: 24px 0; }
.step { position: relative; display: grid; gap: 4px; }
.step::after { content: ""; position: absolute; top: 15px; left: 43px; right: -14px; height: 1px; background: var(--line-strong); }
.step:last-child::after { display: none; }
.step b {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in oklab, var(--line) 80%, var(--panel));
  z-index: 1;
}
.step.active b, .step:first-child b { color: #fff; background: var(--accent); }
.step small { color: var(--green); font-weight: 700; }
.step.active small { color: var(--accent); }

.import-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.import-real-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr);
  gap: 16px;
  align-items: start;
}
.meetings-panel { min-height: 560px; }
.meeting-list { display: grid; gap: 8px; margin-top: 12px; }
.meeting-row {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 8px;
  min-height: 72px;
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}
.meeting-row:hover,
.meeting-row.selected { border-color: var(--accent); background: var(--accent-soft); }
.meeting-row small { display: block; color: var(--muted); margin-top: 4px; }
.meeting-row b { color: var(--muted); font-size: 12px; }
.meeting-actions {
  display: grid;
  justify-items: end;
  gap: 6px;
}
.fathom-open-link {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 79, 10, .28);
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.recording-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 50, 50, .12);
}
.recording-dot.imported {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(37, 177, 90, .12);
}
.classification-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 12px;
  margin-top: 14px;
}
.classification-box select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  padding: 0 10px;
}
.browser-fallback { margin-top: 16px; }
.import-preview { position: sticky; top: 88px; }
.browser-import-panel { grid-column: 1; }
.browser-steps {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}
.browser-steps div {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}
.browser-steps b {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
}
.bookmarklet {
  width: max-content;
  min-width: 180px;
}
.extension-note {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 12px;
  display: grid;
  gap: 5px;
}
.extension-note span { color: var(--muted); }
.extension-note code {
  color: var(--accent);
  font: 12px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.extension-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.extension-actions a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 79, 10, .22);
  border-radius: 6px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0 10px;
  font-weight: 800;
}
.browser-json {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  padding: 12px;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.preview-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.summary-preview {
  margin: 14px 0;
  max-height: 150px;
  overflow: auto;
  color: var(--muted);
}
.button.full { width: 100%; margin-top: 10px; }
.real-users-card,
.real-tasks-card { grid-column: span 1; }
.real-user-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.real-user {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 10px;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  min-width: 0;
}
.real-user small,
.real-user span { display: block; color: var(--muted); overflow-wrap: anywhere; }
.real-user span { margin-top: 3px; font-size: 12px; font-weight: 800; }
.task-import-list { display: grid; gap: 8px; margin-top: 12px; }
.task-import-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 12px;
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 12px;
  align-items: start;
}
.task-import-row small { display: block; color: var(--muted); margin-top: 4px; }
.task-status {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border-radius: 50%;
  border: 2px solid var(--amber);
}
.task-status.done { border-color: var(--green); background: var(--green); }
.error-notice {
  border-color: rgba(255, 50, 50, .35);
  background: rgba(255, 50, 50, .08);
  color: var(--danger);
  margin-top: 12px;
}
.compact-stepper { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.import-grid .wide { grid-column: span 2; }
.content-card { grid-column: span 2; }
.input-action { display: grid; grid-template-columns: 1fr 150px; gap: 14px; margin: 12px 0; }
.input-action input, .form-grid input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: var(--panel-2);
}
.ok-line { color: var(--green); font-weight: 700; }
.check-row, .person-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.check-row:last-child, .person-row:last-child { border-bottom: 0; }
.check-row span { color: var(--green); }
.check-row b { margin-left: auto; color: var(--green); background: rgba(37, 177, 90, .12); border-radius: 6px; padding: 3px 7px; font-size: 11px; }
.activity { margin-top: 18px; }
.field-label { display: block; color: var(--muted); font-size: 12px; font-weight: 800; margin: 14px 0 6px; }
.url-final { color: var(--accent); overflow-wrap: anywhere; }
.fathom-card { display: grid; grid-template-columns: 46px 1fr; gap: 12px; }
.fathom-logo { color: #1f8fff; font-size: 28px; }
dl { display: grid; grid-template-columns: 130px 1fr; gap: 12px; margin: 16px 0 0; }
dt { color: var(--muted); font-weight: 700; }
dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.mini-card-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.mini-card-grid > div { min-height: 128px; border: 1px solid var(--line); border-radius: 7px; padding: 14px; display: grid; gap: 8px; }
.mini-card-grid small { color: var(--muted); }
.mini-lines, .mini-table, .mini-diagram, .mini-images { display: block; height: 50px; border-radius: 5px; background: linear-gradient(135deg, var(--line), transparent); }
.person-row button, .ghost-full {
  margin-left: auto;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 6px;
  min-height: 30px;
  padding: 0 10px;
}
.person-row small { display: block; color: var(--muted); }
.task-line { display: flex; gap: 9px; align-items: center; padding: 8px 0; color: var(--muted); }
.task-line span { margin-left: auto; }
.ghost-full { width: 100%; margin-top: 12px; color: var(--text); }
.pdf-box { border: 1px solid var(--line); border-radius: 7px; padding: 16px; display: grid; gap: 6px; margin: 12px 0; }
.pdf-box span { color: var(--danger); font-weight: 900; }
.publish-bar { margin-top: 18px; }
.publish-bar .button { flex: 1; }

.call-detail-page { display: grid; gap: 16px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; }
.detail-top { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr); gap: 16px; }
.video-frame { border-radius: var(--radius); overflow: hidden; background: #101010; min-height: 320px; }
.video-stage {
  display: grid;
  gap: 14px;
  padding: 14px;
}
.large-video { min-height: 640px; }
.large-video video {
  width: 100%;
  height: min(68vh, 720px);
  min-height: 560px;
  display: block;
  background: #050505;
}
.large-video iframe { width: 100%; height: 520px; border: 0; display: block; background: #050505; }
.video-first { grid-template-columns: minmax(0, 1.7fr) minmax(320px, .75fr); }
.video-art {
  height: 100%;
  min-height: 640px;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .7)),
    linear-gradient(135deg, #4c5859, #1f1712 55%, #0d1117);
  position: relative;
}
.play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .92);
  color: #111;
  display: grid;
  place-items: center;
  font-weight: 900;
  text-align: center;
}
.video-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.video-actions span {
  margin-left: auto;
  color: var(--muted);
  font-weight: 800;
}
.detail-facts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .7fr);
  gap: 16px;
}
.facts dl { grid-template-columns: 150px 1fr; }
.compact-participants { align-self: start; }
.participant-strip { display: grid; gap: 4px; margin-top: 10px; }
.quick-panel { display: grid; grid-template-columns: 1.1fr repeat(3, 1fr); gap: 20px; margin: 16px 0; align-items: center; }
.quick-panel a { border-left: 1px solid var(--line); padding-left: 20px; color: var(--muted); }
.quick-panel b { display: block; color: var(--accent); margin-top: 4px; }
.tabs { display: flex; align-items: center; border-bottom: 1px solid var(--line); gap: 8px; }
.tabs button:not(.button) { border: 0; background: transparent; padding: 13px 16px; color: var(--muted); font-weight: 800; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }
.page-render { border-top-left-radius: 0; border-top-right-radius: 0; }
.page-render > p { margin: 5px 0 18px; }
.transcript-box {
  margin: 14px 0 0;
  max-height: 620px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  padding: 16px;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.content-grid { display: grid; grid-template-columns: 1fr 1fr .8fr; gap: 14px; margin-bottom: 20px; }
.fixed-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0 22px; }
.content-box { border: 1px solid var(--line); border-radius: 7px; padding: 16px; }
.content-box ol { padding-left: 18px; margin: 10px 0 0; }
.content-box ul { padding-left: 18px; margin: 10px 0 0; color: var(--muted); }
.generated-page { display: grid; gap: 16px; }
.generated-fixed {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.summary-rich {
  display: grid;
  gap: 10px;
  max-width: 980px;
  margin-top: 8px;
}
.summary-rich p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.62;
}
.summary-rich p:first-child {
  color: var(--text);
  font-weight: 650;
}
.creative-block {
  --block-accent: var(--accent);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .75fr);
  gap: 22px;
  align-items: center;
  min-height: 210px;
  border: 1px solid color-mix(in oklab, var(--block-accent) 25%, var(--line));
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--block-accent) 10%, transparent), transparent 48%),
    var(--panel-2);
  overflow: hidden;
}
.creative-copy h3 { font-size: 22px; margin-bottom: 8px; }
.creative-copy p, .creative-copy li { color: var(--muted); }
.creative-copy ul { padding-left: 18px; }
.creative-visual {
  width: 100%;
  min-height: 160px;
  border-radius: 8px;
  object-fit: cover;
  background: color-mix(in oklab, var(--block-accent) 16%, var(--panel));
}
.svg-visual {
  display: grid;
  place-items: center;
  padding: 12px;
}
.svg-visual svg { max-width: 100%; max-height: 220px; }
.generated-shape {
  position: relative;
  display: grid;
  place-items: center;
}
.generated-shape::before,
.generated-shape::after,
.generated-shape span {
  content: "";
  position: absolute;
  border-radius: 999px;
  border: 2px solid color-mix(in oklab, var(--block-accent) 70%, white);
}
.generated-shape::before { width: 150px; height: 150px; }
.generated-shape::after { width: 88px; height: 88px; background: color-mix(in oklab, var(--block-accent) 18%, transparent); }
.generated-shape span { width: 28px; height: 28px; background: var(--block-accent); }
.creative-block.full { grid-template-columns: 1fr; }
.creative-block.quote { min-height: 150px; }
.creative-block.quote .creative-copy h3 { font-size: 28px; }
.anim-pulse .creative-visual { animation: pulse-soft 2.8s ease-in-out infinite; }
.anim-float .creative-visual { animation: float-soft 4s ease-in-out infinite; }
.anim-scan .creative-visual { position: relative; }
.anim-scan .creative-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--block-accent) 32%, transparent), transparent);
  animation: scan-soft 3.2s linear infinite;
}
@keyframes pulse-soft { 0%, 100% { transform: scale(1); opacity: .95; } 50% { transform: scale(1.025); opacity: 1; } }
@keyframes float-soft { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes scan-soft { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.funnel span { display: block; margin: 8px auto; width: 80%; text-align: center; color: #fff; background: linear-gradient(180deg, #ffbd8e, #b65316); clip-path: polygon(8% 0, 92% 0, 82% 100%, 18% 100%); padding: 8px; }
.compact-table th, .compact-table td { padding: 9px 10px; }
.negative { color: var(--danger); font-weight: 800; }
.right-rail { display: grid; gap: 16px; align-content: start; }
.matrix { width: 100%; border-collapse: collapse; }
.matrix th, .matrix td { padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 12px; text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.perm.yes, .matrix td:not(:first-child) { color: var(--green); font-weight: 900; }
.perm.no { color: var(--muted); }
.task-card { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.task-card small { display: block; color: var(--muted); margin-top: 5px; }

.selected-call { display: grid; grid-template-columns: 48px 1fr auto; gap: 14px; align-items: center; margin-bottom: 16px; }
.users-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; margin-bottom: 16px; }
.users-grid.lower { grid-template-columns: 1.35fr .9fr; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.span-2 { grid-column: span 2; }
.segmented { display: flex; gap: 6px; }
.segmented button {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
}
.segmented .active { color: #fff; background: var(--accent); border-color: var(--accent); }
.person-inline { display: flex; align-items: center; gap: 10px; }
.person-inline > div { min-width: 170px; }
.person-inline small { display: block; overflow-wrap: anywhere; color: var(--muted); }
.notice {
  border: 1px solid rgba(255, 79, 10, .35);
  background: color-mix(in oklab, var(--accent-soft) 45%, transparent);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--muted);
}
.empty-state { display: grid; gap: 10px; padding: 24px; }
.danger-button {
  border: 1px solid rgba(255, 50, 50, .35);
  background: rgba(255, 50, 50, .08);
  color: var(--danger);
  border-radius: 6px;
  min-height: 32px;
  padding: 0 10px;
  font-weight: 800;
}
.role-input {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  background: var(--panel-2);
}
.permissions-table input[type="checkbox"] { width: 16px; height: 16px; }
.inline-add-user {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr 1fr auto;
  gap: 10px;
  margin: 16px 0;
}
.inline-add-user input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  padding: 0 10px;
}
.title-editor {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.title-editor input,
.classification-box input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
  padding: 0 10px;
}
.check-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  font-weight: 800;
}
.check-row input { width: 16px; height: 16px; }
.muted-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.video-art small {
  display: block;
  max-width: 70%;
  color: var(--muted);
  text-align: center;
}
.editable-users-table td { vertical-align: top; }
.table-input {
  width: 100%;
  min-width: 120px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
  padding: 0 9px;
}
.table-input.wide { min-width: 220px; }
.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.editable-users-table .progress-loader { min-width: 260px; }
.page-json {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
  max-height: 320px;
  overflow: auto;
  background: var(--panel-2);
}
.compact-search { max-width: 360px; }

.progress-loader {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 13px;
  align-items: center;
  padding: 14px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--panel-2), var(--panel));
}
.progress-loader.compact {
  grid-template-columns: 30px 1fr;
  padding: 10px 12px;
}
.progress-loader strong { display: block; font-size: 13px; }
.progress-loader small { display: block; margin-top: 2px; color: var(--muted); }
.loader-ring {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-right-color: var(--accent);
  animation: loader-spin .85s linear infinite;
}
.progress-loader.compact .loader-ring {
  width: 26px;
  height: 26px;
  border-width: 2px;
}
.loader-track {
  height: 5px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}
.loader-track span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: loader-slide 1.2s ease-in-out infinite;
}
button:disabled,
input:disabled {
  cursor: wait;
  opacity: .62;
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

@keyframes loader-slide {
  0% { transform: translateX(-120%); }
  50% { transform: translateX(35%); }
  100% { transform: translateX(240%); }
}

#blazor-error-ui {
  color-scheme: light only;
  background: #fff8d9;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0,0,0,.2);
  display: none;
  left: 0;
  padding: .7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
.loading-progress {
  position: fixed;
  width: 72px;
  height: 72px;
  inset: 42vh 0 auto 0;
  margin: 0 auto;
}
.loading-progress circle {
  fill: none;
  stroke-width: .55rem;
  stroke: var(--line);
  transform-origin: 50% 50%;
  transform: rotate(-90deg);
}
.loading-progress circle:last-child {
  stroke: var(--accent);
  stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * .8), 500%;
}
.loading-progress-text {
  position: fixed;
  inset: calc(42vh + 84px) 0 auto 0;
  text-align: center;
  color: var(--muted);
}
.loading-progress-text::after { content: var(--blazor-load-percentage-text, "Loading"); }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 88px minmax(0, 1fr); }
  .brand strong, .brand span:last-child, .nav-item:not(.active), .nav-group p, .sidebar-card { display: none; }
  .brand { justify-content: center; }
  .nav-item { justify-content: center; padding: 0; }
  .metrics-grid, .filters, .import-grid, .import-real-layout, .detail-layout, .detail-top, .users-grid, .users-grid.lower, .content-grid, .fixed-grid, .creative-block { grid-template-columns: 1fr; }
  .import-grid .wide, .content-card { grid-column: auto; }
  .import-preview { position: static; }
  .real-user-grid { grid-template-columns: 1fr; }
  .stepper { grid-template-columns: repeat(4, 1fr); }
  .right-rail { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: 12px; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px; }
  .page-head, .actions, .publish-bar, .quick-panel { display: grid; grid-template-columns: 1fr; }
  .data-table { min-width: 900px; }
  .panel { overflow-x: auto; }
  h1 { font-size: 24px; }
}
