:root {
  --navy: #071a3a;
  --blue: #315f8d;
  --slate: #7f99b5;
  --mist: #edf4fa;
  --line: #dce6ef;
  --ink: #10213a;
  --body: #58708d;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(7, 26, 58, .08);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--mist); font-family: Inter, "Avenir Next", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid #7db7ed; outline-offset: 3px; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; transform: translateY(-150%); padding: 10px 16px; border-radius: 8px; background: var(--navy); color: var(--white); }
.skip-link:focus { transform: none; }
.app-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 28px 18px 20px; border-right: 1px solid var(--line); background: var(--white); }
.ops-brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 29px; color: var(--navy); text-decoration: none; font-size: 1.15rem; font-weight: 700; line-height: .9; letter-spacing: -.04em; }
.ops-brand img { width: 36px; height: 36px; }
.ops-brand small { display: block; margin-top: 7px; color: var(--blue); font-size: .5rem; letter-spacing: .28em; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 13px; border-radius: 10px; color: #516983; text-decoration: none; font-size: .88rem; font-weight: 550; }
.sidebar nav a:hover, .sidebar nav a.active { background: var(--mist); color: var(--navy); }
.sidebar nav span { min-width: 24px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: var(--blue); text-align: center; font-size: .7rem; }
.operator-card { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 14px 10px 2px; border-top: 1px solid var(--line); }
.operator-card .avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--white); font-size: .74rem; font-weight: 650; }
.operator-card strong, .operator-card small { display: block; }
.operator-card strong { font-size: .82rem; font-weight: 600; }
.operator-card small { margin-top: 3px; color: var(--body); font-size: .68rem; text-transform: capitalize; }
main { width: min(1440px, 100%); padding: 42px clamp(24px, 4vw, 64px) 70px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 34px; }
.date, .section-label { margin: 0 0 9px; color: var(--blue); font-size: .69rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; }
.topbar h1 { margin: 0; color: var(--navy); font-size: clamp(2.2rem, 4vw, 3.6rem); line-height: 1; letter-spacing: -.055em; font-weight: 620; }
.topbar h1 span { color: var(--slate); }
.topbar > div > p:last-child { margin: 13px 0 0; color: var(--body); }
.quick-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 20px; }
.quick-actions button { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--navy); font-size: .78rem; font-weight: 600; }
.quick-actions button:disabled { color: #6f8298; cursor: not-allowed; opacity: .72; }
.attention { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-top: 36px; padding: 26px 28px; border-radius: var(--radius); background: var(--navy); color: var(--white); box-shadow: var(--shadow); }
.attention > div { min-width: 0; }
.operations-summary { flex: 1 1 260px; }
.attention .section-label { color: #aac3dc; }
.attention h2 { margin: 0; font-size: clamp(1.25rem, 2.2vw, 1.8rem); letter-spacing: -.025em; font-weight: 620; }
.attention p:last-child { margin: 8px 0 0; color: #cbdbea; font-size: .88rem; }
.operations-metrics { display: grid; grid-template-columns: repeat(5, minmax(82px, 1fr)); flex: 1 1 660px; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 13px; background: rgba(255,255,255,.08); }
.operations-metrics a { min-width: 0; padding: 14px 12px; border-left: 1px solid rgba(255,255,255,.12); color: var(--white); text-decoration: none; transition: background-color 150ms ease; }
.operations-metrics a:first-child { border-left: 0; }
.operations-metrics a:hover, .operations-metrics a:focus-visible { background: rgba(255,255,255,.12); }
.operations-metrics strong, .operations-metrics span { display: block; }
.operations-metrics strong { font-size: 1.45rem; font-weight: 600; line-height: 1; }
.operations-metrics span { margin-top: 8px; color: #cbdbea; font-size: .67rem; line-height: 1.25; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; margin-top: 17px; }
.panel { min-height: 300px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 12px 34px rgba(7, 26, 58, .045); }
.panel-wide { grid-column: span 2; }
.panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.panel h2 { margin: 0; color: var(--navy); font-size: 1.3rem; letter-spacing: -.025em; }
.count { display: grid; place-items: center; min-width: 32px; height: 28px; padding-inline: 8px; border-radius: 999px; background: var(--mist); color: var(--blue); font-size: .75rem; font-weight: 650; }
.alert-count:not(:empty) { background: #fff3df; color: #8a5513; }
.work-list { display: grid; }
.work-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 17px 0; border-bottom: 1px solid #edf1f5; }
.work-item:last-child { border-bottom: 0; }
.work-item strong { display: block; color: var(--ink); font-size: .9rem; }
.work-item p { margin: 5px 0 0; color: var(--body); font-size: .76rem; line-height: 1.45; }
.chip { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: var(--mist); color: var(--blue); font-size: .66rem; font-weight: 650; text-transform: capitalize; }
.panel h2, .context-card h3, .context-card p strong, .row-title strong, .work-item strong { font-weight: 600; }
.chip.urgent, .chip.expired, .chip.overdue { background: #fff0ed; color: #a43a2b; }
.timeline { padding-top: 7px; }
.timeline .work-item { grid-template-columns: 12px minmax(0, 1fr) auto; }
.timeline-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--mist); }
.empty { margin: 0; padding: 38px 8px; color: var(--body); text-align: center; font-size: .84rem; }
.empty-state { display: grid; justify-items: center; gap: 10px; padding: 54px 20px; text-align: center; }
.empty-state strong { color: var(--navy); font-size: 1rem; font-weight: 600; }
.empty-state p { max-width: 48ch; margin: 0 0 6px; color: var(--body); font-size: .8rem; line-height: 1.55; }
.status-message { min-height: 24px; margin-top: 16px; color: #8a291e; font-size: .85rem; }
.menu-button { display: none; }
.view { display: none; }
.view.active { display: block; }
.table-panel { margin-top: 36px; min-height: 520px; }
.record-list { display: grid; }
.record-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 20px 0; border-bottom: 1px solid #edf1f5; }
.record-row:last-child { border-bottom: 0; }
.row-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.record-row strong { color: var(--navy); font-size: .95rem; }
.record-row p, .record-row small { display: block; margin: 6px 0 0; color: var(--body); font-size: .78rem; line-height: 1.45; }
.record-row small { color: #748aa2; }
.row-action, .primary-button, .dialog-actions button { min-height: 42px; padding: 0 15px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--navy); font-size: .76rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.row-actions .row-action { min-height: 36px; padding-inline: 10px; }
.quiet-action { color: var(--body); }
.primary-button { border-color: var(--navy); background: var(--navy); color: var(--white); }
.compact-button { min-height: 40px; padding-inline: 17px; }
.prospect-directory { padding: 0; overflow: hidden; }
.prospect-directory > header { align-items: center; padding: 24px 26px 20px; }
.prospect-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 15px 26px; border-bottom: 1px solid var(--line); background: #f9fbfd; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-tabs button { min-height: 34px; padding: 0 11px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--body); font-size: .72rem; font-weight: 580; cursor: pointer; }
.filter-tabs button:hover { color: var(--navy); background: var(--white); }
.filter-tabs button.active { border-color: #cdddea; background: var(--white); color: var(--navy); box-shadow: 0 4px 13px rgba(7,26,58,.06); }
.filter-tabs span { margin-left: 4px; color: var(--slate); font-variant-numeric: tabular-nums; }
.prospect-table-wrap { overflow-x: auto; }
.prospect-table { width: 100%; min-width: 860px; border-collapse: collapse; table-layout: fixed; }
.prospect-table th { padding: 12px 10px; border-bottom: 1px solid var(--line); background: var(--white); color: #6a8199; font-size: .63rem; font-weight: 650; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.prospect-table th:first-child, .prospect-table td:first-child { padding-left: 20px; width: 21%; }
.prospect-table th:nth-child(2) { width: 18%; }
.prospect-table th:nth-child(3) { width: 11%; }
.prospect-table th:nth-child(4), .prospect-table th:nth-child(5) { width: 15%; }
.prospect-table th:nth-child(6) { width: 10%; }
.prospect-table th:last-child, .prospect-table td:last-child { width: 10%; padding-right: 20px; text-align: right; }
.prospect-table td { padding: 18px 10px; border-bottom: 1px solid #edf1f5; color: var(--body); font-size: .76rem; line-height: 1.4; vertical-align: middle; overflow-wrap: anywhere; }
.prospect-table tbody tr { transition: background-color 150ms ease; }
.prospect-table tbody tr:hover { background: #f9fbfd; }
.prospect-table tbody tr:last-child td { border-bottom: 0; }
.prospect-primary strong, .cell-title { display: block; color: var(--navy); font-size: .82rem; font-weight: 600; }
.prospect-primary > span, .cell-note { display: block; margin-top: 5px; color: #748aa2; font-size: .69rem; line-height: 1.4; }
.prospect-links { display: flex; gap: 10px; margin-top: 8px; }
.prospect-links a, .phone-link { color: var(--blue); font-weight: 600; text-decoration: none; }
.prospect-links a:hover, .phone-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.prospect-table .row-action { min-height: 36px; padding-inline: 10px; white-space: nowrap; }
.chip.ready_to_call { background: #e9f2fb; color: #245b88; }
.chip.contacted { background: #edf5ef; color: #316448; }
.chip.researching { background: #f3f0fb; color: #65518d; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(430px, 1.15fr); gap: 17px; margin-top: 36px; }
.workspace-grid .panel { min-height: 620px; }
.workspace-grid .order-intake { grid-column: 1 / -1; min-height: auto; }
.context-card { padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--mist); }
.context-card h3 { margin: 13px 0 8px; color: var(--navy); font-size: 1.25rem; }
.context-card p, .context-card small { color: var(--body); font-size: .82rem; line-height: 1.55; }
.context-card p a { color: var(--blue); font-weight: 600; text-decoration: none; }
.context-card p a:hover { text-decoration: underline; text-underline-offset: 3px; }
.context-card dl { display: grid; gap: 14px; margin: 22px 0 0; }
.context-card dl div { padding-top: 13px; border-top: 1px solid #d3e0eb; }
.context-card dt { color: var(--blue); font-size: .65rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.context-card dd { margin: 5px 0 0; color: var(--ink); font-size: .82rem; line-height: 1.5; }
.call-guidance { margin-top: 24px; }
.call-guidance ol { display: grid; gap: 9px; margin: 14px 0 0; padding-left: 20px; color: var(--body); font-size: .78rem; line-height: 1.45; }
.guidance-positioning { margin-top: 14px; padding: 15px 16px; border: 1px solid #cbddea; border-radius: 12px; background: #f5f9fc; }
.guidance-positioning strong, .guidance-branches strong { color: var(--navy); font-size: .78rem; font-weight: 600; }
.guidance-positioning p, .guidance-branches p { margin: 6px 0 0; color: var(--body); font-size: .75rem; line-height: 1.5; }
.guidance-branches { display: grid; gap: 9px; margin-top: 15px; }
.guidance-branches article { padding: 13px 14px; border-left: 3px solid var(--slate); background: var(--mist); }
.acquisition-item { align-items: flex-start; }
.acquisition-item small { display: block; margin-top: 8px; color: #748aa2; font-size: .68rem; line-height: 1.45; }
.acquisition-item small a { color: var(--blue); font-weight: 600; text-decoration: none; }
.chip.verified { background: #eaf6ef; color: #28623f; }
.action-form { display: grid; align-content: start; gap: 17px; }
.action-form label, dialog label { display: grid; gap: 7px; color: var(--navy); font-size: .77rem; font-weight: 600; }
.action-form .check-label { grid-template-columns: 18px 1fr; align-items: center; }
.action-form .check-label input { width: 18px; min-height: 18px; margin: 0; }
.field-guidance { margin: -8px 0 0; color: var(--body); font-size: .72rem; line-height: 1.5; }
.action-form input, .action-form select, .action-form textarea, dialog select { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #cbd9e6; border-radius: 9px; background: var(--white); color: var(--ink); font: inherit; }
.action-form textarea { min-height: 100px; resize: vertical; }
.field-pair { display: grid; grid-template-columns: 1fr .55fr; gap: 12px; }
.form-divider { display: flex; align-items: center; gap: 12px; color: var(--blue); font-size: .68rem; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.form-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.form-message { min-height: 20px; margin: 0; color: #8a291e; font-size: .76rem; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--blue); font: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.placeholder-panel { margin-top: 36px; min-height: 300px; }
.placeholder-panel > p:last-of-type { max-width: 65ch; color: var(--body); line-height: 1.65; }
.mobile-nav { display: none; }
dialog { width: min(520px, calc(100% - 30px)); padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 30px 90px rgba(7, 26, 58, .25); }
dialog::backdrop { background: rgba(7, 26, 58, .46); }
.drawer-dialog { width: min(580px, 100%); max-width: none; height: 100dvh; max-height: none; margin: 0 0 0 auto; border-radius: var(--radius) 0 0 var(--radius); }
.drawer-dialog[open] { animation: drawer-in 180ms ease-out; }
.drawer-dialog .dialog-card { min-height: 100%; padding: 30px; overflow-y: auto; }
.dialog-card { display: grid; gap: 20px; padding: 25px; }
.dialog-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dialog-card h2 { margin: 0; color: var(--navy); }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--navy); font-size: 1.2rem; cursor: pointer; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.chip.blocking { background: #fff0ed; color: #a43a2b; }
.chip.warning { background: #fff3df; color: #8a5513; }

@keyframes drawer-in { from { transform: translateX(24px); opacity: .7; } to { transform: translateX(0); opacity: 1; } }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 86px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .ops-brand { justify-content: center; padding-inline: 0; }
  .ops-brand span, .sidebar nav a:not(.active)::first-letter, .sidebar nav span, .operator-card > span:last-child { display: none; }
  .sidebar nav a { justify-content: center; padding-inline: 6px; font-size: .7rem; text-align: center; }
  .operator-card { justify-content: center; padding-inline: 0; }
  .topbar { display: grid; }
  .quick-actions { justify-content: flex-start; padding-top: 0; }
  .attention { align-items: stretch; flex-direction: column; }
  .operations-summary, .operations-metrics { flex-basis: auto; }
  .workspace-grid { grid-template-columns: 1fr; }
  .workspace-grid .panel { min-height: auto; }
  .workspace-grid .order-intake { grid-column: auto; }
}

@media (max-width: 700px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .ops-brand { justify-content: flex-start; padding: 0; }
  .ops-brand span { display: block; }
  .sidebar nav, .operator-card { display: none; }
  main { padding: 30px 16px calc(94px + env(safe-area-inset-bottom)); }
  .topbar h1 { font-size: 2.35rem; }
  .quick-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .panel-wide { grid-column: auto; }
  .attention { padding: 24px 20px; }
  .operations-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operations-metrics a { border-top: 1px solid rgba(255,255,255,.12); }
  .operations-metrics a:nth-child(odd) { border-left: 0; }
  .operations-metrics a:nth-child(-n+2) { border-top: 0; }
  .operations-metrics a:last-child { grid-column: span 2; }
  .panel { min-width: 0; }
  .panel { padding: 20px; }
  .record-row { grid-template-columns: 1fr; gap: 12px; }
  .row-action { width: 100%; }
  .row-actions { justify-content: stretch; }
  .row-actions .row-action { width: auto; flex: 1; }
  .field-pair { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; z-index: 50; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); left: 10px; display: grid; grid-template-columns: repeat(5, 1fr); min-height: 58px; padding: 5px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.96); box-shadow: 0 18px 55px rgba(7,26,58,.18); backdrop-filter: blur(14px); }
  .mobile-nav a { display: grid; place-items: center; border-radius: 11px; color: var(--body); font-size: .62rem; font-weight: 600; text-decoration: none; }
  .mobile-nav a.active { background: var(--mist); color: var(--navy); }
  .quick-actions button { min-height: 44px; }
  dialog { margin-bottom: calc(15px + env(safe-area-inset-bottom)); }
  .prospect-directory > header { align-items: flex-start; padding: 20px; }
  .prospect-toolbar { padding: 12px 16px; overflow-x: auto; scrollbar-width: none; }
  .prospect-toolbar::-webkit-scrollbar { display: none; }
  .filter-tabs { flex-wrap: nowrap; }
  .filter-tabs button { white-space: nowrap; }
  .prospect-table-wrap { overflow: visible; padding: 12px; }
  .prospect-table { min-width: 0; }
  .prospect-table thead { display: none; }
  .prospect-table, .prospect-table tbody, .prospect-table tr, .prospect-table td { display: block; width: 100%; }
  .prospect-table tbody { display: grid; gap: 10px; }
  .prospect-table tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 12px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: 0 8px 22px rgba(7,26,58,.04); }
  .prospect-table td, .prospect-table td:first-child, .prospect-table td:last-child { width: auto; padding: 0; border: 0; text-align: left; }
  .prospect-table td::before { display: block; margin-bottom: 5px; color: #7a8fa5; content: attr(data-label); font-size: .58rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
  .prospect-table .prospect-primary, .prospect-table .prospect-action { grid-column: 1 / -1; }
  .prospect-table .prospect-primary::before, .prospect-table .prospect-action::before { display: none; }
  .prospect-table .prospect-primary { padding-bottom: 13px; border-bottom: 1px solid #edf1f5; }
  .prospect-table .prospect-primary strong { font-size: .96rem; }
  .prospect-table .prospect-action .row-action { width: 100%; }
  .drawer-dialog { width: 100%; height: calc(100dvh - 12px); margin-top: 12px; border-radius: 18px 18px 0 0; }
  .drawer-dialog .dialog-card { padding: 22px 18px calc(32px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
