:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #eef2ff;
    --accent: #4cc9f0;
    --bg-light: #f8fafc;
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.public-navbar {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 0;
}

.public-navbar .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #1f2937;
    font-weight: 700;
    font-size: 1.15rem;
}

.public-navbar .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.public-navbar .nav-title {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 400;
}

/* Main content */
.public-main {
    flex: 1;
    padding: 2rem 0;
}

/* Cards */
.public-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
    background: white;
}

/* Footer */
.public-footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem 0;
    text-align: center;
    color: #9ca3af;
    font-size: 0.8rem;
}

/* Status badges */
.tracking-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
}

.tracking-status.status-created { background: #e0f2fe; color: #0369a1; }
.tracking-status.status-collected { background: #f0fdf4; color: #15803d; }
.tracking-status.status-in_warehouse { background: #fefce8; color: #a16207; }
.tracking-status.status-in_transit { background: #eff6ff; color: #1d4ed8; }
.tracking-status.status-out_for_delivery { background: #faf5ff; color: #7e22ce; }
.tracking-status.status-delivered { background: #dcfce7; color: #166534; }
.tracking-status.status-failed_delivery { background: #fef2f2; color: #991b1b; }
.tracking-status.status-returned { background: #fff1f2; color: #9f1239; }
.tracking-status.status-cancelled { background: #f1f5f9; color: #475569; }

/* Timeline */
.tracking-timeline {
    position: relative;
    padding-left: 2rem;
}

.tracking-timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    padding-left: 1.5rem;
}

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

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    z-index: 1;
}

.timeline-dot.completed {
    background: var(--primary);
    color: white;
    border: 3px solid var(--primary-light);
}

.timeline-dot.active {
    background: #22c55e;
    color: white;
    border: 3px solid #dcfce7;
    animation: pulse 2s infinite;
}

.timeline-dot.future {
    background: white;
    border: 2px solid #d1d5db;
    color: #d1d5db;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

.timeline-content h6 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.15rem;
}

.timeline-content p {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.1rem;
}

.timeline-content .timeline-meta {
    font-size: 0.75rem;
    color: #9ca3af;
}

.timeline-item.future .timeline-content h6 {
    color: #9ca3af;
}

/* Search */
.search-input {
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    padding: 0.85rem 1.25rem;
    font-size: 1.1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
}

.btn-search {
    background: var(--primary);
    border: none;
    border-radius: 12px;
    padding: 0.85rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    transition: background 0.2s, transform 0.1s;
}

.btn-search:hover {
    background: var(--primary-dark);
    color: white;
}

.btn-search:active {
    transform: scale(0.98);
}
