/* 
   AutoValuate AI - Vehicle Price Estimation Platform
   Refined Royal Blue & Obsidian Design System
*/

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-soft: rgba(37, 99, 235, 0.12);
    --accent-color: #0ea5e9;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #0b1120;
    --dark-surface: #111827;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-heading: 'Space Grotesk', system-ui, sans-serif;

    /* Bootstrap Theme Overrides */
    --bs-primary: #2563eb;
    --bs-primary-rgb: 37, 99, 235;
    --bs-link-color: #2563eb;
    --bs-link-hover-color: #1d4ed8;
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 40%, #eef2f7 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.font-heading {
    font-family: var(--font-heading);
}

.hover-white:hover {
    color: #ffffff !important;
}

/* Override Bootstrap primary button & outline */
.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    box-shadow: 0 6px 18px -4px rgba(37, 99, 235, 0.45);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -4px rgba(37, 99, 235, 0.5);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-primary-subtle {
    background-color: #dbeafe !important;
}

.border-primary-subtle {
    border-color: #93c5fd !important;
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
}

/* Top Navbar */
.navbar-modern {
    background: rgba(11, 17, 32, 0.95);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.22);
}

.navbar-modern .nav-link {
    color: #cbd5e1;
    border-radius: 999px;
    font-size: 0.88rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.navbar-modern .nav-link:hover {
    color: #ffffff;
    background: rgba(59, 130, 246, 0.16);
}

.navbar-modern .nav-link.active-pill {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(29, 78, 216, 0.96));
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.brand-icon-box {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* Card Elevations */
.custom-card {
    background: #ffffff;
    border: 1px solid rgba(203, 213, 225, 0.85);
    border-radius: 20px;
    box-shadow: 0 8px 24px -6px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.custom-card:hover {
    box-shadow: 0 14px 30px -8px rgba(37, 99, 235, 0.1), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
}

/* Compact Hero Banner (Royal Blue Card) */
.hero-compact-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #2563eb 100%);
    border-radius: 20px;
    border: 1px solid rgba(147, 197, 253, 0.35);
    box-shadow: 0 12px 28px -8px rgba(37, 99, 235, 0.45);
    color: #ffffff;
}

.hero-icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    border: 1.5px solid rgba(255, 255, 255, 0.32);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.hero-kicker {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #bfdbfe;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
}

.hero-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid #bfdbfe;
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Hero Banner (used on ML Eval / other pages) */
.hero-gradient {
    background: linear-gradient(135deg, #0b1120 0%, #0f172a 55%, #172554 100%);
    border-radius: 20px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.hero-badge-pill {
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(96, 165, 250, 0.35);
    color: #93c5fd;
}

.valuation-pill {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

/* Darker, Bolder Form & Body Typography */
.text-dark-sub {
    color: #1e293b !important;
    font-weight: 600;
}

.form-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: #0f172a;
    margin-bottom: 0.4rem;
}

.form-text {
    color: #334155 !important;
    font-weight: 600;
}

.form-control {
    border-radius: 12px;
    border: 1.5px solid #94a3b8;
    padding: 0.65rem 0.95rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.form-select {
    border-radius: 12px;
    border: 1.5px solid #94a3b8;
    padding: 0.65rem 2.25rem 0.65rem 0.95rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.form-select:focus, .form-control:focus {
    background-color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.form-range::-webkit-slider-thumb {
    background: var(--primary-color);
}

/* Fuel Type Radio Cards */
.fuel-selector input[type="radio"] {
    display: none;
}

.fuel-selector label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 13px 16px;
    border: 1.5px solid #94a3b8;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.92rem;
    color: #0f172a;
    background-color: #f8fafc;
    transition: all 0.2s ease;
}

.fuel-selector label i {
    font-size: 1.2rem;
    margin-bottom: 6px;
    color: #475569;
}

.fuel-selector label:hover {
    border-color: #60a5fa;
    background-color: #ffffff;
}

.fuel-selector input[type="radio"]:checked + label {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
    color: var(--primary-hover);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.22);
}

.fuel-selector input[type="radio"]:checked + label i {
    color: var(--primary-color);
}

/* Simple Big Car Icon Badge */
.big-car-showcase {
    width: 150px;
    height: 150px;
    border-radius: 36px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #93c5fd;
    box-shadow: 0 14px 32px -8px rgba(37, 99, 235, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 4.5rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.big-car-showcase:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 20px 36px -8px rgba(37, 99, 235, 0.36);
}

.text-muted {
    color: #1e293b !important;
}

/* Valuation Result Card */
.valuation-badge {
    background: linear-gradient(135deg, #0b1120 0%, #1e3a8a 52%, #2563eb 100%);
    border-radius: 20px;
    color: #ffffff;
    padding: 26px;
    box-shadow: 0 14px 30px -6px rgba(37, 99, 235, 0.42);
    border: 1px solid rgba(147, 197, 253, 0.28);
}

.price-display {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.1;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.fair-range-bar {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    position: relative;
    margin: 14px 0 4px;
    overflow: hidden;
}

.fair-range-fill {
    height: 100%;
    width: 68%;
    margin: 0 auto;
    background: linear-gradient(90deg, #93c5fd, #38bdf8);
    border-radius: 999px;
}

/* Purchase vs Resale Comparison Box */
.purchase-comparison-box {
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
    border: 1.5px solid #bfdbfe;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 6px 18px -6px rgba(37, 99, 235, 0.14);
}

.retained-progress {
    height: 10px;
    background-color: #fee2e2;
    border-radius: 999px;
    overflow: hidden;
}

.retained-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 999px;
    transition: width 0.5s ease;
}

/* Quick Suggestion Chips */
.quick-chip {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 20px;
    background: #e2e8f0;
    color: #0f172a;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    transition: all 0.15s ease;
    user-select: none;
}

.quick-chip:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
}

/* KPI Card Styles */
.kpi-card {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -6px rgba(37, 99, 235, 0.12);
}

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.kpi-value {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 800;
    color: #020617;
    line-height: 1.2;
}

.kpi-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.35s ease forwards;
}

/* Table styling */
.table-custom {
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom thead th {
    background-color: #f8fafc;
    font-weight: 700;
    font-size: 0.82rem;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #cbd5e1;
}

.table-custom tbody tr:hover {
    background-color: #eff6ff;
}
