:root {
    --red: #ce1126;
    --black: #111111;
    --yellow: #ffcd00;
    --bg: #f5f5f5;
    --white: #ffffff;
    --text: #1a1a1a;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Segoe UI", "Trebuchet MS", "Gill Sans", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 17px;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Entrada global das paginas (desactivado em prefers-reduced-motion) */
@keyframes siteBarIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes siteMainIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes siteFooterIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes chatFloatIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes chatFloatGlow {
    0%,
    100% {
        box-shadow:
            0 4px 0 rgba(0, 0, 0, 0.12),
            0 10px 28px rgba(0, 0, 0, 0.26),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow:
            0 4px 0 rgba(0, 0, 0, 0.1),
            0 12px 36px rgba(206, 17, 38, 0.38),
            0 0 0 1px rgba(255, 205, 0, 0.45),
            inset 0 1px 0 rgba(255, 255, 255, 0.28);
    }
}

@keyframes sitePanelReveal {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.topbar {
    background: var(--black);
    color: var(--white);
    padding: 12px 16px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-bottom: 4px solid var(--yellow);
    position: sticky;
    top: 0;
    z-index: 20;
    animation: siteBarIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.topbar a {
    color: var(--white);
    text-decoration: none;
    margin-right: 0;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    font-size: 0.98rem;
    font-weight: 700;
}

.topbar a:hover { color: var(--yellow); background: rgba(255, 255, 255, 0.08); }
.topbar a.active {
    color: var(--black);
    background: var(--yellow);
    border-color: var(--yellow);
}
.brand {
    display: inline-block;
    color: var(--red);
    font-size: 1.35rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    font-weight: 800;
    text-decoration: none;
    line-height: 1.2;
    border-radius: 8px;
    padding: 6px 2px;
    transition: color 0.2s ease, background 0.2s ease;
}

/* Nome do portal: link para inicio (nao usar estilo dos itens do menu) */
.topbar > a.brand {
    color: var(--red);
    border: 1px solid transparent;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.topbar > a.brand:hover {
    color: #ff8a96;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.topbar > a.brand:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 3px;
    color: #ffb3bc;
}
.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--white);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 14px;
}
.menu-toggle:hover { background: rgba(255, 255, 255, 0.1); }

.container { max-width: 1040px; margin: 20px auto; padding: 0 12px; }

main.container {
    animation: siteMainIn 0.44s cubic-bezier(0.22, 1, 0.36, 1) both;
}

main.container .alert {
    animation: siteMainIn 0.36s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

main.container .alert ~ .alert {
    animation-delay: 0.11s;
}
.hero { background: var(--red); color: var(--white); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.hero-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero h1 {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 8px;
}
.hero p {
    font-size: 1.08rem;
}
.card {
    background: var(--white);
    border-left: 5px solid var(--yellow);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 22px;
    align-items: center;
    border-left: none;
    border-top: 4px solid var(--yellow);
    background: linear-gradient(140deg, #ffffff 0%, #fff7ef 50%, #fff3f5 100%);
    padding: 24px;
}

.landing-hero__kicker {
    margin: 0 0 8px;
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--red);
}

.landing-hero h1 {
    margin-top: 0;
    margin-bottom: 12px;
    line-height: 1.2;
    font-size: clamp(1.65rem, 3.2vw, 2.3rem);
}

.landing-hero__lead {
    margin-top: 0;
    margin-bottom: 18px;
    max-width: 42rem;
    color: #3b3b3b;
}

.landing-hero__list {
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.landing-hero__list li {
    position: relative;
    padding-left: 22px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2f2f2f;
}

.landing-hero__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--red), #9f0f22);
    box-shadow: 0 0 0 2px rgba(206, 17, 38, 0.14);
}

.landing-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.landing-person {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #eadfd6;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.landing-person__img {
    width: 100%;
    aspect-ratio: 5 / 4;
    object-fit: cover;
    display: block;
}

.landing-person__quote {
    margin: 0;
    padding: 15px 16px 18px;
    font-size: 0.98rem;
    font-style: italic;
    font-weight: 600;
    color: #2e2e2e;
    line-height: 1.55;
    border-top: 1px solid #f0e7df;
    background: #fffcf6;
}

.landing-person__meta {
    margin: 0;
    padding: 0 16px 14px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6a5a4f;
    background: #fffcf6;
}

.landing-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    border-left: none;
    border-top: 4px solid #e8e8e8;
}

.landing-kpi {
    background: #fcfcfc;
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 14px;
    display: grid;
    gap: 4px;
}

.landing-kpi strong {
    font-size: 1.6rem;
    line-height: 1.05;
    color: var(--red);
}

.landing-kpi span {
    font-size: 0.86rem;
    font-weight: 700;
    color: #555;
}

.landing-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.landing-highlight {
    margin-bottom: 0;
}

.landing-highlight h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.landing-highlight p {
    margin: 0;
    color: #484848;
}

.landing-process {
    border-left: none;
    border-top: 4px solid var(--black);
}

.landing-section-kicker {
    margin: 0 0 8px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--red);
}

.landing-process__head h2 {
    margin: 0 0 16px;
    font-size: 1.35rem;
}

.landing-process__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.landing-process__steps li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    padding: 14px;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid #e4e7eb;
}

.landing-step__num {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--black);
    color: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}

.landing-process__steps h3 {
    margin: 1px 0 6px;
    font-size: 0.98rem;
}

.landing-process__steps p {
    margin: 0;
    font-size: 0.88rem;
    color: #555;
}

.landing-cta {
    border-left: none;
    border-top: 4px solid var(--red);
    background: linear-gradient(130deg, #fff 0%, #fff6f6 100%);
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.landing-cta h2 {
    margin: 0 0 8px;
    font-size: 1.45rem;
}

.landing-cta p {
    margin: 0;
    color: #4a4a4a;
}

.landing-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.form-grid { display: grid; gap: 10px; }

.manage-users-create-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 14px 16px;
}

.manage-users-create-grid .manage-users-create__name {
    grid-column: 1 / -1;
    margin-top: 0;
    margin-bottom: 10px;
}

/* Espaço entre resumo (Total / Ativos) e formulário de cadastro — evita sobreposição visual */
.manage-users-top-card .manage-users-top-card__title {
    margin-top: 0;
    margin-bottom: 18px;
}

.manage-users-top-card__stats.stats {
    margin-bottom: 0;
    padding-bottom: 22px;
}

.manage-users-top-card form.manage-users-create-grid {
    margin-top: 0;
    padding-top: 26px;
    border-top: 1px solid #e2e2e2;
}

.manage-users-top-card .stat-box:hover {
    transform: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.09);
}

.manage-users-create-grid .manage-users-submit {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 6px;
    min-height: 48px;
    padding: 14px 28px;
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: none;
    border-radius: 10px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.12), 0 8px 20px rgba(206, 17, 38, 0.25);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.manage-users-create-grid .manage-users-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 0 rgba(0, 0, 0, 0.1), 0 12px 26px rgba(206, 17, 38, 0.3);
    filter: brightness(1.05);
}

.manage-users-create-grid .manage-users-submit:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.2);
}

.manage-users-create-grid .manage-users-submit:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 3px;
}

.manage-users-create-grid input:not([type="hidden"]),
.manage-users-create-grid select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.manage-users-create__access-block {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px 16px;
    margin-top: 2px;
    background: linear-gradient(180deg, #fafbfc 0%, #f4f5f7 100%);
    border: 1px solid #dfe3ea;
    border-radius: 12px;
    border-left: 4px solid var(--yellow);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.manage-users-create__label--access {
    display: grid;
    gap: 8px;
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
}

.manage-users-create__label-text {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1f2937;
    letter-spacing: 0.01em;
}

.manage-users-create-grid .manage-users-create__select {
    min-height: 50px;
    padding: 12px 40px 12px 14px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    color: #111;
    background-color: #fff;
    border: 2px solid #c5cad3;
    border-radius: 10px;
    cursor: pointer;
    appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235c6370' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.manage-users-create-grid .manage-users-create__select:hover:not(:disabled) {
    border-color: #9ca3af;
}

.manage-users-create-grid .manage-users-create__select:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(206, 17, 38, 0.15);
}

.manage-users-create-grid .manage-users-create__select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background-color: #eef0f3;
    color: #6b7280;
}

label { display: grid; gap: 6px; font-weight: 700; font-size: 1rem; }
.form-hint {
    font-weight: 500;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.4;
}

.form-label-sub {
    font-weight: 600;
    font-size: 0.86rem;
    color: #555;
    line-height: 1.35;
}

.password-field {
    display: flex;
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    gap: 0;
    min-width: 0;
}

.password-field__input {
    flex: 1 1 auto;
    min-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right-width: 0;
}

.password-field__toggle {
    flex: 0 0 auto;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: var(--white);
    background: #2d2d2d;
    border: 1px solid #c8c8c8;
    border-left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.password-field__toggle:hover {
    background: #111;
}

.password-field__toggle:focus-visible {
    position: relative;
    outline: 2px solid var(--yellow);
    outline-offset: 2px;
    z-index: 1;
}

.manage-users-actions-col {
    min-width: 18rem;
    vertical-align: top;
}

.manage-users-pw-details {
    margin-bottom: 12px;
}

.manage-users-pw-details__summary {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px 6px 10px;
    font-weight: 800;
    font-size: 0.84rem;
    letter-spacing: 0.02em;
    color: var(--red);
    list-style: none;
    border: 1px solid rgba(206, 17, 38, 0.35);
    border-radius: 8px;
    background: linear-gradient(180deg, #fff5f5 0%, #fff 100%);
    user-select: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.manage-users-pw-details__summary::-webkit-details-marker {
    display: none;
}

.manage-users-pw-details__summary::before {
    content: "";
    display: inline-block;
    width: 0.45em;
    height: 0.45em;
    border-right: 2px solid var(--red);
    border-bottom: 2px solid var(--red);
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
    margin-top: -2px;
}

.manage-users-pw-details[open] > .manage-users-pw-details__summary::before {
    transform: rotate(45deg);
    margin-top: 2px;
}

.manage-users-pw-details__summary:hover {
    border-color: rgba(206, 17, 38, 0.55);
    background: #fff;
}

.manage-users-pw-form {
    margin-top: 12px;
    padding: 16px 18px 18px;
    width: 100%;
    min-width: min(100%, 340px);
    max-width: 100%;
    box-sizing: border-box;
    background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
    border: 1px solid #d1d5db;
    border-radius: 10px;
    display: grid;
    gap: 14px;
    box-shadow: 0 4px 14px rgba(17, 17, 17, 0.06);
}

.manage-users-pw-form__label {
    display: grid;
    gap: 8px;
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
    color: #374151;
}

.manage-users-pw-form .password-field--table {
    min-width: 0;
}

.manage-users-pw-form .password-field--table .password-field__input {
    min-height: 46px;
    padding: 12px 12px;
    font-size: 0.95rem;
    border-width: 2px;
    border-color: #c5cad3;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.manage-users-pw-form .password-field__toggle--table {
    min-width: 4.75rem;
    padding: 12px 10px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--red);
    border: 2px solid var(--red);
    border-left: 0;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.manage-users-pw-form .password-field__toggle--table:hover {
    background: #ab0f20;
    border-color: #ab0f20;
}

.manage-users-pw-form .password-field__toggle--table:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 2px;
}

.manage-users-pw-form__submit {
    margin-top: 4px;
    padding: 12px 16px;
    font-weight: 800;
    font-size: 0.92rem;
    border-radius: 8px;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}

.manage-users-toggle-form {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e5e5e5;
}

.manage-users-toggle-form button {
    width: 100%;
    max-width: 20rem;
    padding: 11px 16px;
    border-radius: 8px;
    font-weight: 800;
}

main.container:has(.manage-users-table) {
    max-width: 1380px;
    padding-left: max(18px, env(safe-area-inset-left, 0px));
    padding-right: max(18px, env(safe-area-inset-right, 0px));
}

.manage-users-table-card {
    padding: 18px 22px 24px;
}

.manage-users-table-scroll {
    margin-top: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 1px solid #e0e4ea;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.manage-users-table {
    width: 100%;
    min-width: 1080px;
    font-size: 1.05rem;
    border-radius: 0;
}

.manage-users-table th,
.manage-users-table td {
    padding: 18px 22px;
    font-size: 1.04rem;
}

.manage-users-table th {
    padding: 14px 20px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: linear-gradient(180deg, #f1f3f6 0%, #e8ecf0 100%);
    border-bottom: 2px solid #d8dce4;
    color: #3d4451;
}

.manage-users-table tbody tr:hover {
    background: #fffdf6;
}

.manage-users-area-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.manage-users-area-form__select {
    flex: 1 1 220px;
    min-width: 200px;
    max-width: 100%;
}

.manage-users-area-form__btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 800;
}

.manage-users-create__name {
    position: relative;
    padding: 14px 16px 16px;
    margin: 0 0 4px;
    background: linear-gradient(135deg, rgba(255, 205, 0, 0.12) 0%, rgba(255, 255, 255, 0.9) 55%);
    border: 1px solid rgba(206, 17, 38, 0.12);
    border-radius: 10px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.manage-users-create__name-label {
    font-size: 1.02rem;
    letter-spacing: 0.01em;
}

.manage-users-create__name input {
    font-size: 1.05rem;
    font-weight: 600;
    padding: 13px 14px;
    border-color: #b8b8b8;
}

.manage-users-create__name input::placeholder {
    font-weight: 500;
    color: #888;
}

.manage-users-create__name input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(206, 17, 38, 0.12);
}
input, select, textarea, button {
    padding: 12px;
    border: 1px solid #c8c8c8;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus, select:focus, textarea:focus, button:focus, a:focus {
    outline: 2px solid rgba(206, 17, 38, 0.25);
    outline-offset: 1px;
    border-color: var(--red);
}

button {
    background: var(--red);
    color: var(--white);
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.15s ease, background-color 0.2s ease;
}

button:hover {
    background: #ab0f20;
    transform: translateY(-1px);
}

.inline-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dashboard-filter {
    align-items: end;
    margin-bottom: 12px;
}

.report-toolbar {
    margin-bottom: 10px;
    align-items: end;
}

.btn {
    display: inline-block;
    text-decoration: none;
    font-weight: 700;
    border-radius: 6px;
    padding: 11px 16px;
    font-size: 0.98rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.btn-dark { background: var(--black); color: var(--white); }
.btn-light { background: var(--yellow); color: var(--black); }
.btn-dark:hover, .btn-light:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
}
th, td {
    text-align: left;
    border-bottom: 1px solid #ececec;
    padding: 10px;
    font-size: 0.97rem;
}
th {
    background: #fafafa;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
tbody tr:hover {
    background: #fff9e6;
}

.alert {
    border-radius: 6px;
    padding: 10px 12px;
    font-weight: 600;
    border: 1px solid transparent;
}
.success { background: #e2f8e8; color: #0c6a2b; border-color: #93ddb0; }
.danger { background: #ffe5e5; color: #850909; border-color: #f2b4b4; }
.info { background: #e8f2ff; color: #0b3d7a; border-color: #9ec5ff; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.badge.success { background: #dcf7e5; color: #0d6b2e; }
.badge.danger { background: #ffe1e1; color: #8d0d0d; }
.badge.warn { background: #fff3d8; color: #8a5c00; }
.badge.muted { background: #ececec; color: #444; }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}
.stat-box {
    background: #fff8dd;
    border: 1px solid #f0df95;
    border-radius: 8px;
    padding: 10px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-box span { display: block; font-size: 0.95rem; font-weight: 600; }
.stat-box strong { font-size: 1.8rem; color: var(--red); }
.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(0,0,0,0.1);
}

main.container .stats .stat-box {
    animation: sitePanelReveal 0.34s ease both;
}

main.container .stats .stat-box:nth-child(1) {
    animation-delay: 0.03s;
}

main.container .stats .stat-box:nth-child(2) {
    animation-delay: 0.06s;
}

main.container .stats .stat-box:nth-child(3) {
    animation-delay: 0.09s;
}

main.container .stats .stat-box:nth-child(4) {
    animation-delay: 0.12s;
}

main.container .stats .stat-box:nth-child(5) {
    animation-delay: 0.15s;
}

main.container .stats .stat-box:nth-child(6) {
    animation-delay: 0.18s;
}

h1, h2, h3 {
    color: #111;
    letter-spacing: 0.2px;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

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

.user-filter-form {
    margin-bottom: 12px;
    align-items: end;
}

.progress {
    width: 120px;
    height: 8px;
    border-radius: 999px;
    background: #ececec;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-bar {
    height: 8px;
    background: linear-gradient(90deg, var(--red), var(--yellow));
}

.chat-layout {
    display: grid;
    grid-template-columns: minmax(240px, 280px) 1fr;
    gap: 16px;
    margin-bottom: 16px;
    align-items: stretch;
}

.chat-window {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-bottom: 4px;
}

.chat-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.chat-contact-list a {
    display: block;
    padding: 10px;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    color: #111;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.chat-contact-list a small {
    display: block;
    margin-top: 4px;
    color: #555;
    font-weight: 500;
}

.chat-contact-list a.active {
    background: #fff7d2;
    border-color: #f0df95;
}
.chat-contact-list a:hover {
    transform: translateX(2px);
    background: #fffaf0;
}

.chat-thread__header {
    padding-bottom: 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid #e8e8e8;
}

.chat-thread__title {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #111;
}

.chat-thread__subtitle {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: #5c6370;
}

.chat-messages--thread {
    flex: 1 1 auto;
    min-height: 260px;
    max-height: min(52vh, 520px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    margin: 12px 0 0;
    padding: 16px 14px 20px;
    background:
        linear-gradient(180deg, #f6f7f9 0%, #eef0f4 100%);
    border: 1px solid #dde1e8;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.75);
}

.chat-thread__empty {
    margin: auto;
    padding: 28px 20px;
    text-align: center;
    max-width: 28rem;
}

.chat-thread__empty-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #374151;
}

.chat-thread__empty-text {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b7280;
    line-height: 1.55;
}

.chat-msg {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px 14px;
    max-width: min(100%, 38rem);
    align-items: start;
}

.chat-msg--out {
    margin-left: auto;
    grid-template-columns: minmax(0, 1fr) 42px;
}

.chat-msg--out .chat-msg__avatar {
    order: 2;
}

.chat-msg--out .chat-msg__body-wrap {
    order: 1;
}

.chat-msg__avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.chat-msg--in .chat-msg__avatar {
    background: linear-gradient(145deg, #4b5563 0%, #374151 100%);
}

.chat-msg--out .chat-msg__avatar {
    background: linear-gradient(145deg, var(--red) 0%, #9f0f22 100%);
}

.chat-msg__body-wrap {
    min-width: 0;
    padding: 12px 14px 14px;
    border-radius: 12px;
    border: 1px solid #e2e5ea;
    background: #fff;
    box-shadow: 0 1px 3px rgba(17, 17, 17, 0.06);
}

.chat-msg--out .chat-msg__body-wrap {
    background: linear-gradient(180deg, #fffefb 0%, #fff9e8 100%);
    border-color: #e8d9a8;
}

.chat-msg__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 12px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eef0f4;
}

.chat-msg__who {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #374151;
}

.chat-msg__time {
    font-size: 0.78rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #868e96;
}

.chat-msg__subject {
    margin: 0 0 10px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.45;
}

.chat-msg__subject-label {
    display: inline-block;
    margin-right: 8px;
    padding: 2px 8px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
    background: #f3f4f6;
    border-radius: 4px;
    vertical-align: middle;
}

.chat-msg__text {
    font-size: 0.98rem;
    line-height: 1.6;
    color: #252a31;
    word-break: break-word;
}

.chat-msg__attach {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--red);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.chat-msg__attach:hover {
    border-color: #fecaca;
    background: #fef2f2;
    box-shadow: 0 2px 8px rgba(206, 17, 38, 0.12);
}

.chat-msg__attach-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-msg__attach-hint {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}

.chat-composer {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e8e8e8;
}

.chat-composer__title {
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 800;
    color: #2c3138;
    letter-spacing: 0.02em;
}

.chat-composer__form {
    gap: 12px;
}

.chat-composer__textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.55;
    font-family: inherit;
}

.chat-composer__submit {
    justify-self: start;
    padding: 12px 24px;
    font-weight: 800;
    letter-spacing: 0.02em;
    border-radius: 10px;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.1);
}

.chat-float {
    position: fixed;
    right: max(16px, env(safe-area-inset-right, 0px) + 8px);
    bottom: max(20px, env(safe-area-inset-bottom, 0px) + 14px);
    z-index: 35;
    overflow: visible;
    text-decoration: none;
    color: var(--white);
    min-height: 48px;
    padding: 10px 20px 10px 16px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: linear-gradient(165deg, #e01830 0%, var(--red) 45%, #a30d1f 100%);
    border: 2px solid rgba(255, 205, 0, 0.95);
    box-shadow:
        0 4px 0 rgba(0, 0, 0, 0.12),
        0 10px 28px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation:
        chatFloatIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) both,
        chatFloatGlow 2.8s ease-in-out 0.6s infinite;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.chat-float__icon {
    flex-shrink: 0;
    opacity: 0.98;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.chat-float__label {
    line-height: 1;
}

.chat-float:hover {
    background: linear-gradient(165deg, #f02238 0%, #b01024 55%, #8a0c1c 100%);
    transform: translateY(-3px);
    box-shadow:
        0 6px 0 rgba(0, 0, 0, 0.1),
        0 14px 32px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    filter: brightness(1.03);
}

.chat-float:active {
    transform: translateY(-1px);
    box-shadow:
        0 2px 0 rgba(0, 0, 0, 0.14),
        0 6px 16px rgba(0, 0, 0, 0.22),
        inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.chat-float:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 4px;
}

.chat-unread-badge {
    position: absolute;
    top: -7px;
    right: 2px;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffe566 0%, var(--yellow) 100%);
    color: var(--black);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    animation: chatBadgeIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    z-index: 2;
}

@keyframes chatBadgeIn {
    from {
        opacity: 0;
        transform: scale(0.65);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
}

.reveal.is-visible {
    animation: fadeUp 0.5s ease forwards;
}

.main-nav.open {
    animation: fadeUp 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .dash-pro .dash-kpi {
        animation: none !important;
        opacity: 1;
    }

    .dash-pro .dash-kpi:hover {
        transform: none !important;
    }

    .home-step {
        animation: none !important;
        opacity: 1;
    }

    .chat-float {
        animation: none !important;
    }
}

.footer {
    padding: 26px 16px;
    background: linear-gradient(180deg, #111 0%, #181818 100%);
    color: #f4f4f4;
    animation: siteFooterIn 0.5s ease 0.06s both;
}

.footer__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 1fr auto;
    gap: 20px;
    align-items: start;
}

.footer__brand strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.footer__brand p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #cdcdcd;
}

.footer__links {
    display: grid;
    gap: 8px;
}

.footer__links a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    opacity: 0.94;
}

.footer__links a:hover {
    color: var(--yellow);
}

.footer__meta {
    text-align: right;
}

.footer__meta p {
    margin: 0 0 2px;
    font-size: 0.88rem;
    font-weight: 700;
}

.footer__meta small {
    color: #aeb4bc;
    font-size: 0.8rem;
}

.site-progress {
    position: sticky;
    top: 64px;
    z-index: 18;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.08);
}

.site-progress__bar {
    display: block;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--red) 0%, var(--yellow) 100%);
    transition: width 0.1s linear;
}

.back-to-top {
    position: fixed;
    right: 16px;
    bottom: 92px;
    z-index: 34;
    border-radius: 999px;
    padding: 10px 14px;
    min-height: 44px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 700px) {
    .site-progress {
        top: 59px;
    }

    .footer__inner {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .footer__meta {
        text-align: left;
    }

    .back-to-top {
        right: 12px;
        bottom: 82px;
    }

    .topbar {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .menu-toggle {
        display: inline-block;
    }

    .main-nav {
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 10px;
        padding: 10px;
    }

    .main-nav.open {
        display: flex;
    }

    .topbar a {
        border-radius: 8px;
        width: 100%;
    }

    .landing-hero {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .landing-hero__actions .btn {
        width: 100%;
        text-align: center;
    }

    .landing-hero__list li {
        font-size: 0.9rem;
    }

    .landing-kpis {
        gap: 8px;
    }

    .landing-cta__actions {
        width: 100%;
    }

    .landing-cta__actions .btn {
        width: 100%;
        text-align: center;
    }

    .inline-form input,
    .inline-form select,
    .inline-form button {
        width: 100%;
    }

    .chat-layout {
        grid-template-columns: 1fr;
    }

    .chat-msg {
        max-width: 100%;
    }

    .chat-messages--thread {
        max-height: min(50vh, 420px);
        padding: 12px 10px 16px;
    }

    .chat-float {
        right: max(12px, env(safe-area-inset-right, 0px) + 6px);
        bottom: max(14px, env(safe-area-inset-bottom, 0px) + 10px);
        padding: 10px 14px 10px 12px;
        min-height: 46px;
        gap: 6px;
    }

    .chat-float__icon {
        width: 20px;
        height: 20px;
    }

    .chat-unread-badge {
        top: -5px;
        right: -2px;
        min-width: 20px;
        height: 20px;
        font-size: 0.68rem;
    }

    .manage-users-create-grid .manage-users-submit {
        width: 100%;
        justify-self: stretch;
    }

    .manage-users-actions-col {
        width: auto;
        min-width: 0;
    }

    .manage-users-pw-form {
        max-width: none;
        min-width: 0;
    }
}

/* --- Painel administrativo (padrao executivo) --- */
main.container:has(.dash-pro) {
    max-width: 1240px;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    animation: none;
}

.dash-pro {
    --dash-r-sm: 8px;
    --dash-r-md: 12px;
    --dash-r-lg: 16px;
    --dash-border: #e2e5ea;
    --dash-border-strong: #cdd2dc;
    --dash-muted: #5c6370;
    --dash-muted-2: #868e96;
    --dash-surface: #ffffff;
    --dash-subtle: #f5f6f8;
    --dash-elevated: #fafbfc;
    --dash-shadow: 0 1px 2px rgba(17, 17, 17, 0.04), 0 8px 28px rgba(17, 17, 17, 0.07);
    --dash-shadow-soft: 0 1px 3px rgba(17, 17, 17, 0.06);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-feature-settings: "tnum" 1;
    padding-bottom: 20px;
    color: #1a1d21;
    animation: siteMainIn 0.46s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.dash-pro__hero {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 28px 40px;
    padding: 32px 32px 30px;
    margin-bottom: 22px;
    background-color: var(--dash-surface);
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.98) 100%),
        radial-gradient(ellipse 100% 90% at 100% 0%, rgba(206, 17, 38, 0.055), transparent 52%),
        radial-gradient(circle at 0% 100%, rgba(255, 205, 0, 0.07), transparent 45%);
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-r-lg);
    box-shadow: var(--dash-shadow);
    border-top: 4px solid var(--red);
}

.dash-pro__kicker {
    margin: 0 0 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--red);
}

.dash-pro__title {
    margin: 0 0 10px;
    font-size: clamp(1.55rem, 2.5vw, 1.95rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--black);
    line-height: 1.2;
}

.dash-pro__greet {
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #3d4248;
}

.dash-pro__greet strong {
    font-weight: 800;
    color: var(--black);
}

.dash-pro__lead {
    margin: 0;
    max-width: 40rem;
    font-size: 0.94rem;
    line-height: 1.6;
    color: var(--dash-muted);
    font-weight: 500;
}

.dash-pro__hero-aside {
    text-align: right;
    min-width: 0;
}

.dash-pro__filter-label {
    margin: 0 0 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--dash-muted);
}

.dash-pro__seg {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 5px;
    background: linear-gradient(180deg, #eef0f4 0%, #e8ebf0 100%);
    border-radius: var(--dash-r-md);
    border: 1px solid var(--dash-border-strong);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.75);
}

.dash-pro__seg-item {
    display: inline-block;
    padding: 9px 16px;
    border-radius: var(--dash-r-sm);
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: #3d4451;
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.dash-pro__seg-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.dash-pro__seg-item.is-active {
    background: var(--black);
    color: var(--white);
    border-color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.dash-pro__seg-item:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

.dash-pro__metrics-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--dash-border);
}

.dash-pro__h2--inline {
    margin: 0;
    font-size: 1.15rem;
}

.dash-pro__metrics-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.dash-pro__period-badge {
    display: inline-block;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--black);
    background: linear-gradient(180deg, #fff9e6 0%, #fff3cc 100%);
    border: 1px solid #e8d48a;
    border-radius: 999px;
}

.dash-pro__timestamp {
    font-size: 0.78rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--dash-muted-2);
    padding: 4px 10px;
    background: var(--dash-elevated);
    border: 1px solid var(--dash-border);
    border-radius: 999px;
}

.dash-pro__refresh-note {
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
}

.dash-pro__btn:focus-visible,
.dash-pro__link:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

.dash-pro__panel {
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-r-md);
    padding: 24px 26px 26px;
    margin-bottom: 20px;
    box-shadow: var(--dash-shadow-soft);
}

.dash-pro__panel--metrics {
    padding-bottom: 20px;
}

.dash-pro__panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.dash-pro__h2 {
    margin: 0 0 16px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #2c3138;
}

.dash-pro__panel-head .dash-pro__h2 {
    margin-bottom: 0;
}

.dash-pro__hint {
    font-size: 0.82rem;
    font-weight: 600;
    color: #6b7280;
}

.dash-kpi-grid,
.dash-pro__kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 148px), 1fr));
    gap: 14px;
}

.dash-kpi {
    position: relative;
    padding: 18px 16px 16px;
    background: var(--dash-subtle);
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-r-md);
    min-height: 102px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.dash-kpi:hover {
    border-color: var(--dash-border-strong);
    box-shadow: 0 4px 14px rgba(17, 17, 17, 0.07);
    transform: translateY(-1px);
}

.dash-kpi--primary {
    background: linear-gradient(180deg, #fffefb 0%, #fffdf5 100%);
    border-color: #ede5d0;
}

.dash-kpi--primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12px;
    right: 12px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, var(--red), var(--yellow));
}

.dash-kpi--accent {
    background: #fffbeb;
    border-color: #fcd34d;
}

.dash-kpi--alert {
    background: #fef2f2;
    border-color: #fecaca;
}

.dash-kpi--muted {
    background: #fafafa;
}

.dash-kpi__label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dash-muted);
    line-height: 1.3;
}

.dash-kpi__value {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--black);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.dash-kpi--primary .dash-kpi__value {
    color: var(--red);
}

.dash-kpi--alert .dash-kpi__value {
    color: var(--red);
}

.dash-kpi__unit {
    font-size: 1rem;
    font-weight: 700;
    margin-left: 1px;
    opacity: 0.75;
}

.dash-kpi__meta {
    margin-top: auto;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7280;
    line-height: 1.3;
}

@keyframes dashKpiIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dash-pro .dash-kpi {
    animation: dashKpiIn 0.45s ease backwards;
}

.dash-pro .dash-kpi:nth-child(1) { animation-delay: 0.02s; }
.dash-pro .dash-kpi:nth-child(2) { animation-delay: 0.05s; }
.dash-pro .dash-kpi:nth-child(3) { animation-delay: 0.08s; }
.dash-pro .dash-kpi:nth-child(4) { animation-delay: 0.11s; }
.dash-pro .dash-kpi:nth-child(5) { animation-delay: 0.14s; }
.dash-pro .dash-kpi:nth-child(6) { animation-delay: 0.17s; }
.dash-pro .dash-kpi:nth-child(7) { animation-delay: 0.2s; }
.dash-pro .dash-kpi:nth-child(8) { animation-delay: 0.23s; }
.dash-pro .dash-kpi:nth-child(9) { animation-delay: 0.26s; }
.dash-pro .dash-kpi:nth-child(10) { animation-delay: 0.29s; }

.dash-pro > .dash-pro__panel {
    animation: sitePanelReveal 0.42s ease both;
}

.dash-pro > .dash-pro__panel:nth-child(2) {
    animation-delay: 0.06s;
}

.dash-pro > .dash-pro__panel:nth-child(3) {
    animation-delay: 0.11s;
}

.dash-pro > .dash-pro__panel:nth-child(4) {
    animation-delay: 0.16s;
}

.dash-pro > .dash-pro__panel:nth-child(5) {
    animation-delay: 0.21s;
}

.dash-pro__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--dash-border);
}

.dash-pro__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: #252a31;
    background: var(--dash-surface);
    border: 1px solid var(--dash-border-strong);
    border-radius: var(--dash-r-sm);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.dash-pro__btn:hover {
    background: var(--dash-elevated);
    border-color: #9ca3af;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dash-pro__btn--solid {
    background: var(--black);
    color: var(--white);
    border-color: #000;
}

.dash-pro__btn--solid:hover {
    background: #2d2d2d;
    border-color: #2d2d2d;
    color: var(--white);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.dash-pro__bar {
    display: flex;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: #e4e7ec;
    margin: 14px 0 16px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.dash-pro__bar-seg {
    display: block;
    min-width: 2px;
    height: 100%;
}

.dash-pro__legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
}

.dash-pro__legend li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.dash-pro__legend strong {
    font-weight: 800;
    color: var(--black);
}

.dash-pro__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-pro__empty {
    margin: 8px 0 0;
    padding: 18px;
    text-align: center;
    font-weight: 600;
    color: #6b7280;
    background: var(--dash-subtle);
    border-radius: var(--dash-r-sm);
    border: 1px dashed var(--dash-border);
}

.dash-pro__empty--boxed {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    padding: 22px 24px;
    border-style: solid;
    border-color: var(--dash-border);
    background: linear-gradient(180deg, #fafbfc 0%, #f3f5f7 100%);
}

.dash-pro__empty--boxed strong {
    font-size: 0.95rem;
    color: #374151;
}

.dash-pro__empty--boxed span {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--dash-muted);
    line-height: 1.5;
}

.dash-pro__table-wrap {
    margin-top: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-r-md);
    background: var(--dash-surface);
}

.dash-pro__table-wrap--sticky {
    max-height: min(520px, 70vh);
    overflow: auto;
}

.dash-pro__table-wrap--sticky .dash-pro__table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 var(--dash-border);
}

.dash-pro__table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 0.92rem;
    background: var(--dash-surface);
}

.dash-pro__table thead th {
    padding: 13px 16px;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5c6370;
    background: linear-gradient(180deg, #f1f3f6 0%, #e8ecf0 100%);
    border-bottom: 1px solid var(--dash-border-strong);
}

.dash-pro__table tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid #eef0f3;
    vertical-align: middle;
}

.dash-pro__table tbody tr:last-child td {
    border-bottom: none;
}

.dash-pro__table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.dash-pro__table tbody tr:hover {
    background: #fff9e8;
}

.dash-pro__table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dash-pro__td-empty {
    text-align: center;
    padding: 22px !important;
    color: #6b7280;
    font-weight: 600;
}

.dash-pro__progress {
    width: 100%;
    max-width: 200px;
    height: 6px;
    border-radius: 999px;
    background: #e8eaef;
    overflow: hidden;
}

.dash-pro__progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0f766e, var(--yellow));
}

.dash-pro__pct {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.82rem;
    font-weight: 800;
    color: #374151;
}

.dash-pro__rate-cell {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.dash-pro__code {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 3px 8px;
    background: #f3f4f6;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.dash-pro__clip {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-pro__date {
    font-size: 0.86rem;
    color: #4b5563;
    white-space: nowrap;
}

.dash-pro__link {
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--red);
    text-decoration: none;
    white-space: nowrap;
}

.dash-pro__link:hover {
    text-decoration: underline;
}

.dash-pro__link--btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: var(--white);
    background: var(--red);
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    white-space: nowrap;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.dash-pro__link--btn:hover {
    background: #ab0f20;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(206, 17, 38, 0.35);
}

.dash-pro__link--btn:focus-visible {
    outline: 2px solid var(--black);
    outline-offset: 2px;
}

@media (max-width: 820px) {
    .dash-pro__hero {
        grid-template-columns: 1fr;
    }

    .dash-pro__hero-aside {
        text-align: left;
    }

    .dash-pro__seg {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .dash-pro__metrics-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-pro__metrics-meta {
        width: 100%;
    }

    .dash-pro__actions {
        flex-direction: column;
    }

    .dash-pro__btn {
        width: 100%;
        min-height: 44px;
    }

    .dash-pro__legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

@media (max-width: 720px) {
    .dash-pro__table-wrap:has(.dash-pro__table--stackable) {
        overflow-x: visible;
        border: none;
        background: transparent;
    }

    .dash-pro__table-wrap--sticky:has(.dash-pro__table--stackable) {
        max-height: none;
        overflow: visible;
    }

    .dash-pro__table--stackable {
        min-width: 0;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }

    .dash-pro__table--stackable thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .dash-pro__table--stackable tbody tr {
        display: block;
        margin-bottom: 14px;
        padding: 0;
        border: 1px solid var(--dash-border);
        border-radius: var(--dash-r-md);
        background: var(--dash-surface);
        box-shadow: var(--dash-shadow-soft);
    }

    .dash-pro__table--stackable tbody tr:last-child {
        margin-bottom: 0;
    }

    .dash-pro__table--stackable tbody tr:hover {
        background: var(--dash-surface);
    }

    .dash-pro__table--stackable tbody td {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 8px 12px;
        padding: 12px 14px;
        text-align: right;
        border-bottom: 1px solid #eef0f3;
    }

    .dash-pro__table--stackable tbody td:last-child {
        border-bottom: none;
    }

    .dash-pro__table--stackable tbody td::before {
        content: attr(data-label);
        font-weight: 800;
        text-transform: uppercase;
        font-size: 0.65rem;
        letter-spacing: 0.06em;
        color: #5c6370;
        text-align: left;
        margin-right: auto;
        max-width: 42%;
    }

    .dash-pro__table--stackable tbody td[colspan] {
        display: block;
        text-align: center;
        justify-content: center;
    }

    .dash-pro__table--stackable tbody td[colspan]::before {
        content: none;
    }

    .dash-pro__table--stackable .dash-pro__td-empty {
        text-align: center;
    }

    .dash-pro__table--stackable .dash-pro__clip {
        max-width: none;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        word-break: break-word;
    }

    .dash-pro__table--stackable .dash-pro__rate-cell {
        align-items: flex-end;
    }

    .dash-pro__table--stackable .dash-pro__progress {
        max-width: 100%;
    }

    .dash-pro__table--stackable tbody tr:nth-child(even) {
        background: var(--dash-surface);
    }

    .dash-pro__table--stackable tbody tr:nth-child(even) td {
        background: transparent;
    }

    .dash-pro__table--stackable .dash-pro__link--btn {
        width: 100%;
        min-height: 44px;
    }
}

@media (max-width: 520px) {
    .dash-pro__hero {
        padding: 20px max(16px, env(safe-area-inset-left, 0px)) 20px max(16px, env(safe-area-inset-right, 0px));
    }

    .dash-pro__panel {
        padding: 18px max(16px, env(safe-area-inset-left, 0px)) 18px max(16px, env(safe-area-inset-right, 0px));
    }

    .dash-pro__seg-item {
        flex: 1 1 auto;
        text-align: center;
        padding: 9px 10px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media print {
    .topbar,
    main.container,
    .footer,
    .chat-float,
    .dash-pro,
    .dash-pro > .dash-pro__panel {
        animation: none !important;
    }

    .dash-pro__hero-aside,
    .dash-pro__actions,
    .dash-pro__seg {
        display: none !important;
    }

    .dash-pro__panel,
    .dash-pro__hero {
        box-shadow: none !important;
        break-inside: avoid;
    }

    .dash-pro__table-wrap--sticky {
        max-height: none;
        overflow: visible;
    }
}

/* --- Pagina inicial (portal do municipe) --- */
main.container:has(.home-public) {
    max-width: 1100px;
    animation: none;
}

.home-public {
    padding-bottom: 24px;
}

.home-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 28px 36px;
    align-items: center;
    padding: 32px 32px 36px;
    margin-bottom: 22px;
    background: linear-gradient(135deg, #fffefd 0%, #fff5f5 38%, #fffef8 100%);
    border: 1px solid #ead9d9;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(17, 17, 17, 0.07);
    border-top: 4px solid var(--red);
}

.home-hero__eyebrow {
    margin: 0 0 8px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--red);
}

.home-hero__title {
    margin: 0 0 14px;
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--black);
}

.home-hero__lead {
    margin: 0 0 22px;
    font-size: 1.05rem;
    line-height: 1.65;
    color: #3d3d3d;
    max-width: 38rem;
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Animacoes do hero (ilustracao + balao) — desactivadas com prefers-reduced-motion */
@keyframes homeHeroFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes homeHeroSlideIn {
    from {
        opacity: 0;
        transform: translateX(26px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes homeHeroFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes homeHeroBubbleIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes homeHeroShine {
    0%,
    100% {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    }
    50% {
        box-shadow: 0 8px 28px rgba(206, 17, 38, 0.12);
    }
}

.home-public .home-hero__eyebrow {
    animation: homeHeroFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0s both;
}

.home-public .home-hero__title {
    animation: homeHeroFadeUp 0.58s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.home-public .home-hero__lead {
    animation: homeHeroFadeUp 0.58s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}

.home-public .home-hero__actions {
    animation: homeHeroFadeUp 0.58s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both;
}

.home-public .home-hero__welcome {
    animation: homeHeroSlideIn 0.72s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.home-public .home-hero__figure {
    animation: homeHeroFloat 5.5s ease-in-out 1s infinite;
}

.home-public .home-hero__bubble {
    animation:
        homeHeroBubbleIn 0.62s cubic-bezier(0.34, 1.2, 0.64, 1) 0.5s both,
        homeHeroShine 4s ease-in-out 1.1s infinite;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.home-btn--primary {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}

.home-btn--primary:hover {
    background: #ab0f20;
    border-color: #ab0f20;
    color: var(--white);
}

.home-btn--ghost {
    background: var(--white);
    color: var(--black);
    border-color: #c8c8c8;
}

.home-btn--ghost:hover {
    border-color: var(--black);
}

.home-btn--block {
    width: 100%;
    max-width: 200px;
}

.home-hero__welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.home-hero__figure {
    margin: 0;
    width: 100%;
    max-width: 400px;
}

.home-hero__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 12px 40px rgba(17, 17, 17, 0.12);
    background: #f5f5f5;
}

.home-hero__bubble {
    position: relative;
    margin: 18px auto 0;
    max-width: 100%;
    padding: 16px 18px;
    background: var(--white);
    border: 1px solid #e8e0e0;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.home-hero__bubble::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 10px solid var(--white);
    filter: drop-shadow(0 -1px 0 #e8e0e0);
}

.home-hero__bubble-text {
    display: block;
    font-size: 1.02rem;
    font-weight: 600;
    font-style: italic;
    line-height: 1.55;
    color: #2d2d2d;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 18px;
    align-items: start;
}

.home-public .home-grid .home-panel:nth-child(1) {
    animation: homeHeroFadeUp 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.26s both;
}

.home-public .home-grid .home-panel:nth-child(2) {
    animation: homeHeroFadeUp 0.52s cubic-bezier(0.22, 1, 0.36, 1) 0.34s both;
}

.home-public .home-result {
    animation: homeHeroFadeUp 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-panel {
    background: var(--white);
    border-radius: 12px;
    padding: 22px 24px 24px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--yellow);
}

.home-panel__title {
    margin: 0 0 8px;
    font-size: 1.28rem;
    font-weight: 800;
    color: var(--black);
}

.home-panel__desc {
    margin: 0 0 18px;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.55;
}

.home-area-type {
    margin: 16px 0 8px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--red);
}

.home-area-type:first-of-type {
    margin-top: 0;
}

.home-area-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.home-area-chip {
    padding: 8px 14px;
    background: #f8f8f8;
    border: 1px solid #e4e4e4;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #222;
}

.home-empty {
    margin: 0;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    color: #666;
    font-weight: 600;
}

.home-protocol-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.home-protocol-label {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #555;
}

.home-protocol-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.home-protocol-input {
    flex: 1 1 200px;
    min-width: 0;
    font-weight: 600;
}

.home-result {
    margin-top: 20px;
    padding: 18px;
    background: linear-gradient(180deg, #fafbff 0%, #f5f7fa 100%);
    border: 1px solid #dfe3ea;
    border-radius: 10px;
    font-size: 0.96rem;
    line-height: 1.55;
}

.home-result p {
    margin: 0 0 10px;
}

.home-result p:last-child {
    margin-bottom: 0;
}

.home-result__meta {
    font-size: 0.88rem;
    color: #555;
}

@media (max-width: 860px) {
    .home-hero {
        grid-template-columns: 1fr;
        padding: 24px 20px 28px;
        text-align: center;
    }

    .home-hero__lead {
        margin-left: auto;
        margin-right: auto;
    }

    .home-hero__actions {
        justify-content: center;
    }

    .home-btn--block {
        max-width: none;
    }
}

.home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.45;
    background-image: radial-gradient(circle, rgba(206, 17, 38, 0.07) 1px, transparent 1px);
    background-size: 18px 18px;
}

.home-hero__intro,
.home-hero__welcome {
    position: relative;
    z-index: 1;
}

.home-hero__img-wrap {
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1;
    max-height: min(420px, 70vw);
    margin: 0 auto;
    box-shadow: 0 12px 40px rgba(17, 17, 17, 0.12);
}

.home-hero__img-wrap .home-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

.home-steps {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.home-step {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 18px;
    background: var(--white);
    border: 1px solid #e6e8ec;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border-top: 3px solid var(--yellow);
    animation: homeStepIn 0.5s ease backwards;
}

.home-step:nth-child(1) { animation-delay: 0.05s; }
.home-step:nth-child(2) { animation-delay: 0.12s; }
.home-step:nth-child(3) { animation-delay: 0.19s; }

@keyframes homeStepIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 900;
    color: var(--white);
    background: var(--red);
}

.home-step__title {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--black);
    letter-spacing: -0.01em;
}

.home-step__text {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #555;
    font-weight: 500;
}

.home-btn:focus-visible {
    outline: 3px solid rgba(206, 17, 38, 0.45);
    outline-offset: 2px;
}

.home-result__dl {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(100px, 130px) 1fr;
    column-gap: 16px;
    row-gap: 4px;
    align-items: baseline;
}

.home-result__dl dt {
    margin: 0;
    padding: 0 0 4px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.home-result__dl dt:not(:first-of-type) {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #e8ecf1;
}

.home-result__dl dd {
    margin: 0;
    padding: 0 0 12px;
    font-weight: 600;
    color: #1a1a1a;
    word-break: break-word;
}

.home-result__dt-meta,
.home-result__dd-meta {
    font-size: 0.88rem;
    color: #5c6370;
    font-weight: 600;
}

.home-result__code {
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
    font-size: 0.88rem;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #dde1e8;
    border-radius: 6px;
}

@media (max-width: 720px) {
    .home-steps {
        grid-template-columns: 1fr;
    }

    .home-result__dl {
        grid-template-columns: 1fr;
    }

    .home-result__dl dt {
        border-top: none;
        padding-bottom: 0;
        margin-top: 8px;
    }

    .home-result__dl dt:first-of-type {
        margin-top: 0;
    }

    .home-result__dl dd {
        border-top: none;
        padding-top: 0;
        padding-bottom: 12px;
        border-bottom: 1px solid #e8ecf1;
    }

    .home-result__dl dd:last-of-type {
        border-bottom: none;
        padding-bottom: 0;
    }
}

/* --- Tabs de nivel na pagina inicial (Direcção / Gabinete / Secção) --- */
.home-area-tabs {
    position: relative;
}

.home-area-tabs__bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.home-area-tabs__tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    font-size: 0.92rem;
    font-weight: 800;
    color: #374151;
    background: #f3f4f6;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    cursor: pointer;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.22s ease;
}

.home-area-tabs__tab:hover {
    background: #e8eaef;
    border-color: #9ca3af;
}

.home-area-tabs__prompt {
    margin: 0 0 14px;
    padding: 12px 14px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #4b5563;
    background: #fafafa;
    border: 1px dashed #c4c9d2;
    border-radius: 8px;
}

.home-area-tabs:has(.home-area-tabs__input:checked) .home-area-tabs__prompt {
    display: none;
}

.home-area-tabs__panel {
    display: none;
    padding-top: 4px;
}

#home-tab-direcao:checked ~ #home-panel-direcao,
#home-tab-gabinete:checked ~ #home-panel-gabinete,
#home-tab-seccao:checked ~ #home-panel-seccao {
    display: block;
}

#home-tab-direcao:checked ~ .home-area-tabs__bar label[for="home-tab-direcao"],
#home-tab-gabinete:checked ~ .home-area-tabs__bar label[for="home-tab-gabinete"],
#home-tab-seccao:checked ~ .home-area-tabs__bar label[for="home-tab-seccao"] {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
    transform: scale(1.02);
    box-shadow: 0 4px 14px rgba(17, 17, 17, 0.18);
}

.home-area-tabs__empty {
    margin: 0;
    padding: 14px;
    font-weight: 600;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* --- Formulario nova solicitacao (nivel + area) --- */
.submit-page .submit-lead {
    margin: 0 0 18px;
    font-size: 0.98rem;
    line-height: 1.55;
    color: #444;
}

.submit-req {
    color: var(--red);
    font-weight: 900;
}

.submit-fieldset {
    margin: 0;
    padding: 16px 18px;
    border: 1px solid #d8dce3;
    border-radius: 10px;
    background: #fafbfc;
}

.submit-fieldset--destino {
    border-left: 4px solid var(--yellow);
}

.submit-legend {
    padding: 0 6px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--black);
}

.submit-hint {
    margin: 0 0 12px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #555;
}

.submit-type-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.submit-type-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid #c8cdd5;
    border-radius: 10px;
    background: var(--white);
    cursor: pointer;
    font-weight: 700;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.submit-type-option:has(input:checked) {
    border-color: var(--black);
    box-shadow: 0 0 0 1px var(--black);
}

.submit-type-option:has(input:focus-visible) {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

.submit-type-option input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--red);
}

.submit-type-option__text {
    font-size: 1rem;
    color: #222;
}
