body {
  font-family: 'Roboto', Arial, sans-serif;
  background: #f4f7fa;
  color: #222;
  margin: 0;
  padding: 0;
}

.main-header {
  background: linear-gradient(90deg, #1976d2 0%, #42a5f5 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
}
.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 100px 16px 20px;
}
.logo {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0;
}
.main-nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 24px;
  font-weight: 500;
  transition: color 0.2s;
  font-size: 1.1rem;
}
.main-nav a:hover {
  color: #ffd600;
}

main.container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  padding: 32px;
}
h2 {
  color: #1976d2;
  margin-top: 0;
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background: #fafbfc;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(25, 118, 210, 0.05);
}
th, td {
  padding: 12px 16px;
  text-align: center;
  border: 1px solid #ddd;
}
th {
  background: #1976d2;
  color: #fff;
  font-weight: 600;
}
td {
  border-bottom: 1px solid #e3e8ee;
}
tr:last-child td {
  border-bottom: none;
}
tr:hover {
  background: #e3f2fd;
}

/* Form Styles */
form {
  margin: 24px 0;
}
label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}
.label-top-mr {
  margin-top: 16px;
}
input, select, button {
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid #b0bec5;
  margin-bottom: 16px;
  font-size: 1rem;
  box-sizing: border-box;
}
input:focus, select:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 2px #90caf9;
}
button {
  background: #1976d2;
  color: #fff;
  border: none;
  margin-left: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.button {
    padding: 10px 14px;
    border-radius: 6px;
    background: #1976d2;
    color: #fff;
    border: none;
    margin-left: 10px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.action-btn {
  display: inline-block;
  padding: 5px 8px;
  margin: 0 2px;
  text-decoration: none;
  border-radius: 3px;
  transition: background-color 0.3s;
}

.action-btn1 {
    display: inline-block;
    padding: 10px 15px;
    margin: 5px;
    text-decoration: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
}

.edit-btn1 {
    background-color: #28a745;
}

.view-btn { 
  background-color: #007bff; 
  color: white; 
}

.view-btn:hover { 
  background-color: #0369d6; 
}

.edit-btn {
  background-color: #28a745;
  color: white;
}

.edit-btn:hover {
  background-color: #218838;
}

.delete-btn {
  background-color: #dc3545;
  color: white;
}

.delete-btn:hover {
  background-color: #c82333;
}
  
.action-btn svg {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.add-btn {
  background-color: #28a745;
  color: white;
  padding: 8px 12px;
  margin-bottom: 10px;
  display: inline-block;
  margin-left: 85%;
}

.add-btn:hover {
  background-color: #218838;
}
  
.add-btn svg {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin-right: 5px;
}

.back-btn {
    background: #6c757d;
    color: white;
    padding: 5px 8px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 2px;
    transition: background-color 0.3s;
    /* margin-left: 92%; */
}

.details-table {
  width: 100%;
  margin-bottom: 20px;
}

.details-table th {
  width: 200px;
}

/* Footer */
.footer {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 18px 0;
  margin-top: 48px;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 700px) {
  .header-flex, .main-nav {
    flex-direction: column;
    align-items: flex-start;
  }
  .main-nav a {
    margin: 8px 0 0 0;
    font-size: 1rem;
  }
  main.container {
    padding: 16px;
  }
  .container {
    width: 98%;
    padding: 8px 0;
  }
} 
.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #fff;
  font-weight: 500;
  margin-left: 24px;
  padding: 0;
  text-align: left;
  margin-top:20px;
}

/* Timeline / Live Assignments */
.timeline-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.08);
    padding: 20px;
    margin-top: 12px;
}

.timeline-card__header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
    border-bottom: 1px solid #e3e8ee;
    padding-bottom: 12px;
}

.timeline-title {
    margin: 0;
    color: #0d47a1;
}

.timeline-subtitle {
    margin: 4px 0 0;
    color: #607d8b;
    font-size: 0.95rem;
}

.timeline-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.timeline-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: #455a64;
}

.tm-input {
    padding: 10px 12px;
    border: 1px solid #cfd8dc;
    border-radius: 8px;
    min-width: 160px;
    font-size: 0.95rem;
    background: #fff;
    color: #263238;
}

.tm-input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.12);
}

.tm-refresh {
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(90deg, #1976d2 0%, #42a5f5 100%);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.18);
}

.tm-refresh:hover {
    filter: brightness(1.05);
}

.timeline-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 14px 0 6px;
}

.pill {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #e0e7ff;
    background: #f5f8ff;
    color: #1e3a8a;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pill:hover {
    background: #e8f0ff;
}

.pill.active {
    background: #1976d2;
    color: #fff;
    border-color: #1976d2;
}

.timeline-body {
    position: relative;
    min-height: 360px;
}

.timeline-status {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.8);
    z-index: 2;
    color: #1976d2;
}

.timeline-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
    color: #546e7a;
    font-weight: 600;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
}

.legend-outbound {
    background: #4c8df6;
}

.legend-inbound {
    background: #4ad4b3;
}

.legend-ongoing {
    background: #f6b24c;
}

.spinner {
    border: 3px solid #e3f2fd;
    border-top: 3px solid #1976d2;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.text-error {
    color: #c62828;
}

@media (max-width: 900px) {
    .timeline-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .tm-input {
        min-width: 140px;
    }
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 190px;
  border: 1px solid #ccc;
  z-index: 99999;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.dropdown-content a {
  color: black;
  padding: 8px 12px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Kanban styles */

.dashboard-container {
    margin: 0 auto;
}

.filter-section {
    position: sticky;
    top: 0;
    background-color: white;
    border-radius: 8px;
    padding: 0 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 25px;
}

.date-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.date-filters label {
    font-weight: 500;
    color: #333;
}

.date-filters input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.filter-btn, .reset-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.filter-btn {
    background-color: #007bff;
    color: white;
}

.filter-btn:hover {
    background-color: #0056b3;
}

.reset-btn {
    background-color: #6c757d;
    color: white;
}

.reset-btn:hover {
    background-color: #5a6268;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    min-height: 600px;
}

.kanban-column {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 600px;
}

.column-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.column-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.section-container {
    margin-bottom: 20px;
}

.section-title {
    background: #333;
    color: white;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 16px;
    border-radius: 4px;
    text-align: center;
}

.inbound-section .section-title {
    background: #89c02f;
}

.outbound-section .section-title {
    background: #066d36;
}

.availability-section .section-title {
    background: #ffc107;
    color: #333;
}

.info-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    color: white;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-size: 13px;
    line-height: 1.4;
    margin-top: 50px;
}

.field-row {
    display: flex;
    margin-bottom: 4px;
}

.field-label {
    font-weight: 500;
    color: #666;
    width: 80px;
    flex-shrink: 0;
}

.field-value {
    color: #333;
    flex: 1;
}

.time-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.route-badge {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    display: inline-block;
}

.availability-item {
    padding: 5px 0;
    font-size: 12px;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.4;
    margin-bottom: 4px;
    border-radius: 4px;
}

.no-data {
    text-align: center;
    color: #999;
    padding: 20px 10px;
    font-style: italic;
    font-size: 13px;
}

.loading {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* Responsive design */
@media (max-width: 1635px) {
    .dashboard-container {
        padding: 15px;
    }
    
    .kanban-board {
        grid-template-columns: 1fr;
    }
}

/* outbopund list */
.outbound-list-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-form input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 250px;
}

.search-form button {
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-form button:hover {
    background: #0056b3;
}

.outbound-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.outbound-row:hover {
    background-color: #f8f9fa;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 8px 12px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #007bff;
}

.pagination a:hover {
    background: #e9ecef;
}

.pagination .current {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination form button {
    padding: 8px 12px;
    background-color: #b1b9c1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 0;
}

.pagination form button:hover {
    background: #0056b3;
    color: white;
}

.pagination-info {
    text-align: center;
    margin-bottom: 10px;
    color: #666;
}

.no-records {
    text-align: center;
    color: #666;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 4px;
}

@media (max-width: 768px) {
    
    .search-form {
        justify-content: center;
    }
    
    .search-form input {
        min-width: 200px;
    }
}

/* outbopund view */

.back-btn:hover {
    background: #5a6268;
    color: white;
}

.back-btn svg {
    width: 16px;
    height: 16px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.details-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
}

.changeover-card {
    border-left-color: #28a745;
}

.inbound-card {
    border-left-color: #17a2b8;
}

.details-card h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: bold;
    color: #666;
    min-width: 120px;
}

.detail-value {
    color: #333;
    text-align: right;
    flex: 1;
}

.trailer-badge {
    display: inline-block;
    background: #e3f2fd;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin: 2px;
    border: 1px solid #2196f3;
}

.driver-type-badge {
    background: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 8px;
}

.driver-type-badge-green {
    background: #008000;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 8px;
}

.outbound-link {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.outbound-link:hover {
    text-decoration: underline;
}

.changeover-link {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.changeover-link:hover {
    text-decoration: underline;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-yes {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-no {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.full-width {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header-section {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 4px;
    }
    
    .detail-value {
        text-align: left;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* Action buttons in table cells in list */
.action-buttons-inline {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.search-dropdown {
    position: relative;
}

.dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.dropdown-item:hover,
.dropdown-item.highlighted {
    background-color: #f8f9fa;
}

.clear-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    font-size: 18px;
    color: #666;
}

/* Dashboard to click */
.data-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s;
}

.data-table tbody tr:hover {
    background-color: #f5f5f5;
}

/* Dashboard avl */
.availability-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.availability-category {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-header {
    display: flex;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #007bff;
    font-size: 14px;
    justify-content: space-between;
}

.category-items {
    max-height: 200px;
    overflow-y: scroll;
}

.category-items::-webkit-scrollbar {
    width: 4px;
}

.category-items::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.category-items::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.availability-item:last-child {
    border-bottom: none;
}

.item-count {
    background: #007bff;
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    margin-left: 5px;
}

.status-badge.available {
    background: #d4edda;
    color: #155724;
}

.status-badge.unavailable {
    background: #f8d7da;
    color: #721c24;
}
   

/* Responsive adjustments */
@media (max-width: 768px) {
    .availability-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.menu-container {
    position: relative;
    margin-left: auto;
}

.menu-toggle {
    background: #6c757d;
    border: 1px solid #000;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 18px;
}

.menu-toggle:hover {
    background-color: #636668;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.dropdown-menu.show {
    display: block;
}

.menu-item {
    padding: 10px 15px;
}

.menu-item label {
    display: flex;
    cursor: pointer;
}

.menu-item input[type="checkbox"] {
    margin-right: 8px;
}

.menu-item hr {
    margin: 5px 0;
    border: none;
    border-top: 1px solid #eee;
}       

.alert {
    padding: 12px 20px;
    border-radius: 6px;
    margin: 10px 0px 20px 0px;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* manage users */
.role-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
}
.role-developer { background: #6f42c1; color: white; }
.role-super_admin { background: #d63384; color: white; }
.role-admin { background: #fd7e14; color: white; }
.role-staff { background: #0d6efd; color: white; }
.role-maintenance { background: #198754; color: white; }
.role-viewer { background: #6c757d; color: white; }

.status-badge.active { background: #c29541; color: white; }
.status-badge.inactive { background: #dc3545; color: white; }

.text14px{
    font-size: 14px;
}

.select2-results__option:first-child {
    background-color: transparent !important;
}
.select2-results__option--highlighted:first-child {
    background-color: transparent !important;
    color: #999 !important;
}

/* Fix for Select2 close icon visibility */
.select2-selection__clear {
    color: #999 !important;
    font-size: 18px !important;
    font-weight: bold !important;
    line-height: 1 !important;
}

.select2-selection__clear:hover {
    color: #333 !important;
}

.select2-container--classic .select2-selection__clear {
    color: #666 !important;
    background: rgba(255, 255, 255, 0.8) !important;
    border: none !important;
    font-size: 16px !important;
    font-weight: bold !important;
    padding: 2px !important;
    margin-right: 5px !important;
    border-radius: 3px !important;
}

.select2-container--classic .select2-selection__clear:hover {
    color: #000 !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
}

.select2-selection--single .select2-selection__clear {
    position: absolute !important;
    right: -25px !important;
    z-index: 1 !important;
}

.select2-container--classic .select2-results>.select2-results__options{
    padding-left: 10px;
} 

/* delivery button*/

.delivery-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 25px;
}
.delivery-button.active {
    background-color: #dc3545;
}

/* history */
.history-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.history-table th,
.history-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.history-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.history-table tr:hover {
    background: #f8f9fa;
}

/* Container and Grid System */
.container-fluid {
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    align-items: stretch;
}

.col-12, .col-md-4, .col-md-6, .col-lg-3 {
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .col-md-4 { width: 33.333%; min-width: 0; }
    .col-md-6 { width: 50%; }
}

@media (min-width: 992px) {
    .col-lg-3 { width: 25%; min-width: 0; }
}

/* Utility Classes */
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.me-1 { margin-right: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.ms-auto { margin-left: auto; }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.text-center { text-align: center; }
.text-muted { color: #6c757d; }

/* Card Components */
.card {
    margin-bottom: 20px;
    height: 100%;
}

.card-body {
    padding: 20px;
    flex: 1;
    background-color: #f4f7fa;
}

.card-body .d-flex {
    min-height: 60px; 
}

.card-header {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
}

.card-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
}

.card-text {
    margin: 0;
}

.border-0 { border: none !important; }
.shadow-sm { box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* Badge System */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.bg-success { background-color: #28a745; color: white; }
.bg-warning { background-color: #ffc107; color: #000; }
.bg-danger { background-color: #dc3545; color: white; }

/* Alert Component */

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Progress Bar */
.progress {
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    transition: width 0.3s ease;
    padding: 8px 0px;
}

/* Table Responsive */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 0;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* Input Group */
.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    position: relative; 
}

.input-group-text {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: none; 
    border: none; 
    color: #6c757d;
    z-index: 10;
    pointer-events: none; 
}

.input-group .form-control {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

input[type="datetime-local"].form-control {
    padding-left: 12px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.25);
}

/* Button Variants */
.btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 400;
    text-align: center;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.875rem;
}

.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
    background: white;
}

.btn-outline-primary:hover {
    background: #007bff;
    color: white;
}

/* Spinner */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.text-primary { color: #007bff; }
.text-success { color: #28a745; }
.text-warning { color: #ffc107; }
.text-danger { color: #dc3545; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

.work-record {
    border-left: 3px solid #007bff;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.timeline-container {
    max-height: 400px;
    overflow-y: auto;
}

.driver-info-container {
    padding: 10px 0;
}

.driver-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: white;
}

.driver-name i {
    margin-right: 8px;
}

.driver-details-row {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.detail-label1 {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 400;
    color: white;
}

.detail-value1 {
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

/* Responsive */
@media (max-width: 992px) {
    .driver-details-row {
        gap: 25px;
    }

    .status-item {
        margin-left: 0;
        width: 100%;
    }
}

.filter-buttons {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.filter-tag {
    display: inline-block;
    background: #e9f2ff;
    color: #003366;
    padding: 5px 10px;
    margin: 4px;
    border-radius: 12px;
}

/* Edit Modal */
.edit-eta-btn {
    padding: 5px !important;
    min-width: 25px !important;
}

.edit-eta-btn svg {
    width: 14px;
    height: 14px;
}

.eta-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.eta-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 0;
    border: 1px solid #888;
    width: 450px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.eta-modal-header {
    padding: 15px 20px;
    background-color: #2c3e50;
    color: white;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.eta-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.eta-modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.eta-modal-close:hover {
    color: #ff6b6b;
}

.eta-modal-body {
    padding: 20px;
}

.eta-modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.eta-modal-body input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.eta-modal-body input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.eta-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-cancel, .btn-save {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-cancel {
    background-color: #95a5a6;
    color: white;
}

.btn-cancel:hover {
    background-color: #7f8c8d;
}

.btn-save {
    background-color: #27ae60;
    color: white;
}

.btn-save:hover {
    background-color: #229954;
}

/* mat-set */
.mat-action-bar {
    display: flex;
    justify-content: flex-end;   
    gap: 10px;
    margin-bottom: 15px;
}

.mat-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    color: #fff;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    background: #16a34a;
}

.mat-btn svg {
    width: 16px;
    height: 16px;
}

/* mat-set route */
.trailer-section {
    border: 1px solid #ccc;
    padding: 20px;
    margin: 15px 0;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.btn {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

button[type="button"] {
    background-color: #6c757d;
    color: white;
}

button[type="button"]:hover {
    background-color: #5a6268;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.mat-warning {
    word-spacing: 3px;
    line-height: 1.6;
}

.mat-warning strong {
    margin: 0 4px;
}

.warn-title {
    margin-right: 6px;
}

/* ============================
   DASHBOARD CHART CARD
============================ */

.dashboard-charts {
	margin-top: 30px;
	padding: 0;
}

.chart-card {
	background: #ffffff;
	border-radius: 10px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	padding: 20px;
	border-left: 6px solid #1976d2;
}

.chart-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 15px;
}

.chart-card-title {
	font-size: 1.2rem;
	font-weight: 600;
	color: #1976d2;
}

.chart-card-subtitle {
	font-size: 0.85rem;
	color: #666;
}

.chart-card-body {
	position: relative;
	height: 350px;
}

/* Smooth scrolling for horizontal chart overflow */
.chart-card-body::-webkit-scrollbar {
	height: 8px;
}

.chart-card-body::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.chart-card-body::-webkit-scrollbar-thumb {
	background: #888;
	border-radius: 4px;
}

.chart-card-body::-webkit-scrollbar-thumb:hover {
	background: #555;
}

/* Responsive */
@media (max-width: 768px) {
	.chart-card-body {
		height: 280px;
	}
}