css
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.15);
    z-index: -1;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: url('../img/truck.jpg') no-repeat center center fixed;
    background-size: cover;
}

body.dashboard {
    background: #071326;
}

.container {
    max-width: 380px;
    margin: 60px auto;
    padding: 24px;
    background: rgba(255,255,255,0.88);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    text-align: center;
}

.logo {
    width: 140px;
    max-width: 80%;
    height: auto;
    margin: 0 auto 20px;
    display: block;
}

h1, h2 {
    color: #1d2f6f;
    margin-bottom: 20px;
}

input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
    margin: 10px 0;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

button {
    width: 100%;
    padding: 15px;
    margin-top: 12px;
    font-size: 18px;
    background: #1d2f6f;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

button:hover {
    background: #b8860b;
}

button:active {
    transform: scale(0.98);
}

.btn-primary {
    background: #1d2f6f;
}

.btn-warning {
    background: #b8860b;
}

.btn-danger {
    background: #c0392b;
    color: white;
    border: none;
    cursor: pointer;
}

.btn-danger:hover {
    background: #e74c3c;
}

.btn-small {
    padding: 6px 10px;
    margin-right: 8px;
    font-size: 12px;
    border-radius: 6px;
}

#msg {
    margin-top: 14px;
    color: #b00020;
    font-weight: bold;
}

.offline-resume {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid rgba(29,47,111,0.22);
    border-radius: 8px;
    background: rgba(255,255,255,0.72);
    text-align: left;
}

.offline-resume[hidden] {
    display: none;
}

.offline-resume-title {
    color: #1d2f6f;
    font-weight: 800;
    margin-bottom: 6px;
}

.offline-resume p {
    margin: 0 0 10px;
    color: #24344f;
    font-size: 14px;
}

.offline-resume button {
    width: 100%;
    margin: 0 0 8px;
    padding: 12px;
    font-size: 15px;
}

.offline-resume small {
    display: block;
    color: #5e6b7e;
    line-height: 1.35;
}

/* HEADER BAR */
.header-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #1f3a73;
    color: white;
    padding: 10px 15px;
}

.header-bar h1,
.header-bar h2 {
    color: #ffffff;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.shift-status {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
}

.header-left {
    flex-shrink: 0;
}

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logout {
    background: rgba(255,255,255,0.15);
    padding: 6px 10px;
    border-radius: 6px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    opacity: 0.8;
}

.logout:hover {
    background: rgba(255,255,255,0.25);
    text-decoration: underline;
    opacity: 1;
}

.logo-small {
    width: 80px;
}

/* DASHBOARD LAYOUT */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.list-item {
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.full-width {
    grid-column: 1 / -1;
}

.card-row {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.card-row > section.card {
    flex: 1;
    min-width: 280px;
}

/* SELECTABLE / SELECTED */
.selectable {
    cursor: pointer;
}

.selectable:hover {
    background: #eef2ff;
}

.selected {
    background: #dbeafe !important;
    border-left: 5px solid #1d2f6f;
}

.selected-driver {
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #dbeafe;
    border-left: 5px solid #1d2f6f;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
}

/* MAP */
.map {
    grid-column: span 2;
    padding: 8px;
}

.map-container {
    position: relative;
    width: 100%;
    height: 460px;
    overflow: hidden;
    border-radius: 8px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.map-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 2;
}

/* SHIFT ITEMS */
.shift-line {
    display: flex;
    gap: 12px;
    font-size: 14px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.shift-subline {
    font-size: 12px;
    color: #555;
    margin-top: 4px;
}

.driver-item {
    padding: 10px;
}

.driver-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
}

.driver-meta {
    display: flex;
    gap: 8px;
    margin-top: 5px;
    font-size: 12px;
    flex-wrap: wrap;
}

.hours {
    font-size: 13px;
    color: #333;
    font-weight: bold;
}

.badge {
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
}

.badge-cdl {
    background: #8b0000;
    color: white;
    margin-right: 6px;
    font-size: 11px;
}

.status-active { border-left: 4px solid #2ecc71; }
.status-idle   { border-left: 4px solid #f39c12; }
.status-closed { border-left: 4px solid #999; opacity: 0.75; }

.status-text {
    font-weight: bold;
    text-transform: capitalize;
}

.status-active .status-text { color: #2ecc71; }
.status-idle   .status-text { color: #f39c12; }
.status-closed .status-text { color: #888; }

/* VEHICLES */
.vehicle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vehicle-left {
    flex: 1;
}

.vehicle-right {
    margin-left: 10px;
}

.vehicle-item.assigned {
    background: #f4f4f4;
    opacity: 0.7;
}

.vehicle-list-scroll {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 6px;
    margin-bottom: 12px;
    border-bottom: 1px solid #ddd;
}

@media (max-width: 1024px) {
    .vehicle-list-scroll { max-height: 320px; }
}

@media (max-width: 768px) {
    .vehicle-list-scroll { max-height: 45vh; }
}

/* MODALS */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    text-align: left;
    background: #ffffff;
    padding: 22px;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.modal-content input,
.modal-content select {
    width: 100%;
    margin: 8px 0;
    padding: 12px;
    box-sizing: border-box;
}

#orderModal .modal-content {
    text-align: left;
    max-height: 85vh;
    overflow-y: auto;
    padding-bottom: 28px;
}

#orderModal .modal-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 12px 0 4px;
    border-top: 1px solid #ddd;
}

.order-modal-actions {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.order-modal-actions button {
    width: 100%;
    padding: 10px 8px;
}

@media (max-width: 700px) {
    .order-modal-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

#manageVehiclesModal .modal-content {
    text-align: left;
    max-width: 820px;
    width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
}

.manage-vehicle-list-scroll {
    max-height: 55vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 6px;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-width: 0;
}

.manage-vehicle-list-scroll table {
    min-width: 600px;
}

/* TRANSPORT POPUP */
.transport-popup-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(3,6,13,0.82);
    z-index: 10050;
    align-items: center;
    justify-content: center;
}

.transport-popup-overlay.open { display: flex; }

.transport-popup {
    background: #080f21;
    border: 1px solid rgba(80,120,160,0.4);
    border-radius: 14px;
    width: 95%;
    max-width: 520px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0,0,0,0.7);
    z-index: 10051;
}

.transport-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(80,120,160,0.25);
    position: sticky;
    top: 0;
    background: #080f21;
    z-index: 1;
}

.transport-popup-header h3 {
    margin: 0;
    color: #e0ecff;
    font-size: 1.05rem;
    font-weight: 600;
}

.transport-popup-close {
    background: rgba(80,120,160,0.2);
    border: 1px solid rgba(80,120,160,0.35);
    color: #e0ecff;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

.transport-popup-close:hover { background: rgba(80,120,160,0.4); }

.transport-popup-body { padding: 16px 20px 20px; }

.transport-popup-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 18px;
}

.transport-meta-item {
    background: rgba(20,40,90,0.4);
    border: 1px solid rgba(80,120,160,0.25);
    border-radius: 8px;
    padding: 8px 12px;
}

.transport-meta-item label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(140,170,200,0.6);
    margin-bottom: 3px;
}

.transport-meta-item span {
    color: #e0ecff;
    font-size: 0.88rem;
    font-weight: 600;
}

.transport-popup-section {
    margin-bottom: 18px;
}

.transport-popup-section h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(140,170,200,0.7);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(80,120,160,0.2);
}

.transport-fill-item,
.transport-delivery-item {
    background: rgba(10,20,40,0.5);
    border: 1px solid rgba(80,120,160,0.2);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.transport-fill-item strong,
.transport-delivery-item strong {
    color: #e0ecff;
    font-size: 0.85rem;
}

.transport-fill-item small,
.transport-delivery-item small {
    color: rgba(140,170,200,0.7);
    font-size: 0.75rem;
    display: block;
}

.transport-fill-photos {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.transport-fill-photos img {
    max-width: 100px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid rgba(80,120,160,0.3);
}

.transport-totals {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
}

.transport-total-item {
    background: rgba(20,40,90,0.5);
    border: 1px solid rgba(80,120,160,0.3);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.transport-total-item label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(140,170,200,0.6);
    display: block;
    margin-bottom: 4px;
}

.transport-total-item span {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e0ecff;
}

.transport-total-item .remaining { color: #4ade80; }
.transport-total-item .remaining.neg { color: #f87171; }

/* RECORDS MODAL (overrides) */
#recordsModal .transport-popup-body { color: #e0ecff; }

#recordsModal select,
#recordsModal button {
    background: rgba(20,40,90,0.5);
    color: #e0ecff;
    border: 1px solid rgba(80,120,160,0.35);
}

#recordsModal select option {
    background: #08101f;
    color: #e0ecff;
}

#recordsModal #recordsModalList { color: #e0ecff; }

/* FULLCALENDAR TWEAKS */
.fc .fc-toolbar-chunk:first-child {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.fc .fc-button-group { display: inline-flex; }

.fc .fc-today-button { margin-left: 6px !important; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .dashboard-grid {
        display: block;
        padding: 12px;
    }

    .dashboard-grid .card {
        width: 100%;
        max-width: 100%;
        margin: 0 0 16px 0;
        box-sizing: border-box;
    }

    .header-bar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-center {
        position: static !important;
        transform: none !important;
        left: auto !important;
        flex: 1 1 100%;
        text-align: center;
        order: 2;
        width: 100%;
    }

    .header-right {
        flex: 1 1 100%;
        justify-content: center;
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        order: 3;
    }

  .header-bar {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        flex-wrap: nowrap;
        gap: 4px;
    }

  .header-bar .logo-small {
        order: 1;
        align-self: flex-start;
  }

    .btn-primary,
    .btn-secondary,
    .btn-danger {
        width: 100%;
        box-sizing: border-box;
    }
}
.map-controls label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

.map-controls input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
    margin: 0 !important;
}

.record-row {
    transition: all .15s ease;
    border-bottom-color: rgba(120,155,190,0.32) !important;
    color: #d7e2ee;
}

.record-row .record-summary {
    color: rgba(215,226,238,0.62);
}

.record-row.record-type-water_transport {
    background: rgba(14,107,168,0.12);
}

.record-row.record-type-dispatch_completion {
    background: rgba(49,95,189,0.14);
}

.record-row.record-type-playa_delivery,
.record-row.record-type-tank_asset_delivery {
    background: rgba(17,122,74,0.12);
}

.record-row.record-type-tank_asset_recovery {
    background: rgba(163,37,27,0.12);
}

.record-row:hover {
    background: rgba(96,165,250,0.16) !important;
}

.record-row-active {
    background: rgba(79,211,122,0.15) !important;
    border-left: 5px solid #4fd37a !important;
}

#recordsDetailPanel {
    color: #d7e2ee;
}

#recordsDetailPanel label {
    color: #8fa7c0;
}

.ops-report-view {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ops-report-view h3,
.ops-report-view h4 {
    margin: 0;
    color: #d7e2ee;
}

.ops-report-view p {
    margin: 6px 0 0;
    color: #8fa7c0;
    line-height: 1.35;
}

.ops-report-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ops-report-card {
    border: 1px solid #1f426a;
    background: #0a2138;
    border-radius: 12px;
    padding: 16px;
}

.ops-report-card-water {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-color: rgba(79, 211, 122, 0.42);
    background: linear-gradient(90deg, rgba(16, 59, 43, 0.72), #0a2138);
}

.ops-report-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ops-report-metric {
    border: 1px solid #1f426a;
    background: #102544;
    border-radius: 12px;
    padding: 14px;
}

.ops-report-metric label {
    display: block;
    margin-bottom: 8px;
    color: #9bb3ca;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ops-report-metric strong {
    display: block;
    color: #d7e2ee;
    font-size: 24px;
    line-height: 1.1;
}

.ops-report-metric small {
    display: block;
    margin-top: 7px;
    color: #8fa7c0;
}

.ops-report-metric.green {
    border-color: rgba(79, 211, 122, 0.42);
}

.ops-report-metric.green strong {
    color: #7cf5a5;
}

.ops-report-metric.blue {
    border-color: rgba(96, 165, 250, 0.44);
}

.ops-report-metric.blue strong {
    color: #83c5ff;
}

.ops-report-metric.gold {
    border-color: rgba(244, 190, 80, 0.46);
}

.ops-report-metric.gold strong {
    color: #ffd978;
}

.ops-report-metric.red {
    border-color: rgba(248, 113, 113, 0.58);
}

.ops-report-metric.red strong {
    color: #ff9ca8;
}

.ops-report-destinations {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.ops-report-destination {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #1f426a;
    border-radius: 10px;
    background: #071a2f;
}

.ops-report-destination span {
    color: #d7e2ee;
    font-weight: 700;
}

.ops-report-destination strong {
    color: #7cf5a5;
}

.ops-report-flow {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(96, 165, 250, 0.34);
    border-radius: 10px;
    background: rgba(37, 99, 172, 0.16);
    color: #d7e2ee;
    font-weight: 800;
}
