.rfcm-calculator {
    --rfcm-green: #006241;
    --rfcm-green-2: #00754a;
    --rfcm-green-dark: #1e3932;
    --rfcm-accent: #fea500;
    --rfcm-bg-soft: #f9f9f9;
    --rfcm-bg-soft-green: #d4e9e2;
    --rfcm-text: #000000;
    --rfcm-text-light: #ffffff;
    --rfcm-border: #7e866f;
    --rfcm-border-soft: #f2f0eb;
    color: var(--rfcm-text);
    font-family: Arial, Helvetica, sans-serif;
    margin: 24px 0;
}

.rfcm-calculator *,
.rfcm-calculator *::before,
.rfcm-calculator *::after {
    box-sizing: border-box;
}

.rfcm-calculator .rfcm-card {
    background: #ffffff;
    border: 1px solid var(--rfcm-border-soft);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(30, 57, 50, 0.08);
    overflow: hidden;
}

.rfcm-calculator .rfcm-header {
    background: linear-gradient(135deg, var(--rfcm-green), var(--rfcm-green-dark));
    color: var(--rfcm-text-light);
    padding: 28px 24px;
}

.rfcm-calculator .rfcm-title,
.rfcm-calculator .rfcm-section-heading h3,
.rfcm-calculator .rfcm-formula-box h3 {
    margin: 0;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-weight: 700;
    text-align: center;
}

.rfcm-calculator .rfcm-title {
    font-size: 30px;
    line-height: 1.2;
}

.rfcm-calculator .rfcm-subtitle {
    margin: 12px auto 0;
    max-width: 860px;
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
}

.rfcm-calculator .rfcm-grid {
    display: grid;
    gap: 16px;
    padding: 24px;
}

.rfcm-calculator .rfcm-grid--controls {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--rfcm-bg-soft);
    border-bottom: 1px solid var(--rfcm-border-soft);
}

.rfcm-calculator .rfcm-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rfcm-calculator .rfcm-field label,
.rfcm-calculator .rfcm-summary-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--rfcm-green-dark);
}

.rfcm-calculator .rfcm-input,
.rfcm-calculator .rfcm-select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--rfcm-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--rfcm-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}

.rfcm-calculator .rfcm-input:focus,
.rfcm-calculator .rfcm-select:focus {
    border-color: var(--rfcm-green-2);
    box-shadow: 0 0 0 3px rgba(0, 117, 74, 0.12);
    outline: none;
}

.rfcm-calculator .rfcm-section {
    padding: 24px;
}

.rfcm-calculator .rfcm-section-heading {
    margin-bottom: 16px;
}

.rfcm-calculator .rfcm-section-heading h3,
.rfcm-calculator .rfcm-formula-box h3 {
    color: var(--rfcm-green);
    font-size: 22px;
}

.rfcm-calculator .rfcm-section-heading p,
.rfcm-calculator .rfcm-formula-box p {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.rfcm-calculator .rfcm-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--rfcm-border-soft);
    border-radius: 12px;
}

.rfcm-calculator .rfcm-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.rfcm-calculator .rfcm-table thead th {
    background: var(--rfcm-green);
    color: var(--rfcm-text-light);
    text-align: center;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-weight: 700;
    font-size: 13px;
    padding: 14px 12px;
}

.rfcm-calculator .rfcm-table tbody td {
    padding: 12px;
    border-top: 1px solid var(--rfcm-border-soft);
    vertical-align: middle;
}
.rfcm-calculator .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid var(--rfcm-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--rfcm-green-dark);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.rfcm-calculator .button:hover,
.rfcm-calculator .button:focus {
    border-color: var(--rfcm-green-2);
    color: var(--rfcm-green-2);
}


.rfcm-calculator .rfcm-table tbody tr:nth-child(even) td {
    background: var(--rfcm-bg-soft);
}

.rfcm-calculator .rfcm-cell-center {
    text-align: center;
}

.rfcm-calculator .rfcm-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--rfcm-bg-soft-green);
    color: var(--rfcm-green-dark);
    font-weight: 700;
    text-align: center;
}

.rfcm-calculator .rfcm-badge--dark {
    background: var(--rfcm-green-dark);
    color: var(--rfcm-text-light);
}

.rfcm-calculator .rfcm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.rfcm-calculator .rfcm-actions .button {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 8px;
}

.rfcm-calculator .rfcm-actions .button-secondary {
    background: var(--rfcm-green);
    border-color: var(--rfcm-green);
    color: var(--rfcm-text-light);
}

.rfcm-calculator .rfcm-actions .button-secondary:hover,
.rfcm-calculator .rfcm-actions .button-secondary:focus {
    background: var(--rfcm-green-2);
    border-color: var(--rfcm-green-2);
    color: var(--rfcm-text-light);
}

.rfcm-calculator .rfcm-summary {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 24px 24px;
}

.rfcm-calculator .rfcm-summary-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    border: 1px solid var(--rfcm-border-soft);
    border-radius: 12px;
    background: #ffffff;
}

.rfcm-calculator .rfcm-summary-card--accent {
    background: rgba(254, 165, 0, 0.12);
    border-color: rgba(254, 165, 0, 0.4);
}

.rfcm-calculator .rfcm-summary-card--dark {
    background: var(--rfcm-green-dark);
    border-color: var(--rfcm-green-dark);
}

.rfcm-calculator .rfcm-summary-card--dark .rfcm-summary-label,
.rfcm-calculator .rfcm-summary-card--dark .rfcm-summary-value {
    color: var(--rfcm-text-light);
}

.rfcm-calculator .rfcm-summary-value {
    font-size: 24px;
    line-height: 1.2;
    color: var(--rfcm-green-dark);
}

.rfcm-calculator .rfcm-note {
    margin: 0 24px 24px;
    padding: 14px 16px;
    border-left: 4px solid var(--rfcm-accent);
    border-radius: 8px;
    background: rgba(254, 165, 0, 0.12);
    color: var(--rfcm-green-dark);
    font-weight: 700;
}

.rfcm-calculator .rfcm-formula-box {
    margin: 0 24px 24px;
    padding: 18px 20px;
    border-radius: 12px;
    background: var(--rfcm-bg-soft-green);
}

.rfcm-admin-wrap .rfcm-calculator {
    max-width: 1300px;
}

@media (max-width: 1024px) {
    .rfcm-calculator .rfcm-grid--controls,
    .rfcm-calculator .rfcm-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .rfcm-calculator .rfcm-header,
    .rfcm-calculator .rfcm-grid,
    .rfcm-calculator .rfcm-section,
    .rfcm-calculator .rfcm-summary {
        padding-left: 16px;
        padding-right: 16px;
    }

    .rfcm-calculator .rfcm-grid--controls,
    .rfcm-calculator .rfcm-summary {
        grid-template-columns: 1fr;
    }

    .rfcm-calculator .rfcm-title {
        font-size: 24px;
    }

    .rfcm-calculator .rfcm-section-heading h3,
    .rfcm-calculator .rfcm-formula-box h3 {
        font-size: 20px;
    }

    .rfcm-calculator .rfcm-formula-box,
    .rfcm-calculator .rfcm-note {
        margin-left: 16px;
        margin-right: 16px;
    }
}
