/**
 * Tesla Dashboard Statistics Page Styles
 */

/* Period Filter */
.tesla-period-filter {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: #18181b;
    padding: 4px;
    border-radius: 10px;
    width: fit-content;
}

.period-btn {
    padding: 10px 20px;
    color: #a1a1aa;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    border-radius: 8px;
    transition: all 0.2s;
}

.period-btn:hover {
    color: #fafafa;
    background: rgba(255, 255, 255, 0.05);
}

.period-btn.active {
    background: #3b82f6;
    color: #fff;
}

/* KPIs Row */
.tesla-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.kpi-icon {
    font-size: 28px;
    filter: grayscale(100%) brightness(1.5);
    opacity: 0.7;
}

.kpi-card.eco-score .kpi-icon {
    font-size: 22px;
    font-weight: 800;
    color: var(--score-color, #3b82f6);
    filter: none;
    opacity: 1;
    background: color-mix(in srgb, var(--score-color) 15%, transparent);
    padding: 8px 12px;
    border-radius: 8px;
}

.kpi-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #fafafa;
    line-height: 1;
}

.kpi-unit {
    font-size: 14px;
    color: #71717a;
    margin-left: 4px;
}

.kpi-label {
    font-size: 12px;
    color: #71717a;
    margin-top: 4px;
}

.kpi-card.savings .kpi-value {
    color: #22c55e;
}

.kpi-card.environment .kpi-value {
    color: #3b82f6;
}

/* Stats Grid */
.tesla-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.tesla-widget-full {
    grid-column: span 2;
}

@media (max-width: 900px) {
    .tesla-stats-grid {
        grid-template-columns: 1fr;
    }

    .tesla-widget-full {
        grid-column: span 1;
    }
}

/* Savings Comparison */
.savings-comparison {
    margin-bottom: 20px;
}

.savings-bar {
    display: flex;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    background: #ef4444;
}

.savings-bar-ev {
    background: linear-gradient(90deg, #22c55e, #16a34a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.savings-bar-gas {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.savings-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 10px;
    font-size: 12px;
    color: #a1a1aa;
}

.legend-ev::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

.legend-gas::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

.savings-details {
    background: #111113;
    border-radius: 8px;
    padding: 12px;
}

.savings-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #27272a;
    font-size: 13px;
    color: #a1a1aa;
}

.savings-row:last-child {
    border-bottom: none;
}

.savings-row.highlight {
    color: #fafafa;
}

.savings-amount {
    color: #22c55e;
    font-size: 18px;
}

/* Stats Grid inside widgets */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 14px 10px;
    background: #111113;
    border-radius: 8px;
}

.stat-icon {
    display: block;
    font-size: 20px;
    margin-bottom: 6px;
    filter: grayscale(100%) brightness(1.5);
    opacity: 0.7;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #fafafa;
}

.stat-label {
    display: block;
    font-size: 11px;
    color: #71717a;
    margin-top: 2px;
}

/* Consumption Range */
.consumption-range {
    background: #111113;
    border-radius: 8px;
    padding: 14px;
}

.consumption-range h4 {
    margin: 0 0 12px 0;
    font-size: 12px;
    color: #a1a1aa;
    font-weight: 500;
}

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

.range-best {
    color: #22c55e;
    font-weight: 600;
    font-size: 13px;
}

.range-worst {
    color: #ef4444;
    font-weight: 600;
    font-size: 13px;
}

.range-bar {
    flex: 1;
    height: 8px;
    background: linear-gradient(90deg, #22c55e, #eab308, #ef4444);
    border-radius: 4px;
    position: relative;
}

.range-marker {
    position: absolute;
    top: -22px;
    transform: translateX(-50%);
    background: #3b82f6;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.range-marker::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #3b82f6;
}

.range-unit {
    display: block;
    text-align: center;
    font-size: 11px;
    color: #71717a;
    margin-top: 8px;
}

/* Charts */
.chart-container {
    height: 200px;
    position: relative;
}

.monthly-chart {
    height: 300px;
}

.charge-breakdown-chart {
    height: 180px;
}

/* Battery Health */
.health-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.battery-health-display {
    display: flex;
    gap: 24px;
    align-items: center;
}

.health-main {
    text-align: center;
    padding: 20px;
    background: #111113;
    border-radius: 12px;
    min-width: 120px;
}

.health-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #22c55e;
}

.health-label {
    display: block;
    font-size: 12px;
    color: #71717a;
    margin-top: 4px;
}

.health-stats {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.health-stat {
    padding: 10px;
    background: #111113;
    border-radius: 8px;
}

.health-stat .label {
    display: block;
    font-size: 11px;
    color: #71717a;
    margin-bottom: 4px;
}

.health-stat .value {
    font-size: 14px;
    font-weight: 600;
    color: #fafafa;
}

/* Badges */
.badge-progress {
    font-size: 14px;
    color: #3b82f6;
    font-weight: 600;
}

.monthly-challenge {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    margin-bottom: 20px;
}

.challenge-icon {
    font-size: 32px;
}

.challenge-content strong {
    display: block;
    color: #fafafa;
    margin-bottom: 4px;
}

.challenge-content span {
    font-size: 13px;
    color: #a1a1aa;
}

.next-badge {
    background: #111113;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.next-badge h4 {
    margin: 0 0 12px 0;
    font-size: 12px;
    color: #71717a;
    text-transform: uppercase;
}

.badge-preview {
    display: flex;
    align-items: center;
    gap: 16px;
}

.badge-preview .badge-icon {
    font-size: 40px;
}

.badge-info {
    flex: 1;
}

.badge-info strong {
    display: block;
    color: #fafafa;
    margin-bottom: 4px;
}

.badge-info span {
    font-size: 12px;
    color: #a1a1aa;
}

.badge-progress-bar {
    height: 6px;
    background: #27272a;
    border-radius: 3px;
    margin: 8px 0 4px 0;
    overflow: hidden;
}

.badge-progress-bar .progress {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 3px;
}

.progress-text {
    font-size: 11px;
    color: #3b82f6;
    font-weight: 600;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.badge-item {
    text-align: center;
    padding: 16px 10px;
    background: #111113;
    border-radius: 10px;
    transition: all 0.2s;
    cursor: pointer;
}

.badge-item:hover {
    background: #1a1a1d;
}

.badge-item.locked {
    opacity: 0.4;
}

.badge-item.locked .badge-icon {
    filter: grayscale(100%);
}

.badge-item .badge-icon {
    display: block;
    font-size: 28px;
    margin-bottom: 8px;
}

.badge-item .badge-name {
    display: block;
    font-size: 11px;
    color: #fafafa;
    font-weight: 500;
}

.badge-item .badge-progress {
    display: block;
    font-size: 10px;
    color: #3b82f6;
    margin-top: 4px;
}

/* Destinations */
.destinations-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.destination-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #111113;
    border-radius: 8px;
}

.dest-icon {
    font-size: 20px;
}

.dest-info {
    flex: 1;
}

.dest-info strong {
    display: block;
    color: #fafafa;
    font-size: 13px;
    margin-bottom: 2px;
}

.dest-info span {
    font-size: 11px;
    color: #71717a;
}

.dest-consumption {
    font-size: 13px;
    color: #a1a1aa;
    font-weight: 500;
}

/* Environment */
.environment-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.env-item {
    text-align: center;
    padding: 16px 24px;
    background: #111113;
    border-radius: 10px;
}

.env-item .env-icon {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

.env-item .env-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #fafafa;
}

.env-item .env-label {
    display: block;
    font-size: 11px;
    color: #71717a;
    margin-top: 4px;
}

.env-item.ev {
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.env-item.ev .env-value {
    color: #22c55e;
}

.env-item.ice {
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.env-item.ice .env-value {
    color: #ef4444;
}

.env-arrow {
    font-size: 24px;
    color: #71717a;
}

.env-saved {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(59, 130, 246, 0.1));
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    margin-bottom: 16px;
}

.saved-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #22c55e;
}

.saved-label {
    display: block;
    font-size: 14px;
    color: #a1a1aa;
    margin-top: 4px;
}

.env-equivalents {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.equiv-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #a1a1aa;
}

.equiv-item span:first-child {
    font-size: 18px;
}

/* Mobile Optimization */
@media (max-width: 600px) {

    /* Filters */
    .tesla-period-filter {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    /* KPIs */
    .tesla-kpis {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .kpi-card {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .kpi-icon {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .kpi-value {
        font-size: 18px;
    }

    /* Charts */
    .chart-container {
        height: 180px;
    }

    .monthly-chart {
        height: 220px;
    }

    /* Savings */
    .savings-legend {
        gap: 12px;
        font-size: 11px;
    }

    /* Badges */
    .badges-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .badge-item {
        padding: 10px 4px;
    }

    .badge-item .badge-icon {
        font-size: 22px;
        margin-bottom: 4px;
    }

    .badge-item .badge-name {
        font-size: 9px;
    }

    /* Environment */
    .environment-comparison {
        gap: 10px;
    }

    .env-item {
        padding: 12px;
        flex: 1;
    }

    .env-item .env-value {
        font-size: 16px;
    }

    .env-arrow {
        font-size: 16px;
    }

    .env-equivalents {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    /* Battery Health */
    .battery-health-display {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .health-main {
        width: 100%;
        padding: 16px;
    }

    .health-stats {
        width: 100%;
        grid-template-columns: 1fr;
    }

    /* Monthly Challenge */
    .monthly-challenge {
        flex-direction: column;
        text-align: center;
        padding: 12px;
    }

    .challenge-icon {
        margin-bottom: 8px;
    }
}

/* Fix Double Border on Savings Widget */
/* Fix Double Border on Savings Widget */
/* Standard Savings Widget */
.tesla-widget.widget-savings {
    background: #181828 !important;
    /* Requested Dark Blue Background */
    border: 1px solid #27272a !important;
    /* Standard Widget Border */
    border-radius: 12px !important;
    /* Standard Radius */
    box-shadow: none !important;
    padding: 0 !important;
    height: 100% !important;
    /* Force height match */
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden;
}

.tesla-widget.widget-savings .widget-content {
    padding: 20px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between;
    /* Space out big number and breakdown */
}

/* Remove Obsolete Classes */
.premium-savings-dashboard,
.savings-subtitle,
.savings-glow {
    display: none !important;
}

.savings-main {
    text-align: center;
    margin-bottom: 20px;
}

/* Mobile Centering for Savings Widget */
@media (max-width: 768px) {
    .tesla-widget.widget-savings .widget-header {
        justify-content: center !important;
        text-align: center !important;
    }

    .tesla-widget.widget-savings .widget-content {
        align-items: center !important;
        text-align: center !important;
    }

    .savings-main {
        margin-bottom: 24px;
    }

    .savings-breakdown {
        justify-content: center;
        gap: 16px;
    }
}

/* ═══════════════════════════════════════════
   NEW TRIPS LAYOUT (Clean Design)
   ═══════════════════════════════════════════ */

.trips-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* Reduced gap */
}

.trips-date-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Reduced gap */
}

.date-header {
    font-size: 13px;
    /* Smaller */
    font-weight: 700;
    color: #ffffff;
    /* White as requested */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-left: 0;
    margin-bottom: 4px;
    border-left: none;
    /* Remove border for cleaner look */
    opacity: 0.9;
}

.trip-card-clean {
    position: relative;
    background: #111113;
    /* Inner background */
    background-clip: padding-box;
    /* Clip bg to padding box */
    border: 1px solid transparent;
    /* Transparent border needed for gradient */
    border-radius: 8px;
    /* Rounded corners */
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.2s ease;

    /* Gradient Border Magic */
    background-image: linear-gradient(#111113, #111113), linear-gradient(to bottom, #52525b, #3b82f6);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.trip-card-clean:hover {
    /* Slight brighten on hover */
    background-image: linear-gradient(#18181b, #18181b), linear-gradient(to bottom, #71717a, #3b82f6);
}

/* Top Section: Route & Time */
.trip-clean-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Center alignment */
    gap: 20px;
    padding-bottom: 8px;
    /* Reduced from 16px to remove margin below route */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.trip-time-route {
    display: flex;
    flex-direction: row !important;
    /* Force ROW on desktop */
    align-items: center;
    /* Safer than baseline with nested flex */
    gap: 0;
    flex: 1;
    overflow: visible !important;
    /* FIX: Visible */
    min-height: 20px;
}

.trip-time {
    font-size: 13px;
    color: #71717a;
    font-weight: 500;
    white-space: nowrap;
    min-width: fit-content;
}

.trip-route {
    font-size: 15px;
    font-weight: 400;
    color: #e4e4e7;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    background: transparent !important;
    /* Ensure no pill background */
    padding: 0 !important;
    border: none !important;
}

/* User requested font-weight 100 for cities/addresses */
.trip-route span,
.trip-city,
.trip-street {
    font-weight: 100 !important;
    opacity: 0.9;
    background: transparent !important;
    /* Ensure children have no bg */
}

.route-arrow {
    color: #52525b;
    font-size: 12px;
    font-weight: 100 !important;
    margin: 0 4px;
}

/* Primary KPIs (Distance/Duration) - Simple Text */
.trip-primary-stats {
    display: flex;
    align-items: center;
}

.simple-trip-summary {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    opacity: 0.9;
}

.clean-stat-primary .icon {
    font-size: 14px;
    opacity: 0.7;
    filter: grayscale(1);
}

.clean-stat-primary .content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
}

.clean-stat-primary .value {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.clean-stat-primary .unit {
    font-size: 9px;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Bottom Grid for Tech details */
.trip-clean-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    align-items: center;
    /* Vertical align */
}

/* User REQUEST: Remove padding to save space */
.clean-grid-item {
    background: transparent;
    padding: 0;
    /* REMOVED padding */
    border-radius: 6px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    /* Reduced gap inside item */
    border: none;
}

/* Hover effect on stats for interactivity */
.clean-grid-item:hover {
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    /* Add padding back only on hover to show hit area */
    margin: -4px;
    /* Counteract padding to not shift layout */
}

.clean-icon {
    font-size: 14px;
    color: #52525b;
    margin-bottom: 0;
}

.clean-stat-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.clean-value {
    font-size: 13px;
    font-weight: 600;
    color: #d4d4d8;
}

.clean-label {
    font-size: 9px;
    color: #52525b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* TRIP PARTS (GLOBAL) */
.trip-time-route {
    display: flex;
    flex-direction: row !important;
    /* Force ROW on desktop */
    align-items: center;
    gap: 0;
    flex: 1;
    overflow: visible !important;
    /* Ensure content is meant to be seen */
    min-height: 20px;
    /* Force height if collapsed */
}

/* TRIP PARTS (GLOBAL) */
.trip-part {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    /* Gap inside start/end group */
    white-space: nowrap;
    overflow: visible !important;
    /* Allow visibility */
    text-overflow: clip;
    /* Ellipsis requires overflow hidden, but let's see content first */
    /* Flex behavior: Auto basis to respect content size */
    flex: 1 1 auto;
    min-width: 0;
}

.trip-address-part {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.9;
    font-weight: 100 !important;
    /* Keep ultra-thin */
    /* Ensure it can shrink but take space */
    flex: 1;
    min-width: 0;
}

.trip-arrow-sep {
    color: #52525b;
    font-size: 14px;
    margin: 0 12px;
    flex-shrink: 0;
    /* Never shrink the arrow */
    display: inline-block;
}

.trip-sep {
    color: #52525b;
    margin: 0 4px;
    flex-shrink: 0;
    display: inline-block;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .trip-clean-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        /* Tighter vertical gap */
        padding-bottom: 8px;
    }

    .trip-time-route {
        flex-direction: column !important;
        /* Force Column on Mobile override global row !important */
        align-items: flex-start;
        gap: 6px;
        width: 100%;
        height: auto;
        overflow: visible !important;
    }

    /* Hide Arrow on Mobile (implied by new line so we hide it) */
    .trip-arrow-sep {
        display: none !important;
    }

    .trip-part {
        width: 100%;
        font-size: 13px;
        flex: 0 0 auto;
        /* Stop flexing on mobile, be a block-like flex item */
        white-space: normal !important;
        /* Force Wrap on Mobile */
        overflow: visible !important;
        flex-wrap: wrap !important;
        /* Wrap content if needed */
        margin-bottom: 2px;
        max-width: none;
        /* Remove any max-width constraints */
    }

    .trip-address-part {
        white-space: normal !important;
        /* Force Wrap on Mobile */
        overflow: visible !important;
        text-overflow: clip;
        flex: 1;
    }

    /* Ensure Sep is visible inside trip part */
    .trip-sep {
        display: inline-block;
    }

    /* Primary Stats Row */
    .trip-primary-stats {
        width: 100%;
        margin-top: 4px;
        color: #e4e4e7;
        justify-content: space-between;
    }

    .simple-trip-summary {
        font-size: 13px;
        /* Match mobile scale */
    }

    /* TOGGLE LOGIC: Hidden by default on Mobile */
    .trip-clean-grid {
        display: none;
        /* Hidden */
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px dashed rgba(255, 255, 255, 0.1);
        animation: fadeIn 0.3s ease;
    }

    /* Show when parent has .expanded class */
    .trip-card-clean.expanded .trip-clean-grid {
        display: grid;
    }

    .clean-grid-item {
        justify-content: flex-start;
    }
}

/* Eco Driving Badges */
.eco-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    color: #09090b;
    /* Dark text for contrast */
    margin-right: 0;
    /* Removing margin, relying on flex gap */
    line-height: 1;
}

/* Mobile Alignment Fix */
@media (max-width: 768px) {
    .trip-part.end {
        padding-left: 26px !important;
        /* Align with Start Time (18px badge + 8px gap) */
    }
}

.eco-grade-A\+ {
    background: #16a34a;
    box-shadow: 0 0 8px rgba(22, 163, 74, 0.6);
    color: #fff;
}

.eco-grade-A {
    background: #22c55e;
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.4);
}

.eco-grade-B {
    background: #84cc16;
}

.eco-grade-C {
    background: #eab308;
}

.eco-grade-D {
    background: #f97316;
}

.eco-grade-E {
    background: #ef4444;
    color: white;
}

/* Alerts */
.stat-alert-high {
    color: #ef4444;
    /* Red for warning */
    font-weight: 700;
    margin-left: 12px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.precond-badge {
    margin-left: 12px;
    font-size: 14px;
    filter: drop-shadow(0 0 2px #3b82f6);
    cursor: help;
}

/* Primary Stats Row */
.trip-primary-stats {
    width: 100%;
    margin-top: 4px;
    color: #e4e4e7;
}

.simple-trip-summary {
    font-size: 13px;
    /* Match mobile scale */
}

/* CHARGES CARD STYLING (Matching Trips) */
.charge-card-compact {
    position: relative;
    background: #111113;
    background-clip: padding-box;
    border: 1px solid transparent;
    /* Ensure full border is transparent for gradient */
    border-left: 1px solid transparent !important;
    /* Force Left Border Presence for Gradient */
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.2s ease;
    margin-bottom: 12px;

    /* Gradient Border Magic */
    background-image: linear-gradient(#111113, #111113), linear-gradient(to bottom, #52525b, #3b82f6);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

/* Nuke Legacy Pseudo-borders (Status strips) */
.charge-card-compact::before,
.charge-card-compact::after {
    display: none !important;
    content: none !important;
    border: none !important;
}

.charge-card-compact:hover {
    background-image: linear-gradient(#18181b, #18181b), linear-gradient(to bottom, #71717a, #3b82f6);
}