/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1629;
    --bg-card: #141b2d;
    --bg-card-hover: #1a2340;
    --border: #1e293b;
    --border-light: #2d3a52;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-primary: #6366f1;
    --accent-secondary: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #6366f1, #06b6d4);
    --green: #22c55e;
    --green-bg: rgba(34, 197, 94, 0.1);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.1);
    --orange: #f97316;
    --orange-bg: rgba(249, 115, 22, 0.1);
    --yellow: #eab308;
    --yellow-bg: rgba(234, 179, 8, 0.1);
    --blue: #3b82f6;
    --blue-bg: rgba(59, 130, 246, 0.1);
    --purple: #a855f7;
    --purple-bg: rgba(168, 85, 247, 0.1);
    --gold: #fbbf24;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-link.active {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.notification-bell {
    position: relative;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.notification-bell:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--red);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 12px 4px 4px;
    border-radius: var(--radius-xl);
    transition: all 0.2s;
}

.user-avatar:hover {
    background: rgba(99, 102, 241, 0.1);
}

.user-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 20px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ===== HERO SCORE SECTION ===== */
.hero-section {
    padding: 96px 0 48px;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

/* Main Score Card */
.score-card-main {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.score-card-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.score-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.score-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.score-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.score-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-xl);
    font-size: 13px;
    font-weight: 600;
}

.score-badge.gold {
    background: rgba(251, 191, 36, 0.15);
    color: var(--gold);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.score-badge.platinum {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-secondary);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Score Gauge */
.score-display {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.score-gauge-container {
    position: relative;
    width: 280px;
    height: 170px;
}

.score-gauge {
    width: 100%;
    height: auto;
}

.score-number-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.score-number {
    font-size: 56px;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.score-outof {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 2px;
}

.score-change {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
}

.change-positive {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--green);
    font-weight: 600;
    font-size: 14px;
}

.change-period {
    color: var(--text-muted);
    font-size: 13px;
}

/* Score Factors */
.score-factors h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.factor-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.factor-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.factor-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-light);
}

.factor-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-bg);
    color: var(--green);
    flex-shrink: 0;
}

.factor-icon.warn {
    background: var(--orange-bg);
    color: var(--orange);
}

.factor-info {
    flex: 1;
    min-width: 0;
}

.factor-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    display: block;
    margin-bottom: 6px;
}

.factor-bar {
    height: 4px;
    border-radius: 4px;
    background: var(--border);
    overflow: hidden;
}

.factor-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--green);
    transition: width 1.5s ease-out;
}

.factor-bar.warning .factor-fill {
    background: var(--orange);
}

.factor-impact {
    font-size: 14px;
    font-weight: 700;
    color: var(--green);
    flex-shrink: 0;
}

.factor-impact.neg {
    color: var(--red);
}

/* ===== SIDE PANEL ===== */
.side-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trend-card {
    min-height: 240px;
}

/* Quick Stats */
.quick-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.green { background: var(--green-bg); color: var(--green); }
.stat-icon.blue { background: var(--blue-bg); color: var(--blue); }
.stat-icon.orange { background: var(--orange-bg); color: var(--orange); }
.stat-icon.purple { background: var(--purple-bg); color: var(--purple); }

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== SECTIONS ===== */
.section {
    padding: 64px 0;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.section-header.center {
    flex-direction: column;
    text-align: center;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
}

.section-desc {
    font-size: 15px;
    color: var(--text-muted);
    margin-top: 8px;
}

.add-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border);
}

.filter-tab {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.filter-tab:hover {
    color: var(--text-primary);
}

.filter-tab.active {
    background: var(--accent-primary);
    color: white;
}

/* ===== VIOLATION TIMELINE ===== */
.violation-timeline {
    position: relative;
    padding-left: 40px;
}

.violation-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-dot {
    position: absolute;
    left: -33px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    z-index: 1;
}

.timeline-dot.red { background: var(--red); box-shadow: 0 0 8px var(--red); }
.timeline-dot.orange { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.timeline-dot.yellow { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); }
.timeline-dot.green { background: var(--green); box-shadow: 0 0 8px var(--green); }

.timeline-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    transition: all 0.3s;
}

.timeline-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
}

.timeline-card.positive {
    border-color: rgba(34, 197, 94, 0.2);
    background: rgba(34, 197, 94, 0.03);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.timeline-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.timeline-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.separator {
    color: var(--border-light);
}

.timeline-impact {
    font-size: 16px;
    font-weight: 800;
    flex-shrink: 0;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
}

.timeline-impact.neg {
    color: var(--red);
    background: var(--red-bg);
}

.timeline-impact.pos {
    color: var(--green);
    background: var(--green-bg);
}

.timeline-details {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.severity-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-xl);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.severity-badge.high { background: var(--red-bg); color: var(--red); }
.severity-badge.medium { background: var(--orange-bg); color: var(--orange); }
.severity-badge.low { background: var(--yellow-bg); color: var(--yellow); }
.severity-badge.positive { background: var(--green-bg); color: var(--green); }

.challan-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-xl);
    font-weight: 500;
}

.challan-status.paid { background: rgba(34, 197, 94, 0.08); color: var(--green); }
.challan-status.unpaid { background: var(--red-bg); color: var(--red); }
.challan-status.course { background: var(--blue-bg); color: var(--blue); }

.vehicle-tag {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-xl);
    background: var(--purple-bg);
    color: var(--purple);
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* ===== INSURANCE SECTION ===== */
.insurance-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.insurance-comparison {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.insurance-comparison h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 28px;
}

.premium-bar-group {
    margin-bottom: 24px;
}

.premium-bar-group.highlight {
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.premium-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.premium-bar-container {
    height: 36px;
    background: var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.premium-bar {
    height: 100%;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 16px;
    font-size: 14px;
    font-weight: 700;
    color: white;
    transition: width 1.5s ease-out;
}

.premium-bar.standard { background: var(--text-muted); }
.premium-bar.discounted { background: var(--accent-gradient); }
.premium-bar.penalty { background: linear-gradient(135deg, var(--red), #b91c1c); }

.premium-sublabel {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.premium-sublabel.savings { color: var(--green); font-weight: 600; }
.premium-sublabel.danger { color: var(--red); font-weight: 500; }

/* Insurance Offers */
.insurance-offers {
    display: flex;
    flex-direction: column;
}

.insurance-offers h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.offer-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.offer-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s;
}

.offer-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.offer-logo {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-secondary);
    background: rgba(6, 182, 212, 0.1);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    min-width: 90px;
    text-align: center;
}

.offer-details {
    flex: 1;
}

.offer-type {
    font-size: 12px;
    color: var(--text-muted);
}

.offer-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.offer-price span {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
}

.offer-discount {
    font-size: 12px;
    color: var(--green);
    font-weight: 600;
    margin-top: 2px;
}

.offer-btn {
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.offer-btn:hover {
    background: var(--accent-primary);
    color: white;
}

/* ===== ANALYTICS ===== */
.analytics-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
}

.analytics-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.analytics-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.analytics-card.large {
    grid-column: 1;
    grid-row: 1 / 3;
}

.analytics-card.wide {
    grid-column: 1 / -1;
}

/* Percentile */
.percentile-display {
    text-align: center;
}

.percentile-circle {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
}

.percentile-circle svg {
    width: 100%;
    height: 100%;
}

.percentile-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.percentile-number span {
    font-size: 36px;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1;
}

.percentile-number small {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.percentile-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.percentile-text strong {
    color: var(--accent-secondary);
}

/* City Rankings */
.city-rankings {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.city-rank {
    display: grid;
    grid-template-columns: 30px 90px 1fr 40px;
    align-items: center;
    gap: 10px;
}

.rank-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}

.rank-city {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.rank-bar-container {
    height: 6px;
    background: var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.rank-bar {
    height: 100%;
    border-radius: 6px;
    background: var(--accent-gradient);
    transition: width 1.5s ease-out;
}

.rank-score {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-secondary);
    text-align: right;
}

/* Crisis Stats */
.crisis-stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 24px;
    padding: 20px 0;
}

.crisis-stat {
    text-align: center;
}

.crisis-number {
    font-size: 36px;
    font-weight: 900;
    color: var(--red);
    line-height: 1;
    margin-bottom: 8px;
}

.crisis-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== VEHICLES ===== */
.vehicles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.vehicle-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
}

.vehicle-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.vehicle-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vehicle-icon.car { background: var(--blue-bg); color: var(--blue); }
.vehicle-icon.bike { background: var(--purple-bg); color: var(--purple); }

.vehicle-info {
    flex: 1;
    min-width: 0;
}

.vehicle-info h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.vehicle-reg {
    font-size: 13px;
    color: var(--accent-secondary);
    font-weight: 600;
    font-family: 'Courier New', monospace;
    margin: 4px 0;
}

.vehicle-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.vehicle-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
}

.vehicle-score {
    text-align: center;
    flex-shrink: 0;
}

.mini-score {
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
}

.mini-score.good { color: var(--green); }
.mini-score.average { color: var(--yellow); }
.mini-score.poor { color: var(--red); }

.vehicle-score small {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(99, 102, 241, 0.3);
}

.step-number {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: white;
}

.step-icon {
    color: var(--accent-secondary);
    margin: 16px 0 20px;
}

.step-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.step-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 12px;
    line-height: 1.7;
}

.footer-links h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.footer-links a {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-secondary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

/* ===== NOTIFICATION PANEL ===== */
.notification-panel {
    position: fixed;
    top: 64px;
    right: -400px;
    width: 380px;
    height: calc(100vh - 64px);
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 999;
    transition: right 0.3s ease;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}

.notification-panel.open {
    right: 0;
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.notif-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.notif-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}

.notif-list {
    padding: 8px;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
    cursor: pointer;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.notif-item.unread {
    background: rgba(99, 102, 241, 0.05);
}

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-icon.green { background: var(--green-bg); color: var(--green); }
.notif-icon.blue { background: var(--blue-bg); color: var(--blue); }
.notif-icon.orange { background: var(--orange-bg); color: var(--orange); }

.notif-content p {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.5;
}

.notif-content small {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

/* ===== FEATURES SECTION ===== */
.features-category {
    margin-bottom: 48px;
}

.features-category:last-child {
    margin-bottom: 0;
}

.features-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.features-category-title svg {
    color: var(--accent-secondary);
    flex-shrink: 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
}

.feature-card.expanded {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-glow);
}

.feature-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.feature-card-header:hover {
    background: rgba(255, 255, 255, 0.02);
}

.feature-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon-wrap.red { background: var(--red-bg); color: var(--red); }
.feature-icon-wrap.orange { background: var(--orange-bg); color: var(--orange); }
.feature-icon-wrap.yellow { background: var(--yellow-bg); color: var(--yellow); }
.feature-icon-wrap.green { background: var(--green-bg); color: var(--green); }
.feature-icon-wrap.blue { background: var(--blue-bg); color: var(--blue); }
.feature-icon-wrap.purple { background: var(--purple-bg); color: var(--purple); }
.feature-icon-wrap.cyan { background: rgba(6, 182, 212, 0.1); color: var(--accent-secondary); }

.feature-card-info {
    flex: 1;
    min-width: 0;
}

.feature-card-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.feature-card-info p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.feature-expand-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-expand-btn:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.feature-expand-btn svg {
    transition: transform 0.3s ease;
}

.feature-card.expanded .feature-expand-btn svg {
    transform: rotate(180deg);
}

.feature-card.expanded .feature-expand-btn {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

/* Feature Card Details (Accordion) */
.feature-card-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.feature-card.expanded .feature-card-details {
    max-height: 500px;
}

.feature-detail-content {
    padding: 0 20px 20px;
    border-top: 1px solid var(--border);
    margin-top: 0;
    padding-top: 16px;
}

/* Feature Thresholds */
.feature-thresholds {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.feature-threshold {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
}

.feature-threshold.red-zone {
    background: var(--red-bg);
    color: var(--red);
}

.feature-threshold.orange-zone {
    background: var(--orange-bg);
    color: var(--orange);
}

.feature-threshold.dark-zone {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.feature-threshold.yellow-zone {
    background: var(--yellow-bg);
    color: var(--yellow);
}

.feature-threshold.green-zone {
    background: var(--green-bg);
    color: var(--green);
}

.feature-threshold.blue-zone {
    background: var(--blue-bg);
    color: var(--blue);
}

.feature-threshold.purple-zone {
    background: var(--purple-bg);
    color: var(--purple);
}

.threshold-label {
    font-weight: 600;
}

.threshold-action {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Feature Stats Row */
.feature-stats-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.feature-stat {
    flex: 1;
    min-width: 100px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}

.feature-stat-value {
    display: block;
    font-size: 20px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 4px;
}

.feature-stat-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.feature-detail-note {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 14px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.04);
    border-left: 3px solid var(--accent-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ===== MOBILE NAV OVERLAY ===== */
.body-no-scroll {
    overflow: hidden;
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Hamburger animation */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== RESPONSIVE ===== */

/* --- Tablet landscape & small desktop --- */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    .analytics-card.large {
        grid-column: 1;
        grid-row: auto;
    }
    .analytics-card.wide {
        grid-column: 1;
    }
    .insurance-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .steps-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* --- Tablet portrait & mobile --- */
@media (max-width: 768px) {
    /* Mobile Nav */
    .nav-links {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 14, 26, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 32px 24px;
        gap: 4px;
        z-index: 999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .nav-link {
        font-size: 18px;
        padding: 14px 20px;
        border-radius: var(--radius-md);
        border-bottom: 1px solid var(--border);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .user-name {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* Notification panel full width on mobile */
    .notification-panel {
        width: 100vw;
        right: -100vw;
    }

    /* Hero */
    .hero-section {
        padding: 80px 0 32px;
    }

    .score-card-main {
        padding: 24px 16px;
    }

    .score-header {
        flex-direction: column;
        gap: 12px;
    }

    /* Quick Stats */
    .quick-stats {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
        gap: 10px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
    }

    .stat-value {
        font-size: 20px;
    }

    /* Vehicles */
    .vehicles-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-card {
        flex-direction: row;
        text-align: left;
    }

    .vehicle-icon {
        width: 52px;
        height: 52px;
    }

    .vehicle-icon svg {
        width: 28px;
        height: 28px;
    }

    /* Steps */
    .steps-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Section headers */
    .section {
        padding: 48px 0;
    }

    .section-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .section-header h2 {
        font-size: 24px;
    }

    /* Filter tabs horizontal scroll */
    .filter-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        flex-wrap: nowrap;
        max-width: 100%;
        scrollbar-width: none;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .filter-tab {
        flex-shrink: 0;
    }

    /* Timeline */
    .violation-timeline {
        padding-left: 30px;
    }

    .violation-timeline::before {
        left: 10px;
    }

    .timeline-dot {
        left: -27px;
    }

    .timeline-card {
        padding: 16px;
    }

    .timeline-header {
        flex-direction: column;
        gap: 10px;
    }

    .timeline-header h4 {
        font-size: 14px;
    }

    .timeline-meta {
        font-size: 11px;
    }

    .timeline-impact {
        align-self: flex-start;
        font-size: 14px;
    }

    .timeline-details {
        gap: 8px;
    }

    /* Crisis stats */
    .crisis-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        justify-content: center;
    }

    .crisis-number {
        font-size: 28px;
    }

    .crisis-label {
        font-size: 11px;
    }

    /* Insurance */
    .insurance-comparison {
        padding: 20px;
    }

    .insurance-comparison h3 {
        font-size: 16px;
    }

    .premium-bar span {
        font-size: 12px;
        padding-right: 8px;
    }

    .offer-card {
        padding: 16px;
        gap: 12px;
    }

    .offer-logo {
        font-size: 11px;
        padding: 8px 10px;
        min-width: 75px;
    }

    .offer-price {
        font-size: 17px;
    }

    .offer-btn {
        padding: 8px 12px;
        font-size: 11px;
    }

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
    }

    .features-category-title {
        font-size: 16px;
    }

    .feature-card-header {
        padding: 16px;
    }

    .feature-icon-wrap {
        width: 40px;
        height: 40px;
    }

    .feature-icon-wrap svg {
        width: 20px;
        height: 20px;
    }

    .feature-card-info h4 {
        font-size: 14px;
    }

    .feature-detail-content {
        padding: 0 16px 16px;
    }

    .feature-stats-row {
        gap: 10px;
    }

    .feature-stat {
        min-width: 80px;
        padding: 10px 8px;
    }

    .feature-stat-value {
        font-size: 17px;
    }

    .feature-stat-label {
        font-size: 10px;
    }

    .feature-detail-note {
        font-size: 12px;
        padding: 10px;
    }

    /* Analytics */
    .analytics-card {
        padding: 20px;
    }

    /* City rankings */
    .city-rank {
        grid-template-columns: 24px 70px 1fr 36px;
        gap: 8px;
    }

    .rank-city {
        font-size: 12px;
    }

    /* Percentile */
    .percentile-circle {
        width: 120px;
        height: 120px;
    }

    .percentile-number span {
        font-size: 30px;
    }

    .percentile-text {
        font-size: 13px;
    }

}

/* --- Small mobile --- */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .nav-container {
        padding: 0 16px;
    }

    .section-header h2 {
        font-size: 20px;
    }

    /* Score gauge */
    .score-gauge-container {
        width: 220px;
        height: 140px;
    }

    .score-number {
        font-size: 44px;
    }

    .score-badge {
        font-size: 12px;
        padding: 4px 10px;
    }

    /* Quick stats 1 column on very small */
    .quick-stats {
        grid-template-columns: 1fr;
    }

    /* Steps */
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .step-card {
        padding: 24px 16px;
    }

    .step-card h3 {
        font-size: 14px;
    }

    .step-card p {
        font-size: 12px;
    }

    /* Vehicle card stacked on very small */
    .vehicle-card {
        flex-direction: column;
        text-align: center;
        gap: 14px;
    }

    /* Offer card stacked */
    .offer-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .offer-btn {
        width: 100%;
    }

    /* Crisis stats 2 columns on very small */
    .crisis-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .crisis-number {
        font-size: 24px;
    }

    .crisis-label {
        font-size: 10px;
    }

    /* City rankings tighter */
    .city-rank {
        grid-template-columns: 22px 60px 1fr 32px;
        gap: 6px;
    }

    .rank-num,
    .rank-city,
    .rank-score {
        font-size: 11px;
    }

    /* Features thresholds */
    .feature-threshold {
        font-size: 12px;
        padding: 6px 10px;
    }

    .threshold-action {
        font-size: 10px;
    }

    /* Footer */
    .footer {
        padding: 32px 0 16px;
    }

    .footer-brand p {
        font-size: 12px;
    }

    .footer-bottom p {
        font-size: 11px;
    }

    /* Premium bars */
    .premium-bar-container {
        height: 30px;
    }

    .premium-bar span {
        font-size: 11px;
    }

    .premium-label {
        font-size: 13px;
    }

    .premium-sublabel {
        font-size: 11px;
    }

    /* Score factors */
    .factor-item {
        padding: 10px;
        gap: 10px;
    }

    .factor-icon {
        width: 28px;
        height: 28px;
    }

    .factor-name {
        font-size: 12px;
    }

    .factor-impact {
        font-size: 13px;
    }

    /* Notification panel */
    .notif-header {
        padding: 16px;
    }

    .notif-item {
        padding: 12px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.score-card-main,
.card,
.stat-card,
.timeline-card,
.vehicle-card,
.offer-card,
.analytics-card,
.step-card,
.feature-card {
    animation: fadeInUp 0.6s ease-out both;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.step-card:nth-child(1) { animation-delay: 0.1s; }
.step-card:nth-child(2) { animation-delay: 0.2s; }
.step-card:nth-child(3) { animation-delay: 0.3s; }
.step-card:nth-child(4) { animation-delay: 0.4s; }
