/* Import modern fonts */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #e0f2fe 0%, #f3e8ff 50%, #fef3c7 100%);
    background-attachment: fixed;
    color: #1f2937;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar */
header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.logo img {
    height: 45px;
    width: auto;
    background: linear-gradient(135deg, #fff, #f0f0f0);
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-links a.active {
    background: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #ff6b9d;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::after {
    width: 80%;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.hamburger-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 80px;
    /* Below the header */
    left: 0;
    right: 0;
    bottom: 0;
    /* Cover the full screen */
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.98), rgba(118, 75, 162, 0.98));
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    /* Higher than everything */
    display: none;
    /* Hidden by default */
    transition: all 0.3s ease;
    overflow-y: auto;
    /* Allow scrolling if needed */
}

.mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin-bottom: 1rem;
}

.mobile-menu-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.mobile-menu.active {
    display: flex;
    /* Show when active */
    opacity: 1;
}

.mobile-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    display: block;
    /* Ensure it's a block element */
    width: 100%;
    /* Full width */
}

.mobile-menu a:hover,
.mobile-menu a.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Hero */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1rem 1rem;
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 4rem auto 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 20px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        filter: brightness(1);
    }

    to {
        filter: brightness(1.1);
    }
}

.hero h2 {
    text-align: center;
    font-size: clamp(1.2rem, 3vw, 2rem);
    margin-bottom: 1rem;
    color: #1e40af;
    font-weight: 600;
}

.hero p {
    text-align: center;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    margin-bottom: 1.5rem;
    color: #374151;
    line-height: 1.7;
    max-width: 1200px;
    font-weight: 400;
}

.hero a {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.hero a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.hero a:hover::before {
    left: 100%;
}

.hero a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.hero ul {
    text-align: left;
    padding-left: 1.5rem;
    margin: 1rem 0;
    max-width: 1000px;
    list-style: none;
    /* Remove default bullets */
}

.hero li {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: #374151;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 1200px;
    font-weight: 400;
    position: relative;
    padding-left: 4rem;
    /* Increased padding for custom marker */
}

/* Custom list markers based on content context */
.hero li::before {
    content: '💰';
    /* Default money symbol */
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2em;
    color: #3b82f6;
}

/* Salary components list - briefcase/money related */
.hero li:nth-child(1)::before {
    content: '💼';
}

/* Basic Salary */
.hero li:nth-child(2)::before {
    content: '🏠';
}

/* House Rent Allowance */
.hero li:nth-child(3)::before {
    content: '🎁';
}

/* Special Allowances */
.hero li:nth-child(4)::before {
    content: '🏢';
}

/* Employer Contributions */
.hero li:nth-child(5)::before {
    content: '📉';
}

/* Deductions */

/* Tax regimes list - scale/balance symbols */
.hero h2:nth-of-type(2)+p+ul li:nth-child(1)::before {
    content: '⚖️';
}

/* Old Regime */
.hero h2:nth-of-type(2)+p+ul li:nth-child(2)::before {
    content: '⚖️';
}

/* New Regime */

/* Benefits/Why it matters list - checkmark/target symbols */
.hero h2:nth-of-type(3)+ul li:nth-child(1)::before {
    content: '📅';
}

/* Plan your monthly budget */
.hero h2:nth-of-type(3)+ul li:nth-child(2)::before {
    content: '📈';
}

/* Decide on investments */
.hero h2:nth-of-type(3)+ul li:nth-child(3)::before {
    content: '🤝';
}

/* Negotiate better */
.hero h2:nth-of-type(3)+ul li:nth-child(4)::before {
    content: '🎯';
}

/* Prepare for long-term goals */

/* Regime Page Specific Styles */
.regime-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: -4rem;
}

.regime-buttons a {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1.2rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    text-align: center;
}

.regime-buttons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669, #047857);
}

.regime-buttons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.regime-buttons a:hover::before {
    left: 100%;
}

#poll {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

#poll-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.poll-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.poll-btn.old {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.poll-btn.old:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #d97706, #b45309);
}

.poll-btn.new {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.poll-btn.new:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.poll-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

#pollChart {
    max-width: 100%;
    height: 300px;
    margin: 0 auto;
}

/* Calculator Actions */
.calculator-actions {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    min-width: 250px;
    justify-content: center;
}

.action-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.action-btn.secondary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.action-btn.secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, #059669, #047857);
}

.btn-icon {
    font-size: 1.25rem;
}

.btn-text {
    font-size: 1rem;
    white-space: nowrap;
}

/* Mobile adjustments for calculator actions */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .action-btn {
        min-width: 280px;
        width: 100%;
        max-width: 350px;
    }
}

/* Add padding to body to account for fixed header */
body {
    padding-top: 0;
}

/* Adjust hero spacing for mobile */
@media (max-width: 768px) {
    .hero {
        margin: 5rem 1rem 2rem;
        padding: 3rem 2rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }
}

/* Footer */
footer {
    background-color: #1e3a8a;
    color: white;
    text-align: center;
    align-items: center;
    padding: 1rem;
}

.footer-copy span {
    color: #38bdf8;
}

footer .footer-copy {
    font-size: 13px;
    margin-bottom: 0.5rem;
}

footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

footer .footer-links a {
    color: #38bdf8;
    text-decoration: none;
    font-size: 0.9rem;
}

footer .footer-links a:hover {
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto;
}

.zero-scenario-modal {
    position: fixed;
    inset: 0;
    z-index: 2600;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.zero-scenario-content {
    width: min(720px, 96vw);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.95));
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.25);
    color: #0f172a;
    padding: 18px 18px 14px;
}

.zero-scenario-content h3 {
    margin: 0 0 8px;
    color: #1e3a8a;
    font-size: 1.05rem;
}

.zero-scenario-content p {
    margin: 0 0 8px;
    line-height: 1.45;
}

.zero-scenario-content ul {
    margin: 8px 0 10px 1rem;
    padding: 0;
}

.zero-scenario-content li {
    margin: 0 0 8px;
    line-height: 1.45;
}

.zero-scenario-close-note {
    color: #475569;
    font-size: 0.85rem;
    margin-bottom: 0;
}

.modal-content {
    position: relative;
    background-color: #1f2037;
    color: #e2e8f0;
    padding: 24px;
    border-radius: 8px;
    max-width: 500px;
    margin: 40px auto;
    box-sizing: border-box;
    word-wrap: break-word;
}

.modal-content h2 {
    margin-top: 0;
    color: #60a5fa;
}

.modal-content p {
    margin-bottom: 0;
}

.developer-link {
    background-color: #577b8b;
    color: #ebacefeb;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bolder;
}

.developer-link:hover {
    background-color: #0ea5e9;
    color: #fff;
}

.close {
    position: absolute;
    top: 10px;
    right: 24px;
    width: fit-content;
    height: 20px;
    line-height: 24px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: #94a3b8;
    cursor: pointer;
}

.close:hover {
    color: #f87171;
}

/* Calculator Modal */
.calculator-modal {
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #1f2937;
}

.calculator-modal h2 {
    color: #1e40af;
    text-align: center;
    margin-bottom: 1rem;
}

.calculator-modal .close {
    color: #6b7280;
    font-size: 28px;
    top: 15px;
    right: 20px;
}

.calculator-modal .close:hover {
    color: #ef4444;
}

.calculator-modal .modal-reset-btn-top-right {
    position: absolute;
    top: 20px;
    right: 56px;
    z-index: 10;
}

/* Enhanced Table Styling for Modal Tables */
.calculator-modal table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.calculator-modal th {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 16px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid #2563eb;
    border-bottom: 3px solid #1d4ed8;
}

.calculator-modal td {
    padding: 14px 12px;
    border: 2px solid #e5e7eb;
    border-top: none;
    background: #ffffff;
    color: #374151;
    font-weight: 500;
}

.calculator-modal tbody tr:nth-child(even) {
    background: #f8fafc;
}

.calculator-modal tbody tr:nth-child(odd) {
    background: #ffffff;
}

.calculator-modal tbody tr:hover {
    background: #eff6ff;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

.calculator-modal .display-cell {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #1f2937;
}

.infinity-symbol {
    font-size: 24px;
    font-weight: 1000;
    line-height: 1;
    display: inline-block;
}

.calculator-modal .computed {
    color: #059669;
    font-weight: 700;
    text-align: center;
}

.calculator-modal th,
.calculator-modal td {
    text-align: center;
}

.calculator-modal .final-row {
    background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
    border: 3px solid #f59e0b;
    font-weight: 800;
    color: #92400e;
}

.calculator-modal .final-row td {
    color: #92400e;
    font-size: 16px;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .calculator-modal table {
        font-size: 12px;
    }

    .calculator-modal th,
    .calculator-modal td {
        padding: 10px 8px;
    }

    .calculator-modal th {
        font-size: 13px;
    }
}

/* Table container styling */
.calculator-modal .table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.calculator-modal .card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Main Calculator Table Styling - Same as Modal Tables */
#table1-container {
    max-width: 800px;
    margin: 0 auto;
    overflow-x: auto;
}

#table1-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

#table1-container th {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 16px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid #2563eb;
    border-bottom: 3px solid #1d4ed8;
}

#table1-container td {
    padding: 14px 12px;
    border: 2px solid #e5e7eb;
    border-top: none;
    background: #ffffff;
    color: #374151;
    font-weight: 500;
}

#table1-container tbody tr:nth-child(even) {
    background: #f8fafc;
}

#table1-container tbody tr:nth-child(odd) {
    background: #ffffff;
}

#table1-container tbody tr:hover {
    background: #eff6ff;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

#table1-container .display-cell {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #1f2937;
}

#table1-container .computed {
    color: #059669;
    font-weight: 700;
    text-align: center;
}

#table1-container .final-row {
    background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
    border: 3px solid #f59e0b;
    font-weight: 800;
    color: #92400e;
}

#table1-container .final-row td {
    color: #92400e;
    font-size: 20px;
}

/* Toolbar links styling - elegant buttons */
.toolbar-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Calculator page content wrapper */
.wrap {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
}

/* Calculator right-side annual summary */
.calculator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.25rem;
    align-items: start;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    margin-top: 108px;
}

.toolbar-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-bottom: 0.35rem;
}

.toolbar-header h2 {
    margin: 0;
    text-align: center;
}

.home-btn.top-btn {
    position: absolute;
    left: 0;
}

.annual-summary-panel {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 16px;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.12);
    padding: 1rem;
    box-sizing: border-box;
    max-width: 100%;
    height: fit-content;
    margin-top: 0;
}

.annual-summary-panel h3 {
    margin: 0 0 0.8rem;
    color: #1e40af;
    font-size: 1.05rem;
    text-align: center;
}

.annual-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.annual-summary-header h3 {
    margin: 0;
    text-align: left;
}

.annual-summary-actions {
    display: inline-flex;
    gap: 0.35rem;
}

.summary-action-btn {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1e3a8a;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}

.summary-action-btn:hover {
    background: #dbeafe;
}

.annual-summary-metrics {
    display: grid;
    gap: 0.6rem;
}

.metric-item {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(203, 213, 225, 0.6);
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.metric-label {
    font-size: 0.78rem;
    color: #475569;
    font-weight: 600;
}

.metric-label-with-info {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    position: relative;
}

.info-badge {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #94a3b8;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: help;
}

.info-popover {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 20;
    max-width: 240px;
    width: max-content;
    background: #0f172a;
    color: #f8fafc;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.35;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.35);
}

.metric-label-with-info:hover .info-popover,
.metric-label-with-info.open .info-popover {
    display: block;
}

.metric-value {
    font-size: 1rem;
    color: #0f172a;
    font-weight: 700;
}

.annual-chart-wrap {
    margin-top: 0.9rem;
    height: 300px;
    position: relative;
}

@media (max-width: 992px) {
    .calculator-layout {
        grid-template-columns: 1fr;
        margin-top: 96px;
    }

    .annual-summary-panel {
        position: static;
        max-width: 820px;
        width: 100%;
        margin-top: 0;
        margin: 0 auto 0.75rem;
    }
}

.toolbar-links .btn.elegant {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 0.75rem 1.5rem;
    border: 2px solid #2563eb;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toolbar-links .btn.elegant:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.4);
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.toolbar-links .btn.link.elegant {
    background: linear-gradient(135deg, #059669, #10b981);
    border-color: #047857;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.toolbar-links .btn.link.elegant:hover {
    background: linear-gradient(135deg, #047857, #065f46);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
}

/* Table note styling */
.table-note {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280;
    font-style: italic;
    font-weight: 600;
    padding: 1rem;
    background: rgba(251, 252, 254, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(203, 213, 225, 0.5);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.table-note em {
    font-style: italic;
}

.table-note strong {
    font-weight: 700;
    color: #1e40af;
}

/* Disclaimer note styling */
.disclaimer-note {
    margin-top: 0.75rem;
    text-align: center;
    font-size: 0.65rem;
    color: #92400e;
    font-style: italic;
    font-weight: 600;
    padding: 0.75rem 1rem;
    background: rgba(254, 243, 199, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    max-width: 800px;
    width: 100%;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
    display: block;
}

.disclaimer-note em {
    font-style: italic;
}

.disclaimer-note strong {
    font-weight: 700;
    color: #92400e;
}

@media (max-width: 768px) {
    .disclaimer-note {
        font-size: 0.65rem;
        padding: 0.65rem 0.75rem;
    }
}

/* Responsive adjustments for toolbar */
@media (max-width: 768px) {
    .toolbar-links {
        gap: 0.75rem;
    }

    .toolbar-links .btn.elegant {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    #table1-container {
        max-width: 100%;
        margin: 0;
    }

    #table1-container th,
    #table1-container td {
        padding: 10px 8px;
        font-size: 13px;
    }

    #table1-container th {
        font-size: 14px;
    }

    .table-note {
        font-size: 0.85rem;
        padding: 0.75rem;
        margin: 0.75rem auto;
    }

    .annual-chart-wrap {
        height: 260px;
    }

}

/* Responsive modal for mobile */
@media (max-width: 600px) {
    .modal-content {
        margin: 20px;
        padding: 16px;
    }

    .calculator-modal {
        max-width: 95vw;
        max-height: 95vh;
        margin: 10px auto;
    }
}

.pill-link {
    display: flow-root;
    padding: 4px 12px;
    background-color: #2660be;
    color: #fff;
    border-radius: 9999px;
    /* pill shape */
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: background-color 0.2s ease;
}

.pill-link:hover {
    background-color: #0a36b0;
    /* darker on hover */
}

#poll {
    text-align: center;
    margin-top: 20px;
    font-family: Arial, sans-serif;
}

#poll-buttons {
    margin-bottom: 25px;
}

.poll-btn {
    padding: 10px 20px;
    margin: 0 10px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

/* Specific colors */
.poll-btn.old {
    background-color: rgb(115, 195, 119);
}

.poll-btn.new {
    background-color: rgb(204, 128, 105);
}

/* Hover effect */
.poll-btn:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

/* Disabled state after voting */
.poll-btn:disabled {
    background-color: #b0b0b0 !important;
    color: #f1f1f1;
    opacity: 1;
    cursor: not-allowed;
    transform: none;
    position: relative;
}

.poll-btn.voted::after {
    content: " ✔";
    font-size: 16px;
    color: #fff;
}

#pollChart {
    max-width: 250px;
    max-height: 250px;
    margin: 0 auto 50px auto;
    display: block;
}

/* Salary Slider */
#salary-slider-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.8));
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    font-family: Arial, sans-serif;
}

#salary-slider-container h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #1e40af;
}

#salary-slider-container input[type="range"] {
    width: 100%;
    height: 8px;
    accent-color: #3b82f6;
    margin-bottom: 20px;
}

#salary-slider-container p {
    font-size: 1.1rem;
    margin: 5px 0;
    color: #374151;
}

#salary-slider-container span {
    font-weight: bold;
    color: #1e40af;
}

#salary-slider-container span#inHandValue {
    color: #059669;
}

.faq {
    text-align: center;
    max-width: 1200px;
    margin: 2rem auto;
}

.accordion-item {
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.accordion-header {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    border-radius: 12px;
    color: #1e40af;
    transition: all 0.3s ease;
}

.accordion-header:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
}

.accordion-header:focus {
    outline: 2px solid #3b82f6;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1rem;
    text-align: left;
    color: #374151;
}

.accordion-content p {
    margin: 1rem 0;
    line-height: 1.6;
}

.accordion-item.active .accordion-content {
    max-height: 300px;
    /* enough to show content */
    padding-bottom: 1rem;
    text-align: left;
}

.accordion-icon {
    font-size: 1.5rem;
    color: #3b82f6;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

/* Responsive Design */
@media (max-width: 768px) {

    /* Hide desktop nav, show hamburger */
    .nav-links {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    /* Mobile menu is hidden by default, shown only when active */
    .mobile-menu.active {
        display: flex !important;
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Adjust header for mobile */
    header {
        padding: 1rem;
    }

    .logo img {
        height: 35px;
        padding: 6px;
    }

    /* Hero adjustments */
    .hero {
        margin: 5rem 1rem 2rem;
        padding: 2rem 1.5rem;
        border-radius: 15px;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }

    .hero h2 {
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
    }

    .hero p {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    /* Salary slider adjustments */
    #salary-slider-container {
        margin: 20px 1rem;
        padding: 20px;
        border-radius: 15px;
    }

    #salary-slider-container h2 {
        font-size: 1.3rem;
    }

    /* FAQ adjustments */
    .faq {
        margin: 1rem;
        max-width: none;
    }

    .accordion-header {
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    .accordion-content p {
        font-size: 0.95rem;
    }

    /* Footer adjustments */
    footer {
        padding: 1.5rem 1rem;
    }

    footer .footer-links {
        gap: 0.8rem;
    }

    footer .footer-links a {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero a {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .mobile-menu {
        padding: 1.5rem;
    }

    .mobile-menu a {
        font-size: 1rem;
        padding: 0.8rem;
    }
}

/* Stats Grid Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 0 2rem;
    max-width: 1000px;
    margin: 2rem auto;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 1.8rem 1.5rem;
    text-align: center;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.8s ease-out both;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            #3b82f6 0%,
            #8b5cf6 25%,
            #ec4899 50%,
            #f59e0b 75%,
            #10b981 100%);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

.stat-card:nth-child(1) .stat-number::before {
    content: '👥';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2rem;
    opacity: 0.7;
}

.stat-card:nth-child(2) .stat-number::before {
    content: '🎯';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2rem;
    opacity: 0.7;
}

.stat-card:nth-child(3) .stat-number::before {
    content: '🕐';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2rem;
    opacity: 0.7;
}

.stat-card:nth-child(4) .stat-number::before {
    content: '💎';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 2rem;
    opacity: 0.7;
}

.stat-number {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, #1e40af, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.stat-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.9;
}

.stat-card:hover .stat-number {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-label {
    color: #1e40af;
    transition: color 0.3s ease;
}

/* Responsive adjustments for stats grid */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1.5rem;
        padding: 0 1rem;
        margin: 2rem auto;
    }

    .stat-card {
        padding: 2rem 1.5rem;
    }

    .stat-number {
        font-size: clamp(2rem, 8vw, 3rem);
        margin-bottom: 0.5rem;
    }

    .stat-label {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }
}

/* Modern animations and effects */
@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Apply animations to key elements */
.hero a {
    animation: bounceIn 1s ease-out 0.5s both;
}

#salary-slider-container {
    animation: slideUp 0.8s ease-out 0.3s both;
}

.faq {
    animation: fadeIn 1s ease-out 0.7s both;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}





/* Dropdown Menu Styling */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.98), rgba(118, 75, 162, 0.98));
    backdrop-filter: blur(10px);
    min-width: 220px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    margin-top: 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dropdown hover handled by JavaScript */

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

/* Mobile Dropdown Menu Styling */
.mobile-dropdown {
    width: 100%;
}

.mobile-dropdown-toggle {
    display: block;
    padding: 1rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    position: relative;
}

.mobile-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.mobile-dropdown-menu {
    display: none;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    border-radius: 12px;
    margin-top: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mobile-dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.mobile-dropdown-menu a:last-child {
    border-bottom: none;
}

.mobile-dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Active state for mobile dropdown */
.mobile-dropdown.active .mobile-dropdown-menu {
    display: block;
}

/* Table centering and sizing improvements - Responsive */
#table1-container {
    overflow-x: auto;
    /* Allow scrolling if absolutely necessary, but design to avoid it */
    width: 100%;
}

#table1-container table {
    width: 100%;
    min-width: auto;
    max-width: 100%;
    margin: 0 auto;
    table-layout: fixed;
    /* Fixed table layout for better control */
}

#table1-container th,
#table1-container td {
    text-align: center;
    white-space: normal;
    padding: 8px 4px;
    /* Reduced padding for mobile */
    font-size: 15px;
    /* Base font size */
}

/* Responsive font sizes */
@media (max-width: 768px) {

    #table1-container th,
    #table1-container td {
        font-size: 12px;
        /* Smaller font on mobile */
        padding: 6px 2px;
        /* Even smaller padding */
    }
}

@media (max-width: 480px) {

    #table1-container th,
    #table1-container td {
        font-size: 11px;
        /* Even smaller on very small screens */
        padding: 4px 2px;
    }
}

/* Input field styling - responsive and centered */
#table1-container input {
    width: 100%;
    /* Full width of cell */
    max-width: 120px;
    /* Maximum width */
    min-width: 80px;
    /* Minimum width for usability */
    padding-top: 2px;
    padding-right: 6px;
    padding-bottom: 2px;
    padding-left: 6px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: inherit;
    /* Inherit from table cell */
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
    /* Include padding in width */
}

#table1-container input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
    background: #f8fafc;
}

/* Responsive input sizes */
@media (max-width: 768px) {
    #table1-container input {
        max-width: 100px;
        min-width: 50px;
        padding: 4px 6px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    #table1-container input {
        max-width: 80px;
        min-width: 50px;
        padding: 3px 4px;
        font-size: 11px;
    }
}

#table1-container select {
    width: 100%;
    /* Full width of cell */
    max-width: 120px;
    /* Maximum width */
    min-width: 80px;
    /* Minimum width */
    padding: 6px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: inherit;
    /* Inherit from table cell */
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    /* Include padding in width */
}

/* House Property row and modal additions (New Regime) */
.house-property-input-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.house-property-trigger-link {
    font-size: 12px;
    color: #2563eb;
    text-decoration: underline;
    font-weight: 600;
    white-space: nowrap;
}

.house-property-trigger-link:hover {
    color: #1d4ed8;
}

.house-property-trigger-spacer {
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
    visibility: hidden;
    white-space: nowrap;
}

.house-property-occupancy {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0.25rem 0 0.6rem;
}

.house-property-modal-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0.1rem 0 0.4rem;
}

.house-property-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #1f2937;
    font-weight: 600;
}

.house-property-checkbox.disabled-option {
    opacity: 0.5;
}

#house-property-table input[readonly] {
    background: #eef2ff;
    cursor: not-allowed;
}

#house-property-table input {
    width: 100%;
    max-width: 120px;
    min-width: 50px;
    padding: 6px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: inherit;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #ffffff;
    color: #1f2937;
}

#house-property-table input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
    background: #f8fafc;
}

#housePropertyModal {
    align-items: center;
    justify-content: center;
    padding-top: 24px;
    padding-bottom: 24px;
    overflow: hidden;
}

#housePropertyModal .calculator-modal {
    max-width: 760px;
    width: calc(100% - 40px);
    max-height: calc(100vh - 32px);
    min-height: 560px;
    overflow: hidden;
    margin: auto;
    padding-top: 22px;
    padding-bottom: 20px;
}

#housePropertyModal .calculator-modal tbody tr:hover {
    transform: none;
}

#housePropertyModal .table-wrapper {
    margin: 6px 0 0;
    padding: 8px;
}

#housePropertyModal .house-property-loss-tooltip {
    margin-top: 8px;
    margin-bottom: 4px;
    padding: 8px 10px;
    line-height: 1.35;
}

#house-property-table {
    table-layout: fixed;
}

#house-property-table th,
#house-property-table td {
    padding-top: 10px;
    padding-bottom: 10px;
}

#house-property-table th:first-child,
#house-property-table td:first-child {
    width: 72%;
    white-space: normal;
    text-align: left;
}

#house-property-table th:last-child,
#house-property-table td:last-child {
    width: 28%;
}

.house-property-calculate-cell {
    text-align: center !important;
    background: #f8fafc;
}

.house-property-result-row {
    display: none;
}

.house-property-result-row.visible {
    display: table-row;
}

.house-property-loss-tooltip {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 12px;
    line-height: 1.45;
}

.house-property-loss-tooltip strong {
    display: block;
    margin-bottom: 4px;
}

.house-property-loss-tooltip p {
    margin: 0;
}

.house-property-row-label-with-info {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    position: relative;
}

.house-property-row-label-with-info .info-popover {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 6px;
}

.house-property-row-label-with-info:hover .info-popover,
.house-property-row-label-with-info.open .info-popover {
    display: block;
}

/* 80C/80D deduction row and modal */
.deduction-80c-input-wrap,
.deduction-80d-input-wrap,
.deduction-80ccd2-input-wrap {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.deduction-80c-trigger-link,
.deduction-80d-trigger-link,
.deduction-80ccd2-trigger-link {
    font-size: 12px;
    color: #2563eb;
    text-decoration: underline;
    font-weight: 600;
    white-space: nowrap;
}

.deduction-80c-trigger-link:hover,
.deduction-80d-trigger-link:hover,
.deduction-80ccd2-trigger-link:hover {
    color: #1d4ed8;
}

#deduction80CCD2Modal {
    align-items: center;
    justify-content: center;
    padding-top: 24px;
    padding-bottom: 24px;
    overflow: hidden;
}

#deduction80CCD2Modal .calculator-modal {
    max-width: 820px;
    width: calc(100% - 40px);
    max-height: calc(100vh - 32px);
    overflow: hidden;
    margin: auto;
    padding-top: 22px;
    padding-bottom: 18px;
}

#deduction80CCD2Modal .calculator-modal tbody tr:hover {
    transform: none;
}

#deduction-80ccd2-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

#deduction-80ccd2-table th,
#deduction-80ccd2-table td {
    padding-top: 10px;
    padding-bottom: 10px;
}

#deduction-80ccd2-table th {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 16px 12px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid #2563eb;
    border-bottom: 3px solid #1d4ed8;
}

#deduction-80ccd2-table td {
    border: 2px solid #e5e7eb;
    border-top: none;
    background: #ffffff;
    color: #374151;
    font-weight: 500;
    text-align: center;
}

.deduction-80ccd2-option-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 700;
    color: #1e3a8a;
}

.deduction-80ccd2-amount-input {
    width: 100%;
    max-width: 180px;
}

#deduction-80ccd2-table input[type="text"].error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
    background: #fff7f7;
}

.deduction-80ccd2-error {
    display: none;
    margin-top: 4px;
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
}

.deduction-80ccd2-basic-config {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    font-weight: 600;
    color: #1e3a8a;
}

.deduction-80ccd2-basic-label,
.deduction-80ccd2-basic-context,
.deduction-80ccd2-basic-or {
    font-size: 13px;
}

#deduction-80ccd2-basic-percent,
#deduction-80ccd2-basic-manual {
    max-width: 180px;
}

#deduction-80ccd2-basic-percent.inactive,
#deduction-80ccd2-basic-manual.inactive {
    opacity: 0.55;
    background: #f1f5f9;
    border-color: #cbd5e1;
}



#deduction80DModal {
    align-items: center;
    justify-content: center;
    padding-top: 24px;
    padding-bottom: 24px;
    overflow: hidden;
}

#deduction80DModal .calculator-modal {
    max-width: 820px;
    width: calc(100% - 40px);
    max-height: calc(100vh - 32px);
    overflow: hidden;
    margin: auto;
    padding-top: 22px;
    padding-bottom: 18px;
}

#deduction80DModal .calculator-modal tbody tr:hover {
    transform: none;
}

#deduction80CModal .calculator-modal tbody tr:nth-child(even):hover {
    background: #f8fafc;
    transform: none;
}

#deduction80CModal .calculator-modal tbody tr:nth-child(odd):hover {
    background: #ffffff;
    transform: none;
}

.deduction-info-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin: 4px 0 12px;
}

.info-tip-box {
    flex: 1;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    color: #312e81;
    line-height: 1.35;
    min-width: 250px;
}

.info-tip-box strong {
    color: #1e3a8a;
}

.info-tip-list {
    margin: 6px 0 0;
    padding-left: 18px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

@media (min-width: 768px) {
    .info-tip-list {
        grid-template-columns: 1fr 1fr;
        column-gap: 16px;
        row-gap: 4px;
    }
}

.deduction-80d-modal-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

#deduction80DModal .table-wrapper {
    overflow-x: auto;
    margin: 20px 0 8px;
}

#deduction-80d-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

#deduction-80d-table th,
#deduction-80d-table td {
    padding-top: 10px;
    padding-bottom: 10px;
}

#deduction-80d-table th:first-child,
#deduction-80d-table td:first-child {
    width: 44%;
    white-space: normal;
    text-align: left;
}

#deduction-80d-table th:nth-child(2),
#deduction-80d-table td:nth-child(2) {
    width: 28%;
}

#deduction-80d-table th:last-child,
#deduction-80d-table td:last-child {
    width: 28%;
}

#deduction-80d-table th {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 16px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 15px;
    border: 2px solid #2563eb;
    border-bottom: 3px solid #1d4ed8;
}

#deduction-80d-table td {
    border: 2px solid #e5e7eb;
    border-top: none;
    background: #ffffff;
    color: #374151;
    font-weight: 500;
    text-align: center;
}

.deduction-80d-age-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.deduction-80d-row-checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 auto;
    cursor: pointer;
}

.deduction-80d-row-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

#deduction-80d-table input[type="text"] {
    width: 100%;
    max-width: 120px;
    min-width: 50px;
    padding: 6px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: inherit;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #ffffff;
    color: #1f2937;
}

#deduction-80d-table input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
    background: #ffffff;
}

#deduction-80d-table input[type="text"]:disabled {
    background: #ffffff;
    cursor: not-allowed;
}

.deduction-80d-max {
    font-size: 12px;
    color: #1e3a8a;
    font-weight: 800;
    white-space: nowrap;
}

.deduction-80d-preventive-cell {
    font-weight: 900;
    color: #1e3a8a;
}

.deduction-80d-preventive-sub {
    font-size: 12px;
    color: #334155;
    font-weight: 700;
}

.deduction-80d-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(203, 213, 225, 0.8);
}

.deduction-80d-total {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 8px 10px;
}

.deduction-80d-total-label {
    font-weight: 800;
    color: #1e3a8a;
    font-size: 0.92rem;
    white-space: nowrap;
}

#deduction-80d-total[readonly] {
    background: #ffffff;
    cursor: not-allowed;
}

#deduction-80d-total {
    width: 180px;
    max-width: 220px;
    padding: 8px 10px;
    border: 2px solid rgba(148, 163, 184, 0.6);
    border-radius: 10px;
    font-weight: 800;
}

@media (max-width: 640px) {
    .deduction-80d-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .deduction-80d-total {
        justify-content: space-between;
    }

    #deduction-80d-total {
        width: 100%;
        max-width: none;
    }
}

/* --- 80C Modal Styles --- */
#deduction80CModal .calculator-modal {
    max-width: 860px;
    width: calc(100% - 40px);
    max-height: calc(100vh - 32px);
    margin: auto;
    padding-top: 22px;
    padding-bottom: 18px;
    display: flex;
    flex-direction: column;
}

#deduction80CModal .table-wrapper {
    overflow-x: auto;
    margin: 16px 0 8px;
    max-height: 50vh;
    overflow-y: auto;
}

#deduction-80c-table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
}

#deduction-80c-table th {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 12px 10px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    border: 2px solid #2563eb;
    border-bottom: 3px solid #1d4ed8;
    position: sticky;
    top: -1px;
    z-index: 2;
}

#deduction-80c-table td {
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
    background: #ffffff;
    color: #374151;
    font-size: 13px;
    vertical-align: middle;
}

#deduction-80c-table .category-col {
    font-weight: 700;
    background: #f8fafc;
    color: #1e3a8a;
    width: 20%;
}

#deduction-80c-table .option-col {
    font-weight: 600;
    width: 55%;
}

#deduction-80c-table .input-col {
    width: 25%;
    text-align: center;
}

#deduction-80c-table input[type="text"] {
    width: 100%;
    max-width: 120px;
    min-width: 70px;
    padding: 6px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: inherit;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #ffffff;
}

#deduction-80c-table input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

#deduction-80c-table input[type="text"].error {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

.info-hover-wrapper {
    display: inline-block;
    position: relative;
    margin-left: 6px;
}

.info-hover-wrapper:hover .info-popover {
    display: block;
    opacity: 1;
    visibility: visible;
}

.deduction-80c-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(203, 213, 225, 0.8);
}

.deduction-80c-total {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 8px 10px;
}

.deduction-80c-total-label {
    font-weight: 800;
    color: #1e3a8a;
    font-size: 0.92rem;
    white-space: nowrap;
}

#deduction-80c-total {
    width: 150px;
    padding: 8px 10px;
    border: 2px solid rgba(148, 163, 184, 0.6);
    border-radius: 10px;
    font-weight: 800;
    text-align: center;
}

@media (max-width: 640px) {
    .deduction-80c-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .deduction-80c-total {
        justify-content: space-between;
    }

    #deduction-80c-total {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 600px) {
    #housePropertyModal .calculator-modal {
        width: calc(100% - 20px);
        max-width: 95vw;
        margin: 10px auto;
    }
}

#table1-container select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Responsive select sizes */
@media (max-width: 768px) {
    #table1-container select {
        max-width: 100px;
        min-width: 70px;
        padding: 4px 6px;
        font-size: 12px;
    }
}

.deduction-80d-total {
    justify-content: space-between;
}

#deduction-80d-total {
    width: 100%;
    max-width: none;
}

/* --- 80C Modal Styles --- */
#deduction80CModal .calculator-modal {
    max-width: 860px;
    width: calc(100% - 40px);
    max-height: calc(100vh - 32px);
    margin: auto;
    padding-top: 22px;
    padding-bottom: 18px;
    display: flex;
    flex-direction: column;
}

#deduction80CModal .table-wrapper {
    overflow-x: auto;
    margin: 16px 0 8px;
    max-height: 50vh;
    overflow-y: auto;
}

#deduction-80c-table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
}

#deduction-80c-table th {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 12px 10px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    border: 2px solid #2563eb;
    border-bottom: 3px solid #1d4ed8;
    position: sticky;
    top: -1px;
    z-index: 2;
}

#deduction-80c-table td {
    border: 1px solid #e5e7eb;
    padding: 8px 10px;
    background: #ffffff;
    color: #374151;
    font-size: 13px;
    vertical-align: middle;
}

#deduction-80c-table .category-col {
    font-weight: 700;
    background: #f8fafc;
    color: #1e3a8a;
    width: 20%;
}

#deduction-80c-table .option-col {
    text-align: left;
    padding-left: 20px;
    font-weight: 600;
    width: 55%;
}

#deduction-80c-table .input-col {
    width: 25%;
    text-align: center;
}

#deduction-80c-table input[type="text"] {
    width: 100%;
    max-width: 120px;
    min-width: 70px;
    padding: 6px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: inherit;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #ffffff;
}

#deduction-80c-table input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

#deduction-80c-table input[type="text"].error {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

.info-hover-wrapper {
    display: inline-block;
    position: relative;
    margin-left: 6px;
}

.info-hover-wrapper:hover .info-popover {
    display: block;
    opacity: 1;
    visibility: visible;
}

.deduction-80c-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(203, 213, 225, 0.8);
}

.deduction-80c-total {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 8px 10px;
}

.deduction-80c-total-label {
    font-weight: 800;
    color: #1e3a8a;
    font-size: 0.92rem;
    white-space: nowrap;
}

#deduction-80c-total {
    width: 150px;
    padding: 8px 10px;
    border: 2px solid rgba(148, 163, 184, 0.6);
    border-radius: 10px;
    font-weight: 800;
    text-align: center;
}

@media (max-width: 640px) {
    .deduction-80c-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .deduction-80c-total {
        justify-content: space-between;
    }

    #deduction-80c-total {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 600px) {
    #housePropertyModal .calculator-modal {
        width: calc(100% - 20px);
        max-width: 95vw;
        margin: 10px auto;
    }
}

#table1-container select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Responsive select sizes */
@media (max-width: 768px) {
    #table1-container select {
        max-width: 100px;
        min-width: 70px;
        padding: 4px 6px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    #table1-container select {
        max-width: 80px;
        min-width: 60px;
        padding: 3px 4px;
        font-size: 11px;
    }
}

/* Modal Table Alignments (Center for headers, Left for row names, Right for inputs) */
#housePropertyModal .calculator-modal table th,
#deduction80DModal .calculator-modal table th,
#deduction80CCD2Modal .calculator-modal table th {
    text-align: center;
    vertical-align: middle;
}

#deduction80CModal .calculator-modal table th {
    text-align: left;
    padding-left: 20px;
    vertical-align: middle;
}

#housePropertyModal .calculator-modal table td:first-child,
#deduction80DModal .calculator-modal table td:first-child,
#deduction80CCD2Modal .calculator-modal table td:first-child {
    text-align: left;
    vertical-align: middle;
}

#deduction80CCD2Modal .calculator-modal table td:first-child {
    text-align: center;
}

#deduction80CModal .calculator-modal table td:first-child {
    text-align: left;
    padding-left: 20px;
    vertical-align: middle;
}

/* Modal Table Alignments */
#housePropertyModal .calculator-modal table th,
#deduction80DModal .calculator-modal table th {
    text-align: center;
    vertical-align: middle;
}

#housePropertyModal .calculator-modal table td:first-child,
#deduction80DModal .calculator-modal table td:first-child {
    text-align: left;
    vertical-align: middle;
}

#deduction80CModal .calculator-modal table th {
    text-align: center;
    vertical-align: middle;
}

#deduction80CModal .calculator-modal table td:first-child {
    text-align: left;
    padding-left: 20px;
    vertical-align: middle;
}