/* =====================================================
   TRACKING infinit8 - Estilos principales
   ===================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo svg {
    color: white;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

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

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 0;
    color: white;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

/* Tracking Form */
.tracking-form {
    max-width: 600px;
    margin: 0 auto;
}

.input-group {
    display: flex;
    gap: 12px;
    background: white;
    padding: 8px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.input-group input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    font-size: 1.1rem;
    background: transparent;
    outline: none;
}

.input-group input::placeholder {
    color: var(--gray-400);
}

.input-group .btn {
    padding: 16px 32px;
}

/* Result Card */
.tracking-result {
    margin-top: 40px;
}

.result-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}

.tracking-info .label {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.tracking-info .code {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    font-family: monospace;
}

/* Status Badge */
.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-picked_up { background: #dbeafe; color: #1e40af; }
.status-in_transit { background: #e0e7ff; color: #3730a3; }
.status-out_for_delivery { background: #fce7f3; color: #9d174d; }
.status-delivered { background: #d1fae5; color: #065f46; }
.status-returned { background: #fee2e2; color: #991b1b; }
.status-cancelled { background: #f3f4f6; color: #374151; }

/* Shipment Details */
.shipment-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.detail-item .label {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.detail-item .value {
    font-weight: 500;
    color: var(--dark);
}

/* Timeline */
.timeline-section {
    padding: 24px;
}

.timeline-section h3 {
    font-size: 1.125rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    padding-bottom: 24px;
}

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

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-300);
    border: 2px solid white;
}

.timeline-item.active::before {
    background: var(--success);
}

.timeline-item .time {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.timeline-item .status {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
}

.timeline-item .location {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.timeline-item .notes {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-style: italic;
    margin-top: 4px;
}

/* Error Card */
.tracking-error {
    margin-top: 40px;
}

.error-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 48px;
    text-align: center;
}

.error-card svg {
    color: var(--danger);
    margin-bottom: 16px;
}

.error-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.error-card p {
    color: var(--gray-500);
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

/* Utilities */
.hidden {
    display: none !important;
}

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

    .hero p {
        font-size: 1rem;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group .btn {
        width: 100%;
        justify-content: center;
    }

    .result-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .shipment-details {
        grid-template-columns: 1fr;
    }
}
