:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --ink: #172033;
  --muted: #657188;
  --line: #dfe6ef;
  --blue: #1d5fd1;
  --blue-soft: #e7f0ff;
  --green: #14845c;
  --amber: #a86600;
  --red: #b42318;
  --purple: #6842d9;
  --teal: #0f8f8a;
  --shadow: 0 18px 50px rgba(25, 38, 64, 0.12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, textarea, select { font: inherit; }
button {
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}
button:disabled { opacity: .55; cursor: not-allowed; }
body.modal-open { overflow: hidden; }
.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.danger {
  background: var(--red);
  color: #fff;
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}
textarea { resize: vertical; }
.app-shell { min-height: 100vh; }
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 420px;
  gap: 48px;
  align-items: center;
  padding: 8vw;
  background:
    linear-gradient(135deg, rgba(29, 95, 209, .14), transparent 34%),
    radial-gradient(circle at 78% 20%, rgba(20, 132, 92, .14), transparent 26%),
    #f6f8fb;
}
.login-brand { max-width: 780px; display: flex; gap: 24px; align-items: flex-start; }
.brand-mark {
  width: 64px; height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, #114db5, #159a70);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 30px;
  box-shadow: var(--shadow);
}
.brand-mark.small { width: 42px; height: 42px; border-radius: 10px; font-size: 20px; box-shadow: none; }
.eyebrow { color: var(--blue); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.login-brand h1 { font-size: clamp(40px, 5vw, 72px); line-height: 1; margin: 8px 0 18px; letter-spacing: 0; }
.login-copy { font-size: 20px; color: var(--muted); max-width: 620px; }
.login-card {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(223,230,239,.9);
  border-radius: 12px;
  padding: 28px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}
.login-card label { display: grid; gap: 8px; color: var(--muted); font-weight: 700; }
.error-text { color: var(--red); min-height: 20px; margin: 0; }
.dashboard { padding: 22px; display: grid; gap: 18px; }
.topbar, .tasks-card, .legend-panel, .chat-panel, .output-panel, .metrics-row article, .cockpit-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(25, 38, 64, .04);
}
.topbar {
  min-height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
}
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-row span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.topbar-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); }
.refresh-status {
  max-width: 210px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  white-space: normal;
}
.refresh-status.error {
  color: var(--red);
  font-weight: 700;
}
.client-switcher {
  display: grid;
  gap: 3px;
  min-width: 220px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.client-switcher select {
  padding: 8px 10px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 700;
}
.metrics-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
.metrics-row article { padding: 16px; display: grid; gap: 8px; }
.metrics-row span { color: var(--muted); font-size: 13px; font-weight: 700; }
.metrics-row strong { font-size: 26px; }
.cockpit-grid {
  display: grid;
  grid-template-columns: minmax(380px, 1.35fr) minmax(260px, .9fr) minmax(260px, .9fr);
  gap: 14px;
  align-items: stretch;
}
.cockpit-panel {
  padding: 16px;
  min-height: 180px;
}
.next-actions-panel { grid-row: span 2; }
.opportunities-panel { grid-column: span 2; }
.panel-head.compact {
  display: block;
  margin-bottom: 10px;
}
.next-actions-list, .opportunity-list, .status-groups, .client-summary {
  display: grid;
  gap: 10px;
}
.action-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  background: var(--panel-soft);
  color: var(--ink);
  display: grid;
  gap: 8px;
  text-align: left;
}
.action-card strong {
  display: block;
  font-size: 15px;
}
.action-card small, .opportunity-card small {
  color: var(--muted);
}
.action-card em {
  justify-self: start;
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.action-card-large {
  gap: 12px;
}
.action-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 5px 8px;
  background: #edf2f7;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.score-badge.good { background: #e6f7ef; color: var(--green); }
.score-badge.warn { background: #fff4df; color: var(--amber); }
.score-badge.bad { background: #ffe9e7; color: var(--red); }
.status-groups {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.status-group-tile {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px;
  background: var(--panel-soft);
}
.status-group-tile span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.status-group-tile strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
}
.client-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.client-kpi {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px;
  background: var(--panel-soft);
}
.client-kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.client-kpi strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}
.bulk-progress {
  display: grid;
  gap: 9px;
}
.progress-bar {
  height: 11px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
  border: 1px solid var(--line);
}
.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}
.progress-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.opportunity-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.opportunity-card {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
}
.opportunity-card strong { display: block; margin-bottom: 5px; }
.tasks-card { padding: 16px; }
.admin-panel { display: grid; gap: 14px; }
.admin-tab-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.admin-tab-button {
  min-height: 78px;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  box-shadow: none;
}
.admin-tab-button strong,
.admin-tab-button span {
  display: block;
  width: 100%;
}
.admin-tab-button strong {
  font-size: 14px;
  line-height: 1.2;
}
.admin-tab-button span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
}
.admin-tab-button.active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}
.admin-tab-button.active span {
  color: rgba(255, 255, 255, 0.82);
}
.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.15fr);
  gap: 16px;
  align-items: start;
}
.admin-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.admin-list table { font-size: 13px; }
.admin-list td button {
  padding: 6px 9px;
  font-size: 12px;
}
.admin-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px;
}
.admin-form {
  display: grid;
  gap: 12px;
}
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.client-admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.client-admin-tabs button {
  padding: 7px 10px;
  font-size: 12px;
}
.admin-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.admin-form-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.admin-form-section small,
.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.admin-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
}
.admin-inline-note {
  color: var(--muted);
  font-size: 12px;
}
.admin-status {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}
.admin-status.error {
  color: var(--red);
}
.admin-badge {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}
.admin-badge.off {
  background: #eef2f7;
  color: var(--muted);
}
.admin-badge.warn {
  background: #fff4db;
  color: var(--amber);
}
.section-head, .panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}
h2, h3 { margin: 0; letter-spacing: 0; }
p { color: var(--muted); line-height: 1.5; }
.section-head p, .panel-head p { margin: 4px 0 0; font-size: 13px; }
.filters { display: flex; gap: 10px; min-width: 360px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--panel-soft); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f8fbff; }
tbody tr.selected-row {
  background: #eef5ff;
  box-shadow: inset 4px 0 0 var(--blue);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: var(--blue-soft);
  color: var(--blue);
  white-space: nowrap;
}
.raw-status {
  display: inline-block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}
.status-pill.ready { color: var(--amber); background: #fff4df; }
.status-pill.draft { color: var(--green); background: #e6f7ef; }
.status-pill.error { color: var(--red); background: #ffe9e7; }
.status-pill.review { color: var(--purple); background: #f1ecff; }
.status-pill.queued { color: var(--blue); background: var(--blue-soft); }
.status-pill.working { color: var(--teal); background: #e2f7f5; }
.workspace-grid {
  display: grid;
  grid-template-columns: 290px minmax(380px, 1fr) minmax(430px, .95fr);
  gap: 18px;
  align-items: start;
}
.legend-panel, .chat-panel, .output-panel { padding: 16px; min-height: 640px; }
.legend-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.legend-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}
.legend-list strong { display: block; margin-bottom: 6px; }
.legend-list span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.compliance-box {
  margin-top: 16px;
  border: 1px solid #b8d5ff;
  background: #f0f6ff;
  border-radius: 8px;
  padding: 12px;
}
.chat-panel { display: grid; grid-template-rows: auto 1fr auto; }
.chat-log {
  border: 1px solid var(--line);
  background: #fbfcfe;
  border-radius: 8px;
  padding: 14px;
  overflow: auto;
  min-height: 360px;
}
.message {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  white-space: pre-wrap;
  line-height: 1.45;
}
.message.user { margin-left: auto; background: var(--blue); color: #fff; }
.message.system { background: #edf2f7; color: var(--ink); }
.chat-form { display: grid; gap: 10px; margin-top: 12px; }
.form-hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.review-summary-list {
  margin: 10px 0;
  padding-left: 20px;
  color: var(--ink);
}
.review-summary-list li {
  margin: 6px 0;
}
.technical-details {
  margin-top: 12px;
}
.technical-details summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 800;
}
.chat-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.output-sections { display: grid; gap: 12px; max-height: 980px; overflow: auto; padding-right: 4px; }
.output-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 0 10px;
  background: var(--panel);
}
.tab-button {
  flex: 0 0 auto;
  background: var(--panel-soft);
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 8px 10px;
  font-size: 13px;
}
.tab-button.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.tab-panels { display: grid; gap: 12px; }
.output-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}
.output-section.muted { background: var(--panel-soft); }
.output-section h3 { font-size: 16px; margin-bottom: 8px; }
.output-section h4 { margin: 14px 0 8px; font-size: 14px; }
.output-section pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #273244;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}
.output-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.output-list li { padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.detail-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
}
.detail-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.detail-grid dd {
  margin: 5px 0 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.mini-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.mini-metrics article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
}
.mini-metrics span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; margin-bottom: 5px; }
.mini-metrics strong { font-size: 18px; color: var(--ink); }
.keyword-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.keyword-chips span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}
.muted-text { color: var(--muted); font-weight: 500; }
.action-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 12px;
  width: 100%;
}
.action-row button,
.action-row .action-link {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.action-row .action-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}
.scorecard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.scorecard {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--panel-soft);
}
.scorecard span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.scorecard strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
}
.scorecard small,
.scorecard em {
  display: block;
  margin-top: 7px;
  line-height: 1.35;
}
.scorecard em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.scorecard-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.scorebar {
  margin-top: 8px;
  height: 8px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
}
.scorebar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--blue);
}
.scorebar.good i { background: var(--green); }
.scorebar.warn i { background: var(--amber); }
.scorebar.bad i { background: var(--red); }
a { color: var(--blue); text-decoration: none; font-weight: 700; }

.dashboard.v3-dashboard {
  height: 100vh;
  padding: 0;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  background: #f5f7fb;
}
.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: #0f172a;
  color: #e8eef8;
}
.sidebar-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.sidebar-brand span {
  display: block;
  margin-top: 2px;
  color: #99a6ba;
  font-size: 12px;
}
.sidebar-nav {
  display: grid;
  align-content: start;
  gap: 6px;
}
.sidebar-nav button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: transparent;
  color: #b8c4d6;
  text-align: left;
}
.sidebar-nav button:hover,
.sidebar-nav button.active {
  background: rgba(255, 255, 255, .09);
  color: #fff;
}
.sidebar-status {
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, .06);
}
.sidebar-status span {
  display: block;
  color: #99a6ba;
  font-size: 12px;
  font-weight: 800;
}
.sidebar-status strong {
  display: block;
  margin-top: 4px;
  color: #fff;
}
.app-workspace {
  min-width: 0;
  height: 100vh;
  overflow: auto;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 14px;
}
.topbar.v3-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  min-height: 76px;
}
.project-context h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}
.project-context p {
  margin: 4px 0 0;
  font-size: 13px;
}
.module-tabs {
  position: static;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  overflow-y: visible;
  min-height: 56px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
}
.module-tabs button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  flex: 0 0 auto;
  padding: 8px 12px;
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.module-tabs button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.module-tabs {
  display: none !important;
}
.context-strip {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 10px;
}
.context-strip article {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--panel);
}
.context-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.context-strip strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.context-strip p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.quota-card.low {
  border-color: #f2b84b;
  background: #fff9ed;
}
.quota-card.limit {
  border-color: #ef4444;
  background: #fff1f1;
}
.quota-card.low strong {
  color: #9a5b00;
}
.quota-card.limit strong {
  color: #b91c1c;
}
.v3-metrics article {
  min-height: 82px;
}
.insight-strip {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: var(--panel);
}
.insight-list {
  grid-template-columns: repeat(5, minmax(180px, 1fr));
}
.insight-list .action-card {
  min-height: 118px;
}
.bulk-actions {
  margin: 12px 0;
  display: flex;
  justify-content: flex-start;
}
.module-panel {
  display: none;
}
.module-panel.active {
  display: block;
}
.module-panel[data-module-panel="stats"].active {
  width: min(100%, 1120px);
  margin: 0 auto;
}
.calendar-planner-card,
.calendar-card {
  margin-bottom: 14px;
}
.calendar-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) minmax(150px, .75fr) 150px 150px minmax(140px, .75fr) auto;
  gap: 10px;
  align-items: end;
}
.calendar-form textarea {
  grid-column: 1 / -2;
  min-height: 46px;
}
.calendar-form button {
  min-height: 46px;
}
.calendar-add-terms-btn {
  background: #fff;
  color: var(--ink);
  border: 1px solid #cbd5e1;
  min-height: 44px;
  padding: 10px 16px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
  white-space: normal;
  text-align: center;
}
.calendar-add-terms-btn:hover {
  border-color: #9bbcf8;
  background: #f8fbff;
}
.form-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.content-calendar {
  min-height: 620px;
}
.content-calendar .fc {
  color: var(--ink);
}
.content-calendar .fc-toolbar {
  gap: 10px;
  align-items: center;
}
.content-calendar .fc-toolbar-title {
  font-size: 20px;
  letter-spacing: 0;
}
.content-calendar .fc-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: none;
  font-weight: 800;
}
.content-calendar .fc-button-primary:not(:disabled).fc-button-active,
.content-calendar .fc-button-primary:not(:disabled):active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.content-calendar .fc-daygrid-day {
  background: #fff;
}
.content-calendar .fc-day-today {
  background: #f0f7ff !important;
}
.content-calendar .fc-event {
  border: 0;
  border-radius: 8px;
  padding: 3px 5px;
  font-weight: 800;
  cursor: pointer;
  white-space: normal;
}
.calendar-status-idea,
.content-calendar .calendar-status-idea { background: #eef2f7 !important; color: #334155 !important; }
.calendar-status-planned,
.content-calendar .calendar-status-planned { background: #e7f0ff !important; color: #164aa8 !important; }
.calendar-status-in_production,
.content-calendar .calendar-status-in_production { background: #fff4df !important; color: #8a4d00 !important; }
.calendar-status-review,
.content-calendar .calendar-status-review { background: #f0e9ff !important; color: var(--purple) !important; }
.calendar-status-ready,
.content-calendar .calendar-status-ready { background: #e6f7ef !important; color: var(--green) !important; }
.calendar-status-published,
.content-calendar .calendar-status-published { background: #e5fbf8 !important; color: var(--teal) !important; }
.calendar-fallback-list {
  display: none;
  gap: 8px;
  margin-top: 12px;
}
.calendar-list-item {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px;
  color: var(--ink);
  text-align: left;
  display: grid;
  gap: 4px;
}
.calendar-list-item span,
.calendar-list-item small {
  color: var(--muted);
}
.actions-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.action-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  padding: 14px;
  display: grid;
  gap: 10px;
}
.action-panel > span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.action-panel strong {
  font-size: 18px;
}
.action-panel p {
  margin: 0;
  color: var(--muted);
}
.sitemap-overview,
.search-console-setup,
.search-console-stats {
  display: grid;
  gap: 14px;
}
.analytics-card {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}
.analytics-head {
  align-items: flex-start;
  margin-bottom: 20px;
}
.analytics-head h2 {
  font-size: 30px;
  line-height: 1.05;
  margin: 0 0 6px;
}
.analytics-head p {
  font-size: 15px;
  color: var(--muted);
}
.analytics-head .filters {
  align-self: center;
}
.search-console-setup {
  display: grid;
  gap: 18px;
}
.gsc-setup-warning {
  border: 1px solid #f4cf63;
  border-radius: 14px;
  background: #fff9e9;
  color: #8a3f0a;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
}
.gsc-warning-icon {
  width: 22px;
  height: 22px;
  border: 2px solid #df7b00;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #df7b00;
  font-weight: 900;
  font-size: 14px;
}
.gsc-setup-warning strong {
  color: #80350a;
}
.gsc-setup-warning p {
  margin: 8px 0 0;
  max-width: 920px;
  color: #914514;
  font-size: 13px;
  line-height: 1.45;
}
.gsc-orange-button {
  margin-top: 12px;
  border: 0;
  border-radius: 8px;
  background: #df7900;
  color: #fff;
  padding: 10px 16px;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 8px 18px rgba(223, 121, 0, .18);
}
.gsc-orange-button:hover {
  background: #c96e00;
}
.gsc-admin-link {
  display: block;
  width: fit-content;
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: #8a3f0a;
  padding: 0;
  font-weight: 800;
  text-decoration: underline;
}
.gsc-connect-card {
  border: 1px solid rgba(226, 232, 240, .8);
  border-radius: 14px;
  background: #fff;
  min-height: 360px;
  padding: 34px 28px;
  text-align: center;
  display: grid;
  gap: 14px;
  justify-items: center;
  align-content: center;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .08);
}
.gsc-connect-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
  max-width: 760px;
}
.gsc-connect-card p {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.gsc-connect-card small {
  color: var(--muted);
  font-size: 12px;
}
.gsc-connect-card > button {
  min-width: 190px;
  min-height: 42px;
  border-radius: 9px;
  background: #2d5df4;
  font-size: 14px;
  box-shadow: 0 12px 24px rgba(45, 93, 244, .18);
}
.gsc-connect-card > button:hover {
  background: #214bd1;
}
.gsc-connect-card > button.is-loading::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 999px;
  display: inline-block;
  margin-right: 10px;
  vertical-align: -3px;
  animation: spin .8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.gsc-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf4ff;
}
.gsc-icon span {
  font-size: 34px;
  font-weight: 900;
  background: conic-gradient(from -45deg, #4285f4 0 25%, #34a853 0 43%, #fbbc05 0 60%, #ea4335 0 78%, #4285f4 0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.gsc-benefit-grid {
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 4px;
}
.gsc-benefit-grid article {
  border: 1px solid rgba(241, 245, 249, .95);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
  text-align: left;
}
.gsc-benefit-grid strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 6px;
}
.gsc-benefit-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.gsc-connected-banner {
  border: 1px solid #f4cf63;
  border-radius: 10px;
  background: #fffbea;
  color: #914514;
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 800;
}
.gsc-property-required {
  border: 1px solid #f4cf63;
  border-radius: 14px;
  background: #fffbea;
  color: #8a3f0a;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
}
.gsc-property-required h3 {
  margin: 0 0 14px;
  font-size: 22px;
}
.gsc-property-required p {
  margin: 0 0 18px;
  color: #914514;
  font-size: 17px;
  line-height: 1.45;
}
.gsc-property-form {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  margin-top: 16px;
}
.gsc-property-form select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 12px;
  font: inherit;
  color: var(--text);
  background: #fff;
}
.gsc-waiting-card {
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
  min-height: 360px;
  padding: 48px 28px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 14px;
  text-align: center;
}
.gsc-waiting-icon {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: #dbeafe;
  color: #2563eb;
  display: grid;
  place-items: center;
  font-size: 42px;
  font-weight: 900;
}
.gsc-waiting-card h3 {
  margin: 0;
  font-size: 24px;
}
.gsc-waiting-card p {
  margin: 0;
  max-width: 650px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}
.gsc-waiting-card button {
  border: 0;
  background: transparent;
  color: #2563eb;
  padding: 0;
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
}
.gsc-connection-bar {
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 14px;
  background: #fff;
  padding: 26px 30px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .08);
}
.gsc-check {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 900;
}
.gsc-connection-bar strong {
  display: block;
  font-size: 18px;
}
.gsc-connection-bar p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.35;
}
.gsc-connection-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.gsc-connection-actions button {
  min-height: 46px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 900;
}
.gsc-connection-actions .purple {
  background: #7c3aed;
}
.gsc-connection-actions .purple:hover {
  background: #6d28d9;
}
.gsc-connection-actions .danger {
  background: #dc2626;
}
.gsc-connection-actions .danger:hover {
  background: #b91c1c;
}
.gsc-oauth-modal {
  width: min(760px, 100%);
}
.oauth-config-form input[readonly] {
  background: var(--panel-soft);
  color: var(--muted);
}
.sitemap-table-wrap {
  max-height: 440px;
}
.sitemap-table-wrap table {
  min-width: 760px;
}
.inline-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--panel-soft);
}
.gsc-chart-placeholder {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  display: grid;
  gap: 10px;
}
.gsc-chart-placeholder strong {
  font-size: 18px;
}
.gsc-chart-placeholder p {
  margin: 0;
  color: var(--muted);
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(15, 23, 42, .42);
}
.modal-card {
  width: min(940px, 100%);
  max-height: min(900px, 92vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 24px 14px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
}
.modal-head p {
  margin: 8px 0 0;
  color: var(--muted);
}
.modal-close {
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 28px;
  line-height: 1;
}
.search-terms-form {
  display: grid;
  gap: 14px;
  padding: 20px 24px 24px;
}
.search-terms-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}
.search-terms-form textarea {
  min-height: 260px;
  font-size: 18px;
  line-height: 1.45;
}
.search-terms-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.search-terms-preview {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--panel-soft);
}
.search-terms-preview strong {
  display: block;
  margin-bottom: 8px;
}
.search-terms-preview div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.search-terms-preview span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 9px;
  background: #e7f0ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}
.modal-actions {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  padding-top: 4px;
}
.modal-actions button {
  min-height: 48px;
}
.v3-cockpit {
  grid-template-columns: minmax(320px, 1fr) minmax(280px, .8fr) minmax(280px, .8fr);
}
.quick-command-panel {
  grid-column: span 3;
}
.chat-log.compact {
  min-height: 120px;
  max-height: 220px;
}
.advanced-briefing {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--panel-soft);
}
.advanced-briefing summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 800;
}
.advanced-briefing .chat-options,
.advanced-briefing textarea {
  margin-top: 10px;
}
.workflow-progress {
  display: grid;
  gap: 8px;
}
.workflow-step-list {
  display: grid;
  gap: 8px;
}
.workflow-step {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.workflow-step:hover,
.workflow-step.active {
  border-color: #9bbcf8;
  background: #f0f6ff;
}
.workflow-step i {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  font-style: normal;
  font-weight: 900;
}
.workflow-step span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.workflow-step strong:last-child {
  font-size: 20px;
}
.workflow-detail {
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  display: grid;
  gap: 8px;
}
.workflow-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.workflow-detail-head strong {
  color: var(--ink);
}
.workflow-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
}
.workflow-task:hover {
  border-color: #9bbcf8;
  background: #f8fbff;
}
.workflow-task span,
.workflow-task small {
  display: block;
  min-width: 0;
}
.workflow-task small {
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.workflow-task em {
  color: var(--blue);
  font-style: normal;
  font-weight: 800;
}
.workflow-filter-btn {
  justify-self: start;
}
.view-mode-tabs,
.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.view-mode-tabs button,
.filter-chips button {
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 7px 10px;
  font-size: 13px;
}
.view-mode-tabs button.active,
.filter-chips button.active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}
.v3-filters {
  min-width: 620px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) 170px 190px;
}
.v3-table-wrap {
  max-height: 62vh;
}
.tasks-table {
  min-width: 1040px;
}
.tasks-table th,
.tasks-table td {
  white-space: normal;
}
.tasks-table th[data-col="keyword"],
.tasks-table td[data-col="keyword"] {
  min-width: 260px;
}
.tasks-table th[data-col="action"],
.tasks-table td[data-col="action"] {
  min-width: 210px;
}
.tasks-table[data-preset="quality"] [data-col="source"],
.tasks-table[data-preset="quality"] [data-col="draft"],
.tasks-table[data-preset="publish"] [data-col="source"],
.tasks-table[data-preset="publish"] [data-col="intent"] {
  display: none;
}
.tasks-table .empty-row td {
  padding: 18px 20px;
}
.empty-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}
.empty-state strong {
  color: var(--ink);
}
.row-cta {
  padding: 7px 10px;
  font-size: 12px;
}
.bulk-groups,
.overview-grid {
  display: grid;
  gap: 12px;
}
.bulk-batch,
.overview-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: var(--panel);
}
.bulk-batch summary {
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.bulk-batch summary strong {
  display: block;
}
.bulk-batch .mini-metrics {
  margin-top: 12px;
}
.overview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.overview-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.overview-card strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
}
.overview-card p {
  margin: 7px 0 0;
}
.task-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 30;
  width: min(760px, 100vw);
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  transform: translateX(102%);
  transition: transform .22s ease;
  border-left: 1px solid var(--line);
  background: var(--panel);
  box-shadow: -24px 0 48px rgba(15, 23, 42, .18);
}
.task-drawer.open {
  transform: translateX(0);
}
.drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.drawer-header .ghost {
  flex: 0 0 auto;
}
.drawer-header h2 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.task-drawer .output-sections {
  min-height: 0;
  height: 100%;
  max-height: none;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-x: hidden;
}
.task-drawer .output-tabs {
  position: static;
  top: auto;
  z-index: auto;
  flex: 0 0 auto;
  flex-wrap: wrap;
  overflow: visible;
  padding: 0 0 10px;
  margin: 0;
  background: var(--panel);
}
.task-drawer .tab-button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  white-space: nowrap;
  font-size: 12px;
}
.task-drawer .tab-panels {
  min-height: 0;
  overflow-x: hidden;
}

@media (max-width: 1180px) {
  .dashboard.v3-dashboard { grid-template-columns: 76px minmax(0, 1fr); }
  .app-sidebar { padding: 12px 8px; }
  .sidebar-brand div:not(.brand-mark), .sidebar-status { display: none; }
  .sidebar-nav button { font-size: 0; text-align: center; padding: 11px 7px; }
  .sidebar-nav button::first-letter { font-size: 14px; }
  .context-strip { grid-template-columns: 1fr; }
  .insight-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-form textarea { grid-column: 1 / -1; }
  .search-terms-settings { grid-template-columns: 1fr; }
  .actions-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v3-filters { min-width: 0; grid-template-columns: 1fr 1fr; }
  .cockpit-grid { grid-template-columns: 1fr 1fr; }
  .v3-cockpit { grid-template-columns: 1fr 1fr; }
  .quick-command-panel { grid-column: span 2; }
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .next-actions-panel, .opportunities-panel { grid-column: auto; grid-row: auto; }
  .admin-tab-buttons { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .legend-panel, .chat-panel, .output-panel { min-height: auto; }
  .metrics-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .login-screen { grid-template-columns: 1fr; padding: 24px; }
  .dashboard.v3-dashboard { height: auto; min-height: 100vh; grid-template-columns: 1fr; overflow: visible; }
  .app-sidebar {
    position: static;
    height: auto;
    grid-template-rows: auto auto;
  }
  .sidebar-brand div:not(.brand-mark) { display: block; }
  .sidebar-nav {
    display: flex;
    overflow-x: auto;
  }
  .sidebar-nav button {
    flex: 0 0 auto;
    width: auto;
    font-size: 13px;
    text-align: left;
  }
  .app-workspace { height: auto; overflow: visible; padding: 12px; }
  .module-tabs, .topbar.v3-topbar { position: static; }
  .insight-list, .v3-cockpit, .quick-command-panel, .overview-grid { grid-template-columns: 1fr; grid-column: auto; }
  .calendar-form,
  .actions-overview,
  .gsc-benefit-grid,
  .gsc-property-form,
  .modal-actions,
  .inline-form {
    grid-template-columns: 1fr;
  }
  .gsc-setup-warning,
  .gsc-property-required,
  .gsc-connection-bar {
    grid-template-columns: 1fr;
  }
  .gsc-connection-actions {
    justify-content: stretch;
  }
  .gsc-connection-actions button {
    width: 100%;
  }
  .modal-backdrop { padding: 12px; align-items: start; }
  .modal-head { padding: 18px; }
  .modal-head h2 { font-size: 22px; }
  .search-terms-form { padding: 18px; }
  .search-terms-form textarea { min-height: 220px; font-size: 16px; }
  .calendar-form textarea { grid-column: auto; }
  .content-calendar {
    min-height: 480px;
  }
  .content-calendar .fc-toolbar {
    align-items: stretch;
  }
  .content-calendar .fc-header-toolbar {
    flex-direction: column;
  }
  .content-calendar .fc-toolbar-chunk {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
  }
  .v3-table-wrap { max-height: none; }
  .tasks-table { min-width: 860px; }
  .task-drawer { width: 100vw; }
  .topbar, .section-head { flex-direction: column; align-items: stretch; }
  .filters, .v3-filters, .topbar-actions, .chat-options { min-width: 0; grid-template-columns: 1fr; flex-direction: column; }
  .topbar-actions > button { width: 100%; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .detail-grid, .mini-metrics, .scorecard-grid, .opportunity-list, .client-summary, .status-groups, .cockpit-grid { grid-template-columns: 1fr; }
  .metrics-row { grid-template-columns: 1fr; }
  .dashboard { padding: 12px; }
}
