/* ========================================
   VELOCITY - Dashboard Components
   ======================================== */

/* ========================================
   DASHBOARD SCREEN
   ======================================== */

.velocity-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.velocity-stat-card {
    background: var(--velocity-card-bg);
    border: 1px solid var(--velocity-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.velocity-stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--velocity-orange);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.2);
}

.velocity-stat-label {
    font-size: 0.875rem;
    color: var(--velocity-text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.velocity-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--velocity-text);
    margin-bottom: 0.5rem;
}

.velocity-stat-change {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.velocity-stat-change.positive {
    color: var(--velocity-success);
}

.velocity-stat-change.negative {
    color: var(--velocity-danger);
}

/* Live Map */
.velocity-map-container {
    background: var(--velocity-card-bg);
    border: 1px solid var(--velocity-border);
    border-radius: 16px;
    padding: 1.5rem;
    height: 400px;
    margin-bottom: 2rem;
}

.velocity-map-canvas {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: #0f172a;
}

/* ========================================
   TRACKING SCREEN
   ======================================== */

.velocity-shipments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.velocity-shipment-card {
    background: var(--velocity-card-bg);
    border: 1px solid var(--velocity-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.velocity-shipment-card:hover {
    border-color: var(--velocity-orange);
    transform: translateX(4px);
}

.velocity-shipment-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.velocity-shipment-icon.in-transit {
    background: linear-gradient(135deg, var(--velocity-orange), var(--velocity-amber));
}

.velocity-shipment-icon.delivered {
    background: linear-gradient(135deg, var(--velocity-success), #34d399);
}

.velocity-shipment-icon.delayed {
    background: linear-gradient(135deg, var(--velocity-danger), #f87171);
}

.velocity-shipment-info {
    flex: 1;
}

.velocity-shipment-id {
    font-weight: 600;
    color: var(--velocity-text);
    margin-bottom: 0.25rem;
}

.velocity-shipment-details {
    font-size: 0.875rem;
    color: var(--velocity-text-muted);
}

.velocity-shipment-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.velocity-shipment-status.in-transit {
    background: rgba(255, 107, 53, 0.2);
    color: var(--velocity-orange);
}

.velocity-shipment-status.delivered {
    background: rgba(16, 185, 129, 0.2);
    color: var(--velocity-success);
}

.velocity-shipment-status.delayed {
    background: rgba(239, 68, 68, 0.2);
    color: var(--velocity-danger);
}

/* ========================================
   FLEET SCREEN
   ======================================== */

.velocity-fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.velocity-vehicle-card {
    background: var(--velocity-card-bg);
    border: 1px solid var(--velocity-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.velocity-vehicle-card:hover {
    transform: translateY(-4px);
    border-color: var(--velocity-orange);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.2);
}

.velocity-vehicle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.velocity-vehicle-id {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--velocity-text);
}

.velocity-vehicle-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.velocity-vehicle-status.active {
    background: var(--velocity-success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

.velocity-vehicle-status.idle {
    background: var(--velocity-amber);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.3);
}

.velocity-vehicle-status.offline {
    background: var(--velocity-text-muted);
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.3);
}

.velocity-vehicle-driver {
    margin-bottom: 1rem;
}

.velocity-driver-name {
    font-weight: 500;
    color: var(--velocity-text);
    margin-bottom: 0.25rem;
}

.velocity-driver-type {
    font-size: 0.875rem;
    color: var(--velocity-text-muted);
}

.velocity-vehicle-stats {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--velocity-border);
}

.velocity-vehicle-stat {
    flex: 1;
}

.velocity-vehicle-stat-label {
    font-size: 0.75rem;
    color: var(--velocity-text-muted);
    margin-bottom: 0.25rem;
}

.velocity-vehicle-stat-value {
    font-weight: 600;
    color: var(--velocity-text);
}

/* ========================================
   ANALYTICS SCREEN
   ======================================== */

.velocity-analytics-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.velocity-chart-card {
    background: var(--velocity-card-bg);
    border: 1px solid var(--velocity-border);
    border-radius: 16px;
    padding: 1.5rem;
}

.velocity-chart-header {
    margin-bottom: 1.5rem;
}

.velocity-chart-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--velocity-text);
    margin-bottom: 0.25rem;
}

.velocity-chart-subtitle {
    font-size: 0.875rem;
    color: var(--velocity-text-muted);
}

.velocity-chart {
    height: 300px;
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 1rem 0;
}

.velocity-chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--velocity-orange), var(--velocity-amber));
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
    position: relative;
}

.velocity-chart-bar:hover {
    opacity: 0.8;
    transform: scaleY(1.05);
}

.velocity-chart-bar::after {
    content: attr(data-value);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--velocity-text-muted);
    white-space: nowrap;
}

/* Top Routes List */
.velocity-routes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.velocity-route-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.velocity-route-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--velocity-orange), var(--velocity-amber));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.velocity-route-info {
    flex: 1;
}

.velocity-route-name {
    font-weight: 500;
    color: var(--velocity-text);
    margin-bottom: 0.25rem;
}

.velocity-route-count {
    font-size: 0.875rem;
    color: var(--velocity-text-muted);
}

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

@media (max-width: 1024px) {
    .velocity-dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .velocity-analytics-grid {
        grid-template-columns: 1fr;
    }

    .velocity-fleet-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .velocity-dashboard-grid {
        grid-template-columns: 1fr;
    }
}