:root {
  color-scheme: light;
  --navy: #000f49;
  --purple: #7b7fff;
  --purple-dark: #442499;
  --pink: #fe60a8;
  --yellow: #feca60;
  --bg: #f8f9ff;
  --surface: rgba(255,255,255,.86);
  --surface-2: #f8faff;
  --ink: #313337;
  --muted: #64748b;
  --line: #eceef3;
  --line-strong: #e4e7f1;
  --nav: var(--navy);
  --nav-2: #010d3d;
  --accent: var(--purple);
  --accent-hover: #686dff;
  --blue: #0ea5e9;
  --warn: #f59e0b;
  --danger: #ef4444;
  --ok: #22c55e;
  --shadow: 0 12px 36px rgba(68, 36, 153, .07);
  --shadow-soft: 0 10px 32px rgba(68, 36, 153, .06);
}

* { box-sizing: border-box; }

button,
input,
select,
textarea {
  font: inherit;
}

button,
select,
input {
  max-width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(123,127,255,.16), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(254,96,168,.12), transparent 34%),
    var(--bg);
  color: var(--ink);
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  font-family: Montserrat, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.auth-required,
body.auth-loading {
  display: block;
}

body.auth-required .rail,
body.auth-required .shell,
body.auth-loading .rail,
body.auth-loading .shell {
  display: none;
}

body.authenticated .login-screen {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 18% 8%, rgba(123,127,255,.22), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(254,96,168,.18), transparent 32%),
    linear-gradient(135deg, #000f49 0%, #12092d 56%, #f8f9ff 56%, #f8f9ff 100%);
}

.login-card {
  width: min(100%, 470px);
  display: grid;
  gap: 18px;
  padding: 30px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.62);
  background: rgba(255,255,255,.93);
  box-shadow: 0 28px 80px rgba(0, 15, 73, .24);
  backdrop-filter: blur(18px);
}

.auth-panel-hidden {
  display: none;
}

.auth-tabs,
.auth-actions,
.wizard-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.auth-tabs button {
  flex: 1;
  min-height: 40px;
  background: #eef2ff;
  color: var(--navy);
}

.auth-tabs button.active {
  background: var(--navy);
  color: #fff;
}

.checkbox-row {
  grid-template-columns: auto 1fr !important;
  align-items: center;
  text-transform: none !important;
}

.checkbox-row input {
  min-height: auto;
}

.setup-box {
  display: grid;
  gap: 10px;
}

.setup-box code {
  display: block;
  padding: 10px;
  border-radius: 10px;
  background: #eef2ff;
  color: var(--navy);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 34px;
}

.login-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 700;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-card input {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-size: 15px;
  font-weight: 800;
}

.login-card select {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  font-size: 15px;
  font-weight: 800;
}

.login-card button {
  min-height: 50px;
}

.login-error {
  color: var(--danger) !important;
  min-height: 20px;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, var(--nav) 0%, var(--nav-2) 78%, #12092d 100%);
  padding: 24px 0;
  color: #f8fafc;
  border-right: 0;
  overflow: auto;
}

.logo {
  width: auto;
  height: auto;
  display: block;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 19px;
  font-weight: 900;
  box-shadow: none;
  margin: 0;
  padding: 0 24px 24px;
}

.logo::after {
  content: ".ai";
  color: var(--pink);
}

nav {
  display: grid;
  gap: 0;
}

nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  color: rgba(255,255,255,.78);
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  border: 0;
  border-left: 3px solid transparent;
}

nav a.active,
nav a:hover {
  background: rgba(123,127,255,.14);
  border-left-color: var(--purple);
  color: #fff;
}

.module-card {
  cursor: pointer;
  text-align: left;
  font: inherit;
  display: grid;
  gap: 10px;
  min-height: 190px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.78);
  color: var(--ink);
  box-shadow: none;
  overflow: hidden;
  line-height: 1.25;
}

.module-card:hover {
  background: #fff;
}

.module-card .board-head,
.compact-item .board-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.module-card h3,
.compact-item h3 {
  min-width: 0;
  overflow-wrap: anywhere;
}

.module-card.selected,
.bot-card.selected {
  border-color: rgba(123,127,255,.72);
  box-shadow: 0 16px 38px rgba(68, 36, 153, .14);
}

.bot-grid {
  align-items: stretch;
}

.bot-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

.bot-run-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  padding: 28px;
  overflow: auto;
  background: rgba(0, 15, 73, .58);
}

.bot-run-modal.active {
  display: grid;
  place-items: center;
}

.bot-run-dialog {
  width: min(1180px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 30px 90px rgba(0, 15, 73, .30);
}

.bot-run-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.bot-run-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
}

.bot-run-head span {
  color: var(--muted);
  font-weight: 750;
}

.bot-run-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.bot-phase {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.bot-phase.active {
  border-color: var(--purple);
  background: #eef2ff;
  color: var(--purple-dark);
}

.bot-phase.done {
  border-color: rgba(34,197,94,.38);
  background: rgba(34,197,94,.10);
  color: #15803d;
}

.bot-progress-track {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: #e9edfb;
}

.bot-progress-track > div {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  transition: width .35s ease;
}

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

.bot-screen,
.bot-run-timeline {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.screen-fields {
  display: grid;
  gap: 8px;
}

.screen-field {
  display: grid;
  grid-template-columns: minmax(120px, 34%) 1fr;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.screen-field span:first-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.screen-field span:last-child {
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.timeline-step {
  opacity: .45;
  transform: translateY(4px);
  transition: opacity .25s ease, transform .25s ease, border-color .25s ease;
}

.timeline-step.active,
.timeline-step.done {
  opacity: 1;
  transform: translateY(0);
}

.timeline-step.active {
  border-color: rgba(123,127,255,.72);
  box-shadow: 0 14px 28px rgba(68,36,153,.10);
}

.bot-run-kpis {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.compact-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.shell {
  width: 100%;
  max-width: 2100px;
  padding: 24px 32px 64px;
  display: grid;
  gap: 18px;
  min-width: 0;
}

.wizard-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 15, 73, .42);
  backdrop-filter: blur(8px);
}

.wizard-overlay.hidden {
  display: none;
}

.wizard-modal {
  width: min(1500px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.72);
  background: rgba(255,255,255,.96);
  box-shadow: 0 30px 90px rgba(0, 15, 73, .28);
  overflow: hidden;
}

.wizard-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.wizard-head h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.wizard-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 320px;
}

.wizard-steps,
.wizard-main,
.wizard-assistant {
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.wizard-steps {
  border-right: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 8px;
  background: #f8faff;
}

.wizard-steps button {
  width: 100%;
  min-height: 58px;
  display: grid;
  gap: 4px;
  justify-items: start;
  text-align: left;
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
}

.wizard-steps button.active {
  background: var(--navy);
  color: #fff;
}

.wizard-steps small {
  color: inherit;
  opacity: .75;
  font-weight: 800;
}

.wizard-why {
  margin: 0 0 16px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.5;
}

.wizard-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.wizard-fields label {
  display: grid;
  gap: 6px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.wizard-fields input,
.wizard-fields select,
.wizard-fields textarea,
.wizard-assistant textarea {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 800;
}

.wizard-fields textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.45;
}

.onboarding-fieldset {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 12px;
}

.onboarding-fieldset legend {
  padding: 0 8px;
  display: grid;
  gap: 4px;
  color: var(--navy);
  font-weight: 950;
}

.onboarding-fieldset legend span {
  letter-spacing: .04em;
  text-transform: uppercase;
}

.onboarding-fieldset legend small,
.wizard-field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 750;
  text-transform: none;
}

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

.wizard-field-checkbox {
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.onboarding-checkbox {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  color: var(--navy) !important;
}

.onboarding-checkbox input {
  width: 18px;
  min-height: 18px;
}

.wizard-actions {
  margin-top: 16px;
}

.integration-guidance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.integration-provider-fields {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 12px;
}

.integration-provider-fields legend {
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.integration-provider-fields legend small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.integration-provider-fields p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.45;
}

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

.provider-field-grid label small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 750;
  text-transform: none;
}

.wizard-assistant {
  border-left: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 12px;
  background: #fff;
}

.wizard-assistant h3 {
  margin: 0;
}

.assistant-answer {
  min-height: 150px;
  padding: 14px;
  border-radius: 14px;
  background: #f8faff;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.5;
}

.commandbar,
.filterbar,
.board,
.kpi {
  background: var(--surface);
  border: 1px solid rgba(236,238,243,.86);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.commandbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: start;
  gap: 18px;
  border-radius: 22px;
  padding: 18px 20px;
  min-width: 0;
}

.commandbar > div:first-child {
  min-width: 0;
}

.tenant {
  margin: 0 0 5px;
  color: #9360fe;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: #080a12; }
h1 { margin-bottom: 0; font-size: 30px; line-height: 1.15; overflow-wrap: anywhere; }
h2 { margin-bottom: 0; font-size: 17px; line-height: 1.2; }
h3 { margin-bottom: 0; font-size: 14px; line-height: 1.25; }

.actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.module-action[hidden] {
  display: none;
}

.product-switcher {
  width: 190px;
  margin: 0;
}

button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 15px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(123,127,255,.22);
  overflow-wrap: anywhere;
  white-space: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  flex: 0 0 auto;
}

button:hover { background: var(--accent-hover); }

button:disabled {
  cursor: progress;
  opacity: .68;
  box-shadow: none;
}

button.secondary {
  background: transparent;
  color: var(--purple-dark);
  border-color: var(--purple);
  box-shadow: none;
}

button.secondary:hover { background: rgba(123,127,255,.08); }

select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}

.filterbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
}

.filterbar label { margin-bottom: 0; }

.credential-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.credential-form button {
  align-self: end;
}

.ai-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(123,127,255,.24);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(123,127,255,.12), rgba(254,96,168,.10));
  box-shadow: var(--shadow-soft);
}

.orb {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--purple), #9360fe, var(--pink));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  box-shadow: 0 0 0 8px rgba(123,127,255,.09);
}

.ai-banner p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.kpi {
  border-radius: 18px;
  padding: 16px;
  min-height: 108px;
  position: relative;
  overflow: hidden;
}

.kpi::before {
  content: "";
  position: absolute;
  inset: 0;
  height: auto;
  background: linear-gradient(135deg, rgba(123,127,255,.10), rgba(254,96,168,.04));
}

.kpi strong {
  position: relative;
  display: block;
  font-size: 30px;
  line-height: 1;
  margin: 12px 0 8px;
  letter-spacing: 0;
  color: #060714;
}

.kpi span {
  position: relative;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 16px;
}

.grid-2 > .board:only-child,
.grid-3 > .board:only-child {
  grid-column: 1 / -1;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

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

.board-subsection {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.backlog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.progress {
  height: 7px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 10px;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--purple), #9360fe, var(--pink));
}

.board {
  border-radius: 18px;
  padding: 18px;
  min-width: 0;
}

.board-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  min-width: 0;
}

.board-head > div {
  min-width: 0;
}

.board-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.pill,
.chip,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  max-width: 100%;
  white-space: normal;
  text-align: left;
}

.pill,
.chip {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid var(--line);
}

.status.approved { background: #dcfce7; color: #15803d; }
.status.pending { background: #ede9fe; color: #6d28d9; }
.status.blocked { background: #fee2e2; color: #b91c1c; }

.action-status {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.action-status:empty {
  display: none;
}

.action-status .compact-item {
  border-left: 4px solid var(--purple);
}

.action-status.approved .compact-item { border-left-color: #16a34a; }
.action-status.blocked .compact-item { border-left-color: #dc2626; }

.call-table,
.compact-list {
  display: grid;
  gap: 8px;
}

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

.funnel-grid {
  display: grid;
  gap: 9px;
  margin: 12px 0;
}

.funnel-step {
  display: grid;
  grid-template-columns: minmax(130px, .35fr) minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.funnel-step strong {
  display: block;
  font-size: 20px;
  line-height: 1;
}

.funnel-step span,
.funnel-step small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric-card.tight {
  min-height: 0;
  padding: 11px;
  border-radius: 14px;
}

.metric-card.tight strong {
  font-size: 14px;
}

.metric-card.tight p,
.metric-card.tight small {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.call-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(130px, .75fr) minmax(130px, .75fr) minmax(90px, .5fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  min-width: 0;
  transition: border-color .24s ease, box-shadow .24s ease, transform .24s ease, background .24s ease;
}

.call-row.transitioning {
  border-color: rgba(99,102,241,.58);
  background: linear-gradient(90deg, rgba(238,242,255,.94), #fff 42%, rgba(236,253,245,.8));
  box-shadow: 0 18px 42px rgba(99,102,241,.14);
  transform: translateY(-1px);
}

.call-row > * {
  min-width: 0;
}

.call-row:hover,
.compact-item:hover {
  border-color: #b8c4d0;
  box-shadow: 0 8px 24px rgba(68,36,153,.07);
}

.call-row p,
.compact-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.compact-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  min-width: 0;
  overflow: hidden;
}

.published-item {
  border-color: rgba(22, 163, 74, .38);
  box-shadow: 0 14px 30px rgba(22, 163, 74, .08);
}

.action-flow-panel {
  display: block;
  min-height: 0;
}

.action-flow-panel:empty {
  display: none;
}

.action-flow {
  display: grid;
  gap: 10px;
  padding: 12px;
  margin: 0 0 12px;
  border: 1px solid rgba(123,127,255,.24);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(246,248,255,.94));
  box-shadow: 0 16px 34px rgba(0,15,73,.08);
}

.action-flow.complete {
  border-color: rgba(22,163,74,.32);
  background: linear-gradient(135deg, #fff, #f0fdf4);
}

.action-flow-copy {
  display: grid;
  gap: 3px;
}

.action-flow-copy strong {
  color: var(--navy);
  font-size: 14px;
}

.action-flow-copy span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.action-flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.flow-step {
  min-height: 34px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid #dbe3f3;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
}

.flow-step.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--purple), #7b7fff);
  box-shadow: 0 12px 22px rgba(99,102,241,.22);
  animation: flowPulse 1s ease-in-out infinite;
}

.flow-step.done {
  color: #166534;
  border-color: rgba(22,163,74,.28);
  background: #ecfdf5;
}

.flow-hint {
  display: block;
  margin-top: 6px;
  color: #4f46e5;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

@keyframes flowPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1px); }
}

.location-card {
  min-height: 178px;
}

.location-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.location-metrics span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  background: #fff;
}

.location-metrics strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
  min-width: 0;
}

.thread-preview {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.thread-preview span {
  display: block;
  border-left: 3px solid #9b87f5;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.thread-preview strong {
  color: var(--ink);
}

.survey-preview {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.survey-product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  max-width: 1180px;
}

.survey-builder-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.survey-product-stack .survey-panel {
  width: 100%;
}

.survey-product-stack .compact-list {
  display: grid;
  gap: 12px;
}

.survey-product-stack .survey-studio-panel {
  overflow: hidden;
}

.survey-builder-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.survey-builder-form input,
.survey-builder-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.survey-source-bars,
.survey-distribution-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

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

.survey-source-bars span,
.survey-distribution-grid span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
  background: #fff;
}

.survey-source-bars strong,
.survey-distribution-grid strong {
  color: var(--ink);
  font-size: 13px;
}

.survey-distribution-card .text-link {
  color: var(--primary);
  font-weight: 900;
  text-decoration: none;
}

.embed-code {
  width: 100%;
  min-height: 96px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  color: var(--muted);
  background: #f8fafc;
  font: 12px/1.5 var(--mono);
  resize: vertical;
}

.public-survey-page {
  display: block;
  grid-template-columns: none;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(98, 88, 255, .16), transparent 34%),
    linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.public-survey-wrap {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.public-survey-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  color: var(--muted);
  font-weight: 900;
}

.public-survey-brand img {
  width: 190px;
  height: auto;
}

.public-survey-card {
  min-height: 0;
}

.public-survey-shell {
  min-height: calc(100vh - 132px);
}

.public-survey-shell .typeform-question h1,
.public-survey-complete .typeform-question h1 {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.02;
}

.public-survey-complete {
  min-height: 520px;
  display: grid;
  place-items: center;
  text-align: center;
}

.skeleton-card {
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(90deg, #fff, #f2f6ff, #fff);
  background-size: 200% 100%;
  animation: shimmer 1.25s infinite linear;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

.typeform-shell {
  overflow: hidden;
  border: 1px solid rgba(221, 228, 239, .92);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,251,255,.94));
  box-shadow: 0 28px 80px rgba(7, 21, 63, .10);
}

.typeform-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(22px, 4vw, 34px);
  align-items: center;
  min-height: calc(100vh - 238px);
  padding: clamp(22px, 4vw, 46px);
}

.typeform-card > img,
.typeform-card > video {
  width: 100%;
  height: clamp(210px, 32vw, 330px);
  max-height: 330px;
  object-fit: contain;
  border: 1px solid rgba(215, 224, 239, .92);
  border-radius: 26px;
  background: #f8fbff;
  box-shadow: 0 20px 48px rgba(7, 21, 63, .10);
}

.public-survey-shell .typeform-question {
  width: min(760px, 100%);
  min-width: 0;
  margin: 0 auto;
  text-align: left;
}

.public-survey-shell .typeform-question > span {
  color: var(--survey-accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nps-scale,
.choice-stack {
  display: grid;
  gap: 10px;
}

.nps-scale {
  grid-template-columns: repeat(11, minmax(40px, 1fr));
}

.nps-scale button,
.choice-stack button {
  min-height: 54px;
  border: 1px solid #d7e0ef;
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 12px 30px rgba(7, 21, 63, .06);
}

.nps-scale button {
  justify-content: center;
  padding: 0;
}

.choice-stack button {
  justify-content: flex-start;
  text-align: left;
}

.nps-scale button.selected,
.choice-stack button.selected {
  border-color: var(--survey-accent);
  background: color-mix(in srgb, var(--survey-accent) 10%, #fff);
}

.typeform-progress {
  height: 6px;
  background: #edf2ff;
}

.typeform-progress span {
  display: block;
  height: 100%;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, var(--survey-accent), var(--pink));
  transition: width 180ms ease;
}

.typeform-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .72fr);
  gap: 26px;
  align-items: stretch;
  min-height: 470px;
  padding: clamp(22px, 4vw, 46px);
}

.typeform-question {
  display: grid;
  align-content: center;
  gap: 18px;
}

.typeform-kicker {
  color: var(--survey-accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.typeform-question h3 {
  margin: 0;
  max-width: 720px;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.04;
  letter-spacing: 0;
}

.typeform-question p {
  max-width: 640px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.58;
}

.typeform-media {
  display: grid;
  align-items: center;
}

.typeform-media img,
.typeform-media video {
  width: 100%;
  min-height: 340px;
  max-height: 520px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(7, 21, 63, .16);
}

.typeform-options {
  display: grid;
  gap: 12px;
}

.typeform-options button,
.typeform-nps button {
  justify-content: flex-start;
  min-height: 58px;
  border: 1px solid #d7e0ef;
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 12px 30px rgba(7, 21, 63, .06);
}

.typeform-options button {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  text-align: left;
}

.typeform-options b {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--survey-accent);
}

.typeform-options button.selected,
.typeform-nps button.selected {
  border-color: var(--survey-accent);
  background: color-mix(in srgb, var(--survey-accent) 10%, #fff);
  box-shadow: 0 18px 44px color-mix(in srgb, var(--survey-accent) 20%, transparent);
}

.typeform-nps {
  display: grid;
  grid-template-columns: repeat(11, minmax(34px, 1fr));
  gap: 8px;
}

.typeform-nps button {
  justify-content: center;
  min-height: 48px;
  padding: 0;
}

.typeform-scale-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.typeform-textarea {
  min-height: 160px;
  resize: vertical;
  border: 1px solid #d7e0ef;
  border-radius: 18px;
  padding: 18px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 18px;
  line-height: 1.45;
  box-shadow: 0 14px 34px rgba(7, 21, 63, .06);
}

.typeform-primary {
  width: max-content;
  min-width: 150px;
}

.typeform-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px 24px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .82);
}

.typeform-footer span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.survey-shell {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.survey-hero {
  padding: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--survey-accent), #ec4899);
}

.survey-hero span,
.survey-block span {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.survey-hero h3,
.survey-block h4 {
  margin: 4px 0;
  letter-spacing: 0;
}

.survey-hero p,
.survey-block p {
  margin: 0;
}

.survey-blocks {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.survey-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #f8fafc;
  overflow: hidden;
}

.survey-block img,
.survey-block video {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  margin-top: 10px;
  border: 1px solid var(--line);
}

.survey-rich {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.detail {
  display: grid;
  gap: 12px;
}

.call-pop-layer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 26px;
  background: rgba(0, 15, 73, .34);
  backdrop-filter: blur(8px);
}

.call-pop-layer[hidden] {
  display: none;
}

.call-pop-window {
  width: min(1180px, calc(100vw - 52px));
  max-height: calc(100vh - 52px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.76);
  background: rgba(255,255,255,.96);
  box-shadow: 0 36px 100px rgba(0, 15, 73, .28);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.call-pop-window.expanded {
  width: min(1560px, calc(100vw - 52px));
}

.call-pop-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.call-pop-title {
  display: flex;
  gap: 14px;
  align-items: center;
}

.call-pop-title img {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 16px 36px rgba(68,36,153,.18);
}

.call-pop-head > div {
  min-width: 0;
}

.call-pop-head h2 {
  margin: 0 0 4px;
  font-size: 26px;
}

.call-pop-head span {
  color: var(--muted);
  font-weight: 800;
}

.call-pop-body {
  display: grid;
  grid-template-columns: minmax(300px, .82fr) minmax(360px, 1fr) minmax(340px, .95fr);
  gap: 14px;
  align-items: start;
}

.call-pop-body.expanded {
  grid-template-columns: minmax(320px, .72fr) minmax(390px, .95fr) minmax(420px, 1.05fr);
}

.call-card-live,
.call-pop-history {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  min-width: 0;
}

.modern-call-card {
  border: 0;
  border-radius: 24px;
  background: linear-gradient(160deg, #061242, #1c2365 55%, #615bff);
  color: #fff;
  box-shadow: 0 24px 70px rgba(0,15,73,.22);
}

.modern-call-card p {
  color: rgba(255,255,255,.82);
}

.caller-id-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.caller-id-card img {
  width: 92px;
  height: 92px;
  border-radius: 26px;
  object-fit: cover;
  box-shadow: 0 18px 38px rgba(0,0,0,.24);
}

.caller-id-card span,
.appointment-snapshot span,
.call-risk-strip span,
.patient-record-summary span,
.patient-record-cues span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
}

.caller-id-card span,
.appointment-snapshot span,
.call-risk-strip span {
  color: rgba(255,255,255,.68);
}

.caller-id-card strong {
  display: block;
  margin-top: 4px;
  font-size: 30px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.caller-id-card p {
  margin: 8px 0 0;
  font-weight: 900;
}

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

.appointment-snapshot div,
.call-risk-strip span {
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  background: rgba(255,255,255,.1);
  padding: 10px;
}

.appointment-snapshot strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  line-height: 1.25;
}

.call-risk-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.patient-record-panel {
  position: relative;
  z-index: 0;
  border: 1px solid rgba(123,127,255,.18);
  border-radius: 24px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, #f7f9ff);
  box-shadow: 0 18px 48px rgba(0,15,73,.08);
  max-width: 100%;
  overflow: hidden;
}

.patient-record-expand {
  position: absolute;
  top: 14px;
  right: 14px;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  font-size: 12px;
  background: #eef2ff;
  color: var(--purple-dark);
  box-shadow: none;
}

.patient-record-hero {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-right: 118px;
}

.patient-record-hero img {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 16px 34px rgba(68,36,153,.16);
}

.patient-record-hero h3 {
  font-size: 20px;
  overflow-wrap: anywhere;
}

.patient-record-hero span {
  color: var(--muted);
  font-weight: 900;
}

.patient-record-summary,
.patient-record-cues {
  display: grid;
  gap: 8px;
}

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

.patient-record-summary div,
.patient-record-cues article {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 11px;
}

.patient-record-summary span,
.patient-record-cues span {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
}

.patient-record-summary strong,
.patient-record-cues strong {
  color: var(--navy);
  line-height: 1.25;
}

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

.patient-note {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.patient-record-drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  justify-content: end;
  background: rgba(0,15,73,.28);
  backdrop-filter: blur(6px);
}

.patient-record-drawer-layer[hidden] {
  display: none;
}

.patient-record-drawer {
  width: min(620px, calc(100vw - 24px));
  height: 100vh;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px;
  background: linear-gradient(180deg, #fff, #f7f9ff);
  border-left: 1px solid rgba(123,127,255,.2);
  box-shadow: -24px 0 80px rgba(0,15,73,.22);
}

.drawer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.drawer-hero {
  padding-right: 0;
}

.record-drawer {
  border-radius: 24px;
}

.expanded-record {
  min-height: 100%;
}

.workflow-canvas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.workflow-node {
  position: relative;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.workflow-node::after {
  content: attr(data-type);
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 900;
  color: var(--purple-dark);
  background: #ede9fe;
  border: 1px solid #ddd6fe;
  border-radius: 999px;
  padding: 4px 7px;
  text-transform: uppercase;
}

.workflow-node strong {
  padding-right: 70px;
}

.workflow-node p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.timeline {
  display: grid;
  gap: 8px;
}

.timeline-item {
  padding: 10px;
  border-left: 3px solid var(--accent);
  background: #fff;
  border-radius: 0 16px 16px 0;
  box-shadow: 0 8px 24px rgba(68,36,153,.04);
}

.timeline-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.result {
  white-space: pre-wrap;
  min-height: 162px;
  padding: 11px;
  overflow: auto;
  border-radius: 18px;
  background: #080a12;
  color: #eef2ff;
  font-size: 12px;
  border: 1px solid #263241;
}

.audit-table {
  display: grid;
}

.audit-row {
  display: grid;
  grid-template-columns: minmax(160px, .75fr) minmax(180px, .85fr) minmax(260px, 1fr);
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 13px;
  background: #fff;
  margin-bottom: 8px;
  min-width: 0;
}

.audit-row:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }

.wallboard {
  display: grid;
  grid-template-columns: minmax(380px, 1.15fr) minmax(320px, .85fr) minmax(360px, .8fr);
  gap: 16px;
}

.chart-board { min-height: 330px; }

.bar-chart {
  height: 236px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  padding-top: 10px;
}

.bar-group {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  height: 100%;
}

.bars {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 100%;
  border-bottom: 1px solid var(--line);
}

.bar {
  flex: 1;
  min-height: 8px;
  border-radius: 5px 5px 0 0;
}

.bar.inbound { background: var(--purple); }
.bar.outbound { background: var(--pink); }
.bar.missed { background: var(--yellow); }

.bar-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.line-chart {
  height: 236px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding-top: 10px;
}

.line-point {
  display: grid;
  align-content: end;
  gap: 8px;
  height: 100%;
}

.level-bar {
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--ok), #15803d);
  min-height: 18px;
}

.team-grid { display: grid; gap: 9px; }

.team-card {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.message-thread {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.conversation-card {
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.conversation-card:hover,
.conversation-card.selected {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  box-shadow: 0 16px 38px rgba(49, 46, 129, .12);
  transform: translateY(-1px);
}

.conversation-card.selected {
  background: #f7f6ff;
}

.message-bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.message-bubble.outbound {
  margin-left: auto;
  background: #ede9fe;
  border-color: #ddd6fe;
}

.message-bubble.inbound {
  margin-right: auto;
  background: #f8fafc;
}

.message-bubble p {
  margin: 0;
  color: var(--ink);
}

.message-bubble small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin-top: 5px;
}

.text-reply-composer {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.text-reply-composer label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.text-reply-composer textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  text-transform: none;
}

.text-reply-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.text-reply-actions span,
.inline-error,
.empty-state {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.inline-error {
  min-height: 18px;
  margin: 0;
  color: #b91c1c;
}

.softphone-grid {
  display: grid;
  grid-template-columns: minmax(300px, .85fr) minmax(360px, 1.15fr);
  gap: 14px;
  align-items: start;
}

.dialer-card,
.caller-pop {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 14px;
}

.premium-phone {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 0;
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(244,247,255,.92)) padding-box,
    linear-gradient(135deg, rgba(123,127,255,.95), rgba(254,96,168,.65), rgba(14,165,233,.6)) border-box;
  box-shadow: 0 28px 80px rgba(0,15,73,.16), inset 0 1px 0 rgba(255,255,255,.95);
}

.premium-phone::before {
  content: "";
  position: absolute;
  inset: -34% -18% auto auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(123,127,255,.22), transparent 68%);
  pointer-events: none;
}

.phone-topbar,
.phone-agent,
.phone-status-row,
.phone-device-strip,
.phone-signal {
  display: flex;
  align-items: center;
}

.phone-topbar {
  position: relative;
  justify-content: space-between;
  gap: 12px;
}

.phone-agent {
  gap: 12px;
  min-width: 0;
}

.phone-agent h3 {
  margin: 0;
  font-size: 17px;
}

.phone-agent span {
  color: var(--muted);
  font-weight: 800;
}

.phone-avatar {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--navy), var(--purple));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(68,36,153,.24);
}

.phone-signal {
  gap: 4px;
  height: 28px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
}

.phone-signal span {
  width: 5px;
  border-radius: 999px;
  background: #d7deee;
}

.phone-signal span:nth-child(1) { height: 7px; }
.phone-signal span:nth-child(2) { height: 11px; }
.phone-signal span:nth-child(3) { height: 15px; }
.phone-signal span:nth-child(4) { height: 19px; }

.phone-signal span.active {
  background: linear-gradient(180deg, #22c55e, #0f9f6e);
}

.phone-hero {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(0,15,73,.98), rgba(68,36,153,.94) 58%, rgba(123,127,255,.88));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 18px 42px rgba(0,15,73,.22);
}

.phone-status-row {
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.phone-status-row strong,
.phone-status-row span {
  color: rgba(255,255,255,.82);
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34,197,94,.18);
}

.phone-hero p {
  margin: 0;
  color: rgba(255,255,255,.76);
  font-weight: 800;
}

.phone-device-strip {
  position: relative;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.86);
}

.dial-display {
  min-height: 92px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  text-align: center;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  padding: 14px;
}

.dial-display strong {
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0;
}

.dial-display span {
  color: rgba(255,255,255,.78);
  font-weight: 800;
}

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

.dial-pad button {
  min-height: 64px;
  font-size: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #f2f5ff);
  border: 1px solid #dfe5f7;
  color: var(--navy);
  box-shadow: 0 12px 24px rgba(0,15,73,.08), inset 0 1px 0 rgba(255,255,255,.9);
}

.dial-pad button:active {
  transform: translateY(1px) scale(.99);
  box-shadow: inset 0 4px 10px rgba(0,15,73,.08);
}

.phone-screen {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(123,127,255,.18);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f6f8ff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.phone-screen label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 900;
}

.phone-number-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 10px;
}

.phone-number-line input {
  min-height: 62px;
  border-radius: 18px;
  border: 1px solid #dfe5f7;
  padding: 0 18px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0;
  color: var(--navy);
  background: #fff;
  box-shadow: 0 12px 28px rgba(0,15,73,.05);
}

.softphone-call-actions {
  grid-template-columns: 1fr 1fr 1fr;
}

.softphone-call-actions button {
  min-height: 56px;
  border-radius: 18px;
}

.softphone-call-actions [data-softphone-dial] {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 18px 32px rgba(34,197,94,.24);
}

.softphone-call-actions [data-browser-hangup] {
  color: #b4232d;
  border-color: #fecdd3;
  background: #fff1f2;
}

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

.caller-pop-grid div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: var(--surface-2);
  display: grid;
  gap: 4px;
}

.caller-pop-grid strong {
  font-size: 13px;
}

.caller-pop-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.3);
}

@media (min-width: 2100px) {
  .shell { max-width: 2300px; padding: 28px; gap: 20px; }
  h1 { font-size: 30px; }
  .kpi { min-height: 104px; padding: 16px; }
  .kpi strong { font-size: 34px; }
  .chart-board { min-height: 430px; }
  .bar-chart,
  .line-chart { height: 320px; }
  .board { padding: 18px; }
  .call-row { grid-template-columns: minmax(300px, 1.5fr) minmax(150px, .8fr) minmax(150px, .8fr) minmax(100px, .6fr) auto; }
}

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

@media (max-width: 1120px) {
  body { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; }
  .commandbar { grid-template-columns: 1fr; }
  .actions { justify-content: flex-start; }
  .wizard-layout,
  .wizard-fields,
  .integration-guidance {
    grid-template-columns: 1fr;
  }
  .wizard-steps,
  .wizard-assistant {
    border: 0;
  }
  .workbench,
  .call-pop-body,
  .call-pop-body.expanded,
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .shell { padding: 12px; }
  .commandbar { align-items: flex-start; }
  .actions { width: 100%; }
  .actions button,
  .product-switcher { width: 100%; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-grid,
  .location-grid,
  .backlog-grid,
  .workflow-canvas,
  .softphone-grid,
  .caller-pop-grid,
  .credential-form,
  .filterbar { grid-template-columns: 1fr; }
  .call-row,
  .audit-row { grid-template-columns: 1fr; }
}

/* Enterprise visual refresh: shared surfaces, spacing, and NOC-scale readability. */
:root {
  --navy: #07153f;
  --purple: #635bff;
  --purple-dark: #3528a8;
  --pink: #e84d8a;
  --yellow: #f7b731;
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #f7f9fd;
  --ink: #111827;
  --muted: #627084;
  --line: #dde4ef;
  --line-strong: #c9d3e3;
  --nav: #07153f;
  --nav-2: #0b1026;
  --accent: #635bff;
  --accent-hover: #4f46e5;
  --blue: #0577c9;
  --warn: #d97706;
  --danger: #dc2626;
  --ok: #12945a;
  --shadow: 0 18px 46px rgba(15, 23, 42, .08);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, .06);
}

body {
  background:
    linear-gradient(180deg, #f8fbff 0%, #eef3fa 42%, #f5f7fb 100%);
  grid-template-columns: 276px minmax(0, 1fr);
  font-family: Inter, Montserrat, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.login-screen {
  background:
    linear-gradient(120deg, rgba(7, 21, 63, .96) 0%, rgba(11, 16, 38, .96) 48%, #f5f7fb 48%, #f5f7fb 100%);
}

.login-card,
.wizard-modal,
.call-pop-window {
  border-radius: 18px;
  border-color: rgba(221, 228, 239, .92);
  box-shadow: 0 28px 80px rgba(7, 21, 63, .18);
}

.rail {
  background:
    linear-gradient(180deg, #07153f 0%, #0b1535 54%, #090d21 100%);
  padding: 18px 0;
  box-shadow: inset -1px 0 0 rgba(255,255,255,.06);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px 20px;
  margin-bottom: 10px;
  font-size: 18px;
  letter-spacing: 0;
}

.logo::before {
  content: "O";
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.24);
}

nav {
  gap: 2px;
  padding: 0 10px 18px;
}

nav a {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 10px;
  border-left: 0;
  color: rgba(241,245,249,.72);
  font-size: 13px;
  letter-spacing: 0;
}

nav a.active,
nav a:hover {
  background: rgba(255,255,255,.10);
  border-left-color: transparent;
  color: #fff;
}

nav a.active {
  box-shadow: inset 3px 0 0 var(--pink);
}

.shell {
  max-width: none;
  padding: 22px 28px 72px;
  gap: 16px;
}

.commandbar {
  position: sticky;
  top: 0;
  z-index: 25;
  grid-template-columns: minmax(320px, 1fr) minmax(520px, auto);
  align-items: center;
  border-radius: 0 0 18px 18px;
  border-top: 0;
  padding: 16px 18px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 32px rgba(15,23,42,.08);
}

.tenant {
  color: var(--purple-dark);
  letter-spacing: .06em;
}

h1 {
  font-size: 28px;
  font-weight: 900;
}

h2 {
  font-size: 16px;
  font-weight: 900;
}

h3 {
  font-size: 13px;
  font-weight: 900;
}

.actions,
.row-actions {
  gap: 7px;
}

button {
  min-height: 36px;
  border-radius: 9px;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: none;
  letter-spacing: 0;
}

button:hover {
  transform: translateY(-1px);
}

button.secondary {
  background: #fff;
  color: #334155;
  border-color: var(--line-strong);
}

button.secondary:hover {
  background: #f8fafc;
  border-color: var(--purple);
  color: var(--purple-dark);
}

select,
input,
textarea {
  min-height: 38px;
  border-radius: 9px;
  border-color: var(--line-strong);
  background: #fff;
  color: var(--ink);
}

label {
  gap: 6px;
  color: #526174;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.commandbar,
.filterbar,
.board,
.kpi {
  background: rgba(255,255,255,.95);
  border-color: rgba(221,228,239,.96);
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
}

.filterbar {
  border-radius: 14px;
  padding: 12px;
}

.ai-banner {
  border-radius: 16px;
  border: 1px solid #d7dcff;
  background: linear-gradient(135deg, #f7f7ff, #fff6fa);
  box-shadow: var(--shadow-soft);
}

.orb {
  width: 46px;
  height: 32px;
  flex-basis: 46px;
  border-radius: 9px;
  background: var(--navy);
  box-shadow: none;
  font-size: 12px;
}

.kpi-grid {
  grid-template-columns: repeat(10, minmax(118px, 1fr));
  gap: 8px;
}

.kpi {
  border-radius: 12px;
  min-height: 112px;
  padding: 13px 13px 12px;
  display: grid;
  align-content: space-between;
  border-top: 4px solid #94a3b8;
}

.kpi::before {
  display: none;
}

.kpi span {
  color: #5a6677;
  font-size: 10px;
  letter-spacing: .05em;
}

.kpi strong {
  margin: 8px 0 6px;
  font-size: 31px;
  font-weight: 950;
}

.kpi small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.kpi-good { border-top-color: var(--ok); }
.kpi-warn { border-top-color: var(--yellow); }
.kpi-danger { border-top-color: var(--danger); }

.wallboard {
  grid-template-columns: minmax(420px, 1.25fr) minmax(320px, .9fr) minmax(360px, .85fr);
}

.board {
  border-radius: 14px;
  padding: 16px;
}

.board-head {
  gap: 14px;
  padding-bottom: 11px;
  margin-bottom: 12px;
}

.board-head span {
  color: #6b788b;
  font-weight: 750;
}

.compact-item,
.call-row,
.team-card,
.dialer-card,
.caller-pop,
.workflow-node,
.call-card-live,
.call-pop-history {
  border-radius: 11px;
  border-color: var(--line);
  background: #fff;
  box-shadow: 0 1px 0 rgba(15,23,42,.02);
}

.compact-item {
  padding: 12px;
}

.compact-item:hover,
.call-row:hover,
.team-card:hover {
  border-color: #b9c6d8;
  box-shadow: 0 12px 26px rgba(15,23,42,.07);
}

.call-row {
  grid-template-columns: minmax(300px, 1.5fr) minmax(130px, .7fr) minmax(130px, .7fr) minmax(88px, .45fr) auto;
  padding: 12px 13px;
  border-left: 5px solid var(--purple);
}

.call-row p,
.compact-item p {
  color: #66758a;
  font-size: 12px;
}

.pill,
.chip,
.status {
  min-height: 23px;
  border-radius: 8px;
  font-size: 10px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.pill,
.chip {
  background: #f5f7fb;
  color: #475569;
}

.status.approved {
  background: #e8f8ef;
  color: #087347;
  border: 1px solid #bce8ce;
}

.status.pending {
  background: #fff7e6;
  color: #9a5a00;
  border: 1px solid #f5d58a;
}

.status.blocked {
  background: #fff1f2;
  color: #b4232d;
  border: 1px solid #ffc6cc;
}

.bar-chart,
.line-chart {
  height: 254px;
  padding: 6px 2px 0;
}

.bars {
  border-bottom-color: #cbd5e1;
}

.bar {
  border-radius: 4px 4px 0 0;
}

.bar.inbound { background: #635bff; }
.bar.outbound { background: #e84d8a; }
.bar.missed { background: #f7b731; }

.level-bar {
  background: linear-gradient(180deg, #28b77a, #087347);
}

.team-card {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  border-radius: 12px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: none;
}

.module-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.location-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.location-metrics span,
.caller-pop-grid div {
  border-radius: 10px;
  background: #f8fafc;
}

.message-bubble {
  border-radius: 12px;
}

.dial-display {
  border-radius: 18px;
}

.dial-pad button {
  min-height: 64px;
  border-radius: 20px;
  font-size: 19px;
  background: linear-gradient(180deg, #fff, #f2f5ff);
  color: var(--navy);
  border-color: #dfe5f7;
}

.dial-pad button strong,
.dial-pad button span {
  display: block;
}

.dial-pad button strong {
  font-size: 22px;
  line-height: 1;
}

.dial-pad button span {
  margin-top: 4px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 900;
}

.dial-pad button:hover {
  background: linear-gradient(180deg, #fff, #eaf0ff);
  border-color: rgba(123,127,255,.42);
}

.credential-form {
  gap: 12px;
}

.result {
  border-radius: 12px;
  background: #070b18;
}

.audit-row {
  border-radius: 10px;
  background: #fff;
}

.legal-footer {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, auto) minmax(260px, auto);
  gap: 18px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #07153f;
  color: #e5e7eb;
}

.legal-footer strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
}

.legal-footer p {
  margin: 0;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 900;
}

.footer-links a:hover,
.footer-links a:focus {
  border-color: var(--pink);
  outline: 2px solid rgba(232,77,138,.35);
}

@media (min-width: 2100px) {
  body { grid-template-columns: 300px minmax(0, 1fr); }
  .shell { padding: 26px 34px 80px; gap: 18px; }
  .commandbar { padding: 18px 22px; }
  h1 { font-size: 34px; }
  h2 { font-size: 18px; }
  .kpi-grid { gap: 10px; }
  .kpi { min-height: 132px; padding: 16px; }
  .kpi strong { font-size: 42px; }
  .chart-board { min-height: 460px; }
  .bar-chart,
  .line-chart { height: 340px; }
  .board { padding: 20px; }
  .compact-item,
  .call-row { padding: 15px; }
}

@media (max-width: 1480px) {
  .kpi-grid { grid-template-columns: repeat(5, minmax(132px, 1fr)); }
}

@media (max-width: 1120px) {
  body { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; }
  nav { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .commandbar { position: static; grid-template-columns: 1fr; border-radius: 14px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-footer { grid-template-columns: 1fr; }
  .bot-run-grid,
  .bot-run-progress { grid-template-columns: 1fr; }
  .bot-run-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .shell { padding: 12px; }
  .kpi strong { font-size: 26px; }
  .board { padding: 13px; }
  nav { grid-template-columns: 1fr 1fr; }
  .bot-run-modal { padding: 12px; }
  .bot-run-dialog { padding: 14px; max-height: calc(100vh - 24px); }
  .bot-run-head { display: grid; }
  .screen-field { grid-template-columns: 1fr; }
}

/* Final product polish: calmer enterprise type and alignment. */
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #152033;
  letter-spacing: 0;
}

.logo {
  font-size: 17px;
  font-weight: 780;
  letter-spacing: 0;
}

.logo::after {
  margin-left: 0;
}

nav a {
  min-height: 40px;
  padding: 9px 22px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
}

.shell {
  padding: 20px 28px 68px;
  gap: 14px;
}

.commandbar {
  grid-template-columns: minmax(300px, 1fr) minmax(460px, auto);
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
}

.commandbar .actions {
  align-items: end;
  justify-content: flex-end;
}

.tenant {
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .08em;
}

h1 {
  font-size: clamp(22px, 1.65vw, 28px);
  line-height: 1.12;
  font-weight: 760;
  color: #0b1220;
}

h2 {
  font-size: 16px;
  line-height: 1.22;
  font-weight: 720;
  color: #111827;
}

h3 {
  font-size: 13px;
  line-height: 1.26;
  font-weight: 700;
  color: #111827;
}

p {
  line-height: 1.48;
}

button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.15;
}

button.secondary {
  font-weight: 650;
}

label {
  color: #5d6b7f;
  font-size: 11px;
  font-weight: 680;
  letter-spacing: .02em;
}

select,
input,
textarea {
  font-weight: 620;
}

.product-switcher {
  width: 176px;
}

.product-switcher select {
  min-height: 36px;
}

.ai-banner {
  padding: 15px 18px;
  border-radius: 14px;
}

.ai-banner p {
  font-size: 13px;
  line-height: 1.45;
}

.kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 9px;
}

.kpi {
  min-height: 104px;
  padding: 12px 13px;
  border-radius: 11px;
}

.kpi span {
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .045em;
}

.kpi strong {
  margin: 7px 0 5px;
  font-size: clamp(25px, 1.9vw, 30px);
  font-weight: 760;
}

.kpi small {
  font-size: 11px;
  font-weight: 620;
}

.board {
  padding: 15px;
  border-radius: 12px;
}

.wallboard {
  grid-template-columns: minmax(320px, 1.15fr) minmax(300px, .9fr) minmax(300px, .85fr);
  gap: 14px;
}

.call-row {
  grid-template-columns: minmax(220px, 1.3fr) minmax(110px, .6fr) minmax(110px, .6fr) minmax(70px, .4fr) auto;
}

.board-head {
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 11px;
}

.board-head span {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 560;
}

.compact-item,
.call-row,
.team-card,
.module-card {
  border-radius: 10px;
}

.compact-item {
  padding: 11px;
}

.compact-item p,
.call-row p,
.module-card p {
  font-size: 12px;
  line-height: 1.42;
  font-weight: 500;
}

.module-card {
  min-height: 168px;
  padding: 13px;
}

.pill,
.chip,
.status {
  min-height: 22px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 680;
  letter-spacing: .025em;
}

.login-card h1 {
  font-size: 30px;
  font-weight: 760;
}

.login-card p {
  font-weight: 500;
}

.login-card label {
  font-weight: 680;
}

.login-card input,
.login-card select {
  font-weight: 600;
}

@media (min-width: 2100px) {
  h1 { font-size: 30px; }
  h2 { font-size: 17px; }
  .kpi strong { font-size: 34px; }
  .kpi { min-height: 118px; }
}

@media (max-width: 1480px) {
  .commandbar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .commandbar .actions {
    justify-content: flex-start;
  }

  .kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  }

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

@media (max-width: 1180px) {
  .wallboard {
    grid-template-columns: 1fr;
  }
}

[data-page][hidden] {
  display: none !important;
}

.nav-group {
  display: block;
  padding: 18px 24px 7px;
  color: rgba(255, 255, 255, .45);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.rail nav a {
  min-height: 38px;
  padding-top: 9px;
  padding-bottom: 9px;
}

body[data-active-page="dashboard"] .shell {
  gap: 14px;
}

body[data-active-page="dashboard"] .commandbar {
  margin-bottom: 0;
}

.dashboard-report-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr) minmax(300px, .85fr);
  gap: 16px;
}

.report-visual {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.86)),
    radial-gradient(circle at 20% 10%, rgba(123,127,255,.12), transparent 32%);
}

.report-visual-primary {
  min-height: 360px;
}

.report-dashboard-visual {
  display: grid;
  gap: 16px;
}

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

.report-metric {
  display: grid;
  gap: 6px;
  min-height: 110px;
  padding: 15px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.report-metric span,
.report-metric small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-metric strong {
  font-size: 31px;
  line-height: 1;
  color: var(--navy);
}

.report-purple { border-top: 4px solid var(--purple); }
.report-pink { border-top: 4px solid var(--pink); }
.report-green { border-top: 4px solid var(--ok); }
.report-amber { border-top: 4px solid var(--warn); }

.report-bars {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  min-height: 190px;
  padding: 18px 12px 8px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8faff, #fff);
  border: 1px solid var(--line);
}

.report-bar-stack {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  align-items: end;
  height: 170px;
}

.report-bar-stack > span {
  display: block;
  width: 100%;
  min-height: 8px;
}

.report-bar-stack .inbound {
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, var(--purple), #565cff);
}

.report-bar-stack .outbound {
  background: linear-gradient(180deg, var(--pink), #fb7185);
}

.report-bar-stack .missed {
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, var(--yellow), var(--warn));
}

.report-bar-stack small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.donut-report {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 255px;
}

.donut {
  width: 170px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background:
    radial-gradient(circle at center, #fff 0 49%, transparent 50%),
    conic-gradient(var(--purple) 0 calc(var(--inbound) * 1%), var(--pink) 0 calc((var(--inbound) + var(--outbound)) * 1%), var(--yellow) 0);
  box-shadow: inset 0 0 0 1px var(--line);
}

.donut strong {
  font-size: 32px;
  line-height: 1;
  color: var(--navy);
}

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

.legend-list,
.stack-report {
  display: grid;
  gap: 12px;
}

.legend-list span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.legend-list i {
  width: 11px;
  height: 11px;
  border-radius: 4px;
}

.legend-list .inbound,
.stack-track .inbound { background: var(--purple); }
.legend-list .outbound,
.stack-track .outbound { background: var(--pink); }
.legend-list .missed,
.stack-track .missed { background: var(--yellow); }
.stack-track .ready { background: var(--ok); }

.stack-report article {
  display: grid;
  gap: 8px;
}

.stack-report article > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.stack-track {
  height: 13px;
  border-radius: 999px;
  background: #eef2ff;
  overflow: hidden;
}

.stack-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

body[data-active-page="dashboard"] .wallboard {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(330px, .9fr);
}

body[data-active-page="dashboard"] .wallboard .board {
  min-height: 290px;
}

body[data-active-page="dashboard"] {
  background:
    linear-gradient(180deg, #f6f8ff 0%, #ffffff 42%, #f8fbff 100%);
}

.dashboard-cockpit {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, .9fr);
  gap: 16px;
}

.command-hero {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: stretch;
  padding: 24px;
  border: 0;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(0,15,73,.98), rgba(42,35,112,.96) 48%, rgba(123,127,255,.88)),
    #000f49;
  color: #fff;
  box-shadow: 0 28px 80px rgba(0,15,73,.22);
}

.command-hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 48px solid rgba(255,255,255,.08);
}

.hero-copy,
.hero-orbit {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: grid;
  align-content: center;
  gap: 14px;
}

.eyebrow {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.84);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.command-hero h2 {
  max-width: 780px;
  margin: 0;
  color: #fff;
  font-size: 42px;
  line-height: 1.02;
}

.command-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 6px;
}

.hero-actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,.18);
}

.hero-orbit {
  display: grid;
  align-content: center;
  gap: 12px;
}

.orb-main {
  width: 86px;
  height: 86px;
  border-radius: 28px;
  background: linear-gradient(135deg, #fe60a8, #feca60);
  color: #fff;
  box-shadow: 0 20px 48px rgba(254,96,168,.28);
  font-size: 22px;
}

.orbit-stat {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
}

.orbit-stat strong {
  color: #fff;
  font-size: 32px;
  line-height: 1;
}

.orbit-stat span {
  color: rgba(255,255,255,.72);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-highlights {
  display: grid;
  gap: 12px;
}

.highlight-card {
  position: relative;
  overflow: hidden;
  min-height: 82px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line-strong);
  box-shadow: 0 16px 42px rgba(0,15,73,.08);
}

.highlight-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--purple);
}

.highlight-pink::before { background: var(--pink); }
.highlight-green::before { background: var(--ok); }
.highlight-amber::before { background: var(--warn); }

.highlight-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.highlight-card strong {
  display: block;
  margin-top: 8px;
  color: var(--navy);
  font-size: 28px;
  line-height: 1;
}

.highlight-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

body[data-active-page="dashboard"] .kpi-grid {
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 12px;
}

body[data-active-page="dashboard"] .kpi {
  position: relative;
  overflow: hidden;
  min-height: 126px;
  border: 0;
  border-radius: 22px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,255,.94));
  box-shadow: 0 16px 44px rgba(0,15,73,.075);
}

body[data-active-page="dashboard"] .kpi::after {
  content: "";
  position: absolute;
  inset: auto 14px 12px 14px;
  height: 4px;
  border-radius: 999px;
  background: #dbe3f5;
}

body[data-active-page="dashboard"] .kpi-good::after { background: linear-gradient(90deg, #22c55e, #14b8a6); }
body[data-active-page="dashboard"] .kpi-warn::after { background: linear-gradient(90deg, #feca60, #f59e0b); }
body[data-active-page="dashboard"] .kpi-danger::after { background: linear-gradient(90deg, #ef4444, #fe60a8); }

body[data-active-page="dashboard"] .kpi span {
  color: #667085;
  font-size: 11px;
}

body[data-active-page="dashboard"] .kpi strong {
  font-size: 38px;
}

body[data-active-page="dashboard"] .board {
  border: 0;
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(0,15,73,.08);
}

body[data-active-page="dashboard"] .chart-board {
  background: linear-gradient(180deg, #fff, #f8fbff);
}

body[data-active-page="dashboard"] .bar-chart,
body[data-active-page="dashboard"] .line-chart {
  height: 292px;
}

body[data-active-page="dashboard"] .bar {
  border-radius: 999px 999px 0 0;
}

body[data-active-page="dashboard"] .team-grid {
  display: grid;
  gap: 10px;
}

body[data-active-page="dashboard"] .team-card {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.team-load {
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #edf2ff;
}

.team-load span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--pink));
}

@media (max-width: 1200px) {
  .dashboard-cockpit,
  .command-hero,
  .survey-product-grid {
    grid-template-columns: 1fr;
  }

  body[data-active-page="dashboard"] .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-hero h2 {
    font-size: 34px;
  }
}

@media (max-width: 860px) {
  .typeform-card {
    padding: 18px;
  }

  .typeform-card > img,
  .typeform-card > video {
    height: 190px;
  }

  .nps-scale {
    grid-template-columns: repeat(6, minmax(40px, 1fr));
  }
}

@media (max-width: 1500px) {
  .dashboard-report-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 700px) {
  .report-metric-row,
  .donut-report,
  .survey-builder-form,
  .typeform-stage,
  .typeform-footer {
    grid-template-columns: 1fr;
  }

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

  .typeform-stage {
    min-height: auto;
  }

  .typeform-question h3 {
    font-size: 32px;
  }

  .typeform-nps {
    grid-template-columns: repeat(6, minmax(38px, 1fr));
  }
}

/* Shared Outreachhub.ai brand asset across product surfaces. */
.logo {
  display: flex;
  align-items: center;
  width: auto;
  min-height: 54px;
  margin: 0 16px 18px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .18);
}

.logo::before,
.logo::after {
  content: none;
}

.logo img {
  display: block;
  width: 178px;
  max-width: 100%;
  height: auto;
}

.auth-logo {
  display: block;
  width: 188px;
  max-width: 100%;
  height: auto;
  margin-bottom: 14px;
}
