/* Custom CSS for Courier Consignment System */

:root {
    --primary-color: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --secondary-color: #5f6368;
    --success-color: #34a853;
    --warning-color: #fbbc04;
    --danger-color: #ea4335;
    --info-color: #4285f4;
    --dark-color: #202124;
    --light-color: #f8f9fa;
    --border-color: #dadce0;
    --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-hover: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
}

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f5f5;
    color: var(--dark-color);
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

.card-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 24px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border-radius: 8px;
    font-weight: 500;
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 8px;
}

/* Tables */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--secondary-color);
    border-bottom: 2px solid #e9ecef;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* Status Badges */
.badge-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.85rem;
}

.badge-pending { background-color: #fef7e0; color: #b06000; }
.badge-picked { background-color: #e8f0fe; color: #1967d2; }
.badge-in_transit { background-color: #e6f4ea; color: #137333; }
.badge-out_for_delivery { background-color: #fce8e6; color: #c5221f; }
.badge-delivered { background-color: #ceead6; color: #137333; }
.badge-returned { background-color: #f1f3f4; color: #5f6368; }
.badge-cancelled { background-color: #fce8e6; color: #c5221f; }

/* Sidebar */
.sidebar {
    background-color: white;
    min-height: calc(100vh - 56px);
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
}

.sidebar .nav-link {
    color: var(--secondary-color);
    padding: 12px 20px;
    border-radius: 8px;
    margin: 4px 12px;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover, 
.sidebar .nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.sidebar .nav-link i {
    margin-right: 10px;
}

/* Page Header */
.page-header {
    background: white;
    padding: 20px 0;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.page-header h2 {
    font-weight: 700;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

/* Loader */
.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    padding-bottom: 30px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -26px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-item.active .timeline-dot {
    background: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-item:not(.active) .timeline-dot {
    background: #e9ecef;
    box-shadow: 0 0 0 2px #e9ecef;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 20px 24px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 16px 24px;
}

/* Dropdown */
.dropdown-menu {
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    border: none;
    padding: 8px;
}

.dropdown-item {
    padding: 10px 20px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Pagination */
.pagination {
    margin: 0;
}

.page-link {
    border-radius: 8px;
    margin: 0 2px;
    color: var(--primary-color);
}

.page-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* List Group */
.list-group-item {
    border: none;
    border-radius: 8px;
    margin-bottom: 4px;
}

.list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 100px 0;
    color: white;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

/* Service Card */
.service-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
}

/* Stat Box */
.stat-box {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: #666;
    font-size: 1rem;
}

/* Tracking Box */
.tracking-box {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .sidebar {
        display: none !important;
    }
    
    .navbar {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .sidebar {
        min-height: auto;
        box-shadow: none;
    }
    
    .stat-card, .stat-box {
        margin-bottom: 16px;
    }
}

/* RTL Support */
[dir="rtl"] .sidebar .nav-link i {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .timeline {
    padding-left: 0;
    padding-right: 30px;
}

[dir="rtl"] .timeline::before {
    left: auto;
    right: 7px;
}

[dir="rtl"] .timeline-dot {
    left: auto;
    right: -26px;
}

[dir="rtl"] .timeline-item .ms-2 {
    margin-left: 0;
    margin-right: 0.5rem;
}
