/* =============================================================
   FINANCE CALCULATOR - CalcLeaf light theme
   White cards, teal accent, navy banner, gray borders.
   All classes are prefixed "fc-" to avoid collisions with other tools.
   ============================================================= */

.fc-tool {
    max-width: 720px;
    margin: 0 auto;
    font-family: inherit;
    color: #1e2a4a;
}

/* ---------- Tabs (underline style) ---------- */
.fc-tabs {
    display: flex;
    gap: 24px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0;
}

.fc-tab {
    padding: 10px 2px 12px 2px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 600;
    font-size: 14px;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}

.fc-tab:hover {
    color: #10b981;
}

.fc-tab.active {
    color: #10b981;
    border-bottom-color: #10b981;
}

/* ---------- Input card ---------- */
.fc-card {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin-top: 16px;
    padding: 0 0 20px 0;
    overflow: hidden;
}

.fc-hint {
    background: #1e2a4a;
    color: #ffffff;
    font-size: 13px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fc-hint-icon {
    font-size: 11px;
}

.fc-form {
    padding: 18px 16px 0 16px;
}

.fc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.fc-row label {
    font-size: 14px;
    color: #374151;
    flex: 1;
}

.fc-input,
.fc-select {
    width: 160px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #1e2a4a;
    background: #ffffff;
}

.fc-input:focus,
.fc-select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.fc-input-prefix,
.fc-input-suffix {
    display: flex;
    align-items: center;
    width: 160px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

.fc-input-prefix .fc-input,
.fc-input-suffix .fc-input {
    border: none;
    width: 100%;
    border-radius: 0;
}

.fc-input-prefix .fc-input:focus,
.fc-input-suffix .fc-input:focus {
    box-shadow: none;
}

.fc-prefix,
.fc-suffix {
    padding: 0 10px;
    color: #6b7280;
    font-size: 14px;
    background: #f9fafb;
    align-self: stretch;
    display: flex;
    align-items: center;
}

.fc-prefix {
    border-right: 1px solid #d1d5db;
}

.fc-suffix {
    border-left: 1px solid #d1d5db;
}

/* ---------- Settings ---------- */
.fc-settings-toggle {
    background: none;
    border: none;
    color: #10b981;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0 14px 0;
}

.fc-settings-toggle:hover {
    text-decoration: underline;
}

.fc-settings {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.fc-actions {
    display: flex;
    gap: 10px;
}

.fc-btn {
    flex: 1;
    padding: 10px 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: opacity 0.15s;
}

.fc-btn:hover {
    opacity: 0.9;
}

.fc-btn-primary {
    background: #10b981;
    color: #ffffff;
}

.fc-btn-secondary {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #d1d5db;
}

/* ---------- Results ---------- */
.fc-results-card {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin-top: 20px;
    overflow: hidden;
}

.fc-results-header {
    background: #1e2a4a;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fc-export-btn {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.85;
}

.fc-export-btn:hover {
    opacity: 1;
}

.fc-results-body {
    padding: 16px;
}

.fc-result-main {
    font-size: 20px;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.fc-result-main #fcResultLabel {
    color: #1e2a4a;
    font-size: 15px;
    font-weight: 600;
}

.fc-result-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-top: 1px solid #f0f0f0;
    font-size: 14px;
    color: #374151;
}

.fc-result-row span:last-child {
    font-weight: 600;
    color: #1e2a4a;
}

/* ---------- Chart ---------- */
.fc-chart-card,
.fc-schedule-card {
    margin-top: 24px;
}

.fc-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e2a4a;
    margin-bottom: 10px;
}

#fcChart {
    width: 100%;
    max-width: 640px;
    height: auto;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px;
}

/* ---------- Schedule table ---------- */
.fc-table-wrap {
    overflow-x: auto;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.fc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.fc-table thead th {
    background: #1e2a4a;
    color: #ffffff;
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
}

.fc-table tbody td {
    padding: 8px 12px;
    border-top: 1px solid #f0f0f0;
    color: #374151;
}

.fc-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
    .fc-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .fc-input,
    .fc-select,
    .fc-input-prefix,
    .fc-input-suffix {
        width: 100%;
    }

    .fc-tabs {
        flex-wrap: wrap;
    }

    .fc-tab {
        flex: 1 1 30%;
    }
}