/**
 * Loan EMI & Mortgage Calculator Styles - FIXED VERSION
 * Professional, modern, and fully responsive design
 */

/* ============================================
   VARIABLES & RESET
   ============================================ */
:root {
    --primary-color: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #81C784;
    --secondary-color: #2196F3;
    --danger-color: #FF6B6B;
    --warning-color: #FFA726;
    --success-color: #4CAF50;
    --info-color: #29B6F6;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Dark mode variables */
[data-theme="dark"] {
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --bg-light: #1a1a1a;
    --bg-white: #2c2c2c;
    --border-color: #404040;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb-nav {
    background: var(--bg-light);
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb {
    background: transparent;
    margin-bottom: 0;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-secondary);
}

.breadcrumb-item a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-primary);
}

/* ============================================
   PAGE HEADER
   ============================================ */
.loan-calculator-container {
    padding: 2rem 0 4rem;
}

.page-header {
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============================================
   CALCULATOR CARDS
   ============================================ */
.calculator-wrapper {
    margin-bottom: 3rem;
}

.calculator-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.calculator-card:hover {
    box-shadow: var(--shadow-lg);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--primary-color);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.loan-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0;
}

.info-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--info-color);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    cursor: help;
    position: relative;
}

.info-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: 125%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.info-tooltip:hover::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 115%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--text-primary);
}

.form-control {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-white);
    color: var(--text-primary);
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-control:hover {
    border-color: var(--primary-color);
}

/* Input with Slider - FIXED */
.input-with-slider {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Range Slider - FIXED STYLING */
.form-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 10px;
    outline: none;
    padding: 0;
    margin: 10px 0;
}

.form-range::-webkit-slider-track {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 10px;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border: 4px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(76, 175, 80, 0.4);
}

.form-range::-webkit-slider-thumb:active {
    transform: scale(1.05);
}

.form-range::-moz-range-track {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 10px;
    border: none;
}

.form-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border: 4px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.form-range::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(76, 175, 80, 0.4);
}

.form-range::-ms-track {
    width: 100%;
    height: 8px;
    background: transparent;
    border-color: transparent;
    color: transparent;
}

.form-range::-ms-fill-lower {
    background: var(--primary-color);
    border-radius: 10px;
}

.form-range::-ms-fill-upper {
    background: var(--border-color);
    border-radius: 10px;
}

.form-range::-ms-thumb {
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    border: 4px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: -5px;
}

/* Tenure Input Group */
.tenure-input-group {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.5rem;
}

.form-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-white);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-select:hover {
    border-color: var(--primary-color);
}

/* Interest Type Toggle - FIXED */
.interest-type-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.interest-type-toggle input[type="radio"] {
    display: none;
}

.toggle-option {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--bg-white);
    color: var(--text-primary);
}

.toggle-option:hover {
    border-color: var(--primary-color);
    background: rgba(76, 175, 80, 0.05);
}

.interest-type-toggle input[type="radio"]:checked + .toggle-option {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Variable Rate Section */
.variable-rate-section {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

.variable-rate-item {
    margin-bottom: 0.75rem;
}

.variable-rate-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.variable-rate-item input.form-control {
    width: 100px;
    padding: 0.5rem;
}

.variable-rate-item .remove-rate {
    margin-left: auto;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.alert-info {
    background: rgba(41, 182, 246, 0.1);
    border: 1px solid var(--info-color);
    color: #0277BD;
}

/* Buttons - FIXED */
.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-calculate {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.btn-reset {
    width: 100%;
    margin-top: 0.5rem;
}

.btn-outline-secondary {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline-secondary:hover {
    background: var(--bg-light);
    border-color: var(--text-secondary);
}

.btn-outline-primary {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-outline-success {
    background: white;
    border: 2px solid var(--success-color);
    color: var(--success-color);
}

.btn-outline-success:hover {
    background: var(--success-color);
    color: white;
}

.btn-outline-danger {
    background: white;
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
}

/* ============================================
   QUICK PRESETS - FIXED
   ============================================ */
.quick-presets {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
}

.preset-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: white;
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.btn-preset {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    backdrop-filter: blur(10px);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-preset:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-preset.active {
    background: rgba(255, 255, 255, 0.35);
    border-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.preset-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.preset-value {
    font-size: 0.85rem;
    opacity: 0.95;
}

/* ============================================
   RESULTS SECTION - FIXED
   ============================================ */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.result-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    border: 2px solid transparent;
}

.result-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.primary-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    grid-column: span 2;
    padding: 2rem;
}

.primary-card .result-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.primary-card .result-label {
    color: rgba(255, 255, 255, 0.95);
}

.primary-card .result-value {
    color: white;
}

.primary-card .result-note {
    color: rgba(255, 255, 255, 0.9);
}

.result-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.result-content {
    flex: 1;
}

.result-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.result-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.result-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.pulse-animation {
    animation: pulse 0.6s ease-in-out;
}

/* ============================================
   CHARTS SECTION - FIXED
   ============================================ */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-title i {
    color: var(--primary-color);
}

.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 1.5rem;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.legend-label {
    font-weight: 500;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* ============================================
   TABLE SECTION
   ============================================ */
.table-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.table-title i {
    color: var(--primary-color);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.table-filters {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.form-select-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.table-responsive {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table thead {
    background: var(--bg-light);
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.table-striped tbody tr:nth-child(even) {
    background: var(--bg-light);
}

.table tbody tr:hover {
    background: rgba(76, 175, 80, 0.05);
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-secondary);
}

/* Table Pagination */
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.page-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features-section {
    margin: 4rem 0;
    padding: 3rem 2rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.section-heading {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
}

.feature-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.feature-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   HOW IT WORKS SECTION
   ============================================ */
.how-it-works-section {
    margin: 4rem 0;
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.step-item {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    flex: 1;
    min-width: 200px;
    max-width: 250px;
    transition: var(--transition);
}

.step-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.step-arrow {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: bold;
}

/* ============================================
   FORMULA SECTION
   ============================================ */
.formula-section {
    margin: 4rem 0;
    padding: 3rem 0;
}

.formula-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow-md);
    max-width: 900px;
    margin: 2.5rem auto 0;
}

.formula-display {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.formula-equation {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.formula-fraction {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.numerator {
    border-bottom: 2px solid var(--text-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
}

.formula-explanation h3,
.formula-example h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.formula-variables {
    list-style: none;
    padding: 0;
}

.formula-variables li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

.formula-example {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.formula-example ul {
    list-style: none;
    padding-left: 1rem;
}

.formula-example li {
    padding: 0.25rem 0;
    color: var(--text-secondary);
}

/* ============================================
   FAQ SECTION
   ============================================ */
.faq-section {
    margin: 4rem 0;
    padding: 3rem 2rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.faq-container {
    max-width: 900px;
    margin: 2.5rem auto 0;
}

.faq-item {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1.5rem;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer div {
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* ============================================
   INFO SECTION
   ============================================ */
.info-section {
    margin: 4rem 0;
}

.info-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    height: 100%;
}

.info-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card h3 i {
    color: var(--primary-color);
}

.info-card ul {
    list-style: none;
    padding: 0;
}

.info-card li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: var(--success-color);
    color: white;
}

.toast-error .toast-icon {
    background: var(--danger-color);
    color: white;
}

.toast-info .toast-icon {
    background: var(--info-color);
    color: white;
}

.toast-warning .toast-icon {
    background: var(--warning-color);
    color: white;
}

.toast-message {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .primary-card {
        grid-column: span 2;
    }
}

@media (max-width: 992px) {
    .page-title {
        font-size: 2rem;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .steps-container {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    .loan-calculator-container {
        padding: 1rem 0 2rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .calculator-card {
        padding: 1.5rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .primary-card {
        grid-column: span 1;
    }
    
    .result-value {
        font-size: 1.5rem;
    }
    
    .table-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .table-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
    
    .formula-card {
        padding: 1.5rem;
    }
    
    .formula-equation {
        font-size: 1.2rem;
    }
    
    .preset-buttons {
        grid-template-columns: 1fr;
    }
    
    .toast-container {
        left: 10px;
        right: 10px;
    }
    
    .toast {
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .section-heading {
        font-size: 1.5rem;
    }
    
    .calculator-card {
        padding: 1rem;
    }
    
    .result-card {
        flex-direction: column;
        text-align: center;
    }
    
    .result-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .table-filters {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-group {
        width: 100%;
        justify-content: space-between;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .step-item {
        min-width: 100%;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .breadcrumb-nav,
    .calculator-card.input-section,
    .quick-presets,
    .table-actions,
    .table-filters,
    .table-pagination,
    .features-section,
    .how-it-works-section,
    .faq-section,
    .info-section {
        display: none !important;
    }
    
    .calculator-wrapper {
        margin: 0;
    }
    
    .results-section {
        page-break-inside: avoid;
    }
    
    .table {
        page-break-inside: auto;
    }
    
    .table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}
