/* custom.css — AutoQuoteAI mobile-first styles */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #1a56db;
    --primary-dark: #1a3f9f;
    --success: #16a34a;
    --danger: #dc2626;
    --secondary: #64748b;
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-muted: #64748b;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --progress-h: 6px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

/* ---- Progress Bar ---- */
.progress-bar-container {
    position: sticky; top: 0; z-index: 100;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 10px 16px 8px;
}
.progress-bar-fill {
    height: var(--progress-h); background: var(--primary); border-radius: 3px;
    transition: width 0.4s ease; width: 0%;
}
.progress-label {
    font-size: 12px; color: var(--text-muted); text-align: right; margin-top: 4px;
}

/* ---- Flash Error ---- */
.flash-error {
    background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b;
    border-radius: var(--radius); padding: 12px 16px; margin: 12px 16px;
    display: flex; align-items: center; gap: 10px; font-size: 14px;
}
.flash-icon { font-weight: bold; font-size: 16px; flex-shrink: 0; }

/* ---- Layout ---- */
.main-content { padding: 0 0 24px; }
.step-page { padding: 12px 16px 0; max-width: 600px; margin: 0 auto; }
.step-title { font-size: 19px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.step-subtitle { font-size: 14px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.35; }
.step-hint { font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px; font-style: italic; }
.step-actions { margin-top: 12px; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 18px; border-radius: var(--radius); border: none;
    font-size: 16px; font-weight: 600; cursor: pointer; text-decoration: none;
    transition: background 0.15s, transform 0.1s; min-height: 48px;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-full { width: 100%; display: flex; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-secondary { background: #f1f5f9; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: #e2e8f0; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; padding: 10px 16px; font-size: 14px; min-height: 40px; }
.btn-large { padding: 18px 32px; font-size: 18px; min-height: 60px; }
.btn-sm { padding: 8px 16px; font-size: 14px; min-height: 36px; }

/* ---- Landing ---- */
.landing-page { min-height: 100vh; display: flex; flex-direction: column; padding: 0; }
.landing-hero { background: var(--primary); color: #fff; padding: 48px 24px 36px; text-align: center; }
.landing-logo { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 16px; }
.landing-logo img { width: 64px; height: 64px; object-fit: contain; }
.landing-title { font-size: 28px; font-weight: 800; color: #fff; margin: 0; }
.landing-subtitle { font-size: 16px; color: rgba(255,255,255,0.85); margin: 0; }
.landing-card { background: var(--surface); border-radius: 20px 20px 0 0; margin-top: -16px; padding: 28px 20px 40px; flex: 1; }
.landing-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.time-estimate { color: var(--text-muted); font-size: 15px; margin-bottom: 24px; }
.landing-steps { display: flex; flex-direction: column; gap: 14px; margin-bottom: 32px; }
.landing-step-item { display: flex; align-items: center; gap: 14px; font-size: 15px; }
.step-icon { width: 32px; height: 32px; background: #eff6ff; color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }

/* ---- Forms ---- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-input {
    width: 100%; padding: 13px 14px; border: 1.5px solid var(--border); border-radius: 10px;
    font-size: 16px; color: var(--text); background: var(--surface); outline: none;
    transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--primary); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-section-title { font-size: 15px; font-weight: 600; margin: 16px 0 12px; color: var(--text); }
.form-row { display: flex; gap: 10px; }
.form-group-grow { flex: 1; }
.form-group-sm { width: 70px; }
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 15px; }
.checkbox-label input[type="checkbox"] { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; cursor: pointer; }

/* ---- Radio Options ---- */
.radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-option {
    flex: 1; min-width: 80px; padding: 12px 16px; border: 1.5px solid var(--border);
    border-radius: 10px; cursor: pointer; font-size: 15px; font-weight: 500;
    display: flex; align-items: center; gap: 8px; transition: all 0.15s;
}
.radio-option input[type="radio"] { display: none; }
.radio-option.active { border-color: var(--primary); background: #eff6ff; color: var(--primary); }
.radio-option:hover { border-color: var(--primary); }

/* ---- Camera ---- */
/* Bigger capture area WITHOUT horizontal overflow: width fills the column and
   the height is viewport-driven. We intentionally do NOT set aspect-ratio —
   with a tall min/height, aspect-ratio derives the WIDTH from the height and
   spills off the right of a portrait screen. Expands a bit in landscape. */
.camera-container { background: #000; border-radius: 12px; overflow: hidden; width: 100%; height: 42vh; position: relative; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; }
@media (orientation: landscape) {
    .camera-container { height: 54vh; }
}
.camera-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 14px; text-align: center; color: #94a3b8; width: 100%; }
.camera-icon { width: 52px; height: 52px; }
.plate-icon { width: 130px; height: 38px; }
.dashboard-icon { width: 130px; height: 50px; }
/* Action buttons sit in a single row: two equal options at a time
   (Take/Upload before a photo, Retake/Accept after). Hidden buttons drop out
   so the two visible ones split the width 50/50. */
.camera-controls { display: flex; flex-direction: row; gap: 10px; margin-bottom: 10px; }
.camera-controls .btn { flex: 1; min-width: 0; }
.photo-preview { width: 100%; height: 100%; position: relative; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-retake-overlay { position: absolute; bottom: 8px; right: 8px; }
.photo-thumb-large { width: 100%; height: 100%; object-fit: cover; }
.hidden { display: none !important; }
.vin-example { font-family: monospace; font-size: 18px; color: #fff; letter-spacing: 2px; }
.vin-input { font-family: monospace; font-size: 18px; letter-spacing: 2px; text-transform: uppercase; }
.vin-char-count { text-align: right; font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ---- Photo grid (review) ---- */
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.photo-grid-item { position: relative; }
.photo-thumb-link { display: block; border-radius: 10px; overflow: hidden; text-decoration: none; position: relative; aspect-ratio: 4/3; background: #f1f5f9; }
.photo-thumb-link.missing { border: 2px dashed var(--border); }
.photo-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb-missing { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.missing-icon { font-size: 32px; color: var(--border); }
.photo-thumb-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; text-align: center; }
.photo-retake-badge { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,0.6); color: #fff; font-size: 10px; padding: 2px 8px; border-radius: 20px; }
.photo-progress { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.photo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.photo-dot.done { background: var(--success); }
.photo-dot.active { background: var(--primary); width: 20px; border-radius: 4px; }

/* ---- Vehicle Type Tabs ---- */
.vehicle-type-tabs { display: flex; margin-bottom: 12px; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; }
.vtype-tab { flex: 1; padding: 11px 8px; border: none; background: #f8fafc; cursor: pointer; font-size: 15px; font-weight: 500; color: var(--text-muted); transition: all 0.15s; -webkit-tap-highlight-color: transparent; }
.vtype-tab:not(:last-child) { border-right: 1.5px solid var(--border); }
.vtype-tab.active { background: var(--primary); color: #fff; }
.vtype-tab:hover:not(.active) { background: #e2e8f0; }

/* ---- Damage Diagram (PNG + SVG overlay) ---- */
.damage-diagram-container { position: relative; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; margin-bottom: 16px; background: #f8fafc; aspect-ratio: 1876 / 2272; }
.vehicle-model-img { width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none; }
.damage-overlay-svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.damage-zone { cursor: pointer; transition: fill 0.15s; }
.damage-zone:hover { fill: rgba(26, 86, 219, 0.15) !important; }
.damage-zone.selected { fill: rgba(220, 38, 38, 0.3) !important; stroke: #dc2626 !important; }
.damage-selected-list { margin-bottom: 16px; }
.damage-none-msg { font-size: 14px; color: var(--text-muted); text-align: center; padding: 8px; }
.damage-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.damage-tag { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; padding: 4px 10px; border-radius: 20px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.damage-tag-remove { background: none; border: none; color: #991b1b; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 2px; }

/* ---- Mileage ---- */
.mileage-unit-toggle { display: flex; gap: 0; margin-bottom: 20px; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; }
.unit-btn { flex: 1; padding: 12px; border: none; background: #f8fafc; cursor: pointer; font-size: 15px; font-weight: 500; color: var(--text-muted); transition: all 0.15s; }
.unit-btn.active { background: var(--primary); color: #fff; }
.mileage-input { font-size: 24px; text-align: center; font-weight: 700; }

/* ---- Conditional sections ---- */
.conditional-section { margin-top: 4px; }
.conditional-section.hidden { display: none; }
.conditional-sub { margin-left: 16px; border-left: 3px solid var(--border); padding-left: 16px; }

/* ---- Review ---- */
.review-section { background: var(--surface); border-radius: 12px; border: 1px solid var(--border); margin-bottom: 16px; overflow: hidden; }
.review-section-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.review-section-header h3 { font-size: 15px; font-weight: 600; margin: 0; }
.edit-link { font-size: 14px; color: var(--primary); text-decoration: none; font-weight: 500; }
.review-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.review-row:last-child { border-bottom: none; }
.review-label { color: var(--text-muted); flex-shrink: 0; }
.review-value { font-weight: 500; text-align: right; word-break: break-all; }
.review-photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px 16px; }
.review-photo-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.review-thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.review-thumb-missing { width: 100%; aspect-ratio: 1; background: #f1f5f9; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--border); }
.review-thumb-label { font-size: 10px; color: var(--text-muted); text-align: center; }

/* ---- Account options ---- */
.account-options { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.account-option-btn { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); cursor: pointer; text-align: left; transition: all 0.15s; width: 100%; }
.account-option-btn:hover { border-color: var(--primary); background: #eff6ff; }
.account-option-secondary { border-style: dashed; }
.account-option-icon { width: 40px; height: 40px; color: var(--primary); flex-shrink: 0; }
.account-option-icon svg { width: 100%; height: 100%; }
.account-option-text { display: flex; flex-direction: column; gap: 3px; }
.account-option-text strong { font-size: 16px; color: var(--text); }
.account-option-text span { font-size: 13px; color: var(--text-muted); }

/* ---- Auth Bar ---- */
.auth-bar {
    display: flex; align-items: center; justify-content: flex-end; gap: 12px;
    padding: 6px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
    font-size: 13px; color: var(--text-muted);
}
.auth-bar-name { font-weight: 500; color: var(--text); }
.auth-bar-signout {
    background: none; border: 1px solid var(--border); border-radius: 6px;
    padding: 4px 10px; font-size: 12px; color: var(--text-muted); cursor: pointer;
    transition: background 0.15s;
}
.auth-bar-signout:hover { background: #f1f5f9; }

/* ---- Auth back link ---- */
.auth-back-link {
    background: none; border: none; color: var(--primary); font-size: 14px;
    cursor: pointer; padding: 0; font-weight: 500; text-decoration: none;
    display: inline-flex; align-items: center; gap: 4px;
}
.auth-back-link:hover { text-decoration: underline; }

/* ---- Confirmation ---- */
.confirmation-page { text-align: center; padding-top: 40px; }
.confirmation-icon { width: 80px; height: 80px; margin: 0 auto 20px; }
.confirmation-icon svg { width: 100%; height: 100%; }
.confirmation-rfq { background: var(--surface); border: 2px solid var(--border); border-radius: 14px; padding: 20px; margin: 24px 0; display: flex; flex-direction: column; gap: 6px; }
.rfq-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.rfq-number { font-size: 24px; font-weight: 800; color: var(--primary); letter-spacing: 1px; }
.confirmation-next-steps { background: #f0fdf4; border-radius: 14px; padding: 20px; margin-bottom: 20px; text-align: left; }
.confirmation-next-steps h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.next-steps-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.next-steps-list li { display: flex; gap: 10px; font-size: 14px; counter-increment: step; }
.next-steps-list li::before { content: counter(step); width: 22px; height: 22px; background: var(--success); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.next-steps-list { counter-reset: step; }
.confirmation-contact { font-size: 14px; color: var(--text-muted); }

/* ---- Landing sign-in link ---- */
.landing-signin-link { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-muted); }
.landing-signin-link a { color: var(--primary); text-decoration: none; font-weight: 600; }

/* ---- Auth bar link ---- */
.auth-bar-link { color: var(--primary); text-decoration: none; font-size: 13px; font-weight: 500; }
.auth-bar-link:hover { text-decoration: underline; }

/* ---- Dashboard ---- */
.dash-page { max-width: 640px; margin: 0 auto; padding: 24px 16px 80px; }
.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.dash-header h1 { font-size: 22px; font-weight: 700; }
.dash-section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: 24px 0 12px; }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dash-card-info { display: flex; flex-direction: column; gap: 4px; }
.dash-rfq-number { font-weight: 700; font-size: 15px; }
.dash-meta { font-size: 13px; color: var(--text-muted); }
.dash-badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.badge-progress { background: #f1f5f9; color: var(--text-muted); }
.badge-review   { background: #eff6ff; color: #1d4ed8; }
.badge-bid      { background: #fffbeb; color: #b45309; }
.badge-offer    { background: #15803d; color: #fff; }
.badge-success  { background: #f0fdf4; color: #15803d; }
.badge-muted    { background: #f1f5f9; color: var(--text-muted); }
.dash-empty { text-align: center; padding: 32px 16px; color: var(--text-muted); font-size: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.dash-new-quote { display: block; text-align: center; margin-top: 32px; font-size: 14px; color: var(--primary); font-weight: 600; text-decoration: none; }
.dash-new-quote:hover { text-decoration: underline; }

/* ---- Yard Dashboard ---- */
.dash-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; gap: 12px;
}
.dash-toolbar-left {
    display: flex; align-items: center; gap: 8px;
}
.dash-toolbar-right {
    display: flex; align-items: center; gap: 8px;
}
.dash-filter-label {
    font-size: 13px; font-weight: 600; color: var(--text-muted);
}
.dash-filter-select {
    padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface); font-size: 14px; cursor: pointer;
    color: var(--text); outline: none;
}
.dash-filter-select:focus {
    border-color: var(--primary);
}

/* ---- Badge: Unviewed counter ---- */
.badge-unviewed {
    background: var(--danger); color: #fff; padding: 4px 8px;
    border-radius: 12px; font-size: 12px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px;
}
.badge-unviewed.flash {
    animation: flash-badge 1s infinite;
}
@keyframes flash-badge {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.5; }
}

/* ---- RFQ Table ---- */
.rfq-table {
    width: 100%; border-collapse: collapse;
    border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; background: var(--surface);
}
.rfq-table thead {
    background: #f8fafc; border-bottom: 1px solid var(--border);
}
.rfq-table th {
    padding: 12px 14px; text-align: left; font-size: 12px;
    font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted);
}
.rfq-table td {
    padding: 14px; border-bottom: 1px solid var(--border);
    font-size: 14px; color: var(--text);
}
.rfq-table tbody tr:last-child td {
    border-bottom: none;
}
.rfq-table tbody tr:hover {
    background: #f8fafc;
}
.dash-table-center {
    text-align: center;
}
.dash-table-actions {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.dash-table-actions .btn-sm {
    font-size: 12px; padding: 6px 12px; min-height: 32px;
}

/* ---- Detail Page Layout ---- */
.detail-page { max-width: 1000px; }
.detail-grid {
    display: grid; grid-template-columns: 1fr;
    gap: 24px; margin: 24px 0;
}
@media (min-width: 768px) {
    .detail-grid { grid-template-columns: 2fr 1fr; }
}
.detail-column {}
.detail-bidding {}

/* ---- Detail Sections ---- */
.detail-section {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.detail-section h2 {
    font-size: 16px; font-weight: 700; margin-bottom: 16px;
    color: var(--text);
}
.detail-row {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}
.detail-row:last-child {
    border-bottom: none;
}
.detail-row label {
    color: var(--text-muted); font-weight: 600; flex-shrink: 0;
    width: 140px;
}
.detail-row span {
    flex: 1; text-align: right; word-break: break-word;
}
.detail-row a {
    color: var(--primary); text-decoration: none;
}
.detail-row a:hover {
    text-decoration: underline;
}

/* ---- Owner offers (mobile-first cards; replaces a wide table) ---- */
.offer-list { display: flex; flex-direction: column; gap: 12px; }
.offer-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 14px 16px;
    box-shadow: var(--shadow);
}
.offer-card.is-accepted { border-color: #86efac; background: #f0fdf4; }
.offer-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.offer-buyer { font-weight: 700; font-size: 16px; color: var(--text); word-break: break-word; }
.offer-status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.offer-status.accepted { color: #15803d; background: #dcfce7; }
.offer-status.declined { color: #b45309; background: #fef3c7; }
.offer-status.lost { color: #64748b; background: #f1f5f9; }
.offer-status.offer { color: #1d4ed8; background: #dbeafe; }
.offer-amount { font-size: 28px; font-weight: 800; color: var(--text); margin-top: 8px; line-height: 1.1; }
.offer-received { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
/* Big, easy-to-tap actions: two equal buttons, each a generous touch target. */
.offer-actions { display: flex; gap: 10px; margin-top: 14px; }
.offer-actions form { flex: 1; display: flex; margin: 0; }
.offer-btn { flex: 1; min-height: 56px; font-size: 17px; }

/* ---- Detail Checklist ---- */
.detail-checklist {
    display: flex; flex-direction: column; gap: 10px;
}
.detail-checkbox {
    display: flex; align-items: center; gap: 10px; font-size: 14px;
    cursor: pointer;
}
.detail-checkbox input {
    cursor: pointer; accent-color: var(--primary);
}
.detail-checkbox input:disabled {
    cursor: not-allowed;
}

/* ---- Detail Photos ---- */
.detail-photos {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}
.detail-photo {
    display: flex; flex-direction: column; gap: 6px;
    border: 1px solid var(--border); border-radius: 8px; padding: 8px;
    background: #f8fafc;
}
.detail-photo img {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    border-radius: 4px;
}
.detail-photo-label {
    font-size: 11px; color: var(--text-muted); text-align: center;
    word-break: break-word;
}

/* ---- Bids Table ---- */
.bids-table {
    width: 100%; border-collapse: collapse;
    font-size: 13px;
}
.bids-table thead {
    border-bottom: 1px solid var(--border);
}
.bids-table th {
    padding: 8px 0; font-weight: 600; text-align: left;
    color: var(--text-muted); text-transform: uppercase; font-size: 11px;
}
.bids-table td {
    padding: 10px 0; border-bottom: 1px solid #f1f5f9;
    color: var(--text);
}
.bids-table tbody tr:last-child td {
    border-bottom: none;
}
.bids-table tbody tr.bid-accepted {
    background: #f0fdf4;
}
.bids-table tbody tr.bid-selected {
    background: #fffbeb;
}
.bid-actions {
    text-align: right;
}
.bid-actions form {
    display: inline;
}
.bid-actions .btn-sm {
    font-size: 11px; padding: 4px 10px; min-height: 28px;
}

/* ---- Detail Form ---- */
.detail-form {
    display: flex; flex-direction: column; gap: 16px;
}
.form-group {
    display: flex; flex-direction: column; gap: 6px;
}
.form-group label {
    font-size: 14px; font-weight: 600; color: var(--text);
}
.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px; color: var(--text);
    font-family: inherit; outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary); box-shadow: 0 0 0 2px rgba(26, 86, 219, 0.1);
}
.form-help {
    font-size: 12px; color: var(--text-muted); margin-top: 2px;
}
.form-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.form-col {
    display: flex; flex-direction: column;
}
.form-col label {
    font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px;
}
.form-col input {
    padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px; color: var(--text);
    font-family: inherit; outline: none;
}
.form-col input:focus {
    border-color: var(--primary); box-shadow: 0 0 0 2px rgba(26, 86, 219, 0.1);
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}
.radio-group {
    display: flex; flex-direction: column; gap: 10px;
}
.radio-label {
    display: flex; align-items: center; gap: 8px; font-size: 14px;
    cursor: pointer;
}
.radio-label input {
    accent-color: var(--primary); cursor: pointer;
}
.btn-block {
    width: 100%;
}

/* ---- Detail Footer ---- */
.detail-footer {
    display: flex; gap: 8px; justify-content: space-between;
    margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border);
}

/* ---- Alerts ---- */
.alert {
    padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px;
    font-size: 14px; border: 1px solid transparent;
}
.alert-success {
    background: #f0fdf4; border-color: #86efac; color: #166534;
}
.alert-error {
    background: #fef2f2; border-color: #fca5a5; color: #991b1b;
}
.alert-warning {
    background: #fffbeb; border-color: #fcd34d; color: #92400e;
}

/* ---- Dashboard: Needs Attention (failed handoffs) ---- */
.needs-attention {
    background: #fffbeb; border: 1px solid #fcd34d; border-radius: var(--radius);
    padding: 16px; margin-bottom: 24px;
}
.needs-attention-title { font-size: 15px; font-weight: 700; color: #92400e; margin: 0 0 4px; }
.needs-attention-sub { font-size: 13px; color: #b45309; margin: 0 0 12px; }
.needs-attention .rfq-table { margin-top: 0; }
.needs-attention-reason { font-size: 12px; color: #92400e; }

/* ---- Settings Page ---- */
.settings-page {
    max-width: 500px;
}

/* ---- Print Styles ---- */
@media print {
    .auth-bar { display: none; }
    .detail-footer { display: none; }
    .detail-bidding { break-inside: avoid; }
    body { background: #fff; }
    .detail-section { border: none; box-shadow: none; page-break-inside: avoid; }
    .btn { display: none; }
    a { text-decoration: underline; }
}

/* ---- Sticky action bar (keeps Continue on-screen on tall steps) ---- */
.step-actions--sticky {
    position: sticky;
    bottom: 0;
    background: var(--surface);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    margin: 16px -16px 0;
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
    z-index: 50;
}

/* ---- Camera angle badge (Tractable-style guide overlay) ---- */
.angle-badge {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 92%;
    padding: 5px 16px 5px 8px;
    /* Light pill (matches the Tractable reference) so the white-background
       vehicle renders blend in seamlessly. */
    background: rgba(255, 255, 255, 0.94);
    color: #1e293b;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.angle-badge img { width: 64px; height: 44px; object-fit: contain; flex-shrink: 0; }
.angle-badge span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- VIN OCR status ---- */
.vin-ocr-status {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--primary);
    margin: 0 0 12px;
}
.vin-ocr-status.active { display: flex; }
.vin-ocr-status.ok { color: var(--success); }
.vin-ocr-status.miss { color: var(--text-muted); }
.vin-ocr-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: vin-spin 0.7s linear infinite;
}
@keyframes vin-spin { to { transform: rotate(360deg); } }

/* ---- Responsive ---- */
@media (max-width: 400px) {
    .step-title { font-size: 20px; }
    .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .review-photo-grid { grid-template-columns: repeat(4, 1fr); gap: 4px; }
    .form-row { grid-template-columns: 1fr; }
    .dash-table-actions { flex-direction: column; }
    .dash-toolbar { flex-direction: column; align-items: flex-start; }
    .detail-grid { grid-template-columns: 1fr; }
}
@media (min-width: 600px) {
    .step-page { padding: 28px 24px 0; }
    .landing-card { padding: 36px 32px 48px; }
    .photo-grid { grid-template-columns: repeat(4, 1fr); }
}
