:root {
    --bg-main: #050506;
    --bg-panel: #0c0c0f;
    --bg-panel-soft: #141418;

    --red-main: #ef0b1a;
    --red-dark: #980711;
    --red-glow: rgba(239, 11, 26, 0.35);

    --text-main: #f5f5f7;
    --text-muted: #a5a5aa;
    --text-soft: #6f6f76;

    --border-soft: rgba(255, 255, 255, 0.08);

    --success: #15c47e;
    --warning: #f0b429;
    --danger: #ef0b1a;

    --panel-highlight:inset 6px 0 0 0 rgba(239, 11, 11, 0.42);
    --panel-shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
    --panel-inset-red: inset 0 -1px 0 rgba(239, 11, 26, 0.28);
    --panel-inset-red-strong: inset 0 -2px 0 rgba(239, 11, 26, 0.42);
    --panel-inset-soft: inset 0 0 0 1px rgba(255, 255, 255, 0.055);
}

/* =========================================================
   BASE
========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: Arial, Helvetica, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 82% 8%, rgba(239, 11, 26, 0.18), transparent 28%),
        linear-gradient(135deg, transparent 58%, rgba(239, 11, 26, 0.09) 58%),
        #050506;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(circle at center, black, transparent 75%);
    pointer-events: none;
}

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

button,
input,
select,
textarea {
    font-family: inherit;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.is-hidden {
    display: none !important;
}

/* =========================================================
   LAYOUT GLOBAL
========================================================= */

.app-shell {
    width: min(1280px, calc(100% - 48px));
    margin: 42px auto;
}

.page-hero {
    margin-bottom: 28px;
}

.page-hero h1 {
    margin: 10px 0 8px;
    font-size: clamp(36px, 5vw, 64px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-hero p {
    max-width: 720px;
    color: var(--text-muted);
    line-height: 1.7;
}

.eyebrow {
    color: var(--red-main);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section-gap {
    margin-bottom: 24px;
}

.app-footer {
    width: min(1280px, calc(100% - 48px));
    margin: 60px auto 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-soft);
    display: flex;
    justify-content: space-between;
    color: var(--text-soft);
    font-size: 13px;
}

/* =========================================================
   NAVBAR
========================================================= */

.app-topbar {
    height: 78px;
    margin: 24px;
    padding: 0 32px;
    border-radius: 999px;
    background: rgba(5, 5, 6, 0.88);
    border: 1px solid var(--border-soft);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.35);
}

.brand,
.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand {
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.navbar-logo {
    display: block;
    width: 160px;
    height: auto;
    object-fit: contain;
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 34px;
}

.app-nav a {
    position: relative;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.app-nav a:hover,
.app-nav a.is-active {
    color: var(--text-main);
}

.app-nav a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 2px;
    border-radius: 999px;
    background: var(--red-main);
    box-shadow: 0 0 16px var(--red-glow);
}

/* =========================================================
   BOTÕES
========================================================= */

.btn-logout,
.btn-primary-red,
.login-form button {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red-main), var(--red-dark));
    color: #fff;
    padding: 13px 24px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 24px rgba(239, 11, 26, 0.28);
}

.btn-logout {
    padding: 11px 22px;
    font-size: 12px;
}

.btn-secondary-tech {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border-radius: 999px;
    padding: 13px 22px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    cursor: pointer;
}

.btn-secondary-tech:hover {
    border-color: rgba(239, 11, 26, 0.45);
}

.btn-full {
    display: block;
    text-align: center;
}

.btn-disabled,
.table-action.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.btn-icon-danger {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(239, 11, 26, 0.35);
    background: rgba(239, 11, 26, 0.12);
    color: var(--red-main);
    border-radius: 12px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 13px;
    background: rgba(239, 11, 26, 0.1);
    border: 1px solid rgba(239, 11, 26, 0.32);
    color: var(--red-main);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.table-action:hover {
    background: rgba(239, 11, 26, 0.18);
}

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

/* =========================================================
   CARDS / PAINÉIS
========================================================= */

.panel-card,
.login-card,
.result-summary-card,
.result-card,
.detail-list > div,
.criteria-grid article,
.formula-list > div,
.live-compact-diagnosis,
.live-compact-suggestion,
.note-box,
.empty-state {
    border: 1px solid var(--border-soft);
    box-shadow: var(--panel-shadow), var(--panel-inset-red);
}

.stat-card,
.live-main-metric,
.live-mini-grid article{
    border: 1px solid var(--border-soft);
    box-shadow: var(--panel-highlight)
}

.panel-card,
.stat-card {
    background: rgba(12, 12, 15, 0.88);
    border-radius: 24px;
}

.panel-card {
    padding: 26px;
}

.stat-card {
    padding: 22px;
}

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

.panel-header h2 {
    margin: 6px 0 0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.empty-state {
    padding: 50px 24px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
    text-align: center;
}

.empty-state h3 {
    margin: 0 0 8px;
}

.empty-state p {
    margin: 0 auto;
    max-width: 560px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* =========================================================
   STATUS / ALERTAS
========================================================= */

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.status-approved {
    color: var(--success);
    background: rgba(21, 196, 126, 0.12);
    border-color: rgba(21, 196, 126, 0.35);
}

.status-review,
.status-forced {
    color: var(--warning);
    background: rgba(240, 180, 41, 0.12);
    border-color: rgba(240, 180, 41, 0.36);
}

.status-critical {
    color: var(--danger);
    background: rgba(239, 11, 26, 0.12);
    border-color: rgba(239, 11, 26, 0.35);
}

.status-draft,
.status-ignored {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.alert-error,
.alert-success {
    padding: 13px 15px;
    border-radius: 14px;
    color: #fff;
}

.alert-error {
    margin-bottom: 18px;
    background: rgba(239, 11, 26, 0.12);
    border: 1px solid rgba(239, 11, 26, 0.35);
}

.alert-success {
    background: rgba(21, 196, 126, 0.12);
    border: 1px solid rgba(21, 196, 126, 0.35);
}

.page-alert {
    margin-bottom: 22px;
}

.technical-note {
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
    line-height: 1.6;
}

.technical-note p {
    margin: 0;
}

.technical-note p + p {
    margin-top: 8px;
}

/* =========================================================
   TABELAS
========================================================= */

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

.table-dark-tech {
    width: 100%;
    color: var(--text-main);
    border-collapse: separate;
    border-spacing: 0 8px;
}

.table-dark-tech th {
    color: var(--text-soft);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: left;
    padding: 0 16px 8px;
    white-space: nowrap;
}

.table-dark-tech td {
    padding: 16px;
    background: rgba(20, 20, 24, 0.82);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.table-dark-tech tr td:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px 0 0 14px;
}

.table-dark-tech tr td:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 0 14px 14px 0;
}

.table-dark-tech strong,
.table-dark-tech small {
    display: block;
}

.table-dark-tech small {
    margin-top: 4px;
    color: var(--text-soft);
}

.table-dark-tech code {
    color: var(--red-main);
    font-family: Consolas, monospace;
    font-size: 13px;
}

/* =========================================================
   FORMULÁRIOS
========================================================= */

.calculation-form {
    display: block;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.section-title.with-action {
    justify-content: space-between;
    align-items: center;
}

.section-title.with-action > div {
    display: flex;
    align-items: center;
    gap: 14px;
}

.section-title span {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: rgba(239, 11, 26, 0.12);
    border: 1px solid rgba(239, 11, 26, 0.35);
    color: var(--red-main);
    font-weight: 900;
}

.section-title h2 {
    margin: 0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.form-field {
    display: grid;
    gap: 8px;
}

.form-field.wide {
    grid-column: 1 / -1;
}

.form-field label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.form-field input,
.form-field select,
.form-field textarea,
.population-table input,
.login-form input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #09090b;
    color: var(--text-main);
    border-radius: 14px;
    padding: 13px 14px;
    outline: none;
}

.form-field textarea {
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.population-table input:focus,
.login-form input:focus {
    border-color: var(--red-main);
    box-shadow: 0 0 0 4px rgba(239, 11, 26, 0.16);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 26px;
}

.check-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
    line-height: 1.5;
    cursor: pointer;
}

.check-option + .check-option {
    margin-top: 10px;
}

.check-option input {
    width: auto;
    margin-top: 3px;
    accent-color: var(--red-main);
}

/* =========================================================
   LOGIN
========================================================= */

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(460px, 100%);
    padding: 36px;
    border-radius: 28px;
    background: rgba(12, 12, 15, 0.88);
    backdrop-filter: blur(18px);
}

.login-brand {
    flex-direction: column;
    text-align: center;
    margin-bottom: 32px;
}

.login-brand h1 {
    margin: 8px 0 0;
    font-size: 28px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.login-brand p {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 14px;
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-form label {
    color: var(--text-muted);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* =========================================================
   DASHBOARD
========================================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}

.stat-card span {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.stat-card strong {
    display: block;
    margin: 12px 0 6px;
    font-size: 38px;
}

.stat-card small {
    color: var(--text-soft);
}

.dashboard-history-table td {
    vertical-align: middle;
}

.dashboard-history-table small {
    line-height: 1.45;
}

.dashboard-history-table .status-badge {
    margin: 0;
}

.dashboard-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 135px;
    min-height: 30px;
    padding: 7px 10px;
    white-space: nowrap;
    font-size: 10px;
    line-height: 1;
    letter-spacing: 0.07em;
    text-align: center;
}

/* =========================================================
   NOVO CÁLCULO / SIMULAÇÃO
========================================================= */

.calculation-workspace {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(360px, 4fr);
    gap: 24px;
    align-items: start;
}

.calculation-main {
    min-width: 0;
}

.calculation-main .panel-card {
    padding: 20px;
}

.calculation-main .section-title h2 {
    font-size: 23px;
}

.calculation-main .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: 13px;
}

.calculation-main .form-field input,
.calculation-main .form-field select,
.calculation-main .form-field textarea,
.calculation-main .population-table input {
    padding: 10px 12px;
}

.calculation-main .form-field textarea {
    min-height: 68px;
}

.calculation-live-sidebar {
    position: sticky;
    top: 18px;
    max-height: none;
    overflow: visible;
    min-width: 0;
    align-self: start;
}

.live-compact-card {
    width: 100%;
    max-width: 460px;
    margin-left: auto;
    padding: 20px;
    overflow: hidden;
}

.live-compact-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.live-compact-header h2 {
    margin: 6px 0 0;
    font-size: 28px;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.live-compact-header .status-badge {
    flex-shrink: 0;
    padding: 7px 10px;
    font-size: 10px;
}

.live-main-metric {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    margin-bottom: 12px;
}

.live-main-metric span,
.live-mini-grid span,
.live-compact-diagnosis span,
.live-compact-suggestion span {
    display: block;
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    margin-bottom: 7px;
}

.live-main-metric strong {
    display: block;
    font-size: 34px;
    line-height: 1;
}

.live-main-metric small,
.live-mini-grid small {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
}

.live-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.live-mini-grid article {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
}

.live-mini-grid strong {
    display: block;
    font-size: 22px;
    line-height: 1.05;
}

.live-compact-diagnosis,
.live-compact-suggestion {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
    margin-bottom: 12px;
}

.live-compact-diagnosis p,
.live-compact-suggestion p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.45;
    font-size: 13px;
}

.live-compact-suggestion strong {
    display: block;
    color: var(--text-main);
    font-size: 17px;
    line-height: 1.3;
    margin-bottom: 6px;
}

.live-hidden-suggestions {
    display: none;
}

.sidebar-save-slot {
    margin-top: 14px;
}

.sidebar-save-slot .btn-primary-red {
    width: 100%;
    padding: 13px 16px;
    font-size: 12px;
}

.form-grid,
.table-wrap,
.table-dark-tech,
.population-table {
    min-width: 0;
}

.population-table {
    table-layout: fixed;
}

.population-table th,
.population-table td {
    white-space: normal;
}

.population-table td {
    padding: 10px;
}

.population-table input {
    min-width: 0;
    width: 100%;
}

.population-table th:nth-child(1),
.population-table td:nth-child(1) {
    width: 30%;
}

.population-table th:nth-child(2),
.population-table td:nth-child(2) {
    width: 20%;
}

.population-table th:nth-child(3),
.population-table td:nth-child(3) {
    width: 28%;
}

.population-table th:nth-child(4),
.population-table td:nth-child(4) {
    width: 16%;
}

.population-table th:nth-child(5),
.population-table td:nth-child(5) {
    width: 6%;
}

.panel-card .table-wrap {
    overflow-x: visible;
}

.form-total {
    margin-top: 18px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(239, 11, 26, 0.08);
    border: 1px solid rgba(239, 11, 26, 0.18);
    box-shadow: var(--panel-inset-red);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.form-total span {
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.form-total strong {
    font-size: 22px;
}

/* =========================================================
   VISUALIZAÇÃO DO CÁLCULO
========================================================= */

.calculation-show-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.result-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.result-summary-card {
    padding: 24px;
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.result-summary-card span,
.detail-list span,
.criteria-grid span,
.formula-list span,
.final-status-box span,
.forced-reason-box span {
    display: block;
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.result-summary-card strong {
    display: block;
    color: var(--text-main);
    font-size: 34px;
    line-height: 1;
}

.result-summary-card small {
    display: block;
    margin-top: 12px;
    color: var(--text-muted);
}

.show-two-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
    gap: 24px;
    align-items: start;
}

.show-left-column,
.show-right-column {
    min-width: 0;
}

.detail-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.detail-list.two {
    grid-template-columns: 1fr 1fr;
}

.detail-list > div {
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.detail-list strong {
    display: block;
    color: var(--text-main);
    line-height: 1.45;
}

.detail-list .wide {
    grid-column: 1 / -1;
}

.compact-table th,
.compact-table td {
    padding: 11px 12px;
}

.no-scroll-table {
    overflow-x: visible;
}

.mini-total {
    margin-top: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(239, 11, 26, 0.09);
    border: 1px solid rgba(239, 11, 26, 0.18);
    box-shadow: var(--panel-inset-red);
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.mini-total span {
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 12px;
}

.mini-total strong {
    color: var(--text-main);
}

.final-status-box {
    padding: 20px;
    border-radius: 18px;
    background: rgba(21, 196, 126, 0.08);
    border: 1px solid rgba(21, 196, 126, 0.18);
    box-shadow: inset 0 -1px 0 rgba(21, 196, 126, 0.32);
    margin-bottom: 18px;
}

.final-status-box.is-forced {
    background: rgba(240, 180, 41, 0.08);
    border-color: rgba(240, 180, 41, 0.18);
    box-shadow: inset 0 -1px 0 rgba(240, 180, 41, 0.34);
}

.final-status-box strong {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    margin-bottom: 10px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.final-status-box p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.criteria-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.criteria-grid article {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.criteria-grid article > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.criteria-grid strong.status-approved,
.criteria-grid strong.status-review,
.criteria-grid strong.status-ignored,
.criteria-grid strong.status-forced {
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.criteria-grid p {
    margin: 6px 0 0;
    color: var(--text-muted);
}

.criteria-grid b {
    color: var(--text-main);
}

.forced-reason-box {
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-soft);
}

.forced-reason-box p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.formula-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.formula-list > div {
    padding: 14px 16px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.formula-list > div.highlight {
    background: rgba(239, 11, 26, 0.09);
    border-color: rgba(239, 11, 26, 0.18);
    box-shadow: var(--panel-inset-red);
}

.formula-list span {
    margin-bottom: 0;
}

.formula-list strong {
    color: var(--text-main);
    white-space: nowrap;
}

.forced-alert {
    padding: 20px 24px;
    border-radius: 22px;
    background:
        linear-gradient(
            135deg,
            rgba(240, 180, 41, 0.13),
            rgba(240, 180, 41, 0.045)
        );
    border: 1px solid rgba(240, 180, 41, 0.26);
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 18px;
    align-items: flex-start;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18), inset 0 -1px 0 rgba(240, 180, 41, 0.32);
}

.forced-alert-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--warning);
    background: rgba(240, 180, 41, 0.12);
    border: 1px solid rgba(240, 180, 41, 0.38);
    font-size: 24px;
    font-weight: 900;
}

.forced-alert-content span {
    display: block;
    margin-bottom: 7px;
    color: var(--warning);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.forced-alert-content strong {
    display: block;
    color: var(--text-main);
    font-size: 18px;
    line-height: 1.25;
}

.forced-alert-content p {
    margin: 10px 0 0;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 820px;
}

/* =========================================================
   VIEW: VARIÁVEIS / MOTOR DE CÁLCULO
========================================================= */

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

.formula-card {
    position: relative;
    min-height: 100%;
    padding: 20px;
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(20, 20, 24, 0.88), rgba(8, 8, 10, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow:
        0 16px 42px rgba(0, 0, 0, 0.28),
        inset 0 -1px 0 rgba(239, 11, 26, 0.28);
}

.formula-card span {
    display: block;
    margin-bottom: 10px;
    color: var(--red-main);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.formula-card strong {
    display: block;
    color: var(--text-main);
    font-family: Consolas, Monaco, monospace;
    font-size: 15px;
    line-height: 1.55;
}

.formula-card p {
    margin: 12px 0 0;
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 14px;
}
