.nerva-driver-wrap {
    max-width: 1100px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
    color: #111827;
}

.nerva-driver-header {
    background: #111827;
    color: #ffffff;
    padding: 22px;
    border-radius: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.nerva-driver-header h2 {
    margin: 0;
    font-size: 28px;
    color: #ffffff;
}

.nerva-driver-header p {
    margin: 6px 0 0;
    color: #e5e7eb;
}

.nerva-live {
    background: #16a34a;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
}

.nerva-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.nerva-tabs button {
    border: 1px solid #d1d5db;
    padding: 12px 18px;
    border-radius: 999px;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
    font-weight: 800;
}

.nerva-tabs button.active {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
}

.nerva-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 16px;
}

.nerva-orders-grid.loading {
    opacity: .55;
}

.nerva-order-card {
    background: #ffffff;
    color: #111827;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    border: 1px solid #e5e7eb;
}

.nerva-card-rejected {
    background: #fff7f7;
    border-color: #fecaca;
}

.nerva-order-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.nerva-order-top strong {
    font-size: 18px;
    color: #111827;
}

.nerva-badge {
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.nerva-badge.normal {
    background: #dbeafe;
    color: #1e3a8a;
}

.nerva-badge.rejected {
    background: #dc2626;
    color: #ffffff;
}

.nerva-order-body p {
    margin: 9px 0;
    color: #1f2937;
    line-height: 1.4;
}

.nerva-order-body b {
    color: #111827;
}

.nerva-total {
    font-size: 18px;
    color: #111827 !important;
}

.nerva-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.nerva-actions button {
    flex: 1;
    border: 0;
    padding: 12px;
    border-radius: 12px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 900;
}

.nerva-accept {
    background: #15803d;
}

.nerva-reject {
    background: #b91c1c;
}

.nerva-complete {
    background: #1d4ed8;
}

.nerva-actions button:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.nerva-history-note {
    margin-top: 14px;
    background: #fee2e2;
    color: #7f1d1d;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 800;
}

.nerva-empty {
    background: #f9fafb;
    color: #374151;
    border: 1px dashed #9ca3af;
    padding: 25px;
    border-radius: 18px;
    text-align: center;
    grid-column: 1 / -1;
    font-weight: 700;
}

#nerva-driver-message {
    display: none;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 14px;
    font-weight: 900;
}

#nerva-driver-message.ok {
    background: #dcfce7;
    color: #14532d;
}

#nerva-driver-message.error {
    background: #fee2e2;
    color: #7f1d1d;
}

#nerva-location-box {
    background: #ffffff;
    color: #111827;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    padding: 15px;
    margin: 0 0 18px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    box-shadow: 0 8px 22px rgba(0,0,0,.06);
}

#nerva-location-box strong {
    color: #111827;
    font-size: 16px;
}

#nerva-location-box p {
    margin: 5px 0 0;
    color: #4b5563;
    font-size: 14px;
}

#nerva-location-box.active {
    border-color: #16a34a;
    background: #f0fdf4;
}

#nerva-location-box.error {
    border-color: #dc2626;
    background: #fef2f2;
}

#nerva-enable-location {
    border: 0;
    background: #111827;
    color: #ffffff;
    padding: 11px 15px;
    border-radius: 12px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

#nerva-enable-location:disabled {
    background: #16a34a;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    #nerva-location-box {
        flex-direction: column;
        align-items: stretch;
    }

    #nerva-enable-location {
        width: 100%;
    }
}

#nerva-gps-box {
    background: #ffffff;
    color: #111827;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    padding: 15px;
    margin: 0 0 18px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    box-shadow: 0 8px 22px rgba(0,0,0,.06);
}

#nerva-gps-box strong {
    color: #111827;
}

#nerva-gps-box p {
    margin: 5px 0 0;
    color: #4b5563;
}

#nerva-gps-box.active {
    border-color: #16a34a;
    background: #f0fdf4;
}

#nerva-gps-box.error {
    border-color: #dc2626;
    background: #fef2f2;
}

#nerva-start-gps {
    border: 0;
    background: #111827;
    color: #ffffff;
    padding: 11px 15px;
    border-radius: 12px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

#nerva-start-gps:disabled {
    background: #16a34a;
}

@media (max-width: 640px) {
    #nerva-gps-box {
        flex-direction: column;
        align-items: stretch;
    }

    #nerva-start-gps {
        width: 100%;
    }
}

#nerva-gps-box {
    background: #ffffff;
    color: #111827;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    padding: 15px;
    margin: 0 0 18px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    box-shadow: 0 8px 22px rgba(0,0,0,.06);
}

#nerva-gps-box strong {
    color: #111827;
}

#nerva-gps-box p {
    margin: 5px 0 0;
    color: #4b5563;
}

#nerva-gps-box.active {
    border-color: #16a34a;
    background: #f0fdf4;
}

#nerva-gps-box.error {
    border-color: #dc2626;
    background: #fef2f2;
}

#nerva-start-gps {
    border: 0;
    background: #111827;
    color: #ffffff;
    padding: 11px 15px;
    border-radius: 12px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
}

#nerva-start-gps:disabled {
    background: #16a34a;
}

@media (max-width: 640px) {
    #nerva-gps-box {
        flex-direction: column;
        align-items: stretch;
    }

    #nerva-start-gps {
        width: 100%;
    }
}

#nerva-alert-panel {
    background: #ffffff;
    color: #111827;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    padding: 15px;
    margin: 0 0 18px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    box-shadow: 0 8px 22px rgba(0,0,0,.06);
}

#nerva-alert-panel strong {
    color: #111827;
    font-size: 16px;
}

#nerva-alert-panel p {
    margin: 5px 0 0;
    color: #4b5563;
    font-size: 14px;
}

#nerva-alert-panel.new-order {
    border-color: #f97316;
    background: #fff7ed;
    animation: nervaPulseOrder 1s ease-in-out infinite;
}

.nerva-alert-count {
    min-width: 48px;
    height: 48px;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 20px;
}

@keyframes nervaPulseOrder {
    0% { transform: scale(1); }
    50% { transform: scale(1.015); }
    100% { transform: scale(1); }
}

@media (max-width: 640px) {
    #nerva-alert-panel {
        align-items: stretch;
    }

    .nerva-alert-count {
        min-width: 56px;
        height: 56px;
    }
}
