:root {
    --primary: #e30613;
    --primary-dark: #c10510;
    --primary-light: #ff3b30;
    --secondary: #222222;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --accent: #f8f9fa;
    --light: #ffffff;
    --dark: #111111;
    --gray: #6c757d;
    --light-gray: #f1f1f1;
    --transition: all 0.3s ease;
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    --border: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--accent);
    color: var(--dark);
    min-height: 100vh;
    padding: 20px;  
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background-color: var(--light);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 20px 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dark);
}

.logo-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.logo-icon i {
    font-size: 24px;
    color: white;
}

.logo h1 {
    font-weight: 700;
    font-size: 1.8rem;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-controls {
    display: flex;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
}

.btn-success {
    background: linear-gradient(90deg, var(--success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

.btn-warning {
    background: linear-gradient(90deg, var(--warning) 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.25);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.dashboard {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 25px;
}

.sidebar {
    background: var(--light);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 25px;
    height: fit-content;
}

.sidebar h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-dark);
}

.search-box {
    position: relative;
    margin-bottom: 25px;
}

.search-box input {
    width: 100%;
    padding: 14px 20px;
    padding-left: 45px;
    border-radius: 12px;
    border: 2px solid var(--light-gray);
    background: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    color: var(--dark);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
    font-size: 1.2rem;
}

.filters {
    margin-bottom: 25px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.filter-option label {
    color: var(--gray);
    font-size: 0.95rem;
}

.date-filter {
    display: grid;
    gap: 10px;
}

.date-filter input {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--light-gray);
    font-family: 'Poppins', sans-serif;
}

.main-content {
    background: var(--light);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 30px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.content-header h2 {
    font-size: 1.8rem;
    color: var(--dark);
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.stat-card .icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.stat-card.processing .icon {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.stat-card.transit .icon {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary-dark);
}

.stat-card.out .icon {
    background: rgba(139, 92, 246, 0.15);
    color: #6d28d9;
}

.stat-card.delivered .icon {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card .label {
    color: var(--gray);
    font-size: 0.95rem;
}

.delivery-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.delivery-table thead {
    background: var(--primary);
    color: white;
}

.delivery-table th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 500;
}

.delivery-table tbody tr {
    transition: background 0.2s;
}

.delivery-table tbody tr:nth-child(even) {
    background: rgba(241, 245, 249, 0.5);
}

.delivery-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.05);
}

.delivery-table td {
    padding: 16px 20px;
    color: var(--dark);
    border-bottom: 1px solid var(--light-gray);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
}

.status-processing {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.status-intransit {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary-dark);
}

.status-out {
    background: rgba(139, 92, 246, 0.15);
    color: #6d28d9;
}

.status-delivered {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 35px;
    height: 35px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.action-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--light-gray);
    color: var(--gray);
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn:hover:not(.active) {
    background: var(--light-gray);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    padding: 30px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--dark);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-group input, 
.form-group select {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 2px solid var(--light-gray);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus, 
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.2);
    outline: none;
}

textarea {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 2px solid var(--light-gray);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 100px;
}

textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.2);
    outline: none;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1100;
    transform: translateX(150%);
    transition: transform 0.3s ease;
    background-color: white;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 5px solid var(--success);
}

.notification-error {
    border-left: 5px solid var(--danger);
}

.notification i {
    font-size: 1.2rem;
}

.notification-success i {
    color: var(--success);
}

.notification-error i {
    color: var(--danger);
}

.notification-content {
    font-weight: 500;
}

/* Admin login section */
#admin-login-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 30px;
    margin-top: 20px;
    display: none;
}

#admin-panel {
    display: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .delivery-table {
        display: block;
        overflow-x: auto;
    }
    
    .stats-cards {
        grid-template-columns: 1fr 1fr;
    }
    
    .header-controls {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .logo {
        justify-content: center;
    }
    
    .content-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .form-group input, 
    .form-group select,
    .form-group textarea {
        padding: 12px;
    }
}