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

body {
    font-family: 'Lexend', Arial, sans-serif;
    background-color: #f0f2f5;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.top-banner {
    background-color: #FFCC00;
    color: #1a1a1a;
    text-align: center;
    padding: 9px 0;
    font-size: 14px;
    font-weight: 500;
}

.top-banner strong {
    font-weight: 700;
}

/* Header padrão Correios */
.header-correios {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header-correios-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.correios-logo-header {
    height: 44px;
    width: auto;
    display: block;
}

.header-correios-titulo {
    color: #002F87;
    font-size: 15px;
    font-weight: 700;
    text-align: right;
}

.header-correios-faixa {
    height: 4px;
    background: #FFCC00;
    width: 100%;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    transition: opacity 0.3s;
}

.nav-link:hover {
    opacity: 0.8;
}

/* ConteÃºdo Principal */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.chat-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 0;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(0,47,135,0.13), 0 1px 4px rgba(0,0,0,0.06);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    gap: 10px;
    background-color: #F8FAFF;
    padding: 12px 16px;
    border-radius: 8px 8px 0 0;
}

.chat-messages {
    padding: 20px 24px;
    margin-bottom: 0;
    max-height: 500px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #002F87;
    flex-shrink: 0;
}

.status-title {
    color: #002F87;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}


.message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: flex-start;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInMessage 0.3s ease-out forwards;
}

.message-user {
    justify-content: flex-end;
}

@keyframes fadeInMessage {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.avatar {
    flex-shrink: 0;
}

.avatar-img {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.message-bubble {
    background-color: #EEF2FF;
    padding: 11px 15px;
    border-radius: 4px 16px 16px 16px;
    max-width: 82%;
    border: 1px solid rgba(0,47,135,0.07);
}

.message-bubble-user {
    background-color: #FFCC00;
    color: #1a1a1a;
    border-radius: 16px 4px 16px 16px;
    border: none;
    font-weight: 500;
}

.message-bubble p {
    color: #1e293b;
    font-size: 14.5px;
    line-height: 1.55;
    margin: 0;
    font-family: 'Source Sans 3', Arial, sans-serif;
}

.message-image {
    padding: 0;
    background-color: transparent;
}

.img-consulta {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.message-taxacao {
    background-color: #FFF3CD;
    padding: 12px 16px;
    border-radius: 8px;
}

.message-taxacao p {
    color: #987A23;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.destaque-nome {
    color: #000000;
    font-weight: 600;
}

.message-signature {
    padding: 0;
    background-color: transparent;
}

.signature-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 100%;
}

.signature-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.signature-overlay {
    position: absolute;
    top: 23px;
    left: -53px;
    right: 0px;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 22px;
    color: #000;
    font-size: 6px;
    text-align: center;
}

.signature-line {
    margin: 5px 0;
    font-weight: 500;
}

.signature-line strong {
    font-weight: 700;
    color: #000000;
}

.message-atencao {
    background-color: #FFF3CD;
    padding: 12px 16px;
    border-radius: 8px;
}

.message-atencao p {
    color: #9E812D;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    font-weight: 500;
}

.message-localizacao {
    background-color: #FFF3CD;
    padding: 12px 16px;
    border-radius: 8px;
}

.message-localizacao p {
    color: #856404;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.message-atencao-data {
    background-color: #FFF3CD;
    padding: 12px 16px;
    border-radius: 8px;
}

.message-atencao-data p {
    color: #856404;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.alerta-texto {
    color: #956404;
}

.destaque-data {
    color: #956404;
    font-weight: 600;
}

.message-resumo {
    background-color: #f0f0f0;
    padding: 12px 16px;
    border-radius: 8px;
}

.message-resumo p {
    color: #333;
    font-size: 14px;
    line-height: 1.8;
    margin: 0;
}

.message-data {
    padding: 16px;
}

.user-data {
    color: #1e293b;
    font-size: 13.5px;
    line-height: 1.7;
    background: #f8faff;
    border: 1px solid rgba(0,47,135,0.12);
    border-radius: 10px;
    padding: 12px 14px;
    font-family: 'Source Sans 3', Arial, sans-serif;
}

.data-item {
    margin-bottom: 7px;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(0,47,135,0.08);
    display: flex;
    gap: 6px;
    align-items: baseline;
}

.data-item:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.data-item strong {
    color: #002F87;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    font-family: 'Lexend', Arial, sans-serif;
}

/* ── Barra de progresso de etapas ── */
.barra-progresso-etapas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 10px 16px;
    background: #f4f6fb;
    border-bottom: 1px solid #e8ecf5;
    font-family: 'Lexend', Arial, sans-serif;
}

.etapa-item {
    font-size: 11px;
    font-weight: 500;
    color: #b0b8d0;
    padding: 4px 10px;
    border-radius: 20px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.etapa-item.etapa-ativa {
    color: #002F87;
    background: #e0e8fa;
    font-weight: 700;
}

.etapa-item.etapa-concluida {
    color: #1a8a4a;
}

.etapa-sep {
    width: 20px;
    height: 1px;
    background: #d0d8ec;
    flex-shrink: 0;
}


.container-acao {
    display: flex;
    justify-content: flex-end;
    margin: 15px 0;
    padding: 0 30px;
}

.btn-confirmar {
    background-color: #002F87;
    color: #fff;
    border: none;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 10px rgba(0,47,135,0.35);
    touch-action: manipulation;
}

.btn-confirmar:hover {
    background-color: #002070;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(0,47,135,0.4);
}

.btn-confirmar:active {
    transform: scale(0.97);
    box-shadow: 0 2px 6px rgba(0,47,135,0.3);
}

.btn-confirmar-clicked {
    background-color: #FFCC00 !important;
    color: #002F87 !important;
    cursor: default;
    box-shadow: none !important;
}

.btn-confirmar-clicked:hover {
    background-color: #FFCC00 !important;
    transform: none !important;
}

.indicador-escrita {
    background-color: #EEF2FF;
    padding: 12px 18px;
    border-radius: 4px 16px 16px 16px;
    border: 1px solid rgba(0,47,135,0.07);
    display: flex;
    gap: 5px;
    align-items: center;
    max-width: 72px;
}

.ponto-escrita {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #6b7aad;
    animation: typing 1.2s infinite ease-in-out;
}

.ponto-escrita:nth-child(1) {
    animation-delay: 0s;
}

.ponto-escrita:nth-child(2) {
    animation-delay: 0.2s;
}

.ponto-escrita:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

.inp-sec {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin-top: 0;
    padding: 14px 20px 20px;
    border-top: 1px solid #eef0f6;
    background: #fff;
}

.inp-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.inp-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    font-family: 'Lexend', Arial, sans-serif;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

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

.inp-trust {
    font-size: 11px;
    color: #6b7280;
    text-align: center;
    font-family: 'Source Sans 3', Arial, sans-serif;
    margin: 0;
}

.cpf-input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    border: 2px solid #e2e6f0;
    border-radius: 50px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-size: 16px;
    font-family: 'Lexend', Arial, sans-serif;
    font-weight: 400;
    width: 100%;
    text-align: center;
    -webkit-appearance: none;
    appearance: none;
    background: #f8faff;
    color: #1e293b;
}

.cpf-input:focus {
    border-color: #002F87;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,47,135,0.1);
}

.cpf-input::placeholder {
    color: #aab4cc;
}

.consultar-btn {
    background-color: #002F87;
    color: #fff;
    border: none;
    padding: 14px 22px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Lexend', Arial, sans-serif;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
    flex-shrink: 0;
    touch-action: manipulation;
    letter-spacing: 0.01em;
}

.consultar-btn:hover {
    background-color: #002070;
}

.consultar-btn:active {
    transform: scale(0.97);
}

/* Footer */
.footer {
    background-color: #002F87;
    padding: 40px 20px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-title {
    color: #FFCC00;
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 700;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.8;
}

/* ── Mobile (único breakpoint — só mobile) ── */
@media (max-width: 768px) {
    body {
        background-color: #002F87;
    }

    .top-banner {
        font-size: 13px;
        padding: 9px 12px;
        font-weight: 600;
        letter-spacing: 0.01em;
    }

    .header-correios-inner {
        padding: 11px 16px;
    }

    .correios-logo-header {
        height: 34px;
    }

    .header-correios-titulo {
        font-size: 12.5px;
        font-weight: 600;
    }

    /* Card full-screen */
    .main-content {
        padding: 0;
        align-items: stretch;
    }

    .chat-card {
        border-radius: 0;
        box-shadow: none;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        min-height: calc(100dvh - 108px);
    }

    .card-header {
        border-radius: 0;
        padding: 20px 16px 16px;
    }

    .atendente-avatar-container {
        width: 66px;
        height: 66px;
    }

    .atendente-nome {
        font-size: 16.5px;
    }

    /* Messages */
    .chat-messages {
        flex: 1;
        max-height: none;
        padding: 16px 14px;
    }

    .message {
        gap: 8px;
        margin-bottom: 12px;
    }

    .message-bubble {
        max-width: 86%;
        padding: 10px 13px;
    }

    .message-bubble p {
        font-size: 14px;
    }

    .avatar-img {
        width: 32px;
        height: 32px;
    }

    /* Input */
    .inp-sec {
        flex-direction: column;
        gap: 0;
        padding: 12px 14px 18px;
    }

    .inp-row {
        flex-direction: column;
        gap: 10px;
    }

    .cpf-input {
        width: 100%;
        font-size: 16px;
        padding: 15px 18px;
        text-align: center;
    }

    .consultar-btn {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        letter-spacing: 0.02em;
    }

    .btn-confirmar {
        width: 100%;
        padding: 15px 24px;
        font-size: 15px;
    }

    .container-acao {
        padding: 0 14px;
    }

    /* Data card */
    .user-data {
        font-size: 13px;
    }

    /* Footer */
    .footer {
        padding: 24px 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .footer-title {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .footer-links a {
        font-size: 13px;
    }

    /* Audio player */
    .bolha-audio {
        min-width: 200px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

.bolha-audio {
    padding: 8px 10px !important;
    min-width: 240px;
}

.player-audio {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.btn-play {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #002F87;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
    padding: 0;
}

.btn-play:hover {
    background: #002a85;
}

.btn-play:active {
    transform: scale(0.96);
}

.btn-play svg {
    display: block;
}

.player-direita {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.barra-progresso {
    position: relative;
    height: 4px;
    background: #cfd8e7;
    border-radius: 999px;
    cursor: pointer;
    overflow: visible;
}

.progresso-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: #002F87;
    border-radius: 999px;
    transition: width 0.1s linear;
}

.progresso-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 11px;
    height: 11px;
    background: #002F87;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: left 0.1s linear;
    pointer-events: none;
}

.player-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #6c757d;
}

.player-tempo {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.2px;
}

.btn-velocidade {
    border: none;
    background: transparent;
    color: #002F87;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.btn-velocidade:hover {
    background: rgba(0, 54, 166, 0.08);
}

/* Novos estilos para alinhar o Chat com a imagem enviada */
.header-right-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.header-title-underline {
    height: 3px;
    width: 100%;
    background-color: #FFCC00;
    margin-top: 4px;
}

.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #002F87 0%, #0041c2 100%);
    padding: 28px 16px 22px;
    border-bottom: 3px solid #FFCC00;
    border-radius: 8px 8px 0 0;
    gap: 8px;
}

.atendente-avatar-container {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.45);
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}

.atendente-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.atendente-status-badge {
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.28);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.status-dot-green {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 6px #4ade80;
}

.atendente-nome {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.atendente-cargo {
    color: rgba(255,255,255,0.72);
    font-size: 13px;
    margin: 0;
}


