:root {
  --ink: #172126;
  --muted: #637078;
  --line: #dce6ea;
  --panel: #ffffff;
  --bg: #f5f8f9;
  --brand: #034456;
  --brand-2: #0b6378;
  --accent: #7cb0c9;
  --blue: #1769ff;
  --green: #0f8a5f;
  --warn: #b7791f;
  --error: #b83232;
  --shadow: 0 10px 26px rgba(3, 68, 86, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

.topbar {
  background:
    linear-gradient(120deg, rgba(3, 68, 86, 0.96), rgba(11, 99, 120, 0.92)),
    radial-gradient(circle at 12% 10%, rgba(124, 176, 201, 0.3), transparent 26%);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 28px;
  border-bottom: 5px solid var(--accent);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.session-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
}

.session-label,
.session-meta {
  margin: 0;
  color: #d4e8f1;
  font-size: 12px;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.toolbar .secondary-button {
  background: #eef6f9;
  border: 1px solid #d3e5ec;
  color: var(--brand);
}

.toolbar .secondary-button:hover:not(:disabled) {
  background: #dceef2;
  color: var(--brand);
}

.brand img,
.report-cover img {
  width: 142px;
  height: auto;
  display: block;
}

.brand-logo-white {
  filter: brightness(0) invert(1);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 25px;
  font-weight: 760;
}

h2 {
  color: var(--brand);
  font-size: 20px;
  letter-spacing: 0;
  margin-bottom: 13px;
  text-transform: uppercase;
}

.eyebrow {
  color: #d4e8f1;
  font-size: 12px;
  letter-spacing: 0;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.navigation-shell {
  display: grid;
  gap: 8px;
  min-width: min(720px, 100%);
}

.primary-tabs,
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-area,
.tab,
button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #072d38;
  font-weight: 750;
  padding: 10px 14px;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.nav-area {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.tab {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #dff0f5;
  padding: 8px 12px;
}

.tab.area-visible {
  display: inline-flex;
}

.nav-area.active,
.tab.active,
button:hover:not(:disabled) {
  background: #fff;
  color: var(--brand);
}

.tab.active {
  border-color: #fff;
}

main {
  padding: 24px 28px 52px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.toolbar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
  padding: 16px;
  margin-bottom: 16px;
}

.helper-toolbar {
  align-items: stretch;
  gap: 18px;
}

.helper-block {
  display: grid;
  gap: 8px;
  min-width: 220px;
  flex: 1 1 220px;
}

.helper-title,
.preset-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.helper-actions,
.preset-actions,
.chip-list,
.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-list.empty {
  color: var(--muted);
  min-height: 38px;
  align-items: center;
}

.ghost-button,
.chip-button {
  background: #eef6f9;
  color: var(--brand);
  border: 1px solid #d3e5ec;
}

.danger-button {
  background: #fde8e8;
  border: 1px solid #f4b8b8;
  color: var(--error);
}

.chip-button {
  padding: 8px 12px;
}

.table-subline {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.text-error {
  color: var(--error) !important;
}

.creative-builder {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 35px rgba(3, 68, 86, 0.08);
  padding: 28px;
}

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

.creative-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.creative-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
}

.creative-field {
  display: grid;
  gap: 8px;
}

.creative-field > span,
.creative-match-card > span {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.creative-field input,
.creative-field select,
.creative-field textarea,
.creative-match-grid input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.creative-field textarea {
  min-height: 88px;
  resize: vertical;
}

.creative-field-wide {
  grid-column: span 2;
}

.creative-match-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

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

.creative-match-grid label {
  display: grid;
  gap: 6px;
}

.creative-match-grid label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.creative-builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

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

.creative-preview-grid {
  margin-bottom: 20px;
}

.editable-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.editable-list label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
}

.editable-list input,
.editable-list textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.editable-list textarea {
  min-height: 78px;
  resize: vertical;
}

.two-col-note-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.note-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  min-height: 120px;
  background: #fff;
  color: var(--ink);
}

.note-box ul {
  margin: 0;
  padding-left: 18px;
}

.inline-link {
  color: var(--blue);
  text-decoration: none;
}

.inline-link:hover {
  text-decoration: underline;
}

.preset-group {
  display: grid;
  gap: 6px;
  min-width: 260px;
}

.wide-label {
  min-width: 320px;
  flex: 1 1 320px;
}

label {
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.check-label {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
  min-height: 38px;
  text-transform: none;
}

.check-label input {
  min-width: auto;
  width: auto;
}

select,
input,
textarea {
  min-width: 210px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  font: inherit;
}

input[type="search"] {
  min-width: 280px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

td input,
td select {
  min-width: 0;
  width: 100%;
}

.status {
  color: var(--muted);
  background: #fff;
  border-left: 5px solid var(--accent);
  border-radius: 7px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.status.error {
  border-color: var(--error);
  color: var(--error);
}

.hidden {
  display: none !important;
}

.inline-check {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  text-transform: none;
}

.tab-permissions-editor {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.tab-permissions-editor > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.tab-permissions-grid {
  display: grid;
  gap: 8px 10px;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
}

.tab-permissions-grid.compact {
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  min-width: 210px;
}

.mini-check {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
}

.mini-check input {
  min-width: auto;
  width: auto;
  margin: 0;
}

.report-cover {
  background: linear-gradient(135deg, #ffffff, #eef7fa);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 22px 24px;
  margin-bottom: 18px;
}

.report-cover .eyebrow {
  color: var(--brand-2);
  font-weight: 800;
}

.report-cover h2 {
  color: var(--brand);
  font-size: 27px;
  margin: 0 0 6px;
  text-transform: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.summary-grid article,
section,
.account-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.summary-grid article {
  min-height: 104px;
  display: grid;
  place-items: center;
  text-align: center;
  border-bottom: 4px solid var(--accent);
}

.summary-grid article.wide {
  grid-column: span 2;
  border-bottom-color: var(--green);
}

.summary-grid span {
  color: var(--muted);
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.summary-grid strong {
  color: var(--brand);
  font-size: 27px;
  font-weight: 850;
}

.editable-metric {
  border: 1px dashed transparent;
  border-radius: 6px;
  padding: 2px 6px;
  outline: none;
}

.editable-metric:focus {
  border-color: var(--accent);
  background: #f9fcfd;
}

.analysis-card {
  margin-bottom: 18px;
}

.analysis-card h2,
section h2 {
  border-bottom: 3px solid var(--accent);
  padding-bottom: 9px;
}

.analysis-card p {
  color: #4f5d64;
  font-size: 16px;
  line-height: 1.6;
}

.analysis-source {
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.analysis-editor {
  color: #4f5d64;
  font-size: 16px;
  line-height: 1.6;
  min-height: 92px;
  border: 1px dashed transparent;
  border-radius: 6px;
  padding: 4px 6px;
  outline: none;
  white-space: pre-wrap;
}

.analysis-editor:focus {
  border-color: var(--accent);
  background: #f9fcfd;
}

.sales-card {
  background: linear-gradient(180deg, #ffffff, #fbfdfe);
}

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

.sales-pitch-item {
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.sales-label {
  color: var(--brand-2);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.sales-copy {
  color: #415059;
  line-height: 1.6;
  min-height: 28px;
  outline: none;
}

.sales-list {
  margin: 0;
  padding-left: 20px;
}

.sales-list li + li {
  margin-top: 8px;
}

.grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

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

.grid.two {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.comparison-hero {
  background: linear-gradient(135deg, #ffffff, #eef7fa);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  padding: 22px 24px;
}

.comparison-hero h2 {
  margin-bottom: 6px;
}

.comparison-hero p:last-child {
  color: var(--muted);
  font-size: 15px;
}

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

.mini-metric {
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.mini-metric span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.mini-metric strong {
  color: var(--brand);
  font-size: 20px;
}

.comparison-summary section {
  background: linear-gradient(180deg, #ffffff, #fbfdfe);
}

.comparison-conversions {
  max-height: none;
}

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

.table-wrap {
  overflow: auto;
  max-height: 540px;
}

.table-wrap.compact {
  max-height: 340px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

.editable-cell {
  border-radius: 4px;
  outline: none;
}

.editable-cell:focus {
  background: #f9fcfd;
  box-shadow: inset 0 0 0 1px var(--accent);
}

th {
  background: #20272b;
  color: #fff;
  font-size: 12px;
  text-transform: none;
}

th:first-child {
  border-top-left-radius: 6px;
}

th:last-child {
  border-top-right-radius: 6px;
}

.charts-grid canvas {
  display: block;
  height: 320px;
  width: 100%;
}

#locations-map {
  height: 380px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e8eef0;
}

#client-locations-map {
  height: 380px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e8eef0;
}

.control-list {
  display: grid;
  gap: 12px;
}

.preview-list {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
}

.ad-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.ad-preview h3 {
  color: var(--blue);
  font-size: 16px;
  margin: 0 0 8px;
}

.ad-preview p {
  color: #4c5961;
  line-height: 1.45;
  margin: 0 0 6px;
}

.ad-preview .path {
  color: var(--green);
  font-size: 13px;
}

.account-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.muted {
  color: var(--muted);
  margin-top: 8px;
}

.guide-note {
  color: #4f5d64;
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}

.client-guide-grid section {
  background: linear-gradient(180deg, #ffffff, #f8fbfc);
}

.conversion-action-grid {
  display: grid;
  gap: 8px 12px;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

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

.conversion-process {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  padding: 18px;
}

.conversion-process .creative-builder-header {
  margin-bottom: 16px;
}

.conversion-step-listing {
  display: grid;
  gap: 10px;
}

.conversion-visual-guide {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.conversion-visual-card {
  background: #fbfdfe;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  padding: 14px;
}

.conversion-card-copy {
  display: grid;
  gap: 8px;
  align-content: start;
}

.conversion-card-copy h3 {
  color: var(--brand);
  font-size: 18px;
  margin: 0;
}

.conversion-card-copy p,
.conversion-card-copy ul {
  color: #43515a;
  line-height: 1.55;
  margin: 0;
}

.conversion-card-copy ul {
  padding-left: 18px;
}

.product-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  width: fit-content;
}

.product-pill.gtm {
  background: #eaf1ff;
  color: #2f67d0;
}

.product-pill.ga4 {
  background: #fff4e6;
  color: #a65d00;
}

.product-pill.ads {
  background: #e8f5ee;
  color: var(--green);
}

.visual-panel {
  background: #fff;
  border: 1px solid #dbe5ea;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  min-height: 210px;
  overflow: hidden;
  padding: 16px;
}

.visual-topbar {
  border-bottom: 1px solid #e5edf1;
  display: flex;
  gap: 8px;
  margin: -16px -16px 16px;
  padding: 11px 14px;
}

.visual-topbar span {
  background: #ccd8de;
  border-radius: 999px;
  height: 8px;
  width: 8px;
}

.visual-form,
.visual-list,
.trigger-panel,
.ga4-id-panel,
.tag-panel,
.events-panel,
.conversion-map-panel,
.ads-goal-panel {
  display: grid;
  gap: 10px;
}

.visual-form label,
.metric-row,
.tag-choice,
.trigger-option,
.event-row,
.conversion-map-panel div,
.toggle-row {
  background: #f6fafb;
  border: 1px solid #dce6ea;
  border-radius: 7px;
  color: #26363f;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.visual-form em {
  color: var(--ink);
  font-style: normal;
  font-weight: 800;
}

.visual-check {
  align-items: center;
  display: flex !important;
  flex-direction: row;
  gap: 8px;
}

.visual-check span,
.visual-list b {
  background: #2f67d0;
  border-radius: 4px;
  display: inline-block;
  height: 16px;
  width: 16px;
}

.visual-list span {
  align-items: center;
  border-bottom: 1px solid #e4edf1;
  display: flex;
  gap: 12px;
  padding: 7px 0;
}

.trigger-option.selected,
.tag-choice.active,
.metric-row.highlight {
  background: #eaf4ff;
  border-color: #91bdec;
}

.trigger-note {
  background: #fff8e8;
  border: 1px solid #efd49b;
  border-radius: 7px;
  color: #6b4b12;
  font-weight: 700;
  padding: 10px 12px;
}

.ga4-create-panel button {
  background: #fff;
  border: 1px solid #dce6ea;
  border-radius: 999px;
  color: #1769ff;
  width: fit-content;
}

.analytics-header {
  color: #4b5a62;
  font-size: 20px;
  font-weight: 800;
}

.visual-menu-item {
  background: #fff;
  border: 1px solid #dce6ea;
  border-radius: 7px;
  color: #43515a;
  padding: 12px;
  width: 160px;
}

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

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

.event-row::before {
  color: #8b969c;
  content: "★";
  margin-right: 10px;
}

.event-row.starred::before {
  color: #6d7f8f;
}

.conversion-map-panel div,
.toggle-row {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.conversion-map-panel span {
  color: var(--muted);
}

.goal-table {
  border: 1px solid #dce6ea;
  border-radius: 7px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

.goal-table span,
.goal-table b {
  border-bottom: 1px solid #e4edf1;
  color: #43515a;
  padding: 10px;
}

.goal-table span {
  background: #f6fafb;
  font-size: 12px;
  font-weight: 800;
}

.conversion-check-step {
  align-items: flex-start;
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #43515a;
  display: flex;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  min-height: auto;
  padding: 12px 14px;
  text-transform: none;
}

.conversion-check-step input {
  flex: 0 0 auto;
  margin-top: 4px;
  min-width: auto;
  width: auto;
}

.conversion-check-step strong {
  color: var(--brand);
}

.conversion-guidance-card {
  background: linear-gradient(180deg, #ffffff, #fbfdfe);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.conversion-guidance-card h3 {
  color: var(--brand);
  font-size: 18px;
  margin: 0 0 10px;
}

.conversion-step-list {
  color: #43515a;
  line-height: 1.6;
  margin: 12px 0 0;
  padding-left: 20px;
}

.conversion-step-list li + li {
  margin-top: 8px;
}

.client-glossary-card {
  margin-bottom: 18px;
}

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

.glossary-item {
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.glossary-term {
  color: var(--brand);
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.glossary-copy {
  color: #4f5d64;
  line-height: 1.6;
  margin: 0;
}

.map-note {
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 12px;
}

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

.case-card {
  background: linear-gradient(180deg, #ffffff, #fbfdfe);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.case-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.case-badge {
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.case-card h3 {
  color: var(--brand);
  font-size: 18px;
  margin: 0 0 8px;
}

.case-account {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 10px;
}

.case-summary {
  color: #43515a;
  line-height: 1.6;
  margin: 0 0 12px;
}

.case-highlight {
  background: #f4fafc;
  border: 1px solid #d7e8ee;
  border-radius: 6px;
  color: #27404b;
  line-height: 1.5;
  margin-bottom: 14px;
  padding: 12px;
}

.empty-card {
  display: grid;
  place-items: center;
  min-height: 180px;
}

.pill {
  background: #edf2f4;
  color: var(--muted);
  display: inline-block;
  font-weight: 800;
  padding: 6px 9px;
  border-radius: 999px;
}

.pill.ok {
  background: #e8f5ee;
  color: var(--green);
}

.pill.optimize {
  background: #fff3d8;
  color: var(--warn);
}

.pill.inactive,
.pill.error {
  background: #fde8e8;
  color: var(--error);
}

.creative-variant-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.creative-variant-tab {
  background: #eef5f7;
  border: 1px solid #d4e4ea;
  color: var(--brand);
  font-weight: 800;
  padding: 10px 14px;
}

.creative-variant-tab.active {
  background: #dceef2;
  border-color: #88b8ca;
}

.creative-preview-grid {
  display: grid;
  gap: 18px;
}

.creative-variant-panel {
  display: none;
}

.creative-variant-panel.active {
  display: block;
}

@media (max-width: 960px) {
  .creative-builder-header,
  .creative-header {
    flex-direction: column;
  }

  .creative-header-actions,
  .creative-builder-actions {
    justify-content: flex-start;
  }

  .creative-form-grid,
  .creative-match-grid,
  .glossary-grid,
  .conversion-guidance-grid,
  .conversion-action-grid,
  .conversion-visual-guide,
  .conversion-visual-card {
    grid-template-columns: 1fr;
  }

  .creative-field-wide {
    grid-column: span 1;
  }
}

body.presentation-mode .topbar-actions,
body.presentation-mode .helper-toolbar,
body.presentation-mode #report-status {
  display: none !important;
}

body.presentation-mode main {
  padding-top: 12px;
}

body.presentation-mode .topbar {
  padding-bottom: 14px;
}

body.presentation-mode .report-cover {
  padding: 28px;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 9mm;
  }

body {
    background: #fff;
    color: #222;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .topbar,
  .no-print,
  .sales-card,
  .leaflet-control-container {
    display: none !important;
  }

  main {
    padding: 0;
  }

  .report-cover,
  .summary-grid article,
  section {
    box-shadow: none;
  }

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .summary-grid article {
    min-height: 82px;
  }

  .summary-grid article.wide {
    grid-column: span 2;
  }

  .grid.two,
  .grid.four {
    grid-template-columns: 1fr;
  }

  .charts-grid canvas {
    height: 250px !important;
  }

  section,
  .report-cover {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 10px;
  }

  #locations-map {
    height: 260px;
  }

  #client-locations-map {
    height: 260px;
  }

  .table-wrap {
    max-height: none;
    overflow: visible;
  }
}

.login-body {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(3, 68, 86, 0.98), rgba(11, 99, 120, 0.94)),
    radial-gradient(circle at top left, rgba(124, 176, 201, 0.25), transparent 30%);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 460px);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(220, 230, 234, 0.9);
  border-radius: 8px;
  box-shadow: 0 24px 48px rgba(3, 68, 86, 0.2);
  padding: 28px;
}

.login-logo {
  width: 170px;
  display: block;
  margin-bottom: 18px;
}

.login-eyebrow {
  color: var(--brand-2);
}

.login-copy,
.login-help {
  color: #55656d;
  line-height: 1.6;
  margin: 10px 0 0;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.segmented-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-chip {
  width: auto;
  border: 1px solid #cfdce2;
  background: #f6fafb;
  color: var(--brand-2);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 600;
}

.filter-chip.active {
  background: var(--brand-2);
  color: #fff;
  border-color: var(--brand-2);
}

.mini-pill {
  display: inline-block;
  margin: 2px 6px 2px 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eaf2f5;
  color: var(--brand-2);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

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

@media (max-width: 1100px) {
  .summary-grid,
  .grid.two,
  .grid.three,
  .grid.four,
  .case-library-grid,
  .sales-pitch-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .topbar,
  .brand {
    align-items: stretch;
    flex-direction: column;
  }

  main {
    padding: 16px;
  }

  .summary-grid,
  .grid.two,
  .grid.three,
  .grid.four,
  .case-library-grid,
  .sales-pitch-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid article.wide {
    grid-column: span 1;
  }

  select,
  input,
  textarea,
  button {
    width: 100%;
  }
}
