/* =====================================================================================
   Marine Cargo — enterprise theme layer
   Colours: the design's light theme (green / mint / coral), now the default.
   Typography and spacing: aligned with the Extended Warranty app (Public Sans, 13.5px body,
   21-22px page titles, 15px section titles, 13-13.5px navigation, compact padding).
   Loaded in <head> right after marine.css (no flash of the old sizes): the design files stay untouched, so a design
   re-import (tools/import-design.mjs) keeps this theme. Pure CSS, no runtime cost.
   ===================================================================================== */

:root { --mc-font: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif; }

/* ---------- base typography ---------- */
body { font-family: var(--mc-font); font-size: 13.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1 { font-size: 22px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
h3 { font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
.sub { font-size: 13.5px; }
.mini { font-size: 12px; }
.dots { font-size: 18px; }

/* ---------- form controls ---------- */
label.f { font-size: 12.5px; font-weight: 500; margin-bottom: 10px; }
input, select, textarea { font-size: 13.5px; }
input, select { padding: 8px 12px; border-radius: 10px; }
textarea { border-radius: 10px; }
.sq { padding: 8px 14px 8px 40px; border-radius: 10px; font-size: 13px; }
.dd { font-size: 13px; }

/* ---------- buttons, tabs, chips ---------- */
.btn { padding: 9px 20px; font-size: 13.5px; font-weight: 600; }
.btn.sm { padding: 6px 14px; font-size: 12.5px; }
.btn.halo { box-shadow: 0 0 0 4px var(--halo); }
.tabs button { padding: 6px 14px; font-size: 12.5px; border-radius: 10px; }
.stp li { padding: 6px 14px; font-size: 12px; border-radius: 10px; }
.seg2 button { font-size: 12.5px; }

/* ---------- surfaces ---------- */
.card { border-radius: 18px; padding: 18px 22px; margin-bottom: 16px; }
.kpi { border-radius: 14px; padding: 14px 16px; }
.kpi small, .kpi span { font-size: 11.5px; }
.kpi b { font-size: 18px; }
.note, .warn { border-radius: 12px; font-size: 12.5px; padding: 10px 14px; }
.uw { border-radius: 14px; padding: 12px 16px; }
.uw .tt b { font-size: 15px; }
.uw .nm { min-width: 0; }
.uw .nm .tag { display: inline-block; max-width: 100%; margin: 2px 4px 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.dock { border-radius: 14px; padding: 10px 16px; }
.mdl { border-radius: 18px; padding: 22px 24px; }
.mdl h2 { font-size: 17px; }
.tot dd { font-size: 15px; }
.cert .no { font-size: 16px; }
.okm { font-size: 24px; }
.dmini b { font-size: 14px; }
.qa a { border-radius: 10px; font-size: 13px; padding: 9px 14px; }

/* ---------- tables: compact rows, quiet headers ---------- */
.pl th, .pl td { padding: 10px 10px; font-size: 13px; vertical-align: middle; }
.pl th { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- right panel ---------- */
.rph { font-size: 18px; }
.rph button { font-size: 20px; }
.cnav button { font-size: 14px; }

/* ---------- avatar ---------- */
.av { font-size: 16px; }
.avs .pl { font-size: 18px; }

/* =====================================================================================
   Desktop layout (the design's own mobile rules below 861px stay in charge there)
   ===================================================================================== */
@media (min-width: 861px) {
  /* shell */
  .app { grid-template-columns: 244px minmax(0, 1fr) 336px; max-width: 1480px; margin: 16px auto; border-radius: 22px; min-height: calc(100vh - 32px); box-shadow: 0 12px 40px rgba(40, 90, 70, .10); }
  .app.col { grid-template-columns: 84px minmax(0, 1fr) 336px; }
  .side { padding: 22px 14px 20px 16px; gap: 12px; border-radius: 22px 0 0 22px; }
  .me { font-size: 17px; gap: 10px; margin-top: 2px; }
  .colb { top: 86px; }

  /* navigation */
  .menu { gap: 2px; }
  .menu a { gap: 12px; padding: 9px 10px; font-size: 13.5px; border-radius: 10px; }
  .menu a svg { width: 20px; height: 20px; }
  .menu a:hover:not(.on) { border-radius: 10px; }
  .menu a.on { font-weight: 600; }
  .menu a.on:after { right: -14px; top: -2px; bottom: -2px; width: 26px; border-radius: 22px 0 0 22px; }
  .typ { font-size: 12.5px; padding-top: 12px; }
  .promo { border-radius: 16px; font-size: 12.5px; }
  .promo svg { width: 104px; }

  /* content */
  .main { padding: 26px 26px 32px; }
  .top { margin-bottom: 18px; align-items: flex-end; }
  .tools { gap: 16px; font-size: 13px; }
  .sh { margin: 0 0 10px; }

  /* cover cards: equal tiles, add tile sized like a card */
  .cards { align-items: flex-start; gap: 14px; margin-bottom: 22px; }
  .mcs { grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); gap: 14px; }
  .mc { border-radius: 18px; padding: 16px 16px 14px; min-height: 132px; }
  .mc .t { gap: 10px; font-size: 14px; line-height: 1.3; }
  .mc .ic { width: 38px; height: 38px; }
  .mc .ic svg { width: 20px; height: 20px; }
  .mc .am { font-size: 14px; }
  .mc .am small { font-size: 11px; margin-left: 6px; }
  .plus { flex: 0 0 52px; height: 132px; border-radius: 16px; font-size: 24px; box-shadow: 0 0 0 4px var(--halo); }

  /* balance strip */
  .strip { border-radius: 18px; padding: 8px 12px; margin-bottom: 22px; gap: 12px; }
  .strip .amt { font-size: 15px; }
  .strip .btn { padding: 10px 36px; }
  .reqs { gap: 14px; margin-bottom: 22px; }

  /* right panel */
  .rp { padding: 22px 20px; border-radius: 22px 22px 22px 0; }

  /* staff portal */
  .stf { grid-template-columns: 232px minmax(0, 1fr); max-width: 1560px; margin: 16px auto; border-radius: 22px; min-height: calc(100vh - 32px); box-shadow: 0 12px 40px rgba(40, 90, 70, .10); }
  .sts { padding: 22px 12px; }
  .stn { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
  .stn i { font-size: 11px; }
  .stm { padding: 22px 26px 32px; }
  .stm h1 { font-size: 22px; font-weight: 600; }
  .stm .sub { font-size: 13.5px; }
  html .stm .kpi b { font-size: 17px; } /* marine-v8.css loads later; win on specificity */
  .stt { margin-bottom: 18px; }
  .who { font-size: 12.5px; }

  /* sign-in: fixed enterprise sizes instead of viewport-scaled ones (they grew on wide screens) */
  .lg { border-radius: 22px; }
  .lg .hro { padding: 36px 34px; gap: 14px; }
  .lg .frm { padding: 34px 32px; }
  #login { font-size: 13.5px; }
  #login .lg .hro h1 { font-size: 26px; font-weight: 600; }
  #login .lg .hro li { font-size: 13.5px; }
  #login .lg .hro .logo { font-size: 13px; }
  #login .lg .frm h2 { font-size: 21px; font-weight: 600; }
  #login .lg .frm .sub { font-size: 13.5px; }
  #login .lgtabs { border-radius: 12px; }
  #login .lgtabs button { font-size: 13px; border-radius: 9px; padding: 8px 10px; }
  #login .frm label.f { font-size: 12.5px; }
  #login .frm .btn.halo { font-size: 13.5px; }
  #login .frm .mini, #login .frm #lgForgot { font-size: 12.5px; }
  #login .qa .card h2 { font-size: 15px; }
  #login .qa a { font-size: 13px; }
  #login .mp small { font-size: 10.5px; }
  #login .mp h2, #login .mpR h2, #login .mpL h2 { font-size: 17px; }
  #login .mp p, #login .mpR p, #login .mpL p, #login .mpR li a { font-size: 12.5px; }
  /* the sign-in card was sized in vw: fixed, compact controls instead */
  #login .lg { border-radius: 22px; min-height: 0; }
  #login .lg .hro { padding: 36px 40px; }
  #login .lg .frm { padding: 22px 28px 26px; }
  #login .lgtabs { padding: 4px; margin-bottom: 18px; }
  #login .frm input, #login .frm select { padding: 9px 14px; min-height: 40px; border-radius: 10px; }
  #login .frm .btn.halo { padding: 11px 16px; border-radius: 10px; box-shadow: 0 0 0 4px var(--rusth); }
  #login .qa .card { border-radius: 18px; padding: 16px 20px 18px; }
  #login .qa a { padding: 7px 14px; margin: 8px 8px 0 0; }
}

/* ---------- underwriter rows on wide screens: one aligned row (logo, name, rate, deductible,
   total, Select) instead of the Select button wrapping onto its own line ---------- */
@media (min-width: 861px) and (max-width: 1399px) {
  /* not enough width for one row: totals and Select line up on the right of a second line */
  .uw .btn { margin-left: auto; }
}
@media (min-width: 1400px) {
  .uw { flex-wrap: nowrap; gap: 12px; }
  .uw .nm { flex: 1 1 0; min-width: 0; }
  .uw .cl { flex: 0 0 88px; }
  .uw .tt { flex: 0 0 104px; }
  .uw .btn { min-width: 88px; padding: 7px 14px; }
}

/* ---------- small screens: keep the design's layout, just the calmer type ---------- */
@media (max-width: 860px) {
  h1, .stm h1 { font-size: 20px; }
  .me { font-size: 15px; }
  .mc .t { font-size: 14px; }
  .menu a { font-size: 13px; }
}
