@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500;700&family=Public+Sans:wght@400;500;600;700&display=swap');

:root {
    --bg: #EAEEF2;
    --surface: #FFFFFF;
    --ink: #1C2541;
    --muted: #667085;
    --accent: #C1560E;
    --accent-ink: #FFF5EC;
    --success: #1E8E5A;
    --success-bg: #E7F6EE;
    --warning: #B5790A;
    --warning-bg: #FEF4E2;
    --danger: #C22B2B;
    --line: #D7DCE3;
    --radius: 14px;
    --mono: 'IBM Plex Mono', monospace;
    --sans: 'Public Sans', sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    background-image: radial-gradient(circle at 1px 1px, rgba(28,37,65,0.06) 1px, transparent 0);
    background-size: 22px 22px;
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---------- cabecalho / rodape ---------- */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.site-header-inner {
    max-width: 560px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-placeholder {
    width: 40px;
    height: 40px;
    border: 1.5px dashed var(--line);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.05em;
    color: var(--muted);
    flex-shrink: 0;
}

.logo-placeholder--small { width: 28px; height: 28px; font-size: 7px; }

.site-nome {
    font-weight: 700;
    font-size: 17px;
    letter-spacing: -0.01em;
}

main.container { flex: 1; }

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--line);
    margin-top: 40px;
}

.site-footer-inner {
    max-width: 560px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-footer-inner p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

/* ---------- pagina de busca ---------- */
.container {
    max-width: 560px;
    margin: 0 auto;
    padding: 40px 20px 20px;
}

.eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
    margin: 0 0 10px;
}

h1 {
    font-size: 34px;
    line-height: 1.15;
    margin: 0 0 20px;
    letter-spacing: -0.01em;
}

.instrucao {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 18px;
}

form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 1px 2px rgba(28,37,65,0.04);
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
}

label:not(:first-child) { margin-top: 18px; }

input {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid var(--line);
    border-radius: 9px;
    font-size: 16px;
    font-family: var(--mono);
    color: var(--ink);
    background: #FBFBFA;
    transition: border-color 0.15s ease;
}

input:focus { outline: none; border-color: var(--accent); }

button {
    margin-top: 22px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 9px;
    background: var(--ink);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--sans);
    cursor: pointer;
    transition: transform 0.1s ease, background 0.15s ease;
}

button:hover { background: #0E1730; }
button:active { transform: scale(0.99); }
button:disabled { opacity: 0.6; cursor: default; }

#resultado { margin-top: 28px; }

.aviso {
    padding: 16px;
    border-radius: 10px;
    background: #FBEAE1;
    color: #8A3410;
    font-size: 14px;
    font-weight: 500;
}

/* ---------- cartao de resultado ---------- */
.ticket {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(28,37,65,0.06);
}

.ticket + .ticket { margin-top: 16px; }

.ticket-numero {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--muted);
    padding: 18px 24px 0;
}

.ticket-numero strong { color: var(--ink); font-size: 15px; }

.status-card {
    margin: 12px 24px 0;
    padding: 18px;
    border-radius: 10px;
}

.status-card.enviado, .status-card.preparando { background: var(--accent-ink); }
.status-card.entregue { background: var(--success-bg); }
.status-card.aprovado { background: var(--success-bg); }
.status-card.pendente { background: var(--warning-bg); }
.status-card.cancelado { background: #FBEAE1; }

.status-headline {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
}

.status-card.enviado .status-headline, .status-card.preparando .status-headline { color: var(--accent); }
.status-card.entregue .status-headline, .status-card.aprovado .status-headline { color: var(--success); }
.status-card.pendente .status-headline { color: var(--warning); }
.status-card.cancelado .status-headline { color: var(--danger); }

.previsao-entrega {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px;
}

.endereco {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    border-top: 1px solid rgba(28,37,65,0.08);
    padding-top: 10px;
}

/* ---------- historico / timeline ---------- */
.secao-titulo {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin: 24px 24px 12px;
}

.timeline { list-style: none; margin: 0; padding: 0 24px 20px; }

.timeline li {
    position: relative;
    padding-left: 34px;
    padding-bottom: 22px;
    font-size: 14px;
}

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

.check {
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline li.concluido .check { background: var(--success); }
.timeline li.pendente-etapa .check {
    background: var(--surface);
    border: 2px solid var(--line);
}

.check svg { width: 12px; height: 12px; }

.timeline li::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 24px;
    bottom: -4px;
    width: 2px;
    background: var(--line);
}

.timeline li.concluido::after { background: var(--success); }
.timeline li:last-child::after { display: none; }

.timeline .status-nome { font-weight: 600; display: block; }
.timeline li.pendente-etapa .status-nome { color: var(--muted); font-weight: 500; }
.timeline .status-data { display: block; color: var(--muted); font-family: var(--mono); font-size: 12px; margin-top: 2px; }

.rastreio-transp {
    margin: 0 24px 20px;
    background: var(--accent-ink);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 13px;
}

.rastreio-transp code { font-family: var(--mono); font-weight: 700; font-size: 14px; }

.rastreio-transp a {
    display: inline-block;
    margin-top: 8px;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.itens { margin: 0; padding: 0 24px 22px; list-style: none; }

.itens li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px dashed var(--line);
    font-size: 14px;
}

.itens li:first-child { border-top: none; }

.item-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg);
    flex-shrink: 0;
}

.item-info { flex: 1; }
.item-qtd { color: var(--muted); font-family: var(--mono); font-size: 13px; white-space: nowrap; }

@media (max-width: 480px) {
    h1 { font-size: 27px; }
    .container { padding: 32px 16px 20px; }
}
