* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f6fa;
    color: #2d3436;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .logo {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

.navbar .logo span {
    color: #f39c12;
}

.navbar nav a {
    color: white;
    text-decoration: none;
    margin-left: 25px;
    transition: color 0.3s;
}

.navbar nav a:hover {
    color: #f39c12;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 80px 30px;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Tracking Box */
.track-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: -50px auto 50px;
    position: relative;
    z-index: 10;
}

.track-box h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.track-form {
    display: flex;
    gap: 10px;
}

.track-form input {
    flex: 1;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.track-form input:focus {
    border-color: #3498db;
    outline: none;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #219a52;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

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

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #d68910;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 20px;
}

.card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 2px solid #f5f6fa;
    padding-bottom: 10px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3498db;
    outline: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background: #2c3e50;
    color: white;
}

table tr:hover {
    background: #f8f9fa;
}

/* Status Badges */
.status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending { background: #ffeaa7; color: #d68910; }
.status-picked_up { background: #81ecec; color: #00838f; }
.status-in_transit { background: #74b9ff; color: #0066cc; }
.status-out_for_delivery { background: #a29bfe; color: #5f27cd; }
.status-delivered { background: #55efc4; color: #00875a; }
.status-cancelled { background: #fab1a0; color: #d63031; }

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card .number {
    font-size: 36px;
    font-weight: bold;
    color: #3498db;
}

.stat-card .label {
    color: #7f8c8d;
    margin-top: 5px;
}

.stat-card.success .number { color: #27ae60; }
.stat-card.warning .number { color: #f39c12; }
.stat-card.danger .number { color: #e74c3c; }

/* Tracking Result */
.tracking-result {
    max-width: 800px;
    margin: 30px auto;
}

.tracking-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.tracking-timeline {
    position: relative;
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    padding-bottom: 25px;
    border-left: 2px solid #ddd;
    padding-left: 25px;
}

.timeline-item:last-child {
    border-left: 2px solid transparent;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3498db;
    border: 2px solid white;
    box-shadow: 0 0 0 3px #3498db;
}

.timeline-item.completed::before {
    background: #27ae60;
    box-shadow: 0 0 0 3px #27ae60;
}

.timeline-item .date {
    font-size: 12px;
    color: #7f8c8d;
}

.timeline-item .status-text {
    font-weight: 600;
    color: #2c3e50;
}

.timeline-item .location {
    font-size: 14px;
    color: #636e72;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c3e50, #3498db);
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.auth-box h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

.auth-box .logo-text {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

.auth-box .logo-text span {
    color: #f39c12;
}

/* Sidebar for Admin */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar .logo {
    text-align: center;
    padding: 20px;
    font-size: 24px;
    font-weight: bold;
    border-bottom: 1px solid #34495e;
}

.sidebar .logo span {
    color: #f39c12;
}

.sidebar nav {
    margin-top: 20px;
}

.sidebar nav a {
    display: block;
    padding: 15px 25px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #34495e;
    color: white;
    border-left: 4px solid #3498db;
}

.admin-content {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-header h1 {
    color: #2c3e50;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .track-form {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .tracking-info {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .admin-content {
        margin-left: 0;
    }
    
    .admin-wrapper {
        flex-direction: column;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
}

.modal-close:hover {
    color: #2c3e50;
}

/* Actions */
.actions {
    display: flex;
    gap: 10px;
}

.actions .btn {
    padding: 8px 15px;
    font-size: 14px;
}
