/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --ml-yellow: #FFE600;
    --ml-blue: #2D3277;
    --ml-blue-dark: #1f2352;
    --ml-blue-light: #3d4489;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.25rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 1.5rem 1rem;
    }
    
    .pedido-header h2 {
        font-size: 1.25rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr !important;
    }
    
    .timeline-dot {
        width: 36px;
        height: 36px;
    }
    
    .timeline-item {
        gap: 0.75rem;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--ml-yellow);
    border-bottom: 3px solid var(--ml-blue);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    color: var(--ml-blue);
    width: 48px;
    height: 48px;
}

.header h1 {
    color: var(--ml-blue);
    font-size: 1.875rem;
    font-weight: 700;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 3rem 1rem;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ml-blue);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
}

/* Search Card */
.search-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    border: 2px solid var(--ml-yellow);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ml-blue);
    margin-bottom: 0.5rem;
}

.card-description {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--ml-blue);
    box-shadow: 0 0 0 3px rgba(45, 50, 119, 0.1);
}

.search-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--ml-blue);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.search-button:hover {
    background: var(--ml-blue-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.search-button svg {
    width: 20px;
    height: 20px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-icon.blue {
    background: rgba(45, 50, 119, 0.1);
    color: var(--ml-blue);
}

.feature-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.feature-icon.purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.feature-description {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Footer */
.footer {
    background: var(--white);
    border-top: 2px solid var(--ml-yellow);
    padding: 1.5rem;
    text-align: center;
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .search-form {
        flex-direction: column;
    }

    .search-button {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Detalhes do Pedido */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--white);
    color: var(--ml-blue);
    border: 2px solid var(--ml-blue);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    margin-bottom: 1.5rem;
}

.back-button:hover {
    background: var(--ml-blue);
    color: var(--white);
}

.pedido-header {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    border-left: 4px solid var(--ml-yellow);
}

.pedido-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pedido-info h2 {
    color: var(--ml-blue);
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.pedido-date {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.status-badge.preparando {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.en-transito {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.entregado {
    background: #d1fae5;
    color: #065f46;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.detail-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ml-blue);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--ml-yellow);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.product-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ml-blue);
}

.info-row {
    margin-bottom: 1rem;
}

.info-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.info-value {
    font-weight: 600;
    color: var(--gray-900);
}

/* Timeline */
.timeline {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.timeline h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ml-blue);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--ml-yellow);
}

.timeline-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

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

.timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.timeline-dot.active {
    background: linear-gradient(135deg, #00A650 0%, #00D166 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 166, 80, 0.3);
}

.timeline-dot.inactive {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    color: var(--gray-600);
}

.timeline-line {
    width: 3px;
    flex: 1;
    background: linear-gradient(180deg, var(--gray-300) 0%, var(--gray-200) 100%);
    margin: 0.5rem 0;
    border-radius: 2px;
}

.timeline-content {
    flex: 1;
    padding-bottom: 1rem;
}

.timeline-estado {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.timeline-fecha {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.timeline-descripcion {
    font-size: 0.875rem;
    color: var(--gray-700);
}

/* Not Found */
.not-found-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.not-found-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    text-align: center;
}

.not-found-card h2 {
    color: var(--ml-blue);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.not-found-card p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--ml-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
