./* UPS Tracking System - Custom Styles */

:root {
    --primary-color: #351c15;
    --secondary-color: #ffb500;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --sidebar-width: 250px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f4f6f9;
}

/* Layout */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1030;
}

.main-header .navbar {
    background-color: var(--primary-color) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-size: 1.25rem;
}

.navbar-dark .navbar-brand {
    color: var(--secondary-color) !important;
}

/* Sidebar */
.main-sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: #fff;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    z-index: 1020;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav .nav-link {
    color: #6c757d;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.sidebar-nav .nav-link:hover {
    color: var(--primary-color);
    background-color: #f8f9fa;
}

.sidebar-nav .nav-link.active {
    color: var(--primary-color);
    background-color: rgba(53, 28, 21, 0.1);
    border-left: 3px solid var(--secondary-color);
}

.sidebar-nav .nav-link i {
    width: 20px;
    margin-right: 0.75rem;
    text-align: center;
}

.nav-header {
    padding: 0.5rem 1.25rem;
    margin-top: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #999;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: 56px;
    flex: 1;
    padding: 1.5rem;
    min-height: calc(100vh - 56px - 60px);
}

/* Footer */
.main-footer {
    margin-left: var(--sidebar-width);
    padding: 1rem 1.5rem;
    background-color: #fff;
    border-top: 1px solid #dee2e6;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    margin-bottom: 1.5rem;
}

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

/* Stats Cards */
.stat-card {
    border-left: 4px solid;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

.stat-card.primary { border-left-color: var(--primary-color); }
.stat-card.success { border-left-color: var(--success-color); }
.stat-card.warning { border-left-color: var(--warning-color); }
.stat-card.danger { border-left-color: var(--danger-color); }

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}

/* Tables */
.table {
    font-size: 0.875rem;
}

.table th {
    border-top: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* Badges */
.badge {
    padding: 0.375rem 0.75rem;
    font-weight: 500;
}

/* Buttons */
.btn {
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.25rem;
}

.btn-sm {
    font-size: 0.75rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 0;
    list-style: none;
}

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

.timeline > li {
    position: relative;
    margin-bottom: 20px;
}

.timeline > li:before,
.timeline > li:after {
    content: " ";
    display: table;
}

.timeline > li:after {
    clear: both;
}

.timeline > li > .timeline-item {
    margin-top: 0;
    background: #fff;
    color: #444;
    margin-left: 60px;
    padding: 10px 15px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 4px;
}

.timeline > li > .timeline-badge {
    color: #fff;
    width: 50px;
    height: 50px;
    line-height: 50px;
    font-size: 1.2em;
    text-align: center;
    position: absolute;
    top: 0;
    left: 7px;
    margin-left: 0;
    background-color: #999;
    z-index: 100;
    border-radius: 50%;
}

.timeline-badge.primary { background-color: var(--primary-color) !important; }
.timeline-badge.success { background-color: var(--success-color) !important; }
.timeline-badge.warning { background-color: var(--warning-color) !important; }
.timeline-badge.danger { background-color: var(--danger-color) !important; }
.timeline-badge.info { background-color: var(--info-color) !important; }

/* Search Form */
.search-form {
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
}

/* Loading Spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .main-sidebar.show {
        transform: translateX(0);
    }
    
    .main-content,
    .main-footer {
        margin-left: 0;
    }
}

/* Print Styles */
@media print {
    .main-header,
    .main-sidebar,
    .main-footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        page-break-inside: avoid;
    }
}

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

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

/* Tooltips */
.tooltip-inner {
    background-color: #333

}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Status Colors */
.status-delivered { color: var(--success-color); }
.status-active { color: var(--info-color); }
.status-delayed { color: var(--warning-color); }
.status-exception { color: var(--danger-color); }

/* Tracking Result */
.tracking-result {
    background: #fff;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
}

.tracking-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
}

/* Copy Button */
.copy-btn {
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.copy-btn:hover {
    background-color: var(--light-color);
}