/* ==========================================================================
   ExpressLog - Premium Mobile-First & Responsive CSS System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Montserrat:wght@600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #dc0032;
    --primary-dark: #a80024;
    --primary-gradient: linear-gradient(135deg, #e11d48 0%, #be123c 50%, #9f1239 100%);
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 12px 28px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px -10px rgba(225, 29, 72, 0.25);
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Header Sticky com Efeito Glass */
.header-site {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    height: 60px;
    display: flex;
    align-items: center;
}

.header-container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-jadlog {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.logo-icon-badge {
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.3);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dropdown-lang {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
}

/* Premium Red Hero Section */
.hero-red-section {
    background: var(--primary-gradient);
    color: #ffffff;
    padding: 40px 20px 48px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-red-container {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-truck-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
    line-height: 1.25;
}

.hero-subtitle {
    font-size: 0.98rem;
    opacity: 0.92;
    margin-bottom: 24px;
    font-weight: 500;
}

/* Busca */
.tracking-search-box {
    background: #ffffff;
    border-radius: 14px;
    padding: 6px;
    box-shadow: var(--shadow-lg);
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
}

.tracking-input-field {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 600;
    border-radius: 10px;
    width: 100%;
    min-width: 0;
}

.tracking-input-field::placeholder {
    color: #94a3b8;
    font-weight: 400;
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.btn-search-submit {
    background: var(--dark-bg);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-search-submit:hover {
    background: #1e293b;
}

.hero-foot-note {
    font-size: 0.8rem;
    opacity: 0.88;
    font-weight: 500;
}

/* Main Content */
.main-content-section {
    padding: 36px 20px 50px 20px;
}

.main-container {
    max-width: 960px;
    margin: 0 auto;
}

/* Feature Cards */
.feature-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 36px;
}

.card-feature {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fff1f2;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 14px auto;
}

.card-feature h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.card-feature p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* Banner Custom */
.banner-section-custom {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.banner-custom-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
    align-items: center;
}

.banner-custom-left img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    display: block;
}

.banner-custom-right h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 14px;
}

.jadlog-bullet-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jadlog-bullet-list li {
    font-size: 0.88rem;
    color: #475569;
    position: relative;
    padding-left: 20px;
}

.jadlog-bullet-list li::before {
    content: "✓";
    color: var(--primary);
    font-weight: 800;
    position: absolute;
    left: 0;
}

/* Footer */
.footer-site {
    padding: 36px 20px 40px 20px;
    text-align: center;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 960px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.footer-security {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.footer-copyright {
    font-size: 0.78rem;
    color: #94a3b8;
}

/* ==========================================================================
   Engine do Modal Super Compacto (Sem Rodapé, Encaixe 100% na Tela)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    padding: 12px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.btn-close-modal {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1rem;
    color: #ffffff;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-close-modal:hover {
    background: rgba(255, 255, 255, 0.4);
}

.modal-verification-card {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
    position: relative;
    margin: auto;
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-verification-header {
    background: var(--dark-bg);
    color: #ffffff;
    padding: 14px 18px;
    flex-shrink: 0;
}

.verification-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.warning-icon {
    font-size: 1.3rem;
}

.modal-verification-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
}

.sec-code {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 500;
}

.modal-verification-body {
    padding: 14px 16px;
    background: #ffffff;
}

/* Card de Dados de Alta Densidade (Compacto) */
.lead-data-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lead-data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 5px;
    gap: 8px;
}

.lead-data-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.lead-data-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 5px;
}

.lead-data-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
}

.lead-data-row span, .lead-data-item span {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.76rem;
    flex-shrink: 0;
}

.lead-data-row strong, .lead-data-item strong {
    color: var(--text-main);
    font-weight: 700;
    text-align: right;
    word-break: break-word;
    font-size: 0.82rem;
}

/* Callout Compacto */
.callout-action-required {
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    border: 1px solid;
    align-items: flex-start;
}

.callout-icon {
    font-size: 1.1rem;
    margin-top: 1px;
    flex-shrink: 0;
}

.callout-title {
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.callout-desc {
    font-size: 0.76rem;
    line-height: 1.35;
}

.btn-download-app {
    width: 100%;
    background: var(--dark-bg);
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 0;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-download-app:hover {
    background: #1e293b;
}

/* Modal Loading Card */
.modal-loading-card {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 380px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    margin: auto;
}

.modal-loading-header {
    background: var(--primary-gradient);
    color: #ffffff;
    padding: 24px 18px 20px 18px;
}

.loading-truck-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 10px auto;
}

.modal-loading-body {
    padding: 24px 18px 28px 18px;
    background: #ffffff;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.loading-dots .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--primary);
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots .dot:nth-child(1) { animation-delay: -0.32s; opacity: 0.4; }
.loading-dots .dot:nth-child(2) { animation-delay: -0.16s; opacity: 0.7; }
.loading-dots .dot:nth-child(3) { animation-delay: 0s; opacity: 1; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

.loading-text {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    font-weight: 500;
}

.loading-bar-wrapper {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    max-width: 160px;
    margin: 0 auto;
}

.loading-bar-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    animation: loadFill 2s ease-in-out forwards;
}

@keyframes loadFill {
    0% { width: 0%; }
    50% { width: 65%; }
    100% { width: 100%; }
}

/* ==========================================================================
   REGRAS RESPONSIVAS MOBILE
   ========================================================================== */
@media (max-width: 640px) {
    .header-site { height: 54px; }
    .header-container { padding: 0 14px; }
    .logo-jadlog { font-size: 1.1rem; }
    .logo-icon-badge { width: 30px; height: 30px; font-size: 0.88rem; }
    
    .hero-red-section { padding: 24px 14px 30px 14px; }
    .hero-title { font-size: 1.4rem; }
    .hero-subtitle { font-size: 0.84rem; margin-bottom: 16px; }

    .tracking-search-box {
        flex-direction: column;
        padding: 6px;
        gap: 6px;
        border-radius: 12px;
    }
    
    .tracking-input-field {
        text-align: center;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .btn-search-submit {
        width: 100%;
        padding: 10px;
        font-size: 0.88rem;
        border-radius: 8px;
    }

    .main-content-section { padding: 20px 14px 30px 14px; }

    .feature-cards-row {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 24px;
    }

    .card-feature { padding: 18px 14px; }

    .banner-section-custom { padding: 20px 16px; }
    .banner-custom-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        text-align: center;
    }
    
    .banner-custom-right h2 { font-size: 1.2rem; }

    .modal-overlay { padding: 8px; }
    .modal-verification-card {
        max-width: 100%;
        border-radius: 16px;
    }
    
    .modal-verification-header { padding: 12px 14px; }
    .modal-verification-body { padding: 12px 14px; }

    .lead-data-grid-2 {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
