:root {
    --primary: #0f172a;
    --secondary: #334155;
    --accent: #3b82f6;
    --success: #10b981;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }

/* Navbar Compacta */
header { background: white; border-bottom: 1px solid var(--border); padding: 15px 0; position: sticky; top: 0; z-index: 100; }
.container { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.navbar { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 800; font-size: 1.2rem; color: var(--primary); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.back-link { font-size: 0.9rem; color: var(--accent); text-decoration: none; font-weight: 600; }

/* Hero Section (Busca) */
.hero { padding: 60px 0; text-align: center; background: white; margin-bottom: 30px; border-bottom: 1px solid var(--border); }
.hero h1 { font-size: 1.8rem; margin-bottom: 10px; color: var(--primary); }
.hero p { color: var(--text-light); margin-bottom: 30px; }

.search-box { max-width: 500px; margin: 0 auto; position: relative; }
.search-box input { width: 100%; padding: 15px 20px; padding-right: 60px; border: 2px solid var(--border); border-radius: 50px; font-size: 1rem; outline: none; transition: all 0.3s; }
.search-box input:focus { border-color: var(--accent); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1); }
.search-box button { position: absolute; right: 5px; top: 5px; bottom: 5px; background: var(--primary); color: white; border: none; border-radius: 50px; width: 50px; cursor: pointer; transition: background 0.2s; }
.search-box button:hover { background: var(--accent); }

/* Tracking Result Container */
.tracking-container { padding: 20px 0 60px; animation: fadeIn 0.5s ease; flex: 1; }

/* STEPPER (Barra de Progresso) */
.stepper-wrapper { margin-bottom: 30px; background: white; padding: 25px 20px; border-radius: 16px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); border: 1px solid var(--border); }
.stepper { display: flex; justify-content: space-between; position: relative; }
.stepper::before { content: ''; position: absolute; top: 15px; left: 0; right: 0; height: 3px; background: #e2e8f0; z-index: 0; transform: translateY(-50%); margin: 0 30px; }

.step { position: relative; z-index: 1; text-align: center; flex: 1; display: flex; flex-direction: column; align-items: center; }
.step-icon { width: 32px; height: 32px; background: white; border: 3px solid #cbd5e1; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #cbd5e1; font-size: 0.8rem; transition: all 0.3s; margin-bottom: 8px; }
.step-label { font-size: 0.75rem; font-weight: 600; color: var(--text-light); transition: all 0.3s; }

/* Active State */
.step.active .step-icon { background: var(--success); border-color: var(--success); color: white; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2); }
.step.active .step-label { color: var(--primary); }
.step.completed .step-icon { background: var(--success); border-color: var(--success); color: white; }

/* Progress Line Fill */
.progress-line-fill { position: absolute; top: 15px; left: 30px; height: 3px; background: var(--success); z-index: 0; transform: translateY(-50%); transition: width 1s ease; width: 0%; }

/* Info Card */
.card { background: white; border-radius: 16px; padding: 25px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); border: 1px solid var(--border); margin-bottom: 30px; }
.tracking-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.tracking-code { font-size: 1.5rem; font-weight: 800; color: var(--primary); letter-spacing: 1px; }
.status-badge { background: var(--bg); color: var(--primary); padding: 6px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px; }
.info-item label { display: block; font-size: 0.75rem; text-transform: uppercase; color: var(--text-light); font-weight: 600; margin-bottom: 4px; }
.info-item span { font-size: 0.95rem; font-weight: 500; color: var(--text); }

/* Timeline Modern */
.timeline { position: relative; padding-left: 30px; margin-top: 20px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 10px; bottom: 0; width: 2px; background: #e2e8f0; border-radius: 2px; }

.timeline-item { position: relative; margin-bottom: 35px; opacity: 0.5; transition: all 0.3s; }
.timeline-item.active { opacity: 1; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot { position: absolute; left: -30px; top: 0; width: 16px; height: 16px; background: white; border: 3px solid #cbd5e1; border-radius: 50%; z-index: 2; transition: all 0.3s; }
.timeline-item.active .timeline-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2); }
.timeline-item.latest .timeline-dot { border-color: var(--success); background: var(--success); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2); animation: pulse 2s infinite; }

.timeline-content { background: white; padding: 15px 20px; border-radius: 12px; border: 1px solid var(--border); position: relative; top: -5px; }
.timeline-item.latest .timeline-content { border-color: var(--success); background: #f0fdf4; }

.timeline-date { font-size: 0.8rem; color: var(--text-light); margin-bottom: 5px; display: flex; align-items: center; gap: 5px; }
.timeline-status { font-weight: 700; color: var(--primary); font-size: 1rem; margin-bottom: 3px; }
.timeline-location { font-size: 0.85rem; color: var(--secondary); font-weight: 500; }
.timeline-detail { font-size: 0.85rem; color: var(--text-light); margin-top: 5px; line-height: 1.4; }

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Footer */
footer { text-align: center; padding: 40px 0; color: var(--text-light); font-size: 0.9rem; border-top: 1px solid var(--border); margin-top: auto; }

/* Mobile Tweaks */
@media (max-width: 600px) {
    .stepper-wrapper { padding: 20px 10px; }
    .step-label { font-size: 0.65rem; }
    .tracking-header { flex-direction: column; gap: 10px; }
    .timeline-content { padding: 12px; }
}

/* Features Grid (Index) */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-top: 50px; }
.feature-card { background: white; padding: 30px; border-radius: 16px; text-align: center; border: 1px solid var(--border); transition: transform 0.3s; }
.feature-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.feature-card i { font-size: 2.5rem; color: var(--accent); margin-bottom: 20px; }
.feature-card h3 { margin-bottom: 10px; color: var(--primary); }
.feature-card p { color: var(--text-light); font-size: 0.9rem; }

/* Button */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--primary); color: white; padding: 12px 24px; border-radius: 50px; text-decoration: none; font-weight: 600; transition: background 0.2s; border: none; cursor: pointer; }
.btn:hover { background: var(--secondary); }