:root {
    --ink: #082f49;
    --ink2: #0f4664;
    --blue: #0ea5e9;
    --blue2: #0369a1;
    --soft: #e0f2fe;
    --paper: #f7fbfe;
    --white: #fff;
    --orange: #f59e0b;
    --green: #059669;
    --red: #dc2626;
    --slate: #516879;
    --line: rgba(8, 47, 73, .14);
    --shadow: 0 20px 55px rgba(8, 47, 73, .12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ink);
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    width: min(1160px, calc(100% - 34px));
    margin: auto;
}

.header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand img {
    width: auto;
    height: 50px;
}

.nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.nav a {
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
}

.nav a:hover {
    background: var(--soft);
}

.btn {
    display: inline-flex;
    min-height: 44px;
    padding: 0 18px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: .2s;
}

.btn:hover {
    background: #041f32;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--soft);
    color: var(--ink);
}

.btn-outline {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
}

.btn-danger {
    background: var(--red);
}

.btn-success {
    background: var(--green);
}

.eyebrow {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--blue2);
    font-size: .83rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 12px 34px rgba(8, 47, 73, .07);
}

.card h3 {
    margin-top: 0;
}

.card-meta {
    display: flex;
    margin: 14px 0;
    flex-wrap: wrap;
    gap: 8px;
}

.pill,
.badge {
    display: inline-flex;
    padding: 6px 10px;
    align-items: center;
    border-radius: 999px;
    background: var(--soft);
    font-size: .82rem;
    font-weight: 800;
}

.badge-good {
    background: #dcfce7;
    color: #166534;
}

.badge-warn {
    background: #fef3c7;
    color: #92400e;
}

.badge-bad {
    background: #fee2e2;
    color: #991b1b;
}

.badge-neutral {
    background: #e2e8f0;
    color: #334155;
}

.form-shell {
    width: min(900px, calc(100% - 34px));
    margin: 42px auto 80px;
}

.form-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--shadow);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field.full {
    grid-column: 1 / -1;
}

.field label {
    font-weight: 800;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #bfd1dc;
    border-radius: 14px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

.field textarea {
    min-height: 120px;
    resize: vertical;
}

.field small,
.muted {
    color: var(--slate);
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.check input {
    margin-top: 5px;
}

.actions {
    display: flex;
    margin-top: 22px;
    flex-wrap: wrap;
    gap: 12px;
}

.alert {
    padding: 14px 16px;
    margin: 14px 0;
    border-radius: 14px;
    font-weight: 650;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-info {
    background: var(--soft);
    color: var(--ink);
}

.toolbar {
    display: flex;
    margin-bottom: 24px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
}

.table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.table th {
    background: #eef7fb;
    font-size: .84rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.empty {
    padding: 36px;
    color: var(--slate);
    text-align: center;
}

.details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail {
    padding: 14px;
    border-radius: 14px;
    background: var(--paper);
}

.detail strong {
    display: block;
    margin-bottom: 4px;
    color: var(--slate);
    font-size: .78rem;
    text-transform: uppercase;
}

.list-clean {
    margin: 0;
    padding: 0;
    list-style: none;
}

.list-clean li {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.tabs {
    display: flex;
    margin: 18px 0;
    flex-wrap: wrap;
    gap: 8px;
}

.tabs a {
    padding: 9px 13px;
    border-radius: 999px;
    background: #eef5f8;
    font-weight: 750;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.stack {
    display: grid;
    gap: 18px;
}

.kpi {
    font-size: 2rem;
    font-weight: 900;
}

body {
    background: linear-gradient(180deg, #f7fbfe, #fff 45%, #f7fbfe);
}

.hero {
    padding: 92px 0 66px;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    align-items: center;
    gap: 50px;
}

.hero h1 {
    margin: 18px 0;
    font-size: clamp(2.45rem, 6vw, 5rem);
    line-height: .98;
    letter-spacing: -.055em;
}

.hero p {
    max-width: 700px;
    color: var(--slate);
    font-size: 1.15rem;
}

.hero-card {
    position: relative;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: #fff;
    box-shadow: var(--shadow);
}

.hero-card::before {
    position: absolute;
    width: 140px;
    height: 140px;
    inset: -30px auto auto -30px;
    border-radius: 50%;
    background: var(--orange);
    content: "";
    filter: blur(4px);
    opacity: .16;
}

.stats {
    display: grid;
    margin-top: 28px;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.stat {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
}

.stat strong {
    display: block;
    font-size: 1.45rem;
}

.section {
    padding: 72px 0;
}

.section-head {
    display: flex;
    margin-bottom: 28px;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.section-head p {
    max-width: 620px;
    color: var(--slate);
}

.footer {
    padding: 44px 0;
    border-top: 1px solid var(--line);
    background: #fff;
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer img {
    height: 44px;
}

.mobile-toggle {
    display: none;
}

@media (max-width: 900px) {
    .hero-grid,
    .grid,
    .two-col,
    .form-grid,
    .details {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 55px;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .nav {
        display: none;
    }

    .mobile-toggle {
        display: inline-flex;
    }

    .section-head,
    .toolbar,
    .footer-grid {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Patch 03 — cadastro modular */
.registration-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin: 20px 0 26px;
}
.registration-steps span,
.registration-steps a {
    padding: 10px 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    color: var(--slate);
    font-size: .82rem;
    font-weight: 800;
    text-align: center;
}
.registration-steps .is-active {
    border-color: var(--blue);
    background: var(--soft);
    color: var(--blue2);
}
.registration-steps .is-done {
    border-color: #86efac;
    background: #dcfce7;
    color: #166534;
}
.legal-box {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--paper);
}
button:disabled {
    cursor: not-allowed;
    opacity: .55;
    transform: none !important;
}
@media (max-width: 760px) {
    .registration-steps { grid-template-columns: 1fr; }
}

/* PATCH 01 — páginas de manutenção e erro sem estilos inline. */
.system-message-page {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 28px;
    background: var(--paper);
}

.system-message-card {
    width: min(720px, 100%);
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.system-message-card h1 {
    margin-bottom: 10px;
}

.system-message-card p:last-child {
    margin-bottom: 0;
}
