/* ============================================
   RTE RODONAVES - Sistema de Rastreamento
   Design System Premium
   ============================================ */

/* CSS Reset & Custom Properties */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --brand-primary: #1e3a8a;
    --brand-secondary: #2563eb;
    --brand-accent: #f97316;
    
    /* Primary Scale */
    --primary-950: #0a1628;
    --primary-900: #0f1f3d;
    --primary-800: #1e3a5f;
    --primary-700: #1e4a8a;
    --primary-600: #2563eb;
    --primary-500: #3b82f6;
    --primary-400: #60a5fa;
    --primary-300: #93c5fd;
    --primary-200: #bfdbfe;
    --primary-100: #dbeafe;
    --primary-50: #eff6ff;

    /* Accent Scale */
    --accent-700: #c2410c;
    --accent-600: #ea580c;
    --accent-500: #f97316;
    --accent-400: #fb923c;
    --accent-300: #fdba74;
    --accent-200: #fed7aa;
    --accent-100: #ffedd5;
    --accent-50: #fff7ed;

    /* Neutral Scale */
    --neutral-950: #030712;
    --neutral-900: #111827;
    --neutral-800: #1f2937;
    --neutral-700: #374151;
    --neutral-600: #4b5563;
    --neutral-500: #6b7280;
    --neutral-400: #9ca3af;
    --neutral-300: #d1d5db;
    --neutral-200: #e5e7eb;
    --neutral-100: #f3f4f6;
    --neutral-50: #f9fafb;
    --white: #ffffff;

    /* Semantic Colors */
    --success-600: #059669;
    --success-500: #10b981;
    --success-400: #34d399;
    --success-100: #d1fae5;
    --success-50: #ecfdf5;

    --warning-600: #d97706;
    --warning-500: #f59e0b;
    --warning-100: #fef3c7;

    --error-600: #dc2626;
    --error-500: #ef4444;
    --error-100: #fee2e2;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.15);
    --shadow-glow-accent: 0 0 40px rgba(249, 115, 22, 0.15);

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration-fast: 150ms;
    --duration-base: 250ms;
    --duration-slow: 400ms;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--primary-950);
    color: var(--neutral-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Preloader */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--primary-950);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    margin-bottom: var(--space-6);
}

.preloader-rte {
    display: block;
    font-size: 48px;
    font-weight: 900;
    color: var(--white);
    letter-spacing: -2px;
}

.preloader-rodonaves {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-500);
    letter-spacing: 8px;
    margin-top: var(--space-1);
}

.preloader-bar {
    width: 200px;
    height: 3px;
    background: var(--primary-800);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.preloader-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
    border-radius: var(--radius-full);
    animation: preloaderProgress 1.5s ease-in-out forwards;
}

@keyframes preloaderProgress {
    0% { width: 0; }
    100% { width: 100%; }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: var(--space-6);
    right: var(--space-6);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.toast {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    animation: toastSlideIn 0.4s var(--ease-out);
    max-width: 360px;
}

.toast.toast-exit {
    animation: toastSlideOut 0.3s var(--ease-in-out) forwards;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast.success .toast-icon { background: var(--success-100); color: var(--success-600); }
.toast.error .toast-icon { background: var(--error-100); color: var(--error-600); }
.toast.info .toast-icon { background: var(--primary-100); color: var(--primary-600); }

.toast-message {
    font-size: 14px;
    font-weight: 500;
    color: var(--neutral-700);
}

/* Background Effects */
.bg-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        var(--primary-950) 0%, 
        var(--primary-900) 25%,
        var(--brand-primary) 50%,
        var(--primary-900) 75%,
        var(--primary-950) 100%
    );
}

.bg-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: glowFloat 20s ease-in-out infinite;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.3) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.2) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation-delay: -7s;
}

.glow-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    top: 40%;
    left: 30%;
    animation-delay: -14s;
}

@keyframes glowFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -30px) scale(1.1); }
    50% { transform: translate(-30px, 50px) scale(0.9); }
    75% { transform: translate(-50px, -20px) scale(1.05); }
}

/* App Wrapper */
.app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 31, 61, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-logo {
    height: 40px;
    width: auto;
}

.navbar-logo-fallback {
    display: flex;
    align-items: baseline;
    gap: var(--space-2);
}

.brand-rte {
    font-size: 24px;
    font-weight: 900;
    color: var(--white);
    letter-spacing: -1px;
}

.brand-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-500);
    letter-spacing: 3px;
}

.navbar-info {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.navbar-badge {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--success-400);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--success-500);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.navbar-badge.offline {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--error-500);
}

.navbar-badge.offline .badge-dot {
    background: var(--error-500);
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Hero Section */
.hero {
    padding: var(--space-16) var(--space-6) var(--space-12);
}

/* Status Banner */
.status-banner {
    max-width: 1200px;
    margin: var(--space-4) auto 0;
    padding: 0 var(--space-6);
}

.status-banner-content {
    background: var(--error-100);
    border: 1px solid var(--error-500);
    border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    box-shadow: var(--shadow-sm);
}

.status-banner-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--error-500);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.status-banner-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    color: var(--neutral-800);
    font-size: 13px;
}

.status-banner-text strong {
    font-size: 14px;
}

.status-banner-action {
    margin-left: auto;
    background: var(--error-500);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-4);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.status-banner-action:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-12);
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-300);
    margin-bottom: var(--space-6);
}

.hero-badge svg {
    color: var(--success-400);
}

.hero-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: var(--space-5);
    letter-spacing: -1px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-400), var(--accent-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 17px;
    color: var(--neutral-400);
    line-height: 1.7;
    max-width: 520px;
}

.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-card {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-2xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    animation: heroCardFloat 6s ease-in-out infinite;
}

@keyframes heroCardFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

.hero-card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: 0 10px 30px -10px rgba(37, 99, 235, 0.5);
}

.hero-card-lines {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    width: 100px;
}

.hero-card-lines span {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}

.hero-card-lines span:nth-child(1) { width: 100%; }
.hero-card-lines span:nth-child(2) { width: 70%; }
.hero-card-lines span:nth-child(3) { width: 85%; }

/* Main Content */
.main-content {
    flex: 1;
    padding: 0 var(--space-6) var(--space-12);
}

/* Search Section */
.search-section {
    animation: fadeInUp 0.6s var(--ease-out);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.search-wrapper {
    max-width: 560px;
    margin: 0 auto;
}

.search-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    padding: var(--space-10);
    box-shadow: var(--shadow-2xl), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.search-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-600), var(--accent-500));
}

.search-card-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-5);
    margin-bottom: var(--space-8);
}

.search-icon-wrapper {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.search-icon-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
    border-radius: var(--radius-lg);
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.search-icon {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    padding: var(--space-4);
    color: var(--primary-600);
}

.search-header-text h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: var(--space-1);
}

.search-header-text p {
    font-size: 14px;
    color: var(--neutral-500);
}

/* Form Styles */
.search-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 13px;
    font-weight: 600;
    color: var(--neutral-700);
}

.form-label svg {
    color: var(--neutral-400);
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: var(--space-5);
    padding-right: var(--space-12);
    font-size: 18px;
    font-family: var(--font-sans);
    font-weight: 500;
    color: var(--neutral-900);
    background: var(--neutral-50);
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-lg);
    transition: all var(--duration-base) var(--ease-out);
    letter-spacing: 1px;
}

.form-input::placeholder {
    color: var(--neutral-400);
    font-weight: 400;
}

.form-input:hover {
    border-color: var(--neutral-300);
    background: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    background: var(--white);
    box-shadow: 0 0 0 4px var(--primary-100);
}

.input-icon {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--neutral-400);
    pointer-events: none;
    transition: color var(--duration-fast);
}

.form-input:focus ~ .input-icon {
    color: var(--primary-500);
}

.input-focus-ring {
    position: absolute;
    inset: -4px;
    border-radius: calc(var(--radius-lg) + 4px);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--duration-base);
}

.form-input:focus ~ .input-focus-ring {
    opacity: 1;
}

.form-hint {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 12px;
    color: var(--neutral-400);
    padding-left: var(--space-1);
}

/* Submit Button */
.btn-submit {
    position: relative;
    padding: var(--space-5) var(--space-8);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-sans);
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-700), var(--primary-600));
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    overflow: hidden;
    transition: all var(--duration-base) var(--ease-out);
    box-shadow: 0 4px 20px -4px rgba(37, 99, 235, 0.5);
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.7s ease;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px -4px rgba(37, 99, 235, 0.6);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    cursor: not-allowed;
    transform: none;
}

.btn-content,
.btn-loading,
.btn-success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.btn-loading,
.btn-success {
    display: none;
}

.btn-submit.loading .btn-content { display: none; }
.btn-submit.loading .btn-loading { display: flex; }
.btn-submit.success .btn-content { display: none; }
.btn-submit.success .btn-success { display: flex; }
.btn-submit.success { background: linear-gradient(135deg, var(--success-600), var(--success-500)); }

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Search Footer */
.search-footer {
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--neutral-100);
    display: flex;
    justify-content: center;
}

.security-info {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 12px;
    font-weight: 500;
    color: var(--neutral-500);
    padding: var(--space-2) var(--space-4);
    background: var(--neutral-50);
    border-radius: var(--radius-full);
}

.security-info svg {
    color: var(--success-500);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    box-shadow: var(--shadow-lg);
    transition: all var(--duration-base) var(--ease-out);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-600);
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--neutral-900);
}

.stat-label {
    font-size: 12px;
    color: var(--neutral-500);
    font-weight: 500;
}

/* Result Section */
.result-section {
    animation: fadeInUp 0.6s var(--ease-out);
}

.result-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-out);
    margin-bottom: var(--space-6);
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(-4px);
}

.result-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    padding: var(--space-10);
    box-shadow: var(--shadow-2xl), var(--shadow-glow);
}

/* Result Header */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-5);
    margin-bottom: var(--space-8);
    flex-wrap: wrap;
}

.result-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.package-icon-wrapper {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: 0 8px 24px -6px rgba(37, 99, 235, 0.5);
}

.result-header-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.result-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-tracking {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--primary-600);
    background: var(--primary-50);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
}

.status-badge-wrapper {
    flex-shrink: 0;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.status-badge.pendente {
    background: var(--warning-100);
    color: var(--warning-600);
}
.status-badge.pendente .status-dot { background: var(--warning-500); }

.status-badge.em-transito {
    background: var(--primary-100);
    color: var(--primary-700);
}
.status-badge.em-transito .status-dot { background: var(--primary-500); }

.status-badge.entregue {
    background: var(--success-100);
    color: var(--success-600);
}
.status-badge.entregue .status-dot { background: var(--success-500); }

/* Section Title */
.section-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 15px;
    font-weight: 700;
    color: var(--neutral-800);
    margin-bottom: var(--space-5);
}

.section-title svg {
    color: var(--primary-500);
}

/* Progress Timeline */
.progress-section {
    margin-bottom: var(--space-10);
    padding: var(--space-6);
    background: var(--neutral-50);
    border-radius: var(--radius-xl);
}

.timeline {
    position: relative;
    padding-top: var(--space-4);
}

.timeline-track {
    position: absolute;
    top: 36px;
    left: 28px;
    right: 28px;
    height: 4px;
    background: var(--neutral-200);
    border-radius: var(--radius-full);
}

.timeline-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
    border-radius: var(--radius-full);
    transition: width 0.8s var(--ease-out);
    width: 0%;
}

.timeline-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.step-marker {
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 3px solid var(--neutral-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-400);
    margin-bottom: var(--space-3);
    transition: all var(--duration-slow) var(--ease-out);
    position: relative;
    z-index: 1;
}

.timeline-step.completed .step-marker {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    border-color: var(--primary-500);
    color: var(--white);
}

.timeline-step.active .step-marker {
    background: linear-gradient(135deg, var(--accent-500), var(--accent-400));
    border-color: var(--accent-500);
    color: var(--white);
    animation: activeStep 2s ease-in-out infinite;
}

@keyframes activeStep {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(249, 115, 22, 0); }
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.step-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--neutral-400);
    transition: color var(--duration-base);
}

.timeline-step.completed .step-title,
.timeline-step.active .step-title {
    color: var(--neutral-800);
}

.step-desc {
    font-size: 11px;
    color: var(--neutral-400);
}

/* Info Cards */
.delivery-section {
    margin-bottom: var(--space-10);
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

.info-card {
    background: var(--neutral-50);
    border: 1px solid var(--neutral-100);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    display: flex;
    gap: var(--space-4);
    transition: all var(--duration-base) var(--ease-out);
}

.info-card:hover {
    border-color: var(--neutral-200);
    box-shadow: var(--shadow-sm);
}

.info-card.wide {
    grid-column: span 2;
}

.info-card.highlight {
    background: linear-gradient(135deg, var(--accent-50), var(--accent-100));
    border-color: var(--accent-200);
}

.info-card-icon {
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-500);
    flex-shrink: 0;
    box-shadow: var(--shadow-xs);
}

.info-card.highlight .info-card-icon {
    background: var(--white);
    color: var(--accent-600);
}

.info-card-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    min-width: 0;
}

.info-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--neutral-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--neutral-800);
    word-break: break-word;
}

.info-value.date {
    font-size: 17px;
    font-weight: 700;
    color: var(--accent-600);
}

/* QR Section */
.qr-section {
    background: linear-gradient(135deg, var(--neutral-50), var(--white));
    border: 2px dashed var(--neutral-200);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
}

.qr-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.qr-header-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.qr-header-text h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: var(--space-1);
}

.qr-header-text p {
    font-size: 13px;
    color: var(--neutral-500);
}

.qr-content {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    justify-content: center;
    flex-wrap: wrap;
}

.qr-frame {
    position: relative;
    background: var(--white);
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.qr-corners span {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--primary-500);
    border-style: solid;
}

.qr-corners span:nth-child(1) { top: 8px; left: 8px; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.qr-corners span:nth-child(2) { top: 8px; right: 8px; border-width: 3px 3px 0 0; border-radius: 0 4px 0 0; }
.qr-corners span:nth-child(3) { bottom: 8px; left: 8px; border-width: 0 0 3px 3px; border-radius: 0 0 0 4px; }
.qr-corners span:nth-child(4) { bottom: 8px; right: 8px; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }

.qr-frame img {
    display: block;
    width: 180px;
    height: 180px;
}

.qr-placeholder {
    width: 180px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    color: var(--neutral-400);
    font-size: 13px;
}

.qr-loader {
    width: 32px;
    height: 32px;
    border: 3px solid var(--neutral-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.qr-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.btn-qr-action {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-sans);
    color: var(--neutral-700);
    background: var(--white);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.btn-qr-action:hover {
    border-color: var(--primary-300);
    color: var(--primary-600);
    background: var(--primary-50);
}

.qr-instructions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--neutral-100);
}

.instruction {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.instruction-num {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.instruction-text {
    font-size: 13px;
    color: var(--neutral-600);
}

/* Error Section */
.error-section {
    animation: fadeInUp 0.6s var(--ease-out);
}

.error-card {
    max-width: 480px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-2xl);
    padding: var(--space-12) var(--space-10);
    box-shadow: var(--shadow-2xl);
    text-align: center;
}

.error-illustration {
    width: 100px;
    height: 100px;
    background: var(--error-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-6);
    color: var(--error-500);
}

.error-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: var(--space-3);
}

.error-message {
    font-size: 15px;
    color: var(--neutral-500);
    margin-bottom: var(--space-8);
    line-height: 1.6;
}

.btn-retry {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-sans);
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-700), var(--primary-600));
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-out);
}

.btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -4px rgba(37, 99, 235, 0.4);
}

/* Footer */
.footer {
    margin-top: auto;
    padding: var(--space-8) var(--space-6);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.8) 100%);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: var(--space-8);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.footer-brand {
    text-align: center;
    margin-bottom: var(--space-6);
}

.footer-logo {
    display: inline-flex;
    align-items: baseline;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    padding: var(--space-3) var(--space-5);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.footer-rte {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-rodonaves {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-400);
    letter-spacing: 3px;
}

.footer-tagline {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.footer-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: var(--space-6) 0;
}

.footer-info {
    text-align: center;
}

.footer-info p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.footer-legal {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: var(--space-2);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-subtitle {
        max-width: 100%;
    }

    .hero-visual {
        display: none;
    }

    .search-card,
    .result-card {
        padding: var(--space-6);
    }

    .search-card-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .info-card.wide {
        grid-column: span 1;
    }

    .timeline-track {
        display: none;
    }

    .timeline-steps {
        flex-direction: column;
        gap: var(--space-4);
    }

    .timeline-step {
        flex-direction: row;
        text-align: left;
        gap: var(--space-4);
    }

    .step-marker {
        margin-bottom: 0;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .qr-content {
        flex-direction: column;
    }

    .qr-actions {
        flex-direction: row;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-divider {
        width: 60px;
        height: 1px;
    }

    .footer-info {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: var(--space-10) var(--space-4) var(--space-8);
    }

    .main-content {
        padding: 0 var(--space-4) var(--space-8);
    }

    .navbar-container {
        padding: var(--space-3) var(--space-4);
    }

    .hero-title {
        font-size: 28px;
    }

    .form-input {
        font-size: 16px;
        padding: var(--space-4);
    }
}


/* ========================================
   APP DOWNLOAD SECTION
   ======================================== */

.app-download-section {
    text-align: center;
    padding: var(--space-6) 0;
    margin: var(--space-4) 0;
}

.app-download-title {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-2);
    letter-spacing: -0.5px;
}

.app-download-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: var(--space-6);
    font-weight: 500;
}

.app-download-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.app-store-btn,
.google-play-btn {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-store-btn {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(26, 26, 26, 0.8) 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.google-play-btn {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.9) 0%, rgba(21, 87, 176, 0.9) 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(26, 115, 232, 0.4);
}

.app-store-btn::before,
.google-play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.app-store-btn:hover::before,
.google-play-btn:hover::before {
    left: 100%;
}

.app-store-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.google-play-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(26, 115, 232, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
}

.app-store-btn:active,
.google-play-btn:active {
    transform: translateY(-2px);
}

.app-store-btn svg,
.google-play-btn svg {
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.app-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.app-btn-label {
    font-size: 11px;
    opacity: 0.9;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.app-btn-store {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Responsive */
@media (max-width: 640px) {
    .app-download-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .app-store-btn,
    .google-play-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .app-download-title {
        font-size: 20px;
    }
    
    .app-download-subtitle {
        font-size: 14px;
    }
    
    .footer-container {
        padding: var(--space-6);
    }
}

/* Animation on scroll */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-download-section {
    animation: slideUpFade 0.8s ease-out;
}
