html, body {
    font-family: 'Inter', 'Segoe UI', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

/* Blocos de código / expressões matemáticas */
.example-block {
    display: inline-block;
    background: var(--mud-palette-background-grey, #f0f3f7);
    border: 1px solid var(--mud-palette-lines-default, #e0e0e0);
    border-radius: 8px;
    padding: 6px 12px;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: .95rem;
    color: var(--mud-palette-text-primary);
}

.standard-form {
    background: var(--mud-palette-background-grey, #f0f3f7);
    color: var(--mud-palette-text-primary);
    border-radius: 8px;
    padding: 16px 20px;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: .95rem;
    line-height: 1.6;
    white-space: pre-wrap;
    margin: 0;
}

/* ---------- Tabela Simplex ---------- */
.simplex-table-wrapper {
    overflow-x: auto;
}

.simplex-table {
    min-width: 480px;
    border-collapse: collapse;
}

/* Texto sempre na cor do tema e bordas visíveis (legível em claro e escuro). */
.simplex-table th,
.simplex-table td {
    text-align: center;
    padding: 8px 14px !important;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--mud-palette-text-primary);
    border: 1px solid var(--mud-palette-lines-default, #d0d5dd);
}

.simplex-table thead th {
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text, #fff);
    font-weight: 600;
    border-color: var(--mud-palette-primary);
}

.simplex-table .basis-col {
    font-weight: 700;
    background: var(--mud-palette-background-grey, #f5f7fa);
    color: var(--mud-palette-text-primary);
}

.simplex-table .rhs-col {
    font-weight: 600;
    border-left: 2px solid var(--mud-palette-primary);
}

.simplex-table .objective-row td {
    border-top: 2px solid var(--mud-palette-primary);
    font-weight: 700;
    background: rgba(var(--mud-palette-primary-rgb), .12);
}

/* Destaque do pivô — tons translúcidos legíveis nos dois temas, sobre a cor de texto do tema. */
.simplex-table .pivot-col {
    background: rgba(255, 193, 7, .22);
}

.simplex-table .pivot-row td {
    background: rgba(38, 166, 154, .22);
}

/* Célula pivô: fundo sólido âmbar com texto escuro fixo (alto contraste em qualquer tema). */
.simplex-table td.pivot-cell {
    background: #ffca28 !important;
    color: #1a1a1a !important;
    font-weight: 800;
    box-shadow: inset 0 0 0 2px #ff8f00;
    border-radius: 4px;
}

/* ---------- Dashboard ---------- */
.hero-card {
    background: linear-gradient(120deg, #0D47A1 0%, #1565C0 55%, #00897B 130%);
    border-radius: 16px;
}

.stat-card {
    border-radius: 14px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover {
    transform: translateY(-3px);
}

.result-card {
    border-radius: 16px;
    border-top: 4px solid var(--mud-palette-success);
}

.result-z {
    background: var(--mud-palette-success);
    color: #fff !important;
    border-radius: 10px;
}
.result-z .mud-typography {
    color: #fff !important;
}

.recent-list code,
.example-block {
    word-break: break-word;
}

.iteration-header {
    background: var(--mud-palette-background-grey, #f5f7fa);
}

/* Blazor error UI (rodapé padrão) */
#blazor-error-ui {
    color-scheme: light only;
    background: #ffeb3b;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
    border-radius: 8px;
}
.blazor-error-boundary::after {
    content: "Ocorreu um erro.";
}
