:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #212121;
  --secondary: #666666;
  --muted: #707070;
  --line: #e7e7e7;
  --soft: #f7f7f7;
  --black: #212121;
  --accent: #171717;
  --selection: #f5f5f5;
  --status-ink: #525252;
  --notice-ink: #404040;
  --notice-bg: #f5f5f5;
  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow: 0 12px 40px #2121211a;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --badge-new-bg: #f1edff;
  --badge-new-ink: #5b46a8;
  --badge-new-border: #e2d9fa;
  --badge-contacted-bg: #eaf6ed;
  --badge-contacted-ink: #21613d;
  --badge-contacted-border: #cce6d4;
}
* { box-sizing: border-box; }
body { padding-top: 56px; margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a, input, select, textarea { transition: background-color .15s, border-color .15s, color .15s; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #5a5a5a4d; outline-offset: 3px; }
input, textarea { caret-color: var(--accent); }
::selection { background: #e6e6e6; color: #3d3d3d; }
[hidden] { display: none !important; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.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; }
.skip-link { position: fixed; top: -80px; left: 20px; padding: 12px 20px; z-index: 100; background: var(--black); color: white; border-radius: 6px; }
.skip-link:focus { top: 12px; }
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 50; background: var(--surface); height: 56px; padding: 0 40px; border-bottom: 1px solid var(--line); align-items: center; display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; letter-spacing: -.3px; white-space: nowrap; justify-self: start; }
.topbar nav { display: flex; height: 100%; }
.tool-link { color: var(--accent); display: flex; align-items: center; position: relative; font-size: 13px; font-weight: 500; }
.tool-link::after { content: ''; position: absolute; height: 2px; bottom: -1px; left: 0; right: 0; background: var(--accent); }
.header-utilities { display: flex; align-items: center; gap: 20px; margin-left: auto; justify-self: end; }
.owner { font-size: 13px; padding-left: 20px; border-left: 1px solid var(--line); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 6px; border-radius: 5px; color: var(--secondary); flex-shrink: 0; }
.icon-button:hover:not(:disabled) { color: var(--ink); background: var(--soft); }
main { max-width: 1440px; margin: 0 auto; padding: 40px 40px 32px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 30px; }
.page-heading h1 { font-size: 27px; font-weight: 550; letter-spacing: -.7px; line-height: 1.25; margin: 0; }
.page-heading p { margin: 7px 0 0; font-size: 13px; color: var(--secondary); }
.heading-actions { display: flex; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 13px; border: 1px solid #dcdcdc; border-radius: 6px; background: white; font-size: 13px; font-weight: 500; line-height: 1.4; white-space: nowrap; }
.button .icon { width: 16px; height: 16px; }
.button:hover:not(:disabled) { background: var(--soft); border-color: #c8c8c8; }
.button.primary { background: var(--accent); color: white; border-color: var(--accent); }
.button.primary:hover:not(:disabled) { background: #474747; border-color: #474747; }
.button.primary:disabled { opacity: 1; background: #eeeeee; border-color: #eeeeee; color: #7b7b7b; }
.leads-surface { width: 100%; }
.filter-toolbar { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.search-field { display: flex; align-items: center; gap: 9px; min-width: 210px; height: 38px; flex: 1; padding: 0 11px; border: 1px solid #dcdcdc; border-radius: 6px; }
.search-field > .icon { color: var(--secondary); width: 16px; height: 16px; }
.search-field:focus-within { border-color: var(--accent); outline: 2px solid #5a5a5a26; outline-offset: 1px; }
.search-field input { min-width: 0; width: 100%; height: 100%; border: 0; background: none; font-size: 13px; outline: none; }
.search-field input:focus-visible { outline: none; }
.search-field input::placeholder { color: var(--secondary); }
kbd { font-family: inherit; }
.search-field kbd { font-size: 12px; color: var(--muted); }
.filter-group { display: flex; gap: 8px; }
.select-wrap { position: relative; display: flex; align-items: center; }
.select-wrap select { appearance: none; max-width: 205px; height: 38px; padding: 0 31px 0 12px; border: 1px solid #dcdcdc; border-radius: 6px; background: white; cursor: pointer; font-size: 13px; }
.select-wrap select:hover { background: var(--soft); }
.select-wrap select.filter-active { color: var(--accent); border-color: #c7c7c7; background: var(--selection); }
.select-chevron { position: absolute; right: 10px; width: 13px; height: 13px; pointer-events: none; color: var(--secondary); }
.text-button { padding: 0; font-size: 12px; color: var(--secondary); text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--ink); }
input[type=checkbox] { appearance: none; position: relative; display: block; width: 15px; height: 15px; border: 1px solid #c1c1c1; border-radius: 3px; margin: 0; background: white; flex-shrink: 0; cursor: pointer; }
input[type=checkbox]:checked, input[type=checkbox]:indeterminate { background: var(--black); border-color: var(--black); }
input[type=checkbox]:checked::after { content: ''; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid white; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
input[type=checkbox]:indeterminate::after { content: ''; position: absolute; width: 7px; height: 1px; top: 6px; left: 3px; background: white; transform: none; border: 0; }
input[type=checkbox]:disabled { cursor: not-allowed; opacity: .4; background: var(--soft); }
.mobile-table-tools { display: none; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; }
th { padding: 11px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--secondary); }
th.company-th { width: 29%; }
th:nth-child(3) { width: 27%; }
th:nth-child(4) { width: 8%; }
th:nth-child(5) { width: 20%; }
th:nth-child(6) { width: 13%; }
.check-cell { width: 36px; padding-left: 0; padding-right: 12px; }
.sort-button { display: inline-flex; align-items: center; gap: 6px; padding: 0; color: inherit; font: inherit; }
.sort-button .icon { width: 14px; height: 14px; stroke-width: 1.5; flex: 0 0 14px; display: block; overflow: hidden; }
td { height: 80px; padding: 17px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { transition: background-color .15s; }
tbody tr:hover { background: #fbfbfb; }
tbody tr.selected { background: var(--selection); }
tbody tr.selected:hover { background: #f2f2f2; }
.company-cell, .company-text { min-width: 0; }
.company-name { display: block; max-width: 100%; padding: 0; font-size: 14px; font-weight: 500; letter-spacing: -.15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.company-name:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.company-address { display: block; margin-top: 5px; font-size: 12px; color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-email { display: block; max-width: 100%; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.contact-email:hover, .contact-phone:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.contact-phone { display: block; font-size: 12px; color: var(--secondary); margin-top: 5px; white-space: nowrap; }
.missing-email { color: var(--secondary); font-size: 13px; }
.fleet-count { font-size: 14px; font-variant-numeric: tabular-nums; }
.cargo-text { font-size: 12px; color: var(--secondary); overflow-wrap: anywhere; line-height: 1.6; }
.status { padding: 4px 8px; border-radius: 5px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; white-space: nowrap; }
.status-new {
  background: var(--badge-new-bg);
  color: var(--badge-new-ink);
  border: 1px solid var(--badge-new-border); }
.status-contacted {
  background: var(--badge-contacted-bg);
  color: var(--badge-contacted-ink);
  border: 1px solid var(--badge-contacted-border); }
.status-contacted > .icon { width: 13px; height: 13px; color: var(--status-ink); }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; font-size: 12px; color: var(--secondary); }
.pagination { display: flex; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; }
.pagination .icon-button { width: 28px; height: 28px; border: 1px solid var(--line); }
.pagination .icon { width: 13px; height: 13px; }
.reverse { transform: rotate(180deg); }
.empty-state { text-align: center; padding: 50px 20px; border-bottom: 1px solid var(--line); }
.empty-icon { display: block; color: var(--secondary); }
.empty-state h2 { margin: 12px 0 7px; font-size: 18px; font-weight: 500; letter-spacing: -.3px; }
.empty-state p { color: var(--secondary); margin: 0 0 20px; font-size: 13px; }
body:has(dialog[open]) { overflow: hidden; }
dialog { padding: 0; border: 0; background: white; color: var(--ink); max-height: calc(100dvh - 48px); box-shadow: var(--shadow); }
dialog::backdrop { background: #2121214d; }
.dialog-shell { display: flex; flex-direction: column; max-height: inherit; }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 24px 28px; border-bottom: 1px solid var(--line); }
.dialog-header > span { font-size: 13px; color: var(--secondary); padding-top: 5px; }
.dialog-header h2 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.5px; }
.dialog-header p { color: var(--secondary); font-size: 13px; margin: 5px 0 0; }
.dialog-header .icon-button { margin: -3px -6px 0 0; }
.dialog-body { padding: 28px; overflow-y: auto; }
.dialog-footer { display: flex; align-items: center; gap: 10px; padding: 18px 28px; border-top: 1px solid var(--line); background: white; }
.side-dialog { width: 440px; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: 12px 0 0 12px; }
.side-dialog .dialog-shell { height: 100%; }
.side-dialog .dialog-body { flex: 1; }
.side-dialog .dialog-footer > .button { flex: 1; }
.detail-identity { margin-bottom: 26px; }
.detail-identity h2 { margin: 0 0 9px; font-size: 23px; font-weight: 500; letter-spacing: -.5px; line-height: 1.3; }
.detail-section { padding: 23px 0; border-top: 1px solid var(--line); }
.detail-section h3 { margin: 0 0 16px; font-size: 13px; font-weight: 500; }
.detail-list { display: grid; grid-template-columns: 110px 1fr; gap: 15px 8px; margin: 0; font-size: 13px; }
.detail-list dt { color: var(--secondary); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.detail-list a { color: var(--accent); }
.cargo-list { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.cargo-tag { font-size: 12px; color: var(--secondary); }
.detail-disclaimer { font-size: 12px; line-height: 1.7; color: var(--secondary); margin: 15px 0 0; }
.detail-note { font-size: 13px; line-height: 1.7; color: var(--secondary); }
.email-dialog { width: 850px; max-width: calc(100vw - 40px); border-radius: 12px; }
.composer-layout { display: grid; grid-template-columns: 245px 1fr; min-height: 0; overflow-y: auto; }
.recipient-panel { padding: 24px 22px; border-right: 1px solid var(--line); background: #fbfbfb; }
.recipient-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 18px; }
.recipient-heading h3 { font-size: 13px; font-weight: 500; margin: 0; }
.recipient-heading h3 span { color: var(--secondary); margin-left: 5px; font-size: 12px; }
.recipient-heading .text-button { font-size: 12px; }
.recipient-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.recipient-item strong { display: block; font-size: 13px; font-weight: 500; }
.recipient-item > .recipient-email { display: block; margin-top: 4px; color: var(--secondary); font-size: 12px; overflow-wrap: anywhere; }
.compose-fields { padding: 24px 28px; }
.demo-notice { display: flex; align-items: flex-start; gap: 8px; padding: 11px 12px; margin-bottom: 24px; border-radius: 6px; background: var(--soft); color: var(--secondary); font-size: 12px; line-height: 1.6; }
.demo-notice .icon { width: 15px; height: 15px; margin-top: 2px; }
.field-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.form-input { width: 100%; padding: 11px 12px; border: 1px solid #dcdcdc; border-radius: 6px; background: white; font-size: 13px; line-height: 1.8; }
.message-label { margin: 20px 0 8px; }
.message-label .field-label { margin: 0; }
textarea.form-input { min-height: 220px; max-height: 500px; resize: vertical; }
.field-hint { color: var(--secondary); font-size: 12px; margin: 8px 0 0; line-height: 1.6; }
.compose-warning { padding: 12px; border-radius: 6px; background: var(--notice-bg); color: var(--notice-ink); font-size: 12px; line-height: 1.7; }
.email-preview { padding: 16px; margin-top: 16px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.email-footer > span { font-size: 12px; color: var(--secondary); margin-left: auto; }
.toast { position: fixed; bottom: 24px; right: 24px; z-index: 100; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 40px); padding: 12px 14px; border-radius: 8px; background: var(--black); color: white; box-shadow: var(--shadow); font-size: 13px; }
.toast > .icon { width: 16px; height: 16px; }
.toast .icon-button { color: #d5d5d5; }
.toast .icon-button:hover { color: white; background: #3e3e3e; }
@media (max-width: 1100px) {
  .topbar { padding: 0 28px; }
  main { padding: 32px 28px; }
  .filter-toolbar { flex-wrap: wrap; }
  .search-field { flex-basis: 100%; }
  .filter-group { width: 100%; }
  .filter-group .select-wrap { flex: 1; min-width: 0; }
  .filter-group select { width: 100%; max-width: none; }
  th.company-th { width: 28%; }
  th:nth-child(3) { width: 27%; }
  th:nth-child(5) { width: 19%; }
  th:nth-child(6) { width: 15%; }
}
@media (max-width: 760px) {
  .brand { font-size: 13px; gap: 8px; }
  .tool-link { font-size: 12px; }
  .header-utilities { gap: 8px; justify-self: end; }
  .owner { padding-left: 12px; font-size: 12px; }
  main { padding: 28px 20px 30px; }
  body.has-selection main { padding-bottom: 94px; }
  .page-heading { align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
  .page-heading h1 { font-size: 25px; }
  .page-heading p { font-size: 12px; margin-top: 5px; }
  .heading-actions { gap: 8px; }
  .heading-actions .button { font-size: 12px; min-height: 36px; padding: 8px 10px; }
  body.has-selection #compose-button { position: fixed; bottom: max(16px, env(safe-area-inset-bottom)); left: 20px; right: 20px; z-index: 40; min-height: 46px; box-shadow: 0 5px 22px #21212129; font-size: 14px; }
  .filter-toolbar { margin-top: 18px; gap: 8px; }
  .search-field { height: 40px; }
  .search-field kbd { display: none; }
  .filter-group { gap: 7px; }
  .select-wrap select { font-size: 12px; padding-left: 9px; padding-right: 24px; }
  .select-chevron { width: 12px; right: 8px; }
  .mobile-table-tools { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 0 0 14px; }
  .select-page-label { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--secondary); cursor: pointer; }
  .mobile-table-tools .select-wrap select { height: 32px; font-size: 12px; }
  .table-scroll { overflow: visible; }
  table, tbody { display: block; }
  thead { display: none; }
  tbody tr { display: grid; grid-template-columns: 20px minmax(0,1fr) 88px; gap: 0 10px; padding: 19px 0; border-top: 1px solid var(--line); }
  tbody tr:last-child { border-bottom: 1px solid var(--line); }
  td { display: block; height: auto; padding: 0; border: 0; }
  .check-cell { width: auto; grid-column: 1; grid-row: 1 / span 3; padding: 3px 0 0; }
  .company-td { grid-column: 2; grid-row: 1; min-width: 0; }
  .company-name { font-size: 14px; white-space: normal; line-height: 1.5; }
  .company-address { font-size: 12px; white-space: normal; line-height: 1.6; }
  .contact-td { grid-column: 2; grid-row: 2; padding-top: 12px; min-width: 0; }
  .contact-email { font-size: 12px; }
  .contact-phone { font-size: 12px; }
  .fleet-td { grid-column: 3; grid-row: 2; padding-top: 12px; text-align: right; }
  .fleet-count { font-size: 14px; }
  .fleet-count::after { content: ' trucks'; color: var(--secondary); font-size: 11px; }
  .cargo-td { grid-column: 2 / span 2; grid-row: 3; padding-top: 12px; }
  .cargo-text { font-size: 12px; }
  .outreach-td { grid-column: 3; grid-row: 1; justify-self: end; padding-top: 2px; }
  .status { font-size: 11px; }
  .status .icon { width: 11px; height: 11px; }
  .table-footer { font-size: 11px; gap: 8px; }
  .pagination { gap: 9px; }
  .side-dialog { width: 100%; border-radius: 0; }
  .dialog-header, .dialog-body { padding: 22px; }
  .dialog-footer { padding: 16px 22px; }
  .email-dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
  .email-dialog .dialog-shell { height: 100%; }
  .composer-layout { display: flex; flex: 1; flex-direction: column; }
  .recipient-panel { padding: 16px 22px; border-right: 0; border-bottom: 1px solid var(--line); }
  .recipient-heading { margin: 0; }
  #recipient-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 140px; overflow-y: auto; margin-top: 10px; }
  .recipient-item { padding: 6px 0; width: 100%; }
  .recipient-item strong { font-size: 12px; }
  .recipient-item > .recipient-email { font-size: 11px; }
  .compose-fields { padding: 20px 22px; }
  .email-footer { gap: 8px; padding: 15px 20px; }
  .email-footer > span { display: none; }
  .email-footer > .primary { margin-left: auto; }
  .email-footer .button { font-size: 12px; }
  .toast { bottom: 18px; left: 16px; right: 16px; max-width: none; font-size: 12px; }
  .toast .icon-button { margin-left: auto; }
}
@media (max-width: 480px) {
  .page-heading { flex-direction: column; gap: 18px; }
  .heading-actions { align-self: stretch; }
  .heading-actions > .primary { margin-left: auto; }
  body.has-selection #results-count { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* The wordmark and controls share one neutral visual language. */
.wordmark { font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 21px; font-weight: 800; letter-spacing: -.7px; line-height: 1; }
.wordmark > span { margin-left: 7px; font-size: 14px; font-weight: 500; letter-spacing: -.2px; }
.topbar nav { align-items: center; justify-content: center; }
.tool-link { height: 100%; }
.filter-toolbar { margin-top: 0; }
.custom-select-ready > select, .custom-select-ready > .select-chevron { display: none; }
.select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 38px; padding: 0 12px; border: 1px solid #dedede; border-radius: 6px; background: #fff; font-size: 13px; white-space: nowrap; }
.select-trigger > span { overflow: hidden; text-overflow: ellipsis; }
.select-trigger > .icon { width: 13px; height: 13px; color: #737373; transition: transform 160ms var(--ease); }
.select-trigger:hover { border-color: #b3b3b3; background: #fafafa; }
.select-trigger.filter-active { border-color: #a3a3a3; background: #f5f5f5; }
.select-trigger[aria-expanded="true"] { border-color: #737373; }
.select-trigger[aria-expanded="true"] > .icon { transform: rotate(180deg); }
.select-menu { position: fixed; inset: auto; margin: 0; padding: 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border: 1px solid #e5e5e5; border-radius: 8px; background: #fff; color: #171717; box-shadow: 0 8px 24px #00000012; }
.select-menu:popover-open { animation: menu-enter 140ms var(--ease); }
.select-option { display: flex; align-items: center; width: 100%; min-height: 34px; padding: 7px 28px 7px 10px; position: relative; border-radius: 4px; color: #404040; text-align: left; font-size: 13px; line-height: 1.5; }
.select-option:hover, .select-option:focus-visible { background: #f5f5f5; color: #171717; outline: none; }
.select-option[aria-selected="true"] { color: #171717; font-weight: 500; }
.select-option[aria-selected="true"]::after { content: ''; position: absolute; right: 12px; width: 4px; height: 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.dialog-shell, .side-dialog[open] { animation: panel-enter 180ms var(--ease); }
.toast:not([hidden]) { animation: menu-enter 160ms var(--ease); }
.button:active:not(:disabled) { transform: translateY(1px); }
@keyframes menu-enter { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: translateY(0); } }
@keyframes panel-enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 760px) {
  .filter-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .select-trigger { min-height: 40px; font-size: 12px; gap: 8px; }
  .select-option { min-height: 40px; }
  .wordmark { font-size: 19px; }
  .wordmark > span { font-size: 12px; }
  .mobile-table-tools .select-trigger { min-height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.filter-toolbar { margin-bottom: 18px; }

/* Fleet size is edited directly, with two accessible range handles. */
.fleet-range { min-width: 190px; margin: 0; padding: 5px 12px 7px; border: 1px solid #dedede; border-radius: 6px; }
.fleet-range legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.fleet-range-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 11px; line-height: 1.2; }
.fleet-range-heading > span { color: #666; }
.fleet-range-heading output { font-variant-numeric: tabular-nums; color: #171717; }
.fleet-range-track { position: relative; height: 16px; margin: 2px 5px 0; }
.fleet-range-track::before, #fleet-range-fill { content: ''; position: absolute; top: 7px; left: 0; right: 0; height: 2px; border-radius: 2px; background: #e5e5e5; }
#fleet-range-fill { background: #171717; }
.fleet-range-track input { appearance: none; position: absolute; inset: 0; width: 100%; height: 16px; margin: 0; background: transparent; pointer-events: none; }
.fleet-range-track input::-webkit-slider-thumb { appearance: none; height: 12px; width: 12px; border: 1.5px solid #171717; border-radius: 50%; background: #fff; cursor: ew-resize; pointer-events: auto; }
.fleet-range-track input::-moz-range-thumb { height: 10px; width: 10px; border: 1.5px solid #171717; border-radius: 50%; background: #fff; cursor: ew-resize; pointer-events: auto; }
.fleet-range-track input:focus-visible { outline: none; }
.fleet-range-track input:focus-visible::-webkit-slider-thumb { outline: 3px solid #a3a3a3; outline-offset: 3px; }
.fleet-range-track input:focus-visible::-moz-range-thumb { outline: 3px solid #a3a3a3; outline-offset: 3px; }
.multi-select-menu .select-option[aria-selected="true"] { background: #f3f3f3; }
.multi-select-menu .select-option + .select-option { margin-top: 2px; }
.status-contacted > .icon { color: inherit; }

/* Header and footer stay in place; each composer pane owns its scrolling. */
.email-dialog { width: 960px; height: min(820px, calc(100dvh - 48px)); }
.email-dialog .dialog-shell { height: 100%; max-height: 100%; overflow: hidden; animation: none; }
.email-dialog[open] { animation: panel-enter 180ms var(--ease); }
.email-dialog .dialog-header, .email-dialog .dialog-footer { flex-shrink: 0; }
.composer-layout { flex: 1; display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 0; overflow: hidden; }
.recipient-panel { min-height: 0; min-width: 0; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.recipient-heading { flex-shrink: 0; padding: 22px 22px 12px; margin: 0; }
#recipient-list { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 0 22px 22px; }
.compose-fields { min-height: 0; min-width: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.template-select { margin-bottom: 22px; }
.template-select select, .template-select .select-trigger { width: 100%; max-width: none; }
.preview-section { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.preview-section > h3 { margin: 0 0 12px; font-size: 13px; font-weight: 500; }
.email-preview { margin: 0; padding: 0; border: 0; border-radius: 0; white-space: normal; }
.preview-envelope { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 7px 10px; font-size: 12px; margin: 0 0 18px; }
.preview-envelope dt { color: #666; }
.preview-envelope dd { margin: 0; overflow-wrap: anywhere; }
.preview-message { font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.preview-helper { margin: 0; padding: 18px; color: #666; font-size: 13px; line-height: 1.7; border-radius: 6px; background: #fafafa; }
.email-footer { justify-content: flex-end; }
.email-footer > span { margin-left: 0; margin-right: auto; }
@media (max-width: 760px) {
  .fleet-range { min-width: 0; padding-top: 6px; padding-bottom: 8px; }
  .fleet-range-heading { font-size: 11px; }
  .email-dialog { width: 100%; height: 100dvh; max-height: 100dvh; }
  .composer-layout { display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(110px, 24%) minmax(0,1fr); }
  .recipient-panel { min-height: 0; padding: 0; }
  .recipient-heading { padding: 12px 22px 6px; }
  #recipient-list { display: block; margin: 0; max-height: none; padding: 0 22px 12px; }
  .recipient-item { padding: 8px 0; }
  .compose-fields { padding: 20px 22px; }
  .email-footer > span { display: block; font-size: 11px; }
}
@media (max-width: 760px) {
  .fleet-range-track { height: 24px; }
  .fleet-range-track::before, #fleet-range-fill { top: 11px; }
  .fleet-range-track input { height: 24px; }
  .fleet-range-track input::-webkit-slider-thumb { width: 20px; height: 20px; }
  .fleet-range-track input::-moz-range-thumb { width: 18px; height: 18px; }
}

/* Compact fleet trigger; the two handles stay in a top-layer panel. */
.fleet-filter { min-width: 130px; }
.fleet-popover { position: fixed; inset: auto; margin: 0; z-index: 70; padding: 0; border: 1px solid #e5e5e5; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px #00000012; }
.fleet-popover:popover-open { animation: menu-enter 140ms var(--ease); }
.fleet-popover .fleet-range { min-width: 0; width: 100%; padding: 18px 18px 22px; border: 0; }
.fleet-popover .fleet-range-heading { margin-bottom: 12px; font-size: 12px; }
.recipient-item .status { margin-top: 8px; }

/* A native modal drawer supplies focus trapping and outside dismissal. */
.navigation-toggle, .composer-tabs { display: none; }
.mobile-navigation { position: fixed; inset: 0 auto 0 0; width: min(300px, calc(100vw - 44px)); max-width: none; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; padding: 0; }
.mobile-navigation[open] { display: flex; flex-direction: column; animation: drawer-enter 180ms var(--ease); }
.drawer-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px; border-bottom: 1px solid var(--line); }
.mobile-navigation nav { padding: 16px 12px; }
.drawer-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: 6px; font-size: 14px; font-weight: 500; background: #f5f5f5; }
.drawer-link:hover { background: #ebebeb; }
.drawer-link .icon { width: 17px; height: 17px; }
.drawer-owner { display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding: 22px 24px max(24px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 12px; color: var(--secondary); }
.drawer-owner strong { font-size: 13px; color: var(--ink); font-weight: 500; }
@keyframes drawer-enter { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
@media (max-width: 1100px) {
  .filter-group > .fleet-filter { flex: 1; min-width: 0; }
}
@media (max-width: 760px) {
  body { padding-top: 52px; }
  .topbar { height: 52px; grid-template-columns: 40px minmax(0,1fr) 40px; grid-template-rows: 1fr; gap: 8px; padding: 0 12px; }
  .topbar .navigation-toggle { display: inline-flex; grid-column: 1; grid-row: 1; width: 40px; height: 40px; }
  .topbar .brand { grid-column: 2; grid-row: 1; justify-self: center; }
  .topbar nav, .topbar .header-utilities { display: none; }
  .fleet-filter { min-width: 0; }
  .composer-tabs { flex-shrink: 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 0 22px; gap: 24px; border-bottom: 1px solid var(--line); }
  .composer-tabs button { position: relative; min-height: 46px; padding: 10px 4px; color: #666; font-size: 13px; }
  .composer-tabs button[aria-selected="true"] { color: #171717; font-weight: 500; }
  .composer-tabs button[aria-selected="true"]::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: #171717; }
  .composer-layout { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr); }
  .composer-layout > .recipient-panel { border: 0; }
  .recipient-heading { padding-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-navigation[open], .fleet-popover:popover-open { animation: none; }
}

/* Login is a separate, quiet entry page. */
html[data-auth="pending"] body { visibility: hidden; }
body.login-page { padding: 0; }
.login-brand { height: 80px; padding: 28px 40px; }
.login-main { display: grid; place-items: center; min-height: calc(100dvh - 80px); width: 100%; max-width: none; margin: 0; padding: 28px 20px 100px; }
.login-panel { width: 360px; max-width: 100%; }
.login-panel h1 { margin: 0; font-size: 25px; font-weight: 550; letter-spacing: -.6px; line-height: 1.35; }
.login-panel > p { margin: 8px 0 30px; color: #666; font-size: 14px; }
.login-panel .form-input { height: 44px; }
.login-panel label[for="password"] { margin-top: 20px; }
.login-submit { width: 100%; min-height: 42px; margin-top: 24px; }
.login-error { margin: 14px 0 0; color: #404040; font-size: 13px; line-height: 1.6; }
.login-panel [aria-invalid="true"] { border-color: #525252; }
.logout-button { font-size: 12px; }
.drawer-owner .logout-button { align-self: flex-start; margin-top: 12px; }

/* Every page shares the same top-centered notification surface. */
.toast { top: 72px; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); width: max-content; max-width: min(560px, calc(100vw - 32px)); margin: 0; padding: 12px 14px; border: 1px solid #e5e5e5; background: #fff; color: #171717; box-shadow: 0 8px 28px #00000014; }
.toast .icon-button { color: #666; }
.toast .icon-button:hover { color: #171717; background: #f5f5f5; }
.toast:not([hidden]) { animation: notification-enter 180ms var(--ease); }
.login-page .toast { top: 20px; }
@keyframes notification-enter { from { opacity: 0; transform: translate(-50%,-4px); } to { opacity: 1; transform: translate(-50%,0); } }
.email-loading { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; border-radius: inherit; background: #fffffff2; text-align: center; }
.email-loading strong { font-size: 16px; font-weight: 500; }
.email-loading p { max-width: 30ch; margin: 0; color: #666; font-size: 13px; line-height: 1.7; }
.loading-spinner { width: 26px; height: 26px; border: 2px solid #dedede; border-top-color: #171717; border-radius: 50%; animation: loading-turn 800ms linear infinite; }
.email-dialog[aria-busy="true"] .dialog-shell { opacity: .35; }
.sort-button svg { opacity: .75; }
.sort-button:hover svg, th[aria-sort="ascending"] .sort-button svg, th[aria-sort="descending"] .sort-button svg { opacity: 1; }
@keyframes loading-turn { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .heading-actions { display: contents; }
  #compose-button { display: none; }
  body.has-selection #compose-button { display: inline-flex; }
  .toast { top: 64px; bottom: auto; left: 50%; right: auto; max-width: calc(100vw - 32px); }
  .login-brand { height: 72px; padding: 24px; }
  .login-main { min-height: calc(100dvh - 72px); padding-bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .loading-spinner, .toast:not([hidden]) { animation: none; }
}
