:root {
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: #173354;
  background: #f4f7fb;
  font-size: 16px;
  font-synthesis: none;
  --navy: #0d3157;
  --blue: #0864bc;
  --blue-hover: #07549c;
  --blue-pale: #e7f1fa;
  --border: #d6e3ee;
  --muted: #526d84;
  --surface: #fff;
  --danger: #9a3d36;
}

/* AIアポ獲得センター product suite */
.sidebar { overflow-y: auto; }
.brand { border: 0; padding: 0; }
.brand img { width: 175px; height: 44px; object-fit: contain; object-position: left center; }
.login-logo { border: 1px solid rgba(255,255,255,.28); }
.onboarding-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; margin: 24px 0 30px; padding: 0; list-style: none; overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--border); }
.onboarding-steps li { display: flex; gap: 11px; align-items: center; min-height: 82px; padding: 14px; background: #fff; }
.onboarding-steps li>span { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid #b8cada; border-radius: 50%; color: var(--muted); font-size: .78rem; font-weight: 700; }
.onboarding-steps li div { display: grid; gap: 3px; }
.onboarding-steps li small { color: var(--muted); font-size: .72rem; }
.onboarding-steps .is-current { box-shadow: inset 0 -3px var(--blue); }
.onboarding-steps .is-current>span,.onboarding-steps .is-done>span { border-color: var(--blue); background: var(--blue); color: #fff; }
.choice-set { display: flex; flex-wrap: wrap; gap: 9px; margin: 0; padding: 16px; border: 1px solid var(--border); border-radius: 8px; }
.choice-set legend { color: #385b78; font-size: .87rem; font-weight: 700; padding: 0 5px; }
.choice-set label { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: #f8fbfd; font-size: .84rem; }
.choice-set input { width: 18px; height: 18px; accent-color: var(--blue); }
.crm-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 24px 0 30px; border: 1px solid var(--border); border-radius: 10px; background: #fff; overflow: hidden; }
.crm-summary>div { display: grid; gap: 8px; padding: 20px; border-right: 1px solid var(--border); }
.crm-summary>div:last-child { border-right: 0; }
.crm-summary span,.balance-banner span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.suite-kpi-strip { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); margin: 0 0 22px; border: 1px solid var(--border); border-radius: 9px; background: #fff; overflow: hidden; }
.suite-kpi-strip>div { display: grid; gap: 5px; padding: 13px 14px; border-right: 1px solid var(--border); }
.suite-kpi-strip>div:last-child { border-right: 0; }
.suite-kpi-strip span { color: var(--muted); font-size: .72rem; font-weight: 700; }
.suite-kpi-strip strong { color: #102f4f; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.crm-summary strong { font-size: 1.15rem; }
.suite-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; margin: 24px 0 36px; }
.suite-columns>section { min-width: 0; }
.suite-columns>section>h2 { padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 17px; }
.suite-columns-wide { grid-template-columns: minmax(0,1.1fr) minmax(330px,.9fr); align-items: start; }
.compact-form { display: grid; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.compact-form input,.compact-form select,.compact-form textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #adc4d9; border-radius: 7px; background: #fff; color: inherit; }
.inline-control { display: flex; gap: 8px; }
.inline-control input { min-width: 0; flex: 1; }
.record-list { display: grid; border-top: 1px solid var(--border); }
.record-list article { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 3px; border-bottom: 1px solid var(--border); }
.record-list article>div:first-child,.record-list article:not(:has(>div)) { min-width: 0; }
.record-list article strong,.record-list article span,.record-list article small { display: block; }
.record-list article span { margin-top: 4px; color: #385b78; }
.record-list article small { margin-top: 4px; color: var(--muted); }
.timeline { display: grid; }
.timeline article { display: grid; grid-template-columns: 125px minmax(0,1fr); gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.timeline time { color: var(--muted); font-size: .75rem; }
.timeline p { margin: 5px 0; color: #38516a; line-height: 1.6; }
.balance-banner { display: flex; align-items: baseline; gap: 14px; margin: 20px 0; padding: 16px 20px; border: 1px solid #c9def4; background: #eaf3fc; }
.balance-banner strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.balance-banner small { color: var(--muted); }
.order-total { display: flex; justify-content: space-between; align-items: baseline; padding: 15px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.letter-layout-preview { position: sticky; top: 76px; }
.letter-layout-preview header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.letter-layout-preview header small { color: #8a5a18; font-weight: 700; }
.paper { aspect-ratio: 1 / 1.414; max-height: 690px; padding: 10% 11%; overflow: auto; border: 1px solid #cfd6dc; background: #fffefa; box-shadow: 0 8px 24px rgba(0,0,0,.1); color: #20262d; }
.paper p { margin: 0 0 10%; text-align: right; font-weight: 700; }
.paper div { white-space: pre-wrap; line-height: 2; overflow-wrap: anywhere; }
.scenario-flow { display: flex; gap: 0; overflow-x: auto; margin: 22px 0; padding: 14px 0; }
.scenario-flow>div { position: relative; display: grid; align-content: start; gap: 4px; min-width: 160px; padding: 13px 28px 13px 13px; border: 1px solid var(--border); background: #fff; }
.scenario-flow>div:not(:last-child)::after { content: '→'; position: absolute; right: 7px; top: 27px; color: var(--blue); }
.scenario-flow>div>span { color: var(--blue); font-size: .72rem; font-weight: 700; }
.scenario-flow small { color: var(--muted); }
.scenario-builder-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 10px 0 14px; }
.scenario-insert-control { display: grid; gap: 6px; min-width: min(430px, 55%); }
.scenario-insert-control > label { font-size: .84rem; font-weight: 700; }
.scenario-visual-nodes { display: grid; gap: 10px; }
.scenario-visual-node { min-width: 0; padding: 15px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.scenario-visual-node > header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.scenario-visual-node > header > strong { min-width: 0; overflow-wrap: anywhere; }
.scenario-visual-node > header small { color: var(--muted); overflow-wrap: anywhere; }
.scenario-node-config { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.scenario-stage-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 12px; }
.scenario-edge-editor { margin-top: 18px; }
.scenario-edge-row { display: grid; grid-template-columns: 1fr 1fr minmax(180px, .8fr) auto; align-items: end; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.scenario-edge-row label { display: grid; gap: 6px; min-width: 0; font-size: .84rem; font-weight: 700; }
.scenario-edge-row select { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
@media (max-width: 720px) {
  .scenario-builder-toolbar { align-items: stretch; flex-direction: column; }
  .scenario-insert-control { min-width: 0; }
  .scenario-node-config { grid-template-columns: minmax(0, 1fr); }
  .scenario-stage-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scenario-edge-row { grid-template-columns: 1fr 1fr; }
}
.integration-list { display: grid; margin-top: 24px; border-top: 1px solid var(--border); }
.integration-list article { display: grid; grid-template-columns: minmax(220px,1fr) auto minmax(280px,2fr); gap: 18px; align-items: center; padding: 18px 4px; border-bottom: 1px solid var(--border); }
.integration-list span { display: block; margin-top: 4px; color: var(--muted); }
.integration-list p { margin: 0; color: #38516a; line-height: 1.55; }
.muted-action { color: var(--muted); font-size: .8rem; }
.badge-connected { color: #276044; background: #e3f3e9; }
.badge-setup_required,.badge-approval_required { color: #76551d; background: #fff0d9; }

@media (max-width: 1000px) {
  .onboarding-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .suite-columns,.suite-columns-wide { grid-template-columns: 1fr; }
  .letter-layout-preview { position: static; }
  .integration-list article { grid-template-columns: 1fr auto; }
  .suite-kpi-strip { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .suite-kpi-strip>div:nth-child(3) { border-right: 0; }
  .suite-kpi-strip>div:nth-child(-n+3) { border-bottom: 1px solid var(--border); }
  .integration-list p { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .email-sender-review { grid-template-columns: 1fr; }
  .email-html-tool-grid { grid-template-columns: 1fr; }
  .email-html-preview { min-height: 280px; }
  .onboarding-steps,.crm-summary { grid-template-columns: 1fr; }
  .crm-summary>div { border-right: 0; border-bottom: 1px solid var(--border); }
  .crm-summary>div:last-child { border-bottom: 0; }
  .record-list article { align-items: flex-start; flex-direction: column; }
  .timeline article { grid-template-columns: 1fr; gap: 5px; }
  .balance-banner { align-items: flex-start; flex-direction: column; gap: 5px; }
  .integration-list article { grid-template-columns: 1fr; gap: 8px; }
  .suite-kpi-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .suite-kpi-strip>div { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .suite-kpi-strip>div:nth-child(2n) { border-right: 0; }
  .suite-kpi-strip>div:nth-last-child(-n+2) { border-bottom: 0; }
  .integration-list p { grid-column: auto; }
}
@media (max-width: 540px) {
  .sidebar { padding: 7px 10px; overflow: hidden; }
  .sidebar nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }
  .sidebar .nav-group { display: contents; }
  .sidebar nav button { flex: 0 0 auto; width: auto; min-height: 42px; padding: 7px 10px; white-space: nowrap; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--blue); text-underline-offset: 3px; }
::selection { background: #cbe4fa; color: #12395e; }
:focus-visible { outline: 3px solid #3893dd; outline-offset: 3px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 10; top: -70px; left: 12px; background: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus-visible { top: 12px; }
.boot, .loading { padding: 48px 20px; color: var(--muted); }

.login-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 520px); min-height: 100vh; }
.login-brand { background: var(--navy); color: #eff7ff; padding: clamp(36px, 7vw, 110px); display: flex; flex-direction: column; justify-content: space-between; gap: 42px; }
.login-logo { background: #fff; border-radius: 12px; overflow: hidden; width: min(100%, 600px); }
.login-logo img, .brand img { display: block; width: 100%; height: auto; }
.login-brand p { max-width: 36ch; line-height: 1.8; margin: 0; }
.login-form { align-self: center; width: 100%; padding: 48px clamp(28px, 5vw, 80px); }
.login-form h1 { font-size: 1.75rem; margin: 0 0 32px; line-height: 1.4; }
.login-intro { color: var(--muted); line-height: 1.7; max-width: 52ch; margin: -18px 0 26px; }
.auth-links { display: grid; gap: 2px; justify-items: center; }
.field-help { color: var(--muted); font-size: .8rem; line-height: 1.5; }

.shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--navy); color: #edf5fc; display: flex; flex-direction: column; gap: 24px; padding: 28px 18px; }
.brand { background: #fff; border-radius: 9px; overflow: hidden; min-height: 75px; display: flex; align-items: center; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav button { width: 100%; border: 0; background: transparent; color: #d3e2f0; text-align: left; padding: 12px; border-radius: 8px; font-weight: 600; }
.sidebar nav button:hover, .sidebar nav button[aria-current="page"] { background: #19598e; color: #fff; }
.sidebar-note { margin: auto 12px 0; color: #bed3e5; font-size: .8rem; line-height: 1.7; }
.main { min-width: 0; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 clamp(22px, 4vw, 56px); background: #fff; border-bottom: 1px solid var(--border); }
.topbar strong { overflow-wrap: anywhere; }
.content { max-width: 1540px; margin: auto; padding: 38px clamp(22px, 4vw, 56px) 90px; }
#screen { min-width: 0; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 8px; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 { font-size: 2rem; line-height: 1.35; letter-spacing: -.025em; margin: 0; }
h2 { font-size: 1.2rem; line-height: 1.4; margin: 0; }
h3 { font-size: 1rem; line-height: 1.5; margin: 24px 0 10px; }
.page-intro { color: var(--muted); margin: 0 0 24px; line-height: 1.7; }
.list-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 28px 0 12px; }
.list-heading span, .subtext, .helper { color: var(--muted); font-size: .84rem; line-height: 1.6; }
.subtext { display: block; font-variant-numeric: tabular-nums; }
.helper { margin: 8px 0; max-width: 72ch; }
.info-bar { background: var(--blue-pale); color: #28537a; border-radius: 9px; padding: 13px 16px; line-height: 1.6; margin: 0 0 22px; }
.feedback { padding: 12px 16px; border-radius: 8px; margin: 0 0 18px; line-height: 1.6; }
.feedback-success { background: #e5f3ea; color: #245e3a; }
.feedback-error { background: #fae9e6; color: #853b32; }

.button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 44px; padding: 9px 16px; border: 1px solid var(--blue); border-radius: 8px; background: var(--blue); color: #fff; font-weight: 700; text-decoration: none; line-height: 1.3; white-space: normal; text-align: center; }
.button:hover:not(:disabled) { background: var(--blue-hover); border-color: var(--blue-hover); color: #fff; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button-outline { background: #fff; color: var(--blue); }
.button-outline:hover:not(:disabled) { background: #eaf3fb; color: var(--blue); border-color: var(--blue); }
.button-danger { background: #fff; color: var(--danger); border-color: #cba8a4; }
.button-danger:hover:not(:disabled) { background: #f9eae8; color: var(--danger); border-color: var(--danger); }
.button-small { min-height: 40px; padding: 7px 11px; font-size: .82rem; }
.text-button { min-height: 40px; background: transparent; border: 0; color: var(--blue); font-weight: 700; padding: 7px 8px; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--blue-hover); }
.action-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.action-row.compact { gap: 7px; }

.field { display: grid; gap: 7px; min-width: 0; }
.field label { color: #385b78; font-size: .87rem; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 46px; border: 1px solid #adc4d9; border-radius: 8px; background: #fff; color: #173354; padding: 10px 12px; }
.field input::placeholder, .field textarea::placeholder { color: #5d6d82; }
.field textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.field-grow { flex: 1 1 300px; }
.form-stack { display: grid; gap: 19px; }
.ai-copy-builder { display: grid; gap: 12px; margin: 4px 0; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: #f7fbff; }
.ai-copy-builder legend { padding: 0 6px; color: #174f82; font-weight: 700; }
.ai-copy-builder .field { margin: 0; }
.form-panel, .detail-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: clamp(20px, 3vw, 30px); margin: 22px 0 28px; }
.form-panel { max-width: 860px; }
.form-panel.narrow { max-width: 720px; }
.form-panel h2 { margin-bottom: 18px; }
.target-summary { margin: 0 0 24px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.search-bar, .inline-form { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin: 0 0 20px; }
.search-bar > .field:not(.field-grow) { flex: 0 1 220px; }
.search-bar > .button { margin-bottom: 0; }
.check-row { display: flex; align-items: start; gap: 10px; line-height: 1.6; cursor: pointer; }
.check-row input { width: 19px; height: 19px; margin: 3px 0 0; flex: 0 0 auto; accent-color: var(--blue); }
.scenario-company-choices { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 9px; padding: 10px 14px; background: #fff; }
.scenario-company-choice { padding: 8px 0; border-bottom: 1px solid var(--border); }
.scenario-company-choice:last-child { border-bottom: 0; }
.scenario-company-choice span { min-width: 0; overflow-wrap: anywhere; }
.scenario-company-choice small { display: block; color: var(--muted); }
.scenario-company-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.scenario-company-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; background: #f2f7fc; padding: 4px 8px 4px 12px; font-size: .84rem; }
.scenario-company-chip button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.1rem; line-height: 1; }
.field-label { display: block; margin-bottom: 7px; color: #385b78; font-size: .87rem; font-weight: 700; }
.detail-panel { scroll-margin-top: 18px; }
.detail-heading, .detail-heading-actions { display: flex; align-items: start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.detail-heading { margin-bottom: 22px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; margin: 0 0 16px; }
.facts div { min-width: 0; }
.facts dt { color: var(--muted); font-size: .8rem; margin-bottom: 4px; }
.facts dd { margin: 0; line-height: 1.6; overflow-wrap: anywhere; }
.company-info-extra { margin: 16px 0 22px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: #f8fbfd; }
.company-info-extra summary { color: #174f82; font-weight: 700; cursor: pointer; }
.company-info-extra .facts { margin: 16px 0; }
.company-info-extra ul { margin: 8px 0 0; padding-left: 20px; line-height: 1.8; }
.detail-links { display: flex; gap: 16px; flex-wrap: wrap; margin: 18px 0; }
.detail-links:empty { display: none; }
.message-preview { max-width: 76ch; white-space: pre-wrap; line-height: 1.75; overflow-wrap: anywhere; }
.email-html-tools { border: 1px solid var(--border); border-radius: 8px; background: #f8fbfd; padding: 13px 15px; }
.email-html-tools summary { color: #174f82; font-weight: 700; cursor: pointer; }
.email-html-tool-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: 13px; align-items: end; margin-top: 15px; }
.email-html-preview { display: block; width: 100%; min-height: 360px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.email-html-preview[hidden] { display: none; }
.email-sender-review { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 18px 0; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: #f8fbfd; }
.email-sender-review div { min-width: 0; }
.email-sender-review dt { color: var(--muted); font-size: .8rem; font-weight: 700; }
.email-sender-review dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.result-panel { max-width: 760px; }
.result-panel .field + .field { margin-top: 16px; }
.result-panel .action-row { margin-top: 20px; }
.quote-summary { display: flex; flex-direction: column; gap: 5px; background: #f2f7fc; border-radius: 9px; padding: 16px; margin: 20px 0; font-variant-numeric: tabular-nums; }
.quote-summary span { color: var(--muted); font-size: .85rem; }
.quote-form, .approve-box { border-top: 1px solid var(--border); margin: 22px 0; padding-top: 18px; }
.approve-box { display: grid; justify-items: start; gap: 14px; }

.table-wrap { background: #fff; border: 1px solid var(--border); border-radius: 11px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 740px; }
th, td { padding: 14px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid #e8eef4; font-size: .88rem; }
th { background: #f7fafd; color: #4b6880; font-size: .77rem; font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbfe; }
td strong { display: block; font-weight: 700; }
.cell-main { min-width: 180px; }
.cell-actions { text-align: right; }
.cell-actions .action-row { justify-content: flex-end; }
.cell-quote { font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge { display: inline-block; border-radius: 6px; padding: 5px 8px; color: #1d5a8c; background: #e6f0fa; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.badge-needs_review, .badge-unknown, .badge-requested, .badge-quoted { color: #76551d; background: #fff0d9; }
.badge-draft, .badge-suppressed, .badge-failed, .badge-cancelled, .badge-unverified { color: #566c7e; background: #edf1f5; }
.badge-confirmed, .badge-shipped, .badge-verified { color: #276044; background: #e3f3e9; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; color: var(--muted); margin-top: 18px; }
.empty { padding: 46px 20px; text-align: center; color: var(--muted); background: #fff; border: 1px solid var(--border); border-radius: 11px; }
.empty p { margin: 0 0 16px; }
.empty p:last-child { margin-bottom: 0; }
.retry-panel { max-width: 640px; margin: 10vh auto; padding: 30px; }
.retry-panel p { line-height: 1.7; }
.connection-state { display: grid; gap: 4px; background: #fff4e6; color: #6b4b20; padding: 16px; border-radius: 9px; max-width: 720px; }
.connection-state.connected { background: #e5f3ea; color: #245e3a; }

@media (max-width: 540px) {
  .shell { display: block; }
  .sidebar { padding: 12px 18px; gap: 12px; }
  .brand { width: 220px; min-height: 65px; }
  .sidebar nav { display: flex; overflow-x: auto; padding-bottom: 3px; }
  .sidebar nav button { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .sidebar-note { display: none; }
  .topbar { height: 58px; }
  .content { padding-top: 30px; }
}

/* Evidence based list discovery */
.list-builder-panel { background:#fff; border:1px solid var(--border); border-radius:10px; padding:22px; }
.corpus-counts { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 18px; }
.corpus-counts span { display:flex; align-items:baseline; gap:8px; padding:8px 12px; background:#fff; border:1px solid var(--border); border-radius:7px; color:#53657a; font-size:.78rem; }
.corpus-counts strong { color:#123a63; font-size:1.05rem; font-variant-numeric:tabular-nums; }
.corpus-counts small { flex-basis:100%; color:var(--muted); }
.builder-checkbox { display:flex; align-items:center; gap:8px; padding:10px 0; font-size:.78rem; color:#334c65; }
.builder-checkbox input { width:17px; height:17px; }
.builder-options .field input[type="number"] { width:100%; margin-top:6px; min-height:38px; padding:7px 9px; border:1px solid var(--border); border-radius:6px; }
.extraction-count { margin:0 0 13px; padding:9px 12px; border:1px solid #bdd6ef; background:#edf5fd; border-radius:7px; font-size:.83rem; color:#234d76; }
.extraction-count strong { font-variant-numeric:tabular-nums; }
.export-progress { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:14px; padding:10px 12px; border-radius:7px; background:#eaf3fd; color:#154b80; font-size:.83rem; font-variant-numeric:tabular-nums; }
.list-builder-main label { display:block; font-weight:700; margin-bottom:8px; }
.list-builder-prompt { display:flex; gap:8px; }
.list-builder-prompt input { flex:1; min-width:0; min-height:46px; padding:9px 12px; border:1px solid #adc4d9; border-radius:7px; }
.list-builder-panel .helper { margin:7px 0 0; }
.expansion-note { display:flex; flex-wrap:wrap; align-items:center; gap:7px; background:#eef5fc; padding:10px 12px; border-radius:7px; margin:16px 0; font-size:.8rem; }
.expansion-note span { background:#fff; border:1px solid #d2e3f2; padding:3px 7px; border-radius:4px; }
.expansion-note small { width:100%; color:var(--muted); }
.builder-section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:23px 0 8px; }
.rule-row { display:grid; grid-template-columns:78px minmax(140px,1.2fr) minmax(130px,1fr) auto auto; align-items:center; gap:8px; padding:8px 0; border-top:1px solid var(--border); }
.rule-row select,.rule-row input { min-width:0; width:100%; min-height:42px; border:1px solid #adc4d9; border-radius:6px; padding:7px 9px; background:#fff; color:var(--navy); }
.rule-row .rule-exclude { white-space:nowrap; font-size:.8rem; display:flex; align-items:center; gap:5px; }
.rule-exclude input { width:auto; min-height:auto; accent-color:var(--blue); }
.builder-name-filter { max-width:420px; margin-top:14px; }
.builder-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding-top:17px; margin-top:6px; border-top:1px solid var(--border); }
.builder-advanced { margin-top:16px; }
.builder-advanced summary { color:var(--blue); cursor:pointer; font-size:.82rem; font-weight:700; padding:7px 0; }
.builder-advanced summary:hover { text-decoration:underline; text-underline-offset:3px; }
.builder-options-secondary { border-top:0; padding-top:10px; margin-top:0; }
.builder-options .field label { font-size:.78rem; }
.builder-options .field select { min-height:42px; }
.builder-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:21px; }
.save-query-form,.similarity-builder { display:flex; flex-wrap:wrap; align-items:end; gap:10px; margin-top:14px; padding:14px; background:#f4f8fc; border:1px solid var(--border); border-radius:7px; }
.save-query-form .field,.similarity-builder .field { flex:1 1 260px; }
.similarity-builder .helper { flex-basis:100%; }
.builder-aux { display:grid; gap:8px; margin:14px 0 22px; }
.builder-aux details { background:#fff; border:1px solid var(--border); border-radius:8px; padding:10px 15px; }
.builder-aux summary { cursor:pointer; color:var(--blue); font-weight:700; }
.import-grid { display:grid; grid-template-columns:1fr 1fr auto; align-items:end; gap:10px; margin-top:14px; }
.saved-searches>div { display:flex; align-items:center; gap:12px; border-bottom:1px solid var(--border); padding:7px 0; }
.saved-searches strong { margin-right:auto; overflow-wrap:anywhere; }
.snapshot-list { display:grid; gap:7px; margin-top:8px; }
.snapshot-entry { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; padding:9px 0; border-bottom:1px solid var(--border); }
.snapshot-entry>a { flex:1 1 320px; min-width:0; overflow-wrap:anywhere; }
.snapshot-entry .subtext { color:var(--muted); font-size:.78rem; }
.snapshot-entry button { min-height:40px; }
.stage-strip { display:flex; overflow-x:auto; gap:0; background:#fff; border:1px solid var(--border); border-radius:8px; }
.stage-strip>div { min-width:135px; flex:1; padding:11px 12px; border-right:1px solid var(--border); display:grid; gap:4px; }
.stage-strip>div:last-child { border-right:0; }
.stage-strip small { font-size:.72rem; color:var(--muted); line-height:1.35; }
.stage-strip strong { font-size:1.2rem; font-variant-numeric:tabular-nums; }
.stage-strip span { font-size:.7rem; color:var(--muted); font-variant-numeric:tabular-nums; }
.list-result-table { overflow-x:auto; background:#fff; border:1px solid var(--border); border-radius:8px; }
.list-result-table table { width:100%; border-collapse:collapse; min-width:840px; }
.list-result-table th { background:#f3f7fb; color:#456077; font-size:.74rem; text-align:left; white-space:nowrap; }
.list-result-table td,.list-result-table th { padding:11px 9px; border-bottom:1px solid var(--border); vertical-align:top; }
.list-result-table td { font-size:.8rem; line-height:1.5; }
.list-result-table td strong { display:block; max-width:28ch; overflow-wrap:anywhere; }
.list-result-table td small { display:block; color:var(--muted); }
.match-chip,.diff-status { display:inline-block; border-radius:4px; padding:2px 5px; margin:2px 3px 2px 0; font-size:.72rem; white-space:nowrap; }
.match-chip.matched,.diff-status.new { color:#13593a; background:#e5f3e9; }
.match-chip.unknown,.diff-status.review { color:#80500b; background:#fff0d6; }
.match-chip.mismatched,.match-chip.conflict { color:#8c372f; background:#fae8e5; }
.diff-status.existing { color:#385b78; background:#e7eff5; }
.diff-status.none { color:#55677a; background:#edf1f4; }
.list-evidence { margin-top:18px; }
.evidence-grid { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(230px,1fr); gap:26px; }
.evidence-grid h3 { margin:13px 0 9px; }
.evidence-item { padding:12px 0; border-top:1px solid var(--border); }
.evidence-item p { margin:6px 0; font-size:.85rem; line-height:1.6; }
.evidence-facts { display:grid; grid-template-columns:105px 1fr; gap:9px 8px; font-size:.84rem; }
.evidence-facts dt { color:var(--muted); }
.evidence-facts dd { margin:0; overflow-wrap:anywhere; }
.evidence-facts small { display:block; color:var(--muted); }
.similar-action { border-top:1px solid var(--border); padding-top:16px; margin-top:16px; }
.contact-check-details { border-top:1px solid var(--border); padding-top:16px; margin-top:18px; }
.contact-check-details summary { color:var(--blue); font-weight:700; cursor:pointer; }
.contact-check-form { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; align-items:end; margin-top:14px; }
.contact-check-form .field:nth-child(2),.contact-check-form .field:nth-child(7),.contact-check-form .field:nth-child(8) { grid-column:span 2; }
.contact-check-form .button { justify-self:start; }
.check-history { padding:8px 0; font-size:.78rem; }
.check-history p { margin:4px 0; }
.similar-row { display:grid; grid-template-columns:minmax(180px,1fr) 2fr; gap:12px; padding:9px 0; border-bottom:1px solid var(--border); font-size:.82rem; }
.similar-row span { color:var(--muted); }
@media(max-width:900px) { .builder-options { grid-template-columns:repeat(2,minmax(0,1fr)); } .rule-row { grid-template-columns:65px 1fr 1fr; } .rule-exclude { grid-column:2; } .evidence-grid { grid-template-columns:1fr; } }
@media(max-width:540px) { .list-builder-panel { padding:14px; } .list-builder-prompt { display:grid; } .builder-options,.import-grid { grid-template-columns:1fr; } .rule-row { grid-template-columns:72px 1fr; } .rule-row [data-rule-field="value"] { grid-column:1/-1; } .rule-row .rule-exclude { grid-column:1; } .builder-actions .button { flex:1 1 100%; } .list-result-table table { min-width:0; } .list-result-table thead { display:none; } .list-result-table tbody { display:grid; } .list-result-table tr { display:grid; grid-template-columns:1fr 1fr; padding:10px 12px; border-bottom:1px solid var(--border); } .list-result-table td { border:0; padding:3px 4px; } .list-result-table td:first-child,.list-result-table td:nth-child(3),.list-result-table td:nth-child(4),.list-result-table td:nth-child(6) { grid-column:1/-1; } .list-result-table td:last-child { text-align:right; } .evidence-facts { grid-template-columns:90px 1fr; } .similar-row { grid-template-columns:1fr; gap:3px; } .contact-check-form { grid-template-columns:1fr; } .contact-check-form .field:nth-child(2),.contact-check-form .field:nth-child(7),.contact-check-form .field:nth-child(8) { grid-column:auto; } }
@media (max-width: 540px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { min-height: 270px; padding: 32px; }
  .login-logo { max-width: 360px; }
  .login-brand p { font-size: .94rem; }
  .login-form { padding: 38px 26px 60px; }
  .login-form h1 { font-size: 1.55rem; }
  .page-heading { align-items: start; flex-direction: column; }
  h1 { font-size: 1.75rem; }
  .content { padding: 28px 16px 80px; }
  .search-bar > .field, .search-bar > .field:not(.field-grow), .search-bar > .button { flex: 1 1 100%; width: 100%; }
  .facts { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .action-row > .button { flex: 1 1 auto; }
  .mobile-cards { background: transparent; border: 0; overflow: visible; }
  .mobile-cards table, .mobile-cards tbody { display: block; min-width: 0; }
  .mobile-cards thead { display: none; }
  .mobile-cards tbody { display: grid; gap: 11px; }
  .mobile-cards tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: 11px; }
  .mobile-cards td { display: block; border: 0; padding: 0; min-width: 0; }
  .mobile-cards .cell-main { grid-column: 1 / -1; }
  .mobile-cards .cell-hide { display: none; }
  .mobile-cards .cell-status { grid-column: 1; align-self: center; }
  .mobile-cards .cell-quote { grid-column: 1; }
  .mobile-cards .cell-actions { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
  .mobile-cards.target-cards .cell-actions { grid-column: 1 / -1; grid-row: auto; text-align: left; }
  .mobile-cards.target-cards .cell-actions .action-row { justify-content: flex-start; }
  .mobile-cards tbody tr:hover { background: #fff; }
}
@media (max-width: 480px) {
  .sidebar nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .sidebar nav button { width: 100%; white-space: normal; font-size: .82rem; }
  .brand { width: min(100%, 270px); min-height: 60px; }
  .topbar { padding: 0 16px; }
  .detail-heading { gap: 10px; }
  .detail-panel, .form-panel { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button:active:not(:disabled) { transform: none; }
}

/* Compact workspace layout based on the supplied interface reference. */
:root {
  color: #1e293b;
  background: #f5f7fa;
  font-size: 15px;
  --navy: #123c69;
  --blue: #0864bd;
  --blue-hover: #0755a1;
  --blue-pale: #eaf3ff;
  --border: #dce4ee;
  --muted: #5d6d82;
  --surface: #fff;
}
.icon { display: inline-block; width: 16px; height: 16px; flex: 0 0 auto; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.shell { display: grid; grid-template-columns: 205px minmax(0, 1fr); grid-template-rows: 55px minmax(0, 1fr); min-height: 100vh; }
.topbar { grid-column: 1 / -1; grid-row: 1; height: 55px; padding: 0 24px; border-bottom: 1px solid var(--border); background: #fff; }
.brand { width: 198px; height: 50px; min-height: 0; border: 0; background: transparent; border-radius: 0; overflow: hidden; }
.brand img { width: 100%; height: 100%; object-fit: contain; }
.environment-label { display: inline-flex; align-items: center; gap: 6px; color: #5d6d82; font-size: .73rem; white-space: nowrap; }
.environment-dot { width: 5px; height: 5px; border-radius: 50%; background: #67778b; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.notification-button { position: relative; display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: #27435f; font-size: .74rem; font-weight: 700; }
.notification-button:hover { border-color: #86b6e4; background: var(--blue-pale); color: var(--blue); }
.notification-button b { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 10px; background: #c73737; color: #fff; font-size: .64rem; }
.notification-button b[hidden] { display: none; }
.mobile-logout { display: none; border: 0; background: none; color: var(--blue); font-size: .74rem; font-weight: 700; }
.notification-row.is-unread { margin-inline: -10px; padding-inline: 13px; border-left: 3px solid var(--blue); background: #f6faff; }
.notification-title { display: flex; align-items: center; gap: 8px; }
.notification-title span { margin: 0; padding: 2px 6px; border-radius: 999px; background: #dceeff; color: #075db5; font-size: .66rem; font-weight: 700; }
.notification-row p { margin: 5px 0 0; color: #385b78; }
.nurturing-panel { margin: 18px 0 22px; padding: 18px; border: 1px solid #bfd8ef; border-radius: 8px; background: #f8fbff; }
.nurturing-panel .list-heading { align-items: flex-start; }
.sidebar { grid-column: 1; grid-row: 2; position: sticky; top: 0; height: calc(100vh - 55px); min-height: 540px; padding: 18px 11px 12px; gap: 0; background: #fff; color: #34445a; border-right: 1px solid var(--border); }
.sidebar nav { display: grid; align-content: start; gap: 19px; }
.nav-group { display: grid; gap: 3px; }
.nav-label { padding: 0 9px 6px; color: #5d6d82; font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.sidebar nav button { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 7px 9px; color: #263448; font-size: .85rem; font-weight: 600; line-height: 1.35; border-radius: 5px; }
.sidebar nav button .icon { width: 15px; height: 15px; }
.sidebar nav button:hover, .sidebar nav button[aria-current="page"] { background: #eaf3ff; color: #075db5; }
.sidebar-account { display: grid; grid-template-columns: 27px minmax(0, 1fr); align-items: center; gap: 5px 8px; margin-top: auto; padding: 12px 6px 2px; border-top: 1px solid var(--border); }
.account-avatar { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--border); border-radius: 6px; color: #375674; font-size: .8rem; font-weight: 700; }
.account-copy { display: grid; grid-column: 2; min-width: 0; }
.account-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1e293b; font-size: .74rem; }
.account-copy small { color: #5d6d82; font-size: .65rem; }
.logout-button { grid-column: 2; justify-self: start; padding: 3px 0; border: 0; background: none; color: #55708a; font-size: .71rem; text-decoration: underline; text-underline-offset: 2px; }
.logout-button:hover { color: var(--blue); }
.content { grid-column: 2; grid-row: 2; width: 100%; max-width: 1280px; margin: 0 auto; padding: 22px 26px 70px; }
.page-heading { margin-bottom: 6px; }
h1 { color: #182330; font-size: 1.65rem; letter-spacing: -.025em; }
h2 { color: #202d3b; font-size: 1rem; }
h3 { font-size: .95rem; }
.page-intro { margin-bottom: 20px; color: #5d6d82; font-size: .86rem; line-height: 1.65; }
.list-heading { margin: 22px 0 10px; }
.list-heading h2 { font-size: .98rem; }
.list-heading > span { color: #5d6d82; font-size: .75rem; }
.result-number { margin-left: 3px; color: #53677d; font-weight: 500; }
.subtext, .helper { color: #5d6d82; font-size: .77rem; }
.button { min-height: 40px; padding: 8px 13px; border-radius: 6px; font-size: .85rem; }
.button-small { min-height: 36px; padding: 6px 10px; font-size: .78rem; }
.button .icon { width: 14px; height: 14px; }
.text-button { min-height: 30px; font-size: .8rem; }
.field label { color: #43596f; font-size: .81rem; }
.field input, .field select, .field textarea { min-height: 42px; border-color: #bdccdc; border-radius: 6px; padding: 8px 11px; color: #27384a; font-size: .86rem; }
.field textarea { min-height: 110px; }
.form-panel, .detail-panel { border-radius: 8px; padding: 22px; margin: 18px 0 24px; }
.info-bar { padding: 10px 13px; border-radius: 5px; font-size: .84rem; }
.badge { padding: 4px 7px; border-radius: 4px; font-size: .71rem; }
.pagination { font-size: .78rem; }
.dashboard-cards { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin:18px 0 28px; }
.dashboard-card { display:grid; gap:8px; min-height:124px; padding:16px; text-align:left; color:#26374a; background:#fff; border:1px solid var(--border); border-radius:8px; }
.dashboard-card:hover { border-color:#79a9d4; background:#f8fbff; }
.dashboard-card span { font-size:.82rem; font-weight:700; }
.dashboard-card strong { color:#075db5; font-size:1.7rem; font-variant-numeric:tabular-nums; }
.dashboard-card small,.signal-catalog small { color:var(--muted); font-size:.7rem; line-height:1.5; }
.dashboard-section { margin:26px 0; padding:18px; background:#fff; border:1px solid var(--border); border-radius:8px; }
.section-heading { display:flex; align-items:baseline; justify-content:space-between; gap:14px; margin-bottom:12px; }
.section-heading span { color:var(--muted); font-size:.73rem; }
.signal-feed { display:grid; gap:8px; }
.signal-item { display:flex; justify-content:space-between; align-items:start; gap:16px; padding:13px 0; border-top:1px solid #e8eef4; }
.signal-item > div:first-child { min-width:0; }
.signal-item strong,.signal-item span { display:block; }
.signal-item > div > span { margin-top:4px; color:var(--muted); font-size:.76rem; }
.signal-item p { margin:8px 0; line-height:1.6; font-size:.83rem; }
.signal-item .action-row { flex:0 0 auto; }
.signal-catalog { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.signal-catalog > div { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:6px 9px; padding:10px; background:#f8fafc; border-radius:5px; }
.signal-catalog strong { font-size:.8rem; }
.signal-catalog small { grid-column:2; }
.phase-tag { color:#365f83; background:#e8f1f8; padding:3px 6px; border-radius:4px; font-size:.68rem; white-space:nowrap; }
.source-list { display:grid; gap:8px; }
.source-list > div { display:grid; grid-template-columns:minmax(150px,auto) auto 1fr; align-items:center; gap:10px; padding:8px 0; border-top:1px solid #e8eef4; font-size:.8rem; }
.source-list > div > span:last-child { color:var(--muted); }
.outcome-strip { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:8px; }
.outcome-strip > div { display:grid; gap:5px; padding:10px; background:#f8fafc; border-radius:5px; }
.outcome-strip span,.outcome-strip small { color:var(--muted); font-size:.72rem; }
.outcome-strip strong { font-size:.9rem; }
.funnel-strip { display:grid; grid-template-columns:repeat(9,minmax(0,1fr)); gap:6px; }
.funnel-strip > div,.rate-strip > div,.channel-kpi-grid > div { display:grid; gap:5px; padding:11px; background:#f8fafc; border-radius:6px; }
.funnel-strip span,.rate-strip span,.channel-kpi-grid span { color:var(--muted); font-size:.7rem; }
.funnel-strip strong,.rate-strip strong,.channel-kpi-grid strong { color:#173b5f; font-size:.9rem; font-variant-numeric:tabular-nums; }
.rate-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:10px; }
.channel-kpi-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
.cost-note { display:grid; gap:5px; margin-top:12px; padding:12px 14px; border-left:3px solid #e0aa4e; background:#fff9ed; }
.cost-note span,.cost-note small { color:#6f5a34; font-size:.74rem; line-height:1.5; }
.admin-inline { display:flex; align-items:center; gap:6px; min-width:360px; }
.admin-inline select { min-width:110px; min-height:34px; padding:5px 7px; border:1px solid var(--border); border-radius:5px; background:#fff; }
.saved-view-tools { display:grid; grid-template-columns:minmax(260px,1fr) 2fr; gap:14px; align-items:center; margin:10px 0; padding:11px 14px; background:#fff; border:1px solid var(--border); border-radius:7px; }
.saved-view-tools form { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.saved-view-tools label { color:#43596f; font-size:.78rem; font-weight:700; }
.saved-view-tools input { min-width:140px; max-width:220px; min-height:36px; padding:6px 9px; border:1px solid #bdccdc; border-radius:5px; }
.saved-view-list { display:flex; flex-wrap:wrap; gap:4px; max-height:112px; overflow:auto; align-content:flex-start; }
.signal-picker { border:1px solid var(--border); border-radius:6px; padding:12px; }
.signal-picker legend { padding:0 5px; font-size:.82rem; font-weight:700; }
.signal-pick-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; margin-bottom:14px; }
.signal-pick-list label { display:flex; gap:7px; align-items:start; font-size:.78rem; }
.signal-pick-list input { flex:0 0 auto; margin-top:3px; }
@media(max-width:1000px) { .dashboard-cards { grid-template-columns:repeat(3,minmax(0,1fr)); } .signal-catalog { grid-template-columns:repeat(2,minmax(0,1fr)); } .outcome-strip { grid-template-columns:repeat(4,minmax(0,1fr)); } .funnel-strip { grid-template-columns:repeat(5,minmax(0,1fr)); } .channel-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:540px) { .dashboard-cards { grid-template-columns:repeat(2,minmax(0,1fr)); } .signal-catalog { grid-template-columns:1fr; } .outcome-strip,.rate-strip,.funnel-strip,.channel-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .section-heading { align-items:flex-start; flex-direction:column; gap:4px; } .signal-item { flex-direction:column; } .source-list > div { grid-template-columns:1fr auto; } .source-list > div > span:last-child { grid-column:1/-1; } .saved-view-tools { grid-template-columns:1fr; } .signal-pick-list { grid-template-columns:1fr; } }

.company-search { padding: 17px; border: 1px solid var(--border); border-radius: 7px; background: #fff; }
.search-main { display: flex; gap: 9px; align-items: stretch; }
.search-main > .button { min-width: 75px; }
.search-input { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; padding: 0 12px; border: 1px solid #d5deea; border-radius: 5px; color: #8493a7; background: #fff; }
.search-input:focus-within { border-color: #3687d3; outline: 2px solid #d8eaff; }
.search-input .icon { width: 15px; height: 15px; }
.search-input input { width: 100%; min-width: 0; height: 35px; padding: 0; border: 0; outline: 0; color: #26374a; font: inherit; font-size: .82rem; }
.search-input input::placeholder { color: #5d6d82; }
.search-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 14px; }
.search-filters .field { gap: 5px; }
.search-filters select { width: 100%; cursor: pointer; }
.search-filters input { width: 100%; }
.advanced-search-filters { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.advanced-search-filters summary { width: fit-content; color: #174f82; font-weight: 700; cursor: pointer; }
.advanced-search-filters[open] .search-filters { padding-bottom: 6px; }
.fit-filter-control { grid-column: 1 / -1; display: grid; gap: 4px; }
.fit-filter-control .helper { margin-left: 29px; }
.company-table { overflow: clip; border-radius: 8px; }
.company-table table { min-width: 0; }
.company-table th, .company-table td { padding: 10px 13px; border-bottom-color: #e5ebf2; font-size: .83rem; }
.company-table th { background: #f8fafc; color: #42586d; font-size: .74rem; }
.company-table tbody tr { height: 62px; }
.company-table tbody tr:nth-child(even) { background: #fbfcfe; }
.company-table tbody tr.is-selected { background: #f0f6ff; }
.company-table tbody tr:hover { background: #f6f9ff; }
.company-table .cell-check { width: 54px; min-width: 54px; text-align: center; padding: 3px 4px; }
.check-hit { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.company-table input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.company-table .cell-main { min-width: 200px; }
.company-table .cell-main strong { color: #263243; font-size: .85rem; line-height: 1.4; }
.company-table .cell-main .subtext { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42ch; }
.fit-details { margin-top: 3px; color: var(--muted); font-size: .76rem; line-height: 1.45; }
.fit-details summary { cursor: pointer; color: var(--blue); width: fit-content; }
.fit-details ul { margin: 4px 0; padding-left: 18px; white-space: normal; }
.fit-details p { margin: 4px 0 0; white-space: normal; }
.company-table .cell-channel { min-width: 72px; }
.channel-icons { display: inline-flex; align-items: center; gap: 4px; }
.channel-icon { display: inline-grid; place-items: center; width: 23px; height: 23px; border-radius: 4px; background: #eaf3ff; color: #0663bd; }
.channel-icon .icon { width: 14px; height: 14px; }
.muted-dash { color: #9aabbc; }
.company-table .cell-status { min-width: 164px; white-space: normal; }
.send-status { display: inline-block; max-width: 100%; padding: 4px 7px; border-radius: 5px; font-size: .72rem; font-weight: 700; line-height: 1.35; }
.send-status-note { display: block; margin-top: 3px; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.send-status-form_ready { color: #205b3d; background: #e3f3e9; }
.send-status-form_policy_review, .send-status-form_unverified, .send-status-form_reverify { color: #76551d; background: #fff0d9; }
.send-status-form_unsupported, .send-status-form_blocked { color: #8b342f; background: #fbe9e7; }
.send-status-form_missing { color: #566c7e; background: #edf1f5; }
.send-status-help { margin: 0 0 10px; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.company-table .cell-actions { width: 96px; padding-left: 2px; padding-right: 8px; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.row-open, .row-save { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 6px; color: #607d98; background: transparent; }
.row-save:hover, .row-save.is-saved { color: var(--blue); background: #eaf3ff; }
.row-save.is-saved .icon { fill: currentColor; }
.row-save:hover, .row-open:hover { outline: 1px solid #c9def4; }
.row-open:hover { color: var(--blue); background: #eaf3ff; }
.row-open .icon { width: 13px; height: 13px; }
.selection-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; top: 0; z-index: 2; padding: 9px 11px; background: #eaf3ff; border-bottom: 1px solid #c8dcf6; }
.selection-toolbar strong { color: #0962b9; font-size: .82rem; white-space: nowrap; }
.selection-actions { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.selection-toolbar .text-button { padding: 4px 6px; text-decoration: none; }
.selection-toolbar .button { white-space: nowrap; }
.directory-guidance { margin: 0 0 18px; padding: 11px 15px; border-radius: 7px; background: #eaf3ff; color: #244c72; line-height: 1.55; font-size: .84rem; }
.directory-guidance summary { color: #163b61; font-weight: 700; cursor: pointer; }
.directory-guidance p { max-width: 80ch; margin: 8px 0 0; }
.data-attribution { margin: 14px 0 0; color: #52677c; font-size: .75rem; line-height: 1.6; }
.reset-search { grid-column: 1 / -1; justify-self: start; margin-top: -4px; }
.login-logo { width: min(100%, 520px); padding: 18px 20px; }
.login-logo img { display: block; width: 100%; height: auto; }
.login-form .button { min-height: 46px; }
.empty { padding: 44px 22px; }
.empty p { max-width: 56ch; margin-left: auto; margin-right: auto; }
.pagination { font-variant-numeric: tabular-nums; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #1b73c6; outline-offset: 2px; }

@media (max-width: 900px) and (min-width: 541px) {
  .shell { grid-template-columns: 138px minmax(0, 1fr); }
  .topbar { padding: 0 20px; }
  .brand { width: 170px; }
  .sidebar { padding-left: 7px; padding-right: 7px; }
  .sidebar nav button { gap: 6px; padding: 6px 7px; font-size: .73rem; }
  .sidebar nav button .icon { width: 14px; height: 14px; }
  .nav-label { padding-left: 7px; font-size: .66rem; }
  .content { padding: 20px 16px 60px; }
  .company-table .cell-hide { display: none; }
  .company-table table { width: 100%; table-layout: fixed; }
  .company-table th:nth-child(1) { width: 44px; }
  .company-table th:nth-child(4) { width: 60px; }
  .company-table th:nth-child(5) { width: 72px; }
  .company-table th:nth-child(6) { width: 94px; }
  .company-table .cell-main { min-width: 0; }
  .company-table th, .company-table td { padding: 8px 6px; font-size: .7rem; }
  .company-table .cell-main strong { font-size: .72rem; }
  .company-table .cell-check { width: 44px; min-width: 44px; padding: 0; }
  .company-table .cell-channel { min-width: 60px; }
  .company-table .cell-status { min-width: 0; }
  .company-table .cell-actions { width: 94px; padding-right: 3px; }
  .company-table .row-actions { gap: 0; }
  .company-table .row-open, .company-table .row-save { width: 44px; height: 44px; }
  .company-table .badge { font-size: .65rem; padding: 3px 4px; }
  .search-filters { gap: 7px; }
  .search-filters .field label { font-size: .69rem; }
  .search-filters select { padding: 6px; font-size: .74rem; }
}
@media (max-width: 540px) {
  .shell { display: block; }
  .topbar { height: 54px; padding: 0 14px; }
  .button, .text-button, .mobile-logout { min-height: 44px; }
  .brand { width: 174px; height: 48px; }
  .environment-label { font-size: .58rem; }
  .environment-label { display: none; }
  .topbar-actions { gap: 5px; }
  .notification-button { min-height: 40px; padding: 6px 8px; }
  .notification-button>span { display: none; }
  .mobile-logout { display: inline-block; }
  .sidebar { position: static; height: auto; min-height: 0; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; overflow: visible; }
  .nav-group { display: contents; }
  .nav-label, .sidebar-account { display: none; }
  .sidebar nav button { width: 100%; min-height: 48px; white-space: normal; justify-content: center; gap: 5px; padding: 6px 4px; font-size: .74rem; text-align: center; }
  .sidebar nav button .icon { width: 13px; height: 13px; }
  .content { padding: 20px 14px 65px; }
  .page-heading { flex-direction: row; align-items: center; }
  h1 { font-size: 1.4rem; }
  .page-intro { font-size: .8rem; }
  .company-search { padding: 12px; }
  .search-main > .button { min-width: 64px; }
  .search-filters { grid-template-columns: 1fr 1fr; gap: 9px; }
  .search-filters .field:last-child { grid-column: 1 / -1; }
  .selection-toolbar { align-items: stretch; }
  .selection-actions { width: 100%; }
  .selection-toolbar .button { flex: 1 1 auto; }
  .company-table.mobile-cards { overflow: visible; }
  .company-table.mobile-cards tr { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 7px 9px; padding: 10px 12px; }
  .company-table.mobile-cards tbody tr { height: auto; min-height: 104px; }
  .company-table.mobile-cards td { padding: 0; }
  .company-table.mobile-cards .cell-check { grid-column: 1; grid-row: 1; width: 44px; min-width: 44px; padding: 0; }
  .company-table.mobile-cards .cell-main { grid-column: 2 / -1; grid-row: 1; }
  .company-table.mobile-cards .cell-main .subtext { max-width: 34ch; }
  .company-table.mobile-cards .cell-channel { grid-column: 2; grid-row: 2; }
  .company-table.mobile-cards .cell-status { grid-column: 2; grid-row: 3; }
  .company-table.mobile-cards .cell-actions { grid-column: 3; grid-row: 2 / 4; align-self: center; width: auto; }
  .company-table.mobile-cards .row-actions { gap: 2px; }
  .company-table.mobile-cards .row-open, .company-table.mobile-cards .row-save { width: 44px; height: 44px; }
  .company-table.mobile-cards .cell-hide { display: none; }
  .company-table .cell-main strong { font-size: .85rem; }
  .company-table .cell-main .subtext { font-size: .76rem; }
  .selection-toolbar { top: 0; }
  .selection-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .selection-actions .button { min-height: 44px; }
  .directory-guidance { font-size: .8rem; }
}

@media (max-width: 540px) {
  .sidebar { padding: 7px 10px; overflow: hidden; }
  .sidebar nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 5px; scrollbar-width: thin; }
  .sidebar .nav-group { display: contents; }
  .sidebar nav button { flex: 0 0 auto; width: auto; min-height: 42px; padding: 7px 10px; white-space: nowrap; }
}
.letter-work-order { max-width: 820px; margin: 18px auto; padding: clamp(20px, 3vw, 30px); color: #1e293b; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.letter-work-order h2 { margin: 0 0 8px; font-size: 1.25rem; }
.letter-work-order-meta { margin: 0 0 20px; color: var(--muted); overflow-wrap: anywhere; }
.letter-work-order-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.letter-work-order-fields > div { padding: 12px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.letter-work-order-fields > .wide { grid-column: 1 / -1; }
.letter-work-order-fields dt { margin-bottom: 4px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.letter-work-order-fields dd { margin: 0; overflow-wrap: anywhere; }
.letter-work-order-fields pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
@media (max-width: 600px) { .letter-work-order-fields { grid-template-columns: 1fr; } .letter-work-order-fields > .wide { grid-column: auto; } }
@media print {
  body.print-letter-work-order #app > .app-shell > * { display: none !important; }
  body.print-letter-work-order #app > .app-shell > main.content,
  body.print-letter-work-order #app > .app-shell > main.content > #screen,
  body.print-letter-work-order #app > .app-shell > main.content > #screen > #adminLetterOrderDetail,
  body.print-letter-work-order #letterWorkOrderPrint { display: block !important; }
  body.print-letter-work-order #app > .app-shell > main.content > #screen > :not(#adminLetterOrderDetail),
  body.print-letter-work-order #adminLetterOrderDetail > :not(#letterWorkOrderPrint),
  body.print-letter-work-order #letterWorkOrderPrint .no-print { display: none !important; }
  body.print-letter-work-order #letterWorkOrderPrint { position: static; width: auto; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; }
}

.selection-more { position: relative; }
.selection-more summary { cursor: pointer; padding: 5px 9px; font-size: .8rem; color: #0962b9; list-style: none; border-radius: 6px; }
.selection-more summary:hover { background: #d9e9fb; }
.selection-more-list { position: absolute; top: calc(100% + 4px); left: 0; z-index: 3; display: grid; gap: 5px; min-width: 260px; padding: 8px; background: #fff; border: 1px solid #c8dcf6; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.selection-more-list .button { justify-content: flex-start; }

/* login: centered single column on grey */
.login-shell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; min-height: 100vh; padding: 32px 20px; background: #eef0f3; }
.login-brand { background: transparent; padding: 0; min-height: 0; flex-direction: column; align-items: center; justify-content: center; gap: 0; width: 100%; }
.login-brand p { display: none; }
.login-logo { margin: 0 auto; width: min(100%, 420px); max-width: 420px; padding: 0; background: transparent; border: 0; border-radius: 0; }
.login-form { align-self: auto; width: min(100%, 420px); padding: 32px 28px; background: #fff; border-radius: 12px; box-shadow: 0 2px 14px rgba(0,0,0,.08); }
.login-form h1 { text-align: center; font-size: 1.4rem; margin-bottom: 24px; }
.login-logo img { mix-blend-mode: multiply; }
