/* ===== INCOME TAX CALCULATOR — Tool Specific CSS ===== */

.itax-wrapper {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
    margin-bottom: 30px;
    align-items: start;
}

/* ===== INPUT PANEL ===== */
.itax-input-panel {
    background: #fff;
    border-radius: 20px;
    padding: 26px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.itax-panel-title {
    font-size: 18px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 2px solid #f3f4f6;
}

/* Field */
.itax-field {
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid #f3f4f6;
}

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

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

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

.itax-field-header label { font-size: 13px; font-weight: 700; color: #374151; }

.itax-val-tag {
    background: linear-gradient(135deg, #faf5ff, #ede9fe);
    border: 1.5px solid #c4b5fd;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 14px;
    font-weight: 800;
    color: #4c1d95;
    white-space: nowrap;
}

/* Age Buttons */
.itax-age-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

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

.itax-age-btn small { font-size: 11px; font-weight: 500; color: #6b7280; display: block; }
.itax-age-btn:hover { border-color: #7c3aed; color: #7c3aed; background: #faf5ff; }

.itax-age-btn.active {
    background: linear-gradient(135deg, #faf5ff, #ede9fe);
    border-color: #7c3aed;
    color: #4c1d95;
}

.itax-age-btn.active small { color: #7c3aed; }

/* 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, #7c3aed, #6d28d9);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(124,58,237,0.4);
    border: 2px solid #fff;
    transition: transform 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
input[type="range"]::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    border: 2px solid #fff;
    cursor: pointer;
}

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

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

.itax-manual-input:focus-within {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.08);
}

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

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

/* Deductions Box */
.itax-deductions-box {
    background: #fafafa;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
}

.itax-deduct-title {
    font-size: 13px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.itax-deduct-badge {
    background: #fef3c7;
    color: #92400e;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid #fde68a;
}

.itax-deduct-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.itax-deduct-row:last-child { margin-bottom: 0; }

.itax-deduct-row label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    flex: 1;
    min-width: 0;
}

.itax-deduct-input {
    display: flex;
    align-items: center;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    width: 130px;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.itax-deduct-input:focus-within { border-color: #7c3aed; }

.itax-deduct-input .itax-prefix {
    padding: 7px 8px;
    font-size: 13px;
    border-right: 1px solid #d1d5db;
}

.itax-deduct-input input {
    border: none;
    outline: none;
    padding: 7px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    width: 100%;
    background: #fff;
}

/* ===== RESULT PANEL ===== */
.itax-result-panel {
    background: #fff;
    border-radius: 20px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* Regime Compare */
.itax-regime-compare {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: linear-gradient(135deg, #faf5ff, #ede9fe);
    border-bottom: 2px solid #ddd6fe;
}

.itax-regime-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px 14px;
    text-align: center;
    border: 2px solid #e5e7eb;
    transition: all 0.3s;
    position: relative;
}

.itax-regime-card.itax-regime-winner {
    border-color: #7c3aed;
    box-shadow: 0 4px 20px rgba(124,58,237,0.2);
    transform: scale(1.03);
}

.itax-regime-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.itax-badge-new { background: #dcfce7; color: #166534; }
.itax-badge-old { background: #dbeafe; color: #1e3a8a; }

.itax-regime-name { font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 8px; }
.itax-regime-tax  { font-size: 26px; font-weight: 900; color: #1f2937; margin-bottom: 4px; }
.itax-regime-sub  { font-size: 12px; color: #6b7280; }

.itax-vs-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(124,58,237,0.3);
}

/* Winner Banner */
.itax-winner-banner {
    padding: 14px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 2px solid #f3f4f6;
}

.itax-winner-banner strong { font-size: 16px; }
.itax-winner-new { background: #f0fdf4; color: #166534; }
.itax-winner-old { background: #eff6ff; color: #1e3a8a; }
.itax-winner-tie { background: #fefce8; color: #713f12; }

/* Detail Tabs */
.itax-detail-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 2px solid #f3f4f6;
}

.itax-dtab {
    padding: 13px;
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.itax-dtab:hover { color: #7c3aed; background: #faf5ff; }
.itax-dtab.active { color: #7c3aed; border-bottom-color: #7c3aed; background: #faf5ff; }

/* Detail Panel */
.itax-detail-panel { padding: 20px; }

/* Calc Steps */
.itax-calc-steps {
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1.5px solid #e5e7eb;
}

.itax-step-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 13px;
    color: #374151;
    border-bottom: 1px dashed #e5e7eb;
}

.itax-step-row:last-child { border-bottom: none; }
.itax-step-deduct { color: #dc2626; }
.itax-step-total   { font-weight: 800; color: #1f2937; font-size: 14px; }
.itax-step-total span:last-child { color: #7c3aed; }

/* Slab Table */
.itax-slab-table { margin-bottom: 16px; }
.itax-slab-title { font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 8px; }

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

.itax-table thead th {
    background: #1f2937;
    color: #fff;
    padding: 9px 12px;
    text-align: left;
    font-size: 12px;
}

.itax-table thead th:last-child { text-align: right; }

.itax-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.itax-rate-cell { text-align: center; font-weight: 700; color: #7c3aed; }
.itax-tax-cell  { text-align: right; font-weight: 700; color: #1f2937; }

/* Tax Summary */
.itax-tax-summary {
    background: #f8fafc;
    border-radius: 12px;
    border: 1.5px solid #e5e7eb;
    overflow: hidden;
}

.itax-sum-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    font-size: 13px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

.itax-sum-row:last-child { border-bottom: none; }

.itax-sum-rebate { color: #059669; }
.itax-sum-rebate span:last-child { color: #059669; font-weight: 700; }

.itax-sum-final {
    background: linear-gradient(135deg, #faf5ff, #ede9fe);
    font-weight: 800;
    font-size: 15px;
    color: #1f2937;
    border-top: 2px solid #ddd6fe !important;
}

.itax-sum-final span:last-child { color: #7c3aed; font-size: 17px; }

.itax-sum-monthly {
    background: #f0fdf4;
    color: #166534;
    font-size: 12px;
}

.itax-sum-monthly span:last-child { color: #059669; font-weight: 700; }

/* ===== SLAB REFERENCE ===== */
.itax-slab-ref {
    margin-bottom: 28px;
}

.itax-slab-ref h2 {
    font-size: 22px;
    color: #1f2937;
    margin-bottom: 18px;
}

.itax-slab-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.itax-slab-col {
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
}

.itax-slab-col-head {
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
}

.itax-head-new { background: linear-gradient(135deg, #f0fdf4, #dcfce7); color: #166534; border-bottom: 2px solid #86efac; }
.itax-head-old { background: linear-gradient(135deg, #eff6ff, #dbeafe); color: #1e3a8a; border-bottom: 2px solid #93c5fd; }

.itax-ref-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.itax-ref-table th { background: #f8fafc; padding: 10px 14px; text-align: left; font-size: 12px; color: #6b7280; font-weight: 700; border-bottom: 1px solid #e5e7eb; }
.itax-ref-table td { padding: 10px 14px; border-bottom: 1px solid #f3f4f6; color: #374151; }
.itax-ref-table td:last-child { font-weight: 700; color: #7c3aed; text-align: right; }
.itax-ref-last td { font-weight: 700; }

.itax-slab-note {
    padding: 12px 16px;
    font-size: 12px;
    color: #374151;
    background: #fafafa;
    line-height: 1.8;
    border-top: 1px solid #e5e7eb;
}

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

.info-box h4 { color: #4c1d95; 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: #7c3aed; 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: 1100px) {
    .itax-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .itax-input-panel, .itax-detail-panel { padding: 18px 16px; }
    .itax-regime-compare { grid-template-columns: 1fr; gap: 8px; }
    .itax-vs-circle { display: none; }
    .itax-slab-compare-grid { grid-template-columns: 1fr; }
    .itax-deduct-row { flex-direction: column; align-items: flex-start; gap: 6px; }
    .itax-deduct-input { width: 100%; }
    .info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .itax-age-grid { grid-template-columns: 1fr; }
    .itax-regime-tax { font-size: 22px; }
    .itax-sum-final span:last-child { font-size: 15px; }
}