:root {
    --rider-bg: #0c0c0c;
    --rider-surface: #141414;
    --rider-surface-2: #1a1a1a;
    --rider-border: rgba(255, 255, 255, 0.05);
    --rider-primary: #ffbe33;
    --rider-primary-dim: rgba(255, 190, 51, 0.1);
    --rider-text: #ffffff;
    --rider-text-muted: #888888;
    --rider-success: #22c55e;
    --rider-font: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--rider-bg);
    color: var(--rider-text);
    font-family: var(--rider-font);
    overflow-x: hidden;
}

.rider-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.rider-sidebar {
    background: #000000;
    border-right: 1px solid var(--rider-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--rider-primary);
    margin-bottom: 3rem;
    display: block;
    text-decoration: none;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    color: var(--rider-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.nav-item:hover, .nav-item.active {
    background: var(--rider-primary-dim);
    color: var(--rider-primary);
}

.rider-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.profile-img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
}

.profile-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}

.profile-info span {
    font-size: 0.7rem;
    color: var(--rider-text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-online {
    width: 100%;
    background: var(--rider-primary);
    color: #000;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
}

.btn-online:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 190, 51, 0.2);
}

/* Main Content */
.rider-content {
    padding: 2.5rem 3rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.header-left h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.header-left p {
    color: var(--rider-text-muted);
    font-size: 1rem;
}

.shift-status {
    text-align: right;
}

.shift-status span {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--rider-text-muted);
    letter-spacing: 1px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    margin-top: 0.4rem;
}

.status-indicator .dot {
    width: 8px;
    height: 8px;
    background: var(--rider-success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--rider-success);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--rider-surface);
    padding: 1.5rem 2rem;
    border-radius: 24px;
    border: 1px solid var(--rider-border);
    position: relative;
    overflow: hidden;
}

.stat-card label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--rider-text-muted);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 1rem;
}

.stat-value h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.trend {
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.trend.up { color: var(--rider-success); }

.goal, .subtext {
    font-size: 0.8rem;
    color: var(--rider-text-muted);
}

.card-bg-icon {
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: 80px;
    height: 80px;
    opacity: 0.03;
    transform: rotate(-15deg);
}

/* Main Dashboard Grid */
.dashboard-main-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

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

.section-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-filter {
    background: var(--rider-surface-2);
    border: 1px solid var(--rider-border);
    color: var(--rider-text);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-container {
    height: 380px;
    background: #111;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--rider-border);
}

.map-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.map-marker {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--rider-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 8px rgba(255, 190, 51, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 190, 51, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255, 190, 51, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 190, 51, 0); }
}

.floating-order-card {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.order-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 190, 51, 0.1);
    color: var(--rider-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.order-info p {
    font-size: 0.75rem;
    color: var(--rider-text-muted);
}

.btn-accept {
    background: var(--rider-primary);
    color: #000;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

/* Fleet Section */
.fleet-card {
    background: var(--rider-surface);
    border: 1px solid var(--rider-border);
    border-radius: 24px;
    padding: 1.75rem;
    height: 380px;
    display: flex;
    flex-direction: column;
}

.vehicle-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.vehicle-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.vehicle-info p {
    font-size: 0.75rem;
    color: var(--rider-text-muted);
}

.badge-status {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--rider-success);
    background: rgba(34, 197, 94, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.fuel-level {
    margin-bottom: 2rem;
}

.progress-bar {
    height: 6px;
    background: var(--rider-surface-2);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--rider-success);
    border-radius: 10px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--rider-text-muted);
}

.maintenance-list label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--rider-text-muted);
    letter-spacing: 1px;
    margin-bottom: 1rem;
    display: block;
}

.maintenance-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.item-icon {
    width: 36px;
    height: 36px;
    background: var(--rider-surface-2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rider-text-muted);
}

.item-info h5 {
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.item-info p {
    font-size: 0.75rem;
    color: var(--rider-text-muted);
}

.btn-fleet-report {
    width: 100%;
    margin-top: auto;
    background: var(--rider-surface-2);
    color: var(--rider-text);
    border: 1px solid var(--rider-border);
    padding: 0.85rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
}

/* Recent Deliveries */
.recent-deliveries {
    background: var(--rider-surface);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid var(--rider-border);
}

.view-all {
    color: var(--rider-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--rider-text-muted);
    letter-spacing: 1px;
    padding: 1rem 0;
    border-bottom: 1px solid var(--rider-border);
}

td {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--rider-border);
    font-size: 0.9rem;
}

tr:last-child td { border-bottom: none; }

td strong { display: block; margin-bottom: 0.25rem; }
td span { font-size: 0.75rem; color: var(--rider-text-muted); }

.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-dot.completed { background: var(--rider-success); box-shadow: 0 0 8px var(--rider-success); }
.status-dot.in-transit { background: #3b82f6; box-shadow: 0 0 8px #3b82f6; }

@media (max-width: 1200px) {
    .dashboard-main-grid { grid-template-columns: 1fr; }
    .rider-layout { grid-template-columns: 1fr; }
    .rider-sidebar { display: none; }
}
