/* static/css/calculator.css */

/* --- 1. KALKULATOR WYNAGRODZEŃ --- */

.calc-wrapper {
    background-color: var(--color-white);
    padding: 64px 48px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    border: 1px solid #E2E8F0;
    max-width: 1240px; /* FIX: Zwiększona szerokość, by pomieścić tabelę na desktopie */
    margin: -80px auto 0;
    position: relative;
    z-index: 10;
    transition: height 0.3s ease-out;
}

.calc-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid #F1F5F9;
}

.year-selector-wrapper {
    display: flex;
    align-items: center;
    background-color: var(--color-bg-light);
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    transition: all var(--transition-fast);
}

.year-selector-wrapper:hover {
    border-color: #CBD5E1;
    background-color: #F1F5F9;
}

.year-selector-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-light);
    margin-right: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.year-select-minimal {
    background: transparent;
    border: none;
    color: var(--color-navy);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    outline: none;
    padding-right: 24px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%230B1120' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 10px;
}

.btn-print {
    background: transparent;
    border: 1px solid #E2E8F0;
    color: var(--color-text-main);
    cursor: pointer;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}
.btn-print:hover { background-color: var(--color-bg-light); color: var(--color-navy); border-color: #CBD5E1; }

/* Formularze i kontrolki */
.form-select, .form-control, .form-control-lg, .form-control-sm, input[type="number"], input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #CBD5E1;
    border-radius: var(--radius-sm);
    background-color: var(--color-white);
    color: var(--color-navy);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    appearance: none;
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%230B1120' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 10px;
    cursor: pointer;
}

input[type="number"], input[type="text"] { background-image: none; }
.form-select.lg, .form-control-lg { padding: 16px 20px; font-size: 1.1rem; }
.form-control-sm { padding: 10px 12px; font-size: 0.95rem; }

.form-select:focus, .form-control:focus, input[type="number"]:focus, input[type="text"]:focus {
    outline: none;
    border-color: var(--color-navy);
    box-shadow: 0 0 0 1px var(--color-navy);
}

/* Tooltipy */
.tooltipped { position: relative; cursor: help; display: inline-flex; align-items: center; }
.info-icon { color: #94A3B8; font-size: 1.1rem; margin-left: 6px; transition: color 0.2s; }
.tooltipped:hover .info-icon { color: var(--color-navy); }
.tooltipped::after {
    content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(5px);
    background-color: var(--color-navy); color: #fff; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.8rem;
    width: 240px; text-align: center; visibility: hidden; opacity: 0; transition: all 0.2s ease-out; pointer-events: none;
    z-index: 100; line-height: 1.5; font-weight: 400; box-shadow: var(--shadow-sm);
}
.tooltipped:hover::after { visibility: visible; opacity: 1; transform: translateX(-50%) translateY(-8px); }

/* Zakładki (Architektoniczne) */
.main-mode-tabs { display: flex; border-bottom: 2px solid #F1F5F9; margin-bottom: 40px; }
.mode-tab {
    flex: 1; padding: 16px; border: none; background: transparent; font-weight: 600; color: #94A3B8;
    cursor: pointer; transition: all 0.2s ease-out; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.mode-tab:hover { color: var(--color-navy); }
.mode-tab.active { color: var(--color-navy); border-bottom-color: var(--color-navy); }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.calc-divider { border: 0; height: 1px; background-color: #E2E8F0; margin: 48px 0; }
.mode-container { display: none; }
.mode-container.active { display: block; animation: fadeIn 0.4s ease-out; }
.center-input { max-width: 400px; margin: 0 auto; text-align: center; }
.center-input label { text-align: left; font-weight: 700; display: block; margin-bottom: 12px; color: var(--color-navy); font-size: 1.05rem; text-transform: uppercase; letter-spacing: 1px; }

.bonuses-section { margin-top: 48px; border-top: 1px solid #F1F5F9; padding-top: 32px; }
.bonuses-section h4 { font-size: 1rem; color: var(--color-text-main); margin-bottom: 24px; font-weight: 600; }
.btn-add-bonus { background: transparent; border: 1px solid #E2E8F0; padding: 12px 20px; border-radius: var(--radius-sm); color: var(--color-navy); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; transition: all 0.2s; }
.btn-add-bonus:hover { background-color: #F8FAFC; border-color: #CBD5E1; }
.bonus-row-fixed { display: grid; grid-template-columns: 1.5fr 1fr auto; gap: 16px; margin-bottom: 16px; align-items: center; }
.btn-remove { background: transparent; color: #ef4444; border: 1px solid transparent; width: 44px; height: 44px; border-radius: var(--radius-sm); cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.btn-remove:hover { background-color: #fef2f2; border-color: #fecaca; }

.variable-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.month-box { background-color: var(--color-white); border: 1px solid #E2E8F0; padding: 24px; border-radius: var(--radius-sm); transition: transform 0.2s; }
.month-box:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: #CBD5E1; }
.month-header { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; font-weight: 600; color: var(--color-text-light); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }
.btn-add-month-bonus { background: transparent; border: 1px solid #E2E8F0; width: 28px; height: 28px; border-radius: 4px; color: var(--color-navy); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.btn-add-month-bonus:hover { background-color: #F8FAFC; border-color: #CBD5E1; }
.month-bonuses-container input { margin-top: 8px; }

/* Parametry */
.params-group { display: none; background-color: var(--color-bg-light); border: 1px solid #E2E8F0; padding: 32px; border-radius: var(--radius-sm); margin-top: 24px; }
.params-group.show { display: block; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
.inputs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

.checkbox-container { display: flex; align-items: flex-start; cursor: pointer; font-size: 0.95rem; color: var(--color-text-main); font-weight: 400; line-height: 1.5; }
.checkbox-container input { display: none; }
.checkmark {
    width: 24px; height: 24px; border: 1px solid #CBD5E1; border-radius: 6px; margin-right: 12px; margin-top: 2px;
    position: relative; transition: all 0.2s; display: flex; align-items: center; justify-content: center; background-color: white; flex-shrink: 0;
}
.checkbox-container input:checked + .checkmark { background-color: var(--color-navy); border-color: var(--color-navy); color: white; }
.checkbox-container input:checked + .checkmark::after { content: ''; width: 4px; height: 8px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-bottom: 2px; }
.nested-options { display: none; margin-top: 24px; padding-left: 24px; border-left: 2px solid #E2E8F0; }
.nested-options.show { display: block; }
.radio-group-row { display: flex; gap: 24px; align-items: center; font-size: 0.95rem; margin-bottom: 16px; color: var(--color-text-main); }
.full-width { width: 100%; }

.calc-disclaimer {
    margin: 48px 0 40px; display: flex; gap: 16px; background-color: transparent; border: 1px solid #E2E8F0;
    padding: 24px; border-radius: var(--radius-sm); align-items: flex-start;
}
.calc-disclaimer i { font-size: 1.4rem; color: #94A3B8; flex-shrink: 0; margin-top: 2px; }
.disclaimer-text { font-size: 0.85rem; color: var(--color-text-light); line-height: 1.6; }

/* Sekcja wyników wynagrodzeń */
.result-block { margin-bottom: 80px; }
.result-main-title { text-align: left; margin-bottom: 32px; font-size: 1.5rem; color: var(--color-navy); font-weight: 600; letter-spacing: -0.3px; border-bottom: 2px solid #F1F5F9; padding-bottom: 15px; }
.summary-card-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; margin-bottom: 48px; }

.summary-data { background-color: var(--color-navy); border-radius: var(--radius-sm); padding: 48px; color: white; }
.summary-row { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.summary-row:last-child { border-bottom: none; padding-bottom: 0; }
.summary-row .label { color: rgba(255,255,255,0.6); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.summary-row .value { color: white; font-size: 1.8rem; font-family: var(--font-heading); font-weight: 400; }

.highlight-netto, .highlight-total { border-bottom: none; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,0.2); }
.highlight-netto .value, .highlight-total .value { color: var(--color-gold); font-size: 2.5rem; }

.deductions-list { padding: 16px 0; margin-bottom: 24px; }
.deduction-row { display: flex; justify-content: space-between; padding: 8px 0; color: rgba(255,255,255,0.5); font-size: 0.95rem; }
.deduction-row span:last-child { color: rgba(255,255,255,0.9); font-family: monospace; font-size: 1rem; }
.summary-chart { height: 280px; position: relative; }

/* --- TABELE WYNIKÓW (FIX: Desktop & Responsive Card Pattern) --- */
.monthly-table-wrapper { margin-top: 40px; }
.table-title { text-align: left; margin-bottom: 16px; font-size: 1.1rem; color: var(--color-navy); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

/* Wersja bazowa (Desktop - odcięta od wylewania na boki) */
.table-responsive { 
    overflow-x: hidden; /* FIX: Wyłączamy scroll, ufamy Card Layoutowi */
    border: 1px solid #E2E8F0; 
    border-radius: var(--radius-sm); 
    background: var(--color-white);
}

.detailed-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; background: transparent; }
.detailed-table th, .detailed-table td { padding: 12px 10px; text-align: right; border-bottom: 1px solid #F1F5F9; border-right: 1px solid #F1F5F9; white-space: nowrap; }
.detailed-table th:first-child, .detailed-table td:first-child { text-align: left; padding-left: 20px; border-right: 1px solid #E2E8F0; }
.detailed-table td:last-child, .detailed-table th:last-child { padding-right: 20px; border-right: none; }

.detailed-table tbody tr:hover td { background-color: #F8FAFC; }
.detailed-table thead th { background-color: #F8FAFC; color: #64748B; font-weight: 700; text-align: right; border-bottom: 2px solid #E2E8F0; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; }
.detailed-table thead th:first-child { text-align: left; }

#emp-monthly-table td:last-child, #er-monthly-table td:last-child { font-weight: 700; color: var(--color-navy); background-color: #F8FAFC; }
#emp-monthly-table tfoot tr, #er-monthly-table tfoot tr { background-color: var(--color-navy); color: white; }
#emp-monthly-table tfoot td, #er-monthly-table tfoot td { font-weight: 700; font-size: 0.95rem; border: none; }
#emp-monthly-table tfoot td:last-child, #er-monthly-table tfoot td:last-child { color: var(--color-gold); font-size: 1.1rem; }

/* FIX: RESPONSIVE CARD PATTERN DLA TABEL (< 1024px) */
@media (max-width: 1024px) {
    .table-responsive { border: none; box-shadow: none; background: transparent; overflow-x: hidden; }
    .detailed-table, .detailed-table tbody, .detailed-table tr, .detailed-table td { display: block; width: 100%; }
    .detailed-table thead { display: none; }
    .detailed-table tbody tr, .detailed-table tfoot tr { 
        margin-bottom: 24px; background: var(--color-white); border: 1px solid #E2E8F0; 
        border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; 
    }
    .detailed-table td { 
        display: flex; justify-content: space-between; align-items: center; 
        padding: 14px 20px; text-align: right; border-bottom: 1px solid #F1F5F9; 
        border-right: none; white-space: normal; 
    }
    .detailed-table th:first-child, .detailed-table td:first-child { border-right: none; }
    .detailed-table td:last-child { border-bottom: none; padding-bottom: 20px; }
    
    .detailed-table td::before { 
        font-weight: 600; color: var(--color-text-light); font-size: 0.75rem; 
        text-transform: uppercase; letter-spacing: 1px; flex-shrink: 0; margin-right: 16px;
    }

    /* Mapowanie Etykiet dla Tabeli Pracownika */
    #emp-monthly-table td:nth-child(1)::before { display: none; }
    #emp-monthly-table td:nth-child(1) { background: #F8FAFC; color: var(--color-navy); font-weight: 700; font-size: 1.1rem; justify-content: center; text-transform: uppercase; letter-spacing: 1px; border-bottom: 2px solid #E2E8F0; }
    #emp-monthly-table td:nth-child(2)::before { content: "Brutto"; }
    #emp-monthly-table td:nth-child(3)::before { content: "Emerytalne"; }
    #emp-monthly-table td:nth-child(4)::before { content: "Rentowe"; }
    #emp-monthly-table td:nth-child(5)::before { content: "Chorobowe"; }
    #emp-monthly-table td:nth-child(6)::before { content: "PPK"; }
    #emp-monthly-table td:nth-child(7)::before { content: "Zdrowotne"; }
    #emp-monthly-table td:nth-child(8)::before { content: "Baza PIT"; }
    #emp-monthly-table td:nth-child(9)::before { content: "Zaliczka PIT"; }
    #emp-monthly-table td:nth-child(10)::before { content: "Netto"; color: var(--color-navy); font-size: 0.85rem; }

    /* Mapowanie Etykiet dla Tabeli Pracodawcy */
    #er-monthly-table td:nth-child(1)::before { display: none; }
    #er-monthly-table td:nth-child(1) { background: #F8FAFC; color: var(--color-navy); font-weight: 700; font-size: 1.1rem; justify-content: center; text-transform: uppercase; letter-spacing: 1px; border-bottom: 2px solid #E2E8F0; }
    #er-monthly-table td:nth-child(2)::before { content: "Brutto"; }
    #er-monthly-table td:nth-child(3)::before { content: "Emerytalne"; }
    #er-monthly-table td:nth-child(4)::before { content: "Rentowe"; }
    #er-monthly-table td:nth-child(5)::before { content: "Wypadkowe"; }
    #er-monthly-table td:nth-child(6)::before { content: "Fundusz Pracy"; }
    #er-monthly-table td:nth-child(7)::before { content: "FGŚP"; }
    #er-monthly-table td:nth-child(8)::before { content: "PPK"; }
    #er-monthly-table td:nth-child(9)::before { content: "ZUS Total"; }
    #er-monthly-table td:nth-child(10)::before { content: "Koszt Całk."; color: var(--color-navy); font-size: 0.85rem; }

    /* Tfoot Tweak dla Mobile */
    .detailed-table tfoot tr { background: var(--color-navy); border-color: var(--color-navy); }
    .detailed-table tfoot td { border-bottom-color: rgba(255,255,255,0.1); color: white; }
    .detailed-table tfoot td:nth-child(1) { background: #151F32; color: white; border-bottom: 2px solid rgba(255,255,255,0.1); }
    .detailed-table tfoot td::before { color: rgba(255,255,255,0.6); }
    #emp-monthly-table tfoot td:last-child, #er-monthly-table tfoot td:last-child { color: var(--color-gold); font-size: 1.25rem; background: var(--color-navy); }
}

/* Suwaki PPK */
.ppk-options { display: none; background-color: transparent; padding: 24px 0 0 0; margin-top: 24px; border-top: 1px solid #E2E8F0; }
.slider-group { margin-bottom: 24px; }
.slider-group:last-child { margin-bottom: 0; }
.slider-label { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 12px; color: var(--color-text-light); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
input[type=range] { width: 100%; height: 2px; background-color: #E2E8F0; border-radius: 2px; outline: none; -webkit-appearance: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background-color: var(--color-navy); cursor: pointer; transition: transform 0.2s; }
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* Moduł Inflacji */
.inflation-section { background-color: var(--color-white); border: 1px solid #E2E8F0; border-radius: var(--radius-sm); padding: 48px; margin-top: 80px; }
.inflation-title { font-size: 1.25rem; color: var(--color-navy); font-weight: 600; display: flex; align-items: center; gap: 12px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 1px; }
.inflation-subtitle { font-size: 0.95rem; color: var(--color-text-light); margin-bottom: 32px; line-height: 1.6; }
.inflation-controls { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-bottom: 40px; background-color: transparent; padding: 0; }
.inflation-controls label { font-size: 0.85rem; font-weight: 600; color: var(--color-navy); text-transform: uppercase; letter-spacing: 1px; margin: 0; }
.inflation-select-group { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.inflation-select-group select { min-width: 140px; }
.inflation-result-box { background-color: var(--color-bg-light); padding: 40px; border-radius: var(--radius-sm); border: 1px solid #E2E8F0; display: none; }
.inf-summary-row { display: flex; justify-content: space-between; align-items: center; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid #E2E8F0; }
.inf-cpi-label { font-weight: 600; color: var(--color-text-light); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }
.inf-cpi-val { font-size: 1.5rem; font-weight: 700; color: var(--color-navy); }
.inf-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; }
.inf-col h4 { font-size: 0.75rem; text-transform: uppercase; color: var(--color-text-light); margin-bottom: 24px; border-bottom: 1px solid #E2E8F0; padding-bottom: 12px; letter-spacing: 1.5px; height: auto; }
.inf-row { display: flex; flex-direction: column; margin-bottom: 16px; font-size: 1rem; }
.inf-row span:first-child { font-size: 0.8rem; color: var(--color-text-light); margin-bottom: 4px; }
.inf-row.strong .inf-target-val { font-weight: 600; color: var(--color-navy); font-size: 1.2rem; }
.inf-row .inf-real-val { color: #DC2626; font-weight: 600; font-size: 1.1rem; }
.inf-row .inf-start-val { color: var(--color-text-main); font-weight: 500; font-size: 1.1rem; }
.db-update-info { font-size: 0.75rem; color: #94a3b8; text-align: right; margin-top: 24px; }

/* CTA Konwersja wewnątrz wyników */
.conversion-cta { margin: 80px 0; padding: 48px; background-color: var(--color-bg-light); border: 1px solid #E2E8F0; border-radius: var(--radius-sm); animation: slideIn 0.5s ease-out; color: var(--color-navy); }
.cta-content-inner { display: flex; align-items: center; gap: 32px; }
.conversion-cta .icon-box { font-size: 2.5rem; color: var(--color-navy); opacity: 0.5; }
.conversion-cta .text-box h4 { margin: 0 0 8px 0; color: var(--color-navy); font-size: 1.25rem; }
.conversion-cta .text-box p { margin: 0; color: var(--color-text-light); font-size: 0.95rem; }
.conversion-cta .btn-box { margin-left: auto; }

/* FAQ Kalkulatora */
.calculator-faq { margin-top: 80px; padding-top: 64px; border-top: 1px solid #E2E8F0; }
.calculator-faq h2 { text-align: left; margin-bottom: 48px; font-size: 1.8rem; letter-spacing: -0.5px; }
.faq-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.faq-item h3 { font-size: 1.05rem; color: var(--color-navy); margin-bottom: 16px; font-weight: 600; }
.faq-item p { font-size: 0.9rem; color: var(--color-text-light); line-height: 1.7; }


/* --- 2. KALKULATOR DELEGACJI (TRAVEL) --- */
.travel-header-bg { background-color: var(--color-navy); padding: 140px 0 160px; color: white; text-align: center; }
.travel-card { background-color: var(--color-white); border-radius: var(--radius-sm); border: 1px solid #E2E8F0; padding: 48px; margin-bottom: 32px; box-shadow: none; }
.travel-card-header { border-bottom: 1px solid #F1F5F9; padding-bottom: 24px; margin-bottom: 32px; display: flex; align-items: center; gap: 16px; }
.travel-card-header h3 { margin: 0; color: var(--color-navy); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; }
.travel-card-header i { color: var(--color-text-light); font-size: 1.4rem; }

.travel-type-switch { display: flex; border-bottom: 2px solid #F1F5F9; margin-bottom: 40px; gap: 0; background: transparent; padding: 0; border-radius: 0; }
.type-btn { flex: 1; padding: 16px; border: none; background: transparent; font-weight: 700; color: #94A3B8; border-radius: 0; cursor: pointer; transition: all 0.2s ease-out; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.type-btn:hover { color: var(--color-navy); }
.type-btn.active { background: transparent; color: var(--color-navy); box-shadow: none; border: none; border-bottom: 2px solid var(--color-navy); }

.meals-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; background: transparent; padding: 0; border-radius: 0; margin-top: 24px; }
.meal-item { text-align: center; border: 1px solid #E2E8F0; border-radius: var(--radius-sm); padding: 24px 16px; cursor: pointer; background: var(--color-white); transition: all 0.2s; }
.meal-item:hover { border-color: #94A3B8; }
.meal-item.has-value { border-color: var(--color-navy); background: #F8FAFC; }
.meal-item input[type="checkbox"] { display: none; }
.meal-item span { display: block; font-weight: 700; font-size: 1rem; margin-bottom: 8px; color: var(--color-navy); }
.meal-item small { font-size: 0.75rem; color: #64748B; display: block; margin-bottom: 16px; }
.meal-input { width: 80px; text-align: center; border: 1px solid #CBD5E1; border-radius: var(--radius-sm); padding: 8px; font-size: 1rem; font-weight: 600; margin: 0 auto; display: block; background: #fff; transition: all 0.2s; }
.meal-input:focus { border-color: var(--color-navy); outline: none; }

.result-row { display: flex; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid #F1F5F9; font-size: 0.95rem; color: var(--color-text-light); }
.result-row span:last-child { font-weight: 600; color: var(--color-navy); font-family: monospace; font-size: 1.05rem; }
.result-row.total { border-top: none; border-bottom: none; margin-top: 24px; padding-top: 24px; font-weight: 400; font-size: 1.8rem; color: var(--color-navy); letter-spacing: -0.5px; font-family: var(--font-heading); }

.instruction-content { display: none; padding: 32px; background: var(--color-bg-light); border-radius: var(--radius-sm); font-size: 0.95rem; line-height: 1.7; color: var(--color-text-main); margin-bottom: 40px; border: 1px solid #E2E8F0; }
.instruction-content h4 { margin-top: 24px; margin-bottom: 12px; color: var(--color-navy); font-size: 1.05rem; font-weight: 600; }

/* --- 3. GENERATOR SKIEROWAŃ (REFERRAL) --- */
.ref-header-bg { background-color: var(--color-navy); padding: 140px 0 160px; color: white; text-align: center; }
.ref-card { background: white; border-radius: var(--radius-sm); box-shadow: none; border: 1px solid #E2E8F0; padding: 48px; margin-bottom: 32px; }
.ref-section-title { color: var(--color-navy); font-size: 1.1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid #E2E8F0; padding-bottom: 16px; margin-bottom: 32px; display: flex; align-items: center; gap: 16px; }
.ref-section-title i { color: var(--color-text-light); font-size: 1.4rem; }

.factors-group { margin-bottom: 32px; }
.factors-group h5 { font-size: 0.85rem; color: var(--color-navy); text-transform: uppercase; margin-bottom: 16px; font-weight: 600; letter-spacing: 1px; border-bottom: 1px dashed #E2E8F0; padding-bottom: 8px; }
.factor-item { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; cursor: pointer; }
.factor-item input { margin-top: 6px; width: 16px; height: 16px; accent-color: var(--color-navy); }
.factor-item span { font-size: 0.95rem; color: var(--color-text-main); }

.exam-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.exam-type-label { border: 1px solid #E2E8F0; background: var(--color-white); border-radius: var(--radius-sm); padding: 20px; text-align: center; cursor: pointer; transition: all 0.2s; }
.exam-type-label:hover { background: var(--color-bg-light); }
.exam-type-label input { display: none; }
.exam-type-label span { font-weight: 600; color: var(--color-text-main); display: block; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; }
.exam-type-label:has(input:checked) { background-color: var(--color-navy); border-color: var(--color-navy); }
.exam-type-label:has(input:checked) span { color: white; }

.privacy-alert { background-color: transparent; border: 1px solid #E2E8F0; border-radius: var(--radius-sm); padding: 24px 32px; display: flex; gap: 24px; align-items: flex-start; color: var(--color-text-light); font-size: 0.9rem; margin-bottom: 48px; }
.privacy-alert i { font-size: 1.6rem; color: var(--color-navy); opacity: 0.5; margin-top: 2px; }

/* --- 4. RESPONSIVE DLA KALKULATORÓW (Wspólne / Mobilne) --- */
@media (max-width: 1024px) {
    .variable-grid { grid-template-columns: repeat(2, 1fr); }
    .summary-card-grid { grid-template-columns: 1fr; gap: 40px; }
    .summary-chart { height: 250px; }
    .faq-grid { grid-template-columns: 1fr; }
    .cta-content-inner { flex-direction: column; text-align: center; gap: 24px; }
    .conversion-cta .btn-box { margin: 0 auto; }
}

@media (max-width: 768px) {
    .calc-wrapper { padding: 32px 24px; margin-top: -60px; border-radius: var(--radius-sm); }
    .main-mode-tabs { flex-direction: column !important; gap: 0 !important; background: transparent !important; padding: 0 !important; border-bottom: none; }
    .mode-tab { width: 100% !important; margin: 0 !important; justify-content: center; padding: 16px !important; border: 1px solid #E2E8F0 !important; border-bottom: none !important; border-radius: 0 !important; }
    .mode-tab:first-child { border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important; }
    .mode-tab:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important; border-bottom: 1px solid #E2E8F0 !important; }
    .mode-tab.active { background: var(--color-bg-light) !important; border-color: #E2E8F0 !important; color: var(--color-navy) !important; }
    
    .calc-top-bar { flex-direction: column; gap: 20px; align-items: flex-start; margin-bottom: 32px !important; padding-bottom: 24px; }
    .year-selector-wrapper { width: 100%; justify-content: space-between; padding: 12px 16px; }
    .btn-print { display: none; }
    
    .inputs-grid, .checkbox-grid { grid-template-columns: 1fr; gap: 24px; }
    .params-group { padding: 32px 24px; }
    .bonuses-section { padding: 24px; }
    
    .inflation-controls { flex-direction: column; align-items: stretch; padding: 0; border: none; background: transparent; }
    .inflation-select-group { width: 100%; }
    .inflation-select-group select { flex: 1; } 
    .inflation-result-box { padding: 32px 24px; }
    .inf-grid { grid-template-columns: 1fr !important; gap: 32px; } 
    .inf-col { border-bottom: 1px solid #E2E8F0; padding-bottom: 24px; }
    .inf-col:last-child { border-bottom: none; padding-bottom: 0; }
    .inf-col h4 { height: auto; margin-bottom: 16px; background: transparent; padding: 0; text-align: left; }
    .inf-row { flex-direction: row !important; justify-content: space-between !important; align-items: center !important; flex-wrap: wrap; border-bottom: 1px solid #F1F5F9; padding-bottom: 8px; }
    .inf-row span:first-child { margin-bottom: 0; font-size: 0.85rem; }
    
    .summary-data { padding: 40px 24px; }
    .result-main-title { font-size: 1.3rem; text-align: left; }

    /* Travel */
    .travel-card { padding: 32px 24px; }
    .meals-grid { grid-template-columns: 1fr; gap: 16px; padding: 0; background: transparent; }
    .travel-type-switch { flex-direction: column; border: none; }
    .type-btn { padding: 16px; border: 1px solid #E2E8F0; border-bottom: none; border-radius: 0; margin: 0; }
    .type-btn:first-child { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
    .type-btn:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm); border-bottom: 1px solid #E2E8F0; }
    .type-btn.active { border-color: #E2E8F0; background: var(--color-bg-light); border-left: 4px solid var(--color-navy); }
    
    /* Referral */
    .ref-card { padding: 32px 24px; }
    .exam-type-grid { grid-template-columns: 1fr; }
    .privacy-alert { flex-direction: column; text-align: left; padding: 24px; gap: 16px; }
    .privacy-alert i { font-size: 2rem; margin-bottom: 0; }
}

@media (max-width: 480px) {
    .variable-grid { grid-template-columns: 1fr; }
    .detailed-table { font-size: 0.8rem; border-radius: var(--radius-sm); }
    .detailed-table th, .detailed-table td { padding: 12px 8px; }
    .detailed-table th:first-child, .detailed-table td:first-child { padding-left: 12px; width: auto; }
    .detailed-table td:last-child, .detailed-table th:last-child { padding-right: 12px; }
    .form-control, .form-select, input[type="number"], input[type="text"] { padding: 12px 14px; }
}

/* --- 5. DRUKOWANIE (PRINT STYLES) --- */
@media print {
    body { background: #fff; font-size: 11pt; color: #000; font-family: sans-serif; }
    .main-header, .top-bar, .main-footer, .calc-actions, .main-mode-tabs, .calc-top-bar, .travel-type-switch, .btn-navy-outline { display: none !important; }
    .calc-wrapper, .travel-card, .ref-card { box-shadow: none; border: none; margin: 0; padding: 0; border-radius: 0; }
    .calculator-section, .section-padding { padding: 0; margin: 0; }
    #results-panel { display: block !important; margin-top: 0; }
    .result-block { page-break-inside: avoid; margin-bottom: 40px; }
    .conversion-cta, .instruction-content, .privacy-alert { display: none !important; }
    .summary-data { background: #fff; color: #000; box-shadow: none; padding: 0; }
    .summary-row { border-bottom: 1px solid #eee; }
    .summary-row .label, .summary-row .value, .deduction-row, .deduction-row span:last-child { color: #000; font-family: sans-serif; }
    .highlight-netto .value, .highlight-total .value { color: #000; font-weight: bold; }
    .detailed-table { box-shadow: none; border: 1px solid #000; border-radius: 0; }
    .detailed-table th, .detailed-table td { border-bottom: 1px solid #000; border-right: 1px solid #000; color: #000; }
    .detailed-table thead th { background-color: #eee; color: #000; border-bottom: 2px solid #000; }
    #emp-monthly-table tfoot tr, #er-monthly-table tfoot tr { background-color: #eee; color: #000; border-top: 2px solid #000; }
    #emp-monthly-table td:last-child, #er-monthly-table td:last-child { color: #000; }
}

/* Animacje UI */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }