:root {
    --blue-950: #071733;
    --blue-900: #0a2452;
    --blue-800: #0b3474;
    --blue-700: #0c4a95;
    --green-500: #92c83e;
    --green-600: #75a82d;
    --gold-500: #f2bd45;
    --red-600: #c0392b;
    --gray-50: #f6f8fb;
    --gray-100: #edf1f6;
    --gray-200: #d9e1ec;
    --gray-500: #667085;
    --gray-700: #344054;
    --white: #ffffff;
    --shadow: 0 24px 70px rgba(7, 23, 51, .18);
    --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--blue-950);
    background: linear-gradient(180deg, #f9fbff 0%, var(--gray-50) 100%);
    line-height: 1.5;
}
a { color: var(--blue-700); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.hero {
    position: relative;
    overflow: hidden;
    min-height: 440px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 80% 20%, rgba(146, 200, 62, .28), transparent 32%),
        radial-gradient(circle at 10% 80%, rgba(242, 189, 69, .24), transparent 30%),
        linear-gradient(135deg, #06142e, #0b3474 58%, #0a2452);
    color: white;
}
.hero::before {
    content: "";
    position: absolute;
    inset: -80px;
    background-image: linear-gradient(120deg, rgba(255,255,255,.09) 0 1px, transparent 1px 90px);
    transform: rotate(-12deg);
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,23,51,.9), rgba(7,23,51,.35)); }
.hero-content { position: relative; padding: 76px 0; max-width: 850px; }
.brand-pill {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 9px 14px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
    font-weight: 700;
    letter-spacing: .02em;
}
.hero h1 { font-size: clamp(2.3rem, 5vw, 4.8rem); line-height: .98; margin: 22px 0 18px; letter-spacing: -.05em; }
.hero p { font-size: clamp(1rem, 2vw, 1.25rem); max-width: 760px; color: rgba(255,255,255,.88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 45px;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn.primary { background: linear-gradient(135deg, var(--green-500), var(--gold-500)); color: var(--blue-950); box-shadow: 0 14px 30px rgba(146, 200, 62, .28); }
.btn.light { background: rgba(255,255,255,.14); color: white; border: 1px solid rgba(255,255,255,.28); }
.btn.ghost { background: var(--gray-100); color: var(--blue-900); }
.btn.danger { background: #fee4e2; color: #912018; }
.btn.small { padding: 8px 13px; min-height: 34px; font-size: .86rem; }
.btn.full { width: 100%; }

.main-grid { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; margin-top: -70px; position: relative; z-index: 3; padding-bottom: 80px; }
.side-card, .form-card, .admin-card, .login-card, .install-card, .policy-card {
    background: var(--white);
    border: 1px solid rgba(217,225,236,.95);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.side-card { padding: 26px; position: sticky; top: 24px; }
.side-card h2, .form-card h2 { margin-top: 0; }
.check-list { list-style: none; padding: 0; margin: 20px 0; }
.check-list li { padding: 9px 0 9px 30px; position: relative; color: var(--gray-700); }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 7px; color: var(--green-600); font-weight: 900; }
.mini-note { font-size: .9rem; color: var(--gray-500); background: var(--gray-50); border-radius: 16px; padding: 14px; }
.form-card { padding: 0; overflow: hidden; }
.form-section { display: none; padding: 32px; }
.form-section.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.section-heading { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 26px; }
.section-heading > span {
    width: 44px; height: 44px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--blue-800), var(--blue-950)); color: white; font-weight: 900;
    flex: none;
}
.section-heading h2 { margin: 0; font-size: 1.55rem; letter-spacing: -.02em; }
.section-heading p { margin: 4px 0 0; color: var(--gray-500); }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label { display: block; font-weight: 800; color: var(--blue-900); }
input, select, textarea {
    width: 100%;
    margin-top: 7px;
    border: 1px solid var(--gray-200);
    border-radius: 15px;
    padding: 13px 14px;
    font: inherit;
    color: var(--blue-950);
    background: #fff;
    outline: none;
    transition: border .16s ease, box-shadow .16s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue-700); box-shadow: 0 0 0 4px rgba(12,74,149,.12); }
textarea { resize: vertical; min-height: 96px; }
small { display: block; margin-top: 6px; color: var(--gray-500); font-weight: 500; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.conditional-box, .publication-box, .consent-box {
    border: 1px dashed var(--gray-200);
    background: var(--gray-50);
    border-radius: 20px;
    padding: 22px;
    margin-top: 22px;
}
.conditional-box { display: none; }
.conditional-box.show { display: block; }
.conditional-box h3, .publication-box h3 { margin: 0 0 8px; }
.checks-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.check { display: flex; gap: 11px; align-items: flex-start; font-weight: 700; color: var(--gray-700); background: white; border: 1px solid var(--gray-200); padding: 12px; border-radius: 15px; }
.check input { width: auto; margin: 4px 0 0; flex: none; }
.check.required { border-color: rgba(146, 200, 62, .6); }
.switch-line { display: flex; align-items: center; gap: 12px; background: var(--gray-50); padding: 16px; border-radius: 18px; border: 1px solid var(--gray-200); }
.switch-line input { width: auto; margin: 0; }
.form-nav { border-top: 1px solid var(--gray-200); padding: 20px 32px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: white; position: sticky; bottom: 0; }
.step-dots { display: flex; gap: 8px; align-items: center; justify-content: center; flex: 1; }
.step-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--gray-200); }
.step-dot.active { width: 28px; background: var(--blue-700); }
.alert { padding: 14px 16px; border-radius: 15px; margin-bottom: 16px; font-weight: 700; }
.alert.error { background: #fee4e2; color: #912018; }
.alert.success { background: #dcfae6; color: #05603a; }
.footer { padding: 30px 0; color: var(--gray-500); }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; }

.minimal-page { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; background: radial-gradient(circle at 10% 20%, rgba(146,200,62,.18), transparent 25%), var(--gray-50); }
.login-card, .install-card { width: min(480px, 100%); padding: 30px; }
.policy-card { width: min(860px, 100%); padding: 34px; }
.policy-card h1 { margin-top: 8px; }
.back-link { display: inline-flex; margin-bottom: 10px; font-weight: 800; }
.success-card { text-align: center; }
.success-icon { width: 74px; height: 74px; border-radius: 50%; background: #dcfae6; color: #05603a; display: inline-flex; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: 900; }
.ref-code { background: var(--gray-50); padding: 12px; border-radius: 14px; word-break: break-all; }

.admin-page { background: #f4f7fb; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 24px 32px; background: var(--blue-950); color: white; }
.admin-topbar h1 { margin: 0; letter-spacing: -.03em; }
.admin-topbar p { margin: 4px 0 0; color: rgba(255,255,255,.72); }
.admin-topbar nav { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.admin-container { width: min(1240px, calc(100% - 32px)); margin: 28px auto 80px; }
.admin-card { padding: 22px; margin-bottom: 20px; box-shadow: 0 18px 50px rgba(7,23,51,.08); }
.filter-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr auto; align-items: end; gap: 14px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--gray-200); vertical-align: middle; }
.data-table th { color: var(--gray-500); font-size: .86rem; text-transform: uppercase; letter-spacing: .04em; }
.data-table small { margin: 0; }
.empty { text-align: center !important; color: var(--gray-500); padding: 38px !important; }
.badge { display: inline-flex; align-items: center; padding: 7px 11px; border-radius: 999px; font-weight: 900; font-size: .82rem; text-transform: uppercase; }
.badge.pendente { background: #fff7d6; color: #946200; }
.badge.aprovado { background: #dcfae6; color: #05603a; }
.badge.rejeitado { background: #fee4e2; color: #912018; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 18px; }
.detail-grid { display: grid; grid-template-columns: 350px 1fr; gap: 20px; align-items: start; }
.admin-form label { margin-bottom: 14px; }
.files-box { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--gray-200); }
.meta-line { color: var(--gray-500); font-weight: 700; margin-bottom: 16px; }
.detail-card h2 { margin: 28px 0 14px; padding-top: 18px; border-top: 1px solid var(--gray-200); }
.detail-card h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.detail-item { border: 1px solid var(--gray-200); border-radius: 14px; padding: 12px; background: #fff; }
.detail-item strong { display: block; color: var(--gray-500); font-size: .83rem; margin-bottom: 4px; }
.detail-item span { word-break: break-word; }

@media (max-width: 920px) {
    .main-grid, .detail-grid { grid-template-columns: 1fr; }
    .side-card { position: static; }
    .grid.two, .checks-grid, .filter-grid, .detail-list { grid-template-columns: 1fr; }
    .admin-topbar { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 620px) {
    .container { width: min(100% - 20px, 1180px); }
    .hero { min-height: 520px; }
    .main-grid { margin-top: -40px; }
    .form-section { padding: 22px; }
    .form-nav { padding: 16px; flex-wrap: wrap; }
    .step-dots { order: -1; width: 100%; flex-basis: 100%; }
    .btn { width: 100%; }
    .footer-inner { flex-direction: column; }
}


/* Identidade visual: logo e favicon */
.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px 10px 10px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
}
.brand-lockup .brand-pill {
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    backdrop-filter: none;
}
.brand-lockup span {
    display: block;
    margin-top: 2px;
    color: rgba(255,255,255,.78);
    font-weight: 600;
    font-size: .9rem;
}
.brand-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 4px;
    box-shadow: 0 10px 28px rgba(0,0,0,.18);
    flex: 0 0 auto;
}
.admin-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.admin-logo,
.login-logo,
.minimal-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 4px;
    box-shadow: 0 12px 28px rgba(7, 23, 51, .14);
}
.login-logo,
.minimal-logo {
    display: block;
    margin: 0 auto 16px;
}
.minimal-logo.align-left {
    margin-left: 0;
    margin-right: 0;
}
@media (max-width: 640px) {
    .brand-lockup { border-radius: 24px; align-items: flex-start; }
    .brand-logo { width: 54px; height: 54px; }
    .admin-brand { align-items: flex-start; }
    .admin-logo { width: 56px; height: 56px; }
}
/* ==========================================================================
   Ajustes de usabilidade, logotipo e mobile
   --------------------------------------------------------------------------
   Mantém a estrutura existente e apenas reforça a leitura, o toque no telemóvel
   e a visibilidade da marca.
   ========================================================================== */

html {
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

.hero {
    isolation: isolate;
}

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(7,23,51,.94), rgba(7,23,51,.52) 55%, rgba(7,23,51,.28));
}

.hero-content {
    width: 100%;
}

.hero h1 {
    text-wrap: balance;
}

.hero p {
    text-wrap: pretty;
}

/* Marca mais visível no topo */
.brand-lockup {
    min-height: 96px;
    gap: 18px;
    padding: 12px 22px 12px 12px;
    background: rgba(5, 16, 38, .58);
    border: 1px solid rgba(255,255,255,.34);
    box-shadow: 0 20px 50px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.18);
    max-width: 100%;
}

.brand-logo {
    width: 84px;
    height: 84px;
    padding: 7px;
    border: 3px solid rgba(255,255,255,.92);
    background: #fff;
    box-shadow:
        0 16px 34px rgba(0,0,0,.28),
        0 0 0 7px rgba(255,255,255,.10);
}

.brand-lockup .brand-pill {
    color: #fff;
    font-size: 1.03rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: .01em;
}

.brand-lockup span {
    color: rgba(255,255,255,.86);
    font-size: .95rem;
    line-height: 1.25;
}

/* Campos mais confortáveis em telemóvel */
input,
select,
textarea {
    min-height: 52px;
    font-size: 16px; /* evita zoom automático no iPhone */
}

textarea {
    line-height: 1.5;
}

input[type="checkbox"],
input[type="radio"] {
    min-height: auto;
    accent-color: var(--blue-700);
}

input[type="file"] {
    padding: 11px 12px;
    line-height: 1.35;
}

label {
    line-height: 1.35;
}

.section-heading > span {
    width: 48px;
    height: 48px;
}

/* Passos clicáveis com acessibilidade */
.step-dot {
    border: 0;
    padding: 0;
    flex: 0 0 auto;
    transition: width .18s ease, background .18s ease, opacity .18s ease, transform .18s ease;
}

.step-dot:not(:disabled) {
    cursor: pointer;
}

.step-dot:not(:disabled):hover {
    transform: translateY(-1px);
}

.step-dot:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.step-dot:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(242, 189, 69, .75);
    outline-offset: 3px;
}

/* Validação visual feita pelo JS */
.is-invalid {
    border-color: var(--red-600) !important;
    box-shadow: 0 0 0 4px rgba(192, 57, 43, .12) !important;
}

.check.is-invalid {
    border-color: rgba(192, 57, 43, .65) !important;
    background: #fff6f5;
}

.form-card {
    scroll-margin-top: 20px;
}

/* Mais conforto no painel/admin sem alterar estrutura */
.admin-topbar {
    position: relative;
}

.admin-brand {
    min-width: 0;
}

.admin-logo,
.login-logo,
.minimal-logo {
    border: 3px solid #fff;
}

@media (max-width: 920px) {
    .hero-content {
        padding: 54px 0 96px;
    }

    .main-grid {
        gap: 20px;
        margin-top: -58px;
        padding-bottom: 56px;
    }

    .side-card {
        position: static;
    }
}

@media (max-width: 620px) {
    .container {
        width: min(100% - 20px, 1180px);
    }

    .hero {
        min-height: auto;
        display: block;
    }

    .hero::before {
        inset: -120px;
        opacity: .72;
    }

    .hero-content {
        padding: 24px 0 76px;
    }

    .brand-lockup {
        width: 100%;
        min-height: 82px;
        border-radius: 24px;
        align-items: center;
        gap: 13px;
        padding: 10px 13px;
    }

    .brand-logo {
        width: 68px;
        height: 68px;
        padding: 5px;
        border-width: 2px;
        box-shadow:
            0 12px 26px rgba(0,0,0,.25),
            0 0 0 5px rgba(255,255,255,.10);
    }

    .brand-lockup .brand-pill {
        font-size: 1rem;
    }

    .brand-lockup span {
        font-size: .88rem;
    }

    .hero h1 {
        font-size: clamp(2rem, 11vw, 2.75rem);
        line-height: 1.04;
        letter-spacing: -.04em;
        margin: 20px 0 14px;
    }

    .hero p {
        font-size: 1rem;
        line-height: 1.58;
    }

    .hero-actions {
        gap: 10px;
        margin-top: 24px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .main-grid {
        width: 100%;
        margin-top: -38px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .side-card,
    .form-card {
        border-radius: 18px;
    }

    .side-card {
        padding: 20px;
    }

    .side-card h2 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    .side-card p,
    .check-list li,
    .mini-note {
        font-size: .95rem;
    }

    .check-list {
        margin: 14px 0;
    }

    .check-list li {
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .form-section {
        padding: 20px 16px 22px;
    }

    .section-heading {
        gap: 12px;
        margin-bottom: 20px;
    }

    .section-heading > span {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .section-heading h2 {
        font-size: 1.28rem;
        line-height: 1.18;
    }

    .section-heading p {
        font-size: .92rem;
    }

    .grid {
        gap: 14px;
    }

    label {
        font-size: .95rem;
    }

    input,
    select,
    textarea {
        border-radius: 14px;
        padding: 13px 13px;
    }

    small {
        font-size: .82rem;
    }

    .conditional-box,
    .publication-box,
    .consent-box {
        border-radius: 17px;
        padding: 16px;
        margin-top: 18px;
    }

    .checks-grid {
        gap: 10px;
    }

    .check {
        min-height: 48px;
        padding: 12px;
        border-radius: 14px;
        line-height: 1.38;
    }

    .switch-line {
        align-items: flex-start;
        border-radius: 16px;
        padding: 14px;
    }

    .form-nav {
        padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
        gap: 10px;
        box-shadow: 0 -16px 34px rgba(7,23,51,.10);
    }

    .form-nav .btn {
        width: 100%;
        min-height: 50px;
    }

    .step-dots {
        gap: 7px;
        min-height: 18px;
    }

    .step-dot {
        width: 9px;
        height: 9px;
    }

    .step-dot.active {
        width: 24px;
    }

    .footer {
        padding: 24px 0;
    }
}

@media (max-width: 420px) {
    .brand-logo {
        width: 62px;
        height: 62px;
    }

    .brand-lockup {
        gap: 11px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .form-section {
        padding-left: 14px;
        padding-right: 14px;
    }

    .section-heading h2 {
        font-size: 1.18rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* ========================================================================== 

/* ==========================================================================
   FIX SEGURO — Painel Admin sem alterar o PHP
   --------------------------------------------------------------------------
   Este bloco corrige apenas o visual do admin existente. Não depende de novas
   classes no index.php e não mexe na lógica, queries, exportações ou permissões.
   ========================================================================== */

.admin-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% -10%, rgba(146, 200, 62, .10), transparent 28%),
        radial-gradient(circle at 92% 0%, rgba(242, 189, 69, .10), transparent 26%),
        linear-gradient(180deg, #f7f9fd 0%, #edf2f8 100%);
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 22px max(28px, calc((100vw - 1320px) / 2 + 28px));
    background:
        linear-gradient(135deg, rgba(7, 23, 51, .98), rgba(10, 36, 82, .98));
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 18px 46px rgba(7, 23, 51, .18);
}

.admin-brand {
    min-width: 260px;
}

.admin-logo {
    width: 72px;
    height: 72px;
    padding: 5px;
    border: 3px solid rgba(255,255,255,.92);
    box-shadow: 0 14px 32px rgba(0,0,0,.25);
}

.admin-topbar h1 {
    font-size: clamp(1.55rem, 2vw, 2.15rem);
    line-height: 1.05;
    margin: 0;
}

.admin-topbar p {
    margin-top: 7px;
    font-size: .98rem;
}

.admin-topbar nav {
    justify-content: flex-end;
    gap: 10px;
}

.admin-topbar nav .btn {
    min-height: 44px;
    padding: 11px 18px;
    white-space: nowrap;
}

.btn.success,
.admin-topbar nav a[href*="export_excel"] {
    background: linear-gradient(135deg, var(--green-500), var(--gold-500));
    color: var(--blue-950);
    box-shadow: 0 12px 26px rgba(146, 200, 62, .22);
}

.admin-container {
    width: min(1320px, calc(100% - 48px));
    margin: 34px auto 90px;
}

.admin-card {
    border-radius: 24px;
    border: 1px solid rgba(217, 225, 236, .95);
    box-shadow: 0 22px 60px rgba(7, 23, 51, .09);
}

.filters-card {
    padding: 24px;
    margin-bottom: 24px;
}

/* O PHP usa filters-grid. O CSS antigo tinha filter-grid. */
.filters-grid,
.filter-grid {
    display: grid;
    grid-template-columns: minmax(300px, 1.45fr) minmax(190px, .65fr) minmax(230px, .8fr) auto;
    align-items: end;
    gap: 16px;
}

.filters-grid label,
.filter-grid label {
    margin: 0;
}

.filters-grid input,
.filters-grid select,
.filter-grid input,
.filter-grid select {
    min-height: 54px;
    background: #fff;
}

.filters-grid .btn,
.filter-grid .btn {
    min-height: 54px;
    padding-inline: 24px;
}

.table-card {
    padding: 0;
    overflow: hidden;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table,
.data-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

.admin-table thead th,
.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fbfcff;
    color: var(--gray-500);
    font-size: .78rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-weight: 900;
    padding: 18px 18px;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.admin-table tbody td,
.data-table tbody td {
    padding: 18px 18px;
    border-bottom: 1px solid rgba(217, 225, 236, .78);
    vertical-align: middle;
    font-size: .95rem;
}

.admin-table tbody tr,
.data-table tbody tr {
    transition: background .16s ease, transform .16s ease;
}

.admin-table tbody tr:hover,
.data-table tbody tr:hover {
    background: #f9fbff;
}

.admin-table tbody tr:last-child td,
.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table td strong,
.data-table td strong {
    color: var(--blue-950);
    font-weight: 900;
    line-height: 1.25;
}

.admin-table td small,
.data-table td small {
    display: block;
    margin-top: 5px;
    color: var(--gray-500);
    font-size: .84rem;
    line-height: 1.35;
}

.admin-table th:nth-child(1),
.admin-table td:nth-child(1) { width: 150px; }

.admin-table th:nth-child(2),
.admin-table td:nth-child(2) { min-width: 230px; }

.admin-table th:nth-child(3),
.admin-table td:nth-child(3) { min-width: 150px; }

.admin-table th:nth-child(4),
.admin-table td:nth-child(4) { min-width: 160px; }

.admin-table th:nth-child(5),
.admin-table td:nth-child(5) { min-width: 210px; }

.admin-table th:nth-child(6),
.admin-table td:nth-child(6) { min-width: 210px; }

.admin-table th:nth-child(7),
.admin-table td:nth-child(7) { width: 130px; }

.admin-table th:nth-child(8),
.admin-table td:nth-child(8) { width: 110px; text-align: right; }

.admin-table td:nth-child(2) strong {
    display: inline-block;
    max-width: 260px;
}

.badge {
    padding: 8px 12px;
    letter-spacing: .035em;
}

.admin-table .btn.small,
.data-table .btn.small {
    min-height: 38px;
    padding: 9px 15px;
    background: var(--blue-900);
    color: #fff;
}

.admin-table .btn.small:hover,
.data-table .btn.small:hover {
    background: var(--blue-800);
}

.empty {
    text-align: center !important;
    padding: 44px 18px !important;
    color: var(--gray-500);
    font-weight: 800;
}

.pagination {
    padding: 18px 22px 22px;
    border-top: 1px solid rgba(217, 225, 236, .78);
    background: #fff;
}

.pagination a {
    font-weight: 900;
}

@media (max-width: 1080px) {
    .admin-topbar {
        position: relative;
        padding: 20px 22px;
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-topbar nav {
        width: 100%;
        justify-content: flex-start;
    }

    .filters-grid,
    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filters-grid .btn,
    .filter-grid .btn {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .admin-container {
        width: min(100% - 24px, 1320px);
        margin-top: 20px;
    }

    .admin-topbar nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .admin-topbar nav .btn {
        width: 100%;
        padding-inline: 12px;
        font-size: .92rem;
    }

    .filters-card {
        padding: 18px;
    }

    .filters-grid,
    .filter-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .table-card::before {
        content: "Arraste a tabela para o lado para ver todos os dados";
        display: block;
        padding: 13px 16px;
        color: var(--gray-500);
        background: #fbfcff;
        border-bottom: 1px solid var(--gray-200);
        font-size: .88rem;
        font-weight: 800;
    }

    .admin-table,
    .data-table {
        min-width: 980px;
    }

    .admin-table thead th,
    .data-table thead th,
    .admin-table tbody td,
    .data-table tbody td {
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media (max-width: 460px) {
    .admin-logo {
        width: 58px;
        height: 58px;
    }

    .admin-topbar h1 {
        font-size: 1.3rem;
    }

    .admin-topbar p {
        font-size: .9rem;
    }

    .admin-topbar nav {
        grid-template-columns: 1fr;
    }
}

/* ========================================================================== 
   V6 — Área de email, portal do membro, toasts e responsivo
   ========================================================================== */
.alert-inline-hidden { display: none !important; }
.toast-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 9999;
    display: grid;
    gap: 12px;
    width: min(420px, calc(100vw - 28px));
    pointer-events: none;
}
.toast-item {
    position: relative;
    pointer-events: auto;
    margin: 0 !important;
    padding: 15px 48px 15px 16px !important;
    border-radius: 18px !important;
    box-shadow: 0 20px 55px rgba(7,23,51,.18);
    animation: toastIn .24s ease both;
}
.toast-hide { animation: toastOut .22s ease both; }
.toast-close {
    position: absolute;
    top: 9px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.55);
    color: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px) scale(.98); } }

.hero { min-height: 360px; }
.hero-content { padding: 48px 0 78px; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 4.05rem); margin: 18px 0 14px; }
.hero p { max-width: 820px; }
.brand-lockup { display: inline-flex; align-items: center; gap: 14px; }
.brand-logo { width: 88px; height: 88px; object-fit: contain; border-radius: 50%; background: #fff; padding: 5px; box-shadow: 0 18px 40px rgba(0,0,0,.22); }
.small-logo { width: 72px; height: 72px; }
.main-grid { margin-top: -48px; }
.form-section { padding: 28px; }
.section-heading.compact-heading { margin-bottom: 18px; }
.form-subtitle { margin: 30px 0 14px; color: var(--blue-900); font-size: 1.08rem; display: flex; gap: 10px; align-items: center; }
.single-action { justify-content: flex-end; position: static; border-radius: 0 0 var(--radius) var(--radius); }

.admin-container { width: min(1500px, calc(100% - 32px)); }
.detail-grid { grid-template-columns: minmax(360px, 430px) minmax(0, 1fr); gap: 22px; }
.users-grid { grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); }
.admin-sidebar-card { position: sticky; top: 118px; align-self: start; }
.table-wrap { overflow-x: visible; }
.table-wrap.no-horizontal-scroll { overflow-x: visible; }
.admin-table, .data-table { min-width: 0; table-layout: fixed; }
.admin-table th, .admin-table td, .data-table th, .data-table td { overflow-wrap: anywhere; word-break: normal; }
.admin-table td:last-child, .admin-table th:last-child { text-align: right; }
.users-table th:nth-child(1), .users-table td:nth-child(1) { width: 22%; }
.users-table th:nth-child(2), .users-table td:nth-child(2) { width: 13%; }
.users-table th:nth-child(3), .users-table td:nth-child(3) { width: 24%; }
.users-table th:nth-child(4), .users-table td:nth-child(4) { width: 12%; }
.users-table th:nth-child(5), .users-table td:nth-child(5) { width: 12%; }
.users-table th:nth-child(6), .users-table td:nth-child(6) { width: 12%; }
.users-table th:nth-child(7), .users-table td:nth-child(7) { width: 130px; }
.table-title-row { display:flex; justify-content:space-between; align-items:center; gap:16px; padding: 22px 22px 0; }
.table-title-row h2 { margin:0; }
.table-title-row span { color: var(--gray-500); font-weight:800; }
.badge.neutral { background: var(--gray-100); color: var(--blue-900); }
.files-box h3, .admin-card h2 { display:flex; align-items:center; gap:10px; }
.compact-form label { margin-bottom: 12px; }
.inline-check { margin: 8px 0 14px; }
.mini-log { padding: 12px 0; border-bottom: 1px solid var(--gray-200); overflow-wrap:anywhere; }
.mini-log:last-child { border-bottom: 0; }
.error-text { color: var(--red-600); font-weight: 700; }
.detail-item span { overflow-wrap: anywhere; }

.update-hero {
    color: #fff;
    background: radial-gradient(circle at 82% 18%, rgba(146,200,62,.25), transparent 30%), linear-gradient(135deg, var(--blue-950), var(--blue-800));
}
.update-hero-inner { display:flex; align-items:center; gap:18px; padding: 34px 0 66px; }
.update-hero h1 { margin: 8px 0 6px; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1; letter-spacing: -.05em; }
.update-hero p { margin:0; color: rgba(255,255,255,.8); }
.light-pill { background: rgba(255,255,255,.12); color:#fff; }
.update-container { margin-top: -36px; padding-bottom: 80px; }
.update-form-card { padding: 28px; }
.invalid-token-card { padding: 34px; }
.member-update-page .conditional-box { margin-bottom: 20px; }

@media (max-width: 1180px) {
    .detail-grid, .users-grid { grid-template-columns: 1fr; }
    .admin-sidebar-card { position: static; }
}

@media (max-width: 900px) {
    .hero { min-height: auto; }
    .hero-content { padding: 34px 0 64px; }
    .brand-logo { width: 72px; height: 72px; }
    .main-grid { margin-top: -30px; }
    .admin-container { width: min(100% - 22px, 1500px); }
    .admin-topbar { position: relative; }

    .responsive-table thead { display: none; }
    .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100% !important; }
    .responsive-table tr {
        margin: 14px 14px 18px;
        padding: 14px;
        border: 1px solid var(--gray-200);
        border-radius: 20px;
        background: #fff;
        box-shadow: 0 12px 30px rgba(7,23,51,.06);
    }
    .responsive-table tbody td {
        display: grid;
        grid-template-columns: 120px minmax(0, 1fr);
        gap: 12px;
        padding: 10px 0 !important;
        border-bottom: 1px solid rgba(217,225,236,.72) !important;
        text-align: left !important;
    }
    .responsive-table tbody td:last-child { border-bottom: 0 !important; }
    .responsive-table tbody td::before {
        content: attr(data-label);
        color: var(--gray-500);
        font-size: .76rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }
    .table-card::before { content: none !important; display: none !important; }
}

@media (max-width: 720px) {
    .toast-stack { top: 10px; right: 10px; width: calc(100vw - 20px); }
    .form-nav.single-action .btn { width: 100%; }
    .update-hero-inner { padding: 26px 0 56px; align-items:flex-start; }
    .update-form-card { padding: 18px; }
    .responsive-table tbody td { grid-template-columns: 1fr; gap: 4px; }
}

/* ==========================================================================
   V7 — Correcções solicitadas: selects de países, dashboard amplo,
   tabelas sem scroll horizontal e visual sem bordas arredondadas.
   ========================================================================== */
:root { --radius: 0px; }
*, *::before, *::after { border-radius: 0 !important; }
html, body { max-width: 100%; overflow-x: hidden; }

/* Cabeçalho do formulário mais compacto e enquadrado */
.hero {
    min-height: auto !important;
    display: block !important;
    background: radial-gradient(circle at 82% 18%, rgba(146,200,62,.16), transparent 26%), linear-gradient(135deg, #071733 0%, #0b2d5f 100%) !important;
}
.hero-overlay { display: none !important; }
.hero-content {
    padding: 28px 0 38px !important;
    max-width: 1160px !important;
}
.brand-lockup {
    min-height: 0 !important;
    padding: 8px 12px !important;
    gap: 12px !important;
    max-width: max-content !important;
}
.brand-logo {
    width: 58px !important;
    height: 58px !important;
    padding: 4px !important;
}
.brand-lockup .brand-pill { font-size: .96rem !important; }
.brand-lockup span { font-size: .82rem !important; }
.hero h1 {
    max-width: 930px !important;
    font-size: clamp(2rem, 3.4vw, 3.15rem) !important;
    line-height: 1.02 !important;
    margin: 18px 0 12px !important;
}
.hero p {
    max-width: 920px !important;
    font-size: 1rem !important;
    line-height: 1.58 !important;
}
.hero-actions { margin-top: 18px !important; }
.main-grid {
    margin-top: 28px !important;
    grid-template-columns: 280px minmax(0, 1fr) !important;
    gap: 22px !important;
}
.side-card { top: 18px !important; padding: 22px !important; }
.form-section { padding: 26px !important; }
.section-heading { margin-bottom: 20px !important; }

/* Campos e botões sem cantos arredondados */
.btn, input, select, textarea, .check, .switch-line, .conditional-box,
.publication-box, .consent-box, .alert, .badge, .mini-note, .ref-code,
.side-card, .form-card, .admin-card, .login-card, .install-card, .policy-card,
.detail-item, .stat-card, .toast-item, .toast-close, .success-icon {
    border-radius: 0 !important;
}
.btn { letter-spacing: .01em; }

/* Dashboard administrativo: usar praticamente toda a largura da tela */
.admin-page {
    background: linear-gradient(180deg, #f5f7fb 0%, #e9eef6 100%) !important;
}
.admin-topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    padding: 18px 28px !important;
    gap: 22px !important;
}
.admin-topbar nav { gap: 10px !important; }
.admin-topbar nav .btn { min-height: 42px !important; padding: 10px 14px !important; }
.admin-logo { width: 58px !important; height: 58px !important; padding: 4px !important; }
.admin-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto 70px !important;
    padding: 26px 28px !important;
}
.admin-dashboard { display: grid; gap: 18px; }
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.stat-card {
    background: #fff;
    border: 1px solid rgba(217,225,236,.95);
    box-shadow: 0 12px 30px rgba(7,23,51,.07);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.stat-card i {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #071733;
    color: #fff;
    flex: 0 0 auto;
}
.stat-card strong {
    display: block;
    color: var(--blue-950);
    font-size: 1.65rem;
    line-height: 1;
}
.stat-card span {
    display: block;
    color: var(--gray-500);
    font-weight: 800;
    margin-top: 4px;
}
.filters-card { padding: 18px !important; }
.filters-grid, .filter-grid {
    grid-template-columns: minmax(280px, 1.4fr) minmax(180px, .55fr) minmax(240px, .75fr) 140px !important;
    gap: 14px !important;
}
.filters-grid input, .filters-grid select, .filter-grid input, .filter-grid select {
    min-height: 48px !important;
}
.filters-grid .btn, .filter-grid .btn { min-height: 48px !important; }
.table-title-row {
    padding: 18px 18px 0 !important;
}
.table-card { overflow: visible !important; }
.table-card::before { content: none !important; display: none !important; }
.table-wrap, .table-wrap.no-horizontal-scroll {
    overflow-x: visible !important;
    overflow-y: visible !important;
    width: 100% !important;
}
.admin-table, .data-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
}
.admin-table th, .admin-table td,
.data-table th, .data-table td {
    padding: 12px 10px !important;
    font-size: .9rem !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    text-align: left !important;
}
.admin-table th, .data-table th {
    font-size: .72rem !important;
    letter-spacing: .055em !important;
}
.admin-table td strong, .data-table td strong {
    display: inline !important;
    max-width: none !important;
}
.admin-table td:last-child, .admin-table th:last-child,
.data-table td:last-child, .data-table th:last-child { text-align: left !important; }
.admin-table .btn.small, .data-table .btn.small {
    min-height: 34px !important;
    padding: 7px 9px !important;
    font-size: .78rem !important;
    white-space: normal !important;
    width: 100% !important;
}
.cadastros-table th:nth-child(1), .cadastros-table td:nth-child(1) { width: 8% !important; }
.cadastros-table th:nth-child(2), .cadastros-table td:nth-child(2) { width: 18% !important; }
.cadastros-table th:nth-child(3), .cadastros-table td:nth-child(3) { width: 13% !important; }
.cadastros-table th:nth-child(4), .cadastros-table td:nth-child(4) { width: 14% !important; }
.cadastros-table th:nth-child(5), .cadastros-table td:nth-child(5) { width: 16% !important; }
.cadastros-table th:nth-child(6), .cadastros-table td:nth-child(6) { width: 17% !important; }
.cadastros-table th:nth-child(7), .cadastros-table td:nth-child(7) { width: 8% !important; }
.cadastros-table th:nth-child(8), .cadastros-table td:nth-child(8) { width: 6% !important; }
.users-table th:nth-child(1), .users-table td:nth-child(1) { width: 20% !important; }
.users-table th:nth-child(2), .users-table td:nth-child(2) { width: 12% !important; }
.users-table th:nth-child(3), .users-table td:nth-child(3) { width: 23% !important; }
.users-table th:nth-child(4), .users-table td:nth-child(4) { width: 11% !important; }
.users-table th:nth-child(5), .users-table td:nth-child(5) { width: 10% !important; }
.users-table th:nth-child(6), .users-table td:nth-child(6) { width: 14% !important; }
.users-table th:nth-child(7), .users-table td:nth-child(7) { width: 10% !important; }
.detail-grid { grid-template-columns: 390px minmax(0, 1fr) !important; }
.users-grid { grid-template-columns: 370px minmax(0, 1fr) !important; }
.detail-list { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }

@media (max-width: 1180px) {
    .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-grid, .users-grid { grid-template-columns: 1fr !important; }
    .detail-list { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 900px) {
    .admin-container { padding: 18px 12px !important; }
    .admin-topbar { position: relative !important; padding: 16px 14px !important; }
    .main-grid { grid-template-columns: 1fr !important; margin-top: 16px !important; }
    .side-card { position: static !important; }
    .brand-lockup { max-width: 100% !important; width: 100% !important; }
    .hero-content { padding: 18px 0 28px !important; }
    .hero h1 { font-size: clamp(1.8rem, 9vw, 2.55rem) !important; }
    .form-section { padding: 18px 14px !important; }
    .dashboard-stats { grid-template-columns: 1fr 1fr; }
    .filters-grid, .filter-grid { grid-template-columns: 1fr !important; }
    .responsive-table thead { display: none !important; }
    .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block !important; width: 100% !important; }
    .responsive-table tr {
        margin: 0 0 14px !important;
        padding: 12px !important;
        border: 1px solid var(--gray-200) !important;
        background: #fff !important;
        box-shadow: 0 8px 22px rgba(7,23,51,.06) !important;
    }
    .responsive-table tbody td {
        display: grid !important;
        grid-template-columns: 125px minmax(0, 1fr) !important;
        gap: 10px !important;
        border-bottom: 1px solid rgba(217,225,236,.72) !important;
        padding: 9px 0 !important;
    }
    .responsive-table tbody td:last-child { border-bottom: 0 !important; }
    .responsive-table tbody td::before {
        content: attr(data-label);
        color: var(--gray-500);
        font-size: .72rem;
        font-weight: 900;
        letter-spacing: .06em;
        text-transform: uppercase;
    }
    .responsive-table .btn.small { width: auto !important; }
}
@media (max-width: 560px) {
    .dashboard-stats { grid-template-columns: 1fr; }
    .admin-topbar nav { grid-template-columns: 1fr !important; }
    .detail-list { grid-template-columns: 1fr !important; }
    .responsive-table tbody td { grid-template-columns: 1fr !important; gap: 4px !important; }
    .hero-actions .btn, .btn { width: 100%; }
    .brand-logo { width: 52px !important; height: 52px !important; }
}


/* V8 — Template profissional final sem cantos arredondados */
:root {
    --radius: 0px !important;
    --admin-sidebar-width: 286px;
    --admin-header-height: 78px;
    --surface: #ffffff;
    --surface-soft: #f6f8fb;
    --line: #d7e0ec;
    --ink: #071733;
    --muted: #667085;
    --primary: #0a2452;
    --primary-2: #0b3474;
    --accent: #bfd72f;
    --accent-2: #f2bd45;
}

*, *::before, *::after { border-radius: 0 !important; }
html, body { max-width: 100%; }
body { overflow-x: hidden; }

/* Área pública — cabeçalho compacto e formulário melhor enquadrado */
body:not(.admin-page) .hero {
    min-height: auto !important;
    display: block !important;
    align-items: initial !important;
    overflow: visible !important;
    background:
        linear-gradient(90deg, rgba(7,23,51,.97), rgba(7,23,51,.86)),
        radial-gradient(circle at 78% 22%, rgba(146, 200, 62, .16), transparent 34%),
        linear-gradient(135deg, #06142e, #0b3474) !important;
    border-bottom: 5px solid var(--accent) !important;
}
body:not(.admin-page) .hero::before,
body:not(.admin-page) .hero-overlay { display: none !important; }
body:not(.admin-page) .hero-content {
    width: min(1420px, calc(100% - 48px)) !important;
    max-width: 1420px !important;
    margin: 0 auto !important;
    padding: 32px 0 44px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
        "brand actions"
        "title actions";
    gap: 18px 32px !important;
    align-items: end !important;
}
body:not(.admin-page) .brand-lockup {
    grid-area: brand !important;
    align-self: start !important;
    display: inline-flex !important;
    width: max-content !important;
    max-width: 100% !important;
    background: rgba(255,255,255,.08) !important;
    border: 1px solid rgba(255,255,255,.22) !important;
    padding: 8px 12px !important;
    gap: 10px !important;
}
body:not(.admin-page) .brand-logo {
    width: 54px !important;
    height: 54px !important;
    padding: 3px !important;
    background: #fff !important;
    border: 1px solid rgba(255,255,255,.28) !important;
}
body:not(.admin-page) .brand-pill {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: .96rem !important;
    line-height: 1.15 !important;
}
body:not(.admin-page) .brand-lockup span { display: block !important; color: rgba(255,255,255,.78) !important; font-size: .8rem !important; }
body:not(.admin-page) .hero h1 {
    grid-area: title !important;
    max-width: 880px !important;
    margin: 0 !important;
    font-size: clamp(2.15rem, 4.4vw, 4.5rem) !important;
    line-height: .98 !important;
    letter-spacing: -.055em !important;
}
body:not(.admin-page) .hero p {
    max-width: 920px !important;
    margin: 12px 0 0 !important;
    font-size: 1.04rem !important;
    line-height: 1.65 !important;
    color: rgba(255,255,255,.86) !important;
}
body:not(.admin-page) .hero-actions {
    grid-area: actions !important;
    align-self: end !important;
    justify-self: end !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    min-width: 235px !important;
}
body:not(.admin-page) .container { width: min(1420px, calc(100% - 48px)) !important; max-width: 1420px !important; }
body:not(.admin-page) .main-grid {
    width: min(1420px, calc(100% - 48px)) !important;
    max-width: 1420px !important;
    grid-template-columns: 300px minmax(0, 1fr) !important;
    gap: 26px !important;
    margin: 34px auto 0 !important;
    padding-bottom: 80px !important;
    align-items: start !important;
}
body:not(.admin-page) .side-card,
body:not(.admin-page) .form-card {
    border: 1px solid var(--line) !important;
    box-shadow: 0 18px 46px rgba(7,23,51,.10) !important;
}
body:not(.admin-page) .side-card { padding: 24px !important; position: sticky !important; top: 18px !important; }
body:not(.admin-page) .form-section { padding: 30px 34px !important; }
body:not(.admin-page) .section-heading { margin-bottom: 22px !important; }
body:not(.admin-page) .section-heading > span { width: 42px !important; height: 42px !important; }
body:not(.admin-page) .form-nav { padding: 18px 34px !important; }

/* Admin — shell profissional com menu lateral */
.admin-page {
    background: #edf2f8 !important;
    color: var(--ink) !important;
    min-height: 100vh !important;
}
.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--admin-sidebar-width) minmax(0, 1fr);
    background: #edf2f8;
}
.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #071733;
    color: #fff;
    border-right: 1px solid rgba(255,255,255,.10);
    box-shadow: 12px 0 34px rgba(7,23,51,.16);
    z-index: 50;
}
.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.admin-sidebar-brand img {
    width: 58px;
    height: 58px;
    background: #fff;
    border: 1px solid rgba(255,255,255,.35);
    padding: 3px;
    flex: 0 0 auto;
}
.admin-sidebar-brand strong { display: block; font-size: 1.05rem; line-height: 1.15; }
.admin-sidebar-brand span { display: block; color: rgba(255,255,255,.68); font-size: .82rem; margin-top: 3px; }
.admin-menu { padding: 16px 14px; display: grid; gap: 8px; }
.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    color: rgba(255,255,255,.82);
    font-weight: 900;
    text-decoration: none;
    border-left: 4px solid transparent;
    background: transparent;
}
.admin-nav-link i { width: 20px; text-align: center; color: var(--accent); }
.admin-nav-link:hover,
.admin-nav-link.active {
    text-decoration: none;
    color: #fff;
    background: rgba(255,255,255,.09);
    border-left-color: var(--accent);
}
.admin-sidebar-footer {
    margin-top: auto;
    padding: 16px 14px 20px;
    border-top: 1px solid rgba(255,255,255,.12);
}
.admin-user-mini { padding: 0 14px 12px; color: rgba(255,255,255,.72); font-size: .88rem; }
.admin-user-mini strong { display: block; color: #fff; font-size: .95rem; }
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-page-head {
    min-height: var(--admin-header-height);
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 28px;
    position: sticky;
    top: 0;
    z-index: 30;
}
.admin-page-title h1 {
    margin: 0;
    font-size: clamp(1.55rem, 2vw, 2.15rem);
    line-height: 1.04;
    letter-spacing: -.035em;
    color: var(--ink);
}
.admin-page-title p { margin: 5px 0 0; color: var(--muted); font-size: .98rem; }
.admin-page-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.admin-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 24px 28px 68px !important;
}
.admin-dashboard { display: grid; gap: 20px; }
.dashboard-stats {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important;
    align-items: stretch !important;
}
.stat-card {
    background: #fff !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 10px 26px rgba(7,23,51,.07) !important;
    padding: 18px !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    min-width: 0 !important;
}
.stat-card i {
    width: 48px !important;
    height: 48px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--primary) !important;
    color: #fff !important;
    font-size: 1.05rem !important;
    flex: 0 0 48px !important;
}
.stat-card strong { display: block !important; font-size: 2rem !important; line-height: 1 !important; color: var(--ink) !important; }
.stat-card span { display: block !important; color: var(--muted) !important; font-weight: 900 !important; margin-top: 5px !important; }
.admin-card {
    background: #fff !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 12px 34px rgba(7,23,51,.07) !important;
    padding: 20px !important;
    margin-bottom: 0 !important;
}
.filters-card { padding: 18px !important; }
.filters-grid, .filter-grid {
    display: grid !important;
    grid-template-columns: minmax(260px, 1.3fr) minmax(160px, .52fr) minmax(230px, .72fr) 138px !important;
    gap: 14px !important;
    align-items: end !important;
}
.filters-grid input, .filters-grid select, .filter-grid input, .filter-grid select,
.admin-form input, .admin-form select, .admin-form textarea {
    min-height: 46px !important;
}
.table-card { padding: 0 !important; overflow: visible !important; }
.table-title-row {
    padding: 18px 20px !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 14px !important;
    border-bottom: 1px solid var(--line) !important;
}
.table-title-row h2 { margin: 0 !important; font-size: 1.35rem !important; }
.table-title-row span { color: var(--muted) !important; font-weight: 800 !important; }
.table-wrap, .table-wrap.no-horizontal-scroll {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
}
.admin-table, .data-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
}
.admin-table th, .admin-table td,
.data-table th, .data-table td {
    padding: 13px 14px !important;
    border-bottom: 1px solid var(--line) !important;
    vertical-align: middle !important;
    text-align: left !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    line-height: 1.35 !important;
    font-size: .92rem !important;
}
.admin-table th, .data-table th {
    background: #f7f9fc !important;
    color: #526071 !important;
    font-size: .73rem !important;
    text-transform: uppercase !important;
    letter-spacing: .065em !important;
    font-weight: 950 !important;
}
.admin-table small, .data-table small { color: var(--muted) !important; margin: 3px 0 0 !important; line-height: 1.25 !important; }
.admin-table td:last-child, .admin-table th:last-child, .data-table td:last-child, .data-table th:last-child { text-align: right !important; }
.admin-table .btn.small, .data-table .btn.small { min-height: 36px !important; padding: 8px 10px !important; font-size: .82rem !important; width: auto !important; white-space: nowrap !important; }
.cadastros-table th:nth-child(1), .cadastros-table td:nth-child(1) { width: 9% !important; }
.cadastros-table th:nth-child(2), .cadastros-table td:nth-child(2) { width: 18% !important; }
.cadastros-table th:nth-child(3), .cadastros-table td:nth-child(3) { width: 13% !important; }
.cadastros-table th:nth-child(4), .cadastros-table td:nth-child(4) { width: 14% !important; }
.cadastros-table th:nth-child(5), .cadastros-table td:nth-child(5) { width: 15% !important; }
.cadastros-table th:nth-child(6), .cadastros-table td:nth-child(6) { width: 18% !important; }
.cadastros-table th:nth-child(7), .cadastros-table td:nth-child(7) { width: 8% !important; }
.cadastros-table th:nth-child(8), .cadastros-table td:nth-child(8) { width: 5% !important; }
.users-table th:nth-child(1), .users-table td:nth-child(1) { width: 18% !important; }
.users-table th:nth-child(2), .users-table td:nth-child(2) { width: 12% !important; }
.users-table th:nth-child(3), .users-table td:nth-child(3) { width: 24% !important; }
.users-table th:nth-child(4), .users-table td:nth-child(4) { width: 12% !important; }
.users-table th:nth-child(5), .users-table td:nth-child(5) { width: 10% !important; }
.users-table th:nth-child(6), .users-table td:nth-child(6) { width: 14% !important; }
.users-table th:nth-child(7), .users-table td:nth-child(7) { width: 10% !important; }
.badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 10px !important;
    min-height: 28px !important;
    font-size: .78rem !important;
    line-height: 1 !important;
    font-weight: 950 !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}
.badge.neutral { background: #eaf0f7 !important; color: #334155 !important; }
.pagination { padding: 16px 20px !important; border-top: 1px solid var(--line) !important; }
.detail-grid { display: grid !important; grid-template-columns: 420px minmax(0, 1fr) !important; gap: 20px !important; align-items: start !important; }
.users-grid { display: grid !important; grid-template-columns: 390px minmax(0, 1fr) !important; gap: 20px !important; align-items: start !important; }
.detail-list { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.detail-item { min-width: 0 !important; overflow-wrap: anywhere !important; }
.btn {
    border: 0 !important;
    min-height: 42px !important;
    padding: 10px 15px !important;
    font-weight: 950 !important;
    letter-spacing: .005em !important;
    box-shadow: none !important;
    transform: none !important;
}
.btn:hover { transform: none !important; text-decoration: none !important; filter: brightness(.98); }
.btn.primary, .btn.success { background: linear-gradient(90deg, var(--accent), var(--accent-2)) !important; color: var(--ink) !important; }
.btn.ghost { background: #eaf0f7 !important; color: var(--ink) !important; }
.btn.danger { background: #fee4e2 !important; color: #912018 !important; }
input, select, textarea {
    border: 1px solid var(--line) !important;
    background: #fff !important;
    box-shadow: none !important;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary-2) !important; box-shadow: 0 0 0 3px rgba(11,52,116,.12) !important; }

@media (max-width: 1180px) {
    .admin-shell { grid-template-columns: 92px minmax(0, 1fr) !important; }
    .admin-sidebar-brand { justify-content: center !important; padding: 18px 10px !important; }
    .admin-sidebar-brand div, .admin-nav-link span, .admin-user-mini { display: none !important; }
    .admin-menu { padding: 14px 10px !important; }
    .admin-nav-link { justify-content: center !important; padding: 13px 8px !important; }
    .admin-nav-link i { width: auto !important; }
    .admin-sidebar-footer { padding: 14px 10px !important; }
    .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .detail-grid, .users-grid { grid-template-columns: 1fr !important; }
    .detail-list { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 900px) {
    body { overflow-x: hidden !important; }
    body:not(.admin-page) .hero-content {
        width: min(100% - 28px, 100%) !important;
        display: block !important;
        padding: 20px 0 28px !important;
    }
    body:not(.admin-page) .hero h1 { font-size: clamp(1.85rem, 8vw, 2.85rem) !important; margin-top: 18px !important; }
    body:not(.admin-page) .hero p { font-size: .96rem !important; }
    body:not(.admin-page) .hero-actions { display: grid !important; grid-template-columns: 1fr !important; min-width: 0 !important; margin-top: 18px !important; }
    body:not(.admin-page) .container,
    body:not(.admin-page) .main-grid { width: min(100% - 28px, 100%) !important; }
    body:not(.admin-page) .main-grid { grid-template-columns: 1fr !important; gap: 16px !important; margin-top: 18px !important; }
    body:not(.admin-page) .side-card { position: static !important; }
    body:not(.admin-page) .form-section { padding: 20px 16px !important; }
    body:not(.admin-page) .grid.two { grid-template-columns: 1fr !important; }
    body:not(.admin-page) .checks-grid { grid-template-columns: 1fr !important; }
    body:not(.admin-page) .form-nav { padding: 14px 16px !important; }

    .admin-shell { display: block !important; }
    .admin-sidebar {
        position: relative !important;
        height: auto !important;
        display: block !important;
        border-right: 0 !important;
        box-shadow: none !important;
    }
    .admin-sidebar-brand { justify-content: flex-start !important; padding: 14px !important; }
    .admin-sidebar-brand div, .admin-nav-link span, .admin-user-mini { display: block !important; }
    .admin-menu {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        padding: 12px 14px !important;
    }
    .admin-nav-link { justify-content: flex-start !important; padding: 11px 12px !important; background: rgba(255,255,255,.07) !important; }
    .admin-sidebar-footer { display: none !important; }
    .admin-page-head { position: relative !important; padding: 16px 14px !important; display: block !important; }
    .admin-page-actions { justify-content: flex-start !important; margin-top: 12px !important; }
    .admin-container { padding: 16px 14px 56px !important; }
    .dashboard-stats { grid-template-columns: 1fr !important; }
    .filters-grid, .filter-grid { grid-template-columns: 1fr !important; }
    .table-title-row { display: block !important; }
    .responsive-table thead { display: none !important; }
    .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block !important; width: 100% !important; }
    .responsive-table tr {
        margin: 0 !important;
        padding: 12px 14px !important;
        border-bottom: 8px solid #edf2f8 !important;
        background: #fff !important;
    }
    .responsive-table tbody td {
        display: grid !important;
        grid-template-columns: 132px minmax(0, 1fr) !important;
        gap: 12px !important;
        border-bottom: 1px solid var(--line) !important;
        padding: 10px 0 !important;
        text-align: left !important;
    }
    .responsive-table tbody td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: .72rem;
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: .06em;
    }
    .responsive-table tbody td:last-child { border-bottom: 0 !important; text-align: left !important; }
    .responsive-table .btn.small { width: auto !important; white-space: normal !important; }
    .detail-list { grid-template-columns: 1fr !important; }
    .users-grid, .detail-grid { display: block !important; }
    .users-grid > .admin-card, .detail-grid > .admin-card { margin-bottom: 16px !important; }
}
@media (max-width: 560px) {
    .admin-menu { grid-template-columns: 1fr !important; }
    .admin-page-actions .btn, .hero-actions .btn, .btn.full { width: 100% !important; }
    .responsive-table tbody td { grid-template-columns: 1fr !important; gap: 4px !important; }
    .stat-card strong { font-size: 1.65rem !important; }
}

/* =========================================================
   V9 — Dashboard profissional, datatables contidas e layout sem arredondamentos
   ========================================================= */
html, body { max-width: 100% !important; overflow-x: hidden !important; }
.admin-page *,
.admin-page *::before,
.admin-page *::after { box-sizing: border-box !important; }
.admin-main { min-width: 0 !important; width: 100% !important; overflow-x: hidden !important; }
.admin-card,
.stat-card,
.grade-tile,
.info-tile,
.chart-card,
.filters-card,
.table-card,
input,
select,
textarea,
.btn,
.badge,
.alert,
.toast-item,
.detail-item,
.side-card,
.form-card,
.check,
.switch-line,
.conditional-box,
.publication-box,
.consent-box,
.ref-code,
.mini-note { border-radius: 0 !important; }
.admin-sidebar,
.admin-page-head { border-radius: 0 !important; }

.admin-container.admin-dashboard.dashboard-only {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
}
.dashboard-top-stats { margin: 0 !important; }
.dashboard-section-card { overflow: hidden !important; }
.dashboard-section-title {
    display: flex !important;
    justify-content: space-between !important;
    gap: 16px !important;
    align-items: flex-start !important;
    margin-bottom: 18px !important;
}
.dashboard-section-title h2,
.chart-card h2 {
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 1.28rem !important;
    letter-spacing: -.02em !important;
}
.dashboard-section-title p,
.chart-help {
    margin: 5px 0 0 !important;
    color: var(--muted) !important;
    font-weight: 650 !important;
    line-height: 1.45 !important;
}
.grade-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
}
.grade-tile {
    border: 1px solid var(--line) !important;
    background: #f8fafc !important;
    padding: 16px !important;
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 12px !important;
    align-items: center !important;
    min-width: 0 !important;
}
.grade-tile > i {
    width: 46px !important;
    height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--primary) !important;
    color: #fff !important;
}
.grade-tile strong,
.info-tile strong { display: block !important; font-size: 1.8rem !important; line-height: 1 !important; color: var(--ink) !important; }
.grade-tile span,
.info-tile span { display: block !important; color: var(--muted) !important; font-weight: 900 !important; margin-top: 5px !important; }
.mini-progress {
    grid-column: 1 / -1 !important;
    height: 8px !important;
    background: #e6edf5 !important;
    overflow: hidden !important;
}
.mini-progress span { display: block !important; height: 100% !important; background: linear-gradient(90deg, var(--accent), var(--accent-2)) !important; }
.dashboard-grid-two {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
    align-items: stretch !important;
    min-width: 0 !important;
}
.dashboard-grid-three {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 20px !important;
}
.chart-card { min-width: 0 !important; overflow: hidden !important; }
.bar-list { display: grid !important; gap: 12px !important; margin-top: 18px !important; }
.bar-row { min-width: 0 !important; }
.bar-label {
    display: flex !important;
    justify-content: space-between !important;
    gap: 12px !important;
    align-items: center !important;
    margin-bottom: 7px !important;
    min-width: 0 !important;
}
.bar-label span { font-weight: 900 !important; overflow-wrap: anywhere !important; min-width: 0 !important; }
.bar-label strong { flex: none !important; color: var(--ink) !important; }
.bar-track {
    height: 12px !important;
    background: #e7eef7 !important;
    overflow: hidden !important;
    width: 100% !important;
}
.bar-track span { display: block !important; height: 100% !important; background: linear-gradient(90deg, var(--primary), var(--primary-2)) !important; }
.bar-track.alt span { background: linear-gradient(90deg, var(--accent), var(--accent-2)) !important; }
.age-chart {
    height: 250px !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 14px !important;
    align-items: end !important;
    margin-top: 18px !important;
    padding-top: 22px !important;
}
.age-col {
    min-width: 0 !important;
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    gap: 9px !important;
    height: 100% !important;
    text-align: center !important;
    align-items: end !important;
}
.age-bar {
    width: 100% !important;
    min-height: 8px !important;
    background: linear-gradient(180deg, var(--accent), var(--primary-2)) !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding-top: 6px !important;
    color: var(--ink) !important;
    font-weight: 950 !important;
}
.age-col strong { color: var(--muted) !important; font-size: .9rem !important; }
.status-list { display: grid !important; gap: 15px !important; margin-top: 18px !important; }
.status-row {
    display: grid !important;
    grid-template-columns: minmax(120px, 1fr) auto !important;
    gap: 10px !important;
    align-items: center !important;
}
.status-row .bar-track { grid-column: 1 / -1 !important; }
.dashboard-note-box {
    margin-top: 18px !important;
    border: 1px solid var(--line) !important;
    background: #f8fafc !important;
    padding: 14px !important;
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr) !important;
    gap: 10px !important;
    color: var(--muted) !important;
}
.dashboard-note-box p { margin: 0 !important; line-height: 1.45 !important; font-weight: 650 !important; }
.info-tile {
    display: grid !important;
    grid-template-columns: 52px minmax(0, 1fr) !important;
    gap: 14px !important;
    align-items: center !important;
    min-width: 0 !important;
}
.info-tile > i {
    width: 52px !important;
    height: 52px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--primary) !important;
    color: #fff !important;
}
.empty-chart {
    border: 1px dashed var(--line) !important;
    padding: 18px !important;
    color: var(--muted) !important;
    font-weight: 800 !important;
    background: #f8fafc !important;
}

.cadastros-page { display: grid !important; gap: 20px !important; }
.table-card { max-width: 100% !important; overflow: hidden !important; }
.table-wrap,
.table-wrap.no-horizontal-scroll {
    overflow-x: hidden !important;
    overflow-y: visible !important;
    max-width: 100% !important;
    width: 100% !important;
}
.admin-table,
.data-table {
    table-layout: fixed !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}
.admin-table th,
.admin-table td,
.data-table th,
.data-table td {
    max-width: 0 !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}
.admin-table td *:not(.btn),
.data-table td *:not(.btn) {
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
}
.admin-table .btn.small,
.data-table .btn.small {
    max-width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.15 !important;
}
.cadastros-table th:nth-child(1), .cadastros-table td:nth-child(1) { width: 8% !important; }
.cadastros-table th:nth-child(2), .cadastros-table td:nth-child(2) { width: 18% !important; }
.cadastros-table th:nth-child(3), .cadastros-table td:nth-child(3) { width: 12% !important; }
.cadastros-table th:nth-child(4), .cadastros-table td:nth-child(4) { width: 13% !important; }
.cadastros-table th:nth-child(5), .cadastros-table td:nth-child(5) { width: 15% !important; }
.cadastros-table th:nth-child(6), .cadastros-table td:nth-child(6) { width: 18% !important; }
.cadastros-table th:nth-child(7), .cadastros-table td:nth-child(7) { width: 9% !important; }
.cadastros-table th:nth-child(8), .cadastros-table td:nth-child(8) { width: 7% !important; }

@media (max-width: 1180px) {
    .grade-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .dashboard-grid-two { grid-template-columns: 1fr !important; }
    .dashboard-grid-three { grid-template-columns: 1fr !important; }
}
@media (max-width: 900px) {
    .admin-container.admin-dashboard.dashboard-only { gap: 16px !important; }
    .grade-summary-grid { grid-template-columns: 1fr !important; }
    .age-chart { height: 220px !important; gap: 8px !important; }
    .table-wrap,
    .table-wrap.no-horizontal-scroll { overflow: visible !important; }
    .responsive-table th,
    .responsive-table td { max-width: none !important; overflow: visible !important; }
}

/* =========================================================
   V10 — Ajuste cirúrgico: sidebar administrativa fixa no scroll
   ========================================================= */
@media (min-width: 901px) {
    .admin-page {
        overflow-x: hidden !important;
    }
    .admin-shell {
        display: block !important;
        min-height: 100vh !important;
        background: #edf2f8 !important;
    }
    .admin-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: var(--admin-sidebar-width) !important;
        height: 100vh !important;
        max-height: 100vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        z-index: 1000 !important;
    }
    .admin-main {
        margin-left: var(--admin-sidebar-width) !important;
        width: calc(100vw - var(--admin-sidebar-width)) !important;
        max-width: calc(100vw - var(--admin-sidebar-width)) !important;
        min-height: 100vh !important;
        overflow-x: hidden !important;
    }
    .admin-page-head {
        top: 0 !important;
        z-index: 900 !important;
    }
}

@media (min-width: 901px) and (max-width: 1180px) {
    .admin-sidebar {
        width: 92px !important;
    }
    .admin-main {
        margin-left: 92px !important;
        width: calc(100vw - 92px) !important;
        max-width: calc(100vw - 92px) !important;
    }
}

@media (max-width: 900px) {
    .admin-shell {
        display: block !important;
    }
    .admin-sidebar {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        bottom: auto !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        z-index: 1 !important;
    }
    .admin-main {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}


/* Developer credit */
.developer-credit { color: var(--gray-500); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.developer-credit a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(100, 116, 139, .35); }
.developer-credit a:hover { color: var(--blue-700); border-bottom-color: var(--blue-700); }
.footer-copy { display: flex; flex-direction: column; gap: 5px; }
.minimal-credit { margin-top: 18px; text-align: center; }
.admin-sidebar-footer .developer-credit-sidebar { margin: 10px 0 8px; padding: 10px 12px; border-top: 1px solid rgba(255,255,255,.10); border-bottom: 1px solid rgba(255,255,255,.08); color: rgba(229,231,235,.70); line-height: 1.35; }
.admin-sidebar-footer .developer-credit-sidebar span { display: block; margin: 0 0 2px; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: rgba(229,231,235,.52); }
.admin-sidebar-footer .developer-credit-sidebar a { color: #e5e7eb; border-bottom-color: rgba(229,231,235,.28); }
@media (max-width: 680px) { .footer-copy { align-items: center; text-align: center; } .minimal-credit { font-size: 11px; } }

.admin-login-credit { margin-top: 18px; text-align: center; }


/* Syntrix final: sem arredondamentos */
*, *::before, *::after { border-radius: 0 !important; }


/* V19 auth pages fix - Cadastro/Admin */
body.admin-login-page{
    min-height:100vh;
    margin:0;
    color:var(--blue-950,#061b3a);
    background:radial-gradient(circle at 12% 16%,rgba(146,200,62,.18),transparent 26%),radial-gradient(circle at 88% 12%,rgba(242,189,69,.14),transparent 24%),linear-gradient(135deg,#f7fafc 0%,#edf2f8 100%);
}
.admin-login-shell{min-height:100vh;display:grid;grid-template-columns:minmax(360px,1fr) minmax(420px,520px);align-items:center;gap:56px;width:min(1120px,calc(100% - 40px));margin:0 auto;padding:46px 0;}
.admin-login-shell.single-auth{grid-template-columns:minmax(320px,520px);justify-content:center;}
.admin-login-card{position:relative;overflow:hidden;padding:34px;background:rgba(255,255,255,.94);border:1px solid rgba(217,225,236,.95);box-shadow:0 34px 90px rgba(7,23,51,.18);}
.admin-login-card::before{content:"";position:absolute;inset:0 0 auto;height:7px;background:linear-gradient(90deg,var(--green-500,#bfd72f),var(--gold-500,#f2bd45),var(--blue-700,#0b4c8c));}
.admin-login-card-brand{display:flex;align-items:center;gap:14px;margin-bottom:26px;}
.admin-login-card-logo{width:66px;height:66px;object-fit:contain;background:#fff;padding:5px;border:3px solid #fff;box-shadow:0 14px 34px rgba(7,23,51,.14);flex:0 0 auto;}
.admin-login-card-brand strong{display:block;line-height:1.1;font-weight:950;letter-spacing:-.02em;}
.admin-login-card-brand span{display:block;margin-top:4px;color:var(--gray-500,#667085);font-weight:700;}
.admin-login-card h2{margin:14px 0 8px;font-size:2rem;line-height:1.05;letter-spacing:-.045em;}
.admin-login-subtitle{margin:0 0 26px;color:var(--gray-500,#667085);font-weight:650;line-height:1.55;}
.admin-login-form{display:grid;gap:16px;}
.admin-login-form label{margin:0;font-weight:900;}
.admin-login-form input,.admin-login-form select,.admin-login-form textarea{width:100%;min-height:54px;background:#fff;border:1px solid var(--gray-200,#d9e1ec);padding:12px 14px;font:inherit;font-weight:750;color:var(--blue-950,#061b3a);}
.admin-login-form input:focus,.admin-login-form select:focus,.admin-login-form textarea:focus{outline:3px solid rgba(191,215,47,.28);border-color:var(--gold-500,#f2bd45);}
.admin-login-actions{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-top:10px;color:var(--gray-500,#667085);font-size:.92rem;font-weight:650;}
.admin-login-actions a{font-weight:900;}
.admin-login-links-inline{display:flex;gap:12px;flex-wrap:wrap;justify-content:flex-end;}
.admin-login-card .btn.primary.full{min-height:56px;margin-top:6px;font-size:1rem;width:100%;}
.admin-login-credit{margin-top:18px;text-align:center;font-size:.78rem;color:var(--gray-500,#667085);font-weight:800;}
@media(max-width:980px){.admin-login-shell{grid-template-columns:1fr;width:min(620px,calc(100% - 28px));gap:20px;padding:28px 0}.admin-login-hero{display:none}}
@media(max-width:560px){.admin-login-shell{width:min(100% - 20px,620px);padding:16px 0}.admin-login-card{padding:24px 18px}.admin-login-card h2{font-size:1.72rem}.admin-login-card-logo{width:58px;height:58px}.admin-login-actions{flex-direction:column;align-items:flex-start}.admin-login-links-inline{justify-content:flex-start}}
body.admin-login-page *, body.admin-login-page *::before, body.admin-login-page *::after{border-radius:0!important;}
