/* public/css/style.css */
:root {
    --primary: #FFB300;
    --primary-dark: #E6A100;
    --dark: #1A1A1A;
    --light: #FFFFFF;
    --gray: #F5F5F5;
    --gray-dark: #666666;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
    color: var(--dark);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--light);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    min-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--dark) 0%, #333333 100%);
    color: var(--light);
    padding: 2.5rem 3rem;
    text-align: center;
    border-bottom: 4px solid var(--primary);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo i {
    font-size: 2.5rem;
    color: var(--primary);
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary), #FFD54F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Search Section */
.search-section {
    padding: 3rem;
    text-align: center;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-container h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.search-container p {
    color: var(--gray-dark);
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

input[type="text"] {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 179, 0, 0.1);
}

button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--dark);
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 179, 0, 0.2);
}

.examples {
    color: var(--gray-dark);
    font-size: 0.9rem;
}

/* Result Section */
.result-section {
    padding: 2rem 3rem;
    flex: 1;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.result-header h2 {
    font-size: 1.8rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-secondary {
    background: var(--gray);
    color: var(--dark);
}

.btn-secondary:hover {
    background: #E5E7EB;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.info-card {
    background: var(--gray);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.info-content h3 {
    font-size: 0.9rem;
    color: var(--gray-dark);
    margin-bottom: 0.25rem;
}

.info-content p {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
}

/* ========== ESTILOS GERAIS ========== */
.tracking-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px solid #E5E7EB;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #F3F4F6;
}

.card-header h3 {
    font-size: 1.5rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-delivered { background: #10B981; color: white; }
.status-cancelled { background: #EF4444; color: white; }
.status-transit { background: #3B82F6; color: white; }
.status-collected { background: #8B5CF6; color: white; }
.status-processing { background: #F59E0B; color: white; }

/* ========== INFO GRID ========== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.info-item {
    background: var(--gray);
    padding: 1.25rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 179, 0, 0.1);
}

.info-label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.info-label i {
    margin-right: 0.5rem;
    color: var(--primary);
}

.info-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    word-break: break-word;
}

/* ========== DELIVERY INFO ========== */
.delivery-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.delivery-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: #F0F9FF;
    border-radius: 10px;
    border: 1px solid #E0F2FE;
}

.delivery-item.delivered {
    background: #F0FDF4;
    border-color: #BBF7D0;
}

.delivery-item i {
    font-size: 1.5rem;
    color: var(--primary);
}

.delivery-item.delivered i {
    color: #10B981;
}

.delivery-label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray-dark);
    margin-bottom: 0.25rem;
}

.delivery-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
}

.delivery-time {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-dark);
    margin-top: 0.25rem;
}

/* ========== TIMELINE SECTIONS ========== */
.timeline-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #F3F4F6;
}

.timeline-section h4 {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ========== BRASPRESS TIMELINE ========== */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), #FFD54F);
}

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

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

.timeline-item.current .timeline-date {
    color: var(--primary);
    font-weight: 700;
}

.timeline-item.completed .timeline-date {
    color: #10B981;
}

.timeline-marker {
    position: absolute;
    left: -23px;
    top: 5px;
    z-index: 2;
}

.marker-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 179, 0, 0.2);
}

.timeline-item.current .marker-dot {
    background: var(--primary);
    border-color: white;
    box-shadow: 0 0 0 3px var(--primary);
}

.timeline-item.completed .marker-dot {
    background: #10B981;
    border-color: white;
}

.marker-line {
    position: absolute;
    left: 7px;
    top: 16px;
    width: 2px;
    height: calc(100% + 1.5rem);
    background: linear-gradient(to bottom, var(--primary), transparent);
}

.timeline-content {
    background: var(--gray);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--gray-dark);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.timeline-event {
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark);
}

/* ========== JADLOG EVENT TIMELINE ========== */
.event-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.event-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border: 2px solid #E5E7EB;
    transition: all 0.2s ease;
}

.event-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(255, 179, 0, 0.1);
}

.event-item.current {
    border-color: var(--primary);
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF3CC 100%);
}

.event-item.completed {
    border-color: #10B981;
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
}

.event-icon {
    font-size: 1.5rem;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray);
    border-radius: 10px;
}

.event-item.current .event-icon {
    background: var(--primary);
    color: var(--dark);
}

.event-item.completed .event-icon {
    background: #10B981;
    color: white;
}

.event-content {
    flex: 1;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.event-status {
    font-weight: 600;
    color: var(--dark);
    font-size: 1rem;
}

.event-date {
    font-size: 0.85rem;
    color: var(--gray-dark);
}

.event-unidade {
    font-size: 0.9rem;
    color: var(--gray-dark);
    padding: 0.5rem;
    background: var(--gray);
    border-radius: 5px;
    display: inline-block;
}

/* ========== SSW TIMELINE ========== */
.ssw-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ssw-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border: 2px solid #E5E7EB;
}

.ssw-item.current {
    border-color: var(--primary);
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF3CC 100%);
}

.ssw-item.completed {
    border-color: #10B981;
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
}

.ssw-icon {
    font-size: 1.5rem;
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray);
    border-radius: 12px;
}

.ssw-item.current .ssw-icon {
    background: var(--primary);
    color: var(--dark);
}

.ssw-item.completed .ssw-icon {
    background: #10B981;
    color: white;
}

.ssw-content {
    flex: 1;
}

.ssw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.ssw-ocorrencia {
    font-weight: 600;
    color: var(--dark);
    font-size: 1.1rem;
}

.ssw-date {
    font-size: 0.85rem;
    color: var(--gray-dark);
}

.ssw-details {
    background: var(--gray);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.ssw-local {
    font-size: 0.95rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ssw-desc {
    font-size: 0.9rem;
    color: var(--gray-dark);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.ssw-receiver {
    font-size: 0.9rem;
    color: #10B981;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #E5E7EB;
}

/* ========== ALFA TIMELINE ========== */
.alfa-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alfa-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    border: 2px solid #E5E7EB;
}

.alfa-item.current {
    border-color: var(--primary);
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF3CC 100%);
}

.alfa-item.completed {
    border-color: #10B981;
    background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
}

.alfa-icon {
    font-size: 1.5rem;
    min-width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray);
    border-radius: 12px;
}

.alfa-item.current .alfa-icon {
    background: var(--primary);
    color: var(--dark);
}

.alfa-item.completed .alfa-icon {
    background: #10B981;
    color: white;
}

.alfa-content {
    flex: 1;
}

.alfa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.alfa-transbordo {
    font-weight: 600;
    color: var(--dark);
    font-size: 1.1rem;
}

.alfa-date {
    font-size: 0.85rem;
    color: var(--gray-dark);
}

.alfa-time {
    font-size: 0.85rem;
    color: var(--gray-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--gray);
    border-radius: 5px;
    margin-top: 0.5rem;
}

/* ========== NO DATA ========== */
.no-data {
    text-align: center;
    padding: 3rem 2rem;
}

.no-data-message {
    max-width: 400px;
    margin: 0 auto;
}

.no-data-message i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.no-data-message p {
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.no-data-message small {
    color: var(--gray-dark);
    font-size: 0.9rem;
}

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

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--gray);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error */
.error-section {
    padding: 4rem;
    text-align: center;
}

.error-card {
    max-width: 500px;
    margin: 0 auto;
    background: #FEF2F2;
    border: 2px solid var(--error);
    border-radius: 12px;
    padding: 3rem;
}

.error-card i {
    font-size: 3rem;
    color: var(--error);
    margin-bottom: 1rem;
}

.error-card h3 {
    color: var(--error);
    margin-bottom: 1rem;
}

/* Help Section */
.help-section {
    background: var(--gray);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.help-section h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--light);
    padding: 2rem 3rem;
    text-align: center;
    margin-top: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--light);
}

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


/* public/css/style.css - ADICIONE ESTES ESTILOS */

/* Timeline melhorada */
.timeline {
    position: relative;
    padding-left: 30px;
    margin-top: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--dark));
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
    padding-left: 20px;
}

.timeline-item.current {
    background: rgba(255, 179, 0, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-left: -15px;
    border-left: 4px solid var(--primary);
}

.timeline-marker {
    position: absolute;
    left: -13px;
    top: 5px;
}

.marker-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--primary);
}

.timeline-item.current .marker-circle {
    background: var(--dark);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--dark);
}

.timeline-content {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.timeline-date {
    color: var(--gray-dark);
    font-size: 0.9rem;
    font-weight: 500;
}

.current-badge {
    background: var(--primary);
    color: var(--dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.timeline-title {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.timeline-details {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--gray-dark);
    margin-bottom: 10px;
}

.timeline-details span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.timeline-description {
    background: var(--gray);
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--dark);
    border-left: 3px solid var(--primary);
}

.shipment-info {
    background: var(--gray);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
}

.shipment-info p {
    margin: 5px 0;
}

.json-view {
    background: #1a1a1a;
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    overflow: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    max-height: 400px;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: var(--gray-dark);
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .timeline {
        padding-left: 20px;
    }
    
    .timeline::before {
        left: 9px;
    }
    
    .timeline-marker {
        left: -8px;
    }
    
    .timeline-item.current {
        margin-left: -10px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 2rem 1.5rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .search-section,
    .result-section {
        padding: 2rem 1.5rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .result-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .info-cards {
        grid-template-columns: 1fr;
    }
    
    .tracking-card {
        padding: 1.5rem;
    }
    
    .card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .delivery-info {
        grid-template-columns: 1fr;
    }
    
    .event-header,
    .ssw-header,
    .alfa-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline-marker {
        left: -18px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}
