/* ==========================================================
   Sprint 1 — Bloco 14
   Páginas públicas de erro e hardening visual.
   ========================================================== */

.public-error-page {
    min-height: calc(100vh - 180px);
    display: grid;
    place-items: center;
    padding: clamp(1rem, 4vw, 2rem);
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.10), transparent 34%),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.public-error-card {
    width: min(100%, 620px);
    border-radius: 30px;
    border: 1px solid rgba(226, 232, 240, 0.96);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.09);
    padding: clamp(1.25rem, 4vw, 2.4rem);
    text-align: center;
}

.public-error-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    min-width: 78px;
    height: 42px;
    padding: 0 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.public-error-card h1 {
    margin: 0.9rem 0 0.5rem;
    font-size: clamp(1.55rem, 4vw, 2.25rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
    color: #0f172a;
}

.public-error-card p {
    max-width: 48ch;
    margin: 0 auto;
    color: #64748b;
    line-height: 1.5;
}

.public-error-actions {
    display: flex;
    gap: 0.65rem;
    justify-content: center;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.public-error-primary,
.public-error-secondary {
    min-height: 48px;
    border-radius: 16px;
    padding: 0.8rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.48rem;
    font-weight: 850;
    text-decoration: none;
}

.public-error-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.public-error-secondary {
    background: #fff;
    color: #334155;
    border: 1px solid #e2e8f0;
}

@media (max-width: 640px) {
    .public-error-page {
        padding: 0.72rem 0.58rem calc(5.8rem + env(safe-area-inset-bottom, 0px));
    }

    .public-error-card {
        border-radius: 24px;
        padding: 1.25rem;
    }

    .public-error-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .public-error-primary,
    .public-error-secondary {
        width: 100%;
    }
}
