/* ===================================
   GLOBAL STYLES & VARIABLES
   =================================== */
:root {
    --primary-color: #ff6600;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
}

.navbar {
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* ===================================
   HERO SECTION
   =================================== */
.hero-section {
    background: linear-gradient(135deg, #ff6600 0%, #ff8c00 100%);
    color: white;
    padding: 150px 0 80px;
    margin-top: 70px;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.85) 0%, rgba(255, 140, 0, 0.85) 100%);
    z-index: 1;
}

.hero-section h1 {
    animation: fadeInUp 1s ease;
}

.stat-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.tracking-card {
    background: white;
    color: #333;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.tracking-card h3 {
    color: var(--primary-color);
}

/* ===================================
   SERVICES SECTION
   =================================== */
.service-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.service-card.featured {
    border: 3px solid var(--primary-color);
}

.badge-featured {
    position: absolute;
    top: 15px;
    right: -30px;
    background: var(--warning-color);
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.75rem;
    font-weight: 600;
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card h4 {
    margin-bottom: 1rem;
}

.service-card ul li {
    padding: 0.5rem 0;
}

.price-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 1.5rem;
    display: inline-block;
    width: 100%;
    text-align: center;
}

/* ===================================
   TRACKING RESULTS
   =================================== */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary-color);
    z-index: 1;
}

.timeline-item.active::before {
    background: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2);
}

.timeline-content {
    background: var(--light-color);
    padding: 1rem;
    border-radius: 8px;
}

.timeline-date {
    font-size: 0.85rem;
    color: #666;
}

/* ===================================
   CONTACT CARDS
   =================================== */
.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ===================================
   FOOTER
   =================================== */
footer {
    margin-top: 3rem;
    background: #212529 !important;
}

footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color) !important;
    transform: translateX(5px);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: scale(1.1) translateY(-3px);
    color: white !important;
}

/* ===================================
   PWA INSTALL BUTTON
   =================================== */
.btn-install {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===================================
   DARK MODE
   =================================== */
body.dark-mode .card,
body.dark-mode .service-card,
body.dark-mode .tracking-card,
body.dark-mode .contact-card {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-mode .navbar {
    background: #1a1a1a !important;
}

body.dark-mode .bg-light {
    background: #2d2d2d !important;
}

body.dark-mode .timeline-content {
    background: #3a3a3a;
}

body.dark-mode .text-muted {
    color: #aaa !important;
}

/* ===================================
   ADMIN STYLES
   =================================== */
.admin-body {
    background: #f5f7fa;
}

/* Login Screen */
.login-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-menu {
    padding: 1rem 0;
    flex: 1 1 auto;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.menu-item.active {
    background: rgba(0, 123, 255, 0.2);
    border-left-color: var(--primary-color);
    color: white;
}

.menu-item i {
    margin-right: 1rem;
    width: 20px;
}

.sidebar-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
}

/* Main Content */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
}

.topbar {
    background: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.content-area {
    padding: 2rem;
}

/* Dashboard Cards */
.stat-card-admin {
    padding: 1.5rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.3;
}

.stat-info h3 {
    margin: 0;
    font-size: 2rem;
}

.stat-info p {
    margin: 0;
    font-size: 0.9rem;
}

/* Table Styles */
.table-responsive {
    border-radius: 10px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead {
    background: var(--primary-color);
    color: white;
}

.badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Courier Card */
.courier-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: var(--transition);
}

.courier-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.courier-avatar {
    font-size: 5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.courier-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.stat-item {
    text-align: center;
}

.stat-item strong {
    display: block;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.stat-item small {
    color: #666;
}

/* Waybill Print Styles */
.waybill {
    background: white;
    padding: 2rem;
    border: 2px solid #000;
}

.waybill-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #000;
}

.waybill-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #ddd;
}

.waybill-barcode {
    text-align: center;
    margin: 2rem 0;
}

@media print {
    body * {
        visibility: hidden;
    }
    
    #waybillContent,
    #waybillContent * {
        visibility: visible;
    }
    
    #waybillContent {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    .modal-header,
    .modal-footer {
        display: none !important;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.5s ease;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .hero-section {
        padding: 100px 0 60px;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 80px 0 40px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .service-card {
        margin-bottom: 1.5rem;
    }
    
    .btn-install {
        bottom: 20px;
        right: 20px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.cursor-pointer {
    cursor: pointer;
}

.card {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-radius: 15px;
    margin-bottom: 1.5rem;
}

.card-header {
    background: white;
    border-bottom: 1px solid #eee;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.btn {
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 0.7rem 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Alert Animations */
.alert {
    border-radius: 10px;
    border: none;
    animation: fadeInUp 0.5s ease;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
