:root {
    --simcalculo-primary: #0f766e;
    --simcalculo-primary-dark: #115e59;
    --simcalculo-accent: #f59e0b;
    --simcalculo-surface: #ffffff;
    --simcalculo-surface-soft: #f8fafc;
    --simcalculo-text: #172033;
    --simcalculo-muted: #64748b;
    --simcalculo-border: #dbe3ec;
    --simcalculo-success: #15803d;
    --simcalculo-danger: #b42318;
    --simcalculo-warning: #b45309;
    --simcalculo-focus: rgba(15, 118, 110, .18);
    --simcalculo-radius: 14px;
    --simcalculo-control-radius: 9px;
    --simcalculo-shadow: 0 10px 28px rgba(15, 23, 42, .08);
    --simcalculo-button-shadow: 0 6px 14px rgba(15, 118, 110, .2);
}

.simcalculo-tool,
.simcalculo-tool * { box-sizing: border-box; }

.simcalculo-tool {
    color: var(--simcalculo-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    max-width: 1080px;
    min-width: 0;
    margin: 0 auto;
    overflow-wrap: anywhere;
}

.simcalculo-tool img,
.simcalculo-tool svg,
.simcalculo-tool canvas,
.simcalculo-tool iframe { max-width: 100%; }

.simcalculo-tool :where(h1, h2, h3, h4) { color: var(--simcalculo-text); line-height: 1.2; margin-top: 0; }
.simcalculo-tool :where(p) { color: var(--simcalculo-muted); }
.simcalculo-tool__header { background: linear-gradient(135deg, #ecfeff 0%, #f8fafc 72%); border: 1px solid #ccebea; border-radius: var(--simcalculo-radius); margin-bottom: 20px; padding: 24px 28px; }
.simcalculo-tool__header h1, .simcalculo-tool__header h2, .simcalculo-tool__header h3 { margin-bottom: 6px; }

.simcalculo-tool :where(form, .card, .cf-card, .result-card, .result-group, .info-card, .summary, .calculator-card, .calc-card, .simcalculo-card) {
    background: var(--simcalculo-surface);
    border: 1px solid var(--simcalculo-border);
    border-radius: var(--simcalculo-radius);
    box-shadow: var(--simcalculo-shadow);
}
.simcalculo-tool :where(form) { padding: 22px; }
.simcalculo-tool :where(.card, .cf-card, .result-card, .info-card, .calculator-card, .calc-card, .simcalculo-card) { padding: 20px; }

.simcalculo-tool :where(label, .label, .calculafin-label, .result-label, .summary-label, .cf-stat-label) { color: var(--simcalculo-text); font-weight: 650; }
.simcalculo-tool :where(input, select, textarea, .form-control, .regular-text, .large-text, .small-text) {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: var(--simcalculo-control-radius);
    color: var(--simcalculo-text);
    font: inherit;
    min-height: 42px;
    padding: 9px 12px;
    text-decoration: none !important;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
    width: 100%;
}
.simcalculo-tool :where(input, select, textarea):focus {
    border-color: var(--simcalculo-primary);
    box-shadow: 0 0 0 3px var(--simcalculo-focus);
    outline: none;
}
.simcalculo-tool :where(.form-group, .field, .calc-field, .cf-field, .ct-field, .sce-field, .input-group, .form-row) { margin-bottom: 16px; }
.simcalculo-tool :where(.form-group, .field, .calc-field, .cf-field, .ct-field, .sce-field) label { display: block; margin-bottom: 6px; }

.simcalculo-tool :where(button, .button, .btn, .btn-calcular, .rpc-btn, .qpf-btn, .gqcp__button, .so502020-btn, .simcalculo-tool__button) {
    align-items: center;
    background: var(--simcalculo-primary);
    border: 0;
    border-radius: var(--simcalculo-control-radius);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    justify-content: center;
    min-height: 42px;
    padding: 10px 17px;
    text-decoration: none !important;
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.simcalculo-tool :where(button, .button, .btn, .btn-calcular, .rpc-btn, .qpf-btn, .gqcp__button, .so502020-btn, .simcalculo-tool__button):hover { background: var(--simcalculo-primary-dark); box-shadow: var(--simcalculo-button-shadow); color: #fff; transform: translateY(-1px); }
.simcalculo-tool :where(.btn-limpar, .button-secondary, .secondary) { background: #e2e8f0; color: #334155; }
.simcalculo-tool :where(.btn-limpar, .button-secondary, .secondary):hover { background: #cbd5e1; color: #172033; }
.simcalculo-tool :where(button, a, [role="button"], input, select, textarea):focus-visible { outline: 3px solid var(--simcalculo-focus); outline-offset: 2px; }
.simcalculo-tool :where(button, a, [role="button"]),
.simcalculo-tool :where(button, a, [role="button"]) * { text-decoration: none !important; }
.simcalculo-tool :where(button, .button, .btn, .btn-calcular, .simcalculo-tool__button):disabled,
.simcalculo-tool :where(button, .button, .btn, .btn-calcular, .simcalculo-tool__button)[aria-disabled="true"] { cursor: not-allowed; opacity: .6; }

.simcalculo-tool :where(.result, .results, .result-card, .result-group, .simcalculo-tool__result, .highlight, .notice-success) {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 12px;
    color: var(--simcalculo-text);
    margin-top: 18px;
    padding: 18px;
}
.simcalculo-tool :where(.result-value, .summary-value, .calculafin-value, .cf-stat-value, .valor) { color: var(--simcalculo-primary-dark); font-size: 1.25rem; font-weight: 800; }
.simcalculo-tool :where(table) { border: 1px solid var(--simcalculo-border); border-collapse: separate; border-radius: 10px; border-spacing: 0; overflow: hidden; width: 100%; }
.simcalculo-tool :where(th) { background: #f1f5f9; color: var(--simcalculo-text); font-weight: 700; text-align: left; }
.simcalculo-tool :where(th, td) { border-bottom: 1px solid var(--simcalculo-border); padding: 11px 13px; }
.simcalculo-tool :where(tr:last-child td) { border-bottom: 0; }
.simcalculo-tool :where(.grid, .row, .cf-form-row, .ct-row, .sce-grid) { gap: 16px; }
.simcalculo-tool :where(.description, .campo-ajuda, .clt-vc-help-text, small, .help-text) { color: var(--simcalculo-muted); font-size: .875rem; }
.simcalculo-tool__button { background: var(--simcalculo-primary); }

@media (max-width: 720px) {
    .simcalculo-tool { font-size: 15px; }
    .simcalculo-tool__header, .simcalculo-tool :where(form, .card, .cf-card, .result-card, .info-card, .calculator-card, .calc-card, .simcalculo-card) { border-radius: 10px; padding: 16px; }
    .simcalculo-tool :where(.row, .cf-form-row, .ct-row, .sce-grid) { display: block; }
    .simcalculo-tool :where(button, .button, .btn, .btn-calcular, .rpc-btn, .qpf-btn, .gqcp__button, .so502020-btn, .simcalculo-tool__button) { width: 100%; }
    .simcalculo-tool :where(th, td) { padding: 9px; }
}
