.invoice-proforma-section {
    position: relative;
}

#ebpTokenStatus {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: rgba(252, 252, 252, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    z-index: 10;
    font-size: 12px;
    line-height: 1;
    color: red;
}

#ebpTokenStatus .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.1);
}

#ebpTokenStatus.active .dot {
    background: #28a745;
    animation: pulseOn 1.8s ease-in-out infinite;
}

#ebpTokenStatus.inactive .dot {
    background: #dc3545;
    animation: pulseOff 2.4s ease-in-out infinite;
    opacity: 0.85;
}

@keyframes pulseOn {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.45);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 8px rgba(40, 167, 69, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

@keyframes pulseOff {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.35);
    }

    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 6px rgba(220, 53, 69, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}


#ebpTokenStatus .label {
    font-weight: 600;
    white-space: nowrap;
    user-select: none;
    color: black;
}


@media (prefers-color-scheme: dark) {
    #ebpTokenStatus {
        background: rgba(25, 25, 25, 0.85);
        color: #eaeaea;
        border-color: rgba(255, 255, 255, 0.08);
    }
}

#ebp_doc_number {
    flex: 0 0 260px;
    max-width: 260px;
}

@media (max-width: 768px) {
    #ebp_doc_number {
        flex: 1 1 240px;
        max-width: 100%;
    }
}

.label-default {
    padding-top: 10px;
    padding-bottom: 10px;
}

.label {
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 1.5rem;
}

#issue_fields_list pre {
    background: #f7f7f9;
    border: 1px solid #e1e1e8;
    padding: 8px 10px;
    border-radius: 4px;
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 12px;
    margin: 0;
    white-space: pre-wrap;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 10px 0 6px;
    color: #333;
    padding-bottom: 4px;
}

#renewTokenBtn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    line-height: 1.2;
    padding: 4px 8px;

}

#renewTokenBtn i {
    font-size: 13px;
    margin: 0;
    vertical-align: middle;
}

.export-btn {
    position: relative;
    overflow: hidden;
}

.export-btn:disabled {
    cursor: not-allowed;
    background-color: #6c757d !important;
    border-color: #6c757d !important;
}

.export-btn:disabled:hover {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    transform: none !important;
}

.export-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#auto_document_state_container {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.validation-state-invalid {
    background-color: #d9534f !important;
    color: white !important;
    animation: pulseRed 2s infinite;
}

.validation-state-valid {
    background-color: #5cb85c !important;
    color: white !important;
    animation: pulseGreen 2s infinite;
}

.validation-state-unknown {
    background-color: #6c757d !important;
    color: white !important;
}

@keyframes pulseRed {
    0% {
        box-shadow: 0 0 0 0 rgba(217, 83, 79, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(217, 83, 79, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(217, 83, 79, 0);
    }
}

@keyframes pulseGreen {
    0% {
        box-shadow: 0 0 0 0 rgba(92, 184, 92, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(92, 184, 92, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(92, 184, 92, 0);
    }
}

.d-flex {
    display: flex;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.btn-icon {
    background: none;
    border: none;
    outline: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon i {
    font-size: 14px; 
    color: #333;
    transition: color 0.2s ease, transform 0.2s ease;
}

.btn-icon:hover i {
    color: #007bff;
    transform: scale(1.1);
}

.btn-icon:focus {
    outline: none;
    box-shadow: none;
}

.articles-table {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.articles-table-header {
    display: grid;
    grid-template-columns: 40px 40px 140px 1fr 120px 120px 100px;
    background: #4472C4;
    color: white;
    font-weight: 600;
    font-size: 13px;
    padding: 12px 0;
    text-align: center;
}

.articles-table-row {
    display: grid;
    grid-template-columns: 40px 40px 140px 1fr 120px 120px 100px;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
    cursor: move;
    min-height: 50px;
    align-items: center;
}

.articles-table-row:hover {
    background-color: #f5f5f5;
}

.articles-table-row[data-type="Fee"] {
    background-color: #f0f8f0;
}

.articles-table-row[data-type="Part"] {
    background-color: #ffffff;
}

.articles-table-row[data-type="Commercial Discount"] {
    background-color: #fff5f5;
}

.articles-table-row[data-type="Discount"] {
    background-color: #fff8e1;
}

.article-col-drag {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 16px;
    cursor: move;
    user-select: none;
}

.article-col-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-col-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.article-col-code {
    padding: 8px 8px;
    font-weight: 600;
    background-color: rgba(230, 240, 255, 0.5);
    text-align: center;
}

.article-col-description {
    padding: 8px 8px;
    text-align: left;
}

.article-col-quantity {
    padding: 8px 8px;
    text-align: center;
    background-color: rgba(255, 250, 205, 0.5);
    font-weight: 600;
}

.article-col-price {
    padding: 8px 8px;
    text-align: center;
    background-color: rgba(200, 255, 200, 0.3);
    font-weight: 600;
}

.article-col-discount {
    padding: 8px 8px;
    text-align: center;
    background-color: rgba(255, 220, 220, 0.3);
    font-weight: 600;
}

.articles-table-header .article-col-drag,
.articles-table-header .article-col-checkbox {
    background: transparent;
}

.articles-table-header .article-col-code,
.articles-table-header .article-col-description,
.articles-table-header .article-col-quantity,
.articles-table-header .article-col-price,
.articles-table-header .article-col-discount {
    background: transparent;
    padding: 0 8px;
}

/* Responsive */
@media (max-width: 1200px) {
    .articles-table-header,
    .articles-table-row {
        grid-template-columns: 40px 40px 120px 1fr 100px 100px 90px;
        font-size: 12px;
    }
}


.articles-table-row {
    min-height: 60px !important;
    align-items: center !important;
}

.article-col-checkbox {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 0 !important;
}

.article-col-checkbox input[type="checkbox"] {
    width: 22px;
    height: 20px;
    transform: scale(1.2);
}
