/* ── Agent / Front-Office (mobile-first) ────────────────────── */

.agent-body {
    background: radial-gradient(ellipse at top, rgba(190,19,34,.06), transparent 60%),
                linear-gradient(180deg, #f6f6f4 0%, #eceae6 100%);
    min-height: 100vh;
    display: flex; align-items: stretch; justify-content: center;
}

.agent-frame {
    width: 100%; max-width: 430px;
    background: var(--bg); min-height: 100vh;
    display: flex; flex-direction: column;
    position: relative; overflow: hidden;
}

/* ── Login page ─────────────────────────────────────────────── */
.login-body {
    background: radial-gradient(ellipse at top, rgba(190,19,34,.06), transparent 60%),
                linear-gradient(180deg, #f0efec 0%, #e8e6e2 100%);
    min-height: 100vh;
    display: flex; align-items: flex-start; justify-content: center;
}
.login-wrap {
    width: 100%; max-width: 430px; min-height: 100vh;
    display: flex; flex-direction: column;
    background: #fff;
    box-shadow: 0 0 60px rgba(0,0,0,.12);
}

.login-header {
    background: var(--ink);
    padding: 52px 24px 18px;
    display: flex; align-items: center;
    border-bottom: 3px solid var(--red);
    flex-shrink: 0;
}
.login-logo { height: 36px; width: auto; display: block; }

.login-body-inner {
    flex: 1; padding: 36px 28px 28px;
    display: flex; flex-direction: column; gap: 26px;
    background: #fff;
}
.login-intro { display: flex; flex-direction: column; }
.login-title {
    font-size: 32px; font-weight: 700; color: var(--ink);
    letter-spacing: -0.5px; line-height: 1.1; margin: 0;
}
.login-subtitle { margin: 12px 0 0; color: var(--mute); font-size: 14px; line-height: 1.55; }
.login-form { display: flex; flex-direction: column; gap: 18px; }

.login-footer {
    padding: 14px 28px 44px; border-top: 1px solid var(--line);
    font-size: 11px; color: var(--mute); letter-spacing: 0.04em;
    display: flex; justify-content: space-between;
    background: #fff;
}

/* ── Mobile header ──────────────────────────────────────────── */
.mobile-header {
    background: var(--ink); color: #fff;
    padding: 52px 18px 14px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 3px solid var(--red);
    flex-shrink: 0;
}
.mobile-logo { height: 34px; width: auto; display: block; }
.logo-fallback-sm { display: flex; align-items: center; gap: 8px; }
.logo-fallback-text-sm { color: #fff; font-weight: 800; letter-spacing: 0.14em; font-size: 13px; }

.mobile-logout-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: transparent; color: #fff;
    border: 1px solid rgba(255,255,255,.25);
    padding: 6px 10px; font-size: 12px; font-weight: 600;
    cursor: pointer; font-family: var(--font); border-radius: var(--radius);
    text-decoration: none;
}
.mobile-logout-btn:hover { background: rgba(255,255,255,.1); }

/* ── Scrollable body ────────────────────────────────────────── */
.mobile-scroll {
    flex: 1; overflow-y: auto; padding: 0 0 70px;
    -webkit-overflow-scrolling: touch;
}

/* ── Dashboard ──────────────────────────────────────────────── */
.dashboard-greeting { padding: 22px 20px 8px; }
.greeting-label { font-size: 12px; color: var(--mute); font-weight: 600; letter-spacing: 0.04em; }
.greeting-name  { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -0.4px; margin: 4px 0 0; }
.greeting-site  {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 8px; font-size: 13px; color: var(--ink-soft);
}
.greeting-site strong { color: var(--ink); }

.storage-widget {
    margin: 16px 20px 0;
    background: #fff; border: 1px solid var(--line); padding: 14px;
    border-radius: var(--radius);
}
.storage-label {
    font-size: 10px; font-weight: 700; color: var(--mute);
    text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 8px;
}
.storage-select-wrap { position: relative; }
.storage-select {
    width: 100%; height: 44px; padding: 0 36px 0 12px;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    font-size: 16px; font-weight: 600; color: var(--ink);
    appearance: none; font-family: var(--font);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1L6 6L11 1' stroke='%23111316' stroke-width='1.5' fill='none'/></svg>");
    background-repeat: no-repeat; background-position: right 12px center;
    cursor: pointer;
}
.storage-hint { font-size: 11px; color: var(--mute); margin-top: 8px; }

.cta-wrap { padding: 20px 20px 0; }
.cta-add {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; background: var(--red); color: #fff;
    padding: 20px; cursor: pointer; border-radius: var(--radius);
    box-shadow: 0 4px 14px rgba(190,19,34,.3);
    transition: transform 80ms; text-decoration: none;
}
.cta-add:hover  { background: var(--red-h); }
.cta-add:active { transform: translateY(1px); }
.cta-add-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; opacity: .85; }
.cta-add-title   { font-size: 20px; font-weight: 700; margin-top: 4px; }
.cta-add-icon {
    width: 44px; height: 44px; background: rgba(255,255,255,.18);
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius); flex-shrink: 0;
}

.stats-grid {
    padding: 20px 20px 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.stat-card {
    background: #fff; border: 1px solid var(--line); padding: 14px;
    border-radius: var(--radius);
}
.stat-label { font-size: 10px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: 0.12em; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--ink); margin-top: 6px; line-height: 1; letter-spacing: -0.5px; }

.recent-section { padding: 24px 20px 0; }
.recent-header  {
    font-size: 11px; font-weight: 700; color: var(--ink);
    text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 10px;
}
.recent-list   { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.recent-item   {
    padding: 14px; display: flex; align-items: center; gap: 12px;
    border-bottom: 1px solid var(--line);
}
.recent-item:last-child { border-bottom: none; }
.recent-icon    {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; border-radius: var(--radius);
}
.recent-icon-vn { background: #fdecee; color: var(--red); }
.recent-icon-vo { background: var(--bg); color: var(--ink-soft); }
.recent-meta    { flex: 1; min-width: 0; }
.recent-vin     {
    font-size: 13px; font-weight: 600; color: var(--ink);
    font-family: var(--mono); overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap;
}
.recent-sub     { font-size: 11px; color: var(--mute); margin-top: 2px; }
.recent-empty   { padding: 20px; text-align: center; color: var(--mute); font-size: 13px; }

/* ── No active campaign state ────────────────────────────────── */
.no-campaign-card {
    margin: 32px 20px 0;
    background: #fff; border: 1px solid var(--line);
    padding: 36px 24px; text-align: center;
    border-radius: var(--radius);
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.no-campaign-icon {
    width: 68px; height: 68px; border-radius: 999px;
    background: var(--bg); color: var(--mute);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.no-campaign-title {
    font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: -0.2px;
}
.no-campaign-desc {
    font-size: 14px; color: var(--mute); line-height: 1.6; max-width: 270px;
}

/* ── Add vehicle page ────────────────────────────────────────── */
.add-header {
    padding: 52px 8px 12px 8px;
    display: flex !important; align-items: center !important; gap: 6px !important;
    justify-content: flex-start !important;
}
.add-back-btn {
    background: transparent; border: none; color: #fff; cursor: pointer;
    padding: 10px; display: inline-flex; align-items: center; gap: 4px;
    font-family: var(--font); font-size: 14px; flex-shrink: 0;
}
.add-header-title { flex: 1; }
.add-header-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; color: rgba(255,255,255,.7); text-transform: uppercase; }
.add-header-step    { font-size: 15px; font-weight: 600; margin-top: 1px; }
.add-header-storage {
    padding: 6px 10px; background: rgba(255,255,255,.1);
    font-size: 11px; font-weight: 600; color: #fff;
    border-radius: var(--radius); flex-shrink: 0;
    border: 1px solid rgba(255,255,255,.2); cursor: pointer;
    display: inline-flex; align-items: center;
    transition: background 120ms; font-family: var(--font);
}
.add-header-storage:hover { background: rgba(255,255,255,.2); }

/* ── Storage picker bottom-sheet ── */
.storage-sheet-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.4);
    z-index: 200; animation: fadeIn 150ms ease;
}
.storage-sheet-backdrop[hidden] { display: none !important; }

.storage-sheet {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 430px;
    background: #fff; z-index: 201;
    border-radius: 16px 16px 0 0;
    padding: 12px 0 32px;
    animation: slideUpSheet 220ms cubic-bezier(.2,.8,.2,1);
}
.storage-sheet[hidden] { display: none !important; }

.storage-sheet-handle {
    width: 36px; height: 4px; background: var(--line);
    border-radius: 99px; margin: 0 auto 16px;
}
.storage-sheet-title {
    font-size: 11px; font-weight: 700; color: var(--mute);
    text-transform: uppercase; letter-spacing: 0.12em;
    padding: 0 20px 12px;
    border-bottom: 1px solid var(--line);
}
.storage-sheet-options { display: flex; flex-direction: column; }
.storage-sheet-option {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; font-size: 15px; font-weight: 500; color: var(--ink);
    background: none; border: none; cursor: pointer; font-family: var(--font);
    border-bottom: 1px solid var(--line); text-align: left;
    transition: background 80ms;
}
.storage-sheet-option:last-child { border-bottom: none; }
.storage-sheet-option:hover { background: var(--bg); }
.storage-sheet-option.active { font-weight: 700; color: var(--red); }
.storage-sheet-option.active svg { color: var(--red); }

@keyframes slideUpSheet {
    from { transform: translateX(-50%) translateY(100%); }
    to   { transform: translateX(-50%) translateY(0); }
}

.progress-bar  { height: 3px; background: var(--line); flex-shrink: 0; }
.progress-fill { height: 100%; background: var(--red); transition: width 220ms; }

.step-content { animation: slideUp 220ms ease; }
.step-inner   { padding: 24px 20px 56px; }
.step-title   { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -0.3px; margin-bottom: 6px; }
.step-desc    { color: var(--mute); font-size: 14px; line-height: 1.5; margin-bottom: 22px; }

/* Type picker cards */
.type-cards { display: flex; flex-direction: column; gap: 12px; }
.type-card {
    background: #fff; border: 2px solid var(--line);
    padding: 20px; cursor: pointer; text-align: left;
    display: flex; align-items: center; gap: 16px;
    font-family: var(--font); border-radius: var(--radius);
    transition: all 120ms; width: 100%;
}
.type-card:hover { border-color: var(--ink-soft); }
.type-card.selected { border-color: var(--red); }
.type-card-icon {
    width: 60px; height: 60px; background: var(--bg); color: var(--ink);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; border-radius: var(--radius);
    transition: all 120ms;
}
.type-card.selected .type-card-icon { background: var(--red); color: #fff; }
.type-card-text  { flex: 1; min-width: 0; }
.type-card-title { font-size: 17px; font-weight: 700; color: var(--ink); }
.type-card-sub   { font-size: 13px; color: var(--mute); margin-top: 4px; line-height: 1.4; }
.type-card-arrow { color: var(--mute); flex-shrink: 0; }

/* VIN input */
.vin-input {
    height: 64px; padding: 0 16px;
    border: 2px solid var(--line); border-radius: var(--radius);
    background: #fff; color: var(--ink);
    font-family: var(--mono);
    font-size: 28px; font-weight: 700; letter-spacing: 0.3em; text-align: center;
    outline: none; text-transform: uppercase; width: 100%;
    transition: border-color 120ms;
}
.vin-input.complete { border-color: #3a7d44; }
.vin-input:focus    { border-color: var(--ink-soft); }

.vin-status {
    margin-top: 24px; display: flex; align-items: center; justify-content: center;
    gap: 6px; font-size: 13px; color: var(--mute);
}
.vin-dot {
    display: inline-block; width: 6px; height: 6px;
    border-radius: 99px; background: var(--mute);
    animation: pulse 1.4s ease-in-out infinite;
}

.vin-matches-title {
    font-size: 11px; font-weight: 700; color: var(--ink);
    text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 10px;
}
.vin-match {
    text-align: left; cursor: pointer; padding: 14px;
    background: #fff; border: 2px solid var(--line);
    font-family: var(--font); border-radius: var(--radius);
    display: flex; align-items: center; gap: 12px;
    transition: all 120ms; width: 100%; margin-bottom: 8px;
}
.vin-match:hover   { border-color: var(--ink-soft); }
.vin-match.selected { background: #fdecee; border-color: var(--red); }
.vin-radio {
    width: 18px; height: 18px; border-radius: 99px; border: 2px solid var(--line);
    background: #fff; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    transition: all 120ms;
}
.vin-match.selected .vin-radio { border-color: var(--red); background: var(--red); }
.vin-radio-dot { width: 6px; height: 6px; background: #fff; border-radius: 99px; }
.vin-match-name { font-weight: 700; font-size: 15px; color: var(--ink); }
.vin-match-vin  { font-family: var(--mono); font-size: 12px; color: var(--mute); margin-top: 3px; }
.vin-match-vin .vin-highlight { color: var(--red); font-weight: 700; }
.vin-match-inventory-badge {
    font-size: 11px; font-weight: 700; color: var(--mute);
    margin-top: 5px; display: flex; align-items: center; gap: 4px;
}
.vin-match-locked {
    opacity: .55; cursor: not-allowed !important;
    background: var(--bg) !important; border-color: var(--line) !important;
}
.vin-match-locked:hover { border-color: var(--line) !important; }

/* Plate input */
.plate-input {
    height: 64px; padding: 0 16px;
    border: 2px solid var(--line); border-radius: var(--radius);
    background: #fff; color: var(--ink);
    font-family: var(--mono);
    font-size: 26px; font-weight: 700; letter-spacing: 0.12em; text-align: center;
    outline: none; text-transform: uppercase; width: 100%;
    transition: border-color 120ms;
}
.plate-input.valid  { border-color: #3a7d44; }
.plate-input:focus  { border-color: var(--ink-soft); }

.lookup-loading {
    margin-top: 20px; padding: 14px;
    background: var(--bg); border: 1px dashed var(--line);
    display: flex; align-items: center; gap: 12px;
    font-size: 13px; color: var(--ink-soft);
    animation: slideUp 200ms ease;
    border-radius: var(--radius);
}
.lookup-spinner {
    width: 18px; height: 18px; border-radius: 99px; flex-shrink: 0;
    border: 2px solid var(--line); border-top-color: var(--red);
    animation: spin 700ms linear infinite;
}

.vehicle-found-card {
    background: #fff; border: 2px solid #3a7d44;
    padding: 16px; display: flex; gap: 14px; align-items: center;
    animation: slideUp 220ms ease; border-radius: var(--radius);
}
.vehicle-found-icon {
    width: 52px; height: 52px; background: #eef4ef; color: #3a7d44;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; border-radius: var(--radius);
}
.vehicle-found-label {
    font-size: 10px; font-weight: 700; color: var(--olive);
    text-transform: uppercase; letter-spacing: 0.12em;
    display: inline-flex; align-items: center; gap: 5px;
}
.vehicle-found-name { font-size: 17px; font-weight: 700; color: var(--ink); margin-top: 4px; line-height: 1.2; }
.vehicle-found-model { color: var(--ink-soft); font-weight: 600; }

.vehicle-detail-block {
    background: #fff; border: 1px solid var(--line); padding: 16px;
    display: flex; flex-direction: column; gap: 14px;
    animation: slideUp 220ms ease; border-radius: var(--radius);
}
.vehicle-detail-header {
    font-size: 10px; font-weight: 700; color: var(--mute);
    text-transform: uppercase; letter-spacing: 0.12em;
    display: flex; align-items: center; justify-content: space-between;
}
.vehicle-detail-prefilled { color: var(--olive); }
.readonly-row {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 6px 0; border-bottom: 1px solid var(--line); gap: 12px;
}
.readonly-label { font-size: 12px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.08em; }
.readonly-value { font-size: 15px; color: var(--ink); font-weight: 600; text-align: right; }
.km-wrap { position: relative; }
.km-suffix {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    color: var(--mute); font-size: 14px; font-weight: 600; pointer-events: none;
}

.manual-banner {
    padding: 12px 14px; font-size: 13px;
    border-left-width: 3px; border-left-style: solid;
    border-radius: var(--radius); margin-bottom: 14px;
}
.manual-banner-manual  { background: var(--bg);   border-color: var(--ink);  color: var(--ink-soft); }
.manual-banner-unknown { background: #fdecee;     border-color: var(--red);  color: var(--red); }

.switch-to-manual-link {
    background: none; border: none; cursor: pointer;
    color: var(--ink-soft); font-size: 13px; padding: 6px; font-family: var(--font);
    text-decoration: underline; text-underline-offset: 3px;
    text-decoration-color: var(--line); align-self: flex-start;
    display: inline-block; margin-top: 4px;
}

/* ── Confirm page ────────────────────────────────────────────── */
.confirm-page { padding: 24px 20px 56px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.confirm-success-icon {
    width: 88px; height: 88px; border-radius: 999px;
    background: var(--olive-bg); display: flex; align-items: center;
    justify-content: center; margin-bottom: 22px;
}
.confirm-title    { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -0.3px; }
.confirm-subtitle { margin: 8px 0 0; color: var(--mute); font-size: 14px; line-height: 1.5; max-width: 280px; }
.confirm-card {
    margin-top: 24px; width: 100%; background: var(--bg); padding: 16px;
    text-align: left; border-left: 3px solid var(--red);
    border-radius: var(--radius);
}
.confirm-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; border-bottom: 1px solid var(--line); gap: 12px;
}
.confirm-row:last-child { border-bottom: none; }
.confirm-label {
    font-size: 11px; font-weight: 700; color: var(--mute);
    text-transform: uppercase; letter-spacing: 0.08em;
}
.confirm-actions { margin-top: 22px; width: 100%; display: flex; flex-direction: column; gap: 10px; }
