﻿@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&display=swap");

:root {
    --brand-primary: #052c77;
    --brand-accent: #1d8ae0;
    --brand-secondary: #4db5ff;
    --brand-dark: #021535;
    --brand-surface: #f6f8fb;
    --text-color: #0f1c2e;
    --muted: #6b7280;
    --success: #1f9d7a;
    --danger: #d93c65;
    --warning: #e8a038;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-color);
    background: linear-gradient(135deg, #02102b, #052c77 35%, #0f4da2 70%, #1d8ae0);
    min-height: 100vh;
}

a.muted,
.muted {
    color: var(--muted);
}

a {
    color: var(--brand-accent);
}

header {
    background: rgba(2, 21, 53, 0.92);
    color: white;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.brand-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-meta img {
    width: 48px;
    height: 48px;
}

.brand-meta strong {
    font-size: 1.2rem;
    letter-spacing: 0.03em;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.9rem;
}

.user-chip span {
    color: #cbd5f5;
}

.user-chip .role-label {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--brand-secondary);
}

main {
    padding: 32px 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: white;
    margin-bottom: 16px;
}

.page-header h1 {
    margin: 0;
    font-size: 1.9rem;
}

.page-header p {
    margin: 4px 0 0;
    color: #cbd5f5;
}

.action-link {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 16px;
    border-radius: 24px;
}

.card,
.tab-card {
    background: white;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 15px 35px rgba(9, 30, 66, 0.08);
}

.tab-card {
    margin-bottom: 32px;
}

.tab-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tab-btn {
    border: none;
    background: #eef2ff;
    color: var(--brand-primary);
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn-alert {
    background: #ffe2e1;
    color: #b4232a;
}

.tab-btn-alert.is-active {
    background: #b4232a;
    color: #fff;
}

.tab-btn.is-active {
    background: var(--brand-primary);
    color: white;
    box-shadow: 0 8px 18px rgba(5, 44, 119, 0.25);
}

.tab-panel {
    display: none;
    animation: fadeIn 0.25s ease;
}

.tab-panel.is-active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.stat-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-card {
    background: #f4f7ff;
    border-radius: 14px;
    padding: 16px;
}

.stat-card h4 {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.stat-card strong {
    display: block;
    font-size: 1.4rem;
    margin-top: 8px;
}

.table-scroll {
    overflow-x: auto;
    border-radius: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 600px;
}

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid #eef1f6;
    text-align: left;
}

th {
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

td.right {
    text-align: right;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    border: none;
    padding: 8px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(5, 44, 119, 0.18);
}

.btn.disabled,
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-primary {
    background: var(--brand-accent);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: #3c2500;
}

.btn-warning {
    background: var(--warning);
    color: #432200;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-text {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d5dcec;
    border-radius: 10px;
    font-size: 0.95rem;
}

form .row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.col-span-2 {
    grid-column: span 2;
}

.flash {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-weight: 600;
}

.flash-success {
    background: #e9fbf4;
    color: var(--success);
}

.flash-danger {
    background: #fdecef;
    color: var(--danger);
}

.flash-warning {
    background: #fff4e5;
    color: var(--warning);
}

.flash-info {
    background: #e0f2ff;
    color: var(--brand-primary);
}

footer {
    color: white;
    text-align: center;
    padding: 24px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-panel .card {
    box-shadow: none;
    padding: 0;
}

.table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 12px;
}

.order-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-control {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.payment-control select {
    padding: 6px 8px;
}

.payment-summary {
    width: 100%;
    border-collapse: collapse;
}

.payment-summary th,
.payment-summary td {
    text-align: center;
}

.payment-summary tbody td {
    font-weight: 600;
}

.vehicle-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
}

.status-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 28, 46, 0.06);
    font-size: 0.85rem;
    font-weight: 600;
}

.status-dot::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(31, 157, 122, 0.6);
}

.status-dot.status-busy {
    color: var(--danger);
}

.status-dot.status-busy::before {
    background: var(--danger);
    box-shadow: 0 0 0 0 rgba(217, 60, 101, 0.6);
    animation: statusPulseBusy 1s ease-out infinite;
}

.status-dot.status-idle {
    color: var(--success);
}

.status-dot.status-idle::before {
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(31, 157, 122, 0.6);
    animation: statusPulseIdle 1.4s ease-out infinite;
}

@keyframes statusPulseBusy {
    0% {
        box-shadow: 0 0 0 0 rgba(217, 60, 101, 0.7);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(217, 60, 101, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(217, 60, 101, 0);
    }
}

@keyframes statusPulseIdle {
    0% {
        box-shadow: 0 0 0 0 rgba(31, 157, 122, 0.7);
    }

    70% {
        box-shadow: 0 0 0 8px rgba(31, 157, 122, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(31, 157, 122, 0);
    }
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #eef1f6;
    color: var(--brand-primary);
}

.status-pill.assigned {
    background: #fff0e6;
    color: #c35a00;
}

.status-pill.in_progress {
    background: #ffe2e1;
    color: #b4232a;
}

.status-pill.completed {
    background: #e6f6ef;
    color: var(--success);
}

.gps-note {
    font-size: 0.8rem;
    color: var(--muted);
}

.right {
    text-align: right;
}

.mt-10 {
    margin-top: 10px;
}

.panel-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.fleet-schedule th,
.fleet-schedule td {
    text-align: center;
}
.schedule-table {
    width: 100%;
}

.schedule-table th,
.schedule-table td {
    text-align: left;
}


.fleet-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.fleet-card table {
    width: 100%;
}

.fleet-card-idle {
    border-top: 4px solid var(--success);
}

.fleet-card-busy {
    border-top: 4px solid var(--danger);
}

.schedule-table .schedule-today {
    background: #fff3e0;
    font-weight: 600;
}

.duty-card p {
    margin: 4px 0;
}

@media (max-width: 720px) {

    .brand-bar,
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    table {
        min-width: 480px;
    }
}



