/* Home / dashboard specific styling */

/* Dashboard wrapper */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Dashboard header */
.dashboard-header {
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(0, 48, 130, 0.08), #ffffff 60%);
    border: 1px solid var(--border);
}

.dashboard-header-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.dashboard-month-label h2 {
    margin: 6px 0 0;
    font-size: 1.1rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.badge-soft {
    background: rgba(0, 48, 130, 0.06);
    color: var(--brand-blue);
}

.dashboard-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--muted);
}

.dashboard-meta .meta-item strong {
    color: var(--text);
}

/* Stats grid */

.dashboard-grid.stats-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

/* On larger screens: 3 columns */
@media (min-width: 900px) {
    .dashboard-grid.stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.stat-card {
    position: relative;
    overflow: hidden;
}

/* light colored ribbons per stat */
.dashboard-grid.stats-grid .stat-card:nth-child(1) {
    background: linear-gradient(135deg, rgba(0, 48, 130, 0.274), #ffffff);
    border-left: 4px solid var(--brand-blue);
}

.dashboard-grid.stats-grid .stat-card:nth-child(2) {
    background: linear-gradient(135deg, rgba(251, 198, 23, 0.14), #ffffff);
    border-left: 4px solid var(--brand-yellow);
}

.dashboard-grid.stats-grid .stat-card:nth-child(3) {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.04), #ffffff);
    border-left: 4px solid rgb(150,150,150);
}

.stat-card h3 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    color: var(--muted);
}

.stat-value {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.stat-unit {
    font-size: 0.85rem;
    color: var(--muted);
}

.stat-caption {
    margin: 8px 0 0;
    font-size: 0.8rem;
    color: var(--muted);
}

/* Split card: left (per driver + account) + right (destinations) */

.card-split {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Desktop: 2 columns */
@media (min-width: 880px) {
    .card-split {
        flex-direction: row;
    }

    .card-column {
        flex: 1 1 0;
    }

    .card-column+.card-column {
        border-left: 1px solid var(--border);
        padding-left: 20px;
        margin-left: 4px;
    }
}

.header-sub h3 {
    margin: 14px 0 4px;
    font-size: 0.95rem;
    color: var(--muted);
}

/* Driver & account tiles */

.driver-grid {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.driver-tile {
    background: linear-gradient(135deg, rgba(0, 48, 130, 0.05), rgba(251, 198, 23, 0.08));
    border-radius: 14px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.driver-tile-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.driver-tile-km {
    font-size: 0.85rem;
    color: var(--muted);
}

/* Dashboard ride list (re-used in latest rides) */

.dashboard-ride-list .ride-item {
    padding: 0;
    border-bottom: none;
}

.dashboard-ride-list .ride-top-line {
    font-size: 0.85rem;
}

.dashboard-ride-list .ride-second-line {
    font-size: 0.8rem;
}

/* Pill style used for km in recent list */

.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 48, 130, 0.08);
    font-size: 0.8rem;
    color: var(--brand-blue);
    font-weight: 600;
}

/* Destinations */

.destination-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.destination-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 12px;
    background: var(--accent-soft);
}

.destination-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.destination-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.destination-meta {
    font-size: 0.8rem;
    color: var(--muted);
}

/* Empty states */

.empty-state {
    margin: 6px 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

/* Latest rides card (full width, bottom) */

.latest-rides-card {
    margin-top: 4px;
}

/* ===== NEW: HOME RIDE CARD STYLE (like ritten) ===== */

.dashboard-ride-list .ride-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-ride-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 10px 14px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.home-ride-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.home-ride-date {
    font-size: 0.8rem;
    color: var(--muted);
}

.home-ride-info-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.home-ride-description {
    font-size: 0.85rem;
    color: var(--text);
    opacity: 0.9;
    line-height: 1.3;
}

.home-ride-right {
    flex-shrink: 0;
    margin-left: 10px;
    display: flex;
    align-self: center;
    align-items: flex-end;
    gap: 4px;
}


/* Slightly more prominent km pill on dashboard */
.km-pill {
    padding: 4px 10px;
}

/* Mobile tweaks */

@media (max-width: 600px) {
    .dashboard-header-top {
        align-items: flex-start;
    }

    .dashboard-month-label h2 {
        font-size: 1.1rem;
    }

    .dashboard-meta {
        flex-direction: column;
        align-items: flex-start;
        align-self:flex-end;
        gap: 4px;
    }

    .stat-card {
        padding: 12px 12px;
    }

    .stat-card h3 {
        font-size: 0.8rem;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .stat-caption {
        font-size: 0.75rem;
    }

    .card-split {
        gap: 16px;
    }

    .home-ride-card {
        
        align-items: flex-start;
        padding: 10px 12px;
    }

  .home-ride-right {
        margin-left: 0;
        margin-top: 6px;
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Extra comfort on very small screens */
@media (max-width: 480px) {
    .card {
        padding: 16px;
    }

    .dashboard {
        gap: 16px;
    }
}

/* ===== COLORED BACKGROUNDS FOR DASHBOARD TILES (BRIGHTER SOFT GRADIENTS) ===== */

.driver-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
}

.driver-tile.tile-colored {
    border-radius: 16px;
    padding: 16px 20px;
    color: #111;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    transition: all 0.25s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.driver-tile.tile-colored:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

/* === Brighter tinted gradients per person/account === */
.driver-tile.person-luca {
    background: linear-gradient(135deg, rgba(255, 95, 95, 0.3), rgba(255, 95, 95, 0.1));
    border: 0px;
    border-left: 4px solid #ef4444;
}

.driver-tile.person-marcel {
    background: linear-gradient(135deg, rgba(90, 150, 255, 0.3), rgba(90, 150, 255, 0.1));
    border: 0px;
    border-left: 4px solid #3b82f6;
}

.driver-tile.person-marieke {
    background: linear-gradient(135deg, rgba(255, 225, 60, 0.35), rgba(255, 225, 60, 0.15));
    border: 0px;
    border-left: 4px solid #facc15;
}

.driver-tile.account-luca {
    background: linear-gradient(135deg, rgba(255, 95, 95, 0.3), rgba(255, 95, 95, 0.1));
    border: 0px;
    border-left: 4px solid #ef4444;
}

.driver-tile.account-prive {
    background: linear-gradient(135deg, rgba(60, 200, 120, 0.3), rgba(60, 200, 120, 0.1));
    border: 0px;
    border-left: 4px solid #16a34a;
}

.driver-tile.account-evean {
    background: linear-gradient(135deg, rgba(120, 70, 180, 0.3), rgba(120, 70, 180, 0.1));
    border: 0px;
    border-left: 4px solid #532480;
}

/* Text inside tiles */
.driver-tile-name {
    font-size: 1rem;
    margin-bottom: 4px;
}

.driver-tile-km {
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.9;
}

.dashboard-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.dashboard-actions .btn-primary {
    font-weight: 700;
    text-transform: uppercase;
    background: var(--brand-yellow);
    color: #000;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-actions .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

@media (max-width: 700px) {
    .dashboard-actions {
        justify-content: center;
    }

    .dashboard-actions .btn-primary {
        width: 100%;
        max-width: 320px;
    }
}

.price-pill {
    background: #ffe9a3;
    color: #7a5a00;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
