* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #eef2f6;
    color: #1f2933;
    font-family: Inter, Arial, Helvetica, sans-serif;
}

.topbar {
    background:
        linear-gradient(135deg, rgba(15, 47, 74, .96), rgba(18, 73, 105, .94)),
        #0f2f4a;
    color: #fff;
    padding: 20px 40px 18px;
    box-shadow: 0 14px 34px rgba(15, 47, 74, .18);
}

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

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-logo {
    width: 78px;
    max-height: 44px;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
    padding: 5px 8px;
}

.topbar h1 {
    margin: 0;
    font-size: 22px;
}

.topbar p {
    margin: 6px 0 0;
    font-size: 13px;
    opacity: .9;
}

.premium-nav {
    position: relative;
    margin-top: 16px;
}

.nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.nav-toggle-btn {
    display: none;
}

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

.nav-group {
    position: relative;
}

.nav-group-button,
.nav-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .96);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    line-height: 1;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.nav-group-button {
    gap: 7px;
}

.nav-group-button:hover,
.nav-group-button:focus,
.nav-group.active .nav-group-button,
.nav-logout:hover {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .34);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
}

.nav-caret {
    font-size: 12px;
    opacity: .75;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 30;
    min-width: 260px;
    padding: 8px;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 22px 55px rgba(15, 23, 42, .22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.nav-dropdown-right {
    left: auto;
    right: 0;
}

.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown a {
    display: block;
    border-radius: 8px;
    padding: 10px 11px;
    color: #0f2f4a;
    text-decoration: none;
    transition: background .16s ease, color .16s ease;
}

.nav-dropdown a:hover,
.nav-dropdown a.active {
    background: #eef6fb;
}

.nav-dropdown a span {
    display: block;
    font-size: 13px;
    font-weight: 800;
}

.nav-dropdown a small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.nav-logout {
    margin-left: auto;
}

.user-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 12px;
    color: rgba(255, 255, 255, .82);
    white-space: nowrap;
}

.user-chip strong {
    color: #fff;
    font-size: 11px;
    letter-spacing: .04em;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 35px auto;
}

.container-sm {
    width: min(760px, calc(100% - 40px));
}

.card {
    background: #fff;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .08);
    margin-bottom: 24px;
    border: 1px solid rgba(207, 214, 221, .7);
}

h2 {
    margin: 0 0 18px;
    color: #0f2f4a;
}

.subtitle {
    color: #6b7280;
    margin: -8px 0 24px;
    font-size: 14px;
}

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

.grid-4 {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filters {
    display: grid;
    grid-template-columns: 2fr 1.3fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

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

.field {
    display: flex;
    flex-direction: column;
}

label {
    display: block;
    margin-bottom: 7px;
    color: #263746;
    font-size: 13px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cfd6dd;
    border-radius: 8px;
    padding: 0 12px;
    color: #1f2933;
    font-size: 14px;
    background: #fff;
}

textarea {
    min-height: 86px;
    padding-top: 10px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #0f2f4a;
    box-shadow: 0 0 0 3px rgba(15, 47, 74, .12);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.actions-right {
    justify-content: flex-end;
}

button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary,
button.btn-primary {
    background: #0f2f4a;
    color: #fff;
}

.btn-secondary,
button.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-success,
.btn-ok,
.btn-excel,
button.btn-success {
    background: #166534;
    color: #fff;
}

.btn-danger,
button.btn-danger {
    background: #991b1b;
    color: #fff;
}

.btn-warning,
button.btn-warning {
    background: #92400e;
    color: #fff;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-weight: 700;
}

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

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

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

.info-box {
    background: #eaf2f8;
    border: 1px solid #d8dee6;
    border-radius: 8px;
    padding: 12px 14px;
    color: #0f2f4a;
    font-size: 14px;
    font-weight: 700;
}

.reports-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
    padding: 24px 0 6px;
}

.reports-hero h2 {
    margin: 8px 0 8px;
    font-size: 30px;
    color: #0f2f4a;
}

.reports-hero p {
    max-width: 720px;
    margin: 0;
    color: #52616f;
    font-size: 15px;
    line-height: 1.6;
}

.eyebrow {
    color: #0f766e;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

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

.report-card {
    display: flex;
    flex-direction: column;
    min-height: 310px;
    padding: 22px;
    border: 1px solid rgba(207, 214, 221, .85);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 47, 74, .08);
}

.report-card-head,
.section-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.report-card h3 {
    margin: 10px 0 0;
    color: #102f4c;
    font-size: 22px;
}

.report-card p {
    flex: 1;
    margin: 14px 0 18px;
    color: #52616f;
    line-height: 1.55;
}

.report-code {
    padding: 5px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    padding: 4px 9px;
    background: #e5e7eb;
    color: #374151;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.status-pill.ok {
    background: #dcfce7;
    color: #166534;
}

.status-pill.off,
.status-pill.error {
    background: #fee2e2;
    color: #991b1b;
}

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

.report-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 10px 0 18px;
}

.report-metrics.detail {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 22px;
}

.report-metrics > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.report-metrics small {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.report-metrics strong {
    display: block;
    margin-top: 6px;
    color: #102f4c;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.report-actions.compact {
    justify-content: flex-end;
    max-width: 560px;
}

.report-actions form {
    margin: 0;
}

.inline-action-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.btn-mini {
    min-height: 30px;
    padding: 6px 9px;
    font-size: 11px;
}

.spreadsheet-wrap {
    max-height: 560px;
    border: 1px solid #dbe3ea;
    border-radius: 8px;
}

.spreadsheet-table {
    font-size: 13px;
}

.spreadsheet-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    white-space: nowrap;
}

.spreadsheet-table td {
    min-width: 120px;
    max-width: 320px;
    border-right: 1px solid #eef2f6;
    white-space: nowrap;
}

.empty-state {
    padding: 34px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-weight: 800;
    text-align: center;
}

.report-config-form .grid {
    margin-bottom: 16px;
}

.report-period-card {
    padding: 20px 22px;
}

.period-field {
    width: min(220px, 100%);
}

.occurrence-grid {
    margin-top: 14px;
}

.toggle-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #cfd6dd;
    border-radius: 8px;
    background: #f8fafc;
}

.toggle-field input {
    width: 18px;
    min-height: 18px;
}

.error-cell {
    max-width: 360px;
    color: #991b1b;
    white-space: normal;
}

.wide-text-cell {
    min-width: 280px;
    max-width: 520px;
    white-space: normal;
}

.reports-just-filters {
    grid-template-columns: 1.4fr 1fr 1fr 1fr .9fr auto;
    align-items: end;
}

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

.table-wrap table {
    min-width: 760px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #0f2f4a;
    color: #fff;
    text-align: left;
    padding: 12px;
    font-size: 13px;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eef2f6;
    font-size: 14px;
    vertical-align: top;
}

tr:hover {
    background: #f8fafc;
}

.tag {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
}

.tag-ok,
.tag-ativo,
.tag-aprovacao {
    background: #dcfce7;
    color: #166534;
}

.tag-danger,
.tag-inativo,
.tag-exclusao {
    background: #fee2e2;
    color: #991b1b;
}

.tag-info,
.tag-email {
    background: #dbeafe;
    color: #1e40af;
}

.tag-warning,
.tag-geracao {
    background: #fef3c7;
    color: #92400e;
}

.tag-admin {
    background: #fee2e2;
    color: #991b1b;
}

.tag-lab {
    background: #dbeafe;
    color: #1e40af;
}

.tag-leitura {
    background: #dcfce7;
    color: #166534;
}

.muted {
    color: #8a94a3;
}

.help {
    color: #6b7280;
    font-size: 12px;
    margin: -4px 0 16px;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.info-user {
    background: #eaf2f8;
    border: 1px solid #d8dee6;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 22px;
    color: #0f2f4a;
    font-size: 14px;
    font-weight: 700;
}

.footer {
    text-align: center;
    margin-top: 18px;
    font-size: 12px;
    color: #8a94a3;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(15, 47, 74, .92), rgba(12, 72, 105, .78)),
        radial-gradient(circle at 22% 18%, rgba(255,255,255,.18), transparent 30%),
        #0f2f4a;
}

.login-card {
    width: min(430px, 100%);
    padding: 34px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
}

.login-logo {
    display: block;
    width: 118px;
    margin: 0 auto 20px;
}

.login-title {
    text-align: center;
    margin-bottom: 6px;
}

.login-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    margin: 0 0 24px;
}

.login-card button {
    width: 100%;
    margin-top: 14px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi {
    border: 1px solid #eef2f6;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
}

.kpi span {
    display: block;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.kpi strong {
    display: block;
    margin-top: 8px;
    color: #0f2f4a;
    font-size: 28px;
}

.metric-title {
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
}

.metric-value {
    color: #0f2f4a;
    font-size: 32px;
    font-weight: 800;
}

.ok,
.status-ok {
    color: #166534;
    font-weight: 700;
}

.danger,
.status-pendente {
    color: #991b1b;
    font-weight: 700;
}

.warning {
    color: #92400e;
    font-weight: 700;
}

.bar {
    width: 100%;
    height: 9px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #0f2f4a;
}

.bar-row {
    margin-bottom: 14px;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    margin-bottom: 6px;
}

.bar-bg {
    background: #e5e7eb;
    border-radius: 999px;
    height: 14px;
    overflow: hidden;
}

.parametros-box {
    margin-top: 28px;
    border: 1px solid #d8dee6;
    border-radius: 8px;
    overflow: hidden;
    display: none;
}

.parametros-box.visible {
    display: block;
}

.spec-alert {
    margin: 12px 16px;
}

.parametros-title {
    background: #eaf2f8;
    padding: 14px 16px;
    font-weight: 700;
    color: #0f2f4a;
}

.grid-param {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr .7fr 42px;
    gap: 10px;
    align-items: end;
    margin-bottom: 10px;
}

.grid-param-spec {
    grid-template-columns: 1.1fr 1.3fr .55fr .8fr .55fr .55fr 42px;
}

.checks {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-top: 14px;
}

.checks label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.checks input {
    width: auto;
    min-height: auto;
}

.section-title {
    color: #0f2f4a;
    font-weight: 700;
    margin: 24px 0 12px;
}

.info {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    padding: 12px;
}

.info strong {
    color: #0f2f4a;
    display: block;
    margin-bottom: 5px;
}

.status-flow {
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 12px;
    margin-bottom: 18px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.status-aguardando_aprovacao {
    background: #dbeafe;
    color: #1e40af;
}

.status-devolvida_correcao,
.status-rascunho {
    background: #fef3c7;
    color: #92400e;
}

.status-aprovada {
    background: #dcfce7;
    color: #166534;
}

.status-reprovada,
.status-excluida {
    background: #fee2e2;
    color: #991b1b;
}

.fora-especificacao {
    background: #fff1f2;
}

.fora-especificacao:hover {
    background: #ffe4e6;
}

.input-danger {
    border-color: #991b1b;
    box-shadow: 0 0 0 3px rgba(153, 27, 27, .1);
}

.field-warning {
    color: #991b1b;
    font-size: 12px;
    font-weight: 700;
    margin-top: 6px;
}

.motivo {
    max-width: 320px;
    white-space: pre-wrap;
}

.public-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.public-card {
    width: min(900px, 100%);
}

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

.public-logo {
    width: 120px;
    max-height: 52px;
    object-fit: contain;
}

.acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.email-box {
    display: flex;
    gap: 6px;
    align-items: center;
}

.email-box input {
    min-height: 36px;
    font-size: 12px;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d8dee6;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

.permission-item input {
    width: auto;
    min-height: auto;
}

.dashboard-filters {
    padding: 22px;
}

.dashboard-filter-head,
.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.dashboard-filter-head h2,
.panel-title h2 {
    margin: 0;
}

.dashboard-filter-head p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
}

.filters-executive {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 0;
}

.executive-hero {
    display: grid;
    grid-template-columns: 1.6fr .8fr;
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
    background:
        linear-gradient(135deg, rgba(15, 47, 74, .98), rgba(23, 78, 166, .9)),
        #0f2f4a;
    color: #fff;
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(15, 47, 74, .18);
}

.executive-hero h2 {
    color: #fff;
    margin: 8px 0 8px;
    font-size: 28px;
}

.executive-hero p {
    margin: 0;
    color: rgba(255, 255, 255, .82);
}

.eyebrow {
    display: inline-flex;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.executive-hero .eyebrow {
    color: rgba(255, 255, 255, .72);
}

.hero-score {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    border-left: 1px solid rgba(255, 255, 255, .18);
    padding-left: 20px;
    text-align: right;
}

.hero-score span,
.hero-score small {
    color: rgba(255, 255, 255, .74);
    font-size: 13px;
    font-weight: 700;
}

.hero-score strong {
    display: block;
    color: #fff;
    font-size: 46px;
    line-height: 1;
    margin: 8px 0;
}

.executive-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.kpi-card {
    position: relative;
    overflow: hidden;
    min-height: 128px;
    background: #fff;
    border: 1px solid rgba(207, 214, 221, .82);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .07);
}

.kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #174ea6;
}

.kpi-card span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.kpi-card strong {
    display: block;
    margin-top: 10px;
    color: #0f2f4a;
    font-size: 32px;
    line-height: 1;
}

.kpi-card small {
    display: block;
    margin-top: 9px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.kpi-card.compact {
    min-height: 92px;
}

.kpi-card.compact strong {
    font-size: 28px;
}

.kpi-card strong.kpi-text {
    font-size: 20px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.timing-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.accent-green::before {
    background: #16835f;
}

.accent-red::before {
    background: #b42318;
}

.accent-amber::before {
    background: #b54708;
}

.accent-purple::before {
    background: #6f42c1;
}

.accent-slate::before {
    background: #475569;
}

.dashboard-grid-main {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
    gap: 18px;
    margin-bottom: 18px;
}

.panel {
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(207, 214, 221, .82);
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
    min-width: 0;
}

.panel-large {
    min-height: 330px;
}

.insight-list,
.alert-grid {
    display: grid;
    gap: 12px;
}

.insight-card,
.smart-alert {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    background: #f8fafc;
}

.insight-card strong,
.smart-alert strong {
    display: block;
    color: #0f2f4a;
    margin-bottom: 5px;
}

.insight-card p,
.smart-alert p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.45;
}

.insight-indicator,
.smart-alert span {
    display: inline-flex;
    margin-bottom: 9px;
    border-radius: 999px;
    padding: 4px 8px;
    background: #e2e8f0;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
}

.severity-risco {
    background: #fff1f2;
    border-color: #fecdd3;
}

.severity-risco .insight-indicator,
.severity-risco span {
    background: #fee2e2;
    color: #991b1b;
}

.severity-alerta {
    background: #fffbeb;
    border-color: #fde68a;
}

.severity-alerta .insight-indicator,
.severity-alerta span {
    background: #fef3c7;
    color: #92400e;
}

.severity-positivo {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.severity-positivo .insight-indicator,
.severity-positivo span {
    background: #dcfce7;
    color: #166534;
}

.severity-info {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.severity-info .insight-indicator,
.severity-info span {
    background: #dbeafe;
    color: #1e40af;
}

.severity-atencao {
    background: #fffbeb;
    border-color: #fde68a;
}

.severity-atencao .insight-indicator,
.severity-atencao span {
    background: #fef3c7;
    color: #92400e;
}

.severity-critico {
    background: #fff1f2;
    border-color: #fecdd3;
}

.severity-critico .insight-indicator,
.severity-critico span {
    background: #fee2e2;
    color: #991b1b;
}

.ai-executive-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 18px;
    margin-bottom: 18px;
}

.ai-summary,
.ai-critical-strip {
    border-radius: 8px;
    border: 1px solid rgba(207, 214, 221, .82);
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
}

.ai-summary {
    padding: 24px;
}

.ai-summary h2 {
    margin: 6px 0 10px;
}

.ai-summary p {
    margin: 0;
    color: #334155;
    font-size: 16px;
    line-height: 1.55;
}

.ai-summary small {
    display: inline-flex;
    margin-top: 14px;
    color: #64748b;
    font-weight: 800;
}

.ai-critical-strip {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(153, 27, 27, .95), rgba(180, 35, 24, .86)),
        #991b1b;
    color: #fff;
}

.ai-critical-strip span,
.ai-critical-strip small {
    color: rgba(255, 255, 255, .78);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ai-critical-strip strong {
    display: block;
    margin: 8px 0;
    color: #fff;
    font-size: 42px;
    line-height: 1;
}

.ai-insight-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-card {
    display: grid;
    gap: 10px;
}

.ai-card-head {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 10px;
    align-items: start;
}

.ai-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #0f2f4a;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.ai-recommendation {
    border-top: 1px solid rgba(148, 163, 184, .22);
    padding-top: 9px;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.pending-ai-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.pending-ai-block {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    background: #f8fafc;
}

.pending-ai-block > strong {
    display: block;
    color: #0f2f4a;
    margin-bottom: 8px;
    font-size: 13px;
}

.recommendation-list {
    display: grid;
    gap: 12px;
}

.recommendation-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    background: #f8fafc;
}

.recommendation-item span {
    display: inline-flex;
    margin-bottom: 7px;
    border-radius: 999px;
    padding: 4px 8px;
    background: #e2e8f0;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
}

.recommendation-item strong {
    display: block;
    color: #0f2f4a;
    margin-bottom: 5px;
}

.recommendation-item p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.45;
}

.premium-bar .bar-bg {
    height: 11px;
}

.danger-fill {
    background: #b42318;
}

.rank-row,
.mini-rank {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eef2f6;
}

.rank-row span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #eaf2f8;
    color: #0f2f4a;
    font-size: 12px;
    font-weight: 800;
}

.rank-row strong,
.mini-rank span {
    color: #334155;
    font-size: 13px;
}

.rank-row em,
.mini-rank strong {
    color: #0f2f4a;
    font-style: normal;
    font-weight: 800;
}

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

.ranking-columns h3 {
    margin: 0 0 8px;
    color: #0f2f4a;
    font-size: 14px;
}

.mini-rank {
    grid-template-columns: 1fr auto;
    padding: 8px 0;
}

.compact-table table {
    min-width: 560px;
}

.compact-table th,
.compact-table td {
    padding: 10px;
    font-size: 12px;
}

.timeline {
    position: relative;
    display: grid;
    gap: 14px;
    max-height: 520px;
    overflow: auto;
    padding-right: 6px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
}

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #174ea6;
    margin-top: 5px;
    box-shadow: 0 0 0 4px #dbeafe;
}

.timeline-item strong {
    display: block;
    color: #0f2f4a;
    font-size: 13px;
}

.timeline-item p {
    margin: 3px 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.35;
}

.timeline-item small {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: stretch;
    margin-bottom: 20px;
    padding: 26px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(15, 47, 74, .98), rgba(23, 78, 166, .9)),
        #0f2f4a;
    color: #fff;
    box-shadow: 0 18px 45px rgba(15, 47, 74, .18);
}

.page-hero h2 {
    margin: 8px 0;
    color: #fff;
    font-size: 28px;
}

.page-hero p {
    margin: 0;
    color: rgba(255, 255, 255, .82);
}

.breadcrumb {
    color: rgba(255, 255, 255, .7);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.hero-meta {
    min-width: 210px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 6px;
    border-left: 1px solid rgba(255, 255, 255, .18);
    padding-left: 22px;
    text-align: right;
}

.hero-meta small {
    color: rgba(255, 255, 255, .68);
    font-weight: 800;
    text-transform: uppercase;
}

.hero-meta strong {
    color: #fff;
    font-size: 18px;
}

.status-pill,
.status-badge,
.soft-chip,
.email-chip,
.unit-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.1;
}

.status-pill {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .24);
}

.status-info {
    background: rgba(219, 234, 254, .18);
}

.status-pending {
    background: rgba(254, 243, 199, .18);
}

.soft-chip {
    background: #eef2f7;
    color: #475569;
}

.email-chip {
    margin-top: 6px;
    background: #dbeafe;
    color: #1e40af;
}

.unit-badge {
    background: #eaf2f8;
    color: #0f2f4a;
    white-space: nowrap;
}

.analysis-shell {
    display: grid;
    gap: 20px;
}

.form-panel,
.consult-card {
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(207, 214, 221, .82);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
}

.form-grid-premium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.form-grid-premium .full {
    grid-column: 1 / -1;
}

.form-panel input,
.form-panel select,
.consult-filters input,
.consult-filters select {
    background: #f8fafc;
    border-color: #d8dee6;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
}

.form-panel input:hover,
.form-panel select:hover,
.consult-filters input:hover,
.consult-filters select:hover {
    background: #fff;
    border-color: #aeb9c6;
}

.form-panel input:focus,
.form-panel select:focus,
.consult-filters input:focus,
.consult-filters select:focus {
    background: #fff;
    transform: translateY(-1px);
}

.product-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.product-summary div {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    background: #f8fafc;
}

.product-summary span {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.product-summary strong {
    display: block;
    margin-top: 7px;
    color: #0f2f4a;
    font-size: 14px;
}

.premium-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

.premium-title strong {
    display: block;
    color: #0f2f4a;
    font-size: 18px;
    margin-top: 4px;
}

.premium-alert {
    border: 1px solid rgba(153, 27, 27, .14);
    box-shadow: 0 10px 26px rgba(153, 27, 27, .08);
}

.premium-table {
    border-collapse: separate;
    border-spacing: 0;
}

.premium-table th {
    background: #f8fafc;
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.premium-table td {
    border-bottom: 1px solid #eef2f6;
}

.premium-table tr {
    transition: background .18s ease, transform .18s ease;
}

.premium-table tbody tr:hover {
    background: #f8fbff;
}

.analysis-table input {
    min-width: 180px;
}

.analysis-table .fora-especificacao,
.premium-table tr.fora-especificacao {
    background: #fff1f2;
}

.analysis-table .fora-especificacao td:first-child {
    border-left: 4px solid #b42318;
}

.form-actions-premium {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 0 4px;
}

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-warning,
.btn-excel {
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover,
.btn-warning:hover,
.btn-excel:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .12);
}

.is-loading {
    opacity: .78;
    pointer-events: none;
}

.modal-backdrop,
.premium-confirm-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at 50% 18%, rgba(255,255,255,.22), transparent 34%),
        rgba(15, 23, 42, .58);
    backdrop-filter: blur(8px);
    z-index: 80;
}

.modal-backdrop.visible,
.premium-confirm-backdrop.visible {
    display: flex;
}

.confirm-modal,
.premium-confirm {
    position: relative;
    width: min(760px, 100%);
    background: #fff;
    border: 1px solid rgba(226, 232, 240, .92);
    border-radius: 14px;
    padding: clamp(28px, 5vw, 48px);
    box-shadow: 0 32px 90px rgba(15, 23, 42, .30);
    animation: confirmEnter .18s ease-out;
}

.confirm-modal h2,
.premium-confirm h2 {
    margin: 10px 0 18px;
    color: #102f4c;
    font-size: clamp(30px, 4.2vw, 48px);
    line-height: 1.08;
    letter-spacing: 0;
}

.confirm-modal p,
.premium-confirm p {
    margin: 0;
    color: #475569;
    line-height: 1.55;
    font-size: clamp(18px, 2.4vw, 27px);
}

.premium-confirm .premium-confirm-kicker,
.confirm-modal .eyebrow {
    display: inline-flex;
    color: #64748b;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.premium-confirm-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 50%;
    background: #eef6ff;
    color: #123a63;
    font-size: 23px;
    font-weight: 900;
}

.premium-confirm-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.premium-confirm-note {
    margin-top: 22px;
    padding: 16px 18px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #123a63;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    line-height: 1.5;
}

.premium-confirm-reason {
    display: block;
    margin-top: 22px;
}

.premium-confirm-note[hidden],
.premium-confirm-reason[hidden] {
    display: none !important;
}

.premium-confirm-reason span {
    display: block;
    margin-bottom: 8px;
    color: #102f4c;
    font-weight: 800;
}

.premium-confirm-reason textarea {
    width: 100%;
    min-height: 116px;
    resize: vertical;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 14px;
    color: #102f4c;
    font: inherit;
    box-sizing: border-box;
}

.premium-confirm-reason small {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-weight: 700;
}

.premium-confirm-actions,
.confirm-modal .actions {
    display: flex;
    justify-content: flex-end;
    gap: 18px;
    margin-top: 34px;
}

.premium-confirm-actions button,
.confirm-modal .actions button {
    min-height: 56px;
    padding-inline: 28px;
    font-size: 16px;
}

.premium-confirm-backdrop[data-type="aprovacao"] .premium-confirm-icon {
    background: #e7f8ef;
    color: #087443;
}

.premium-confirm-backdrop[data-type="reprovacao"] .premium-confirm-icon,
.premium-confirm-backdrop[data-type="exclusao"] .premium-confirm-icon {
    background: #fff1f1;
    color: #b42318;
}

.premium-confirm-backdrop[data-type="devolucao"] .premium-confirm-icon {
    background: #fff7e6;
    color: #b54708;
}

.premium-confirm-backdrop[data-type="email"] .premium-confirm-icon,
.premium-confirm-backdrop[data-type="pdf"] .premium-confirm-icon,
.premium-confirm-backdrop[data-type="backup"] .premium-confirm-icon {
    background: #eaf4ff;
    color: #0f4f7d;
}

.premium-confirm-backdrop[data-type="exclusao"] .premium-confirm-note,
.premium-confirm-backdrop[data-type="reprovacao"] .premium-confirm-note {
    border-left-color: #b42318;
    background: #fffafa;
}

.premium-confirm-backdrop[data-type="devolucao"] .premium-confirm-note {
    border-left-color: #b54708;
    background: #fffaf0;
}

.modal-open {
    overflow: hidden;
}

.shake {
    animation: modalShake .26s ease-in-out;
}

@keyframes confirmEnter {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

@media (max-width: 640px) {
    .modal-backdrop,
    .premium-confirm-backdrop {
        padding: 12px;
        align-items: flex-end;
    }

    .confirm-modal,
    .premium-confirm {
        border-radius: 14px 14px 0 0;
        padding: 28px 20px 22px;
    }

    .confirm-modal h2,
    .premium-confirm h2 {
        font-size: 30px;
    }

    .confirm-modal p,
    .premium-confirm p {
        font-size: 18px;
    }

    .premium-confirm-actions,
    .confirm-modal .actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .premium-confirm-actions button,
    .confirm-modal .actions button {
        width: 100%;
    }
}

.consult-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.consult-filters {
    display: grid;
    gap: 14px;
}

.search-field input {
    min-height: 48px;
    font-size: 15px;
}

.mobile-filter-panel {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    background: #f8fafc;
}

.mobile-filter-panel summary {
    cursor: pointer;
    color: #0f2f4a;
    font-weight: 800;
    margin-bottom: 12px;
}

.filters-consult {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 0;
}

.cert-code {
    color: #0f2f4a;
    font-size: 13px;
}

.row-subtitle {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.status-badge {
    text-transform: uppercase;
}

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

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

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

.badge-pending {
    background: #dbeafe;
    color: #1e40af;
}

.actions-menu {
    min-width: 220px;
}

.actions-menu summary {
    display: none;
}

.actions-menu .acoes {
    gap: 7px;
}

.consult-table .btn,
.consult-table button {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 12px;
}

.empty-state {
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    background: #f8fafc;
}

.empty-state strong {
    color: #0f2f4a;
}

.empty-state p {
    margin: 8px 0 0;
    color: #64748b;
}

.signature-pad {
    margin-top: 22px;
    border: 1px solid rgba(207, 214, 221, .82);
    border-radius: 8px;
    padding: 18px;
    background: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.signature-pad-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.signature-pad-head h2 {
    margin: 4px 0 4px;
    font-size: 18px;
}

.signature-pad-head p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.signature-canvas {
    display: block;
    width: 100%;
    height: 220px;
    border: 1px solid #cfd6dd;
    border-radius: 8px;
    background:
        linear-gradient(#fff, #fff),
        repeating-linear-gradient(0deg, transparent, transparent 31px, rgba(15, 47, 74, .06) 32px);
    cursor: crosshair;
    touch-action: none;
}

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

.signature-preview {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.signature-preview span {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.signature-preview img {
    max-width: 280px;
    max-height: 86px;
    object-fit: contain;
}

.signature-preview.empty strong {
    color: #92400e;
    font-size: 13px;
}

@media (max-width: 900px) {
    .topbar {
        padding: 20px;
    }

    .topbar-inner,
    .brand-block {
        align-items: flex-start;
    }

    .topbar-inner {
        flex-direction: column;
    }

    .user-chip {
        align-items: flex-start;
    }

    .container,
    .container-sm {
        width: calc(100% - 24px);
        margin: 24px auto;
    }

    .card {
        padding: 20px;
    }

    .grid,
    .grid-3,
    .grid-4,
    .grid-param,
    .cards,
    .kpi-grid,
    .filters,
    .permission-grid {
        grid-template-columns: 1fr;
    }

    .actions,
    .actions-right {
        justify-content: flex-start;
    }

    button,
    .btn {
        width: 100%;
    }

    .inline .btn,
    .inline button {
        width: auto;
    }

    .premium-nav {
        margin-top: 12px;
    }

    .nav-toggle-btn {
        display: inline-flex;
        width: 42px;
        height: 38px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        border: 1px solid rgba(255, 255, 255, .28);
        border-radius: 8px;
        background: rgba(255, 255, 255, .1);
        cursor: pointer;
    }

    .nav-toggle-btn span {
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: #fff;
    }

    .nav-panel {
        display: none;
        margin-top: 10px;
        padding: 10px;
        border: 1px solid rgba(255, 255, 255, .16);
        border-radius: 8px;
        background: rgba(255, 255, 255, .08);
    }

    .nav-toggle:checked ~ .nav-panel {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .nav-group-button,
    .nav-logout {
        width: 100%;
        justify-content: space-between;
    }

    .nav-dropdown,
    .nav-dropdown-right {
        position: static;
        min-width: 0;
        margin-top: 7px;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(255, 255, 255, .96);
    }

    .nav-logout {
        margin-left: 0;
    }

    .email-box {
        flex-direction: column;
        align-items: stretch;
    }

    .public-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .filters-executive,
    .executive-hero,
    .executive-kpis,
    .timing-kpis,
    .dashboard-grid-main,
    .ranking-columns,
    .ai-executive-panel,
    .ai-insight-list,
    .pending-ai-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-filter-head {
        flex-direction: column;
    }

    .hero-score {
        align-items: flex-start;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, .18);
        padding: 18px 0 0;
        text-align: left;
    }

    .executive-hero h2 {
        font-size: 24px;
    }

    .panel {
        padding: 18px;
    }

    .page-hero,
    .form-grid-premium,
    .product-summary,
    .consult-kpis,
    .filters-consult,
    .reports-just-filters,
    .reports-grid,
    .report-metrics,
    .report-metrics.detail {
        grid-template-columns: 1fr;
    }

    .reports-hero,
    .report-card-head,
    .section-title-row {
        flex-direction: column;
        align-items: stretch;
    }

    .reports-hero h2 {
        font-size: 24px;
    }

    .report-actions.compact {
        justify-content: flex-start;
        max-width: none;
    }

    .hero-meta {
        align-items: flex-start;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, .18);
        padding: 18px 0 0;
        text-align: left;
    }

    .form-panel,
    .consult-card {
        padding: 18px;
    }

    .form-actions-premium {
        flex-direction: column;
    }

    .signature-pad-head,
    .signature-actions {
        flex-direction: column;
    }

    .actions-menu {
        min-width: 0;
    }

    .actions-menu summary {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        border-radius: 8px;
        padding: 8px 10px;
        background: #0f2f4a;
        color: #fff;
        font-size: 12px;
        font-weight: 800;
        cursor: pointer;
    }

    .actions-menu:not([open]) .acoes {
        display: none;
    }

    .actions-menu .acoes {
        margin-top: 8px;
        flex-direction: column;
        align-items: stretch;
    }
}

/* Badges de origem — Protheus / Manual */
.badge-origem-protheus,
.badge-origem-manual {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 5px;
    padding: 1px 7px;
    margin-left: 4px;
    vertical-align: middle;
    cursor: default;
}

.badge-origem-protheus {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.badge-origem-manual {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}
