/* ============================================================
   DealQuote — Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Roboto:wght@400;500;700&display=swap');

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

:root {
    --navy:        #102A43;
    --navy-dk:     #0a1c2e;
    --orange:      #79a1b8;
    --orange-dk:   #5f8aa4;
    --orange-light:#eef4f8;
    --green:       #34a853;
    --red:         #ea4335;
    --text:        #102A43;
    --muted:       #4a6080;
    --border:      #d0dae8;
    --bg:          #F0F4F8;
    --white:       #ffffff;
    --shadow:      0 1px 6px rgba(16,42,67,.10);
    --radius:      8px;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4,
.card-title,
.auth-card h2,
.page-header h1 {
    font-family: 'Montserrat', Arial, sans-serif;
}

/* ── NAV ── */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.nav-logo img {
    height: 44px;
    width: auto;
    display: block;
    object-fit: contain;
}
.nav-links { display: flex; align-items: center; gap: 12px; }
.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 14px;
    padding: 8px 14px;
    border-radius: var(--radius);
    transition: background .15s;
}
.nav-links a:hover { background: var(--bg); color: var(--text); }
.nav-links .btn-nav {
    background: var(--orange);
    color: var(--navy) !important;
    font-weight: 500;
}
.nav-links .btn-nav:hover { background: var(--orange-dk); }

/* ── MAIN LAYOUT ── */
.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ── HERO ── */
.hero {
    text-align: center;
    padding: 56px 20px 32px;
}
.hero h1 {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: 12px;
}
.hero p {
    font-size: 17px;
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto 8px;
}

/* ── CARDS ── */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--navy);
}

/* ── FORM ELEMENTS ── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}
.form-group select,
.form-group input,
.form-group textarea {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    transition: border-color .15s, box-shadow .15s, background .15s;
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
}
.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235f6368' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--orange);
    background: var(--orange-light);
    box-shadow: 0 0 0 3px rgba(255,179,124,.28);
}
.form-group select:disabled { background-color: var(--bg); color: var(--muted); cursor: not-allowed; }
.form-group textarea { resize: vertical; min-height: 90px; }

/* ── BUTTONS ── */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius);
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, box-shadow .15s;
    font-family: inherit;
    text-align: center;
}
.btn-primary {
    background: var(--orange);
    color: var(--navy);
}
.btn-primary:hover { background: var(--orange-dk); box-shadow: 0 2px 8px rgba(121,161,184,.45); }
.btn-success { background: var(--green); color: var(--white); }
.btn-success:hover { background: #2d8f49; }
.btn-outline {
    background: var(--white);
    color: var(--navy);
    border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--bg); border-color: var(--navy); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #c62828; }
.btn-sm { padding: 6px 16px; font-size: 13px; }
.btn-block { display: block; width: 100%; }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
th {
    background: var(--bg);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--muted);
    padding: 10px 14px;
    border-bottom: 2px solid var(--border);
    text-align: left;
}
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--orange-light); }

/* ── ALERTS ── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}
.alert-success { background: #e6f4ea; color: #1e7e34; border: 1px solid #c3e6cb; }
.alert-error   { background: #fce8e6; color: #c62828; border: 1px solid #f5c6cb; }
.alert-info    { background: #e8f0fe; color: #1a56db; border: 1px solid #c3d1fb; }

/* ── HOW IT WORKS ── */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 32px 0;
    text-align: center;
}
.step-num {
    width: 36px;
    height: 36px;
    background: var(--navy);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin: 0 auto 12px;
}
.step h3 { font-size: 15px; margin-bottom: 6px; }
.step p  { font-size: 13px; color: var(--muted); }

/* ── QUOTE CARD ── */
.quote-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.quote-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--green);
}
.quote-dealer { font-weight: 600; font-size: 15px; }
.quote-meta   { font-size: 13px; color: var(--muted); }

/* ── INQUIRY SUMMARY ── */
.car-tag {
    display: inline-block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    margin: 2px 4px 2px 0;
}

/* ── PAGE HEADER ── */
.page-header {
    padding: 32px 0 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.page-header h1 { font-size: 24px; font-weight: 700; color: var(--navy); }

/* ── AUTH PAGES ── */
.auth-wrap {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}
.auth-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow);
}
.auth-card h2 { font-size: 22px; margin-bottom: 24px; color: var(--navy); }
.auth-card .form-group { margin-bottom: 16px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--muted); }
.auth-footer a { color: var(--navy); text-decoration: none; }

/* ── STATS BAR ── */
.stats-bar {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.stat-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    flex: 1;
    min-width: 140px;
}
.stat-box .num { font-size: 30px; font-weight: 700; color: var(--navy); }
.stat-box .lbl { font-size: 13px; color: var(--muted); }

/* ── TABS ── */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-family: inherit;
    transition: color .15s;
}
.tab-btn.active { color: var(--navy); border-bottom-color: var(--navy); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── EMPTY STATE ── */
.empty {
    text-align: center;
    padding: 56px 20px;
    color: var(--muted);
}
.empty p { margin-top: 8px; font-size: 14px; }

/* ── FOOTER ── */
footer {
    text-align: center;
    padding: 28px 20px 24px;
    font-size: 13px;
    color: var(--muted);
    border-top: 1px solid var(--border);
    margin-top: 60px;
    background: var(--white);
}
.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 24px;
    margin-bottom: 12px;
}
.footer-links a {
    color: var(--navy);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: opacity .15s;
}
.footer-links a:hover { opacity: .7; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
    .nav { padding: 12px 16px; }
    .hero { padding: 36px 16px 24px; }
    .card { padding: 20px 16px; }
    .auth-card { padding: 28px 20px; }
    .page-header { padding: 20px 0 16px; }
    .quote-card { flex-direction: column; align-items: flex-start; }
}
