/* Quote Rave — Global Stylesheet
   Logo-derived palette, dark (default) + light via [data-theme]
   Dark:  bg #1A232D · card #222E3A · border #3E4C5C · accent #F5871E
   Light: bg #FAFAF9 · card #EFF2F5 · border #D3D9DF · accent #F5871E (bg) / #AD5306 (text)
   Fonts: DM Serif Display (headings) · Inter (body)
   WCAG 2.1 AA compliant — all contrast ratios verified against both modes
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Inter:wght@300;400;500;600&display=swap');
@import url('https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@latest/tabler-icons.min.css');

/* ─── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #020300;
  color: #F4F2EE;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ─── CSS VARIABLES ──────────────────────────────────────────────────────── */
:root {
  --black:   #1A232D;
  --khaki:   #222E3A;
  --stone:   #3E4C5C;
  --lav:     #F5871E;
  --lav-btn: #F5871E;
  --lav-hover: #DE7A1A;
  --lav-active: #C46B16;
  --white:   #F4F2EE;

  /* Opacity variants */
  --white-55: rgba(244, 242, 238, 0.55);
  --white-12: rgba(244, 242, 238, 0.12);
  --white-08: rgba(244, 242, 238, 0.08);
  --lav-15:   rgba(245, 135, 30, 0.15);
  --lav-35:   rgba(245, 135, 30, 0.35);

  /* Status colors */
  --green:   #6DBF7E;
  --amber:   #E8AE1E;
  --red:     #EC6F6E;

  /* Typography */
  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  /* Spacing */
  --nav-h: 60px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 100px;
}

/* ─── LIGHT MODE ─────────────────────────────────────────────────────────── */
/* Applied when the device prefers light AND the user hasn't manually chosen
   dark, OR when the user has manually chosen light in Settings. */
@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]) {
    --black:   #FAFAF9;
    --khaki:   #EFF2F5;
    --stone:   #D3D9DF;
    --lav:     #AD5306;
    --lav-btn: #F5871E;
    --lav-hover: #C46B16;
    --lav-active: #8F4004;
    --white:   #1A232D;
    --white-55: rgba(26, 35, 45, 0.68);
    --white-12: rgba(26, 35, 45, 0.12);
    --white-08: rgba(26, 35, 45, 0.08);
    --lav-15:   rgba(245, 135, 30, 0.12);
    --lav-35:   rgba(245, 135, 30, 0.30);
    --green:   #2F6A38;
    --amber:   #8A660B;
    --red:     #B92E2D;
  }
}
html[data-theme="light"] {
  --black:   #FAFAF9;
  --khaki:   #EFF2F5;
  --stone:   #D3D9DF;
  --lav:     #AD5306;
  --lav-btn: #F5871E;
  --lav-hover: #C46B16;
  --lav-active: #8F4004;
  --white:   #1A232D;
  --white-55: rgba(26, 35, 45, 0.68);
  --white-12: rgba(26, 35, 45, 0.12);
  --white-08: rgba(26, 35, 45, 0.08);
  --lav-15:   rgba(245, 135, 30, 0.12);
  --lav-35:   rgba(245, 135, 30, 0.30);
  --green:   #2F6A38;
  --amber:   #8A660B;
  --red:     #B92E2D;
}

/* ─── FOCUS RINGS (WCAG 2.1 §2.4.7) ─────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--lav);
  outline-offset: 2px;
}

/* ─── SCREEN READER ONLY ────────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ─── NAVIGATION ─────────────────────────────────────────────────────────── */
.qr-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(2, 3, 0, 0.97);
  border-bottom: 0.5px solid var(--white-12);
  height: var(--nav-h);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  gap: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.qr-nav-logo {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}

.qr-nav-logo-icon {
  width: 30px; height: 30px;
  border-radius: 7px; overflow: hidden; flex-shrink: 0;
}

.qr-nav-logo-icon img { width: 100%; height: 100%; object-fit: cover; }

.qr-nav-logo-name {
  font-family: var(--font-serif);
  font-size: clamp(15px, 3vw, 18px);
  color: var(--white);
  letter-spacing: 0.01em;
}

.qr-nav-links {
  display: flex; align-items: center;
  gap: clamp(4px, 1.5vw, 20px);
}

.qr-nav-link {
  font-size: 13px; color: var(--white-55);
  padding: 6px 4px;
  white-space: nowrap;
  min-height: 44px; display: inline-flex; align-items: center;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}
.qr-nav-link:hover, .qr-nav-link.active { color: var(--lav); }
.qr-nav-link.active { background: var(--lav-15); padding: 6px 10px; }

.qr-nav-login {
  font-size: 13px; color: var(--lav);
  padding: 6px 4px; min-height: 44px;
  display: inline-flex; align-items: center;
}

.qr-nav-cta {
  background: var(--lav-btn); color: var(--black);
  border: none; border-radius: var(--radius-sm);
  padding: 8px 16px; font-size: 13px; font-weight: 500;
  min-height: 36px; white-space: nowrap;
  transition: opacity 0.15s;
}
.qr-nav-cta:hover { opacity: 0.9; }

.qr-hamburger {
  display: none; flex-direction: column; gap: 4px;
  padding: 10px 4px; min-width: 44px; min-height: 44px;
  justify-content: center; align-items: center;
  background: transparent; border: none;
}
.qr-hamburger span {
  display: block; width: 18px; height: 1.5px;
  background: var(--white-55); border-radius: 2px;
}

@media (max-width: 640px) {
  .qr-nav-links { display: none; }
  .qr-hamburger { display: flex; }
}

/* Mobile/tablet nav drawer — left slide-in panel, active up to 1024px only.
   Desktop (1025px+) keeps the standard horizontal nav untouched. */
.qr-nav-backdrop {
  display: none; position: fixed; inset: 0; z-index: 98;
  background: rgba(0, 0, 0, 0.5); opacity: 0;
  transition: opacity 0.25s ease;
}
.qr-nav-backdrop.open { display: block; opacity: 1; }

.qr-nav-drawer {
  display: none; position: fixed; top: 0; left: 0; bottom: 0; z-index: 99;
  width: 270px; max-width: 82vw;
  background: var(--khaki); border-right: 0.5px solid var(--stone);
  padding: 16px 16px 16px 60px;
  flex-direction: column; gap: 4px;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
}
@media (max-width: 1024px) { .qr-nav-drawer { display: flex; } }
.qr-nav-drawer.open { transform: translateX(0); }

.qr-nav-drawer .qr-drawer-identity {
  margin-top: 40px; margin-bottom: 4px;
}
.qr-nav-drawer .qr-drawer-name  { font-size: 13px; color: var(--white); font-weight: 500; }
.qr-nav-drawer .qr-drawer-email { font-size: 11px; color: var(--white-55); margin-bottom: 14px; }

.qr-nav-drawer .qr-drawer-credits {
  background: var(--black); border-radius: 8px; padding: 10px 12px;
  margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between;
}
.qr-nav-drawer .qr-drawer-credits span:first-child { font-size: 11px; color: var(--white-55); }
.qr-nav-drawer .qr-drawer-credits span:last-child  { font-size: 13px; font-weight: 500; color: var(--lav); }

.qr-nav-drawer .qr-nav-link {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; min-height: 44px; justify-content: flex-start; padding: 0 8px;
  border-radius: 8px;
}
.qr-nav-drawer .qr-nav-link.active { background: var(--black); color: var(--white); }
.qr-nav-drawer .qr-nav-link i { font-size: 16px; width: 18px; }
.qr-nav-drawer .drawer-close {
  position: absolute; top: 16px; right: 16px;
  background: transparent; border: none; color: var(--white-55);
  font-size: 20px; min-width: 40px; min-height: 40px;
  display: flex; align-items: center; justify-content: center;
}
.qr-nav-drawer .qr-drawer-divider { border-top: 0.5px solid var(--stone); margin: 10px 0; }

/* Persistent avatar button — visible alongside hamburger on mobile/tablet only */
.qr-nav-avatar {
  display: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--lav-btn); border: none; align-items: center; justify-content: center;
  color: var(--black); font-size: 15px; cursor: pointer; flex-shrink: 0;
  position: relative; z-index: 100;
  transition: transform 0.28s ease;
}
@media (max-width: 1024px) { .qr-nav-avatar { display: flex; } }
.qr-nav-avatar.merged { transform: translate(-224px, 44px); }

.qr-avatar-popover {
  display: none; position: fixed; z-index: 101;
  width: 200px; background: var(--khaki); border: 0.5px solid var(--stone);
  border-radius: 12px; padding: 12px;
  top: 58px; right: 16px;
}
.qr-avatar-popover.open { display: block; }
.qr-avatar-popover .qr-pop-name  { font-size: 13px; color: var(--white); font-weight: 500; }
.qr-avatar-popover .qr-pop-email { font-size: 11px; color: var(--white-55); margin-bottom: 10px; padding-bottom: 10px; border-bottom: 0.5px solid var(--stone); }
.qr-avatar-popover .qr-pop-link {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--white); padding: 8px 6px; border-radius: 6px;
  min-height: 36px;
}
.qr-avatar-popover .qr-pop-link.danger { color: var(--red); }

/* ─── PAGE WRAPPER ───────────────────────────────────────────────────────── */
.qr-page {
  min-height: calc(100vh - var(--nav-h));
  padding: 20px clamp(16px, 4vw, 32px) 40px;
  max-width: 520px;
  margin: 0 auto;
}

/* ─── CARDS ──────────────────────────────────────────────────────────────── */
.qr-card {
  background: var(--khaki);
  border: 0.5px solid var(--stone);
  border-radius: var(--radius);
  padding: clamp(14px, 3vw, 18px);
  margin-bottom: 12px;
}

.qr-card-accent { border-color: var(--lav-35); }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────────────────── */
.qr-heading {
  font-family: var(--font-serif);
  font-size: clamp(22px, 5vw, 28px);
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 4px;
}

.qr-subhead {
  font-size: 13px; color: var(--white-55);
  line-height: 1.6; margin-bottom: 16px;
}

.qr-lav-line {
  width: 28px; height: 2px;
  background: var(--lav-btn); margin: 8px 0 14px;
}

.qr-label {
  display: block;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--lav); margin-bottom: 6px;
}

.qr-label-optional {
  font-size: 10px; color: var(--white-55);
  text-transform: none; letter-spacing: 0; font-weight: 400;
}

/* ─── FORM ELEMENTS ──────────────────────────────────────────────────────── */
.qr-input {
  width: 100%; padding: 10px 12px;
  border: 0.5px solid var(--stone);
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--white);
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 0.15s;
  min-height: 44px;
}
select.qr-input option {
  background: var(--khaki);
  color: var(--white);
}
.qr-input::placeholder { color: var(--white-55); }
.qr-input:focus { border-color: var(--lav); outline: none; }
.qr-input.error { border-color: var(--red); }

.qr-select {
  width: 100%; padding: 10px 12px;
  border: 0.5px solid var(--stone);
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--white);
  background: var(--khaki);
  min-height: 44px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239BA8B5' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.qr-select option {
  background: var(--khaki);
  color: var(--white);
}
.qr-select:focus { border-color: var(--lav); outline: none; }

.qr-textarea {
  width: 100%; padding: 10px 12px;
  border: 0.5px solid var(--stone);
  border-radius: var(--radius-sm);
  font-size: 13px; color: var(--white);
  background: rgba(255, 255, 255, 0.04);
  resize: vertical; min-height: 80px; line-height: 1.5;
}
.qr-textarea::placeholder { color: var(--white-55); }
.qr-textarea:focus { border-color: var(--lav); outline: none; }

.qr-input-group { margin-bottom: 12px; }

/* Error text */
.qr-error-text {
  font-size: 12px; color: var(--red);
  margin-top: 5px; display: none;
}
.qr-error-text.visible { display: block; }

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.qr-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: 44px; padding: 11px 20px;
  border: none; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; font-family: var(--font-sans);
  cursor: pointer; transition: opacity 0.15s;
}
.qr-btn:hover { opacity: 0.9; }
.qr-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.qr-btn-primary   { background: var(--lav-btn);  color: var(--black); transition: background-color 0.12s ease; }
.qr-btn-primary:hover   { background: var(--lav-hover); }
.qr-btn-primary:active  { background: var(--lav-active); }
.qr-btn-outline   { background: transparent; color: var(--lav);  border: 0.5px solid var(--lav); transition: background-color 0.12s ease, border-color 0.12s ease; }
.qr-btn-outline:hover   { background: var(--lav-15); border-color: var(--lav-hover); }
.qr-btn-outline:active  { background: var(--lav-35); }
.qr-btn-ghost     { background: transparent; color: var(--white-55); border: 0.5px solid var(--stone); transition: background-color 0.12s ease, color 0.12s ease; }
.qr-btn-ghost:hover   { background: var(--white-08); color: var(--white); }
.qr-btn-ghost:active  { background: var(--white-12); }
.qr-btn-danger    { background: rgba(226,75,74,.15); color: var(--red); border: 0.5px solid rgba(226,75,74,.3); }
.qr-btn-success   { background: rgba(109,191,126,.15); color: var(--green); border: 0.5px solid rgba(109,191,126,.3); }
.qr-btn-sm        { width: auto; padding: 7px 14px; font-size: 12px; min-height: 36px; }

/* ─── CHIPS / MULTI-SELECT ───────────────────────────────────────────────── */
.qr-chips {
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-bottom: 12px;
}

.qr-chip {
  padding: 7px 14px;
  border: 0.5px solid var(--stone);
  border-radius: var(--radius-pill);
  font-size: 12px; color: var(--white);
  background: transparent; cursor: pointer;
  min-height: 40px; display: inline-flex; align-items: center;
  transition: all 0.15s; user-select: none;
}
.qr-chip:hover   { border-color: var(--lav); color: var(--lav); }
.qr-chip.selected {
  border-color: var(--lav); color: var(--lav);
  background: var(--lav-15);
}

/* ─── PROGRESS PIPS ──────────────────────────────────────────────────────── */
.qr-pips {
  display: flex; gap: 5px; margin-bottom: 12px;
}
.qr-pip {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--white-12);
}
.qr-pip.done   { background: var(--stone); }
.qr-pip.active { background: var(--lav-btn); }

/* ─── CREDIT PILL ────────────────────────────────────────────────────────── */
.qr-credit-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 500;
}
.qr-credit-pill.green { background: rgba(109,191,126,.15); color: var(--green); }
.qr-credit-pill.amber { background: rgba(232,174,30,.15);  color: var(--amber); }
.qr-credit-pill.red   { background: rgba(226,75,74,.15);   color: var(--red); }

/* ─── STATUS BADGES ──────────────────────────────────────────────────────── */
.qr-badge {
  font-size: 10px; padding: 2px 8px;
  border-radius: var(--radius-pill);
  display: inline-block;
}
.qr-badge-pending  { background: var(--lav-15);                color: var(--lav); }
.qr-badge-accepted { background: rgba(109,191,126,.12);        color: var(--green); }
.qr-badge-standby  { background: rgba(232,174,30,.12);         color: var(--amber); }
.qr-badge-expired  { background: rgba(226,75,74,.12);          color: var(--red); }
.qr-badge-draft    { background: var(--white-08);              color: var(--white-55); }
.qr-badge-sent     { background: rgba(109,191,126,.12);        color: var(--green); }

/* ─── PHOTO UPLOAD ───────────────────────────────────────────────────────── */
.qr-photo-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 8px;
}

.qr-photo-opt {
  border: 0.5px dashed var(--stone);
  border-radius: var(--radius-sm);
  padding: 16px 8px; text-align: center;
  cursor: pointer; min-height: 80px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  background: transparent; font-family: var(--font-sans);
  transition: border-color 0.15s;
}
.qr-photo-opt:hover { border-color: var(--lav); }
.qr-photo-opt i { font-size: 20px; color: var(--lav); }
.qr-photo-opt span { font-size: 12px; color: var(--white); }

.qr-preview-grid {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}
.qr-preview-img {
  width: 64px; height: 64px; border-radius: var(--radius-sm);
  object-fit: cover; border: 0.5px solid var(--stone);
  position: relative;
}
.qr-preview-remove {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--red); color: var(--white);
  border: none; font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ─── HINT OVERLAY ───────────────────────────────────────────────────────── */
.qr-hint-overlay {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: var(--khaki);
  border: 0.5px solid var(--lav-35);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 18px 16px;
  animation: slideUp 0.3s ease;
}
.qr-hint-handle {
  width: 32px; height: 3px;
  background: var(--stone); border-radius: 2px;
  margin: 0 auto 12px;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ─── MODAL / BOTTOM SHEET ───────────────────────────────────────────────── */
.qr-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(2, 3, 0, 0.88);
  display: flex; align-items: flex-end;
}
.qr-overlay.center { align-items: center; padding: 16px; }

.qr-bottom-sheet {
  background: var(--khaki);
  border: 0.5px solid var(--lav-35);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 18px 16px;
  width: 100%; max-height: 90vh; overflow-y: auto;
}

.qr-modal {
  background: var(--khaki);
  border: 0.5px solid var(--lav-35);
  border-radius: var(--radius);
  padding: 22px 18px;
  width: 100%; max-width: 360px;
}

.qr-sheet-handle {
  width: 32px; height: 3px;
  background: var(--stone); border-radius: 2px;
  margin: 0 auto 14px;
}

.qr-sheet-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 14px;
}
.qr-sheet-title {
  font-family: var(--font-serif); font-size: 17px; color: var(--white);
}
.qr-sheet-close {
  width: 32px; height: 32px; border-radius: 50%;
  border: 0.5px solid var(--stone); background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: var(--white-55); font-size: 14px;
}

/* ─── QUOTE HEADER ───────────────────────────────────────────────────────── */
.qr-quote-header {
  background: var(--khaki);
  border-bottom: 0.5px solid var(--stone);
  padding: 20px 16px; text-align: center;
}
.qr-quote-sup {
  font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--lav); margin-bottom: 5px;
}
.qr-quote-name {
  font-family: var(--font-serif);
  font-size: clamp(20px, 5vw, 26px); color: var(--white);
}
.qr-quote-meta {
  font-size: 11px; color: var(--white-55); margin-top: 4px;
}

/* ─── PRICE BLOCK ────────────────────────────────────────────────────────── */
.qr-price-block {
  background: var(--khaki);
  border: 0.5px solid var(--lav-35);
  border-radius: var(--radius);
  padding: 16px; text-align: center;
  margin-bottom: 10px; position: relative; overflow: hidden;
}
.qr-price-bar {
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: var(--lav-btn);
}
.qr-price-label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--white-55); margin-bottom: 6px;
}
.qr-price-amount {
  font-family: var(--font-serif);
  font-size: clamp(28px, 7vw, 36px); color: var(--white);
}
.qr-price-note { font-size: 12px; color: var(--white-55); margin-top: 4px; }
.qr-price-edit {
  margin-top: 8px;
}

/* ─── EXPIRY BAR ─────────────────────────────────────────────────────────── */
.qr-expiry {
  background: var(--khaki); border: 0.5px solid var(--stone);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 10px; gap: 10px;
}
.qr-expiry-lbl { font-size: 11px; color: var(--white-55); }
.qr-expiry-bar {
  height: 2px; background: var(--white-12);
  border-radius: 2px; width: 80px; margin-top: 5px;
}
.qr-expiry-fill {
  height: 2px; background: var(--lav-btn);
  border-radius: 2px; transition: width 0.3s;
}
.qr-expiry-fill.urgent { background: var(--red); }
.qr-expiry-timer {
  font-family: var(--font-serif); font-size: 14px; color: var(--lav);
  white-space: nowrap; flex-shrink: 0;
}
.qr-expiry-timer.urgent { color: var(--red); }

/* ─── REPAIR LIST ────────────────────────────────────────────────────────── */
.qr-repair-list {
  border: 0.5px solid var(--stone);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 10px;
}
.qr-repair-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: var(--khaki);
  border-bottom: 0.5px solid var(--stone);
}
.qr-repair-row:last-child { border-bottom: none; }
.qr-repair-row.new { border-left: 2px solid var(--lav); }
.qr-repair-row.loading { opacity: 0.6; }
.qr-repair-name { font-size: 13px; color: var(--white); }
.qr-repair-remove {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white-55); background: transparent; border: none;
  border-radius: var(--radius-sm); font-size: 14px;
  flex-shrink: 0;
}
.qr-repair-remove:hover { color: var(--red); }

.qr-add-repair {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 12px;
  border: 0.5px dashed var(--stone);
  border-radius: var(--radius);
  background: transparent; color: var(--lav);
  font-size: 13px; font-family: var(--font-sans);
  margin-bottom: 10px; min-height: 44px;
}
.qr-add-repair:hover { border-color: var(--lav); }

/* ─── ACTION BAR (sticky bottom) ─────────────────────────────────────────── */
.qr-action-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: var(--khaki);
  border-top: 0.5px solid var(--stone);
  padding: 10px clamp(14px, 4vw, 20px);
  display: flex; gap: 8px; align-items: center;
}
.qr-action-primary {
  flex: 1; background: var(--lav-btn); color: var(--black);
  border: none; border-radius: var(--radius-sm);
  padding: 10px; font-size: 12px; font-weight: 500;
  min-height: 44px; font-family: var(--font-sans);
}
.qr-action-secondary {
  flex: 1; background: transparent; color: var(--lav);
  border: 0.5px solid var(--lav); border-radius: var(--radius-sm);
  padding: 10px; font-size: 12px; min-height: 44px; font-family: var(--font-sans);
}
.qr-action-icon {
  width: 44px; height: 44px; border-radius: 50%;
  border: 0.5px solid var(--stone); background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: var(--white-55); font-size: 16px; flex-shrink: 0;
}

/* ─── CHAT STYLES ────────────────────────────────────────────────────────── */
.qr-chat-topbar {
  background: var(--khaki);
  border-bottom: 0.5px solid var(--stone);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
}
.qr-cori-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--lav-btn);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600; color: var(--black);
  flex-shrink: 0;
}
.qr-chat-messages {
  flex: 1; padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto;
}
.qr-bubble-ai {
  background: var(--khaki);
  border: 0.5px solid var(--stone);
  border-radius: 14px 14px 14px 3px;
  padding: 10px 13px; font-size: 13px; color: var(--white);
  max-width: 85%; line-height: 1.5;
}
.qr-bubble-user {
  background: var(--lav-btn);
  border-radius: 14px 14px 3px 14px;
  padding: 10px 13px; font-size: 13px; color: var(--black);
  max-width: 85%; align-self: flex-end; line-height: 1.5;
}
.qr-chat-input-row {
  background: var(--khaki);
  border-top: 0.5px solid var(--stone);
  padding: 8px 10px;
  display: flex; align-items: center; gap: 6px;
}
.qr-chat-field {
  flex: 1; border: 0.5px solid var(--stone);
  border-radius: var(--radius-pill);
  padding: 8px 12px; font-size: 13px; color: var(--white);
  background: var(--black); min-height: 40px;
}
.qr-chat-field:focus { border-color: var(--lav); outline: none; }
.qr-chat-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer; font-size: 16px;
}
.qr-chat-send { background: var(--lav-btn); border: none; color: var(--black); }
.qr-chat-mic  { background: transparent; border: 0.5px solid var(--stone); color: var(--white-55); }

/* ─── DASHBOARD LAYOUT ───────────────────────────────────────────────────── */
.qr-dash-layout {
  display: flex; min-height: calc(100vh - var(--nav-h));
}
.qr-dash-sidebar {
  width: 52px; background: #010200;
  border-right: 0.5px solid var(--white-12);
  display: flex; flex-direction: column;
  padding: 10px 0; gap: 2px;
  flex-shrink: 0; position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
}
.qr-dash-logo {
  padding: 8px; display: flex;
  justify-content: center; margin-bottom: 8px;
}
.qr-dash-logo-icon {
  width: 30px; height: 30px; border-radius: 7px; overflow: hidden;
}
.qr-dash-logo-icon img { width: 100%; height: 100%; object-fit: cover; }
.qr-dash-item {
  min-height: 44px; display: flex;
  justify-content: center; align-items: center;
  color: var(--stone); font-size: 17px; cursor: pointer;
  width: 100%; background: transparent; border: none;
  position: relative;
}
.qr-dash-item:hover, .qr-dash-item.active { color: var(--lav); }
.qr-dash-divider {
  height: 0.5px; background: var(--white-12); margin: 4px 8px;
}
.qr-dash-badge {
  position: absolute; top: 8px; right: 8px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lav-btn);
}
.qr-dash-main {
  flex: 1; padding: clamp(14px, 3vw, 20px);
  overflow-y: auto;
}
.qr-dash-title {
  font-family: var(--font-serif);
  font-size: clamp(17px, 4vw, 22px); color: var(--white);
  margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}

/* Dashboard stats grid */
.qr-stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-bottom: 14px;
}
.qr-stat-card {
  background: var(--khaki); border: 0.5px solid var(--stone);
  border-radius: var(--radius); padding: 11px;
}
.qr-stat-label {
  font-size: 11px; font-weight: 500; color: var(--white-55); margin-bottom: 5px;
}
.qr-stat-value {
  font-family: var(--font-serif); font-size: clamp(20px, 5vw, 24px); color: var(--white);
}
.qr-stat-sub { font-size: 10px; color: var(--white-55); margin-top: 2px; }

/* Dashboard table */
.qr-dash-table-header {
  display: flex; justify-content: space-between;
  padding: 0 0 7px; border-bottom: 0.5px solid var(--white-12);
  margin-bottom: 6px;
}
.qr-dash-th {
  font-size: 10px; font-weight: 600; color: var(--white-55);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.qr-dash-row {
  display: flex; justify-content: space-between;
  align-items: center; padding: 9px 0;
  border-bottom: 0.5px solid var(--white-12);
}
.qr-dash-row-name { font-size: 12px; color: var(--white); }
.qr-dash-row-sub  { font-size: 10px; color: var(--white-55); }

/* Push notification banners */
.qr-push-banner {
  background: var(--khaki); border: 0.5px solid var(--lav-35);
  border-radius: var(--radius); padding: 12px 14px;
  margin-bottom: 8px; display: flex; gap: 10px; align-items: flex-start;
}
.qr-push-icon {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--lav-btn);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 15px; color: var(--black);
}
.qr-push-title { font-size: 13px; font-weight: 500; color: var(--white); margin-bottom: 2px; }
.qr-push-body  { font-size: 12px; color: var(--white-55); line-height: 1.4; }
.qr-push-time  { font-size: 10px; color: var(--white-55); margin-top: 3px; }

/* ─── LOADING STATES ─────────────────────────────────────────────────────── */
.qr-loading-dots {
  display: flex; gap: 4px; align-items: center; padding: 4px 0;
}
.qr-loading-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--lav-btn); animation: qr-pulse 1.2s ease-in-out infinite;
}
.qr-loading-dot:nth-child(2) { animation-delay: 0.2s; }
.qr-loading-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes qr-pulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}

.qr-spinner {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--white-12);
  border-top-color: var(--lav);
  animation: qr-spin 0.8s linear infinite;
}
@keyframes qr-spin { to { transform: rotate(360deg); } }

/* ─── TOAST NOTIFICATIONS ────────────────────────────────────────────────── */
#qr-toast-container {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  z-index: 999; display: flex; flex-direction: column;
  align-items: center; gap: 8px; pointer-events: none;
}
.qr-toast {
  background: var(--khaki); border: 0.5px solid var(--stone);
  border-radius: var(--radius-sm); padding: 10px 16px;
  font-size: 13px; color: var(--white);
  display: flex; align-items: center; gap: 8px;
  animation: qr-toast-in 0.25s ease, qr-toast-out 0.25s ease 2.75s forwards;
  pointer-events: auto; white-space: nowrap;
}
.qr-toast.success { border-color: rgba(109,191,126,.35); }
.qr-toast.error   { border-color: rgba(226,75,74,.35); }
.qr-toast i.success { color: var(--green); }
.qr-toast i.error   { color: var(--red); }

@keyframes qr-toast-in  { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
@keyframes qr-toast-out { from { opacity:1; } to { opacity:0; } }

/* ─── LANDING PAGE SPECIFIC ──────────────────────────────────────────────── */
.qr-landing-body { background: var(--black); }

.qr-hero {
  padding: clamp(60px, 10vw, 100px) clamp(20px, 5vw, 60px);
  text-align: center; max-width: 800px; margin: 0 auto;
}
.qr-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 7vw, 64px); color: var(--white);
  line-height: 1.1; margin-bottom: 20px;
}
.qr-hero-title span { color: var(--lav); }
.qr-hero-sub {
  font-size: clamp(15px, 2.5vw, 18px); color: var(--white-55);
  line-height: 1.7; margin-bottom: 36px;
  max-width: 560px; margin-left: auto; margin-right: auto;
}
.qr-hero-btns {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}
.qr-hero-btn-primary {
  background: var(--lav-btn); color: var(--black); border: none;
  border-radius: 10px; padding: 14px 28px; font-size: 15px; font-weight: 500;
  min-height: 50px; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); cursor: pointer;
}
.qr-hero-btn-secondary {
  background: transparent; color: var(--lav); border: 0.5px solid var(--lav);
  border-radius: 10px; padding: 13px 28px; font-size: 15px;
  min-height: 50px; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); cursor: pointer;
}
.qr-get-app-links {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin-top: 14px;
}
.qr-store-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--khaki); border: 0.5px solid var(--stone);
  border-radius: var(--radius-sm); padding: 8px 16px;
  font-size: 12px; color: var(--white-55);
  cursor: pointer; font-family: var(--font-sans);
}
.qr-store-btn:hover { border-color: var(--lav); color: var(--lav); }
.qr-store-btn i { font-size: 16px; }

/* Pricing */
.qr-pricing-section {
  background: rgba(54, 49, 31, 0.25);
  border-top: 0.5px solid var(--stone);
  border-bottom: 0.5px solid var(--stone);
  padding: clamp(60px, 8vw, 90px) clamp(20px, 5vw, 60px);
}
.qr-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-top: 40px;
}
.qr-plan {
  background: var(--khaki); border: 0.5px solid var(--stone);
  border-radius: 14px; padding: 28px; position: relative;
  display: flex; flex-direction: column;
}
.qr-plan.featured { border-color: var(--lav); }
.qr-plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--lav-btn); color: var(--black);
  font-size: 11px; font-weight: 500; padding: 3px 14px;
  border-radius: var(--radius-pill); white-space: nowrap;
}
.qr-plan-name {
  font-size: 12px; font-weight: 600; color: var(--lav);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px;
}
.qr-plan-price {
  font-family: var(--font-serif); font-size: 38px; color: var(--white);
  margin-bottom: 4px; line-height: 1;
}
.qr-plan-price sup { font-size: 18px; font-family: var(--font-sans); }
.qr-plan-price sub { font-size: 15px; color: var(--white-55); font-family: var(--font-sans); }
.qr-plan-price-was {
  font-family: var(--font-sans); font-size: 15px; color: var(--white-55);
  text-decoration: line-through; text-decoration-color: var(--red);
  margin-right: 8px;
}
.qr-plan-sale-badge {
  display: inline-block; font-family: var(--font-sans); font-size: 10px; font-weight: 600;
  color: var(--red); background: rgba(226,75,74,.12); border: 0.5px solid rgba(226,75,74,.3);
  border-radius: 100px; padding: 2px 8px; vertical-align: middle;
}
.qr-plan-credits { font-size: 13px; color: var(--lav); font-weight: 500; margin-bottom: 4px; }
.qr-plan-sub { font-size: 12px; color: var(--white-55); margin-bottom: 14px; line-height: 1.5; }
.qr-plan-divider { height: 0.5px; background: var(--stone); margin-bottom: 14px; }
.qr-plan-signup-offer {
  background: var(--lav-15); border: 0.5px solid var(--lav-35);
  border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: 12px; color: var(--white-55); line-height: 1.5; margin-bottom: 14px;
}
.qr-plan-signup-offer strong { color: var(--lav); }
.qr-plan-features { display: flex; flex-direction: column; gap: 9px; flex: 1; margin-bottom: 20px; }
.qr-plan-feature {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; color: var(--white-55); line-height: 1.4;
}
.qr-plan-feature i { font-size: 13px; color: var(--lav); flex-shrink: 0; margin-top: 1px; }
.qr-plan-feature.dim { color: rgba(244,242,238,0.3); }
.qr-plan-feature.dim i { color: var(--stone); }
.qr-plan-btn-wrap { margin-top: auto; }

/* ─── PROFILE PAGE ───────────────────────────────────────────────────────── */
.qr-profile-avatar {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--lav-15); border: 0.5px solid var(--lav-35);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 20px; color: var(--lav);
  flex-shrink: 0;
}

/* ─── LOGIN PAGE ─────────────────────────────────────────────────────────── */
.qr-login-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px;
}
.qr-login-logo {
  width: 54px; height: 54px; border-radius: 12px; overflow: hidden;
  margin: 0 auto 16px;
}
.qr-login-logo img { width: 100%; height: 100%; object-fit: cover; }
.qr-login-title {
  font-family: var(--font-serif); font-size: 22px; color: var(--white);
  text-align: center; margin-bottom: 5px;
}
.qr-login-sub {
  font-size: 13px; color: var(--white-55); text-align: center; margin-bottom: 24px;
}
.qr-login-card {
  background: var(--khaki); border: 0.5px solid var(--stone);
  border-radius: var(--radius); padding: 22px;
  width: 100%; max-width: 320px;
}

/* ─── 2FA CODE INPUTS ────────────────────────────────────────────────────── */
.qr-code-inputs {
  display: flex; gap: 8px; justify-content: center; margin-bottom: 16px;
}
.qr-code-input {
  width: 40px; height: 48px; border-radius: var(--radius-sm);
  border: 0.5px solid var(--stone); background: rgba(255,255,255,.06);
  font-size: 20px; font-weight: 500; color: var(--white);
  text-align: center; font-family: var(--font-sans);
}
.qr-code-input:focus { border-color: var(--lav); outline: none; }
.qr-code-input.filled { border-color: var(--lav); background: var(--lav-15); }

/* ─── UTILITY ────────────────────────────────────────────────────────────── */
.qr-divider {
  height: 0.5px; background: var(--white-12); margin: 14px 0;
}

.qr-text-center { text-align: center; }
.qr-text-muted  { color: var(--white-55); font-size: 12px; }
.qr-text-lav    { color: var(--lav); }
.qr-text-green  { color: var(--green); }
.qr-text-red    { color: var(--red); }

.qr-flex-between {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.qr-flex-center {
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

.qr-mb-8  { margin-bottom: 8px; }
.qr-mb-12 { margin-bottom: 12px; }
.qr-mb-16 { margin-bottom: 16px; }
.qr-mt-8  { margin-top: 8px; }
.qr-mt-12 { margin-top: 12px; }
.qr-mt-16 { margin-top: 16px; }

/* ─── PRINT STYLES ───────────────────────────────────────────────────────── */
@media print {
  .qr-nav, .qr-action-bar, .qr-btn, .qr-chat-input-row { display: none !important; }
  body { background: white; color: black; }
  .qr-card, .qr-price-block, .qr-repair-list { border-color: #ccc; background: white; }
  .qr-white { color: black; }
}

/* ─── REDUCED MOTION ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN — Quote Rave
   No bottom nav. Top nav only. All screen sizes.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── BOTTOM NAV — DISABLED GLOBALLY ─────────────────────────────────────── */
.qr-bottom-nav { display: none !important; }

/* ─── BACK BUTTON ─────────────────────────────────────────────────────────── */
.qr-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: none;
  color: var(--white-55); font-size: 13px;
  font-family: var(--font-sans); cursor: pointer;
  padding: 10px 0; min-height: 44px;
  margin-bottom: 4px;
}
.qr-back-btn:hover { color: var(--lav); }

/* ─── BASE (all screens) ──────────────────────────────────────────────────── */
.qr-page {
  padding: 20px clamp(14px, 4vw, 32px) 48px;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

/* ─── MOBILE (up to 480px) ────────────────────────────────────────────────── */
@media (max-width: 480px) {
  :root { --nav-h: 56px; }
  .qr-nav { padding: 0 14px; }
  .qr-nav-logo-name { font-size: 15px; }
  .qr-nav-links { gap: 4px; }
  .qr-nav-link { font-size: 12px; padding: 4px 3px; }
  .qr-nav-cta { padding: 7px 12px; font-size: 12px; }
  .qr-heading { font-size: 20px; }
  .qr-chip { padding: 6px 11px; font-size: 12px; }
  .qr-btn { font-size: 13px; min-height: 44px; }
  .qr-code-input { width: 36px; height: 46px; font-size: 18px; }
  .qr-price-amount { font-size: 28px; }
  .qr-page { padding: 16px 14px 40px; }
  .qr-card { padding: 13px 12px; }
  /* Hide nav links on small mobile — show hamburger */
  .qr-nav-links { display: none; }
  .qr-hamburger { display: flex; }
}

/* ─── SMALL MOBILE (up to 360px) ─────────────────────────────────────────── */
@media (max-width: 360px) {
  .qr-nav-logo-name { display: none; }
  .qr-code-input { width: 32px; height: 42px; font-size: 16px; gap: 5px; }
  .qr-code-inputs { gap: 5px; }
}

/* ─── TABLET (481px–768px) ────────────────────────────────────────────────── */
@media (min-width: 481px) and (max-width: 768px) {
  .qr-nav-links { display: none; }
  .qr-hamburger { display: flex; }
  .qr-page { max-width: 600px; padding: 20px 20px 48px; }
  .qr-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .qr-heading { font-size: 24px; }
}

/* ─── LARGE TABLET / SMALL LAPTOP (769px–1024px) ─────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  .qr-nav-links { display: none; }
  .qr-hamburger { display: flex; }
  .qr-page { max-width: 640px; padding: 24px 28px 48px; }
  .qr-stats-grid { grid-template-columns: repeat(4, 1fr); }
  .qr-heading { font-size: 26px; }
  .qr-chips { gap: 7px; }
  .qr-pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .qr-dash-main { max-width: 800px; }
}

/* ─── DESKTOP (1025px+) ───────────────────────────────────────────────────── */
@media (min-width: 1025px) {
  :root { --nav-h: 68px; }
  .qr-nav {
    padding: 0 clamp(28px, 5vw, 72px);
    height: var(--nav-h);
  }
  .qr-nav-logo-name { font-size: 20px; }
  .qr-nav-link { font-size: 14px; gap: 20px; }
  .qr-nav-cta { padding: 10px 22px; font-size: 14px; }
  .qr-hamburger { display: none !important; }
  .qr-nav-links { display: flex !important; gap: 20px; }

  .qr-page {
    max-width: 700px;
    padding: 32px 48px 56px;
  }
  .qr-card { padding: 22px 24px; margin-bottom: 16px; }
  .qr-heading { font-size: 32px; }
  .qr-subhead { font-size: 14px; }
  .qr-chip { padding: 9px 18px; font-size: 13px; }
  .qr-btn { min-height: 48px; font-size: 14px; padding: 12px 22px; }
  .qr-btn-sm { min-height: 38px; font-size: 13px; }
  .qr-input { font-size: 14px; padding: 11px 13px; }
  .qr-price-amount { font-size: 40px; }

  /* Stats 4-col on desktop */
  .qr-stats-grid { grid-template-columns: repeat(4, 1fr); }

  /* Pricing 3-col on desktop */
  .qr-pricing-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }

  /* Modals center on desktop */
  .qr-overlay { align-items: center; padding: 24px; }
  .qr-bottom-sheet {
    max-width: 580px; margin: 0 auto;
    border-radius: var(--radius);
  }
  .qr-overlay .qr-sheet-handle { display: none; }

  /* Dashboard wider */
  .qr-dash-sidebar { width: 64px; }
  .qr-dash-item { font-size: 20px; }
  .qr-dash-main { padding: 28px 36px; }
  .qr-dash-title { font-size: 26px; margin-bottom: 22px; }

  /* Login centered */
  .qr-login-wrap { max-width: 440px; margin: 0 auto; }

  /* Action bar wider */
  .qr-action-bar { padding: 12px clamp(20px, 8vw, 120px); }

  /* Quote main wider */
  #quote-main {
    max-width: 700px;
    margin: 0 auto;
    padding: 24px 48px 80px;
  }
}

/* ─── WIDE DESKTOP (1440px+) ──────────────────────────────────────────────── */
@media (min-width: 1440px) {
  .qr-page { max-width: 760px; }
  .qr-nav { padding: 0 80px; }
  .qr-dash-main { padding: 32px 48px; }
  .qr-hero-title { font-size: 72px; }
  #quote-main { max-width: 760px; }
}

/* ─── LANDING PAGE RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .contractor-grid { grid-template-columns: 1fr !important; gap: 24px; }
  .landing-steps { grid-template-columns: 1fr !important; }
  .qr-pricing-grid { grid-template-columns: 1fr !important; }
  .landing-stats { flex-direction: column; margin: 0; }
  .landing-stat { border-right: none !important; border-bottom: 0.5px solid var(--white-12); }
  .landing-stat:last-child { border-bottom: none; }
  .qr-hero { padding: 56px 20px 40px; }
  .qr-hero-title { font-size: clamp(32px, 8vw, 48px); }
  .qr-hero-btns { flex-direction: column; align-items: stretch; }
  .qr-hero-btn-primary, .qr-hero-btn-secondary { justify-content: center; }
  .landing-footer-inner { flex-direction: column; gap: 16px; }
  .landing-footer-links { flex-wrap: wrap; gap: 12px; }
  .qr-get-app-links { flex-direction: column; align-items: center; }
  .contractor-toggle-wrap { padding: 0 16px; }
}

/* ─── REDUCED MOTION ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── PRINT ───────────────────────────────────────────────────────────────── */
@media print {
  .qr-nav, .qr-action-bar, .qr-btn, .qr-bottom-nav { display: none !important; }
  body { background: white; color: black; }
  .qr-card, .qr-price-block { border-color: #ccc; background: white; }
}

/* ─── AUTOFILL OVERRIDE ──────────────────────────────────────────────────── */
/* Browsers force a light background on autofilled fields, breaking the dark
   theme. This repaints it to match instead, using the fill trick since
   background-color alone can't override autofill's internal styling. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--khaki) inset !important;
  -webkit-text-fill-color: var(--white) !important;
  caret-color: var(--white);
  transition: background-color 5000s ease-in-out 0s;
}

/* ─── THEME TOGGLE (Settings / Profile) ──────────────────────────────────── */
.qr-theme-toggle {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--khaki); border: 0.5px solid var(--stone);
  border-radius: 12px; padding: 14px 16px;
}
.qr-theme-toggle-label { font-size: 13px; font-weight: 500; color: var(--white); }
.qr-theme-toggle-sub   { font-size: 11px; color: var(--white-55); margin-top: 2px; }
.qr-theme-options { display: flex; gap: 6px; }
.qr-theme-opt {
  display: flex; align-items: center; gap: 5px;
  background: transparent; border: 0.5px solid var(--stone); color: var(--white-55);
  border-radius: var(--radius-sm); padding: 7px 11px; font-size: 12px;
  font-family: var(--font-sans); cursor: pointer; min-height: 32px;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.qr-theme-opt i { font-size: 14px; }
.qr-theme-opt:hover { border-color: var(--lav); color: var(--white); }
.qr-theme-opt.active { background: var(--lav-btn); border-color: var(--lav-btn); color: var(--black); }

/* ─── HELP / INFO ICON (Stripe-style tooltip) ────────────────────────────── */
.qr-info-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%;
  border: 1px solid var(--white-55); color: var(--white-55);
  font-size: 10px; font-family: var(--font-sans); font-style: normal;
  cursor: help; position: relative; vertical-align: middle; margin-left: 4px;
  flex-shrink: 0;
}
.qr-info-icon::before { content: "i"; }
.qr-info-icon:hover, .qr-info-icon:focus-visible { border-color: var(--lav); color: var(--lav); }
.qr-info-tooltip {
  display: none; position: absolute; z-index: 50; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  width: 220px; background: var(--khaki); border: 0.5px solid var(--stone);
  border-radius: 8px; padding: 10px 12px; font-size: 12px; line-height: 1.5;
  color: var(--white); font-weight: 400; text-align: left; cursor: default;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.qr-info-icon:hover .qr-info-tooltip,
.qr-info-icon:focus-visible .qr-info-tooltip,
.qr-info-icon.open .qr-info-tooltip { display: block; }
@media (max-width: 480px) {
  .qr-info-tooltip { width: 180px; }
}
