/* =====================================================================
   AutoAds v2 — shared base: fonts, colours, and every component used by
   the public site, the seller area and the staff area.
   Loaded after Bootstrap on every page. Pages never carry their own
   <style> blocks or style="" attributes.
   ===================================================================== */

@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }

:root {
  /* brand */
  --aa-navy: #0b2a5b;
  --aa-navy-deep: #081f45;
  --aa-ink: #0b1220;
  --aa-accent: #ffc400;
  --aa-accent-deep: #e6b000;
  --aa-link: #1d4ed8;

  /* surfaces and lines */
  --aa-ground: #f5f6f8;
  --aa-card: #ffffff;
  --aa-line: #e3e6eb;
  --aa-line-soft: #eef0f3;
  --aa-field-line: #c9cfd8;
  --aa-chip-line: #d5dae2;
  --aa-tint: #eef2f9;
  --aa-photo: #e7eaef;

  /* text (all pass 4.5:1 on white) */
  --aa-text: #0b1220;
  --aa-text-2: #3b4556;
  --aa-muted: #4b5565;
  --aa-label: #6b7485;

  /* states: background / text */
  --aa-good-bg: #e7f6ec; --aa-good: #14532d;
  --aa-warn-bg: #fff4cc; --aa-warn: #5c4300;
  --aa-bad-bg: #fdecec;  --aa-bad: #8a1c12;
  --aa-info-bg: #eef2f9; --aa-info: #0b2a5b;
  --aa-grey-bg: #f2f4f7; --aa-grey: #3b4556;

  /* shape */
  --aa-r-card: 14px;
  --aa-r-ctl: 10px;
  --aa-r-sm: 6px;
  --aa-shadow-lift: 0 24px 48px rgba(3, 12, 32, 0.28);

  --aa-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --aa-font-plate: 'Barlow Condensed', 'Arial Narrow', sans-serif;

  /* Bootstrap follows the same settings */
  --bs-body-font-family: var(--aa-font);
  --bs-body-color: var(--aa-text);
  --bs-body-bg: var(--aa-ground);
  --bs-border-color: var(--aa-line);
  --bs-link-color: var(--aa-link);
  --bs-link-color-rgb: 29, 78, 216;
  --bs-link-hover-color: var(--aa-navy);
  --bs-link-hover-color-rgb: 11, 42, 91;
  --bs-secondary-color: var(--aa-muted);
  --bs-border-radius: var(--aa-r-ctl);
  --bs-focus-ring-color: rgba(29, 78, 216, 0.3);
}

body { font-family: var(--aa-font); color: var(--aa-text); background: var(--aa-ground); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; }
a { font-weight: 600; }
:focus-visible { outline: 3px solid rgba(29, 78, 216, 0.45); outline-offset: 2px; }
.aa-num { font-variant-numeric: tabular-nums; }
.visually-hidden-focusable:not(:focus):not(:focus-within) { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; }

/* ---------- logo ---------- */
.aa-logo { display: inline-flex; align-items: center; text-decoration: none; }
.aa-logo img { height: 36px; width: auto; display: block; }
.aa-logo-chip { background: #fff; border-radius: 8px; padding: 6px 8px; }
.aa-logo-chip img { height: 24px; }

/* ---------- buttons ---------- */
.aa-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 15px; font-weight: 700; line-height: 1.2;
  min-height: 44px; padding: 10px 18px;
  border-radius: var(--aa-r-ctl); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.aa-btn i { font-size: 1.05em; }
.aa-btn-primary { background: var(--aa-navy); color: #fff; }
.aa-btn-primary:hover, .aa-btn-primary:focus-visible { background: var(--aa-navy-deep); color: #fff; }
.aa-btn-accent { background: var(--aa-accent); color: var(--aa-ink); font-weight: 800; }
.aa-btn-accent:hover, .aa-btn-accent:focus-visible { background: var(--aa-accent-deep); color: var(--aa-ink); }
.aa-btn-outline { background: #fff; color: var(--aa-ink); border-color: var(--aa-field-line); }
.aa-btn-outline:hover, .aa-btn-outline:focus-visible { border-color: var(--aa-navy); color: var(--aa-navy); }
.aa-btn-quiet { background: transparent; color: var(--aa-navy); padding-inline: 12px; }
.aa-btn-quiet:hover { background: var(--aa-tint); color: var(--aa-navy); }
.aa-btn-danger { background: #fff; color: var(--aa-bad); border-color: #f1b7b0; }
.aa-btn-danger:hover { background: var(--aa-bad-bg); color: var(--aa-bad); }
.aa-btn-sm { min-height: 36px; padding: 7px 12px; font-size: 14px; border-radius: 8px; }
.aa-btn-lg { min-height: 52px; padding: 14px 22px; font-size: 16px; }
.aa-btn-block { width: 100%; }
.aa-btn[disabled], .aa-btn.is-disabled { opacity: 0.55; pointer-events: none; }

/* ---------- forms ---------- */
.form-label, .aa-label { font-size: 14px; font-weight: 700; color: var(--aa-text-2); margin-bottom: 6px; }
.form-control, .form-select {
  font-size: 16px; font-weight: 500; color: var(--aa-text);
  min-height: 48px; padding: 11px 13px;
  border: 1px solid var(--aa-field-line); border-radius: var(--aa-r-ctl); background-color: #fff;
}
.form-select { padding-right: 36px; }
.form-control:focus, .form-select:focus { border-color: var(--aa-link); box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.18); }
.form-control.is-invalid, .form-select.is-invalid { border-color: #c4321f; background-image: none; padding-right: 13px; }
.form-control::placeholder { color: #8a93a3; }
.form-check-input { width: 1.2em; height: 1.2em; border-color: var(--aa-field-line); }
.form-check-input:checked { background-color: var(--aa-navy); border-color: var(--aa-navy); }
.form-switch { padding-left: 3.1em; }
.form-switch .form-check-input { width: 2.4em; margin-left: -3.1em; }
.form-check-label { font-weight: 500; }
.aa-help { color: var(--aa-muted); font-size: 13px; margin-top: 4px; }
.aa-field-error { color: #b42318; font-size: 14px; font-weight: 600; margin-top: 6px; }
.aa-optional { color: var(--aa-label); font-weight: 500; }
.aa-fieldset-title { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--aa-label); margin: 20px 0 10px; }

/* search box with an icon */
.aa-searchbox { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; background: #fff; border: 1px solid var(--aa-chip-line); border-radius: var(--aa-r-ctl); }
.aa-searchbox i { color: var(--aa-muted); }
.aa-searchbox input { font: inherit; font-size: 15px; border: 0; outline: none; flex: 1; min-width: 0; background: transparent; color: var(--aa-text); }
.aa-searchbox:focus-within { border-color: var(--aa-link); box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.18); }

/* choice cards (account type on sign-up) */
.aa-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.aa-choice > div { position: relative; }
.aa-choice input { position: absolute; opacity: 0; inset: 0; }
.aa-choice label { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px; border: 1px solid var(--aa-chip-line); border-radius: var(--aa-r-ctl); cursor: pointer; font-weight: 700; }
.aa-choice label small { font-weight: 500; color: var(--aa-muted); font-size: 13px; }
.aa-choice input:checked + label { border: 2px solid var(--aa-navy); padding: 13px; background: var(--aa-tint); }
.aa-choice input:focus-visible + label { outline: 3px solid rgba(29, 78, 216, 0.45); outline-offset: 2px; }

/* ---------- chips (filters and type pickers) ---------- */
.aa-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.aa-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px;
  font-size: 14px; font-weight: 600; color: var(--aa-ink); background: #fff;
  border: 1px solid var(--aa-chip-line); border-radius: 999px; text-decoration: none; cursor: pointer;
}
.aa-chip:hover { border-color: var(--aa-navy); color: var(--aa-navy); }
.aa-chip.is-active, .aa-chip[aria-current="page"], input:checked + .aa-chip { background: var(--aa-navy); border-color: var(--aa-navy); color: #fff; font-weight: 700; }
.aa-chip-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.aa-chip-radio:focus-visible + .aa-chip { outline: 3px solid rgba(29, 78, 216, 0.45); outline-offset: 2px; }

/* ---------- cards ---------- */
.aa-card { background: var(--aa-card); border: 1px solid var(--aa-line); border-radius: var(--aa-r-card); overflow: hidden; }
.aa-card + .aa-card { margin-top: 0; }
.aa-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--aa-line-soft); }
.aa-card-head h2, .aa-card-head h3 { margin: 0; font-size: 18px; }
.aa-card-head a { font-size: 14px; }
.aa-card-body { padding: 18px 20px; }
.aa-card-foot { padding: 14px 20px; border-top: 1px solid var(--aa-line-soft); font-size: 14px; }
.aa-card-dark { background: var(--aa-navy); color: #fff; border-color: var(--aa-navy); }
.aa-card-dark .aa-eyebrow { color: #afc2e3; }
.aa-card-dark p, .aa-card-dark span { color: #d7e0f0; }
.aa-card-dark a { color: var(--aa-accent); }
.aa-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--aa-label); }

/* ---------- numbers ---------- */
.aa-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.aa-stat { background: var(--aa-card); border: 1px solid var(--aa-line); border-radius: var(--aa-r-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; color: var(--aa-text); text-decoration: none; }
a.aa-stat:hover { border-color: var(--aa-navy); color: var(--aa-text); }
.aa-stat-label { font-size: 14px; font-weight: 600; color: var(--aa-muted); }
.aa-stat-number { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.aa-stat-number small { font-size: 16px; font-weight: 600; color: var(--aa-muted); letter-spacing: 0; }
.aa-stat-note { font-size: 13px; font-weight: 600; color: var(--aa-muted); }
.aa-stat-note.is-good { color: #15803d; font-weight: 700; }
.aa-stat-note.is-warn { color: #8a5a00; font-weight: 700; }
.aa-meter { height: 6px; background: var(--aa-line-soft); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.aa-meter > span { display: block; height: 100%; background: var(--aa-navy); border-radius: 999px; }
/* meter widths in steps of 5%, set by class so no style attributes are needed */
.aa-w-0 { width: 0; } .aa-w-5 { width: 5%; } .aa-w-10 { width: 10%; } .aa-w-15 { width: 15%; } .aa-w-20 { width: 20%; }
.aa-w-25 { width: 25%; } .aa-w-30 { width: 30%; } .aa-w-35 { width: 35%; } .aa-w-40 { width: 40%; } .aa-w-45 { width: 45%; }
.aa-w-50 { width: 50%; } .aa-w-55 { width: 55%; } .aa-w-60 { width: 60%; } .aa-w-65 { width: 65%; } .aa-w-70 { width: 70%; }
.aa-w-75 { width: 75%; } .aa-w-80 { width: 80%; } .aa-w-85 { width: 85%; } .aa-w-90 { width: 90%; } .aa-w-95 { width: 95%; } .aa-w-100 { width: 100%; }

/* ---------- tables ---------- */
.aa-table-wrap { overflow-x: auto; }
.aa-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.aa-table th { text-align: left; color: var(--aa-muted); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 12px; white-space: nowrap; }
.aa-table td { padding: 13px 12px; border-top: 1px solid var(--aa-line-soft); vertical-align: middle; color: var(--aa-text-2); }
.aa-table th:first-child, .aa-table td:first-child { padding-left: 20px; }
.aa-table th:last-child, .aa-table td:last-child { padding-right: 20px; }
.aa-table td strong { color: var(--aa-text); }
.aa-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.aa-table .strong { font-weight: 800; color: var(--aa-text); }
.aa-table .sub { display: block; font-size: 13px; color: var(--aa-muted); }
.aa-table tbody tr:hover td { background: #fafbfc; }
.aa-sort { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-transform: inherit; letter-spacing: inherit; font-weight: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.aa-sort::after { content: '\2195'; opacity: 0.4; font-size: 11px; }
.aa-sort[aria-sort="ascending"]::after { content: '\2191'; opacity: 1; }
.aa-sort[aria-sort="descending"]::after { content: '\2193'; opacity: 1; }
.aa-thumb { width: 64px; height: 44px; border-radius: var(--aa-r-sm); background: var(--aa-photo); object-fit: cover; flex: 0 0 64px; }
.aa-vehicle-cell { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.aa-vehicle-cell .meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; color: var(--aa-muted); }

/* ---------- small labels ---------- */
.aa-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; line-height: 1.2; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.aa-pill-good { background: var(--aa-good-bg); color: var(--aa-good); }
.aa-pill-warn { background: var(--aa-warn-bg); color: var(--aa-warn); }
.aa-pill-bad  { background: var(--aa-bad-bg);  color: var(--aa-bad); }
.aa-pill-info { background: var(--aa-info-bg); color: var(--aa-info); }
.aa-pill-grey { background: var(--aa-grey-bg); color: var(--aa-grey); }
.aa-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--aa-link); color: #fff; }
.aa-count-accent { background: var(--aa-accent); color: var(--aa-ink); }
.aa-plate {
  display: inline-block; font-family: var(--aa-font-plate); font-weight: 700; font-size: 15px; letter-spacing: 0.06em; line-height: 1.35;
  text-transform: uppercase; background: #ffd500; color: #111; border: 1px solid #c9a400; border-radius: 3px; padding: 0 7px; white-space: nowrap;
}
.aa-plate-lg { font-size: 26px; padding: 2px 12px; border-width: 2px; border-radius: 5px; }
.aa-avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--aa-tint); color: var(--aa-navy); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex: 0 0 36px; }

/* ---------- lists ---------- */
.aa-rows { list-style: none; margin: 0; padding: 0; }
.aa-rows > li { padding: 14px 20px; border-top: 1px solid var(--aa-line-soft); display: flex; gap: 12px; align-items: flex-start; }
.aa-rows > li:first-child { border-top: 0; }
.aa-rows .aa-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; font-size: 14px; }
.aa-rows .aa-row-top { display: flex; justify-content: space-between; gap: 8px; }
.aa-rows .aa-row-sub { font-size: 13px; color: var(--aa-muted); }
.aa-attention { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.aa-attention + .aa-attention { margin-top: 14px; }
.aa-icon-tile { flex: 0 0 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.aa-icon-tile.is-warn { background: var(--aa-warn-bg); color: #7a5a00; }
.aa-icon-tile.is-bad { background: var(--aa-bad-bg); color: #b42318; }
.aa-icon-tile.is-info { background: var(--aa-info-bg); color: var(--aa-navy); }
.aa-icon-tile.is-good { background: var(--aa-good-bg); color: var(--aa-good); }
.aa-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 6px 0; }
.aa-kv strong.is-good { color: var(--aa-good); }
.aa-kv strong.is-warn { color: var(--aa-warn); }
.aa-kv strong.is-bad { color: var(--aa-bad); }

/* ---------- empty states ---------- */
.aa-empty { text-align: center; padding: 40px 20px; color: var(--aa-muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.aa-empty i { font-size: 30px; color: var(--aa-label); }
.aa-empty strong { color: var(--aa-text); font-size: 16px; }
.aa-empty p { margin: 0; max-width: 420px; font-size: 14px; }

/* ---------- pagination ---------- */
.aa-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--aa-line-soft); font-size: 14px; color: var(--aa-muted); }
.aa-pager nav { display: flex; gap: 6px; }
.aa-pager a, .aa-pager span.is-current { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--aa-chip-line); text-decoration: none; color: var(--aa-ink); }
.aa-pager span.is-current { background: var(--aa-navy); border-color: var(--aa-navy); color: #fff; font-weight: 800; }

/* ---------- messages ---------- */
.aa-flash { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--aa-r-ctl); padding: 12px 16px; margin-bottom: 16px; border: 1px solid transparent; font-size: 15px; }
.aa-flash i { margin-top: 2px; }
.aa-flash-success { background: var(--aa-good-bg); color: var(--aa-good); border-color: #b9e3c6; }
.aa-flash-error { background: var(--aa-bad-bg); color: var(--aa-bad); border-color: #f1b7b0; }
.aa-flash-info { background: var(--aa-info-bg); color: var(--aa-info); border-color: #c9d6ee; }
.aa-flash-warning { background: var(--aa-warn-bg); color: var(--aa-warn); border-color: #f0dc8f; }

/* ---------- confirm dialog (replaces the browser's confirm box) ---------- */
.aa-dialog { border: 0; border-radius: var(--aa-r-card); padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: var(--aa-shadow-lift); color: var(--aa-text); }
.aa-dialog::backdrop { background: rgba(11, 18, 32, 0.5); }
.aa-dialog-body { padding: 22px 22px 8px; font-size: 16px; line-height: 1.5; }
.aa-dialog-body h2 { font-size: 19px; margin: 0 0 8px; }
.aa-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px 20px; }
.aa-js .aa-nojs-only { display: none !important; }

/* ---------- plans and offers (seller billing page and public plans page) ---------- */
.aa-offer { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--aa-r-ctl); background: #fff8db; color: var(--aa-ink); font-size: 15px; margin-bottom: 16px; }
.aa-offer > i { font-size: 20px; color: #9a6b00; }
.aa-plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.aa-plan-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border: 1px solid var(--aa-line); border-radius: var(--aa-r-card); background: #fff; }
.aa-plan-pick.is-current { border: 2px solid var(--aa-navy); padding: 15px; }
.aa-plan-size { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.aa-plan-size small { font-size: 14px; font-weight: 600; color: var(--aa-muted); letter-spacing: 0; }
.aa-plan-price { font-size: 16px; font-weight: 700; }
.aa-plan-was { font-size: 13px; color: var(--aa-muted); min-height: 1.2em; }
.aa-plan-pick .aa-btn, .aa-plan-pick .aa-pill { margin-top: 6px; }
/* hidden text (position: absolute) stays inside scrolling boxes instead of widening the page */
.aa-table-wrap, .aa-tabs, .aa-chips { position: relative; }
