:root {
    --primary-color: #667eea;
    /* Adjusted based on 'DLTS Cambodia' blue header */
    --secondary-color: #764ba2;
    /* Gradient end? */
    --bg-light: #f8f9fa;
    --sidebar-width: 250px;
    --header-height: 70px;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --text-muted: #6c757d;
}

body {
    background-color: var(--bg-light);
    font-family: 'Inter', sans-serif;
    /* Assuming Inter or similar */
    overflow-x: hidden;
}

/* Navbar / Top Header */
.top-navbar {
    height: var(--header-height);
    background: linear-gradient(90deg, #7F7FD5, #86A8E7, #91EAE4);
    /* Fallback/Approx */
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    /* Closer match to deep blue/purple */
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
    z-index: 1030;
    position: fixed;
    /* Fixed top */
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.brand-logo {
    font-weight: bold;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo .logo-circle {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-profile {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    background: white;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    padding: 20px 10px;
    overflow-y: auto;
    z-index: 1020;
}

.sidebar-header {
    padding: 10px 15px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 10px;
}

.nav-link {
    color: #4a5568;
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-link:hover {
    background-color: #fce7f3;
    /* Light pinkish/hover? check design */
    color: var(--primary-color);
}

.nav-link.active {
    background-color: #dbeafe;
    /* Light blue */
    color: #2563eb;
    /* Blue text */
    font-weight: 600;
}

/* Main Content */
.main-content {
    margin-top: var(--header-height);
    margin-left: var(--sidebar-width);
    padding: 30px;
}

/* Custom Cards */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    border: none;
    box-shadow: var(--card-shadow);
    height: 100%;
}

.stat-card .label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.stat-card .value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2d3748;
    /* Dark gray */
    margin-bottom: 10px;
}

.stat-card .badge-custom {
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
}

/* Badges for cards */
.badge-green {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-yellow {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-blue {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-red {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Table Styles */
.table-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    margin-top: 30px;
}

.table thead th {
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 15px;
}

.table tbody td {
    padding: 15px;
    color: #2d3748;
    vertical-align: middle;
    font-size: 0.9rem;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-on-route {
    background-color: #fef3c7;
    color: #b45309;
}

.status-in-transit {
    background-color: #e0f2fe;
    color: #0369a1;
}

.btn-action-delete {
    background-color: #ef4444;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-action-delete:hover {
    background-color: #dc2626;
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar.show {
        transform: translateX(0);
    }
}

/* Create Shipment Modal Styles (Form Version) */
#createShipmentModal .modal-content {
    border-radius: 10px;
    border: none;
    overflow: hidden;
}

#createShipmentModal .modal-header {
    background-color: #6366f1;
    /* Indigo/Purple */
    color: white;
    border-bottom: none;
    padding: 15px 25px;
}

#createShipmentModal .modal-title {
    font-weight: 700;
    font-size: 1.1rem;
}

#createShipmentModal .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

#createShipmentModal .modal-body {
    padding: 30px;
    background-color: #ffffff;
}

#createShipmentModal .form-label {
    font-weight: 500;
    font-size: 0.95rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

#createShipmentModal .form-control,
#createShipmentModal .form-select {
    border-radius: 6px;
    border: 1px solid #d1d5db;
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    color: #111827;
}

#createShipmentModal .form-control:focus,
#createShipmentModal .form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#createShipmentModal .bg-light {
    background-color: #f9fafb !important;
    border: 1px solid #e5e7eb;
}

#createShipmentModal .border-top {
    border-top: 1px solid #e5e7eb !important;
}

/* Footer Buttons */
#createShipmentModal .btn-danger {
    background-color: #ef4444;
    border-color: #ef4444;
    font-weight: 500;
}

#createShipmentModal .btn-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
}

#createShipmentModal .btn-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
    font-weight: 500;
}

#createShipmentModal .btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* Add Staff Modal Styles (Reusing/Adapting) */
#addStaffModal .modal-content {
    border-radius: 10px;
    border: none;
    overflow: hidden;
}

#addStaffModal .modal-header {
    background-color: #6366f1;
    color: white;
    border-bottom: none;
    padding: 15px 25px;
}

#addStaffModal .modal-title {
    font-weight: 700;
    font-size: 1.1rem;
}

#addStaffModal .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

#addStaffModal .modal-body {
    padding: 30px;
    background-color: #ffffff;
}

#addStaffModal .form-label {
    font-weight: 500;
    font-size: 0.95rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

#addStaffModal .form-control,
#addStaffModal .form-select {
    border-radius: 6px;
    border: 1px solid #d1d5db;
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    color: #111827;
}

#addStaffModal .form-control:focus,
#addStaffModal .form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Custom Ellipse Radio Buttons */
.custom-radio-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #4b5563;
    user-select: none;
    gap: 8px;
}

.custom-radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    position: relative;
    transition: all 0.2s ease;
}

/* On hover */
.custom-radio-container:hover input~.checkmark {
    border-color: #6366f1;
}

/* Active State styling */
.custom-radio-container input:checked~.checkmark {
    border-color: #6366f1;
}

/* Create the inner dot/ellipse */
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6366f1;
}

/* Show the dot when checked */
.custom-radio-container input:checked~.checkmark:after {
    display: block;
}

/* Active specifically */
.active-mark {
    border-color: #6366f1;
    /* Default border for active if needed, but checked state handles it */
}

/* Inactive specifically */
.inactive-mark {
    border-color: #d1d5db;
}