/* ===== FD / RD CALCULATOR — Tool Specific CSS ===== */

.fdrd-calc-box {
    background: #fff;
    border-radius: 20px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 30px rgba(0,0,0,0.07);
    overflow: hidden;
    margin-bottom: 30px;
}

/* ---- Tab Toggle ---- */
.fdrd-tab-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
}

.fdrd-tab {
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    color: #6b7280;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.25s;
    border-bottom: 3px solid transparent;
}

.fdrd-tab:hover { color: #1d4ed8; background: #f0f9ff; }

.fdrd-tab.active {
    color: #1d4ed8;
    background: #fff;
    border-bottom-color: #1d4ed8;
}

/* ---- Body ---- */
.fdrd-body {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 0;
}

/* ===== INPUT COL ===== */
.fdrd-input-col {
    padding: 26px 24px;
    border-right: 2px solid #f3f4f6;
}

/* Bank Section */
.fdrd-bank-section { margin-bottom: 20px; }

.fdrd-section-label {
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.fdrd-bank-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.fdrd-bank-btn {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 6px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    line-height: 1.3;
}

.fdrd-bank-btn small {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    display: block;
}

.fdrd-bank-btn:hover {
    border-color: #1d4ed8;
    color: #1d4ed8;
    background: #eff6ff;
}

.fdrd-bank-btn.active {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #1d4ed8;
    color: #1e3a8a;
}

.fdrd-bank-btn.active small { color: #1d4ed8; }

/* Senior Citizen */
.fdrd-senior-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fefce8;
    border: 1.5px solid #fde047;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 20px;
    cursor: pointer;
}

.fdrd-senior-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.fdrd-senior-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #ca8a04;
    cursor: pointer;
}

.fdrd-senior-text {
    font-size: 13px;
    font-weight: 700;
    color: #713f12;
}

.fdrd-rate-badge {
    background: #ca8a04;
    color: #fff;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
}

/* Fields */
.fdrd-field {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.fdrd-field:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.fdrd-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.fdrd-field-header label,
.fdrd-field-label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    display: block;
    margin-bottom: 10px;
}

.fdrd-val-tag {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1.5px solid #93c5fd;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 14px;
    font-weight: 800;
    color: #1e3a8a;
    white-space: nowrap;
}

/* Slider */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    outline: none;
    cursor: pointer;
    margin-bottom: 4px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(29,78,216,0.4);
    border: 2px solid #fff;
    transition: transform 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }

.fdrd-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.fdrd-manual-input {
    display: flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.fdrd-manual-input:focus-within {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29,78,216,0.08);
}

.fdrd-prefix {
    background: #f3f4f6;
    padding: 9px 12px;
    font-size: 15px;
    font-weight: 700;
    color: #374151;
    border-right: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.fdrd-suffix {
    background: #f3f4f6;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    border-left: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.fdrd-manual-input input {
    border: none;
    outline: none;
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    width: 100%;
    background: #fff;
}

.fdrd-tenure-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Compounding */
.fdrd-compound-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.fdrd-comp-btn {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 9px 4px;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.fdrd-comp-btn:hover { border-color: #1d4ed8; color: #1d4ed8; background: #eff6ff; }

.fdrd-comp-btn.active {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    border-color: #1e40af;
    color: #fff;
}

/* ===== RESULT COL ===== */
.fdrd-result-col { padding: 26px 24px; }

/* Hero */
.fdrd-result-hero {
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 18px;
    color: #fff;
}

.fdrd-hero-label { font-size: 13px; font-weight: 600; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.fdrd-hero-val   { font-size: 40px; font-weight: 900; line-height: 1; margin-bottom: 8px; text-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.fdrd-hero-sub   { font-size: 13px; opacity: 0.75; }

/* Cards */
.fdrd-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.fdrd-card {
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    border: 2px solid transparent;
}

.fdrd-card-p { background: linear-gradient(135deg, #eff6ff, #dbeafe); border-color: #93c5fd; }
.fdrd-card-i { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-color: #86efac; }
.fdrd-card-m { background: linear-gradient(135deg, #fefce8, #fef9c3); border-color: #fde047; }

.fdrd-card-icon  { font-size: 20px; margin-bottom: 4px; }
.fdrd-card-label { font-size: 11px; font-weight: 700; color: #374151; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 4px; }
.fdrd-card-val   { font-size: 15px; font-weight: 800; color: #1f2937; }
.fdrd-card-p .fdrd-card-val { color: #1e3a8a; }
.fdrd-card-i .fdrd-card-val { color: #166534; }
.fdrd-card-m .fdrd-card-val { color: #713f12; }

/* Bar section */
.fdrd-bar-section { margin-bottom: 16px; }

.fdrd-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.fdrd-bar-label { font-size: 12px; font-weight: 600; color: #374151; width: 60px; flex-shrink: 0; }

.fdrd-bar-track {
    flex: 1;
    height: 10px;
    background: #f3f4f6;
    border-radius: 999px;
    overflow: hidden;
}

.fdrd-bar-fill { height: 100%; border-radius: 999px; transition: width 0.7s ease; }
.fdrd-bar-p { background: linear-gradient(90deg, #1d4ed8, #3b82f6); }
.fdrd-bar-i { background: linear-gradient(90deg, #10b981, #34d399); }

.fdrd-bar-pct { font-size: 12px; font-weight: 700; color: #374151; width: 36px; flex-shrink: 0; text-align: right; }

/* Info row */
.fdrd-info-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #e5e7eb;
    margin-bottom: 16px;
}

.fdrd-info-item {
    padding: 12px;
    text-align: center;
    border-right: 1px solid #e5e7eb;
}

.fdrd-info-item:last-child { border-right: none; }

.fdrd-info-label { font-size: 11px; font-weight: 600; color: #6b7280; display: block; margin-bottom: 4px; text-transform: uppercase; }
.fdrd-info-val   { font-size: 15px; font-weight: 800; color: #1d4ed8; }

/* Table */
.fdrd-table-wrap { }
.fdrd-table-title { font-size: 14px; font-weight: 700; color: #1f2937; margin-bottom: 10px; }

.fdrd-table-scroll {
    max-height: 240px;
    overflow-y: auto;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
}

.fdrd-table-scroll::-webkit-scrollbar { width: 4px; }
.fdrd-table-scroll::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

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

.fdrd-table thead th {
    background: #1e3a8a;
    color: #fff;
    padding: 9px 12px;
    text-align: right;
    font-size: 12px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.fdrd-table thead th:first-child { text-align: left; }

.fdrd-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #f3f4f6;
    text-align: right;
    color: #374151;
    font-weight: 500;
}

.fdrd-table td:first-child { text-align: left; font-weight: 700; color: #1f2937; }

.fdrd-col-int { color: #059669 !important; font-weight: 700 !important; }
.fdrd-col-tot { color: #1d4ed8 !important; font-weight: 700 !important; }

.fdrd-row-last td {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    font-weight: 800 !important;
    color: #1e3a8a !important;
    border-top: 2px solid #1d4ed8;
}

/* ---- Info / Features ---- */
.info-box {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
}

.info-box h4 { color: #1e3a8a; font-size: 20px; margin-bottom: 18px; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.info-item {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
}

.info-item strong { display: block; color: #1d4ed8; font-size: 15px; font-weight: 700; margin-bottom: 4px; }

.features-box {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
}

.features-box h4 { color: #14532d; font-size: 20px; margin-bottom: 16px; }
.features-box ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }

.features-box ul li {
    font-size: 14px;
    color: #374151;
    padding-left: 22px;
    position: relative;
    line-height: 1.6;
}

.features-box ul li::before { content: '✓'; position: absolute; left: 0; color: #059669; font-weight: 700; }
.features-box ul li strong { color: #14532d; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .fdrd-body { grid-template-columns: 1fr; }
    .fdrd-input-col { border-right: none; border-bottom: 2px solid #f3f4f6; }
}

@media (max-width: 768px) {
    .fdrd-input-col, .fdrd-result-col { padding: 20px 16px; }
    .fdrd-cards { grid-template-columns: 1fr; gap: 8px; }
    .fdrd-hero-val { font-size: 32px; }
    .fdrd-compound-grid { grid-template-columns: repeat(2, 1fr); }
    .fdrd-info-row { grid-template-columns: 1fr; }
    .fdrd-info-item { border-right: none; border-bottom: 1px solid #e5e7eb; }
    .info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .fdrd-bank-grid { grid-template-columns: repeat(3, 1fr); }
    .fdrd-tenure-row { grid-template-columns: 1fr 1fr; }
    .fdrd-cards { grid-template-columns: 1fr; }
    .fdrd-tab { font-size: 14px; padding: 14px 8px; }
}