        :root {
            --primary: #6366f1;
            --primary-hover: #4f46e5;
            --success: #10b981;
            --bg-dark: #0f172a;
            --card-bg: rgba(30, 41, 59, 0.7);
            --text-main: #f8fafc;
            --text-muted: #94a3b8;
            --border-glass: rgba(255, 255, 255, 0.1);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        }

        .mt-2 { margin-top: 0.5rem; }
        .mt-4 { margin-top: 1rem; }
        .mt-6 { margin-top: 1.5rem; }
        .mt-8 { margin-top: 2rem; }
        .mb-4 { margin-bottom: 1rem; }
        .mb-6 { margin-bottom: 1.5rem; }
        .flex-center { display: flex; justify-content: center; align-items: center; }
        .w-full { width: 100%; }
        .relative { position: relative; }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Outfit', sans-serif;
        }

        body {
            background: radial-gradient(circle at top right, #1e1b4b, #0f172a);
            color: var(--text-main);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }

        .container {
            width: 100%;
            max-width: 1300px;
            display: grid;
            grid-template-columns: 0.6fr 1.4fr;
            gap: 1.5rem;
            animation: fadeIn 0.8s ease-out;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .card {
            background: var(--card-bg);
            backdrop-filter: blur(12px);
            border: 1px solid var(--border-glass);
            border-radius: 24px;
            padding: 1.5rem;
            box-shadow: var(--shadow-lg);
        }

        h1 {
            font-size: 2rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
            background: linear-gradient(to right, #fff, #94a3b8);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            color: transparent;
        }

        p.subtitle {
            color: var(--text-muted);
            margin-bottom: 1rem;
            font-size: 0.95rem;
        }

        p.footer {
            color: var(--text-muted);
            margin-bottom: 1rem;
            font-size: 0.95rem;
            text-align: center;
        }

        p.footer:hover {
            color: var(--text-main);
            cursor: pointer;
        }

        .form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
            margin-top: 1rem;
        }

        .form-group {
            margin-bottom: 0;
        }

        .form-group.full-width {
            grid-column: span 2;
        }

        label {
            display: block;
            font-size: 0.875rem;
            font-weight: 600;
            margin-bottom: 0.5rem;
            color: var(--text-muted);
        }

        .input-wrapper {
            position: relative;
        }

        .input-wrapper span.prefix {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
        }

        input[type="number"],
        input[type="text"],
        select {
            width: 100%;
            background: rgba(15, 23, 42, 0.5);
            border: 1px solid var(--border-glass);
            border-radius: 12px;
            padding: 0.75rem 1rem;
            color: #fff;
            font-size: 1rem;
            transition: all 0.3s ease;
            outline: none;
        }

        select {
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 0.75rem center;
            background-size: 1.1rem;
            padding-right: 2.5rem;
            cursor: pointer;
        }

        select:hover {
            background-color: rgba(15, 23, 42, 0.65);
            border-color: rgba(255, 255, 255, 0.2);
        }

        select option {
            background-color: #1e293b;
            color: #f8fafc;
            font-family: 'Outfit', sans-serif;
        }

        input[type="number"] {
            padding-left: 2rem;
        }

        input:focus,
        select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
        }

        select:focus {
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236366f1'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
        }


        /* Results Side */
        .results-card {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(16, 185, 129, 0.05));
            border-color: rgba(99, 102, 241, 0.2);
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            padding: 1.5rem;
        }

        .divider {
            height: 1px;
            background: var(--border-glass);
            margin: 1rem 0;
        }

        button {
            background: rgba(255,255,255,0.05);
            color: var(--text-muted);
            padding: 8px 15px;
            font-size: 0.7rem;
            border: 1px solid var(--border-glass);
            border-radius: 12px;
        }

        button:hover {
            cursor: pointer;
            color: var(--text-main);
        }

        .btn-action {
            border-radius: 12px;
            padding: 0.55rem 1rem;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            white-space: nowrap;
        }

        .btn-action:hover {
            transform: translateY(-1px);
        }

        .form-group.full-width .btn-action {
            width: 100%;
            position: relative;
        }

        .btn-action .check-icon {
            width: 20px;
            height: 20px;
            position: absolute;
            right: 1rem;
            color: var(--success);
            display: none;
        }

        .btn-icon-square {
            padding: 0;
            height: 36px;
            width: 36px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .btn-remove {
            background: rgba(239, 68, 68, 0.2) !important;
            border-color: rgba(239, 68, 68, 0.5) !important;
        }

        .btn-remove svg { color: #ef4444; }

        .btn-add {
            background: rgba(16, 185, 129, 0.2) !important;
            border-color: rgba(16, 185, 129, 0.5) !important;
        }

        .btn-add svg { color: #10b981; }

        .inkomsten-row { display: grid; grid-template-columns: repeat(4, 160px) 85px; gap: 1rem; align-items: end; margin-bottom: 1rem; }
        .ziektekosten-row { display: grid; grid-template-columns: repeat(3, 160px) 85px; gap: 1rem; align-items: end; margin-bottom: 1rem; }
        .woonlasten-row { display: grid; grid-template-columns: 200px 160px 85px; gap: 1rem; align-items: end; margin-bottom: 1rem; }
        .overigen-row { display: grid; grid-template-columns: 280px 160px 85px; gap: 1rem; align-items: end; margin-bottom: 1rem; }

        .btn-action svg {
            width: 18px;
            height: 18px;
        }

        .btn-exit {
            background: rgba(255, 255, 255, 0.05);
            color: var(--text-main);
            border: 1px solid var(--border-glass);
            margin: 0 auto; /* Center button in its container */
        }

        .btn-exit:hover {
            background: rgba(255, 255, 255, 0.1);
            box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
        }

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(15, 23, 42, 0.8);
            backdrop-filter: blur(8px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 20000;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }

        .modal-overlay.active {
            opacity: 1;
            pointer-events: auto;
        }

        .modal-content {
            background: var(--bg-dark);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 24px;
            width: 90%;
            max-width: 600px;
            max-height: 90vh;
            overflow-y: auto;
            position: relative;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
            transform: scale(0.95);
            transition: transform 0.3s ease;
            padding: 1.5rem;
        }

        .modal-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1.5rem;
            border-bottom: 1px solid var(--border-glass);
            padding-bottom: 0.75rem;
        }

        .modal-header svg {
            width: 28px;
            height: 28px;
            color: var(--primary);
        }

        .modal-header h2 {
            margin: 0;
            font-size: 1.5rem;
            font-weight: 700;
        }

        .modal-overlay.active .modal-content {
            transform: scale(1);
        }

        .modal-close {
            position: absolute;
            top: 1rem;
            right: 1.5rem;
            background: none;
            border: none;
            color: var(--text-muted);
            font-size: 1.5rem;
            cursor: pointer;
            transition: color 0.2s;
            z-index: 10;
        }

        .modal-close:hover {
            color: var(--text-main);
        }

        /* Output Section Styles */
        .output-row {
            display: grid;
            grid-template-columns: 1fr 100px 100px 100px 100px;
            gap: 1rem;
            align-items: baseline;
            
        }

        .output-row-total {
            padding-top: 0.5rem;
        }

        .output-header-col {
            text-align: right;
            font-weight: 600;
            color: var(--text-muted);
            font-size: 0.95rem;
        }

        .output-label {
            font-size: 0.95rem;
            color: var(--text-muted);
        }

        .output-label-total {
            font-weight: 600;
            color: var(--text-muted);
        }

        .output-value {
            text-align: right;
            font-family: 'JetBrains Mono', monospace;
        }

        .output-value-main {
            color: var(--text-main);
        }

        .onderstreep {
            border-top: 1px solid; 
            border-color: white;
            text-align: right;
        }

        .zonder_streep {
            text-align: right;
        }
        
        .output-value-total {
            font-weight: 600;
            color: var(--text-main);
            border-top: 1px solid; 
            border-color: white;
        }

        @media (max-width: 768px) {
            .container {
                grid-template-columns: 1fr;
            }

            body {
                padding: 1rem;
            }
        }

        @media print {
            @page {
                margin: 1.5cm;
            }

            body {
                background: white !important;
                color: black !important;
                padding: 0 !important;
                margin: 0 !important;
                display: block !important;
                min-height: auto !important;
            }

            .container {
                display: block;
                max-width: 100%;
            }

            #input-section, 
            .modal-overlay,
            .btn-action,
            .divider,
            .btn-remove,
            .btn-add {
                display: none !important;
            }

            .results-card {
                background: none !important;
                border: none !important;
                box-shadow: none !important;
                padding: 0 !important;
                margin: 0 !important;
                width: 17.5cm !important;
                max-width: 100% !important;
            }

            h2, h3 {
                color: black !important;
                font-weight: 700 !important;
                margin-top: 1.5rem !important;
                margin-bottom: 0.5rem !important;
            }

            .output-row {
                grid-template-columns: minmax(0, 1fr) 85px 85px 85px 85px !important;
                gap: 0.2rem !important;
                color: black !important;
                border: none !important;
            }

            .output-label {
                min-width: 0;
                overflow-wrap: break-word;
                hyphens: auto;
                padding-right: 0.5rem;
            }

            .output-label, .output-header-col {
                color: #000 !important;
                font-weight: 500;
            }

            .output-header-col {
                font-weight: 700;
            }

            .output-value {
                color: black !important;
                font-size: 0.85rem !important;
                font-family: 'Courier New', Courier, monospace !important;
                text-align: right !important;
                white-space: nowrap !important;
            }

            /* Make horizontal lines visible in print */
            .onderstreep, 
            .output-value-total,
            .output-row-total {
                border-color: black !important;
                border-top-width: 1px !important;
            }

            /* Override inline styles for borders */
            #outFinalNetto,
            #outFinalNormAflossing,
            #outFinalTotal {
                border-color: black !important;
            }

            .output-label-total {
                font-weight: 700 !important;
                color: black !important;
            }
        }