/* ==========================================================================
   AERONEX UI · shared stylesheet (v1.0, 2026-10-16)
   The look of the Aeronex BBC dealer portal (bbc.aeronex.ae), written for the
   class names of the DOCK 3 BOQ Design Tool (tools-dock3.aeronex.ae).

   HOW TO USE
   - Replace BOTH  css/style.css  and  css/brand.css  with this one file:
       <link rel="stylesheet" href="css/aeronex-ui.css?v=20261016">
     (it covers every class those two files define, plus the page, admin,
     login and report screens). If you must keep style.css for now, load this
     file AFTER it; it still works, but delete brand.css.
   - Keep Font Awesome for the moment. Decorative icons (titles, labels, quick
     links, emoji in cards) are hidden here; functional ones (arrows, close,
     upload) stay small and grey. Long term, swap Font Awesome for thin outline
     icons (e.g. Lucide, 1.75px stroke, 16px).
   Application adaptation (2026-10-17): conflicting summary inline styles
   removed; mobile Feedback is inside navigation; short viewports use flow.
   Original, unmodified package is archived under docs/design/aeronex-ui-v1/.

   THE RULES THAT MAKE IT LOOK LIKE THE BBC
   1. White paper, ink text, ONE teal accent. Teal only for the main action,
      the selected item, focus and progress. Never decoration.
   2. Dark "stage" (#04080A) only for the slim top strip, login and footer-like
      areas. Working areas (forms, summary, tables) stay light.
   3. One font (Inter), three weights (400 / 500 / 600), a fixed size scale.
   4. Pills for buttons, 1px hairlines for cards and inputs, no heavy shadows.
   5. Status = small pill with a dot + a word. No uppercase eyebrows over titles.
   ========================================================================== */

/* 1. Font ----------------------------------------------------------------- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2-variations"),
       url("../fonts/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}

/* 2. Tokens ---------------------------------------------------------------- */
:root {
  /* type scale (px): 12 13 14 15 16 18 20 24 30 38 48 */
  --fs-12: .75rem; --fs-13: .8125rem; --fs-14: .875rem; --fs-15: .9375rem; --fs-16: 1rem;
  --fs-18: 1.125rem; --fs-20: 1.25rem; --fs-24: 1.5rem; --fs-30: 1.875rem; --fs-38: 2.375rem; --fs-48: 3rem;
  --font: "Inter", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --track: 0;

  /* paper and ink */
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F4F6F7; --band: #F4F6F7;
  --line: #E3E8EA; --line-2: #C9D3D6;
  --ink: #0A1317; --ink-2: #4A5A61; --ink-3: #5F6F75;

  /* accent (actions, selected, focus) */
  --accent: #08786F; --accent-hover: #066A62; --accent-ink: #FFFFFF; --accent-soft: #D8F0ED;

  /* status: text / background */
  --ok: #0B6E69;  --ok-bg: #DCF0ED;
  --way: #8A5A00; --way-bg: #FAEED0;
  --no: #B0362A;  --no-bg: #F8E1DD;
  --soft: #4351B0; --soft-bg: #E6E9F8;

  /* dark stage */
  --stage: #04080A; --stage-2: #0B1519; --stage-line: rgba(160,220,214,.14);
  --stage-ink: #EAF3F4; --stage-ink-2: #93A7AD; --glow: #3FD8C7; --glow-ink: #03211D;

  /* shape and depth */
  --r-xs: 8px; --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 26px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(10,19,23,.05), 0 6px 18px rgba(10,19,23,.06);
  --shadow-2: 0 24px 60px rgba(10,19,23,.18);
  --scrim: rgba(4,9,11,.42);
  --ease: cubic-bezier(.2,.75,.2,1);

  /* spacing (4px grid) and page frame */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --page-width: 1312px; --page-gutter: 64px;
  --header-h: 72px; --summary-w: 360px; --sidebar-w: 280px;

  /* aliases used by the tool's HTML / JS (keep them, inline styles refer to them) */
  --black: var(--ink); --white: #FFFFFF;
  --gray-900: var(--ink); --gray-800: var(--ink); --gray-700: var(--ink-2); --gray-600: var(--ink-2);
  --gray-500: var(--ink-3); --gray-400: var(--ink-3); --gray-300: var(--line-2); --gray-200: var(--line);
  --gray-100: var(--surface-2); --gray-50: var(--surface-2);
  --success: var(--ok); --warning: var(--way); --danger: var(--no); --info: var(--soft);
  --radius: var(--r-lg); --shadow: none; --shadow-md: none; --shadow-lg: none;
  --stage-layer: var(--stage-2); --stage-text: var(--stage-ink); --stage-secondary: var(--stage-ink-2);
}

/* 3. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); font-size: var(--fs-16); font-weight: 400; line-height: 1.55;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  accent-color: var(--accent); caret-color: var(--accent);
}
h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.12; letter-spacing: 0; color: var(--ink); text-wrap: balance; }
h1 { font-size: var(--fs-38); letter-spacing: 0; }
h2 { font-size: var(--fs-30); }
h3 { font-size: var(--fs-20); }
h4 { font-size: var(--fs-16); letter-spacing: 0; }
p { text-wrap: pretty; }
strong, b { font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
table, .card-price, .plan-total, .total-amount, .stat-value, .s-subtotal, .unit-price, .subtotal, .meta-value { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); color: var(--ink); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 3px solid var(--bg); }

/* Font Awesome policy: small, grey, never the hero of a line */
.fa, .fas, .far, .fab, .fa-solid, .fa-regular { font-size: .875em; }

/* 4. Top strip (was the yellow RRP banner) -------------------------------- */
.rrp-banner {
  display: flex; align-items: center; gap: 8px;
  min-height: 34px; padding: 8px var(--page-gutter);
  background: var(--stage); color: var(--stage-ink-2); border: 0;
  font-size: var(--fs-13); line-height: 1.4;
}
.rrp-banner i { color: var(--glow); font-size: 12px; margin: 0; flex: none; }
.rrp-banner strong { color: var(--stage-ink); font-weight: 500; }

/* 5. Header ---------------------------------------------------------------- */
.app-header {
  position: relative; z-index: 100;
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px;
  min-height: var(--header-h); padding: 12px var(--page-gutter);
  background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: none;
}
.app-header > .flex.items-center { display: contents; }   /* lets the title and the Admin button join the header row */
.app-logo { order: 0; display: flex; align-items: center; gap: 16px; flex: none; }
.app-logo img { display: block; height: 40px; width: auto; max-width: 240px; object-fit: contain; }
.app-title {
  order: 1; padding-left: 16px; border-left: 1px solid var(--line); line-height: 20px;
  font-size: var(--fs-13); font-weight: 500; color: var(--ink-3);
  text-transform: none; letter-spacing: 0; white-space: nowrap;
}

/* quick resources: quiet text links on the right of the header (external-link arrow kept) */
.quick-links {
  order: 2; flex: 1 1 auto; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px 22px;
  margin: 0; padding: 0; max-width: none; min-width: 0;
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
}
.quick-links-label {
  display: inline-flex; align-items: center; gap: 6px; align-self: center;
  padding: 0 4px 0 0; border: 0;
  font-size: var(--fs-13); font-weight: 500; color: var(--ink-3);
  text-transform: none; letter-spacing: 0; white-space: nowrap;
}
.quick-links-label i { display: none; }
@media (max-width: 1499px) { .quick-links-label { display: none; } }
.quick-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; min-width: 0; padding: 0;
  background: transparent; color: var(--ink-2); border: 0; border-radius: 0;
  font-size: var(--fs-14); font-weight: 500; line-height: 1.2; white-space: nowrap; text-decoration: none;
  transition: color .2s;
}
.quick-link > i:first-child { display: none; }
.quick-link .quick-link-arrow { color: var(--ink-3); font-size: 10px; margin-left: 1px; }
.quick-link:hover { color: var(--accent); background: transparent; text-decoration: none; transform: none; box-shadow: none; }
.quick-link:hover .quick-link-arrow { color: var(--accent); }
.app-header .btn { order: 3; }

/* 6. Step progress --------------------------------------------------------- */
.progress-bar-wrap { background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 var(--page-gutter); }
.progress-steps {
  display: flex; align-items: center; list-style: none; gap: 0;
  max-width: var(--page-width); margin: 0 auto; padding: 0; overflow-x: auto; scrollbar-width: none;
}
.progress-steps::-webkit-scrollbar { display: none; }
.progress-steps li { display: flex; align-items: center; flex-shrink: 0; }
.step-node { display: flex; align-items: center; gap: 10px; padding: 16px 0; cursor: pointer; white-space: nowrap; }
.step-num {
  display: grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: transparent; border: 1.5px solid var(--line-2); color: var(--ink-3);
  font-size: var(--fs-13); font-weight: 600; transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.step-label { font-size: var(--fs-14); font-weight: 500; color: var(--ink-3); transition: color .2s; }
.step-connector { width: 28px; height: 2px; margin: 0 12px; border-radius: 2px; background: var(--line); }
.step-connector.completed { background: var(--accent); }
.step-node:hover .step-label { color: var(--ink); }
.step-node.active .step-num { border-color: var(--accent); background: transparent; color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.step-node.active .step-label { color: var(--ink); font-weight: 600; }
.step-node.completed .step-num { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-size: 0; }
.step-node.completed .step-num::before { content: "✓"; font-size: var(--fs-13); }
.step-node.completed .step-label { color: var(--ink-2); }

/* 7. Page layout ----------------------------------------------------------- */
.app-layout {
  display: flex; align-items: flex-start; gap: var(--s-6);
  width: calc(100% - 2 * var(--page-gutter)); max-width: var(--page-width); margin: 0 auto;
  height: auto; min-height: 65vh; overflow: visible;
}
.main-content { flex: 1; min-width: 0; padding: var(--s-6) 0 var(--s-7); overflow: visible; }
.step-section { display: none; animation: aeFade .3s var(--ease); }
.step-section.active { display: block; }
@keyframes aeFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.step-header { margin: 0 0 var(--s-5); }
.step-header h2 { font-size: var(--fs-30); font-weight: 600; letter-spacing: 0; color: var(--ink); margin: 0; }
.step-header h2 > i { display: none !important; }          /* decorative title icons */
.step-header p { margin-top: 8px; font-size: var(--fs-16); color: var(--ink-2); max-width: 68ch; }

.section-label {
  margin: var(--s-5) 0 var(--s-3); font-size: var(--fs-15); font-weight: 600; color: var(--ink);
  text-transform: none; letter-spacing: 0;
}
.section-label:first-child { margin-top: 0; }
.section-label i { display: none; }

/* 8. Cards ----------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px 24px; margin-bottom: var(--s-4); box-shadow: none;
}
.card-sm { padding: 16px; }
.card > h3, .card > h4 { margin-bottom: 4px; }
.card h3 { font-size: var(--fs-20); }

/* option tiles (drone, battery, environment …) */
.select-cards { display: grid; gap: var(--s-4); }
.select-cards.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.select-cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.select-card {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 20px 22px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.select-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.select-card.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent-soft) 40%, #FFFFFF); }
.select-card.selected::after {
  content: "✓"; position: absolute; top: 14px; right: 14px;
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 600;
}
.select-card.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.select-card .card-icon { display: none; }                  /* emoji / big icons */
.select-card .card-title { font-size: var(--fs-16); font-weight: 600; color: var(--ink); padding-right: 28px; overflow-wrap: anywhere; }
.select-card .card-desc { font-size: var(--fs-13); line-height: 1.5; color: var(--ink-3); overflow-wrap: anywhere; }
.select-card .card-price { margin-top: auto; padding-top: 10px; font-size: var(--fs-18); font-weight: 600; color: var(--ink); }

/* checklist rows (accessories, software, licences) */
.check-item {
  display: flex; align-items: center; gap: 14px; margin-bottom: 8px; padding: 14px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  cursor: pointer; transition: border-color .2s, background .2s;
}
.check-item:hover { border-color: var(--line-2); }
.check-item.checked { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent-soft) 40%, #FFFFFF); }
.check-item input[type="checkbox"] { width: 18px; height: 18px; flex: none; accent-color: var(--accent); cursor: pointer; }
.check-item .item-info { flex: 1; min-width: 0; }
.check-item .item-name { font-size: var(--fs-15); font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.check-item .item-meta { margin-top: 3px; font-size: var(--fs-13); color: var(--ink-3); }
.check-item .item-price { flex: none; text-align: right; }
.check-item .item-price .unit-price { font-size: var(--fs-15); font-weight: 600; color: var(--ink); }
.check-item .item-price .subtotal { font-size: var(--fs-13); color: var(--ink-3); }

/* plan comparison */
.plan-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); margin-top: 8px; }
.plan-card {
  position: relative; margin-top: 12px; padding: 22px 24px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); cursor: pointer; transition: border-color .2s, box-shadow .2s;
}
.plan-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.plan-card.recommended { background: var(--surface); border-color: var(--line-2); }
.plan-card.selected-plan { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent-soft) 40%, #FFFFFF); }
.plan-title { margin-bottom: 12px; font-size: var(--fs-18); font-weight: 600; letter-spacing: 0; color: var(--ink); }
.plan-items { list-style: none; margin-bottom: 16px; }
.plan-items li { position: relative; padding: 3px 0 3px 16px; font-size: var(--fs-14); color: var(--ink-2); }
.plan-items li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }
.plan-total { padding: 12px 0 0; border-top: 2px solid var(--ink); font-size: var(--fs-20); font-weight: 600; letter-spacing: 0; color: var(--ink); }
.plan-badge-rec { position: absolute; top: -11px; left: 16px; transform: none; }
.plan-badge-sel { position: absolute; top: -11px; right: 16px; }

/* 9. Status pills (dot + word) -------------------------------------------- */
.tag, .badge-recommend, .badge-warning, .plan-badge-rec, .plan-badge-sel, .tag-email-sent,
.feedback-status-new, .feedback-status-reviewed, .feedback-status-resolved {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px;
  border: 0; border-radius: var(--r-pill);
  font-size: var(--fs-12); font-weight: 500; line-height: 1.5; letter-spacing: 0; text-transform: none; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2);
}
.tag::before, .badge-recommend::before, .badge-warning::before, .plan-badge-rec::before, .plan-badge-sel::before, .tag-email-sent::before,
.feedback-status-new::before, .feedback-status-reviewed::before, .feedback-status-resolved::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none;
}
/* product-type tags are neutral (type is not a status) */
.tag-dock, .tag-drone, .tag-battery, .tag-drtk, .tag-accessory, .tag-software, .tag-service, .tag-lead-report { background: var(--surface-2); color: var(--ink-2); }
.tag-dock::before, .tag-drone::before, .tag-battery::before, .tag-drtk::before, .tag-accessory::before, .tag-software::before, .tag-service::before { display: none; }
/* real statuses */
.badge-recommend, .plan-badge-rec, .tag-completed, .tag-lead-subscribed, .tag-email-sent, .feedback-status-resolved { background: var(--ok-bg); color: var(--ok); }
.badge-warning, .tag-draft, .feedback-status-new { background: var(--way-bg); color: var(--way); }
.tag-lead-unsubscribed { background: var(--no-bg); color: var(--no); }
.feedback-status-reviewed { background: var(--soft-bg); color: var(--soft); }
.plan-badge-sel { background: var(--accent); color: var(--accent-ink); }
.select-card .badge-recommend, .select-card .badge-warning { align-self: flex-start; margin-top: 6px; }
.tag i, .badge-recommend i, .badge-warning i, .plan-badge-rec i, .plan-badge-sel i { display: none; }   /* the dot already marks the status */
.feedback-cat-tag-bug { background: var(--no-bg); color: var(--no); }
.feedback-cat-tag-feature { background: var(--soft-bg); color: var(--soft); }
.feedback-cat-tag-general { background: var(--ok-bg); color: var(--ok); }
.feedback-cat-tag-other { background: var(--surface-2); color: var(--ink-2); }

/* 10. Forms ---------------------------------------------------------------- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 6px; font-size: var(--fs-13); font-weight: 500; color: var(--ink-2); }
.form-label .required { color: var(--no); margin-left: 2px; }
.form-label i { display: none; }
.form-input, .form-select, textarea.form-input, .admin-note-box {
  display: block; width: 100%; height: 44px; padding: 0 14px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 12px; outline: 0;
  font-size: var(--fs-15); font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
textarea.form-input, .admin-note-box { height: auto; min-height: 96px; padding: 10px 14px; line-height: 1.5; resize: vertical; }
.form-select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235F6F75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.form-input::placeholder, .admin-note-box::placeholder { color: var(--ink-3); opacity: .8; }
.form-input:hover, .form-select:hover { border-color: var(--ink-3); }
.form-input:focus, .form-select:focus, .admin-note-box:focus, .recipient-email-input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-input.error, .form-select.error { border-color: var(--no); background: color-mix(in srgb, var(--no-bg) 35%, #FFFFFF); }
.form-input:disabled, .form-select:disabled { background: var(--surface-2); color: var(--ink-3); cursor: not-allowed; }
.form-error { margin-top: 5px; font-size: var(--fs-12); color: var(--no); }
.form-hint { margin-top: 5px; font-size: var(--fs-12); color: var(--ink-3); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

/* segmented choice pills */
.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-pill);
  font-size: var(--fs-14); font-weight: 500; cursor: pointer; transition: border-color .2s, background .2s, color .2s;
}
.radio-pill input { display: none; }
.radio-pill:hover { border-color: var(--ink); }
.radio-pill.selected { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }

/* 11. Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; min-height: 0; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--r-pill); outline: 0;
  font-family: inherit; font-size: var(--fs-15); font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none;
  cursor: pointer; transition: transform .2s, box-shadow .3s, background .2s, border-color .2s, color .2s;
}
.btn:hover { text-decoration: none; }
.btn i { font-size: 13px; color: inherit !important; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 38%, transparent); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-secondary:hover { background: var(--surface); border-color: var(--ink); }
.btn-success { background: var(--accent); color: var(--accent-ink); }
.btn-success:hover { box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 38%, transparent); transform: translateY(-1px); }
.btn-danger { background: var(--surface); color: var(--no); border-color: color-mix(in srgb, var(--no) 45%, #FFFFFF); }
.btn-danger:hover { background: var(--no); color: #FFFFFF; border-color: var(--no); }
.btn-sm { height: 36px; padding: 0 16px; font-size: var(--fs-14); }
.btn-lg { height: 52px; padding: 0 28px; font-size: var(--fs-16); }
.btn.w-full { width: 100%; }
.btn:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; transform: none; box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-email-shortcut {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-pill);
  font-size: var(--fs-14); font-weight: 600; cursor: pointer; white-space: nowrap; transition: border-color .2s;
}
.btn-email-shortcut:hover { border-color: var(--ink); box-shadow: none; }

/* bottom step bar */
.step-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px max(var(--page-gutter), calc((100% - var(--page-width)) / 2));
  background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}
.step-nav .btn { min-width: 150px; }
body:has(.step-nav) { padding-bottom: 76px; }           /* room for the fixed step bar */
.step-nav #stepIndicator { font-size: var(--fs-13) !important; color: var(--ink-3) !important; }

/* 12. Alerts and notes ----------------------------------------------------- */
.alert {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 12px 16px;
  border: 0; border-radius: var(--r-md); font-size: var(--fs-14); line-height: 1.5;
}
.alert i { margin-top: 3px; flex: none; font-size: 13px; }
.alert-warning { background: var(--way-bg); color: var(--way); }
.alert-info { background: var(--surface-2); color: var(--ink-2); }
.alert-info i { color: var(--soft); }
.alert-success { background: var(--ok-bg); color: var(--ok); }
.alert-danger { background: var(--no-bg); color: var(--no); }
.email-status-info, .email-status-success, .email-status-error {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border: 0; border-radius: var(--r-md); font-size: var(--fs-14);
}
.email-status-info { background: var(--surface-2); color: var(--ink-2); }
.email-status-success { background: var(--ok-bg); color: var(--ok); }
.email-status-error { background: var(--no-bg); color: var(--no); }
.email-status-info i, .email-status-success i, .email-status-error i { margin-top: 3px; flex: none; font-size: 13px; }

/* 13. BOQ summary (light, like the BBC order summary) --------------------- */
.summary-panel {
  position: sticky; top: 24px;
  flex: 0 0 var(--summary-w); width: var(--summary-w); margin: var(--s-6) 0;
  display: flex; flex-direction: column; overflow: hidden;
  max-height: calc(100dvh - 132px);
  background: var(--band); border: 0; border-radius: var(--r-lg);
}
.summary-header { flex: none; padding: 22px 22px 12px; background: transparent; border: 0; }
.summary-header h3 { font-size: var(--fs-18); font-weight: 600; letter-spacing: 0; color: var(--ink); }
.summary-header h3 > i { display: none !important; }
.summary-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 22px; }
.summary-item { padding: 12px 0; border-top: 1px solid var(--line); }
.summary-item .s-category { margin-bottom: 2px; font-size: var(--fs-12); font-weight: 500; color: var(--ink-3); text-transform: none; letter-spacing: 0; }
.summary-item .s-model { margin-bottom: 4px; font-size: var(--fs-14); font-weight: 500; line-height: 1.4; color: var(--ink); }
.summary-item .s-detail { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.summary-item .s-qty { font-size: var(--fs-13); color: var(--ink-3); }
.summary-item .s-subtotal { font-size: var(--fs-14); font-weight: 600; color: var(--ink); }
.summary-empty { padding: 24px 0 28px; text-align: left; color: var(--ink-3); border-top: 1px solid var(--line); }
.summary-empty i { display: none; }
.summary-empty p { font-size: var(--fs-14); }
.summary-total { flex: none; margin: 0 22px; padding: 14px 0 4px; background: transparent; color: var(--ink); border-top: 2px solid var(--ink); }
.summary-total .total-label { font-size: var(--fs-13); font-weight: 500; color: var(--ink-2); opacity: 1; text-transform: none; letter-spacing: 0; }
.summary-total .total-amount { margin-top: 2px; font-size: var(--fs-30); font-weight: 600; letter-spacing: 0; line-height: 1.15; color: var(--ink); overflow-wrap: anywhere; }
.summary-actions { flex: none; display: flex; flex-direction: column; gap: 8px; padding: 14px 22px 22px; background: transparent; border: 0; }
.summary-actions .btn { width: 100%; }

/* 14. Tables --------------------------------------------------------------- */
.data-table, .report-table, .server-config-table, .report-server-config table { width: 100%; border-collapse: collapse; font-size: var(--fs-14); }
.data-table th, .report-table th, .server-config-table th, .report-server-config table th {
  padding: 10px 14px; text-align: left; white-space: nowrap;
  background: transparent; color: var(--ink-3); border: 0; border-bottom: 1px solid var(--line-2);
  font-size: var(--fs-12); font-weight: 500; letter-spacing: 0; text-transform: uppercase;
}
.data-table td, .report-table td, .server-config-table td, .report-server-config table td {
  padding: 12px 14px; vertical-align: middle; color: var(--ink); border: 0; border-bottom: 1px solid var(--line); line-height: 1.5;
}
.data-table tr:hover td, .report-table tr:hover td { background: var(--surface-2); }
.data-table tr:last-child td, .report-table tr:last-child td { border-bottom: 0; }
.server-config-table tr:nth-child(even) td, .report-server-config table tr:nth-child(even) td { background: transparent; }
.report-table .total-row td { background: transparent; border-top: 2px solid var(--ink); font-size: var(--fs-15); font-weight: 600; }

/* 15. Modals, lightbox ----------------------------------------------------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: var(--scrim); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
  display: flex; flex-direction: column; width: 100%; max-width: 640px; max-height: 90vh; overflow: hidden;
  background: var(--surface); border: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-2);
  transform: translateY(8px); transition: transform .25s var(--ease);
}
.modal-overlay.active .modal { transform: none; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 24px 12px; border: 0; }
.modal-header h3 { font-size: var(--fs-20); font-weight: 600; letter-spacing: 0; }
.modal-header h3 > i { display: none; }
.modal-close {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none;
  background: var(--surface-2); color: var(--ink-2); border: 0; border-radius: 50%; font-size: 15px; cursor: pointer; transition: background .2s;
}
.modal-close:hover { background: var(--line); color: var(--ink); }
.modal-body { flex: 1; overflow-y: auto; padding: 8px 24px 20px; }
.modal-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 16px 24px 22px; background: var(--surface); border-top: 1px solid var(--line); }
.lead-capture-modal, .feedback-modal { max-width: 580px; }
.lead-capture-intro { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; padding: 16px; background: var(--surface-2); border: 0; border-radius: var(--r-md); }
.lead-capture-icon { display: none; }
.lead-capture-intro strong { display: block; margin-bottom: 3px; font-size: var(--fs-15); color: var(--ink); }
.lead-capture-intro p { font-size: var(--fs-14); line-height: 1.5; color: var(--ink-2); }
.lead-consent-option {
  display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; color: var(--ink-2); font-size: var(--fs-14); line-height: 1.5;
}
.lead-consent-option:hover { border-color: var(--line-2); }
.lead-consent-option input { width: 16px; height: 16px; margin-top: 3px; flex: none; accent-color: var(--accent); }
.lead-consent-option em { display: block; margin-top: 3px; font-size: var(--fs-12); font-style: normal; color: var(--ink-3); }
.lead-privacy-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; font-size: var(--fs-12); line-height: 1.5; color: var(--ink-3); }
.lead-privacy-note i { margin-top: 2px; flex: none; color: var(--ok); }

.lightbox-overlay {
  position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(4,8,10,.92); opacity: 0; pointer-events: none; transition: opacity .25s;
}
.lightbox-overlay.active { opacity: 1; pointer-events: all; }
.lightbox-img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: var(--r-md); transform: scale(.97); transition: transform .25s var(--ease); }
.lightbox-overlay.active .lightbox-img { transform: none; }
.lightbox-close, .lightbox-nav {
  position: fixed; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: var(--stage-ink); border: 1px solid rgba(255,255,255,.18); cursor: pointer; transition: background .2s;
}
.lightbox-close { top: 20px; right: 24px; font-size: 18px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); font-size: 15px; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.22); }
.lightbox-prev { left: 20px; } .lightbox-next { right: 20px; }
.lightbox-nav.hidden { opacity: 0; pointer-events: none; }
.lightbox-counter { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 6px 14px; border-radius: var(--r-pill); background: rgba(255,255,255,.12); color: var(--stage-ink); font-size: var(--fs-13); font-weight: 500; }

/* 16. Feedback ------------------------------------------------------------- */
.feedback-fab {
  position: fixed; right: 24px; bottom: 96px; z-index: 200;
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-pill);
  font-family: inherit; font-size: var(--fs-14); font-weight: 600; text-decoration: none;
  box-shadow: var(--shadow-1); cursor: pointer; transition: border-color .2s, transform .2s;
}
.feedback-fab:hover { border-color: var(--ink); transform: translateY(-1px); background: var(--surface); }
.feedback-fab i { font-size: 13px; color: var(--ink-3); }
/* on the step page the button lives in the bottom bar, next to Previous, so it never covers the summary */

body:has(.step-nav) .feedback-fab:hover { color: var(--ink); border-color: var(--line-2); transform: none; }
.feedback-category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
.feedback-cat-btn {
  display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md);
  font-family: inherit; font-size: var(--fs-14); font-weight: 500; cursor: pointer; transition: border-color .2s, background .2s;
}
.feedback-cat-btn:hover { border-color: var(--line-2); background: var(--surface); }
.feedback-cat-btn.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--accent-soft) 40%, #FFFFFF); color: var(--ink); }
.feedback-cat-btn .cat-icon { font-size: 15px; }
.upload-area {
  position: relative; padding: 22px; text-align: center; cursor: pointer;
  background: var(--surface-2); border: 1.5px dashed var(--line-2); border-radius: var(--r-md); transition: border-color .2s, background .2s;
}
.upload-area:hover, .upload-area.drag-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 35%, #FFFFFF); }
.upload-area.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.upload-area input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-area.disabled input[type="file"] { pointer-events: none; }
.upload-icon { margin-bottom: 6px; font-size: 20px; color: var(--ink-3); }
.upload-text { font-size: var(--fs-14); font-weight: 500; color: var(--ink-2); }
.upload-hint { margin-top: 3px; font-size: var(--fs-12); color: var(--ink-3); }
.upload-limit-msg { display: none; margin-top: 6px; font-size: var(--fs-12); font-weight: 600; color: var(--way); }
.image-preview-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.image-preview-item { position: relative; width: 100px; height: 80px; flex: none; border-radius: var(--r-sm); overflow: visible; }
.image-preview-item img { display: block; width: 100px; height: 80px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r-sm); }
.image-preview-remove {
  position: absolute; top: -8px; right: -8px; z-index: 10; display: grid; place-items: center; width: 22px; height: 22px;
  background: var(--ink); color: #FFFFFF; border: 2px solid var(--surface); border-radius: 50%; font-size: 11px; font-weight: 600; cursor: pointer;
}
.image-preview-remove:hover { background: var(--no); }
.image-preview-name { max-width: 100px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font-size: var(--fs-12); color: var(--ink-3); }
.feedback-success { padding: 40px 20px; text-align: center; }
.feedback-success .success-icon { display: block; margin-bottom: 12px; font-size: 40px; animation: aePop .4s cubic-bezier(.34,1.56,.64,1); }
@keyframes aePop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.feedback-success h3 { margin-bottom: 6px; font-size: var(--fs-20); }
.feedback-success p { font-size: var(--fs-14); color: var(--ink-3); }
.feedback-thumb { width: 52px; height: 40px; margin-right: 4px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; transition: transform .15s; }
.feedback-thumb:hover { transform: scale(1.06); border-color: var(--line-2); }

/* 17. Server config, email card, references ------------------------------- */
.server-config-collapsible { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.server-config-toggle {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 14px 18px; text-align: left;
  background: var(--surface); color: var(--ink); border: 0; font-size: var(--fs-14); font-weight: 600; cursor: pointer; transition: background .15s;
}
.server-config-toggle:hover { background: var(--surface-2); }
.server-config-toggle .toggle-icon { font-size: 12px; color: var(--ink-3); }
.server-config-body { padding: 4px 18px 18px; }
.server-config-table { margin-bottom: 12px; font-size: var(--fs-13); }
.server-config-notes { margin: 0; padding-left: 18px; font-size: var(--fs-13); line-height: 1.7; color: var(--ink-3); }
.report-server-config { margin-top: 20px; padding: 18px 20px; background: var(--surface-2); border: 0; border-radius: var(--r-md); }
.report-server-config h4 { margin-bottom: 12px; font-size: var(--fs-15); font-weight: 600; color: var(--ink); text-transform: none; letter-spacing: 0; }
.report-server-config ul { margin: 10px 0 0; padding-left: 18px; font-size: var(--fs-13); line-height: 1.7; color: var(--ink-3); }
.email-send-card { margin-bottom: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: none; }
.email-send-header { display: flex; align-items: center; gap: 10px; padding: 18px 24px 8px; background: transparent; border: 0; }
.email-send-header h3 { margin: 0; font-size: var(--fs-18); font-weight: 600; color: var(--ink); }
.email-send-header i { display: none; }
.email-send-body { padding: 8px 24px 22px; }
@keyframes email-card-pulse {
  0%, 100% { box-shadow: none; border-color: var(--line); }
  40% { box-shadow: 0 0 0 4px var(--accent-soft); border-color: var(--accent); }
}
.email-card-highlight { animation: email-card-pulse 1.6s ease-out forwards; }
.server-ref-links { display: flex; flex-direction: column; gap: 0; margin-top: 14px; border-top: 1px solid var(--line); }
.server-ref-link {
  display: flex; align-items: center; gap: 10px; padding: 12px 2px;
  background: transparent; color: var(--ink); border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  font-size: var(--fs-14); font-weight: 500; text-decoration: none; transition: color .15s;
}
.server-ref-link:hover { color: var(--accent); background: transparent; text-decoration: none; }
.server-ref-link .ref-icon { display: none; }
.server-ref-link .ref-label { flex: 1; }
.server-ref-link .ref-arrow { flex: none; font-size: 11px; color: var(--ink-3); opacity: 1; }
.report-server-config .server-ref-links { margin-top: 16px; }
.skeleton-line {
  border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%);
  background-size: 600px 100%; animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
@keyframes skeleton-shimmer { 0% { background-position: -600px 0; } 100% { background-position: 600px 0; } }

/* 18. Admin, login, report, stats ----------------------------------------- */
.admin-layout { min-height: 100vh; background: var(--band); }
.admin-header {
  position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 64px; padding: 0 var(--page-gutter); background: var(--stage); color: var(--stage-ink);
}
.admin-header-logo { display: flex; align-items: center; gap: 12px; }
.admin-header-logo img { height: 28px; max-width: 220px; object-fit: contain; filter: brightness(0) invert(1); }
.admin-nav-tabs {
  display: flex; gap: 4px; overflow-x: auto; width: 100%; padding: 0 var(--page-gutter);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.admin-tab {
  position: relative; flex: none; padding: 16px 14px; margin-bottom: -1px;
  background: transparent; color: var(--ink-2); border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  font-size: var(--fs-15); font-weight: 500; white-space: nowrap; cursor: pointer; transition: color .2s, border-color .2s;
}
.admin-tab:hover { color: var(--ink); }
.admin-tab.active { color: var(--ink); border-bottom-color: var(--accent); background: transparent; }
.admin-content { width: calc(100% - 2 * var(--page-gutter)); max-width: var(--page-width); margin: 0 auto; padding: var(--s-6) 0; }
.admin-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.admin-panel .card { overflow-x: auto; }
.admin-panel .data-table { min-width: 880px; }

.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 32px 16px; background: var(--stage); }
.login-card { width: 100%; max-width: 420px; padding: 40px; background: var(--surface); border: 0; border-radius: var(--r-xl); box-shadow: none; }
.login-logo { margin-bottom: 28px; text-align: center; }
.login-logo img { height: 32px; max-width: 240px; object-fit: contain; }
.login-title { margin-bottom: 4px; text-align: center; font-size: var(--fs-24); font-weight: 600; letter-spacing: 0; }
.login-sub { margin-bottom: 28px; text-align: center; font-size: var(--fs-14); color: var(--ink-3); }
.login-card .btn { width: 100%; }

.report-page { min-height: 100vh; padding: var(--s-6) var(--page-gutter); background: var(--band); }
.report-container { max-width: var(--page-width); margin: 0 auto; }
.report-doc { margin-bottom: 24px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: none; }
.report-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 32px 40px; border-bottom: 1px solid var(--line); }
.report-header img { height: 32px; max-width: 240px; object-fit: contain; }
.report-title-block h1 { font-size: var(--fs-24); font-weight: 600; letter-spacing: 0; }
.report-title-block p { font-size: var(--fs-13); color: var(--ink-3); }
.report-meta { padding: 20px 40px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.report-meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.meta-item .meta-label { font-size: var(--fs-12); font-weight: 500; color: var(--ink-3); text-transform: none; letter-spacing: 0; }
.meta-item .meta-value { font-size: var(--fs-15); font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.report-body { padding: 32px 40px; }
.report-table-wrap { margin-bottom: 24px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.report-table { min-width: 900px; font-size: var(--fs-13); }
.report-table th { background: var(--surface-2); }
.report-footer-notes { margin-bottom: 24px; padding: 16px 20px; background: var(--surface-2); border: 0; border-radius: var(--r-md); }
.report-footer-notes h4 { margin-bottom: 8px; font-size: var(--fs-14); font-weight: 600; color: var(--ink); }
.report-footer-notes p, .report-footer-notes li { font-size: var(--fs-13); line-height: 1.7; color: var(--ink-2); }
.report-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; padding: 24px 0; }
.report-grand-total, .report-grand-total #reportTotal { color: var(--ink) !important; }
/* the report is also rendered to PDF at a fixed width */
.report-doc.pdf-render { width: 1312px !important; max-width: none !important; }
.pdf-render .report-header { flex-direction: row; }
.pdf-render .report-meta-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pdf-render .report-table-wrap { overflow: visible; }
.pdf-render .report-grand-total { display: block !important; width: 280px; margin-left: auto; text-align: right; }
.pdf-render #reportTotal { display: block; white-space: nowrap; line-height: 1.55; }
.pdf-render .report-header, .pdf-render .report-body { padding: 32px 40px; }
.pdf-render .report-meta { padding: 24px 40px; }

.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); margin-bottom: 28px; }
.stat-card { min-width: 0; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.stat-card .stat-label { font-size: var(--fs-13); font-weight: 500; color: var(--ink-3); text-transform: none; letter-spacing: 0; }
.stat-card .stat-value { margin: 4px 0; font-size: var(--fs-30); font-weight: 600; letter-spacing: 0; color: var(--ink); overflow-wrap: anywhere; }
.stat-card .stat-sub { font-size: var(--fs-12); color: var(--ink-3); }
.stat-card.highlight { background: var(--surface); border-color: var(--way); }
.stat-card.highlight .stat-value { color: var(--way); }

/* 19. Utilities (same names as before) ------------------------------------ */
.text-center { text-align: center; } .text-right { text-align: right; }
.font-bold { font-weight: 600; } .text-sm { font-size: var(--fs-13); } .text-xs { font-size: var(--fs-12); }
.text-muted { color: var(--ink-3); } .text-success { color: var(--ok); } .text-warning { color: var(--way); } .text-danger { color: var(--no); }
.mb-0 { margin-bottom: 0; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mr-2 { margin-right: 8px; }
.hidden { display: none !important; }
.flex { display: flex; } .items-center { align-items: center; } .items-start { align-items: flex-start; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 21. Responsive ----------------------------------------------------------- */
@media (max-width: 1180px) {
  .quick-links { order: 4; flex-basis: 100%; justify-content: flex-start; }
  .app-header .btn { margin-left: auto; }
}
@media (max-width: 1024px) {
  :root { --page-gutter: 32px; --summary-w: 300px; }
  .app-layout { gap: var(--s-5); }
  .select-cards.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step-header h2 { font-size: var(--fs-24); }
}
@media (max-width: 860px) {
  /* summary moves under the form instead of disappearing */
  .app-layout { display: block; }
  .summary-panel { position: static; width: auto; max-height: none; margin: 0 0 var(--s-6); }
  .summary-body { max-height: none; }
}
@media (max-width: 768px) {
  :root { --page-gutter: 16px; --header-h: 60px; }
  body:has(.step-nav) { padding-bottom: 116px; }
  .rrp-banner { font-size: var(--fs-12); padding: 8px var(--page-gutter); }
  .app-header { gap: 10px 16px; padding: 10px var(--page-gutter); }
  .app-logo img { height: 32px; max-width: 170px; }
  .app-title { display: none; }
  .quick-links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .quick-links::-webkit-scrollbar { display: none; }
  .quick-links-label { display: none; }
  .quick-link { flex: none; }
  .step-node { padding: 12px 0; }
  .step-label { display: none; }
  .step-node.active .step-label { display: inline; }
  .step-connector { width: 16px; margin: 0 8px; }
  .main-content { padding: var(--s-5) 0; }
  .step-header h2 { font-size: var(--fs-24); }
  .step-header p { font-size: var(--fs-15); }
  .card, .plan-card { padding: 16px; }
  .select-cards.cols-2, .select-cards.cols-3, .plan-compare, .feedback-category-grid { grid-template-columns: minmax(0, 1fr); }
  .check-item { flex-wrap: wrap; gap: 8px 12px; }
  .check-item .item-info { flex-basis: calc(100% - 32px); }
  .check-item .item-price { margin-left: 30px; text-align: left; }
  .step-nav { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; padding: 12px var(--page-gutter); }
  .step-nav #stepIndicator { grid-column: 1 / -1; grid-row: 1; text-align: center; white-space: nowrap; }
  .step-nav #prevBtn { grid-column: 1; grid-row: 2; }
  .step-nav #nextBtn { grid-column: 2; grid-row: 2; justify-self: end; }
  .step-nav .btn { min-width: 0; height: 44px; padding: 0 18px; }
  .feedback-fab { right: 16px; bottom: 24px; height: 40px; padding: 0 14px; }
  
  .modal-header { padding: 18px 16px 8px; } .modal-body { padding: 8px 16px 16px; } .modal-footer { padding: 14px 16px 16px; }
  .admin-header { height: auto; min-height: 60px; padding: 12px var(--page-gutter); flex-wrap: wrap; }
  .admin-content { padding: var(--s-5) 0; }
  .report-page { padding: 24px 16px; }
  .report-header { flex-direction: column; padding: 24px 16px; }
  .report-title-block { text-align: left !important; }
  .report-meta, .report-body { padding: 16px; }
  .report-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-actions { justify-content: flex-start; gap: 8px; }
  .server-config-body { overflow-x: auto; }
  .server-config-table { min-width: 480px; }
  #finalSummaryContent table { table-layout: fixed; }
  #finalSummaryContent td { overflow-wrap: anywhere; }
}
@media (max-height: 760px) and (min-width: 861px) {
  .summary-panel { position: static; max-height: none; }
  .step-nav { position: static; }
}

/* Application integration: real navigation controls, not floating substitutes. */
.app-header { position: relative; top: auto; }
.summary-panel { top: 24px; max-height: max(320px, calc(100dvh - 320px)); }
.summary-price-note { color: var(--ink-3); font-size: var(--fs-12); margin-top: 6px; line-height: 1.55; }
.step-nav { display: grid; grid-template-columns: 150px 150px 1fr 150px; }
.step-nav #prevBtn { grid-column: 1; grid-row: 1; }
.step-nav .nav-feedback { grid-column: 2; grid-row: 1; }
.step-nav #stepIndicator { grid-column: 3; grid-row: 1; text-align: center; }
.step-nav #nextBtn { grid-column: 4; grid-row: 1; }
.report-grand-total { display: inline-block; min-width: 280px; padding: 16px 24px; background: var(--surface-2); border-top: 2px solid var(--ink); border-radius: var(--r-md); }
.btn-primary:hover, .btn-success:hover { background: var(--accent-hover); box-shadow: none; transform: none; }
.badge-recommend { white-space: normal; }
.modal-footer .btn { white-space: normal; height: auto; min-height: 46px; padding-top: 10px; padding-bottom: 10px; line-height: 1.4; }
.progress-steps { max-width: var(--page-width); margin-inline: auto; }
@media (max-width: 860px) {
  .summary-panel { position: static; max-height: none; }
}
@media (max-width: 768px) {
  .step-nav { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .step-nav #stepIndicator { grid-column: 1 / -1; grid-row: 1; }
  .step-nav #prevBtn { grid-column: 1; grid-row: 2; }
  .step-nav .nav-feedback { grid-column: 2; grid-row: 2; }
  .step-nav #nextBtn { grid-column: 3; grid-row: 2; justify-self: stretch; }
  .step-nav .btn { min-width: 0; padding: 0 10px; font-size: var(--fs-13); gap: 6px; }
  .report-grand-total { min-width: 0; width: 100%; }
  .modal-footer { flex-wrap: wrap; }
}
@media (max-height: 800px) {
  .summary-panel { position: static; max-height: none; }
  .summary-body { flex: 0 1 auto; max-height: 360px; }
  .step-nav { position: static; }
  body:has(.step-nav) { padding-bottom: 0; }
}

/* 22. Motion and print ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .rrp-banner, .app-header, .progress-bar-wrap, .step-nav, .feedback-fab, .summary-actions, .report-actions, .modal-overlay { display: none !important; }
  body, .report-page { background: #FFFFFF; }
  .report-doc, .card { border-color: #C9D3D6; break-inside: avoid; }
  .report-table thead { display: table-header-group; }
}
