.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;
}
/* Faktury: EX w nagłówku jak w wierszach — wyrównanie do lewej (td.ex-select ma text-align: left) */
#invoices-table th.ex-col-header {
    text-align: left;
    vertical-align: middle;
}
#invoices-table th.ex-col-header label.ex-col-header-inner {
    align-items: flex-start;
}
#invoices-table td.ex-select {
    text-align: left;
    vertical-align: middle;
}
/* Pracownicy: kolumna 2 ma text-align: center — nagłówek EX tak samo */
#workers-table th.ex-col-header {
    text-align: center;
    vertical-align: middle;
}
#workers-table th.ex-col-header label.ex-col-header-inner {
    align-items: center;
}
label.ex-col-header-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    line-height: 1.2;
    cursor: pointer;
    margin: 0;
    font-weight: 700;
    color: inherit;
    width: 100%;
    box-sizing: border-box;
}
#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;
    vertical-align: middle;
}
.selected-row {
    background: none !important;
}
.selected-cell {
    background: #d0f5d0 !important;
    transition: background 0.2s;
}
#invoices-table td:last-child {
    max-width: 320px;
    white-space: normal;
    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;
}
.summary-content-wrap {
    display: block;
    margin: 0;
    padding: 0;
}
.summary-custom-inline {
    margin: 0;
    padding: 5px;
    line-height: 1.15;
    background: #fff8c5;
    border-radius: 2px;
}
.summary-custom-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #125ea2;
    margin-right: 4px;
}
.summary-custom-text,
.summary-ai-text,
.summary-empty {
    font-style: italic;
}
.summary-ai-line {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin: 0;
    padding: 0;
}
.summary-ai-text,
.summary-empty {
    flex: 1;
    min-width: 0;
    line-height: 1.15;
    margin: 0;
    padding: 0;
}
.summary-edit-btn {
    border: none;
    background: transparent;
    color: #1976d2;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 0;
    margin: 0;
    flex: 0 0 auto;
}
.summary-edit-btn:hover {
    color: #125ea2;
}
.summary-editor-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.summary-editor-textarea {
    width: 100%;
    min-height: 54px;
    resize: vertical;
    border: 1px solid #c9d5e6;
    border-radius: 6px;
    padding: 6px;
    font-size: 12px;
    font-family: inherit;
    color: #1e293b;
}
.summary-editor-actions {
    display: flex;
    gap: 6px;
}
.summary-save-btn,
.summary-cancel-btn {
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
}
.summary-save-btn {
    background: #1976d2;
    color: #fff;
}
.summary-save-btn:hover {
    background: #125ea2;
}
.summary-save-btn:disabled {
    background: #9aa5b1;
    cursor: not-allowed;
}
.summary-cancel-btn {
    background: #e5e7eb;
    color: #374151;
}
.summary-cancel-btn:hover {
    background: #d1d5db;
}
#invoices-table td.summary-ai {
    padding: 10px !important;
}
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;
    vertical-align: middle;
    text-align: center;
}
#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: 750px;
    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;
}

.invoice-preview-trigger {
    display: inline-flex;
    align-items: center;
    border: none;
    background: transparent;
    color: #1565c0;
    cursor: pointer;
    padding: 0;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    text-decoration: underline;
}

.invoice-preview-trigger:hover {
    color: #0d47a1;
}

.invoice-preview-trigger:focus {
    outline: 2px solid #1976d2;
    outline-offset: 2px;
    border-radius: 4px;
}

/* 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;
} 

.invoice-document-modal {
    z-index: 1100;
}

.invoice-document-modal-content {
    width: 90vw;
    height: 90vh;
    max-width: none;
    max-height: none;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.invoice-document-modal-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
    max-height: none;
    min-height: 0;
}

.invoice-preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #1f2937;
    font-weight: 500;
}

.invoice-preview-error {
    color: #b00020;
    background: #fdeaea;
    border: 1px solid #f4b7b7;
    border-radius: 8px;
    padding: 16px;
    width: 100%;
    max-width: 760px;
    text-align: center;
    font-weight: 600;
}

.invoice-preview-frame {
    width: 100%;
    height: 100%;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    background: #fff;
}

.invoice-document-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    border-top: 1px solid #e5e7eb;
}

.invoice-preview-close-btn {
    min-width: 190px;
    min-height: 46px;
    font-size: 16px;
    font-weight: 700;
}

/* ── Voice Agent ─────────────────────────────────────────────────────── */

#voice-mic-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 14px;
    color: #334155;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
#voice-mic-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}
#voice-mic-btn.voice-mic-active {
    background: #fee2e2;
    border-color: #f87171;
    color: #dc2626;
    box-shadow: 0 0 0 3px rgba(248,113,113,0.25);
}
@keyframes voicePulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(248,113,113,0.25); }
    50% { box-shadow: 0 0 0 8px rgba(248,113,113,0.10); }
}
#voice-mic-btn.voice-mic-active {
    animation: voicePulse 1.5s ease-in-out infinite;
}

#voice-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 360px;
    max-height: 420px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    z-index: 9000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
#voice-panel.voice-panel-visible {
    display: flex;
}

.voice-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
}
.voice-panel-title {
    font-weight: 600;
    font-size: 13px;
    color: #334155;
}
.voice-panel-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}
.voice-panel-close:hover {
    color: #475569;
}

.voice-status {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.voice-status-listening {
    color: #dc2626;
}
.voice-status-listening::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #dc2626;
    border-radius: 50%;
    margin-right: 6px;
    animation: voiceDot 1s ease-in-out infinite;
}
@keyframes voiceDot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.voice-status-processing {
    color: #d97706;
}
.voice-status-processing::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border: 2px solid #d97706;
    border-top-color: transparent;
    border-radius: 50%;
    margin-right: 6px;
    animation: voiceSpin 0.6s linear infinite;
}
@keyframes voiceSpin {
    to { transform: rotate(360deg); }
}
.voice-status-error {
    color: #dc2626;
}

.voice-transcript {
    padding: 0 14px 8px;
    font-size: 13px;
    color: #475569;
    font-style: italic;
    min-height: 20px;
}

.voice-log {
    flex: 1;
    overflow-y: auto;
    padding: 4px 14px 10px;
    max-height: 260px;
}
.voice-log-entry {
    font-size: 11px;
    color: #64748b;
    padding: 3px 0;
    border-bottom: 1px solid #f1f5f9;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
}
.voice-log-success {
    color: #16a34a;
}
.voice-log-error {
    color: #dc2626;
}
.voice-log-cmd {
    color: #2563eb;
    font-weight: 600;
}
.voice-log-info {
    color: #475569;
}

/* Anti Fraud: ikony w kole (jak statusowe kropki) */
#invoices-table td.antifraud-cell {
    text-align: center;
    vertical-align: top;
    width: 88px;
}
.antifraud-loading {
    display: inline-block;
    color: #9e9e9e;
    font-weight: 700;
    letter-spacing: 2px;
    animation: antifraudPulse 1s ease-in-out infinite;
}
@keyframes antifraudPulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 1; }
}
.antifraud-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}
.antifraud-icon-svg {
    display: block;
}
.antifraud-unknown {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #bdbdbd;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}