:root {
    --bg: #ffffff;
    --surface: #f7f8fa;
    --surface2: #edf5f5;
    --border: #e0e4e8;
    --accent: #108474;
    --accent2: #0d6b5e;
    --text: #1a1a1a;
    --muted: #7b7b7b;
    --green: #108474;
    --red: #d63031;
    --blue: #2d7dd2;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: 'DM Sans', 'Barlow', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
  }
  /* Hide header when embedded in iframe */
  body.embedded header#header { display: none !important; }
  body.embedded .search-bar { padding-top: 8px; }
  body.embedded .quote-builder-header { padding-top: 8px; }
  /* Password Lock */
  .lock-btn {
    background: rgba(16,132,116,0.1);
    border: 1px solid var(--accent);
    border-radius: 5px;
    color: #fff;
    font-family: 'DM Sans', 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
  }
  .lock-btn:hover { background: rgba(16,132,116,0.3); }
  .lock-btn.unlocked { background: rgba(16,132,116,0.2); border-color: var(--green); color: #fff; }
  .locked-hidden { display: none !important; }

  /* Password Modal */
  .pw-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
  }
  .pw-overlay.open { display: flex; }
  .pw-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px 32px;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .pw-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
    text-transform: uppercase;
  }
  .pw-subtitle { font-size: 12px; color: var(--muted); }
  .pw-input {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text);
    font-size: 16px;
    padding: 9px 12px;
    width: 100%;
    outline: none;
    font-family: monospace;
    letter-spacing: 3px;
  }
  .pw-input:focus { border-color: var(--accent); }
  .pw-error { font-size: 12px; color: var(--red); display: none; }
  .pw-actions { display: flex; gap: 8px; justify-content: flex-end; }

  /* Header */
  .header {
    background: linear-gradient(180deg, #1a1f2e 0%, var(--surface) 100%);
    border-bottom: 2px solid var(--accent);
    padding: 10px 28px;
    display: flex;
    align-items: center;
    gap: 18px;
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }
  .header-logo img {
    height: 60px;
    width: auto;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--accent), 0 0 12px rgba(232,160,32,0.4), 0 2px 8px rgba(0,0,0,0.5);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
  }
  .header-logo img:hover {
    box-shadow: 0 0 0 2px var(--accent), 0 0 20px rgba(232,160,32,0.6), 0 2px 12px rgba(0,0,0,0.6);
    transform: scale(1.05);
  }
  .header-meta { flex: 1; display: flex; gap: 12px; align-items: center; }
  .header-tag {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
  }
  .markup-badge {
    background: rgba(232,160,32,0.15);
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .markup-badge input {
    width: 44px;
    background: transparent;
    border: none;
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
    font-family: 'Barlow Condensed', sans-serif;
    text-align: right;
    outline: none;
  }
  /* Layout */
  .layout { display: grid; grid-template-columns: 340px 1fr; min-height: calc(100vh - 57px); }
  /* Sidebar */
  .sidebar {
    background: var(--surface);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    max-height: calc(100vh - 57px);
    position: sticky;
    top: 57px;
  }
  .sidebar-section { border-bottom: 1px solid var(--border); padding: 16px; }
  .section-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
  }
  /* Brand tabs */
  .brand-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
  .brand-tab {
    padding: 6px 12px;
    border-radius: 5px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s;
  }
  .brand-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
  }
  .brand-tab:hover:not(.active) {
    border-color: var(--accent);
    color: var(--accent);
  }
  /* Series list */
  .series-list { display: flex; flex-direction: column; gap: 4px; }
  .series-item {
    padding: 8px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.12s;
    border: 1px solid transparent;
  }
  .series-item:hover { background: var(--surface2); border-color: var(--border); }
  .series-item.active { background: rgba(232,160,32,0.12); border-color: var(--accent); }
  .series-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
  }
  .series-desc {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
  }
  /* Main content */
  .main { padding: 24px; overflow-y: auto; }
  .step-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
  }
  .step-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.5px;
  }
  .step-brand {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  /* Model grid */
  .model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 24px; }
  .model-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
  }
  .model-card:hover { border-color: var(--accent); transform: translateY(-1px); }
  .model-card.selected { border-color: var(--accent); background: rgba(232,160,32,0.08); }
  .model-card.selected::before {
    content: '✓';
    position: absolute;
    top: 8px; right: 10px;
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
  }
  .model-name { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
  .model-sku { font-size: 10px; color: var(--muted); margin-bottom: 6px; font-family: monospace; }
  .model-price {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
  }
  .model-retail {
    font-size: 11px;
    color: var(--green);
    margin-top: 2px;
  }
  /* Options section */
  .options-section { margin-top: 8px; }
  .options-category { margin-bottom: 20px; }
  .options-cat-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
  }
  .options-list { display: flex; flex-direction: column; gap: 6px; }
  .option-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 14px;
    border-radius: 7px;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all 0.12s;
    cursor: pointer;
  }
  .option-row:hover { border-color: rgba(232,160,32,0.4); background: rgba(255,255,255,0.03); }
  .option-row.selected { border-color: var(--accent); background: rgba(232,160,32,0.09); }
  .option-check {
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: all 0.12s;
  }
  .option-row:hover .option-check { border-color: var(--accent); }
  .option-check.checked { background: var(--accent); border-color: var(--accent); }
  .option-check.checked::after { content: '✓'; color: #000; font-size: 12px; font-weight: 800; }
  .option-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
  .option-sku { font-size: 10px; color: var(--muted); font-family: monospace; margin-top: 2px; }
  .option-price-col { text-align: right; min-width: 70px; }
  .option-dealer { font-size: 10px; color: var(--muted); margin-bottom: 1px; }
  .option-retail-price {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--accent);
  }
  .option-uom { font-size: 9px; color: var(--muted); }
  .qty-input {
    width: 46px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    font-size: 13px;
    text-align: center;
    padding: 4px;
    outline: none;
    font-family: 'Barlow', sans-serif;
  }
  .qty-input:focus { border-color: var(--accent); }
  /* Quote Summary */
  .quote-summary {
    position: fixed;
    right: 0; bottom: 0;
    width: calc(100vw - 340px);
    background: var(--surface);
    border-top: 2px solid var(--accent);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    z-index: 150;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.4);
  }
  .summary-item { display: flex; flex-direction: column; }
  .summary-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 600; }
  .summary-value {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 22px;
    font-weight: 700;
  }
  .summary-value.cost { color: var(--muted); }
  .summary-value.retail { color: var(--accent); }
  .summary-value.profit { color: var(--green); }
  .summary-divider { width: 1px; height: 40px; background: var(--border); }
  .summary-actions { margin-left: auto; display: flex; gap: 10px; }
  .btn {
    padding: 9px 18px;
    border-radius: 5px;
    border: none;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
  }
  .btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--muted);
  }
  .btn-outline:hover { border-color: var(--text); color: var(--text); }
  .btn-primary {
    background: var(--accent);
    color: #000;
  }
  .btn-primary:hover { background: var(--accent2); }
  .btn-internal {
    background: var(--surface2);
    border: 1.5px solid var(--blue);
    color: var(--blue);
  }
  .btn-internal:hover { background: rgba(91,141,238,0.15); }
  /* Modal */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 90px 20px;
  }
  .modal-overlay.open { display: flex; }
  .modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 80px rgba(0,0,0,0.6);
  }
  .modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: start;
  }
  .modal-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
  }
  .modal-subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }
  .modal-close {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
  }
  .modal-close:hover { color: var(--text); }
  .modal-body { padding: 20px 24px; }
  .modal-section { margin-bottom: 20px; }
  .modal-section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
  }
  /* Quote preview table */
  .quote-table { width: 100%; border-collapse: collapse; font-size: 12px; }
  .quote-table th {
    text-align: left;
    padding: 6px 10px;
    background: var(--surface2);
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
  }
  .quote-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
  }
  .quote-table tr:last-child td { border-bottom: none; }
  .quote-table .num { text-align: right; font-family: 'Barlow Condensed', sans-serif; font-size: 14px; font-weight: 600; }
  .quote-table .profit-col { color: var(--green); }
  .quote-table .retail-col { color: var(--accent); }
  .quote-table .cost-col { color: var(--muted); }
  .quote-total-row td {
    font-weight: 700;
    background: var(--surface2);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px;
    border-top: 2px solid var(--border);
  }
  /* Customer quote */
  .customer-quote {
    background: white;
    color: #1a1a1a;
    border-radius: 6px;
    padding: 28px 32px;
    font-family: 'Barlow', sans-serif;
  }
  .cq-header { display: flex; justify-content: space-between; margin-bottom: 20px; }
  .cq-brand { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; font-weight: 900; color: #c87800; }
  .cq-date { font-size: 11px; color: #666; text-align: right; }
  .cq-title { font-size: 15px; font-weight: 700; color: #1a1a1a; margin-bottom: 3px; }
  .cq-table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 16px 0; }
  .cq-table th { background: #f5f5f5; padding: 7px 10px; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: #555; }
  .cq-table td { padding: 7px 10px; border-bottom: 1px solid #eee; color: #333; }
  .cq-table .num { text-align: right; font-weight: 600; }
  .cq-total { font-size: 18px; font-weight: 700; text-align: right; color: #c87800; margin-top: 8px; }
  .cq-footer { font-size: 10px; color: #888; border-top: 1px solid #eee; padding-top: 10px; margin-top: 12px; }
  /* Customer info fields */
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
  .form-group { display: flex; flex-direction: column; gap: 4px; }
  .form-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 600; }
  .form-input {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text);
    padding: 8px 10px;
    font-size: 13px;
    font-family: 'Barlow', sans-serif;
    outline: none;
    transition: border 0.12s;
  }
  .form-input:focus { border-color: var(--accent); }
  /* Placeholder */
  .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
    color: var(--muted);
  }
  .empty-icon { font-size: 48px; margin-bottom: 14px; opacity: 0.4; }
  .empty-title { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 700; margin-bottom: 6px; }
  .empty-text { font-size: 13px; line-height: 1.5; max-width: 300px; }
  /* Bottom padding for sticky summary */
  .main-inner { padding-bottom: 90px; }
  /* Scrollbar */
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: var(--bg); }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
  ::-webkit-scrollbar-thumb:hover { background: var(--muted); }
  /* Search input */
  .search-input {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text);
    padding: 7px 10px 7px 28px;
    font-size: 12px;
    font-family: 'Barlow', sans-serif;
    outline: none;
    margin-bottom: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%236b7499' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 9px center;
  }
  .search-input:focus { border-color: var(--accent); }
  .selected-model-banner {
    background: rgba(232,160,32,0.1);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
  }
  .smb-name { font-weight: 600; font-size: 14px; }
  .smb-prices { display: flex; gap: 16px; }
  .smb-price { text-align: right; }
  .smb-price-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
  .smb-price-val { font-family: 'Barlow Condensed', sans-serif; font-size: 16px; font-weight: 700; }
  .print-quote-area { display: none; }
  @media print {
    body * { visibility: hidden; }
    .print-quote-area, .print-quote-area * { visibility: visible; display: block !important; }
    .print-quote-area { position: fixed; left: 0; top: 0; width: 100%; padding: 40px; }
  }
  .option-rate-breakdown {
    font-size: 10px;
    color: var(--accent);
    font-weight: 600;
    margin-top: 1px;
    white-space: nowrap;
  }
  .uom-badge {
    display: inline-block;
    background: rgba(232,160,32,0.15);
    color: var(--accent);
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-left: 4px;
  }

/* ══════════════════════════════════════════════════════════════════════════════
   SAVED QUOTES CARDS
   ══════════════════════════════════════════════════════════════════════════════ */
.saved-quote-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.saved-quote-card:hover { border-color: var(--accent); }
.sq-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sq-customer { font-weight: 700; font-size: 14px; color: var(--text); }
.sq-date { font-size: 11px; color: var(--muted); }
.sq-details { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.sq-brand { color: var(--accent); font-weight: 600; margin-right: 8px; }
.sq-model { color: var(--text); }
.sq-footer { display: flex; justify-content: space-between; align-items: center; }
.sq-total { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 700; color: var(--accent); }
.sq-actions { display: flex; gap: 6px; }
.sq-btn { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 4px 8px; cursor: pointer; font-size: 14px; }
.sq-btn:hover { border-color: var(--accent); }
.sq-btn-del:hover { border-color: var(--red); }

/* ══════════════════════════════════════════════════════════════════════════════
   MOBILE SIDEBAR OVERLAY
   ══════════════════════════════════════════════════════════════════════════════ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 90;
}
.sidebar-overlay.open { display: block; }

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--accent);
  font-size: 22px;
  padding: 4px 10px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}
.mobile-menu-btn:hover { border-color: var(--accent); background: rgba(232,160,32,0.1); }

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLETS (768px – 1024px)
   ══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) and (min-width: 769px) {
  .layout { grid-template-columns: 260px 1fr; }
  .model-grid { grid-template-columns: repeat(2, 1fr); }
  .quote-summary { width: calc(100vw - 260px); }
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — PHONES (up to 768px)
   ══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Mobile menu button visible */
  .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }

  /* Layout — single column */
  .layout {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 50px);
  }

  /* Sidebar — hidden by default, slide-out overlay from left */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    max-height: 100vh;
    z-index: 95;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.5);
  }

  /* Header — compact */
  .header {
    padding: 6px 12px;
    gap: 10px;
  }
  .header-logo img {
    height: 40px;
  }
  /* Hide customer info fields and markup badges on mobile header */
  #customerInfoArea { display: none !important; }
  .header .manager-only { display: none !important; }
  .header .markup-badge { display: none !important; }

  /* Main content — less padding */
  .main { padding: 16px; }
  .main-inner { padding-bottom: 80px; }

  /* Model grid — single column on phones */
  .model-grid { grid-template-columns: 1fr; }

  /* Option rows — smaller gap, allow text wrapping */
  .option-row {
    gap: 8px;
    flex-wrap: wrap;
  }
  .option-name { white-space: normal; word-break: break-word; }

  /* Brand tabs — horizontal scroll */
  .brand-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .brand-tab { white-space: nowrap; flex-shrink: 0; }

  /* Quote summary bar — full width, compact */
  .quote-summary {
    width: 100%;
    left: 0;
    padding: 10px 12px;
    gap: 10px;
    flex-wrap: wrap;
  }
  /* Hide manager-only fields in summary on mobile */
  .quote-summary .manager-only { display: none !important; }
  .summary-value { font-size: 18px; }
  .summary-label { font-size: 9px; }
  .summary-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
  }
  .summary-actions .btn { padding: 7px 12px; font-size: 12px; }

  /* Modals — full screen on mobile */
  .modal-overlay { padding: 0; align-items: stretch; }
  .modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    height: 100%;
  }
  .modal-body { padding: 16px; }
  .modal-header { padding: 14px 16px 12px; }

  /* Customer quote — tighter padding */
  .customer-quote { padding: 16px; }
  .cq-header { flex-direction: column; gap: 6px; }

  /* Form rows — stack on mobile */
  .form-row { grid-template-columns: 1fr; }

  /* Step header */
  .step-title { font-size: 20px; }

  /* Selected model banner — stack */
  .selected-model-banner { flex-direction: column; gap: 8px; align-items: flex-start; }
  .smb-prices { gap: 10px; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   V2 — Updated Component Styles
   ══════════════════════════════════════════════════════════════════════════════ */

/* Header v2 */
header#header {
  background: #000;
  border-bottom: 2px solid var(--accent);
  padding: 10px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 14px; }
.header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.header-logo {
  height: 50px;
  width: auto;
  border-radius: 50%;
}
.header-title {
  font-family: 'Oswald', 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
}

/* Auth & Action buttons */
.btn-accent {
  background: #000;
  border: 1px solid #000;
  border-radius: 5px;
  color: #fff;
  font-family: 'DM Sans', 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-accent:hover { background: var(--accent); border-color: var(--accent); }
.btn-muted {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--muted);
  font-family: 'DM Sans', 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-muted:hover { border-color: var(--accent); color: var(--text); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-red { border-color: var(--red); color: var(--red); }
.btn-red:hover { background: rgba(240,106,106,0.15); }

/* Sidebar v2 */
.sidebar-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
}
.sidebar-select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-size: 14px;
  padding: 8px 12px;
  outline: none;
  font-family: 'Barlow', sans-serif;
}
.sidebar-select:focus { border-color: var(--accent); }
.series-desc { padding: 0 16px 12px; font-size: 12px; color: var(--muted); }

/* Model cards in sidebar */
#sidebar .model-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
}
#sidebar .model-card {
  padding: 10px 12px;
}
.model-card-name { font-weight: 600; font-size: 13px; line-height: 1.3; }
.model-card-specs { font-size: 11px; color: var(--muted); margin-top: 2px; }
.model-card-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 4px;
}

/* Main content v2 */
#main { padding: 24px; overflow-y: auto; padding-bottom: 120px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state h2 { font-size: 20px; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; }

/* Selected model banner — compact, doesn't push content down */
.selected-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: rgba(232,160,32,0.08);
  border: 1px solid var(--accent);
  border-radius: 8px;
}
.banner-info { flex: 1; }
.banner-info h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; color: var(--accent); }
.banner-image { flex-shrink: 0; }
.banner-image img { max-width: 120px; max-height: 80px; border-radius: 6px; object-fit: cover; }
.model-specs { display: flex; flex-wrap: wrap; gap: 6px; }
.spec-badge {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.model-image { flex-shrink: 0; }
.trailer-photo {
  max-width: 200px;
  max-height: 150px;
  border-radius: 8px;
  object-fit: cover;
}
.placeholder-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border-radius: 8px;
  padding: 20px;
  opacity: 0.5;
}

/* Option sections */
.option-section { margin-bottom: 20px; }
.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.option-list { display: flex; flex-direction: column; gap: 4px; }

/* Option rows v2 */
.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.12s;
}
.option-row:hover { border-color: rgba(232,160,32,0.4); }
.option-row.checked { border-color: var(--accent); background: rgba(232,160,32,0.06); }
.option-label { display: flex; align-items: center; gap: 10px; flex: 1; cursor: pointer; }
.option-label input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; cursor: pointer; }
.option-name { font-size: 13px; font-weight: 500; }
.option-right { display: flex; align-items: center; gap: 10px; }
.option-qty {
  width: 48px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 13px;
  text-align: center;
  padding: 4px;
  outline: none;
}
.option-qty:focus { border-color: var(--accent); }
.option-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  min-width: 70px;
  text-align: right;
}
.option-price.negative { color: var(--green); }
.option-price-info { display: flex; flex-direction: column; align-items: flex-end; min-width: 90px; }
.option-total { font-size: 11px; color: var(--green); margin-top: 1px; }
.option-cost { font-size: 10px; color: var(--muted); margin-top: 1px; }
.model-card-cost { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Color grid */
.color-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.color-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.color-option:hover { border-color: var(--accent); }
.color-option.selected { border-color: var(--accent); background: rgba(232,160,32,0.08); }
.color-option input[type="radio"] { accent-color: var(--accent); }
.color-name { font-size: 13px; font-weight: 500; }

/* Quote summary v2 */
.quote-summary {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #000;
  border-top: 3px solid var(--accent);
  padding: 12px 28px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #fff;
}
.quote-summary .summary-value { color: #fff; }
.quote-summary .summary-label { color: rgba(255,255,255,0.6); }
.quote-summary .summary-value.accent { color: var(--accent); }
.quote-summary .summary-value.green { color: #3ecf8e; }
.quote-summary .btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.quote-summary .btn-accent:hover { background: var(--accent2); }
.quote-summary .btn-muted { background: transparent; border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.7); }
.quote-summary .btn-muted:hover { border-color: #fff; color: #fff; }
.summary-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.summary-item { display: flex; flex-direction: column; align-items: center; }
.summary-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}
.summary-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.summary-value.accent { color: var(--accent); }
.summary-value.green { color: var(--green); }
.summary-total { margin-left: auto; }
.summary-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Form groups (modals) */
.form-group { margin-bottom: 10px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-size: 14px;
  padding: 8px 12px;
  outline: none;
  font-family: 'Barlow', sans-serif;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }

/* Quote cards in saved quotes panel */
.quote-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.quote-card-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.quote-id { font-family: monospace; color: var(--accent); font-size: 13px; }
.quote-date { font-size: 12px; color: var(--muted); }
.quote-card-body { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.quote-model { font-size: 12px; color: var(--muted); }
.quote-total { margin-left: auto; font-family: 'Barlow Condensed', sans-serif; font-size: 18px; font-weight: 700; color: var(--accent); }
.quote-card-actions { display: flex; gap: 6px; justify-content: flex-end; }

.empty-models { padding: 20px; text-align: center; color: var(--muted); font-size: 14px; }

/* ═══ SIZE-FIRST COMPARISON VIEW ═══ */

/* Search Bar */
.search-bar {
  padding: 16px 28px 0;
  background: var(--surface);
}
.search-input-wrap {
  position: relative;
  max-width: 600px;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.search-input {
  width: 100%;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 16px;
  font-family: 'DM Sans', 'Barlow', sans-serif;
  padding: 12px 40px 12px 42px;
  outline: none;
  transition: border-color 0.15s;
}
.search-input:focus { border-color: var(--accent); }
.search-input::placeholder { color: var(--muted); font-size: 14px; }
.search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}
.search-clear:hover { color: var(--text); }

/* Filter Row */
.filter-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 12px 28px 14px;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  flex-wrap: wrap;
}
.filter-dropdown-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.filter-dropdown-group label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
}
.filter-select {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'DM Sans', 'Barlow', sans-serif;
  font-size: 14px;
  padding: 8px 28px 8px 10px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6' fill='%237b7b7b'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.filter-select:focus { border-color: var(--accent); }
.filter-select option { background: #fff; color: var(--text); }
.filter-results-count {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.result-count {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.5px;
}
.btn-back {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-back:hover { border-color: var(--accent); color: var(--accent); }

/* Comparison Results */
.compare-results {
  padding: 24px 28px;
  padding-bottom: 120px;
}
.compare-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  transition: all 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.compare-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.compare-brand {
  min-width: 140px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.5px;
}
.compare-brand .compare-series {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}
.compare-model {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
}
.compare-model .compare-sku {
  font-size: 11px;
  color: var(--muted);
  font-family: monospace;
}
.compare-specs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.compare-prices {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 260px;
  justify-content: flex-end;
}
.compare-cost {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.compare-retail {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}
.compare-shipping { font-size: 11px; color: var(--muted); }
.compare-total {
  text-align: right;
}
.compare-total-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.compare-total-label { font-size: 10px; color: var(--muted); }
.compare-action { flex-shrink: 0; }
.compare-profit { font-size: 12px; color: var(--green); text-align: right; }
.material-aluminum { background: rgba(91,141,238,0.15); color: #5b8dee; border-color: rgba(91,141,238,0.3); }
.material-steel { background: rgba(155,163,184,0.15); color: #9ba3b8; border-color: rgba(155,163,184,0.3); }
.in-stock-badge {
  display: inline-block;
  background: rgba(62,207,142,0.15);
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Quote Builder (from compare click) */
.quote-builder-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.qb-model-info {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
}
.qb-model-info .qb-brand { color: var(--accent); margin-right: 8px; }
.qb-model-info .qb-specs { font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.quote-builder-body {
  padding: 24px 28px;
  max-width: 900px;
  padding-bottom: 120px;
}

/* Type labels */
.type-label-enclosed { color: #5b8dee; }
.type-label-dump { color: #e8a020; }
.type-label-utility { color: #3ecf8e; }
.type-label-flatbed { color: #c084fc; }
.type-label-carhauler { color: #f06a6a; }
.type-label-truck_bed { color: #9ba3b8; }

/* Responsive v2 */
@media (max-width: 768px) {
  header#header { padding: 8px 12px; flex-wrap: wrap; }
  .header-title { font-size: 14px; }
  .header-right { gap: 6px; }
  .filter-bar { padding: 12px 16px; gap: 12px; }
  .compare-card { flex-wrap: wrap; gap: 10px; }
  .compare-brand { min-width: auto; }
  .compare-prices { min-width: auto; flex-wrap: wrap; }
  .summary-row { gap: 12px; }
  .summary-value { font-size: 18px; }
  .summary-total { margin-left: 0; }
  .quote-builder-header { flex-wrap: wrap; }
  .quote-builder-body { padding: 16px; }
}