.finance-container {
    max-width: 1600px;
    width: 95vw;
    margin: 40px auto;
    padding: 32px 32px 120px 32px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(33,150,243,0.10);
}
#refresh-btn {
    display: block;
    margin-bottom: 24px;
    padding: 12px 28px;
    font-size: 17px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(25,118,210,0.08);
}
#refresh-btn:hover {
    background: #125ea2;
    box-shadow: 0 4px 16px rgba(25,118,210,0.13);
}
#invoices-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    table-layout: fixed;
}
#invoices-table th, #invoices-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: top;
    background: #fff;
    color: #222;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
}
#invoices-table th {
    background: #f5f5f5;
    color: #1976d2;
    border-radius: 0;
    font-weight: 700;
}
#invoices-table tr:last-child td {
    border-bottom: none;
}
#invoices-table tr:hover {
    background: #e3f2fd !important;
    cursor: pointer;
}
.bank-account-loading {
    color: #aaa;
    font-style: italic;
}
.bank-account-error {
    color: #d32f2f;
    font-style: italic;
}

/* Style dla weryfikacji vendor */
.bank-account-verified {
    color: #2e7d32;
    font-weight: 600;
}

.bank-account-unverified {
    color: #d32f2f;
    font-weight: 600;
}

.bank-account-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bank-account-number {
    font-family: monospace;
    font-size: 14px;
}

.bank-account-status {
    font-size: 12px;
    font-weight: 500;
}

.bank-account-save-btn {
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    margin-top: 2px;
    transition: background 0.2s;
}

.bank-account-save-btn:hover {
    background: #125ea2;
}

.bank-account-save-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Tooltip dla numerów kont */
.bank-account-tooltip {
    position: relative;
    cursor: help;
}

.bank-account-tooltip-popup {
    position: fixed;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: pre-line;
    z-index: 9999;
    max-width: 600px;
    min-width: 400px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-family: monospace;
    line-height: 1.4;
    pointer-events: none;
}
#summary-container {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 95vw;
    max-width: 1600px;
    background: #f8fafc;
    border-radius: 10px;
    box-shadow: none;
    padding: 18px 32px 18px 32px;
    z-index: 100;
    border-top: 2px solid #e0e0e0;
    font-size: 17px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}
@media (max-width: 700px) {
    #summary-container {
        padding: 12px 8px;
        font-size: 15px;
    }
}
#summary-container > div {
    margin-bottom: 0;
}
#generate-basket-btn {
    margin-top: 0px;
    padding: 12px 28px;
    font-size: 17px;
    background: #d32f2f;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(211,47,47,0.08);
}
#generate-basket-btn:hover {
    background: #a31515;
    box-shadow: 0 4px 16px rgba(211,47,47,0.13);
}

#mark-paid-btn {
    margin-top: 0px;
    padding: 12px 28px;
    font-size: 17px;
    background: #4caf50;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(76,175,80,0.08);
}

#mark-paid-btn:hover {
    background: #388e3c;
    box-shadow: 0 4px 16px rgba(76,175,80,0.13);
}

#mark-paid-btn span {
    font-weight: 600;
    margin-left: 4px;
    color: #fff !important;
}
.invoice-select {
    text-align: center;
}
.selected-row {
    background: none !important;
}
.selected-cell {
    background: #d0f5d0 !important;
    transition: background 0.2s;
}
#invoices-table td:last-child {
    max-width: 320px;
    white-space: pre-line;
    word-break: break-word;
    color: #444;
    font-size: 14px;
    font-style: italic;
}
.summary-ai strong, .summary-ai b {
    color: #d32f2f;
    font-weight: 700;
    font-style: normal;
}
.summary-ai .overdue {
    color: #d32f2f;
    font-weight: 700;
    font-style: normal;
}
body, .finance-container, #invoices-table, #summary-container {
    font-family: 'Inter', Arial, Helvetica, sans-serif !important;
}
#invoices-table th:nth-child(1), #invoices-table td:nth-child(1) { width: 60px; min-width: 60px; max-width: 60px; }
#invoices-table th:nth-child(2), #invoices-table td:nth-child(2) { width: 160px; min-width: 120px; max-width: 180px; }
#invoices-table th:nth-child(3), #invoices-table td:nth-child(3) { width: 180px; min-width: 120px; max-width: 220px; }
#invoices-table th:nth-child(4), #invoices-table td:nth-child(4) { width: 340px; min-width: 220px; max-width: 420px; }
#invoices-table th:nth-child(5), #invoices-table td:nth-child(5) { width: 220px; min-width: 120px; max-width: 260px; }
#invoices-table th:nth-child(6), #invoices-table td:nth-child(6) { width: 340px; min-width: 180px; max-width: 400px; } 
.cache-panel {
    position: fixed;
    top: 24px;
    right: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(33,150,243,0.10);
    padding: 10px 18px 8px 18px;
    z-index: 200;
    display: flex;
    flex-direction: row;
    align-items: center;
    min-width: 120px;
    font-size: 15px;
    gap: 10px;
}
.cache-title {
    font-weight: 700;
    color: #1976d2;
    margin-right: 10px;
    font-size: 16px;
}
.cache-size {
    font-size: 14px;
    color: #333;
    margin-right: 8px;
    font-family: monospace;
}
.cache-count {
    font-size: 13px;
    color: #888;
    margin-right: 8px;
}
.cache-cleaner {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    color: #666;
    transition: color 0.3s;
    margin-left: 4px;
}
.cache-cleaner svg {
    width: 16px;
    height: 16px;
}
.cache-cleaner:hover {
    color: #0056b3;
}
.cache-cleaner.cleaning {
    color: #ff6b35 !important;
}
.cache-cleaner.cleaning svg {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@media (max-width: 700px) {
    .cache-panel {
        right: 4px;
        top: 4px;
        padding: 6px 6px 4px 6px;
        font-size: 13px;
    }
} 
#invoices-table td.gross-cell {
    font-weight: bold;
}

/* Style dla faktur częściowo zapłaconych */
.partially-paid-info {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 2px;
}

.partially-paid-amount {
    color: #f57c00;
    font-weight: 600;
}
#selected-amount {
    font-weight: bold;
} 
#workers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    table-layout: fixed;
}
#workers-table th, #workers-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: top;
    background: #fff;
    color: #222;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
}
#workers-table th {
    background: #f5f5f5;
    color: #1976d2;
    border-radius: 0;
    font-weight: 700;
}
#workers-table tr:last-child td {
    border-bottom: none;
}
#workers-table tr:hover {
    background: #e3f2fd !important;
    cursor: pointer;
}
#workers-table th:nth-child(1), #workers-table td:nth-child(1) { width: 60px; min-width: 60px; max-width: 60px; }
#workers-table th:nth-child(2), #workers-table td:nth-child(2) { width: 160px; min-width: 120px; max-width: 180px; }
#workers-table th:nth-child(3), #workers-table td:nth-child(3) { width: 30%; min-width: 220px; max-width: 600px; }
#workers-table th:nth-child(4), #workers-table td:nth-child(4) {
    width: 110px;
    min-width: 90px;
    max-width: 140px;
}
#workers-table th:nth-child(5), #workers-table td:nth-child(5) { width: 220px; min-width: 120px; max-width: 260px; }
#workers-table th:nth-child(6), #workers-table td:nth-child(6) {
    width: 70px;
    min-width: 60px;
    max-width: 90px;
}

#save-btn, #add-row-btn {
    display: inline-block;
    margin-bottom: 24px;
    padding: 12px 28px;
    font-size: 17px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(25,118,210,0.08);
    margin-right: 12px;
}
#save-btn:hover, #add-row-btn:hover {
    background: #125ea2;
    box-shadow: 0 4px 16px rgba(25,118,210,0.13);
}
.remove-row {
    background: #d32f2f;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(211,47,47,0.08);
}
.remove-row:hover {
    background: #a31515;
    box-shadow: 0 4px 16px rgba(211,47,47,0.13);
}
.selected-row {
    background: none !important;
}
.selected-cell {
    background: #d0f5d0 !important;
    transition: background 0.2s;
} 
.input-wider {
    width: 160% !important;
    min-width: 260px;
    max-width: 100%;
}
.input-wide {
    width: 120% !important;
    min-width: 160px;
    max-width: 100%;
}
.input-amount {
    width: 100%;
    min-width: 0;
    max-width: none;
    text-align: right;
}
#workers-table input[type="text"], #workers-table input[type="number"] {
    font-size: 17px;
    padding: 8px 8px;
    border: 1px solid #cfd8dc;
    border-radius: 5px;
    background: #f8fafc;
    color: #222;
    box-sizing: border-box;
    transition: border 0.2s;
}
#workers-table input[type="text"]:focus, #workers-table input[type="number"]:focus {
    border: 1.5px solid #1976d2;
    outline: none;
    background: #fff;
} 
#version-select {
    font-size: 17px;
    padding: 8px 8px;
    border: 1px solid #cfd8dc;
    border-radius: 5px;
    background: #f8fafc;
    color: #222;
    box-sizing: border-box;
    transition: border 0.2s;
    min-width: 220px;
    margin-left: 8px;
    margin-right: 8px;
    height: 41px;
    outline: none;
    vertical-align: middle;
}
#version-select:focus {
    border: 1.5px solid #1976d2;
    background: #fff;
} 

/* Modal styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background-color: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    background-color: #f8f9fa;
    padding: 20px;
    border-top: 1px solid #e9ecef;
    text-align: right;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.success-message {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.success-message h4 {
    margin: 0 0 10px 0;
    color: #155724;
}

.error-message {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.error-message h4 {
    margin: 0 0 10px 0;
    color: #721c24;
}

.mixed-message {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.mixed-message h4 {
    margin: 0 0 10px 0;
    color: #856404;
}

#modal-errors-list, #modal-mixed-errors {
    margin-top: 10px;
    padding-left: 20px;
}

#modal-errors-list li, #modal-mixed-errors li {
    margin-bottom: 5px;
    color: #721c24;
}

#modal-processed-count {
    margin-top: 10px;
    font-weight: 500;
    color: #155724;
}

#modal-mixed-success {
    margin-bottom: 15px;
    color: #155724;
}

/* Style dla dropdown terminu płatności - dopasowanie wysokości do przycisków */
#payment-term-select {
    padding: 12px 8px !important;
    font-size: 17px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #222 !important;
    box-sizing: border-box !important;
    transition: border 0.2s !important;
    height: auto !important;
    min-height: 41px !important;
}

#payment-term-select:focus {
    border: 1.5px solid #1976d2 !important;
    outline: none !important;
} 

/* Status badges for invoices */
.status-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 6px;
    white-space: nowrap;
    display: inline-block;
    line-height: 1.2;
    text-transform: lowercase;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.status-unaccounted {
    color: #fff !important;
    background: linear-gradient(135deg, #ff4757, #ff3742);
    border: none;
    box-shadow: 0 2px 4px rgba(255, 71, 87, 0.3);
}

.status-rejected {
    color: #fff !important;
    background: linear-gradient(135deg, #ffa502, #ff9500);
    border: none;
    box-shadow: 0 2px 4px rgba(255, 165, 2, 0.3);
}

.status-scan {
    color: #fff !important;
    background: linear-gradient(135deg, #9c88ff, #8c7ae6);
    border: none;
    box-shadow: 0 2px 4px rgba(156, 136, 255, 0.3);
}

/* Hover effects for status badges */
.status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    cursor: help;
}

/* Ensure supplier cell can accommodate status badges */
.supplier-cell {
    min-width: 200px;
    word-wrap: break-word;
    vertical-align: top;
}

/* Invoice number cell styling */
.number-cell {
    min-width: 180px;
    word-wrap: break-word;
    vertical-align: top;
}

/* Invoice number styling */
.invoice-number {
    display: inline-block;
    margin-bottom: 4px;
    font-weight: 500;
}

/* Status badge container */
.status-container {
    display: block;
    margin-top: 2px;
}

/* Style dla faktur nie-PLN (zaznaczalne, ale nie wchodzą do koszyka) */
.non-pln-row {
    opacity: 0.85;
    background-color: #f9f9f9 !important;
}

.non-pln-row:hover {
    background-color: #f0f0f0 !important;
}

.non-pln-disabled {
    /* Checkboxy są enabled, ale mają specjalną klasę do identyfikacji */
    opacity: 0.8;
}

/* Niebieski kolor kwot dla faktur nie-PLN */
.non-pln-amount {
    color: #1976d2 !important;
    font-weight: 600;
}

/* Style dla kursu wymiany NBP */
.exchange-rate-loading {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

.exchange-rate {
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.4;
}

.exchange-rate-error {
    font-size: 12px;
    color: #d32f2f;
    margin-top: 4px;
    font-style: italic;
} 