/**
 * Seguimiento público (/trackings). Misma estética que el panel, pero con
 * estilos propios: la plantilla pública carga otras librerías.
 */

.pt-page {
    --pt-blue: #14B1FE;
    --pt-blue-dark: #0E8FD1;
    --pt-text: #0F172A;
    --pt-muted: #64748B;
    --pt-border: #E2E8F0;
    --pt-bg: #F8FAFC;
    max-width: 880px;
    margin: 0 auto;
    padding: 48px 16px 64px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    font-family: inherit;
}

/* ── Buscador ─────────────────────────────────────────────────────────── */
.pt-hero {
    text-align: center;
    padding: 36px 24px 28px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--pt-border);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}
.pt-hero h1 { margin: 0 0 6px; font-size: 2.1rem; font-weight: 800; color: var(--pt-text); }
.pt-hero > p { margin: 0 auto 22px; max-width: 520px; color: var(--pt-muted); font-size: 1.02rem; }

.pt-search { display: flex; gap: 10px; max-width: 640px; margin: 0 auto; }
.pt-search-input { position: relative; flex: 1; min-width: 0; }
.pt-search-input i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--pt-muted); font-size: 1.15rem; }
.pt-search-input input {
    width: 100%;
    height: 56px;
    padding: 0 16px 0 46px;
    border: 1px solid var(--pt-border);
    border-radius: 12px;
    background: #fff;
    font-size: 1.05rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--pt-text);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.pt-search-input input:focus { outline: none; border-color: var(--pt-blue); box-shadow: 0 0 0 4px rgba(20, 177, 254, 0.18); }

.pt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 56px;
    padding: 0 28px;
    border: 0;
    border-radius: 12px;
    background: var(--pt-blue);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.pt-btn:hover { background: var(--pt-blue-dark); color: #fff; text-decoration: none; }
.pt-btn:disabled { opacity: 0.7; cursor: progress; }
.pt-btn-soft { height: 42px; padding: 0 18px; font-size: 0.9rem; background: rgba(20, 177, 254, 0.12); color: var(--pt-blue-dark); }
.pt-btn-soft:hover { background: rgba(20, 177, 254, 0.2); color: var(--pt-blue-dark); }

.pt-hint { margin: 14px 0 0; font-size: 0.86rem; color: var(--pt-muted); }
.pt-updated { display: inline-block; margin-left: 8px; color: #3E9B33; }

/* ── Resultado ────────────────────────────────────────────────────────── */
.pt-result:empty { display: none; }
.pt-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--pt-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}
.pt-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.pt-card-head small { display: block; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--pt-muted); }
.pt-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.15rem; color: var(--pt-text); word-break: break-all; }

.pt-pill { padding: 6px 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; white-space: nowrap; }
.pt-pill.is-reg { background: #DBEAFE; color: #1E40AF; }
.pt-pill.is-tra { background: #FEF3C7; color: #92400E; }
.pt-pill.is-dis { background: #D1FAE5; color: #065F46; }
.pt-pill.is-ent { background: #E2E8F0; color: #334155; }
.pt-pill.is-carrier { background: #F1F5F9; color: var(--pt-muted); }

.pt-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pt-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; color: #94A3B8; text-align: center; }
.pt-steps li + li::before { content: ""; position: absolute; top: 8px; right: 50%; width: 100%; height: 3px; background: var(--pt-border); }
.pt-steps li.is-done + li::before { background: var(--pt-blue); }
.pt-dot { position: relative; z-index: 1; width: 19px; height: 19px; border-radius: 50%; background: #fff; border: 3px solid var(--pt-border); }
.pt-steps li.is-done .pt-dot { background: var(--pt-blue); border-color: var(--pt-blue); }
.pt-steps li.is-current .pt-dot { border-color: var(--pt-blue); box-shadow: 0 0 0 5px rgba(20, 177, 254, 0.2); }
.pt-steps li.is-done, .pt-steps li.is-current { color: var(--pt-text); }

.pt-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-facts span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px; background: var(--pt-bg); font-size: 0.9rem; color: var(--pt-text); }
.pt-facts i { color: var(--pt-blue-dark); }

.pt-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--pt-bg);
    border: 1px dashed var(--pt-border);
    font-size: 0.92rem;
    color: var(--pt-text);
}
.pt-cta > i { font-size: 1.2rem; color: var(--pt-blue-dark); }
.pt-cta > span { flex: 1; min-width: 200px; }
.pt-link { color: var(--pt-blue-dark); font-weight: 600; }

.pt-text { margin: 0; color: var(--pt-muted); font-size: 0.95rem; }
.pt-again {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 22px;
    border: 1.5px solid var(--pt-blue);
    border-radius: 12px;
    background: #fff;
    color: var(--pt-blue-dark);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}
.pt-again:hover { background: rgba(20, 177, 254, 0.08); }
.pt-empty { align-items: center; text-align: center; }
.pt-empty > i { font-size: 2.4rem; color: #CBD5E1; }
.pt-empty > strong { font-size: 1.1rem; color: var(--pt-text); word-break: break-all; }
.pt-empty .pt-cta { text-align: left; width: 100%; }

.pt-loading { flex-direction: row; align-items: center; color: var(--pt-muted); }
.pt-spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--pt-border); border-top-color: var(--pt-blue); animation: pt-spin 0.8s linear infinite; }
@keyframes pt-spin { to { transform: rotate(360deg); } }

/* ── Cómo funciona ────────────────────────────────────────────────────── */
.pt-how h2 { margin: 0 0 14px; font-size: 1.25rem; font-weight: 700; color: var(--pt-text); text-align: center; }
.pt-how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pt-how-steps li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--pt-border); text-align: center; }
.pt-how-icon { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; background: rgba(20, 177, 254, 0.12); color: var(--pt-blue-dark); font-size: 1.35rem; }
.pt-how-steps .is-reg .pt-how-icon { background: #DBEAFE; color: #1E40AF; }
.pt-how-steps .is-tra .pt-how-icon { background: #FEF3C7; color: #92400E; }
.pt-how-steps .is-dis .pt-how-icon { background: #D1FAE5; color: #065F46; }
.pt-how-steps .is-ent .pt-how-icon { background: #E2E8F0; color: #334155; }
.pt-how-steps strong { font-size: 0.95rem; color: var(--pt-text); }
.pt-how-steps small { font-size: 0.82rem; color: var(--pt-muted); }
.pt-how-times { margin: 12px 0 0; text-align: center; font-size: 0.86rem; color: var(--pt-muted); }

@media (max-width: 640px) {
    .pt-page { padding-top: 24px; gap: 20px; }
    .pt-hero { padding: 26px 16px 20px; }
    .pt-hero h1 { font-size: 1.6rem; }
    .pt-search { flex-direction: column; }
    .pt-btn { width: 100%; }
    .pt-how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pt-steps li { font-size: 0.74rem; }
}
@media (prefers-reduced-motion: reduce) { .pt-spinner { animation: none; } }
