    body {
        background-color: #f5f6fa;
        color: #222;
        font-family: Arial, sans-serif;
    }

    .dashboard {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-gap: 20px;
        padding: 20px;
    }

    .box {
        background: #f8f9fa;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

    .chart {
        grid-column: span 3;
        background: #fff;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
        height: 350px;
    }

    .chart-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .chart-title {
        display: flex;
        flex-direction: column;
    }

    .chart-title span {
        font-size: 14px;
        color: #555;
    }

    .chart-title h3 {
        margin: 0;
        font-size: 18px;
        color: black;
        border-radius: 4px;
        display: inline-block;
    }

    /* right side controls */
    .chart-controls {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    select {
        padding: 6px 12px;
        border-radius: 6px;
        border: 1px solid #ccc;
        background: #fff;
        font-size: 14px;
    }

    .chart-buttons {
        display: flex;
        border: 1px solid #ccc;
        border-radius: 8px;
        overflow: hidden;
    }

    .chart-buttons button {
        padding: 6px 14px;
        border: none;
        background: #f1f1f1;
        cursor: pointer;
        font-size: 14px;
        color: #333;
    }

    .chart-buttons button.active {
        background: #0b2a59;
        color: #fff;
    }

    .chart canvas {
        width: 100% !important;
        height: 250px !important;
        margin-top: 10px;
    }

    /* top-delegates table */
    .top-delegates {
        grid-column: span 4;
        margin-top: 20px;
    }

    .top-delegates h3 {
        margin: 0 0 15px;
        font-size: 18px;
    }

    table {
        width: 100%;
        border-collapse: collapse;
    }

    th,
    td {
        padding: 10px 12px;
        text-align: left;
        font-size: 14px;
        border-bottom: 1px solid #eee;
    }

    th {
        font-weight: bold;
        color: #333;
    }

    td {
        color: #555;
    }

    .status {
        display: inline-block;
        padding: 4px 10px;
        border-radius: 6px;
        font-size: 13px;
    }

    .paid {
        background: rgba(11, 42, 89, 0.1);
        color: #0b2a59;
    }

    .delayed {
        background: rgba(255, 0, 0, 0.1);
        color: #c00;
    }

    /* 🌙 DARK MODE */
    body.dark-mode {
        background-color: #1e1e1e;
        color: #eee;
    }

    body.dark-mode .box,
    body.dark-mode .chart,
    body.dark-mode .top-delegates {
        background: #1e1e1e;
        color: #eee;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    }

    body.dark-mode th {
        color: #ddd;
    }

    body.dark-mode td {
        color: #bbb;
    }

    body.dark-mode .status.paid {
        background: rgba(11, 42, 89, 0.4);
        color: #fff;
    }

    body.dark-mode .status.delayed {
        background: rgba(255, 0, 0, 0.3);
        color: #ffaaaa;
    }

    body.dark-mode .chart-title span {
        color: #bbb;
    }

    body.dark-mode .chart-title h3 {
        color: #fff;
    }

    body.dark-mode select {
        background: #3b3b4f;
        color: #fff;
        border: 1px solid #555;
    }

    body.dark-mode .chart-buttons {
        border: 1px solid #555;
    }

    body.dark-mode .chart-buttons button {
        background: #3b3b4f;
        color: #ddd;
    }

    body.dark-mode .chart-buttons button.active {
        background: #0b2a59;
        color: #fff;
    }

    /* 🌙 toggle button */
    .toggle-btn {
        position: fixed;
        top: 15px;
        right: 15px;
        padding: 8px 14px;
        background: #0b2a59;
        color: #fff;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 14px;
    }

    @media (max-width: 768px) {

        .chart,
        .top-delegates {
            grid-column: span 4 !important;
        }
    }

    /* 🌙 Dark Mode */
    .chart-controls select {
        padding: 6px 12px;
        border-radius: 12px;
        border: 1px solid #ccc;
        background: #fff;
        font-size: 14px;
    }

    /* Dark mode */
    body.dark-mode .chart-controls select {
        background: #3b3b4f;
        color: #fff;
        border: 1px solid #555;
    }

    .top-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        /* margin: 14px; */
    }

    .add-order-btn {
        padding: 8px 16px;
        background: #0b2a59;
        color: #fff;
        border: none;
        border-radius: 6px;
        font-size: 14px;
        cursor: pointer;
        transition: background 0.2s ease-in-out;
    }

    .add-order-btn:hover {
        background: #133b80;
    }

    /* 🌙 Dark Mode */
    body.dark-mode .add-order-btn {
        background: #4da3ff;
        color: #111;
    }

    body.dark-mode .add-order-btn:hover {
        background: #77b9ff;
    }

    /* Autocomplete dropdown */
    .autocomplete-menu {
        position: absolute;
        z-index: 1000;
        background: #fff;
        border: 1px solid #e6e6e6;
        box-shadow: 0 6px 24px rgba(0, 0, 0, .08);
        border-radius: 10px;
        max-height: 260px;
        overflow-y: auto;
        min-width: 240px;
    }

    .autocomplete-item {
        padding: 10px 12px;
        cursor: pointer;
        line-height: 1.2;
    }

    .autocomplete-item:hover,
    .autocomplete-item.active {
        background: #f5f7fb;
    }

    .autocomplete-label {
        font-weight: 600;
    }

    .autocomplete-sublabel {
        display: block;
        font-size: 12px;
        color: #667085;
        margin-top: 2px;
    }

    /* Dark mode tweak */
    .dark-mode .autocomplete-menu {
        background: #151923;
        border-color: #2a3142;
        color: #e7e7ea;
    }

    .dark-mode .autocomplete-item:hover,
    .dark-mode .autocomplete-item.active {
        background: #1d2432;
    }

    .dark-mode .autocomplete-sublabel {
        color: #9aa3b2;
    }

    /* Map modal + map sizing */
    #map {
        width: 100%;
        height: 100%;
        /* map fills its container */
        min-height: 360px;
        /* safety */
    }

    .modal {
        position: fixed;
        inset: 0;
        display: none;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, .45);
        z-index: 9999;
    }

    .modal.show {
        display: flex;
    }

    .modal .modal-content {
        position: relative;
        width: min(1000px, 92vw);
        height: min(80vh, 720px);
        background: #fff;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
        display: flex;
        flex-direction: column;
    }

    .close-btn {
        position: static;
        background: radial-gradient(red, transparent);
        border: 0;
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
        z-index: 2;
    }
.viewBtn {
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 500;
    background-color: #28a745; 
    color: white;
    border: 1px solid #28a745;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.viewBtn:hover {
    background-color: #28a745;
    border-color: #28a745;
}
.pagination {
    display: flex; 
    justify-content: center; 
    align-items: center; 
    margin-top: 25px; 
    padding: 10px 0;
}

#pageInfo {
    font-size: 16px;
    font-weight: 600;
    color: #343a40; 
    margin: 0 15px; 
    padding: 8px 12px; 
    background-color: #e9ecef; 
    border-radius: 4px;
}

.pagination button {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    background-color: #6c757d; 
    color: white;
    border: 1px solid #6c757d;
}

.pagination button:hover {
    background-color: #5a6268; 
    border-color: #545b62;
}

.pagination button:disabled {
    background-color: #e9ecef; 
    color: #adb5bd; 
    border: 1px solid #e9ecef;
    cursor: not-allowed; 
    opacity: 0.7;
}
.map-notes-section.top {
    padding-bottom: 15px; 
    padding-top: 0; 
}

.note-input {
    width: 100%; 
    padding: 10px;
    margin-bottom: 5px; 
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box; 
}

.note-helper-text {
    font-size: 12px;
    color: #6c757d; 
    margin: 0; 
}
.map-notes-section.top {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px; 
        padding: 10px 15px; 
    margin-bottom: 15px; 
    margin-top: 5px; 
}

.note-helper-text {
    font-size: 14px; 
    color: #6c757d; 
    font-weight: 500;
    margin: 0; 
    padding: 0;
    text-align: inherit; 
}
.filters {
    display: flex;            
    flex-wrap: wrap;          
    gap: 40px;              
    align-items: flex-end;    
    
    padding: 15px 20px;      
    background-color: #ffffff; 
    border-radius: 12px;       
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); 
    margin-bottom: 25px;      
}

.filter-group {
    display: flex;
    flex-direction: column; 
    min-width: 200px;      
}

.filters label {
    font-size: 14px;
    font-weight: 600;       
    color: #495057;         
    margin-bottom: 5px;      
}

.filters select,
.filters input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    color: #343a40;
    border: 1px solid #ced4da;
    border-radius: 8px; 
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: #ffffff; 
}

.filters select:focus,
.filters input[type="date"]:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.2); 
}

.filters button {
    align-self: flex-end; 
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#applyFiltersBtn {
    background-color: #28a745;
    color: white;
    border: 1px solid #28a745;
}
#applyFiltersBtn:hover {
    background-color: #1e7e34;
}
  .export-btn {
      padding: 2px 8px;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 12px rgba(3, 67, 2, 0.4);
      margin-top: 8px;
      margin-bottom: 8px;
    }

    .export-btn svg {
      width: 22px;
      height: 22px;
      fill: #28a745;
      /* green icon by default */
      transition: fill 0.25s ease;
      padding: 5px;
    }

    .export-btn:hover {
      background-color: #28a745;
      box-shadow: 0 4px 12px rgba(3, 67, 2, 0.4);
      transition: all 0.3s ease;
    }

    .export-btn:hover svg {
      fill: white;
      /* white icon on hover */
    }

    @media (max-width: 768px) {
      .export-wrapper {
        margin-left: 0;
        width: 100%;
      }

      .export-btn {
        width: 100%;
        justify-content: center;
      }
    }

    /* Mobile view stacks filters */
    @media (max-width: 768px) {
      .filters {
        flex-direction: column;
      }

      .filter-group,
      .export-btn {
        flex: 1 1 100%;
      }
    }
