:root {
  --bg: #050914;
  --bg-2: #080f1f;
  --panel: rgba(12, 20, 35, 0.94);
  --panel-soft: rgba(18, 30, 50, 0.86);
  --panel-strong: #111d31;
  --border: rgba(150, 180, 220, 0.18);
  --border-strong: rgba(75, 148, 255, 0.38);
  --accent-blue: #2f80ff;
  --accent-cyan: #26d9ff;
  --accent-orange: #d39142;
  --danger: #ff5c7a;
  --warning: #f1b84b;
  --success: #4bd8a0;
  --text-main: #f4f8ff;
  --text-muted: #9caec7;
  --text-soft: #c5d3e8;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text-main);
  background:
    linear-gradient(135deg, rgba(47, 128, 255, 0.1) 0%, transparent 32%),
    linear-gradient(180deg, #050914 0%, #08111f 44%, #050914 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3 {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px;
  overflow: hidden auto;
  background: rgba(4, 8, 16, 0.96);
  border-right: 1px solid var(--border);
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.24);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 10px;
  color: var(--text-main);
  background: linear-gradient(135deg, rgba(47, 128, 255, 0.16), rgba(211, 145, 66, 0.1));
  border: 1px solid rgba(75, 148, 255, 0.22);
  border-radius: var(--radius);
  cursor: pointer;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--accent-blue), #0c3b82);
  border: 1px solid rgba(38, 217, 255, 0.34);
  box-shadow: inset 0 0 24px rgba(38, 217, 255, 0.16);
  font-size: 18px;
  font-weight: 900;
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.brand-copy strong {
  font-size: 16px;
  line-height: 1.05;
}

.brand-copy span {
  color: var(--text-muted);
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  width: 100%;
  padding: 0 11px;
  color: var(--text-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text-main);
  background: linear-gradient(135deg, rgba(47, 128, 255, 0.22), rgba(38, 217, 255, 0.08));
  border-color: var(--border-strong);
}

.nav-item:hover {
  transform: translateX(2px);
}

.nav-icon {
  display: grid;
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  place-items: center;
  color: var(--accent-cyan);
  background: rgba(38, 217, 255, 0.08);
  border: 1px solid rgba(38, 217, 255, 0.14);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
}

.sidebar-support {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 14px;
  background: linear-gradient(145deg, rgba(211, 145, 66, 0.13), rgba(47, 128, 255, 0.08));
  border: 1px solid rgba(211, 145, 66, 0.28);
  border-radius: var(--radius);
}

.sidebar-support strong {
  font-size: 14px;
}

.sidebar-support span,
.sidebar-support a {
  overflow-wrap: anywhere;
  color: var(--text-muted);
  font-size: 12px;
}

.support-label,
.eyebrow {
  margin: 0;
  color: var(--accent-orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.support-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 4px;
}

.support-links button,
.help-center-button,
.row-actions button,
.selector-list button {
  min-height: 32px;
  padding: 7px 9px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.support-links button:hover,
.help-center-button:hover,
.row-actions button:hover,
.selector-list button:hover,
.selector-list button.active {
  color: var(--text-main);
  background: rgba(47, 128, 255, 0.13);
  border-color: var(--border-strong);
}

.help-center-button {
  width: 100%;
  margin-top: 2px;
  color: var(--text-main);
  background: rgba(47, 128, 255, 0.16);
}

.workspace {
  min-width: 0;
  padding: 26px 28px 112px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.topbar-copy {
  max-width: 860px;
}

.topbar h1 {
  margin: 5px 0 8px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.04;
}

.page-subtitle {
  max-width: 850px;
  margin-bottom: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.header-actions,
.hero-actions,
.drawer-actions,
.stacked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.primary-button,
.ghost-button,
.support-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  white-space: normal;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--accent-blue), #1459c8 72%);
  border-color: rgba(47, 128, 255, 0.56);
  box-shadow: 0 12px 32px rgba(47, 128, 255, 0.22);
}

.ghost-button {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.045);
}

.support-button {
  color: var(--text-main);
  background: linear-gradient(135deg, rgba(211, 145, 66, 0.2), rgba(47, 128, 255, 0.1));
  border-color: rgba(211, 145, 66, 0.32);
}

.primary-button:hover,
.ghost-button:hover,
.support-button:hover {
  transform: translateY(-1px);
  border-color: rgba(38, 217, 255, 0.42);
}

.full {
  width: 100%;
}

.page-stack {
  display: grid;
  gap: 18px;
}

.executive-hero,
.module-header,
.agent-status {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(47, 128, 255, 0.18), rgba(12, 20, 35, 0.88) 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.executive-hero h2,
.module-header h2,
.agent-status h2 {
  margin: 6px 0 10px;
  font-size: clamp(24px, 2.2vw, 34px);
}

.executive-hero p,
.module-header p,
.agent-status p {
  max-width: 860px;
  margin-bottom: 0;
  color: var(--text-muted);
  line-height: 1.56;
}

.hero-signal-panel {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 18px;
  background: rgba(3, 8, 18, 0.46);
  border: 1px solid rgba(38, 217, 255, 0.18);
  border-radius: var(--radius);
}

.hero-signal-panel strong {
  font-size: 28px;
}

.signal-pill,
.status-pill,
.channel-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

.status-pill.good,
.signal-pill.good {
  color: #afffe1;
  background: rgba(75, 216, 160, 0.12);
  border-color: rgba(75, 216, 160, 0.34);
}

.status-pill.risk,
.signal-pill.risk {
  color: #ffd2dc;
  background: rgba(255, 92, 122, 0.12);
  border-color: rgba(255, 92, 122, 0.34);
}

.status-pill.warning,
.signal-pill.warning,
.status-pill.neutral,
.signal-pill.neutral {
  color: #ffe2aa;
  background: rgba(241, 184, 75, 0.12);
  border-color: rgba(241, 184, 75, 0.32);
}

.data-status-line,
.source-summary,
.metric-topline,
.card-title-row,
.badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-status-line {
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 10px 12px;
  color: var(--text-soft);
  background: rgba(8, 15, 27, 0.62);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.business-source {
  font-size: 12px;
  color: var(--text-muted);
}

.metric-topline,
.card-title-row {
  justify-content: space-between;
}

.card-title-row {
  margin-bottom: 12px;
}

.card-title-row .section-title {
  margin-bottom: 0;
}

.badge-row {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.data-source-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.data-source-badge.good {
  color: #b9ffe7;
  background: rgba(75, 216, 160, 0.11);
  border-color: rgba(75, 216, 160, 0.32);
}

.data-source-badge.risk {
  color: #ffd4dc;
  background: rgba(255, 92, 122, 0.11);
  border-color: rgba(255, 92, 122, 0.32);
}

.data-source-badge.warning {
  color: #ffe2aa;
  background: rgba(241, 184, 75, 0.11);
  border-color: rgba(241, 184, 75, 0.3);
}

.data-source-badge.neutral {
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--border);
}

.confidence-bar {
  height: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.confidence-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  border-radius: inherit;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card,
.control-card,
.detail-card,
.config-card,
.source-card,
.campaign-card,
.meeting-card,
.audit-card,
.seo-score-card,
.report-card,
.settings-card {
  position: relative;
  min-width: 0;
  padding: 16px;
  background: linear-gradient(180deg, var(--panel-soft), rgba(9, 16, 29, 0.92));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.metric-card:hover,
.control-card:hover,
.detail-card:hover,
.config-card:hover,
.source-card:hover,
.campaign-card:hover,
.meeting-card:hover,
.audit-card:hover,
.seo-score-card:hover,
.report-card:hover,
.settings-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.metric-card {
  display: grid;
  gap: 7px;
  min-height: 154px;
}

.metric-marker {
  width: 36px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  border-radius: 99px;
}

.tone-risk .metric-marker {
  background: linear-gradient(90deg, var(--danger), var(--warning));
}

.tone-good .metric-marker {
  background: linear-gradient(90deg, var(--success), var(--accent-cyan));
}

.metric-label,
.detail-stat span,
.source-card span,
.audit-card span {
  color: var(--text-muted);
  font-size: 12px;
}

.metric-card strong {
  font-size: clamp(28px, 2.8vw, 38px);
  line-height: 1;
}

.metric-delta {
  color: var(--text-soft);
  font-size: 12px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.section-title {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 18px;
}

.insight-list {
  display: grid;
  gap: 10px;
}

.insight-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.insight-row span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--accent-cyan);
  background: rgba(38, 217, 255, 0.08);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.insight-row.risk span {
  color: #ffd2dc;
  background: rgba(255, 92, 122, 0.1);
}

.insight-row p,
.summary-row p,
.control-card p,
.campaign-card p,
.meeting-card p,
.audit-card p,
.report-card p,
.settings-card p,
.config-card p,
.source-card p,
.seo-score-card p,
.reply-box {
  margin-bottom: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.summary-row {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.summary-row:last-of-type {
  border-bottom: 0;
}

.approval-card {
  display: grid;
  gap: 10px;
}

.approval-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.approval-row > div:first-child {
  display: grid;
  gap: 4px;
}

.approval-row span {
  color: var(--text-muted);
  font-size: 12px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 7px;
}

.row-actions.spaced {
  margin-top: 14px;
}

.module-header,
.agent-status {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  box-shadow: none;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tabs button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}

.filter-tabs button.active,
.filter-tabs button:hover {
  color: white;
  background: rgba(47, 128, 255, 0.22);
  border-color: var(--border-strong);
}

.split-layout,
.conversation-layout,
.seo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 14px;
  align-items: start;
}

.detail-card {
  position: sticky;
  top: 22px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0;
}

.detail-grid.trio {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-stat {
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.detail-stat strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.selector-list {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.data-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.data-source-card {
  display: grid;
  gap: 12px;
}

.source-warning,
.source-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.source-warning {
  color: #ffd1dc;
}

.key-field-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.key-field-list span {
  padding: 4px 7px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
}

.json-details {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.json-details summary {
  cursor: pointer;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
}

.raw-json {
  max-height: 260px;
  margin: 10px 0 0;
  overflow: auto;
  padding: 12px;
  color: #cbd7ea;
  background: rgba(2, 6, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.raw-snapshot-card {
  grid-column: 1 / -1;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  color: var(--text-soft);
  background: #0b1528;
  font-size: 11px;
  text-transform: uppercase;
}

td {
  color: var(--text-muted);
  font-size: 13px;
}

tbody tr:hover td {
  background: rgba(47, 128, 255, 0.055);
}

.inbox-list {
  display: grid;
  gap: 10px;
}

.conversation-card {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 14px;
  color: var(--text-main);
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
}

.conversation-card.active,
.conversation-card:hover {
  background: linear-gradient(135deg, rgba(47, 128, 255, 0.18), rgba(38, 217, 255, 0.05));
  border-color: var(--border-strong);
}

.conversation-card p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.conversation-card > span:last-child {
  color: var(--text-soft);
  font-size: 12px;
}

.channel-pill {
  color: var(--accent-cyan);
  background: rgba(38, 217, 255, 0.08);
}

.suggested-reply {
  position: sticky;
  top: 22px;
}

.conversation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.reply-box {
  padding: 14px;
  margin: 14px 0;
  color: var(--text-soft);
  background: rgba(38, 217, 255, 0.055);
  border: 1px solid rgba(38, 217, 255, 0.18);
  border-radius: var(--radius);
}

.stacked-actions {
  display: grid;
}

.config-grid,
.campaign-grid,
.meeting-grid,
.report-grid,
.settings-grid,
.seo-grid,
.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.config-card,
.campaign-card,
.meeting-card,
.settings-card,
.report-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 32px;
  padding: 4px 10px 4px 5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}

.toggle span {
  width: 22px;
  height: 22px;
  background: var(--text-muted);
  border-radius: 999px;
}

.toggle.on {
  color: #afffe1;
  background: rgba(75, 216, 160, 0.12);
  border-color: rgba(75, 216, 160, 0.32);
}

.toggle.on span {
  background: var(--success);
}

.metric-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.source-card {
  display: grid;
  gap: 8px;
}

.source-card strong {
  font-size: 26px;
}

.source-card small {
  color: var(--text-muted);
}

.seo-layout {
  grid-template-columns: minmax(300px, 0.45fr) minmax(0, 1fr);
}

.seo-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seo-score-card {
  display: grid;
  gap: 14px;
  align-content: start;
}

.score-ring {
  display: grid;
  width: 184px;
  height: 184px;
  place-items: center;
  justify-self: center;
  border: 12px solid rgba(47, 128, 255, 0.24);
  border-top-color: var(--accent-cyan);
  border-right-color: var(--accent-orange);
  border-radius: 999px;
}

.score-ring strong {
  display: block;
  font-size: 52px;
  line-height: 1;
}

.score-ring span {
  color: var(--text-muted);
  font-size: 12px;
}

.audit-card {
  display: grid;
  gap: 10px;
  min-height: 168px;
}

.audit-card strong {
  font-size: 34px;
}

.support-settings {
  border-color: rgba(211, 145, 66, 0.32);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: grid;
  gap: 3px;
  width: min(420px, calc(100vw - 44px));
  padding: 13px 14px;
  background: rgba(7, 13, 24, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.toast span {
  color: var(--accent-cyan);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.toast strong {
  color: var(--text-main);
  font-size: 13px;
  line-height: 1.35;
}

.support-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  pointer-events: none;
  visibility: hidden;
}

.support-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

.drawer-scrim {
  position: absolute;
  inset: 0;
  background: rgba(1, 5, 12, 0.64);
  border: 0;
  opacity: 0;
  cursor: pointer;
  transition: opacity 160ms ease;
}

.support-drawer.open .drawer-scrim {
  opacity: 1;
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  width: min(560px, 100vw);
  height: 100%;
  padding: 22px;
  overflow: auto;
  background: #07101f;
  border-left: 1px solid var(--border-strong);
  box-shadow: -28px 0 80px rgba(0, 0, 0, 0.38);
  transform: translateX(105%);
  transition: transform 180ms ease;
}

.support-drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.drawer-head h2 {
  margin: 4px 0 5px;
  font-size: 26px;
}

.drawer-head span {
  color: var(--text-muted);
  font-size: 13px;
}

.drawer-head button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.drawer-block {
  display: grid;
  gap: 9px;
  padding: 14px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.drawer-block h3 {
  margin-bottom: 0;
  font-size: 16px;
}

.drawer-block p {
  margin-bottom: 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.drawer-block.emphasis {
  border-color: rgba(211, 145, 66, 0.3);
  background: rgba(211, 145, 66, 0.08);
}

@media (max-width: 1320px) {
  .app-shell {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .metric-grid,
  .metric-grid.compact,
  .metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .config-grid,
  .campaign-grid,
  .meeting-grid,
  .report-grid,
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: relative;
    height: auto;
    overflow: visible;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    padding: 20px 18px 118px;
  }

  .topbar,
  .executive-hero,
  .module-header,
  .agent-status,
  .split-layout,
  .conversation-layout,
  .seo-layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
  }

  .detail-card,
  .suggested-reply {
    position: static;
  }
}

@media (max-width: 720px) {
  .metric-grid,
  .metric-grid.compact,
  .dashboard-grid,
  .config-grid,
  .campaign-grid,
  .meeting-grid,
  .report-grid,
  .settings-grid,
  .seo-grid,
  .data-source-grid,
  .metric-strip,
  .contact-grid,
  .detail-grid,
  .detail-grid.trio {
    grid-template-columns: 1fr;
  }

  .nav-list,
  .support-links {
    grid-template-columns: 1fr;
  }

  .header-actions,
  .header-actions button,
  .hero-actions,
  .hero-actions button {
    width: 100%;
  }

  .approval-row {
    grid-template-columns: 1fr;
  }

  .drawer-panel {
    padding: 18px;
  }
}

/* Global polish pass */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(74, 139, 255, 0.38) rgba(4, 9, 18, 0.7);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: rgba(4, 9, 18, 0.7);
}

*::-webkit-scrollbar-thumb {
  background: rgba(74, 139, 255, 0.38);
  border-radius: 999px;
}

:root {
  --accent-orange: #b88756;
  --accent-violet: #7d8cff;
  --text-muted: #9dafc9;
}

.eyebrow,
.support-label {
  color: #7fdcff;
  font-size: 10px;
}

.sidebar {
  gap: 14px;
  padding: 18px 14px;
}

.brand {
  min-height: 52px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  font-size: 16px;
}

.brand-copy strong {
  font-size: 14px;
}

.brand-copy span,
.sidebar-support span,
.sidebar-support a {
  font-size: 11px;
}

.nav-item {
  min-height: 38px;
  padding: 0 10px;
  font-size: 13px;
}

.nav-icon {
  width: 22px;
  height: 22px;
  color: #8de9ff;
  background: rgba(125, 140, 255, 0.09);
  border-color: rgba(125, 140, 255, 0.16);
}

.sidebar-support {
  gap: 7px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(47, 128, 255, 0.1), rgba(125, 140, 255, 0.08));
  border-color: rgba(125, 140, 255, 0.22);
}

.workspace {
  padding: 22px 24px 92px;
}

.topbar {
  margin-bottom: 16px;
}

.topbar h1 {
  font-size: clamp(25px, 2.4vw, 34px);
}

.page-subtitle,
.executive-hero p,
.module-header p,
.agent-status p {
  font-size: 13px;
}

.executive-hero,
.module-header,
.agent-status {
  padding: 18px;
  gap: 14px;
}

.executive-hero h2,
.module-header h2,
.agent-status h2 {
  font-size: clamp(22px, 2vw, 29px);
}

.primary-button,
.ghost-button,
.support-button {
  min-height: 35px;
  padding: 0 12px;
  font-size: 12px;
}

.module-tabs {
  display: flex;
  gap: 7px;
  padding: 6px;
  overflow-x: auto;
  background: rgba(6, 13, 25, 0.76);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.module-tabs button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 11px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.module-tabs button:hover,
.module-tabs button.active {
  color: white;
  background: linear-gradient(135deg, rgba(47, 128, 255, 0.22), rgba(125, 140, 255, 0.12));
  border-color: rgba(125, 140, 255, 0.34);
}

.metric-grid {
  gap: 10px;
}

.metric-card,
.control-card,
.detail-card,
.config-card,
.source-card,
.campaign-card,
.meeting-card,
.audit-card,
.seo-score-card,
.report-card,
.settings-card,
.context-panel,
.integration-detail,
.integration-card,
.readiness-card {
  padding: 14px;
  border-radius: 7px;
}

.metric-card {
  min-height: 126px;
  gap: 5px;
}

.metric-card strong {
  font-size: clamp(24px, 2.1vw, 31px);
}

.metric-label,
.metric-delta,
td,
.control-card p,
.campaign-card p,
.meeting-card p,
.audit-card p,
.report-card p,
.settings-card p,
.config-card p,
.source-card p,
.seo-score-card p,
.reply-box {
  font-size: 12px;
}

.status-pill,
.channel-pill,
.signal-pill {
  min-height: 22px;
  padding: 3px 8px;
  font-size: 10px;
}

.section-title h2 {
  font-size: 16px;
}

.detail-stat {
  min-height: 62px;
  padding: 9px;
}

.detail-stat strong {
  font-size: 15px;
}

.detail-stat span {
  font-size: 11px;
}

.hero-signal-panel strong {
  font-size: 23px;
}

.dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-card,
.approval-card {
  grid-column: span 1;
}

.context-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  background:
    linear-gradient(145deg, rgba(47, 128, 255, 0.12), rgba(125, 140, 255, 0.06)),
    rgba(10, 18, 32, 0.94);
  border: 1px solid rgba(125, 140, 255, 0.22);
}

.context-panel p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.approval-row {
  grid-template-columns: minmax(160px, 1fr);
  gap: 8px;
}

.row-actions button,
.selector-list button,
.support-links button,
.help-center-button {
  min-height: 29px;
  font-size: 11px;
}

.split-layout {
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.45fr);
}

.conversation-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.58fr);
}

.seo-layout {
  grid-template-columns: minmax(230px, 0.34fr) minmax(0, 1fr) minmax(270px, 0.38fr);
}

.table-wrap {
  overflow-x: auto;
}

table {
  min-width: 690px;
}

th,
td {
  padding: 9px 10px;
}

.conversation-card {
  padding: 12px;
}

.config-grid,
.campaign-grid,
.meeting-grid,
.report-grid,
.settings-grid {
  gap: 11px;
}

.metric-strip {
  gap: 10px;
}

.source-card strong {
  font-size: 22px;
}

.audit-card {
  min-height: 128px;
}

.audit-card strong {
  font-size: 26px;
}

.score-ring {
  width: 138px;
  height: 138px;
  border-width: 9px;
}

.score-ring strong {
  font-size: 38px;
}

.settings-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(47, 128, 255, 0.16), rgba(125, 140, 255, 0.08)),
    rgba(10, 18, 32, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.settings-command h2 {
  margin: 5px 0 7px;
  font-size: clamp(22px, 2vw, 30px);
}

.settings-command p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.settings-control-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.36fr);
  gap: 14px;
  align-items: start;
}

.integration-workbench {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.readiness-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.readiness-card {
  display: grid;
  gap: 7px;
  min-height: 70px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
}

.readiness-card span {
  color: var(--text-muted);
  font-size: 11px;
}

.integration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.integration-card {
  display: grid;
  gap: 8px;
  width: 100%;
  color: var(--text-main);
  background: linear-gradient(180deg, rgba(18, 30, 50, 0.9), rgba(8, 15, 28, 0.95));
  border: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
}

.integration-card:hover,
.integration-card.active {
  border-color: rgba(125, 140, 255, 0.46);
  background: linear-gradient(135deg, rgba(47, 128, 255, 0.16), rgba(125, 140, 255, 0.08));
}

.integration-card strong {
  font-size: 13px;
}

.integration-card span,
.integration-card small {
  color: var(--text-muted);
  font-size: 11px;
}

.integration-card p {
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
}

.integration-detail {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 12px;
  background:
    linear-gradient(145deg, rgba(47, 128, 255, 0.12), rgba(38, 217, 255, 0.05)),
    rgba(8, 16, 30, 0.96);
  border: 1px solid rgba(125, 140, 255, 0.28);
  box-shadow: var(--shadow);
}

.integration-actions,
.settings-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.integration-actions button {
  min-height: 30px;
  padding: 6px 9px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  font-size: 11px;
}

.integration-actions button:hover {
  color: white;
  border-color: rgba(125, 140, 255, 0.44);
  background: rgba(47, 128, 255, 0.12);
}

.drawer-panel {
  width: min(680px, 100vw);
  background: #061021;
}

.contact-grid .detail-stat strong {
  overflow-wrap: normal;
  word-break: normal;
}

.drawer-block p {
  overflow-wrap: anywhere;
}

.drawer-scrim {
  background: rgba(0, 4, 12, 0.76);
}

.toast {
  bottom: 14px;
  right: 14px;
  max-width: 360px;
  padding: 11px 12px;
}

.toast strong {
  font-size: 12px;
}

@media (max-width: 1420px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .readiness-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .integration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .seo-layout,
  .settings-control-layout {
    grid-template-columns: 1fr;
  }

  .integration-detail {
    position: static;
  }
}

@media (max-width: 820px) {
  .dashboard-grid,
  .readiness-grid,
  .integration-grid {
    grid-template-columns: 1fr;
  }

  .settings-command {
    grid-template-columns: 1fr;
  }
}

/* Agent control layer */
.agent-master-controls,
.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.agent-master-controls {
  justify-content: flex-end;
  max-width: 680px;
}

.agent-studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.38fr);
  gap: 14px;
  align-items: start;
}

.agent-workbench {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.agent-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.agent-version-card,
.control-tile {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 13px;
  color: var(--text-main);
  background: linear-gradient(180deg, rgba(18, 30, 50, 0.86), rgba(8, 15, 28, 0.94));
  border: 1px solid var(--border);
  border-radius: 7px;
  text-align: left;
}

.agent-version-card {
  cursor: pointer;
}

.agent-version-card:hover,
.agent-version-card.active,
.control-tile:hover {
  border-color: rgba(125, 140, 255, 0.44);
  background: linear-gradient(135deg, rgba(47, 128, 255, 0.14), rgba(125, 140, 255, 0.08));
}

.agent-version-card strong,
.control-tile strong {
  font-size: 13px;
}

.agent-version-card span,
.agent-version-card small {
  color: var(--text-muted);
  font-size: 11px;
}

.agent-version-card p,
.control-tile p,
.microcopy {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.agent-section {
  display: grid;
  gap: 13px;
}

.option-group {
  display: grid;
  gap: 8px;
}

.option-group > span {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.option-pills,
.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.option-pills button,
.chip-cloud span,
.control-tile button {
  min-height: 28px;
  padding: 5px 9px;
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
}

.option-pills button {
  cursor: pointer;
}

.option-pills button:hover,
.option-pills button.active,
.control-tile button:hover {
  color: white;
  background: rgba(47, 128, 255, 0.16);
  border-color: rgba(125, 140, 255, 0.42);
}

.stop-cloud span {
  color: #ffccd7;
  background: rgba(255, 92, 122, 0.1);
  border-color: rgba(255, 92, 122, 0.26);
}

.control-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.prompt-box {
  display: grid;
  gap: 6px;
  padding: 13px;
  background: rgba(38, 217, 255, 0.055);
  border: 1px solid rgba(38, 217, 255, 0.16);
  border-radius: 7px;
}

.prompt-box p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.range-control {
  display: grid;
  grid-template-columns: 150px minmax(120px, 1fr) 70px;
  gap: 10px;
  align-items: center;
  padding: 11px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.range-control span {
  color: var(--text-muted);
  font-size: 12px;
}

.range-control strong {
  font-size: 13px;
}

.range-control input {
  width: 100%;
  accent-color: var(--accent-blue);
}

.agent-runtime-panel {
  position: sticky;
  top: 20px;
  display: grid;
  gap: 12px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(47, 128, 255, 0.12), rgba(125, 140, 255, 0.08)),
    rgba(8, 16, 30, 0.96);
  border: 1px solid rgba(125, 140, 255, 0.28);
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.panel-mode-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.panel-mode-tabs button {
  flex: 1;
  min-height: 28px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
}

.panel-mode-tabs button.active,
.panel-mode-tabs button:hover {
  color: white;
  background: rgba(47, 128, 255, 0.16);
  border-color: rgba(125, 140, 255, 0.36);
}

.toggle-row.vertical {
  display: grid;
}

.compact-config {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.brief-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.brief-grid .control-tile {
  min-height: 112px;
}

@media (max-width: 1320px) {
  .agent-card-grid,
  .control-tile-grid,
  .brief-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .agent-studio-layout {
    grid-template-columns: 1fr;
  }

  .agent-runtime-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .agent-card-grid,
  .control-tile-grid,
  .brief-grid,
  .compact-config {
    grid-template-columns: 1fr;
  }

  .range-control {
    grid-template-columns: 1fr;
  }

  .agent-master-controls {
    justify-content: stretch;
  }
}
