.ksef-alert-correction {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    background-color: #f2dede;
    border-color: #ebccd1;
    color: #a94442;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.ksef-alert-icon {
    float: left;
    font-size: 24px;
    margin-right: 10px;
}

.ksef-alert-content {
    overflow: hidden;
}

.ksef-alert-footer {
    clear: both;
    margin-top: 10px;
    text-align: right;
}

.ksef-status-finished {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
    display: inline-block;
    vertical-align: middle;
    text-align: left;
}

.ksef-status-subtext {
    font-size: 10px;
}

.ksef-btn-margin-left {
    margin-left: 5px !important;
}

.ksef-btn-margin-right {
    margin-right: 8px !important;
}

.ksef-btn-margin-top {
    margin-top: 8px !important;
}

.ksef-va-middle {
    vertical-align: middle !important;
}

.ksef-history-container {
    margin-top: 10px;
    padding: 8px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    font-size: 11px;
}

.ksef-history-title {
    display: block;
    margin-bottom: 5px;
}

.ksef-history-list {
    padding-left: 0;
    margin: 0;
    list-style: none;
}

.ksef-history-item {
    margin-bottom: 6px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 4px;
}

.ksef-history-row {
    font-size: 12px;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-wrap: wrap;
}

.ksef-history-date {
    color: #777;
    font-size: 10px;
}

.ksef-history-type {
    font-size: 9px;
    padding: 1px 4px;
    margin-left: 5px;
}

.ksef-history-btn {
    padding: 1px 5px;
    font-size: 10px;
    margin-left: 5px;
}

.ksef-history-reason {
    font-size: 10px;
    color: #555;
    margin-left: 18px;
    font-style: italic;
}

.ksef-injected-cell {
    text-align: center;
    vertical-align: middle !important;
    white-space: nowrap;
}

.ksef-spinner {
    color: #ddd;
    font-size: 14px;
}

.ksef-uuid-wrapper {
    font-size: 10px;
    color: #888;
    font-family: monospace;
    margin-top: 3px;
    white-space: nowrap;
}

.ksef-icon-success { color: #46a546; cursor: default; font-size: 15px; }
.ksef-icon-error { color: #d9534f; cursor: help; font-size: 15px; }
.ksef-icon-wait { color: #5bc0de; cursor: help; font-size: 15px; }
.ksef-icon-corr { color: #f0ad4e; margin-left: 6px; cursor: help; font-size: 14px; }
.ksef-icon-placeholder { color: #eee; }

.ksef-box {
    margin-top: 20px;
    margin-bottom: 30px;
    border: 1px solid #e7e9ec;
    border-radius: 6px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    overflow: hidden;
}

.ksef-box-header {
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #e7e9ec;
    font-size: 16px;
    font-weight: 600;
    color: #353b48;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ksef-box-header-left {
    display: flex;
    align-items: center;
}

.ksef-icon-circle {
    margin-right: 10px;
    width: 32px;
    height: 32px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e7e9ec;
    color: #d9534f;
}

.ksef-header-subtext {
    font-size: 11px;
    font-weight: normal;
    color: #888;
    margin-top: 2px;
}

.ksef-stats-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    vertical-align: middle;
    background-color: #f0ad4e;
    color: #fff;
    border-radius: .25em;
}

.ksef-header-btn {
    font-weight: 600;
    color: #555;
}

.ksef-table {
    margin-bottom: 0;
    width: 100%;
}

.ksef-table thead tr {
    background-color: #fff;
    color: #838796;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ksef-table th {
    padding: 15px 20px;
    border-bottom: 1px solid #e7e9ec;
    border-top: none;
    font-weight: 600;
}

.ksef-table td {
    padding: 15px 20px;
    vertical-align: middle !important;
    border-bottom: 1px solid #f5f5f5;
}

.ksef-sort-link {
    color: inherit;
    text-decoration: none;
}

.ksef-sort-icon {
    font-size: 10px;
    margin-left: 3px;
}
.ksef-sort-icon-inactive { color: #ccc; }
.ksef-sort-icon-active { color: #333; }

.ksef-correction-number {
    color: #333;
    font-size: 14px;
}

.ksef-uuid-small {
    font-size: 10px;
    color: #999;
    font-family: monospace;
    margin-top: 4px;
    word-break: break-all;
}

.ksef-invoice-link {
    text-decoration: none;
    color: #d9534f;
    font-weight: 600;
    font-size: 13px;
}

.ksef-date-text {
    font-size: 13px;
    color: #555;
}

.ksef-type-label {
    font-size: 11px;
    color: #999;
}

.ksef-btn-pdf {
    background: #fff;
    border: 1px solid #ddd;
    color: #555;
    padding: 4px 10px;
}

.ksef-text-muted {
    font-size: 11px;
    color: #777;
}

.ksef-pagination-wrapper {
    padding: 15px;
    border-top: 1px solid #e7e9ec;
    background-color: #fff;
    width: 100%;
}

.ksef-pagination-ul {
    display: inline-flex;
    margin: 0;
}

.ksef-qr-box {
    text-align: center;
    margin: 15px 0;
    padding: 15px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    border-radius: 4px;
}

.ksef-qr-img {
    margin-bottom: 5px;
    cursor: pointer;
    max-width: 130px;
    height: auto;
}

.ksef-qr-uuid {
    font-size: 10px;
    color: #555;
    font-family: monospace;
    margin-top: 5px;
}

.ksef-qr-hint {
    font-size: 9px;
    color: #999;
    margin-top: 3px;
}

.ksef-badge-paid {
    background: #28a745;
    color: #fff;
    margin-right: 8px;
    padding: 5px 8px;
}

.ksef-btn-pay {
    margin-right: 8px;
    font-weight: 600;
    padding: 4px 10px;
}


.ksef-client-stats-row {
    margin-bottom: 20px;
}

.ksef-client-stats-col {
    padding-top: 8px;
}

.ksef-client-label-lg {
    font-size: 13px;
    padding: 6px 10px;
    margin-right: 5px;
}

.ksef-client-form-container {
    display: flex;
    justify-content: flex-end;
}

.ksef-client-filter-group {
    margin-right: 5px;
    margin-bottom: 0;
    width: 160px;
}

.ksef-client-select {
    font-size: 12px;
    height: 38px;
}

.ksef-client-sort-link {
    color: inherit;
    text-decoration: none;
    display: block;
    white-space: nowrap;
}

.ksef-client-sort-icon {
    color: #ddd;
}

.ksef-client-row-invoice {
    background-color: #fff;
    border-top: 1px solid #e9e9e9;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.ksef-client-row-invoice:hover {
    background-color: #f2f2f2;
}

.ksef-invoice-icon {
    color: #bbb;
    margin-right: 8px;
}

.ksef-client-row-correction {
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
    font-size: 0.9em;
}

.ksef-client-correction-left {
    text-align: left;
    border-left: 3px solid #d9534f;
    padding: 10px 10px 10px 15px !important;
    vertical-align: top !important;
}

.ksef-correction-icon-rotate {
    color: #ccc;
    margin-right: 8px;
}

.ksef-correction-type-label {
    margin-left: 8px;
    font-size: 10px;
}

.ksef-client-row-correction .text-muted {
    color: #555 !important;
}

.ksef-correction-meta-ksef {
    margin-left: 24px;
    margin-top: 4px;
    font-size: 10px;
    font-family: monospace;
}

.ksef-correction-meta-reason {
    margin-left: 24px;
    margin-top: 2px;
    font-size: 11px;
    font-style: italic;
}

.ksef-correction-reason-icon {
    font-size: 10px;
}

.ksef-cell-middle {
    vertical-align: middle !important;
}

.ksef-text-gray {
    color: #777;
}

.ksef-empty-state {
    padding: 30px;
    text-align: center;
}

.ksef-pagination-container {
    margin-top: 20px;
    width: 100%;
    text-align: center;
}

.ksef-pagination-flex {
    display: inline-flex;
}


.ksef-config-section-header {
    margin: 15px 0;
    font-weight: bold;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

.ksef-config-section-header.is-muted {
    color: #666;
    margin-bottom: 15px; 
    border-bottom: none; 
}

.ksef-config-section-header.is-danger {
    color: #a94442;
}

.ksef-config-section-header.is-primary {
    color: #0075ff;
}

.ksef-test-connection-box {
    margin-top: 5px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ksef-test-alert {
    margin-bottom: 10px;
    padding: 8px;
    font-size: 12px;
}
.ksef-hidden {
    display: none;
}

.ksef-loader {
    margin-left: 10px;
    color: #666;
}

.ksef-test-result {
    font-weight: bold;
    font-size: 13px;
    word-break: break-all;
}

.ksef-result-success {
    color: #3c763d;
    margin-top: 8px;
}

.ksef-result-error {
    color: #a94442;
    margin-top: 8px;
}

.ksef-msg-hr {
    margin: 10px 0;
}

.ksef-msg-hr.is-error {
    border-top: 1px solid #ebccd1;
}

.ksef-msg-hr.is-success {
    border-top: 1px solid #c9e2b3;
}

.ksef-msg-actions {
    margin-top: 10px;
}

.ksef-btn-action {
    margin-right: 5px;
}

.ksef-btn-action-bold {
    font-weight: bold;
}

.ksef-alert-box {
    margin: 20px 0;
    padding: 15px;
    border-radius: 4px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.ksef-alert-box.is-success {
    background-color: #dff0d8; 
    border-left: 5px solid #3c763d;
    color: #3c763d; 
}

.ksef-alert-box.is-success {
    background-color: #dff0d8;
    color: #3c763d;
}

.ksef-alert-container {
    display: flex;
    align-items: center;
}

.ksef-alert-icon-box {
    margin-right: 15px;
    font-size: 24px;
}

.ksef-alert-content {
    width: 100%;
}

.ksef-alert-title {
    margin-top: 0;
    margin-bottom: 5px;
    font-weight: bold;
}

.ksef-alert-msg {
    font-size: 14px;
    line-height: 1.4;
}

.ksef-alert-box.is-error {
    border-left: 5px solid #d9534f;
}

.ksef-filters-container {
    background-color: #f5f5f5;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

.ksef-filters-advanced-row {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.ksef-filter-label-sm {
    font-size: 12px;
    color: #777;
}

.ksef-filters-actions-col {
    padding-top: 18px;
    text-align: right;
}

.ksef-stat-badge {
    font-size: 11px;
    padding: 4px 8px;
    margin-right: 5px;
    text-decoration: none;
}

a.ksef-stat-badge:hover, 
a.ksef-stat-badge:focus {
    text-decoration: none;
    color: #fff;
}

.ksef-separator {
    color: #ccc;
    margin: 0 10px;
}

.ksef-btn-clear {
    margin-left: 10px;
}

.ksef-disabled-input {
    background: #eee;
}

.ksef-table-container {
    margin-top: 20px;
}

.ksef-row-correction {
    background-color: #fcfcfc;
    border-left: 3px solid #ddd;
}

.ksef-doc-number {
    color: #555;
    font-weight: bold;
    font-size: 11px;
}

.ksef-label-xs {
    font-size: 9px;
    margin-left: 5px;
}

.ksef-reason-text {
    font-size: 10px;
    color: #555;
    margin-left: 18px;
    font-style: italic;
    display: block;
    margin-top: 4px;
    margin-bottom: 4px;
}

.ksef-icon-doc-type {
    margin-right: 8px;
    margin-left: 15px;
    color: #999;
}

.ksef-amount-text {
    color: #777;
    font-size: 11px;
}

.ksef-amount-wrapper {
    margin-top: 2px;
}

.ksef-rate-info {
    font-size: 10px;
    color: #999;
}

.ksef-diff-wrapper {
    margin-left: 18px; 
    margin-top: 2px;
}

.ksef-diff-positive { 
    color: #ef4444;
    font-weight: bold;
    font-size: 10px;
}

.ksef-diff-negative { 
    color: #10b981;
    font-weight: bold;
    font-size: 10px;
}

.ksef-diff-zero { 
    color: #aaa;
    font-size: 10px;
}

.ksef-icon-surcharge { color: #ef4444; margin-right: 4px; }
.ksef-icon-refund { color: #10b981; margin-right: 4px; }
.ksef-icon-zero { color: #aaa; margin-right: 4px; font-size: 9px; }

.ksef-client-wrapper {
    line-height: 1.3;
}

.ksef-tooltip-icon {
    cursor: help;
    margin-left: 3px;
}

.ksef-tax-label {
    font-size: 10px;
    color: #777;
    margin-top: 2px;
}

.ksef-tax-error {
    font-size: 10px;
    color: #a94442;
}

.ksef-uuid-text {
    font-family: monospace;
    font-size: 11px;
    color: #333;
    word-break: break-all;
}

.ksef-code-success {
    font-size: 10px;
    color: green;
}

.ksef-error-text {
    font-size: 11px;
}

.ksef-wait-text {
    font-size: 11px;
}

.ksef-date-wrapper {
    font-size: 11px;
    text-align: center;
    margin-bottom: 4px;
}

.ksef-date-sub {
    font-size: 10px;
    color: #777;
    margin-top: 2px;
    text-align: center;
}

.ksef-date-success {
    font-size: 11px;
    color: #3c763d;
}

.ksef-btn-block-xs {
    margin-bottom: 3px;
    display: inline-block; 
}

.ksef-btn-width-icon {
    width: 24px;
}

.ksef-pagination-wrapper {
    text-align: center;
    margin-top: 15px;
}

.ksef-footer-credit {
    text-align: right;
    color: #777; 
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 10px;
    font-size: 10px;
}


.ksef-invoice-summary {
    background: #eef4f9;
    border: 1px solid #dcebf7;
    border-left: 4px solid #31708f;
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.ksef-summary-label {
    font-size: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #777;
}

.ksef-summary-value-lg {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.ksef-summary-value-md {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ksef-summary-sub {
    font-size: 11px;
    color: #555;
}

.ksef-summary-uuid {
    font-size: 10px;
    font-family: monospace;
    color: #31708f;
    word-break: break-all;
    background: rgba(255,255,255,0.5);
    padding: 2px;
    border-radius: 3px;
}

.ksef-form-box {
    background: #fff;
    padding: 25px;
    border: 1px solid #dfe6e9;
    border-top: 3px solid #d63031;
    border-radius: 6px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.ksef-section-title {
    font-weight: 700;
    color: #2d3436;
    border-bottom: 2px solid #f1f2f6;
    padding-bottom: 12px;
    margin-bottom: 20px;
    font-size: 16px;
    display: block;
}

.ksef-compare-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 25px;
    font-family: 'Open Sans', sans-serif;
}

.ksef-compare-card {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.ksef-compare-card.old {
    border-color: #fcebeb;
}

.ksef-compare-card.old .card-header {
    background-color: #d9534f;
    color: #fff;
}

.ksef-compare-card.new {
    border-color: #e8f5e9;
}

.ksef-compare-card.new .card-header {
    background-color: #5cb85c;
    color: #fff;
}

.ksef-compare-card .card-header {
    padding: 12px 15px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.ksef-compare-card .card-body {
    padding: 20px;
    color: #333;
}

.ksef-data-row {
    margin-bottom: 12px;
}

.ksef-company-name {
    font-size: 16px;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
    color: #333;
}

.ksef-nip-line {
    font-size: 12px;
    color: #777;
    margin-bottom: 15px;
    display: block;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.ksef-address-line {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.ksef-arrow-icon {
    font-size: 24px;
    color: #55595c;
    padding: 0 10px;
}

.ksef-check-icon {
    color: #5cb85c;
    margin-right: 6px;
    font-size: 16px;
}

@media (max-width: 768px) {
    .ksef-compare-wrapper {
        flex-direction: column;
    }
    .ksef-arrow-icon {
        transform: rotate(90deg);
        margin: 10px 0;
    }
}

.ksef-verify-box {
    margin-top: 15px;
    background: #fffbe6;
    padding: 10px;
    border-left: 4px solid #f1c40f;
    font-size: 12px;
    color: #5c4d08;
}

.ksef-info-box-simple {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 12px;
    margin-top: 15px;
    border-radius: 5px;
    font-size: 13px;
}

.ksef-info-col-border {
    border-right: 1px solid #ddd;
}

.ksef-nip-changed-alert {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #ccc;
    color: #a94442;
    font-size: 11px;
}

.ksef-items-container {
    display: none; 
    background: #fcfcfc;
    padding: 15px;
    border: 1px dashed #ccc;
    margin-bottom: 20px;
}

.ksef-items-table {
    background: #fff;
    margin-bottom: 0;
    font-size: 13px;
}

.ksef-items-header-bg {
    background: #f9f9f9;
}

.ksef-items-header-vat {
    background: #eef;
}

.ksef-item-net-val {
    font-weight: bold;
    font-size: 14px;
}

.ksef-item-vat-val {
    font-weight: bold;
    font-size: 14px;
    color: #31708f;
}

.ksef-item-subtext {
    font-size: 10px;
    color: #777;
    border-top: 1px dashed #ccc;
    margin-top: 4px;
    padding-top: 2px;
}

.ksef-items-footer-row {
    background-color: #f9f9f9;
    border-top: 2px solid #ddd;
    font-weight: bold;
}

.ksef-items-footer-vat-bg {
    background-color: #eef;
}

.ksef-items-total-row {
    background-color: #333;
    color: #fff;
}

.ksef-items-total-val {
    font-size: 15px;
    border: none;
    font-weight: bold;
}

.ksef-foreign-currency-row {
    background-color: #e0f2f1;
    border-top: 1px solid #b2dfdb;
    color: #00695c;
}