:root {
  --black: #090b0f;
  --ink: #14171d;
  --muted: #606a78;
  --orange: #ff7a1a;
  --orange-dark: #b94700;
  --orange-soft: #fff2e6;
  --white: #ffffff;
  --bg: #eef1f5;
  --surface: #f8fafc;
  --line: #d8dee7;
  --line-strong: #aeb8c5;
  --green: #127247;
  --green-soft: #e5f4ec;
  --amber: #9b5a00;
  --amber-soft: #fff2d5;
  --red: #a93226;
  --red-soft: #ffe6e2;
  --blue: #145f98;
  --blue-soft: #e5f2fb;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 18px 40px rgba(15, 23, 42, 0.07);
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Aptos", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  font-size: 14px;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: block;
}

.navrail {
  background: var(--black);
  color: var(--white);
  min-height: 64px;
  padding: 10px 30px;
  display: flex;
  flex-direction: row;
  gap: 18px;
  border-right: 0;
  border-bottom: 1px solid #1f1f1f;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 8;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  min-width: 138px;
}

.brand-lockup span {
  display: inline;
  color: var(--white);
  font-size: 15px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.rail-menu {
  display: flex;
  gap: 8px;
  justify-items: center;
  width: auto;
  align-items: center;
}

.rail-menu button {
  width: auto;
  height: 42px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #bdb7b1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 850;
  position: relative;
}

.rail-menu button.active,
.rail-menu button:hover {
  background: var(--orange);
  color: var(--black);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16) inset;
}

.rail-menu button span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  margin-left: 7px;
}

.rail-menu button svg {
  width: 18px;
  height: 18px;
}

.workspace {
  min-width: 0;
}

.page,
.panel,
.work-surface,
.table-wrap {
  min-width: 0;
}

.topbar {
  height: 70px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 34px;
  position: relative;
  top: auto;
  z-index: 4;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--orange);
}

.topbar h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1;
  letter-spacing: 0;
  font-weight: 950;
}

.product-line {
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.topbar-actions,
.hero-actions,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page {
  padding: 18px 34px 54px;
  display: grid;
  gap: 12px;
}

.toast {
  margin: 16px 32px 0;
  width: fit-content;
  max-width: calc(100% - 64px);
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--black);
  color: var(--white);
  border-left: 5px solid var(--orange);
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 800;
}

.btn,
.mini-btn {
  border: 1px solid var(--black);
  background: var(--white);
  color: var(--black);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 900;
  padding: 8px 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.btn.primary,
.mini-btn {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--black);
}

.mini-btn.ghost {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
}

.mini-btn.danger {
  background: var(--red-soft);
  border-color: var(--red-soft);
  color: var(--red);
}

.btn.danger {
  background: var(--red-soft);
  border-color: #efc0bd;
  color: var(--red);
}

.btn:hover,
.mini-btn:hover {
  transform: translateY(-1px);
}

.btn:disabled,
.mini-btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

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

.metric {
  background: var(--white);
  color: var(--ink);
  border-radius: 7px;
  padding: 15px 16px;
  min-height: 86px;
  display: grid;
  align-content: space-between;
  border-top: 3px solid var(--orange);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.metric strong {
  font-size: 25px;
  line-height: 1;
}

.setup-hero {
  background: var(--black);
  color: var(--white);
  border-radius: 8px;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: stretch;
  border-bottom: 4px solid var(--orange);
}

.setup-hero h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0;
}

.setup-hero p {
  margin: 12px 0 0;
  max-width: 720px;
  color: #d8d1ca;
  font-size: 15px;
  line-height: 1.45;
}

.setup-hero-side {
  background: #111;
  border: 1px solid #2b2b2b;
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 8px;
  align-content: space-between;
}

.setup-hero-side span,
.setup-dossier-grid span,
.tech-strip span {
  color: var(--orange);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.setup-hero-side strong {
  font-size: 20px;
  line-height: 1.15;
}

.setup-hero-side em,
.setup-dossier-grid em,
.tech-strip em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.setup-hero-side em {
  color: #c8c0b8;
}

.setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.setup-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--black);
  padding: 1px;
  border-radius: 8px;
  overflow: hidden;
}

.setup-step {
  min-height: 154px;
  border: 0;
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  padding: 14px;
  display: grid;
  gap: 8px;
  align-content: start;
  text-align: left;
}

.setup-step:hover {
  background: var(--orange-soft);
}

.setup-step.done {
  box-shadow: inset 0 4px 0 var(--green);
}

.setup-step.current {
  background: var(--orange);
  color: var(--black);
}

.setup-step span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
}

.setup-step.current span,
.setup-step.current em {
  color: #3b2413;
}

.setup-step strong {
  font-size: 17px;
  line-height: 1.1;
}

.setup-step em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.setup-step b {
  width: fit-content;
  margin-top: auto;
  border-radius: 5px;
  padding: 5px 7px;
  background: var(--black);
  color: var(--white);
  font-size: 11px;
  font-weight: 950;
}

.setup-step.done b {
  background: var(--green-soft);
  color: var(--green);
}

.setup-step.current b {
  background: var(--black);
  color: var(--white);
}

.setup-dossier {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 6px solid var(--orange);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 16px;
}

.setup-dossier-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.setup-dossier-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.setup-dossier-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.setup-dossier-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.setup-dossier-grid div {
  background: #fbfaf8;
  padding: 13px;
  display: grid;
  gap: 5px;
}

.setup-dossier-grid strong {
  font-size: 22px;
  line-height: 1;
}

.tech-strip {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow);
}

.tech-strip.ko {
  border-left-color: var(--red);
}

.tech-strip div {
  display: grid;
  gap: 4px;
}

.tech-strip strong {
  font-size: 18px;
}

.campaign-context {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 8px solid var(--orange);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.campaign-context div {
  display: grid;
  gap: 3px;
}

.campaign-context span {
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.campaign-context strong {
  font-size: 18px;
}

.campaign-context small {
  color: var(--muted);
  font-size: 13px;
}

.campaign-context select {
  max-width: 360px;
}

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

.queue-board {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.board-title {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--orange);
  border-radius: var(--radius);
  padding: 16px;
}

.board-title h2 {
  margin: 0;
  font-size: 20px;
}

.board-title p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

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

.queue-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 14px;
  text-align: left;
  display: grid;
  gap: 7px;
}

.queue-card.hot {
  border-color: var(--orange);
  box-shadow: inset 0 0 0 1px var(--orange);
}

.queue-card strong {
  font-size: 26px;
  line-height: 1;
}

.queue-card span {
  font-size: 13px;
  font-weight: 950;
}

.queue-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  border-radius: var(--radius);
  background: var(--black);
  overflow: hidden;
}

.pipeline-board button {
  border: 0;
  border-radius: 0;
  background: #141414;
  color: var(--white);
  padding: 12px;
  display: grid;
  gap: 5px;
  text-align: left;
}

.pipeline-board button:hover {
  background: var(--orange);
  color: var(--black);
}

.pipeline-board span,
.pipeline-board em {
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  opacity: 0.78;
}

.pipeline-board strong {
  font-size: 24px;
  line-height: 1;
}

.mission-board {
  background: var(--white);
  color: var(--ink);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.qa-panel {
  border-left: 5px solid var(--orange);
}

.qa-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.qa-grid div {
  background: #fbfaf8;
  padding: 12px;
  display: grid;
  gap: 5px;
}

.qa-grid span,
.qa-issues span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.qa-grid strong {
  font-size: 24px;
  line-height: 1;
}

.qa-issues {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qa-issues span {
  border: 1px solid var(--red-soft);
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  padding: 7px 9px;
}

.qa-issues.ok span {
  border-color: var(--green-soft);
  background: var(--green-soft);
  color: var(--green);
}

.mission-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
}

.mission-head h2,
.portal-header h2 {
  margin: 0;
  font-size: 22px;
}

.mission-head p,
.portal-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.mission-lane {
  display: grid;
  gap: 8px;
  align-content: start;
}

.mission-lane > span,
.portal-tabs > div > span {
  color: var(--orange);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.mission-lane button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfaf8;
  color: var(--ink);
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 4px;
}

.mission-lane button:hover {
  background: var(--orange);
  color: var(--black);
}

.mission-lane strong {
  font-size: 13px;
}

.mission-lane em {
  font-size: 12px;
  font-style: normal;
  opacity: 0.78;
}

.empty.compact {
  padding: 16px;
  color: var(--muted);
  border-color: var(--line);
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.row-actions .mini-btn {
  padding: 7px 9px;
  font-size: 12px;
}

.ops-card {
  min-height: 116px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 14px;
  display: grid;
  align-content: space-between;
  gap: 12px;
}

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

.source-grid {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.readiness-item,
.source-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf8;
  padding: 13px;
  display: grid;
  gap: 5px;
}

.source-card {
  background: transparent;
  border-color: transparent;
  padding: 10px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.readiness-item.ok {
  border-color: #b8dec8;
  background: var(--green-soft);
}

.readiness-item.ko {
  border-color: #efc0bd;
  background: var(--red-soft);
}

.readiness-item strong,
.source-card strong {
  font-size: 13px;
}

.readiness-item span,
.source-card span,
.source-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.source-card.active {
  border-color: var(--orange);
  background: var(--orange-soft);
  box-shadow: inset 0 0 0 1px var(--orange);
}

.source-card.selected {
  border-color: var(--black);
  box-shadow: inset 0 0 0 2px var(--black);
}

.ops-card span {
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 950;
}

.ops-card strong {
  font-size: 17px;
  line-height: 1.15;
}

.ops-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  line-height: 1.35;
}

.ops-card:hover {
  border-color: var(--orange);
  box-shadow: inset 0 0 0 1px var(--orange);
}

.panel,
.page-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 16px;
}

.panel h2,
.page-card h2,
.modal h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 950;
}

.panel p,
.page-card p,
.modal-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.hero-card {
  padding: 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  border-left: 5px solid var(--orange);
}

.eyebrow {
  display: block;
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.client-pill {
  border: 1px solid var(--black);
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--orange-soft);
  color: var(--black);
  font-size: 12px;
  font-weight: 900;
}

.campaign-studio {
  background: var(--white);
  color: var(--ink);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(300px, 1.15fr) minmax(320px, 0.85fr);
  gap: 14px;
  align-items: start;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.campaign-studio::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--orange);
}

.studio-copy,
.studio-select,
.studio-next {
  position: relative;
}

.studio-select {
  display: grid;
  gap: 10px;
}

.studio-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.studio-copy span,
.studio-select span,
.studio-next span,
.dossier-label,
.dossier-rule span,
.section-count {
  color: var(--orange);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.studio-copy h2 {
  margin: 6px 0 5px;
  font-size: clamp(28px, 2.7vw, 40px);
  line-height: 0.98;
  letter-spacing: 0;
}

.studio-copy p,
.studio-next strong {
  margin: 0;
  color: var(--muted);
}

.studio-select small,
.agent-summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.studio-select label {
  display: grid;
  gap: 7px;
}

.studio-select select {
  background-color: var(--white);
  color: var(--ink);
  border-color: var(--line);
  min-height: 40px;
  font-weight: 750;
}

.agent-summary {
  display: grid;
  gap: 5px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.studio-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.studio-tags span {
  color: var(--ink);
  background: #fbfaf8;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 900;
  text-transform: none;
  letter-spacing: 0;
}

.studio-contract {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.studio-contract div {
  background: #fbfaf8;
  padding: 10px 11px;
  min-height: 74px;
}

.studio-contract span {
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.studio-contract strong {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.35;
}

.assignment-panel {
  border: 1px solid var(--line);
  background: #fbfaf8;
  border-radius: 7px;
  padding: 12px;
}

.assignment-head {
  display: grid;
  gap: 3px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.assignment-head strong {
  font-size: 15px;
  line-height: 1.2;
}

.assignment-head small {
  font-size: 11px;
}

.studio-kpis {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.studio-kpis div {
  background: #fbfaf8;
  padding: 12px;
  display: grid;
  gap: 5px;
  min-height: 82px;
}

.studio-kpis span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.studio-kpis strong {
  font-size: 22px;
  line-height: 1;
}

.studio-kpis em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.25;
}

.studio-next {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 11px;
}

.work-surface {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.section-head {
  min-height: 72px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.section-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 950;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.section-count {
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fbfaf8;
}

.campaign-dossier {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.dossier-main,
.dossier-side {
  background: var(--white);
  padding: 18px;
}

.dossier-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.dossier-main h2 {
  margin: 4px 0 6px;
  font-size: 24px;
  line-height: 1.05;
}

.dossier-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.dossier-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dossier-rule {
  grid-column: 1 / -1;
  background: #fbfaf8;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  display: grid;
  gap: 5px;
}

.dossier-rule strong {
  font-size: 13px;
  line-height: 1.4;
}

.compact-chips {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.compact-chips span {
  background: #fbfaf8;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 850;
}

.readiness-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.readiness-strip div {
  background: var(--white);
  padding: 12px;
  min-height: 76px;
  display: grid;
  gap: 4px;
}

.readiness-strip span {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 950;
}

.readiness-strip .ok span {
  color: var(--green);
  background: var(--green-soft);
}

.readiness-strip .ko span {
  color: var(--red);
  background: var(--red-soft);
}

.readiness-strip strong {
  font-size: 13px;
}

.readiness-strip em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.progress-cell {
  width: 96px;
  height: 7px;
  background: #ece7e2;
  border-radius: 999px;
  overflow: hidden;
}

.progress-cell span {
  display: block;
  height: 100%;
  background: var(--orange);
}

.table-wrap {
  overflow: auto;
  border: 0;
  border-radius: 0;
  max-width: 100%;
}

.table-tools {
  min-width: 1080px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  padding: 0 0 10px;
}

.table-tools label {
  flex: 1;
  max-width: 420px;
}

.table-tools label span {
  margin-bottom: 5px;
}

.table-tools input {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 12px;
  background: #fbfaf8;
}

.table-tools .table-select {
  flex: 0 0 165px;
}

.table-tools select {
  width: 100%;
  min-height: 40px;
  padding: 8px 32px 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: #222;
  font-size: 12px;
  font-weight: 650;
}

.table-tools em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  margin-left: auto;
  white-space: nowrap;
}

table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-size: 13px;
}

tr[hidden] {
  display: none !important;
}

th,
td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f7f4f0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tbody tr {
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease;
}

tbody tr:hover td {
  background: #fffdfb;
}

.table-pagination {
  min-width: 1080px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0 2px;
  margin-top: 2px;
  border-top: 1px solid var(--line);
}

.compact-table .table-pagination {
  min-width: 620px;
}

.table-pagination span,
.table-pagination strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.table-pagination div {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.table-pagination .mini-btn {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 11px;
}

tr:last-child td {
  border-bottom: 0;
}

tr.selected-row td {
  background: #fff8f2;
}

tr.selected-row td:first-child {
  box-shadow: inset 4px 0 0 var(--orange);
}

td strong {
  display: block;
  font-size: 13.5px;
  line-height: 1.2;
}

td small,
.api-card small,
.info-block small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
  line-height: 1.3;
}

.campaign-name-cell strong {
  max-width: 220px;
}

.mono-line {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.table-pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 210px;
}

.table-pipeline span {
  border: 1px solid var(--line);
  background: #fbfaf8;
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.table-action {
  min-width: 72px;
  justify-content: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
}

.badge.green {
  color: var(--green);
  background: var(--green-soft);
}

.badge.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.badge.red {
  color: var(--red);
  background: var(--red-soft);
}

.badge.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.chips,
.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.checks em {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px 10px;
  background: #fbfaf8;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chip small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.chip.required {
  border-color: #b8dec8;
  background: var(--green-soft);
}

.chip.optional {
  border-style: dashed;
}

.checks em.ok {
  border-color: #b8dec8;
  background: var(--green-soft);
  color: var(--green);
}

.checks em.ko {
  border-color: #efc0bd;
  background: var(--red-soft);
  color: var(--red);
}

.checks.compact {
  gap: 5px;
}

.checks.compact em {
  padding: 5px 7px;
  font-size: 11px;
}

.empty {
  padding: 42px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.client-switcher {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: var(--radius);
  background: #fbfaf8;
  border: 1px solid var(--line);
}

.filter-bar button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.filter-bar button.active,
.filter-bar button:hover {
  background: var(--orange);
  color: var(--black);
}

.client-switcher button {
  min-width: 240px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 6px;
  padding: 13px;
  text-align: left;
}

.client-switcher button.active {
  border-color: var(--orange);
  box-shadow: inset 0 0 0 1px var(--orange);
}

.log-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.log-filters label {
  min-width: 0;
}

.log-filters label.wide {
  grid-column: 1 / -1;
}

.log-filters input,
.log-filters select {
  min-height: 40px;
  background: #fbfaf8;
  font-size: 13px;
}

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

.api-card {
  display: grid;
  gap: 10px;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius);
  padding: 18px;
}

.portal-shell {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: grid;
  gap: 18px;
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.portal-tabs {
  display: grid;
  gap: 18px;
}

.portal-tabs > div {
  display: grid;
  gap: 10px;
}

.period-nav {
  background: var(--black);
  color: var(--white);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: auto minmax(220px, 320px) auto;
  gap: 10px;
  align-items: end;
}

.period-nav label {
  display: grid;
  gap: 6px;
}

.period-nav label span {
  color: var(--orange);
  margin: 0;
}

.period-nav select {
  background-color: #161616;
  border-color: #2d2d2d;
  color: var(--white);
}

.period-nav .mini-btn.ghost {
  background: #161616;
  border-color: #2d2d2d;
  color: var(--white);
}

.period-nav .mini-btn.ghost:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--black);
}

.billing-command,
.account-page-head {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 6px solid var(--orange);
  border-radius: 8px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow);
}

.billing-command h2,
.account-page-head h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1;
}

.billing-command p,
.account-page-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.account-page-head {
  border-left-color: var(--black);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.billing-charts {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(260px, 0.9fr) minmax(320px, 1.2fr);
  gap: 10px;
}

.chart-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 14px;
  min-height: 230px;
  box-shadow: var(--shadow);
}

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

.chart-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.chart-head strong {
  font-size: 22px;
  line-height: 1;
}

.donut-row {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.donut {
  width: 136px;
  height: 136px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
}

.donut::after {
  content: "";
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--white);
  position: absolute;
}

.donut span {
  position: relative;
  z-index: 1;
  font-weight: 950;
  font-size: 15px;
}

.chart-legend {
  display: grid;
  gap: 8px;
}

.chart-legend div {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.chart-legend strong {
  font-size: 12px;
}

.bar-chart {
  height: 166px;
  display: grid;
  grid-template-columns: repeat(6, minmax(32px, 1fr));
  gap: 10px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding: 8px 4px 0;
}

.bar-chart div {
  height: 100%;
  display: grid;
  align-items: end;
  gap: 7px;
}

.bar-chart span {
  display: block;
  min-height: 4px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, var(--orange), var(--orange-dark));
}

.bar-chart em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  text-align: center;
}

.ledger-card {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.ledger-card .chart-head span {
  color: var(--orange);
}

.ledger-lines {
  display: grid;
  gap: 1px;
  background: #2d2d2d;
  border: 1px solid #2d2d2d;
  border-radius: 6px;
  overflow: hidden;
}

.ledger-lines div {
  background: #151515;
  padding: 11px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.ledger-lines span {
  color: #bdb7b1;
  font-size: 12px;
  font-weight: 850;
}

.ledger-lines strong {
  font-size: 13px;
}

.api-card span {
  color: var(--orange);
  font-weight: 950;
}

.api-card code {
  background: #151515;
  color: var(--white);
  border: 1px solid #2d2d2d;
  padding: 8px 10px;
  overflow-wrap: anywhere;
}

.agent-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-specs span {
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 850;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 7, 7, 0.62);
  display: grid;
  place-items: center;
  padding: 28px;
  z-index: 20;
}

.modal {
  width: min(1040px, 100%);
  max-height: min(840px, calc(100vh - 48px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 10px;
  border: 1px solid #1a1a1a;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.42);
  padding: 0;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
  z-index: 2;
}

.modal-scroll {
  min-height: 0;
  overflow: auto;
}

.modal-scroll > h2,
.modal-scroll > .modal-subtitle {
  padding-left: 28px;
  padding-right: 100px;
}

.modal-scroll > h2 {
  margin: 0;
  padding-top: 26px;
  font-size: 30px;
  line-height: 1.05;
}

.modal-scroll > .modal-subtitle {
  margin: 8px 0 0;
  padding-bottom: 22px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.modal-grid,
.form-grid {
  margin: 0;
  padding: 22px 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.modal label,
.form-grid label,
.modal-grid label {
  display: grid;
  gap: 7px;
}

.modal label > span,
.form-grid label > span,
.modal-grid label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.modal input,
.modal select,
.modal textarea {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--white);
  color: var(--ink);
  padding: 0 12px;
  font-size: 14px;
}

.modal textarea {
  min-height: 96px;
  padding-top: 10px;
  line-height: 1.45;
}

.wide-field {
  display: block;
  margin-top: 14px;
}

.modal-grid .wide-field,
.form-grid .wide-field {
  grid-column: 1 / -1;
  margin-top: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 28px 24px;
  border-top: 1px solid var(--line);
  background: #fbfaf8;
  flex: 0 0 auto;
}

.intake-builder {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfaf8;
  margin: 0 28px 22px;
  padding: 14px;
}

.intake-builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.intake-builder-head span {
  display: block;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.intake-builder-head strong {
  display: block;
  margin-top: 3px;
}

.intake-rows {
  display: grid;
  gap: 8px;
}

.intake-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.3fr) minmax(120px, 1fr) minmax(110px, 0.8fr) minmax(130px, 0.9fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
}

.day-toggle-group {
  display: grid;
  grid-template-columns: repeat(7, minmax(44px, 1fr));
  gap: 6px;
}

.day-toggle {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.day-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.day-toggle span {
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid #cfd3d8;
  border-radius: 5px;
  background: #fff;
  color: #555a60;
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.day-toggle:hover span {
  border-color: #8f969e;
  background: #f5f6f7;
}

.day-toggle input:checked + span {
  border-color: var(--orange);
  background: var(--orange);
  color: #111;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

.day-toggle input:focus-visible + span {
  outline: 3px solid rgba(255, 105, 0, .25);
  outline-offset: 2px;
}

.call-schedule-editor {
  margin: 0 28px 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8f8f7;
}

.call-schedule-editor .section-heading h3 {
  margin: 0;
  font-size: 17px;
}

.call-schedule-editor .section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.schedule-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(360px, 1.3fr);
  gap: 16px;
  align-items: end;
  margin-top: 16px;
}

.schedule-days > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.call-window-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 10px;
}

.call-window-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) 44px;
  gap: 8px;
  align-items: end;
}

.call-window-row .icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--white);
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}

@media (max-width: 760px) {
  .call-schedule-editor {
    margin-inline: 16px;
    padding: 14px;
  }

  .schedule-toolbar {
    grid-template-columns: 1fr;
  }

  .schedule-days .day-toggle-group {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.info-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  background: #fbfaf8;
}

.info-block.wide {
  grid-column: 1 / -1;
}

.modal-section {
  padding: 0 28px 22px;
}

.info-block span,
label span {
  display: block;
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.info-block p {
  margin: 0;
  color: var(--ink);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  background: var(--white);
  color: var(--ink);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 13px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

textarea {
  min-height: 260px;
  margin-top: 16px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.wide-field textarea {
  min-height: 94px;
  margin-top: 6px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.35;
}

.import-setup {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, .8fr);
  gap: 12px;
  align-items: end;
}

.file-picker {
  min-height: 96px;
  border: 1px dashed #aeb4bd;
  border-radius: var(--radius);
  padding: 14px;
  background: #fbfaf8;
}

.file-picker input {
  margin: 6px 0;
  padding: 7px;
}

.file-picker small,
.import-preview > small {
  color: var(--muted);
}

.csv-raw {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.csv-raw summary {
  cursor: pointer;
  font-weight: 850;
}

.csv-raw textarea {
  min-height: 150px;
}

.import-preview {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.import-preview > p {
  margin: 0;
  color: var(--muted);
}

.import-error {
  color: var(--red) !important;
  font-weight: 800;
}

.import-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.import-summary div {
  padding: 12px;
  border-right: 1px solid var(--line);
}

.import-summary div:last-child {
  border-right: 0;
}

.import-summary strong,
.import-summary span {
  display: block;
}

.import-summary strong {
  font-size: 20px;
}

.import-summary span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.import-table {
  margin-top: 12px;
  max-height: 280px;
}

@media (max-width: 720px) {
  .import-setup,
  .import-summary {
    grid-template-columns: 1fr;
  }

  .import-summary div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .import-summary div:last-child {
    border-bottom: 0;
  }
}

.audio {
  width: 100%;
  height: 40px;
}

.code,
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

code {
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--orange-soft);
}

.code {
  background: var(--black);
  color: var(--white);
  padding: 14px;
  border-radius: var(--radius);
  overflow: auto;
  font-size: 12px;
  line-height: 1.55;
}

.loading {
  padding: 40px;
}

.account-ops-grid,
.support-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.support-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.static-card {
  cursor: default;
}

.static-card:hover {
  transform: none;
}

.compact-table table {
  min-width: 620px;
}

.aircall-console {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: 10px;
  align-items: stretch;
}

.aircall-agent,
.aircall-status-grid {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.aircall-agent {
  border-left: 6px solid var(--orange);
  display: grid;
  gap: 8px;
}

.aircall-agent > span {
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.aircall-agent h2 {
  margin: 0;
  font-size: 24px;
}

.aircall-agent p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.aircall-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  overflow: hidden;
  background: var(--line);
}

.aircall-status-grid div {
  background: var(--white);
  padding: 16px;
  display: grid;
  gap: 5px;
}

.aircall-status-grid strong {
  font-size: 28px;
  line-height: 1;
}

.aircall-status-grid span {
  font-size: 12px;
  font-weight: 950;
}

.aircall-status-grid em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.settings-hero,
.settings-card,
.settings-summary {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.settings-hero {
  border-top: 5px solid var(--orange);
  padding: 20px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.settings-hero span {
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings-hero h2,
.settings-card h2 {
  margin: 4px 0 6px;
  font-size: 24px;
  line-height: 1.05;
}

.settings-hero p,
.settings-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.settings-health {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfaf8;
  padding: 14px;
  min-width: 170px;
  display: grid;
  gap: 5px;
}

.settings-health strong {
  font-size: 24px;
  line-height: 1;
}

.settings-health span {
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

.settings-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.settings-summary div {
  background: var(--white);
  padding: 12px 14px;
  display: grid;
  gap: 5px;
}

.settings-summary span {
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.settings-summary strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.settings-summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow-wrap: anywhere;
}

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

.settings-card {
  padding: 16px;
}

details.settings-card {
  padding: 0;
  overflow: hidden;
}

details.settings-card summary {
  list-style: none;
}

details.settings-card summary::-webkit-details-marker {
  display: none;
}

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

details.settings-card > .settings-card-head {
  cursor: pointer;
  margin: 0;
  padding: 14px 52px 14px 16px;
  position: relative;
}

details.settings-card > .settings-card-head::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 17px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: var(--black);
  color: var(--orange);
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}

details.settings-card[open] > .settings-card-head::after {
  content: "-";
}

details.settings-card:not([open]) > .settings-card-head {
  border-bottom: 0;
}

.settings-card-head h2 {
  font-size: 18px;
}

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

.settings-grid label {
  display: grid;
  gap: 7px;
}

.settings-grid label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.settings-field {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  padding: 0 10px;
  font-size: 13px;
}

.settings-grid label {
  min-width: 0;
}

.settings-grid input,
.settings-grid select,
.settings-grid textarea {
  min-height: 39px;
  background: #fbfaf8;
  font-size: 13px;
}

.settings-grid textarea {
  resize: vertical;
  line-height: 1.35;
}

.settings-grid label.wide {
  grid-column: 1 / -1;
}

.danger-zone {
  border-color: #efc0bd;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* DA 0.9.9.6 - poste de pilotage pre-prod */
body {
  background:
    linear-gradient(180deg, #f6f8fb 0, var(--bg) 280px),
    var(--bg);
}

.navrail {
  min-height: 60px;
  padding: 8px 28px;
  background: #06080b;
  border-bottom: 3px solid #ff7a1a;
  box-shadow: 0 8px 28px rgba(6, 8, 11, 0.16);
  overflow-x: auto;
  scrollbar-width: none;
}

.navrail::-webkit-scrollbar,
.rail-menu::-webkit-scrollbar {
  display: none;
}

.brand-lockup {
  flex: 0 0 auto;
  min-width: 162px;
}

.brand-lockup span {
  font-size: 14px;
  letter-spacing: 0.14em;
}

.rail-menu {
  flex: 1 1 auto;
  min-width: 0;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.rail-menu button {
  height: 40px;
  min-height: 40px;
  border-radius: 6px;
  color: #a9b2bd;
  padding: 0 11px;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.rail-menu button:hover {
  background: #161b22;
  color: var(--white);
  transform: translateY(-1px);
}

.rail-menu button.active {
  background: var(--orange);
  color: var(--black);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22) inset;
}

.topbar {
  height: 76px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  padding: 0 36px;
  backdrop-filter: blur(10px);
}

.topbar::after {
  height: 0;
}

.topbar h1 {
  font-size: 29px;
}

.product-line,
.eyebrow,
.studio-copy span,
.studio-select span,
.studio-next span,
.dossier-label,
.dossier-rule span,
.section-count,
.mission-lane > span,
.portal-tabs > div > span,
.aircall-agent > span,
.settings-hero span,
.settings-summary span,
.info-block span,
label span {
  color: var(--blue);
}

.page {
  gap: 14px;
  padding-top: 20px;
}

.panel,
.page-card,
.work-surface,
.mission-board,
.campaign-studio,
.setup-dossier,
.portal-shell,
.chart-card,
.settings-hero,
.settings-card,
.settings-summary,
.billing-command,
.account-page-head,
.aircall-agent,
.aircall-status-grid {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.panel,
.page-card,
.work-surface,
.mission-board,
.campaign-studio,
.setup-dossier,
.portal-shell,
.chart-card,
.settings-hero,
.settings-card,
.billing-command,
.account-page-head {
  border-radius: 7px;
}

.setup-hero,
.period-nav,
.api-card,
.ledger-card {
  background: #0b0f14;
  border: 1px solid #1b2530;
  box-shadow: var(--shadow);
}

.setup-hero {
  border-bottom: 0;
}

.setup-hero-side {
  background: #111820;
  border-color: #263240;
}

.setup-flow,
.pipeline-board {
  background: #141a22;
  border: 1px solid #141a22;
}

.setup-step,
.pipeline-board button {
  background: #ffffff;
}

.pipeline-board button {
  color: var(--ink);
}

.setup-step.current,
.pipeline-board button:hover,
.mission-lane button:hover,
.filter-bar button.active,
.filter-bar button:hover {
  background: #111820;
  color: var(--white);
}

.setup-step.current span,
.setup-step.current em {
  color: #dce3eb;
}

.setup-step.done {
  box-shadow: inset 0 4px 0 var(--green);
}

.metric {
  border-top: 0;
  border-left: 4px solid var(--blue);
}

.metric:nth-child(2),
.queue-card.hot,
.source-card.active,
.client-switcher button.active {
  border-color: var(--orange);
}

.metric:nth-child(3) {
  border-left-color: var(--green);
}

.metric:nth-child(4) {
  border-left-color: var(--orange);
}

.btn,
.mini-btn {
  border-color: #101820;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.btn.primary,
.mini-btn {
  background: var(--orange);
  border-color: var(--orange);
  color: #070707;
}

.mini-btn.ghost,
.btn.ghost {
  background: #ffffff;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn:hover,
.mini-btn:hover {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

.campaign-context,
.board-title,
.qa-panel,
.hero-card,
.aircall-agent {
  border-left-color: var(--blue);
}

.setup-dossier,
.billing-command {
  border-left-color: var(--orange);
}

.campaign-studio::before,
.settings-hero {
  border-top-color: var(--blue);
}

.campaign-studio::before {
  background: linear-gradient(90deg, var(--blue), var(--orange));
}

.setup-dossier-grid,
.qa-grid,
.studio-contract,
.studio-kpis,
.readiness-strip,
.settings-summary,
.aircall-status-grid,
.ledger-lines {
  background: var(--line);
}

.setup-dossier-grid div,
.qa-grid div,
.mission-lane button,
.readiness-item,
.studio-tags span,
.studio-contract div,
.assignment-panel,
.studio-kpis div,
.dossier-rule,
.compact-chips span,
.table-pipeline span,
.chip,
.checks em,
.filter-bar,
.log-filters input,
.log-filters select,
.settings-health,
.settings-grid input,
.settings-grid select,
.settings-grid textarea,
.settings-field,
  .intake-builder,
  .info-block,
.table-tools input {
  background: var(--surface);
}

th {
  background: #edf1f6;
  color: #4d5968;
}

td {
  background: #ffffff;
}

tbody tr:hover td {
  background: #f7fbff;
}

tr.selected-row td {
  background: #fff7ef;
}

.progress-cell {
  background: #dfe5ec;
}

.progress-cell span,
.bar-chart span {
  background: linear-gradient(180deg, #ff8a2f, #d95700);
}

.badge {
  border: 1px solid transparent;
}

.badge.green {
  border-color: #b8dfca;
}

.badge.amber {
  border-color: #f2d397;
}

.badge.red {
  border-color: #f0b9b2;
}

.badge.blue {
  border-color: #bdd8ee;
}

.modal-backdrop {
  background: rgba(6, 8, 11, 0.68);
  backdrop-filter: blur(4px);
}

.modal {
  border-radius: 8px;
  border-color: #111820;
  box-shadow: 0 38px 120px rgba(6, 8, 11, 0.45);
}

.modal-scroll > h2 {
  padding-top: 24px;
  font-size: 27px;
}

.modal-scroll > .modal-subtitle,
.modal-actions {
  background: var(--surface);
}

.modal input,
.modal select,
.modal textarea,
input,
select,
textarea {
  border-color: var(--line-strong);
  background: #ffffff;
}

code {
  background: var(--blue-soft);
}

details.settings-card > .settings-card-head::after {
  background: #111820;
  color: var(--orange);
}

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

  .metric-strip,
  .ops-grid,
  .account-ops-grid,
  .readiness-grid,
  .source-grid,
  .queue-grid,
  .mission-lanes,
  .studio-kpis,
  .readiness-strip,
  .billing-charts,
  .support-grid,
  .aircall-console,
  .aircall-status-grid,
  .log-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .queue-board,
  .campaign-studio,
  .campaign-dossier,
  .setup-hero,
  .period-nav,
  .account-page-head {
    grid-template-columns: 1fr;
  }

  .settings-stack,
  .settings-summary,
  .settings-hero,
  .intake-row,
  .log-filters {
    grid-template-columns: 1fr;
  }

  .pipeline-board,
  .setup-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .modal-backdrop {
    padding: 12px;
  }

  .modal {
    width: 100%;
    max-height: calc(100dvh - 24px);
  }

  .modal-close {
    top: 12px;
    right: 12px;
    width: 40px;
    min-height: 40px;
    padding: 0;
    border-color: #111820;
    background: #111820;
    color: #fff;
    font-size: 24px;
    line-height: 1;
  }

  .modal-scroll > h2 {
    padding: 22px 66px 0 18px;
    font-size: 23px;
    line-height: 1.15;
  }

  .modal-scroll > .modal-subtitle {
    padding: 0 66px 18px 18px;
    font-size: 14px;
  }

  .modal-grid,
  .form-grid {
    padding: 18px;
  }

  .intake-builder {
    margin: 0 18px 18px;
  }

  .modal-actions {
    z-index: 1;
    flex-wrap: wrap;
    padding: 14px 18px;
  }

  .modal-actions .btn {
    flex: 1 1 180px;
    justify-content: center;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .navrail {
    position: sticky;
    top: 0;
    z-index: 5;
    flex-direction: row;
    overflow-x: auto;
    align-items: center;
    padding: 10px;
    gap: 10px;
    max-width: 100vw;
  }

  .brand-lockup {
    flex: 0 0 auto;
    min-width: auto;
    padding: 0 6px 0 2px;
  }

  .rail-menu {
    display: flex;
    width: auto;
    min-width: 0;
    overflow-x: auto;
    flex: 1 1 auto;
    scrollbar-width: none;
  }

  .rail-menu::-webkit-scrollbar {
    display: none;
  }

  .rail-menu button {
    min-width: 46px;
    flex: 0 0 auto;
  }

  .topbar {
    height: auto;
    padding: 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .page {
    padding: 18px;
    max-width: 100vw;
    overflow: hidden;
  }

  .metric-strip,
  .ops-grid,
  .readiness-grid,
  .source-grid,
  .queue-grid,
  .setup-dossier-grid,
  .mission-lanes,
    .studio-kpis,
    .readiness-strip,
    .qa-grid,
    .pipeline-board,
    .modal-grid,
    .billing-charts,
    .account-ops-grid,
    .support-grid,
    .aircall-console,
    .setup-flow,
    .aircall-status-grid,
    .settings-grid,
    .intake-row,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .campaign-context {
    align-items: stretch;
    flex-direction: column;
  }

  .campaign-context select {
    max-width: none;
  }

  .studio-contract,
  .studio-next {
    grid-template-columns: 1fr;
  }

  .studio-next .mini-btn {
    width: fit-content;
  }

  .hero-card,
  .panel-head,
  .section-head,
  .setup-dossier-head,
  .dossier-main,
  .mission-head,
  .portal-header,
  .billing-command {
    flex-direction: column;
    align-items: stretch;
  }

  .period-nav {
    grid-template-columns: 1fr;
  }

  .period-nav .mini-btn,
  .table-pagination .mini-btn,
  .billing-command .btn,
  .account-page-head .btn,
  .account-page-head .mini-btn {
    width: 100%;
    justify-content: center;
  }

  .billing-command,
  .setup-actions,
  .account-page-head,
  .chart-card,
  .panel,
  .setup-hero,
  .setup-dossier,
  .period-nav {
    width: 100%;
    max-width: calc(100vw - 36px);
    overflow: hidden;
  }

  .billing-command p,
  .setup-hero p,
  .setup-dossier-head p,
  .account-page-head p,
  .panel p {
    max-width: 100%;
    white-space: normal;
  }

  .setup-hero h2 {
    font-size: 28px;
  }

  .setup-step {
    min-height: auto;
  }

  .donut-row {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .chart-legend {
    width: 100%;
  }

  .table-pagination {
    align-items: stretch;
    flex-direction: column;
    min-width: 680px;
  }

  .compact-table .table-pagination {
    min-width: 620px;
  }

  .table-pagination div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .table-pagination strong {
    grid-column: 1 / -1;
    text-align: center;
  }

  .dossier-main {
    display: grid;
    grid-template-columns: 1fr;
  }

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

/* Leadomnis 0.9.9.6 - registre industriel */
:root {
  --black: #070707;
  --ink: #111111;
  --muted: #666a70;
  --orange: #ff6900;
  --orange-dark: #d95700;
  --orange-soft: #fff3ea;
  --white: #ffffff;
  --bg: #ffffff;
  --surface: #f7f7f6;
  --line: #dedfdf;
  --line-strong: #c6c8ca;
  --green: #12824d;
  --green-soft: #e9f6ef;
  --blue: #111111;
  --blue-soft: #f2f2f1;
  --shadow: none;
  --radius: 5px;
}

html {
  overflow-x: hidden;
}

body {
  background: #ffffff;
  color: var(--ink);
  font-family: Inter, "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.navrail {
  min-height: 74px;
  height: 74px;
  padding: 0 28px;
  gap: 26px;
  border-bottom: 1px solid #202020;
  background: #050505;
}

.brand-lockup {
  min-width: 172px;
  padding: 0;
}

.brand-lockup span {
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.11em;
}

.rail-menu {
  height: 100%;
  gap: 8px;
}

.rail-menu button {
  height: 100%;
  min-height: 74px;
  padding: 0 13px;
  border: 0;
  border-radius: 0;
  color: #d2d2d2;
  font-size: 13px;
  font-weight: 650;
  box-shadow: none;
}

.rail-menu button::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 0;
  height: 3px;
  background: transparent;
}

.rail-menu button.active,
.rail-menu button:hover {
  background: transparent;
  color: var(--orange);
  box-shadow: none;
}

.rail-menu button.active::after {
  background: var(--orange);
}

.rail-menu button svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
}

.topbar {
  min-height: 78px;
  height: 78px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.topbar::after {
  display: none;
}

.topbar h1 {
  font-size: 25px;
  font-weight: 800;
  line-height: 1.1;
}

.page {
  gap: 24px;
  padding: 28px 28px 48px;
  background: #fff;
}

.view-dashboard .topbar {
  display: none;
}

.view-dashboard .page {
  gap: 28px;
  padding: 0 28px;
}

.btn,
.mini-btn {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid #cfd0d1;
  border-radius: 5px;
  background: #fff;
  color: #111;
  box-shadow: none;
  font-size: 13px;
  font-weight: 700;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}

.mini-btn {
  min-height: 36px;
  padding: 7px 12px;
}

.btn.primary {
  border-color: var(--orange);
  background: var(--orange);
  color: #111;
}

.mini-btn,
.mini-btn.ghost,
.btn.ghost {
  border-color: #cfd0d1;
  background: #fff;
  color: #111;
}

.btn:hover,
.mini-btn:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
  background: #fff;
  box-shadow: none;
  transform: none;
}

.btn.primary:hover {
  color: #111;
  background: #f45f00;
}

.command-band {
  margin: 0 -28px;
  padding: 25px 28px;
  display: grid;
  grid-template-columns: minmax(310px, 1.15fr) 116px minmax(460px, 1.7fr) auto;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.command-campaign {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding-left: 22px;
  border-left: 4px solid var(--orange);
}

.command-campaign span,
.command-switcher span,
.command-metrics span {
  color: #555a60;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.command-campaign > span {
  color: var(--orange-dark);
}

.command-campaign strong {
  overflow: hidden;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-campaign small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-switcher {
  display: grid;
  gap: 5px;
}

.command-switcher select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  font-size: 12px;
}

.command-metrics {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-left: 1px solid var(--line);
}

.command-metrics > div {
  min-width: 0;
  min-height: 62px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 0 20px;
  border-right: 1px solid var(--line);
}

.command-metrics strong {
  font-size: 26px;
  font-weight: 750;
  line-height: 1;
}

.command-primary {
  min-width: 170px;
  justify-content: center;
}

.production-command {
  margin: 0 -28px;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(180px, 0.7fr) minmax(250px, 0.9fr) auto;
  gap: 22px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.production-title {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding-left: 18px;
  border-left: 4px solid var(--orange);
}

.production-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.production-title-line > span,
.production-campaign-select > span,
.production-kpis span,
.production-section-head span,
.production-systems > div span {
  color: #555a60;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.production-title > strong {
  overflow: hidden;
  font-size: 22px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-title > small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runtime-pill {
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.runtime-pill.live {
  background: #dff4e7;
  color: #086c39;
}

.runtime-pill.test {
  background: #fff0d4;
  color: #985300;
}

.production-campaign-select {
  display: grid;
  gap: 6px;
}

.production-campaign-select select {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
}

.call-window-status {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 10px 14px;
  border-left: 1px solid var(--line);
}

.call-window-status .status-light {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px #fae6e6;
}

.call-window-status.open .status-light {
  background: var(--green);
  box-shadow: 0 0 0 4px #dff4e7;
}

.call-window-status div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.call-window-status strong {
  font-size: 13px;
}

.call-window-status small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-actions {
  display: flex;
  gap: 8px;
}

.production-actions .btn {
  white-space: nowrap;
}

.production-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.production-kpis button {
  min-width: 0;
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.production-kpis button:last-child {
  border-right: 0;
}

.production-kpis button:hover {
  background: #fff8f2;
}

.production-kpis strong {
  overflow: hidden;
  font-size: 25px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-kpis em {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-section {
  border-top: 1px solid var(--line);
  background: #fff;
}

.production-section-head {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
}

.production-section-head h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.production-section-head > strong {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #111;
  color: #fff;
  font-size: 13px;
}

.action-ledger,
.activity-ledger {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.action-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.action-row:last-child {
  border-bottom: 0;
}

.action-row > div {
  min-width: 0;
}

.action-row > div strong {
  font-size: 13px;
}

.action-row p {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-severity {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #999;
}

.action-severity.high { background: var(--red); }
.action-severity.medium { background: var(--orange); }
.action-severity.low { background: #85898e; }

.activity-ledger {
  display: grid;
}

.activity-ledger button {
  min-height: 54px;
  display: grid;
  grid-template-columns: 100px 70px minmax(180px, 1fr) minmax(140px, 0.7fr);
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.activity-ledger button:last-child {
  border-bottom: 0;
}

.activity-ledger button:hover {
  background: #fff8f2;
}

.activity-ledger time,
.activity-ledger span,
.activity-ledger em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.activity-ledger span {
  color: var(--orange-dark);
  font-weight: 800;
  text-transform: uppercase;
}

.activity-ledger strong,
.activity-ledger em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-empty {
  min-height: 88px;
  display: grid;
  place-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  text-align: center;
}

.production-empty strong {
  color: var(--ink);
}

.production-systems {
  margin: 0 -28px;
  padding: 17px 28px;
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) repeat(5, minmax(130px, 1fr));
  background: #090909;
  color: #fff;
}

.production-systems > div,
.production-systems button {
  min-width: 0;
  min-height: 50px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid #343434;
  background: transparent;
  color: #fff;
  text-align: left;
}

.production-systems > div {
  padding-left: 0;
}

.production-systems button {
  grid-template-columns: 10px minmax(0, 1fr);
  cursor: pointer;
}

.production-systems button i {
  width: 8px;
  height: 8px;
  grid-row: 1 / 3;
  align-self: center;
  border-radius: 50%;
  background: #e05252;
}

.production-systems button i.ok {
  background: #42c779;
}

.production-systems button span {
  color: #a8aaad;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.production-systems button strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campaign-onboarding {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

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

.onboarding-head > div {
  display: grid;
  gap: 4px;
}

.onboarding-head span,
.onboarding-copy > span,
.onboarding-subhead span,
.onboarding-review span,
.selected-buyer-summary span,
.onboarding-days > span {
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.onboarding-head strong {
  font-size: 20px;
}

.onboarding-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #f7f7f6;
}

.onboarding-progress button {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #787b7f;
  text-align: left;
}

.onboarding-progress button:last-child {
  border-right: 0;
}

.onboarding-progress button:not(:disabled) {
  cursor: pointer;
}

.onboarding-progress button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--orange);
}

.onboarding-progress button.done {
  color: #176d42;
}

.onboarding-progress button > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #c8c9ca;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 850;
}

.onboarding-progress button.active > span {
  border-color: var(--orange);
  background: var(--orange);
  color: #111;
}

.onboarding-progress button.done > span {
  border-color: #2f9c63;
  background: #dff4e7;
}

.onboarding-progress button strong {
  font-size: 12px;
}

.onboarding-stage {
  padding: 28px;
}

.calibration-phone {
  margin-bottom: 22px;
}

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

.calibration-call {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafafa;
}

.calibration-call.completed {
  border-color: #9bd2b5;
  background: #f4fbf7;
}

.calibration-call-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calibration-call-head > span {
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 850;
}

.calibration-status {
  padding: 4px 7px;
  border: 1px solid #d6d7d8;
  border-radius: 3px;
  color: #62666a;
  background: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.calibration-status.completed {
  border-color: #9bd2b5;
  color: #176d42;
  background: #e7f7ed;
}

.calibration-call h3 {
  margin: 20px 0 7px;
  font-size: 19px;
}

.calibration-call > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.calibration-call > .btn {
  margin-top: auto;
}

.calibration-result {
  display: grid;
  gap: 2px;
  margin: 0 0 18px;
}

.calibration-result strong {
  font-size: 12px;
}

.calibration-result span,
.calibration-toolbar span {
  color: var(--muted);
  font-size: 11px;
}

.calibration-toolbar {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: #f7f7f6;
}

.observed-intake {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.observed-intake-head,
.observed-intake-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(150px, 1fr));
}

.observed-intake-head {
  background: #111;
  color: #fff;
}

.observed-intake-head span {
  padding: 10px 12px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.observed-intake-row > * {
  min-width: 0;
  padding: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.observed-intake-row span {
  color: var(--muted);
  border-left: 1px solid var(--line);
}

.onboarding-form {
  max-width: 1120px;
  margin: 0 auto;
}

.onboarding-copy {
  max-width: 700px;
  margin-bottom: 24px;
}

.onboarding-copy h2 {
  margin: 5px 0 7px;
  font-size: 25px;
}

.onboarding-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

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

.onboarding-grid.compact {
  max-width: 540px;
  grid-template-columns: 1fr;
}

.onboarding-grid.single {
  grid-template-columns: 1fr;
}

.onboarding-grid label,
.campaign-onboarding .call-schedule-editor label,
.campaign-onboarding .intake-row label {
  display: grid;
  gap: 7px;
}

.onboarding-grid label > span,
.campaign-onboarding .call-schedule-editor label > span,
.campaign-onboarding .intake-row label > span {
  color: #555a60;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.campaign-onboarding .onboarding-field-label {
  min-height: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #555a60;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.campaign-onboarding .onboarding-field-label > span {
  min-width: 0;
}

.field-requirement {
  flex: 0 0 auto;
  padding: 2px 5px;
  border: 1px solid #d4d6d8;
  border-radius: 3px;
  color: #6b7076;
  background: #f7f7f6;
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.field-requirement.required {
  border-color: #ffc49c;
  color: #984300;
  background: #fff4ec;
}

.field-requirement.conditional {
  border-color: #e5c987;
  color: #755300;
  background: #fff9e8;
}

.field-info {
  position: relative;
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #9ca1a6;
  border-radius: 50%;
  color: #4f5459;
  background: #fff;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  text-transform: none;
  z-index: 5;
}

.field-info::after {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: 280px;
  padding: 9px 10px;
  border-radius: 5px;
  background: #111;
  color: #fff;
  content: attr(data-tooltip);
  font-family: inherit;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  text-transform: none;
  transform: translate(-50%, -4px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: normal;
  z-index: 50;
}

.field-info:hover::after,
.field-info:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.field-info:focus-visible {
  outline: 3px solid rgba(255, 105, 0, .25);
  outline-offset: 2px;
}

.field-help-inline {
  display: none;
  flex: 1 0 100%;
  padding: 8px 9px;
  border-radius: 4px;
  background: #111;
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
  text-transform: none;
}

.campaign-onboarding .intake-row label:nth-child(n + 3) .field-info::after {
  right: 0;
  left: auto;
  transform: translate(0, -4px);
}

.campaign-onboarding .intake-row label:nth-child(n + 3) .field-info:hover::after,
.campaign-onboarding .intake-row label:nth-child(n + 3) .field-info:focus-visible::after {
  transform: translate(0, 0);
}

.onboarding-grid input,
.onboarding-grid select,
.onboarding-grid textarea,
.campaign-onboarding .call-schedule-editor input,
.campaign-onboarding .call-schedule-editor select,
.campaign-onboarding .intake-row input,
.campaign-onboarding .intake-row select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-size: 14px;
}

.onboarding-grid textarea {
  min-height: 92px;
  padding-block: 10px;
}

.campaign-onboarding .call-schedule-editor,
.campaign-onboarding .intake-builder {
  margin: 18px 0 0;
}

.campaign-onboarding .call-schedule-editor,
.campaign-onboarding .intake-builder {
  padding: 18px;
}

.onboarding-alert,
.internal-destination,
.selected-buyer-summary {
  display: grid;
  gap: 7px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--orange);
  border-radius: 5px;
  background: #fafafa;
}

.onboarding-alert span,
.internal-destination p,
.selected-buyer-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.destination-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.onboarding-decision-label {
  margin-bottom: 9px;
}

.destination-choice > button {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.destination-choice > button.active {
  border: 2px solid var(--orange);
  background: #fff8f2;
}

.destination-choice strong {
  font-size: 16px;
}

.destination-choice span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.buyer-onboarding {
  display: grid;
  gap: 18px;
}

.onboarding-quota {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.onboarding-subhead {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.onboarding-days {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.onboarding-days > span {
  width: 100%;
}

.onboarding-days > .onboarding-field-label {
  width: 100%;
}

.onboarding-days .day-toggle-group {
  width: 100%;
}

.campaign-onboarding .day-toggle input {
  width: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
}

.campaign-onboarding .call-schedule-editor label.day-toggle > span,
.campaign-onboarding .onboarding-days label.day-toggle > span {
  font-size: 12px;
  text-transform: none;
}

.campaign-onboarding .call-schedule-editor label.day-toggle input:checked + span,
.campaign-onboarding .onboarding-days label.day-toggle input:checked + span {
  color: #111;
}

.onboarding-review {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.onboarding-review > div {
  min-height: 130px;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.onboarding-review > div:nth-child(2n) {
  border-right: 0;
}

.onboarding-review > div:last-child {
  grid-column: 1 / -1;
  border-right: 0;
  border-bottom: 0;
}

.onboarding-review strong {
  display: block;
  margin-top: 9px;
  font-size: 16px;
}

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

.onboarding-ready {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 14px 16px;
  border-left: 4px solid var(--orange);
  background: #f7f7f6;
}

.onboarding-ready strong {
  font-size: 13px;
}

.onboarding-ready span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.onboarding-footer {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #fafafa;
}

.onboarding-footer > span {
  color: var(--muted);
  font-size: 12px;
}

.onboarding-footer > div {
  display: flex;
  gap: 8px;
}

.metric-strip {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metric {
  min-height: 78px;
  padding: 15px 18px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.metric:last-child {
  border-right: 0;
}

.metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.metric strong {
  font-size: 25px;
  font-weight: 750;
}

.panel,
.page-card,
.work-surface,
.mission-board,
.campaign-studio,
.setup-dossier,
.portal-shell,
.chart-card,
.settings-hero,
.settings-card,
.settings-summary,
.billing-command,
.account-page-head,
.aircall-agent,
.aircall-status-grid {
  border-color: var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: none;
}

.panel {
  padding: 20px;
}

.view-dashboard .panel {
  padding: 0;
  border: 0;
}

.panel-head {
  align-items: center;
  margin-bottom: 18px;
}

.panel h2,
.page-card h2,
.modal h2 {
  font-size: 20px;
  font-weight: 800;
}

.panel p,
.page-card p,
.modal-subtitle {
  color: var(--muted);
  font-size: 13px;
}

.section-count {
  border: 0;
  background: transparent;
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 750;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.table-tools {
  min-width: 1040px;
  align-items: center;
  justify-content: flex-start;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.table-tools label {
  max-width: 360px;
}

.table-tools label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.table-tools input {
  min-height: 40px;
  padding: 9px 12px;
  border-color: var(--line-strong);
  border-radius: 5px;
  background: #fff;
  font-size: 13px;
}

.table-tools em {
  order: 2;
  margin-left: auto;
  color: #44484e;
  font-weight: 650;
}

table {
  min-width: 1040px;
  font-size: 13px;
}

th,
td {
  padding: 14px 16px;
  border-bottom-color: #e4e4e3;
}

th {
  height: 52px;
  background: #f6f6f5;
  color: #30343a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

td {
  height: 64px;
  background: #fff;
}

tbody tr:hover td,
tr.selected-row td {
  background: #fffaf6;
}

td strong {
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.priority-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--orange);
  vertical-align: 1px;
}

.row-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #34383d;
  font-size: 12px;
  font-weight: 650;
}

.row-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 2px solid var(--orange);
  border-radius: 50%;
}

.table-pagination {
  min-width: 1040px;
  margin: 0;
  padding: 12px 14px;
  border-top: 0;
  background: #fafafa;
}

.tech-strip {
  border: 0;
  border-radius: 0;
  background: #080808;
  color: #fff;
  box-shadow: none;
}

.view-dashboard .tech-strip {
  margin: 0 -28px;
  padding: 18px 28px;
}

.tech-strip span {
  color: #a8aaad;
}

.tech-strip strong {
  color: #42c779;
  font-size: 16px;
}

.tech-strip em {
  color: #c7c8ca;
}

.tech-strip .mini-btn.ghost {
  border-color: #4a4a4a;
  background: transparent;
  color: #fff;
}

.campaign-context,
.hero-card,
.billing-command,
.account-page-head,
.setup-dossier {
  border-left: 4px solid var(--orange);
  box-shadow: none;
}

.campaign-context {
  padding: 18px 20px;
}

.campaign-context span,
.eyebrow,
.studio-copy span,
.studio-select span,
.studio-next span,
.dossier-label,
.dossier-rule span,
.mission-lane > span,
.portal-tabs > div > span,
.aircall-agent > span,
.settings-hero span,
.settings-summary span,
.info-block span,
label span {
  color: #555a60;
}

.campaign-context > div > span,
.eyebrow,
.settings-hero > div > span {
  color: var(--orange-dark);
}

.badge {
  border-radius: 4px;
  box-shadow: none;
}

.filter-bar,
  .intake-builder,
  .info-block,
.settings-health,
.settings-grid input,
.settings-grid select,
.settings-grid textarea,
.settings-field,
.log-filters input,
.log-filters select {
  background: #f8f8f7;
}

.filter-bar button {
  border-radius: 4px;
}

.filter-bar button.active,
.filter-bar button:hover {
  background: #111;
  color: #fff;
}

.campaign-studio::before {
  background: var(--orange);
}

.progress-cell span,
.bar-chart span {
  background: var(--orange);
}

.modal-backdrop {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(2px);
}

.modal {
  max-height: calc(100vh - 40px);
  border: 1px solid #222;
  border-radius: 6px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.modal-scroll > h2 {
  font-size: 25px;
  font-weight: 800;
}

.modal-actions {
  background: #f7f7f6;
}

.settings-hero {
  border-top: 4px solid var(--orange);
}

.settings-card,
.settings-summary,
.settings-hero {
  box-shadow: none;
}

.settings-summary {
  min-height: 82px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-radius: 5px;
}

.settings-summary div {
  min-height: 82px;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.settings-summary div:last-child {
  border-right: 0;
}

.settings-card-head {
  min-height: 70px;
  padding: 16px 20px;
}

.settings-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 20px 22px;
}

.settings-grid input,
.settings-grid select,
.settings-grid textarea,
.settings-field {
  min-height: 44px;
  background: #fff;
}

.campaign-studio {
  padding: 24px;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.55fr);
  gap: 22px;
}

.studio-copy h2 {
  margin-top: 10px;
  font-size: 36px;
  font-weight: 800;
  line-height: 1.05;
}

.studio-copy p {
  font-size: 14px;
}

.studio-tags {
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.studio-tags span {
  padding: 10px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.studio-contract {
  gap: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.studio-contract div {
  min-height: 82px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: #f8f8f7;
}

.studio-contract div + div {
  border-left: 0;
}

.assignment-panel {
  border-radius: 5px;
  background: #f8f8f7;
}

.studio-kpis {
  gap: 0;
  border-radius: 5px;
  background: transparent;
}

.studio-kpis div {
  min-height: 76px;
  padding: 13px 16px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.studio-kpis div:last-child {
  border-right: 0;
}

.studio-kpis strong {
  font-size: 20px;
  font-weight: 750;
}

.readiness-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.readiness-item,
.readiness-item.ok,
.readiness-item.ko {
  min-height: 82px;
  padding: 14px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
}

.readiness-item:nth-child(4n) {
  border-right: 0;
}

.readiness-item:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.readiness-item.ok strong {
  color: var(--green);
}

.readiness-item.ko strong {
  color: var(--red);
}

@media (max-width: 1180px) {
  .command-band {
    grid-template-columns: minmax(280px, 1fr) minmax(470px, 1.6fr) auto;
  }

  .command-switcher {
    display: none;
  }

  .production-command {
    grid-template-columns: minmax(260px, 1fr) minmax(230px, 0.8fr) auto;
  }

  .production-campaign-select {
    display: none;
  }

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

  .production-kpis button:nth-child(3) {
    border-right: 0;
  }

  .production-kpis button:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

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

  .production-systems > div {
    grid-column: 1 / -1;
    border-bottom: 1px solid #343434;
  }

  .rail-menu button {
    padding: 0 9px;
  }

  .rail-menu button span {
    display: none;
  }

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

@media (max-width: 760px) {
  .navrail {
    height: 62px;
    min-height: 62px;
    width: 100%;
    max-width: 100vw;
    padding: 0 14px;
    overflow: hidden;
  }

  .brand-lockup {
    min-width: 132px;
  }

  .brand-lockup span {
    font-size: 12px;
  }

  .rail-menu button {
    min-height: 62px;
    height: 62px;
  }

  .rail-menu {
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .topbar {
    min-height: 0;
    height: auto;
    padding: 17px 16px;
  }

  .topbar h1 {
    font-size: 22px;
  }

  .page,
  .view-dashboard .page {
    gap: 18px;
    padding: 18px 16px 32px;
  }

  .view-dashboard .page {
    padding-top: 0;
    padding-bottom: 0;
  }

  .command-band {
    margin: 0 -16px;
    padding: 18px 16px;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .production-command {
    margin: 0 -16px;
    padding: 18px 16px;
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .production-campaign-select {
    display: grid;
  }

  .call-window-status {
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .production-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .production-actions .btn {
    min-width: 0;
    padding-inline: 9px;
  }

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

  .production-kpis button,
  .production-kpis button:nth-child(3) {
    min-height: 86px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .production-kpis button:nth-child(2n) {
    border-right: 0;
  }

  .production-kpis button:last-child {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 0;
  }

  .production-section-head {
    min-height: 64px;
  }

  .action-row {
    grid-template-columns: 8px minmax(0, 1fr);
  }

  .action-row .mini-btn {
    grid-column: 2;
    width: max-content;
  }

  .action-row p {
    white-space: normal;
  }

  .activity-ledger button {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .activity-ledger button strong,
  .activity-ledger button em {
    grid-column: 1 / -1;
  }

  .production-systems {
    margin: 0 -16px;
    padding: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .production-systems button {
    min-height: 58px;
    padding: 8px;
    border-bottom: 1px solid #343434;
  }

  .campaign-onboarding {
    margin-inline: -16px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .onboarding-head {
    min-height: 66px;
    padding: 12px 16px;
  }

  .onboarding-progress {
    overflow-x: auto;
    grid-template-columns: repeat(6, minmax(112px, 1fr));
  }

  .onboarding-progress button {
    min-height: 52px;
    padding: 8px 10px;
  }

  .onboarding-stage {
    padding: 22px 16px;
  }

  .onboarding-grid,
  .calibration-calls,
  .destination-choice,
  .onboarding-review {
    grid-template-columns: 1fr;
  }

  .observed-intake {
    overflow-x: auto;
  }

  .observed-intake-head,
  .observed-intake-row {
    min-width: 660px;
  }

  .onboarding-review > div,
  .onboarding-review > div:nth-child(2n),
  .onboarding-review > div:last-child {
    grid-column: auto;
    min-height: 100px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .onboarding-review > div:last-child {
    border-bottom: 0;
  }

  .campaign-onboarding .intake-row {
    grid-template-columns: 1fr;
  }

  .campaign-onboarding .onboarding-field-label {
    flex-wrap: wrap;
  }

  .field-info::after,
  .campaign-onboarding .intake-row label:nth-child(n + 3) .field-info::after {
    display: none;
  }

  .field-info:focus + .field-help-inline,
  .field-info:focus-visible + .field-help-inline {
    display: block;
  }

  .onboarding-footer {
    padding: 12px 16px;
  }

  .onboarding-footer > span {
    display: none;
  }

  .onboarding-footer > div {
    width: 100%;
  }

  .onboarding-footer .btn {
    flex: 1;
    justify-content: center;
  }

  .command-switcher {
    display: grid;
  }

  .command-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
  }

  .command-metrics > div {
    min-height: 64px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
  }

  .command-primary {
    width: 100%;
  }

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

  .metric {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .view-dashboard .tech-strip {
    margin: 0 -16px;
    padding: 17px 16px;
  }

  .panel {
    padding: 16px;
  }

  .view-dashboard .panel {
    padding: 0;
  }

  .campaign-studio,
  .studio-contract,
  .studio-kpis,
  .readiness-grid,
  .settings-grid,
  .settings-summary {
    grid-template-columns: 1fr;
  }

  .settings-summary div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .settings-summary div:last-child {
    border-bottom: 0;
  }

  .campaign-studio {
    padding: 18px;
  }

  .studio-copy h2 {
    font-size: 30px;
  }

  .studio-contract div + div {
    border-left: 1px solid var(--line);
    border-top: 0;
  }

  .studio-kpis div,
  .readiness-item,
  .readiness-item:nth-child(4n),
  .readiness-item:nth-last-child(-n + 4) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .studio-kpis div:last-child,
  .readiness-item:last-child {
    border-bottom: 0;
  }

  .panel-head {
    align-items: flex-start;
  }
}

/* Facturation: navigation compacte et registre unique. */
.period-nav {
  min-height: 58px;
  padding: 8px 10px;
  grid-template-columns: auto minmax(210px, 280px) auto;
  justify-content: start;
  align-items: center;
  border: 1px solid #1f1f1f;
  border-radius: 5px;
}

.period-nav label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.period-nav label span {
  font-size: 10px;
  line-height: 1;
}

.period-nav select,
.period-nav .mini-btn.ghost {
  min-height: 38px;
}

.billing-charts {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.billing-charts .chart-card {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.billing-charts .chart-card:last-child {
  border-right: 0;
}

@media (max-width: 760px) {
  .period-nav {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 6px;
  }

  .period-nav label {
    display: grid;
    gap: 4px;
  }

  .period-nav .mini-btn {
    width: 38px;
    min-width: 38px;
    padding: 0;
    overflow: hidden;
    color: transparent;
  }

  .period-nav .mini-btn svg {
    color: var(--white);
  }

  .billing-charts {
    grid-template-columns: 1fr;
  }

  .billing-charts .chart-card {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .billing-charts .chart-card:last-child {
    border-bottom: 0;
  }
}
