@import url("/static/css/design-system.css");

*{box-sizing:border-box;margin:0;padding:0}
/* Any class that sets `display` outbids the browser's own [hidden] rule, so hidden has to
   be made to win — otherwise an emptied .alert or panel still paints its background. */
[hidden]{display:none !important}
body{font-family:var(--font-sans);background:var(--bg);color:var(--fg);font-size:14px;-webkit-font-smoothing:antialiased}

header{background:var(--brand-darkest);color:var(--fg-on-dark);padding:22px 34px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:20px}
header img.logo{height:60px;width:auto;display:block}
header .brand-title{font-family:var(--font-display);font-weight:700;font-size:32px;letter-spacing:.01em;text-align:center}
header .meta{font-size:20px;color:var(--fg-on-dark-muted);justify-self:end}

nav{background:var(--brand-deep);display:flex;gap:2px;padding:0 24px;overflow-x:auto}
nav a{color:rgba(255,255,255,.7);padding:12px 16px;cursor:pointer;font-size:18px;font-weight:600;white-space:nowrap;border-bottom:3px solid transparent;transition:all .2s;text-decoration:none;display:inline-block}
nav a:hover{color:#fff}
nav a.active{color:#fff;border-bottom-color:var(--teal-300)}

.page{padding:24px;max-width:1600px;margin:0 auto}

.kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:var(--space-4);margin-bottom:var(--space-5)}
.kpi{background:var(--bg-elevated);border:1px solid var(--border);border-radius:var(--radius-md);padding:var(--space-5);box-shadow:var(--shadow-sm)}
.kpi .label{font-size:14px;color:var(--fg-muted);text-transform:uppercase;letter-spacing:.05em;margin-bottom:6px;font-weight:700}
.kpi .value{font-family:var(--font-sans);font-size:28px;font-weight:700;color:var(--brand)}
.kpi .note{font-size:14px;color:var(--fg-subtle);margin-top:4px}
.kpi.green .value{color:var(--success)}
.kpi.blue .value{color:var(--brand)}
.kpi.amber .value{color:var(--accent)}

.card{background:var(--bg-elevated);border:1px solid var(--border);border-radius:var(--radius-md);padding:var(--space-5);margin-bottom:var(--space-5);box-shadow:var(--shadow-sm)}
.card h3{font-family:var(--font-sans);font-size:16px;font-weight:700;margin-bottom:var(--space-4);color:var(--brand);border-bottom:2px solid var(--border);padding-bottom:8px}

table{width:100%;border-collapse:collapse;font-size:14px;font-family:var(--font-sans)}
th{background:var(--neutral-divider);text-align:left;padding:10px 12px;font-weight:700;color:var(--fg-muted);font-size:14px;text-transform:uppercase;letter-spacing:.05em;border-bottom:2px solid var(--border);white-space:nowrap}
td{padding:9px 12px;border-bottom:1px solid var(--border);vertical-align:middle}
tr:hover td{background:var(--bg-tinted)}

.badge{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border-radius:var(--radius-sm);font-size:14px;font-weight:700;font-family:var(--font-sans);letter-spacing:.02em}
.badge::before{content:"";width:6px;height:6px;border-radius:var(--radius-pill);background:currentColor;opacity:.7}
.badge.GO{background:var(--success-bg);color:var(--success)}
.badge.WATCH{background:var(--warning-bg);color:var(--warning)}
.badge.SKIP{background:var(--danger-bg);color:var(--danger)}
.badge.PENDING{background:var(--info-bg);color:var(--info)}
.badge.Hot{background:var(--danger-bg);color:var(--danger)}
.badge.Warm{background:var(--warning-bg);color:var(--warning)}
.badge.Cold{background:var(--info-bg);color:var(--info)}
.badge.Quoted{background:var(--info-bg);color:var(--info)}
.badge.Booked{background:var(--success-bg);color:var(--success)}
.badge.Expired{background:var(--danger-bg);color:var(--danger)}
.badge.Qualified{background:var(--success-bg);color:var(--success)}
.badge.Conditional{background:var(--warning-bg);color:var(--warning)}
.badge.Rejected{background:var(--danger-bg);color:var(--danger)}
.badge.NotStarted{background:var(--neutral-divider);color:var(--fg-subtle)}
/* Freight quote: a package created from a Product record carries the product's name. */
.badge.product{background:var(--bg-tinted);color:var(--brand)}
/* Products list: this product already has freight quoted. */
.badge.quote-count{background:var(--info-bg);color:var(--info);font-size:12px;padding:3px 8px}
/* Lead pipeline. The status wording has spaces, so the class is a slug of it —
   see STATUS_CLASS in leads.html. */
.badge.lead-new{background:var(--neutral-divider);color:var(--fg-muted)}
.badge.lead-interested{background:var(--warning-bg);color:var(--warning)}
.badge.lead-client{background:var(--success-bg);color:var(--success)}
.badge.lead-declined{background:var(--danger-bg);color:var(--danger)}
.badge.lead-new,.badge.lead-interested,.badge.lead-client,.badge.lead-declined{white-space:nowrap}

/* Status picked straight from a table row (Leads). Carries the same colour as the
   badge for the value it is showing, so the column still scans at a glance. */
.status-select{font:700 14px var(--font-sans);padding:6px 26px 6px 10px;border-radius:var(--radius-sm);
  border:1.5px solid transparent;cursor:pointer;min-height:34px;max-width:100%;
  appearance:none;-webkit-appearance:none;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath fill='%23000' fill-opacity='.55' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 9px center;background-size:9px}
.status-select:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px var(--teal-100)}
.status-select:disabled{opacity:.6;cursor:progress}
.status-select.lead-new{background-color:var(--neutral-divider);color:var(--fg-muted)}
.status-select.lead-interested{background-color:var(--warning-bg);color:var(--warning)}
.status-select.lead-client{background-color:var(--success-bg);color:var(--success)}
.status-select.lead-declined{background-color:var(--danger-bg);color:var(--danger)}
/* The menu itself is drawn by the OS, so its options need readable default colours. */
.status-select option{background:var(--bg-elevated);color:var(--fg);font-weight:600}

/* Client contract state */
.badge.Pending{background:var(--info-bg);color:var(--info)}
.badge.Active{background:var(--success-bg);color:var(--success)}
.badge.Suspended{background:var(--warning-bg);color:var(--warning)}
.badge.Ended{background:var(--neutral-divider);color:var(--fg-subtle)}

.toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:var(--space-4);gap:12px;flex-wrap:wrap}
.toolbar input[type=search]{padding:10px 14px;border:1.5px solid var(--neutral-mid);border-radius:var(--radius-md);font-size:14px;font-family:var(--font-sans);min-width:240px;background:var(--bg-elevated);min-height:44px}
.toolbar input[type=search]:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px var(--teal-100)}

.btn{font:600 14px/1 var(--font-sans);border:0;padding:11px 20px;border-radius:var(--radius-lg);cursor:pointer;min-height:44px;display:inline-flex;align-items:center;gap:8px;background:var(--brand);color:#fff;text-decoration:none}
.btn:hover{background:var(--brand-deep)}
.btn:focus-visible{box-shadow:var(--shadow-focus);outline:none}
.btn.secondary{background:transparent;color:var(--brand);border:2px solid var(--brand);padding:9px 18px}
.btn.secondary:hover{background:var(--bg-tinted)}
.btn.danger{background:transparent;color:var(--destructive);border:1.5px solid var(--destructive);padding:9px 18px}
.btn.danger:hover{background:var(--danger-bg)}
.btn.small{padding:7px 14px;font-size:14px;min-height:34px;border-radius:var(--radius-md)}
/* A disabled button has to look unavailable, not just refuse to click — the product
   form disables research when no API key is configured. */
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn:disabled:hover{background:var(--brand)}
.btn.secondary:disabled:hover{background:transparent}
.btn.danger:disabled:hover{background:transparent}
.btn.secondary.small{padding:6px 13px}

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

.empty-state{text-align:center;padding:60px 20px;color:var(--fg-subtle)}
.empty-state .icon{font-size:40px;margin-bottom:12px}

.modal-backdrop{position:fixed;inset:0;background:rgba(14,59,69,.55);display:none;align-items:flex-start;justify-content:center;padding:40px 16px;overflow-y:auto;z-index:1000}
.modal-backdrop.open{display:flex}
.modal{background:var(--bg-elevated);border-radius:var(--radius-xl);max-width:640px;width:100%;padding:var(--space-6);box-shadow:var(--shadow-lg)}
.modal h2{font-family:var(--font-sans);font-size:18px;font-weight:700;margin-bottom:var(--space-4);color:var(--brand)}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px 16px}
/* A block split into several grids (one per row) keeps the same rhythm between them. */
.form-grid + .form-grid{margin-top:14px}
.form-grid .full{grid-column:1/-1}
.form-field label{display:block;font-size:14px;font-weight:700;color:var(--fg-muted);text-transform:uppercase;letter-spacing:.04em;margin-bottom:6px}
.form-field input,.form-field select,.form-field textarea{width:100%;padding:11px 13px;border:1.5px solid var(--neutral-mid);border-radius:var(--radius-md);font-size:14px;font-family:var(--font-sans);background:var(--bg-elevated);min-height:44px}
.form-field textarea{resize:vertical;min-height:70px}
.form-field input:focus,.form-field select:focus,.form-field textarea:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px var(--teal-100)}
.form-field input:disabled{background:var(--neutral-divider);color:var(--fg-subtle)}
/* A checkbox label is a sentence, not a field name, so it opts out of the uppercase
   treatment the other labels get. */
.form-field label.checklist-item{display:flex;align-items:center;gap:10px;
  text-transform:none;letter-spacing:normal;font-weight:600;
  color:var(--fg);margin-bottom:0;font-size:14px;line-height:1.4}
.form-field input[type=checkbox]{width:18px;height:18px;min-height:0;flex:none;accent-color:var(--brand)}
/* Heading that breaks a long form (client registration) into named blocks. */
.form-section{grid-column:1/-1;font:700 14px var(--font-sans);text-transform:uppercase;letter-spacing:.05em;
  color:var(--brand);padding-bottom:6px;border-bottom:2px solid var(--border);margin-top:var(--space-3)}
.form-section:first-child{margin-top:0}

/* Top-level tabs splitting one page into two lists (Leads / Clients). */
.page-tabs{display:flex;gap:4px;border-bottom:2px solid var(--border);margin-bottom:var(--space-4)}
.page-tab{appearance:none;background:none;border:none;border-bottom:3px solid transparent;margin-bottom:-2px;
  padding:11px 18px;font-family:var(--font-sans);font-size:16px;font-weight:700;color:var(--fg-muted);cursor:pointer;
  display:inline-flex;align-items:center;gap:8px}
.page-tab:hover{color:var(--brand)}
.page-tab.active{color:var(--brand);border-bottom-color:var(--brand)}
.page-tab:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}
.tab-count{font-size:13px;font-weight:700;color:var(--fg-subtle);background:var(--bg-tinted);
  padding:2px 9px;border-radius:var(--radius-pill);min-width:26px;text-align:center}
.page-tab.active .tab-count{background:var(--teal-100);color:var(--brand)}

/* Filter bar above a crudPage table: per-column text filters plus one radio group. */
.filter-bar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px 16px;background:var(--bg-elevated);border:1px solid var(--border);border-radius:var(--radius-md);padding:14px 16px;margin-bottom:12px;box-shadow:var(--shadow-sm)}
/* Text filters take the first row, the radio group and controls the second. */
.filter-fields{display:flex;flex-wrap:wrap;gap:12px 14px;flex:1 1 100%}
.filter-field{display:flex;flex-direction:column;gap:4px;flex:1 1 150px;min-width:130px}
.filter-field label{font-size:14px;font-weight:700;color:var(--fg-muted);text-transform:uppercase;letter-spacing:.04em}
.filter-field input{width:100%;padding:8px 11px;border:1.5px solid var(--neutral-mid);border-radius:var(--radius-md);font-size:14px;font-family:var(--font-sans);background:var(--bg-elevated);min-height:38px}
.filter-field input:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px var(--teal-100)}
.filter-radios{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px}
.filter-radios-label{font-size:14px;font-weight:700;color:var(--fg-muted);text-transform:uppercase;letter-spacing:.04em}
.filter-radio{display:inline-flex;align-items:center;gap:6px;font-size:14px;cursor:pointer;white-space:nowrap}
.filter-radio input{min-height:0;margin:0;accent-color:var(--brand)}
.filter-count{margin-left:auto;white-space:nowrap}

/* Supplier traffic light shown in the products table and its filter radios.
   A traffic light needs three colours that can be told apart at a glance, which the
   brand palette does not give on its own — --danger and --orange-700 are the same
   value, so amber and red would be indistinguishable. These are the three status hues:
   a saturated dot to carry the signal, and a darker text tone that clears AAA on white.
   The dot is never the only cue — the word GREEN / AMBER / RED sits beside it, so the
   status still reads without colour vision. */
:root{
  --status-green:#3D5C1E; --status-green-dot:#6E922A;
  --status-amber:#7A4B00; --status-amber-dot:#E0A020;
  --status-red:#8E2318;   --status-red-dot:#C0392B;
}
.status-dot{display:inline-block;width:10px;height:10px;border-radius:50%;flex:none}
.status-dot.green{background:var(--status-green-dot)}
.status-dot.amber{background:var(--status-amber-dot)}
.status-dot.red{background:var(--status-red-dot)}
.status-light{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.status-light .status-text{font-weight:700;font-size:14px;text-transform:uppercase;letter-spacing:.04em}
.status-light.green .status-text{color:var(--status-green)}
.status-light.amber .status-text{color:var(--status-amber)}
.status-light.red .status-text{color:var(--status-red)}

/* Collapsible panel (<details>) — used for Product Radar under the products table. */
.accordion{background:var(--bg-elevated);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-sm);margin-bottom:var(--space-5);overflow:hidden}
.accordion>summary{list-style:none;cursor:pointer;padding:var(--space-4) var(--space-5);display:flex;align-items:center;gap:10px;font-family:var(--font-sans);font-size:16px;font-weight:700;color:var(--brand)}
.accordion>summary::-webkit-details-marker{display:none}
.accordion>summary:hover{background:var(--bg-tinted)}
.accordion>summary:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}
.accordion>summary .chevron{margin-left:auto;transition:transform .18s ease;color:var(--fg-subtle);font-size:14px}
.accordion[open]>summary .chevron{transform:rotate(180deg)}
.accordion>summary .accordion-sub{font-weight:400;font-size:14px;color:var(--fg-subtle);text-transform:none;letter-spacing:0}
.accordion-body{padding:var(--space-4) var(--space-5) var(--space-5);border-top:1px solid var(--border)}
/* "(required)" marker in a field label, and the state a required field is left in
   when a search is attempted without it. */
.form-field label .req{font-weight:400;text-transform:none;letter-spacing:0;color:var(--fg-subtle)}
.form-field input.field-missing{border-color:var(--danger);box-shadow:0 0 0 3px var(--danger-bg)}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:var(--space-5)}

.toast{position:fixed;bottom:24px;right:24px;background:var(--brand-darkest);color:#fff;padding:12px 18px;border-radius:var(--radius-md);font-size:14px;font-family:var(--font-sans);z-index:2000;opacity:0;transform:translateY(10px);transition:all .25s;box-shadow:var(--shadow-lg)}
.toast.show{opacity:1;transform:translateY(0)}
.toast.error{background:var(--destructive)}

.finder-result{display:flex;justify-content:space-between;align-items:center;padding:14px;border:1px solid var(--border);border-radius:var(--radius-md);margin-bottom:8px;background:var(--bg-elevated)}
.finder-result .fr-name{font-weight:700;font-size:14px;color:var(--brand)}
.finder-result .fr-meta{font-size:14px;color:var(--fg-muted);margin-top:2px}
.finder-result .fr-meta a{color:var(--link);font-weight:600;text-decoration:none;overflow-wrap:anywhere}
.finder-result .fr-meta a:hover{text-decoration:underline}

.section-heading{font-family:var(--font-sans);font-size:15px;font-weight:700;color:var(--brand);margin:var(--space-5) 0 var(--space-3);display:flex;align-items:center;gap:8px}
.section-heading:first-child{margin-top:0}
.section-count{font-size:14px;font-weight:700;color:var(--fg-subtle);background:var(--bg-tinted);padding:3px 10px;border-radius:var(--radius-pill)}

.broker-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:var(--space-4);margin-bottom:var(--space-2)}
@media (max-width:760px){.broker-grid{grid-template-columns:1fr}}

.broker-card{position:relative;background:var(--bg-elevated);border:1px solid var(--border);border-radius:var(--radius-lg);padding:var(--space-4) var(--space-4) var(--space-4) 22px;box-shadow:var(--shadow-sm);transition:box-shadow .18s ease,transform .18s ease;overflow:hidden}
.broker-card:hover{box-shadow:var(--shadow-lg);transform:translateY(-2px)}
.broker-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;background:var(--brand)}
.broker-card.side-cn::before{background:var(--warning)}
.broker-card.side-ie::before{background:var(--success)}
.broker-card.side-uk::before{background:var(--info)}
.broker-card.side-eu::before{background:var(--accent)}
.broker-card.side-advisor::before{background:var(--brand-deep)}
.broker-card.side-carrier::before{background:var(--info)}

.broker-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.broker-card .role-pill{display:inline-block;font-size:14px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--brand);background:var(--bg-tinted);padding:4px 10px;border-radius:var(--radius-pill);margin-bottom:6px}
.broker-card .company{font-size:16px;font-weight:700;color:var(--fg);line-height:1.3}
.broker-card .scope{font-size:14px;color:var(--fg-muted);line-height:1.55;margin-top:6px}
.broker-card .meta{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:14px;color:var(--fg-subtle);margin-top:10px}
.broker-card .contact{display:flex;flex-wrap:wrap;gap:4px 16px;margin-top:10px;padding-top:10px;border-top:1px solid var(--neutral-divider)}
.broker-card .contact-item{font-size:14px;color:var(--brand-deep);text-decoration:none;font-weight:600}
.broker-card .contact-item:hover{color:var(--brand);text-decoration:underline}
.broker-card-actions{display:flex;gap:8px;margin-top:14px}

.alert{display:flex;gap:12px;align-items:flex-start;padding:14px 16px;border-radius:var(--radius-md);border-left:4px solid;margin-bottom:12px;font-size:14px;line-height:1.5}
.alert b{font-weight:700}
.alert.blue,.alert.info{background:var(--info-bg);border-color:var(--brand);color:var(--info)}
.alert.green,.alert.success{background:var(--success-bg);border-color:var(--lime-800);color:var(--success)}
.alert.amber,.alert.warning{background:var(--warning-bg);border-color:var(--orange-600);color:var(--warning)}
.alert.red,.alert.danger{background:var(--danger-bg);border-color:var(--destructive);color:var(--destructive)}

code{background:var(--neutral-divider);padding:2px 7px;border-radius:var(--radius-sm);font-family:var(--font-mono);font-size:14px}

/* Qualification checklist */
.qual-modal{max-width:820px}
.qual-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:var(--space-4);flex-wrap:wrap}
.qual-dest-tabs{display:flex;gap:4px;background:var(--bg-tinted);border-radius:var(--radius-md);padding:4px}
.qual-dest-tabs button{font:600 14px var(--font-sans);padding:8px 16px;border:0;background:transparent;color:var(--brand-deep);border-radius:var(--radius-sm);cursor:pointer;min-height:36px}
.qual-dest-tabs button.active{background:var(--bg-elevated);box-shadow:var(--shadow-sm);color:var(--brand)}
.qual-status{font:700 14px var(--font-sans);padding:5px 12px;border-radius:var(--radius-pill)}
.qual-status.Qualified{background:var(--success-bg);color:var(--success)}
.qual-status.Conditional{background:var(--warning-bg);color:var(--warning)}
.qual-status.Rejected{background:var(--danger-bg);color:var(--danger)}
.qual-status.Pending{background:var(--info-bg);color:var(--info)}
.qual-intro{font-size:14px;color:var(--fg-muted);line-height:1.5;margin-bottom:var(--space-4);padding:12px 14px;background:var(--bg-tinted);border-radius:var(--radius-md)}
.qual-block{margin-bottom:var(--space-5)}
.qual-block h4{font:700 14px var(--font-sans);color:var(--brand);margin-bottom:10px;padding-bottom:6px;border-bottom:2px solid var(--border)}
.qual-row{display:grid;grid-template-columns:1fr 200px;gap:14px;align-items:start;padding:10px 0;border-bottom:1px solid var(--neutral-divider)}
.qual-row:last-child{border-bottom:none}
.qual-row .qc-text{font-size:14px;font-weight:600;color:var(--fg)}
.qual-row .qc-why{font-size:14px;color:var(--fg-subtle);margin-top:2px}
.qual-row .qc-notes{width:100%;margin-top:6px;padding:7px 9px;border:1px solid var(--border);border-radius:var(--radius-sm);font-size:14px;font-family:var(--font-sans)}
.qc-pills{display:flex;gap:6px;flex-wrap:wrap}
.qc-pill{font:600 14px var(--font-sans);padding:7px 12px;border-radius:var(--radius-pill);border:1.5px solid var(--border);background:var(--bg-elevated);color:var(--fg-muted);cursor:pointer}
.qc-pill.pass.selected{background:var(--success-bg);border-color:var(--success);color:var(--success)}
.qc-pill.fail.selected{background:var(--danger-bg);border-color:var(--destructive);color:var(--destructive)}
.qc-pill.na.selected{background:var(--neutral-divider);border-color:var(--border-strong);color:var(--fg-muted)}
.qual-readonly .qc-pills{display:none}

/* ── Freight: Get Quote ─────────────────────────────────────────────── */
.segmented{display:inline-flex;gap:4px;background:var(--bg-tinted);border-radius:var(--radius-md);padding:4px}
.segmented-option{font:600 14px var(--font-sans);padding:9px 20px;border:0;background:transparent;color:var(--brand-deep);border-radius:var(--radius-sm);cursor:pointer;min-height:36px}
.segmented-option.active{background:var(--bg-elevated);box-shadow:var(--shadow-sm);color:var(--brand)}

.quote-cols{display:grid;grid-template-columns:1fr auto 1fr;gap:20px;align-items:start}
.quote-col{display:flex;flex-direction:column;gap:14px}
.quote-col-label{font-size:14px;font-weight:700;color:var(--brand);text-transform:uppercase;letter-spacing:.05em}
.quote-arrow{font-size:28px;color:var(--brand);align-self:center;margin-top:34px}
@media (max-width:720px){
  .quote-cols{grid-template-columns:1fr}
  .quote-arrow{transform:rotate(90deg);margin:4px 0}
}

.checklist-item{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:600;color:var(--fg);cursor:pointer;text-transform:none;letter-spacing:normal}
.checklist-item input[type=checkbox]{width:18px;height:18px;min-height:0;cursor:pointer}

.carrier-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.carrier-card{border:1px solid var(--border);border-radius:var(--radius-md);overflow:hidden;box-shadow:var(--shadow-sm)}
.carrier-header{padding:10px 14px;font-weight:700;font-size:14px}
.carrier-body{padding:14px;background:var(--bg-elevated)}
.carrier-price{font-family:var(--font-sans);font-size:22px;font-weight:700;color:var(--brand);margin-bottom:8px}
.carrier-price span{font-size:12px;font-weight:600;color:var(--fg-subtle);text-transform:uppercase;margin-left:6px}

/* Small muted annotation used next to results and inline hints (finder, radar). */
.caption{font-size:13px;color:var(--fg-subtle);line-height:1.45}

/* Product Radar --------------------------------------------------------- */
.radar-panel{border-left:5px solid var(--brand)}
.radar-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;margin-bottom:var(--space-4)}
.radar-head h3{font-size:16px}
.radar-sub{font-size:14px;color:var(--fg-muted);line-height:1.5;margin-top:4px;max-width:70ch}
.radar-head-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}

.radar-tabs{display:flex;gap:4px;background:var(--bg-tinted);border-radius:var(--radius-md);padding:4px;margin-bottom:var(--space-4);width:fit-content}
.radar-tabs button{font:600 14px var(--font-sans);padding:8px 16px;border:0;background:transparent;color:var(--brand-deep);border-radius:var(--radius-sm);cursor:pointer;min-height:36px}
.radar-tabs button.active{background:var(--bg-elevated);box-shadow:var(--shadow-sm);color:var(--brand)}

.radar-daybar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:var(--space-4)}
.radar-daybar label{font-size:14px;font-weight:700;color:var(--fg-muted);text-transform:uppercase;letter-spacing:.04em}
.radar-daybar select{padding:8px 12px;border:1.5px solid var(--neutral-mid);border-radius:var(--radius-md);font:14px var(--font-sans);background:var(--bg-elevated);min-height:38px}
.radar-check{display:flex;align-items:center;gap:8px;text-transform:none;letter-spacing:normal;font-weight:600;cursor:pointer}
.radar-check input{width:17px;height:17px;cursor:pointer}

.radar-card{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:14px 16px;border:1px solid var(--border);border-radius:var(--radius-md);margin-bottom:8px;background:var(--bg-elevated);transition:box-shadow .18s ease}
.radar-card:hover{box-shadow:var(--shadow-md)}
.radar-card.actioned{opacity:.62;background:var(--bg-tinted)}
.radar-card-main{min-width:0}
.radar-card-title{font-size:15px;font-weight:700;color:var(--brand);line-height:1.35}
.radar-card-tags{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0}
.radar-card-desc{font-size:14px;color:var(--fg-muted);line-height:1.5;margin:6px 0}
.radar-card-meta{font-size:14px;color:var(--fg-subtle);margin-top:6px}
.radar-card-meta a{color:var(--link);font-weight:600}
.radar-card-actions{display:flex;gap:8px;align-items:center;flex-shrink:0;flex-wrap:wrap;justify-content:flex-end}

.radar-pill{display:inline-block;font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;padding:3px 9px;border-radius:var(--radius-pill)}
.radar-pill.Accessibility{background:var(--info-bg);color:var(--info)}
.radar-pill.Sustainability{background:var(--success-bg);color:var(--success)}
.radar-pill.space{background:var(--warning-bg);color:var(--warning)}
.radar-pill.muted{background:var(--neutral-divider);color:var(--fg-subtle)}

.radar-empty{font-size:14px;color:var(--fg-subtle);padding:14px 16px;border:1px dashed var(--border);border-radius:var(--radius-md);margin-bottom:8px}

@media (max-width:720px){
  .radar-card{flex-direction:column}
  .radar-card-actions{justify-content:flex-start}
}

/* Bulk selection ---------------------------------------------------------
   Shared by every list page: a checkbox column, plus an action bar that
   appears only once something is ticked. */
.check-col{width:44px;text-align:center;padding-left:14px;padding-right:6px}
.check-col input[type=checkbox]{width:18px;height:18px;min-height:0;cursor:pointer;accent-color:var(--brand);vertical-align:middle}
tr.row-selected td{background:var(--bg-tinted)}
tr.row-selected:hover td{background:var(--teal-100)}

.bulk-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
  padding:12px 16px;margin-bottom:var(--space-3);border:1px solid var(--brand);border-left:5px solid var(--brand);
  border-radius:var(--radius-md);background:var(--bg-tinted);box-shadow:var(--shadow-sm)}
.bulk-bar[hidden]{display:none}
.bulk-count{font-size:14px;font-weight:700;color:var(--brand);text-transform:uppercase;letter-spacing:.04em}
.bulk-actions{display:flex;gap:8px;flex-wrap:wrap}

/* "quiet" is the resting state for bars that stay on screen so their Select all
   stays reachable (card grids) — muted until something is actually ticked. */
.bulk-bar.quiet{border-color:var(--border);border-left-color:var(--neutral-mid);background:var(--bg-elevated);box-shadow:none}
.bulk-select-all{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;color:var(--fg-muted);
  text-transform:uppercase;letter-spacing:.04em;cursor:pointer}
.bulk-select-all input[type=checkbox]{width:18px;height:18px;min-height:0;cursor:pointer;accent-color:var(--brand)}

/* Card grids (brokers) carry their tick box in the card header, beside the source badge. */
.card-select{display:flex;align-items:center;gap:8px;flex-shrink:0}
.card-select input[type=checkbox]{width:18px;height:18px;min-height:0;cursor:pointer;accent-color:var(--brand)}
.broker-card.card-selected{box-shadow:0 0 0 2px var(--brand),var(--shadow-md)}

/* ── Products: full-page form ─────────────────────────────────────────────
   The product form is long enough that a modal fought the content — it lives
   on the page instead, with the list swapped out while it is open. */
.form-page{background:var(--bg-elevated);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-sm);margin-bottom:var(--space-5)}
.form-page-head{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:16px;flex-wrap:wrap;
  padding:16px var(--space-5);background:var(--bg-elevated);border-bottom:2px solid var(--border);border-radius:var(--radius-md) var(--radius-md) 0 0}
.form-page-head h2{font-family:var(--font-sans);font-size:20px;font-weight:700;color:var(--brand);margin-right:auto}
.form-page-head .form-page-sub{display:block;font-size:13px;font-weight:400;color:var(--fg-subtle);margin-top:2px}
.form-page-body{padding:var(--space-5)}
.form-block{padding:var(--space-5) 0;border-top:1px solid var(--border)}
.form-block:first-child{padding-top:var(--space-2);border-top:0}
.form-block > h3{font-family:var(--font-sans);font-size:18px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--brand);margin-bottom:var(--space-4);border:0;padding:0}
.form-block > h3 .block-note{display:block;font-size:13px;font-weight:400;letter-spacing:0;text-transform:none;color:var(--fg-subtle);margin-top:4px}
.form-field .hint{display:block;font-size:12px;font-weight:400;color:var(--fg-subtle);text-transform:none;letter-spacing:0;margin-top:5px;line-height:1.45}
.form-field .hint.calc{color:var(--brand-deep);font-weight:600}
.form-grid .span-3{grid-column:1/-1}
.form-row-3{display:grid;grid-template-columns:repeat(3,1fr);gap:14px 16px}
@media (max-width:760px){.form-row-3{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}}

/* Currency selector welded to its amount box, as in the wireframe. */
.money-input{display:flex}
.money-input select{width:auto;min-width:88px;border-radius:var(--radius-md) 0 0 var(--radius-md);border-right:0;background:var(--bg-tinted);font-weight:700}
.money-input input{border-radius:0 var(--radius-md) var(--radius-md) 0}
.money-input .prefix{display:inline-flex;align-items:center;padding:0 13px;border:1.5px solid var(--neutral-mid);border-right:0;
  border-radius:var(--radius-md) 0 0 var(--radius-md);background:var(--bg-tinted);font-weight:700;color:var(--fg-muted)}

/* Radio group (CE marked, SDS) */
.radio-row{display:flex;gap:22px;flex-wrap:wrap;align-items:center}
.radio-option{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:600;cursor:pointer}
.radio-option input{width:18px;height:18px;min-height:0;margin:0;accent-color:var(--brand)}

/* Attachments */
.file-drop{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.file-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.file-chip{display:inline-flex;align-items:center;gap:8px;padding:6px 8px 6px 10px;border:1px solid var(--border);
  border-radius:var(--radius-md);background:var(--bg-tinted);font-size:13px;max-width:280px}
.file-chip a{color:var(--link);font-weight:600;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-chip a:hover{text-decoration:underline}
.file-chip button{border:0;background:none;cursor:pointer;color:var(--destructive);font-size:16px;line-height:1;padding:0 2px}
.image-list{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
.image-thumb{position:relative;width:96px;height:96px;border:1px solid var(--border);border-radius:var(--radius-md);overflow:hidden;background:var(--bg-tinted)}
.image-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.image-thumb button{position:absolute;top:4px;right:4px;width:22px;height:22px;border:0;border-radius:var(--radius-pill);
  background:rgba(14,59,69,.82);color:#fff;cursor:pointer;font-size:13px;line-height:1}

/* Estimator and research result panels inside the form */
.panel{border:1px solid var(--border);border-left:4px solid var(--brand);border-radius:var(--radius-md);
  background:var(--bg-tinted);padding:14px 16px;margin-bottom:14px}
.panel h4{font:700 14px var(--font-sans);color:var(--brand);margin-bottom:8px;text-transform:uppercase;letter-spacing:.04em}
.panel-facts{display:flex;flex-wrap:wrap;gap:6px 20px;font-size:14px;color:var(--fg-muted)}
.panel-facts b{color:var(--fg);font-weight:700}
.option-row{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;
  padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg-elevated);margin-top:8px}
.option-row .option-price{font-size:16px;font-weight:700;color:var(--brand)}
/* The carrier whose figure is currently in Freight + customs. */
.option-row.selected{border-color:var(--brand);background:var(--bg-tinted);box-shadow:inset 3px 0 0 var(--brand)}
.competitor-card{display:flex;gap:12px;align-items:flex-start;padding:12px;border:1px solid var(--border);
  border-radius:var(--radius-md);background:var(--bg-elevated);margin-top:8px}
.competitor-card img{width:64px;height:64px;object-fit:cover;border-radius:var(--radius-sm);flex:none;background:var(--neutral-divider)}
.competitor-card .cc-main{min-width:0;flex:1}
.competitor-card .cc-title{font-weight:700;font-size:14px;color:var(--fg)}
.competitor-card .cc-meta{font-size:13px;color:var(--fg-subtle);margin-top:3px}
.competitor-card .cc-price{font-size:15px;font-weight:700;color:var(--brand);white-space:nowrap}

/* ── Products: accordion list ─────────────────────────────────────────────
   Collapsed a row carries only the ten columns needed to triage; everything
   else is behind the disclosure. Grid columns are shared by the header strip
   and every row so the two stay in step. */
.prod-list{--prod-cols:32px 58px 96px minmax(160px,1.4fr) 110px 96px minmax(110px,1fr) 124px 84px 124px 124px 178px;
  background:var(--bg-elevated);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-sm);overflow-x:auto}
.prod-head,.prod-summary{display:grid;grid-template-columns:var(--prod-cols);gap:8px;align-items:center;min-width:1400px}
.prod-head{padding:11px 14px;background:var(--neutral-divider);border-bottom:2px solid var(--border);
  font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--fg-muted);position:sticky;top:0;z-index:5}
.prod-item{border-bottom:1px solid var(--border)}
.prod-item:last-child{border-bottom:0}
.prod-summary{list-style:none;cursor:pointer;padding:11px 14px;font-size:14px}
.prod-summary::-webkit-details-marker{display:none}
.prod-summary:hover{background:var(--bg-tinted)}
.prod-summary:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}
.prod-item[open]>.prod-summary{background:var(--bg-tinted);border-bottom:1px solid var(--border)}
.prod-item.row-selected>.prod-summary{background:var(--teal-100)}
.prod-cell{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.prod-cell.name{font-weight:700;color:var(--brand);white-space:normal}
.prod-cell.num{font-variant-numeric:tabular-nums}
.prod-cell .sub{display:block;font-size:12px;color:var(--fg-subtle);font-weight:400}
.prod-cell.actions{display:flex;gap:6px;justify-content:flex-end;white-space:nowrap}
.prod-chevron{color:var(--fg-subtle);transition:transform .18s ease;text-align:center}
.prod-item[open] .prod-chevron{transform:rotate(180deg)}

.status-pill{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:var(--radius-pill);
  font-size:13px;font-weight:700;letter-spacing:.04em;white-space:nowrap}
.status-pill::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor}
.status-pill.GO{background:var(--success-bg);color:var(--status-green)}
.status-pill.WAIT{background:var(--warning-bg);color:var(--status-amber)}
.status-pill.SKIP{background:var(--danger-bg);color:var(--status-red)}

.tag-chips{display:flex;gap:4px;flex-wrap:wrap}
.tag-chip{font-size:11px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;padding:3px 7px;
  border-radius:var(--radius-pill);background:var(--bg-tinted);color:var(--brand-deep);white-space:nowrap}
.tag-chip.sustainable{background:var(--success-bg);color:var(--success)}
.tag-chip.accessible{background:var(--info-bg);color:var(--info)}
.tag-chip.inclusive{background:var(--amber-50);color:var(--accent)}
.tag-chip.functional{background:var(--neutral-divider);color:var(--fg-muted)}

.prod-detail{padding:var(--space-4) 18px var(--space-5);background:var(--bg-elevated);min-width:1400px}
.detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:var(--space-4) var(--space-5)}
.detail-block h5{font:700 13px var(--font-sans);text-transform:uppercase;letter-spacing:.05em;color:var(--brand);
  margin-bottom:8px;padding-bottom:5px;border-bottom:1px solid var(--border)}
.detail-pair{display:flex;justify-content:space-between;gap:14px;font-size:14px;padding:4px 0;border-bottom:1px dotted var(--neutral-divider)}
.detail-pair:last-child{border-bottom:0}
.detail-pair dt{color:var(--fg-subtle)}
.detail-pair dd{text-align:right;font-weight:600;overflow-wrap:anywhere}
.status-why{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:var(--space-4)}
.status-why .why{display:inline-flex;align-items:center;gap:7px;font-size:13px;padding:5px 11px;border-radius:var(--radius-pill);background:var(--neutral-divider);color:var(--fg-muted)}
.status-why .why::before{content:"";width:8px;height:8px;border-radius:50%;flex:none}
.status-why .why.GO::before{background:var(--status-green-dot)}
.status-why .why.WAIT::before{background:var(--status-amber-dot)}
.status-why .why.SKIP::before{background:var(--status-red-dot)}

/* Customs Docs — one row per document: what it is on the left, what you do with it on
   the right, collapsing to a single column on narrow screens. */
.doc-row{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;
  border:1px solid var(--border);border-radius:var(--radius-md);padding:14px;margin-bottom:10px}
.doc-row:last-child{margin-bottom:0}
.doc-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.doc-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.doc-reason{color:var(--fg-muted);font-style:italic}
.doc-files{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.doc-files .contact-item{font-size:14px;color:var(--brand-deep);text-decoration:none;font-weight:600}
.doc-files .contact-item:hover{color:var(--brand);text-decoration:underline}
.doc-actions{display:flex;flex-direction:column;gap:8px;flex:none;width:190px}
.doc-actions select{width:100%;padding:9px 11px;border:1.5px solid var(--neutral-mid);
  border-radius:var(--radius-md);font-size:14px;font-family:var(--font-sans);
  background:var(--bg-elevated);min-height:38px}
.doc-actions .btn{justify-content:center}
@media (max-width:760px){
  .doc-row{flex-direction:column}
  .doc-actions{width:100%;flex-direction:row}
  .doc-actions select{flex:1}
}
