.topbar {
    margin-bottom: 0px;
}
.card-p-10{
    padding: 10px 10px!important;
}
.mb-0{
    margin-bottom: 0;
}
.bottom-border {
    border-bottom: 1px solid #aebcc363;
}
.shadow-none{
    box-shadow: none;
}
.vh-85{
    max-height: 85vh;
}
.body-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}
.user-chat-box {
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    /* padding-bottom: 0.15rem; */
    width: 20% !important;
    /* padding-right: 10px; */
}
.user-chat-box > div {
    background: #fff;
}
.app-invoice-top{
    height: 15%;
    background: #fff;
}
.app-invoice {
    height: 85%;
    max-height: 85%;
    overflow-y: scroll;
}
.app-invoice .invoice-users {
    height: 100%!important;
}
.app-invoice .bg-light-subtle{
    background-color: unset !important;
}

.flex-btns{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 30px;
}

.mobileBurger{
    display: none!important;
}

.pageLoader{
    height: 100vh;
    position: fixed;
    z-index: 999999;
    width: 100%;
    left: 0;
    top: 0;
    background: #000000ad;
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.containerHeader{
    height: 10vh;
}
.containerBody{
    height: 90vh;
}
.invoiceContentBody{
    height: 88%;
}
.invoiceContentFooter {
    margin-top: 1.5% !important;
    height: 9%;
}

.alert-dismissible {
    position: absolute;
    top: 0;
    right: 0;
}

embed.pdf {
    height: 100%;
    border-radius: 10px;
}

.pdfWrap{
    background: #fff;
    border-radius: 10px;
    padding: 10px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 6px 12px;
}

.text-end.p-2.px-3.flex-btns {
    gap: 50px;
}

.flex-btns {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
}

.flex-spacebetween{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.input-text-btw {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 1%;
}

.flex-space-btw{
    display: flex;
    justify-content: space-between;
}
.user-chat-box > div{
    width: 100%;
}
.pointer{
    cursor: pointer;
}
.border-none{
    border: 0;
}

.dropdown-menu.show {
    width: 210px;
}
.h-25{
    height: 25px;
}

.flex-right{
    display: flex;
    flex-direction: row;
}
.pr-5{
    padding-right: 5px!important;
}

.w-35.overflow-scroll {
    max-width: 300px;
    overflow: scroll;
}

nav svg.w-5.h-5 {
    height: 25px;
}

div#invoiceEditArea.active {
    display: block !important;
}

div#Mitglied-member .tt-menu,
div#Lieferant-seller .tt-menu{
    width: 400px !important;
}

/* Typeahead (Firma / Mitgliedername): the library copies the input's computed
   background into an inline style on the .tt-hint clone and makes the real
   input transparent, so a page loaded in dark mode kept a dark field after
   switching back to light. Paint the background from the active theme on the
   real input and keep the hint fully transparent. */
.twitter-typeahead .tt-input,
.twitter-typeahead .tt-hint {
    background-color: transparent !important;
}

[data-bs-theme="dark"] .twitter-typeahead .tt-input,
[data-bs-theme="dark"] .twitter-typeahead .tt-hint {
    background-color: #111c2d !important;
}

[data-bs-theme="light"] .card-active {
    background-color: #87e4b3 !important;
}

[data-bs-theme="dark"] .card-active {
    background-color: #005a2a !important;
}

span.locked > img {
    width: 25px;
    height: 25px;
    position: absolute;
    right: 10px;
    bottom: 12px;
}

.formError {
    display: block;
    color: #f00;
    font-weight: 600;
    font-size: large;
    width: 100%;
    text-align: center;
}

.form-control:focus,
.form-select:focus {
    border: 2px solid!important;
    border-color: #42aaee!important;
}

/* img.dark-logo {
    width: 100%;
} */

.hidden {
    display: none;
}

.flex{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
} 
.gap-10 {
    gap: 10px;
}   
a.text-nowrap.logo-img>img {
    max-width: 235px;
}

.list-group-flex{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
}
.vertical-middle {
    vertical-align: middle;
}

.w-full{
    width: 100%;
}

.bg-smoke {
    background: #f8f9fa;
}
.br-white{
    border-right: 2px solid #fff;
}
.p-5{
    padding: 5px;
}

.flex-details{
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.hover-border-primary:hover,
.hover-border-warning:hover {
    /* border: 2px solid; */
    box-shadow: 0px 0px 0px 1px #f8f8f8;
    background: #f8f8f8;
}

input#datepicker-from,
input#datepicker-to {
    border-radius: 10px 0 0 10px;
}
.card-header {
    background: transparent;
    border-bottom: 1px solid #eaecf0;
}

.wr-count-span{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 150px;
    gap: 5px;
}

.weekly-report-table tr > td,
.weekly-report-table tr > th{
    padding: 4px !important;
    vertical-align: middle;
}

.active.hover-border-warning{
    box-shadow: 0px 0px 0px 1px #0285db;
}

.tabledWrapper {
    max-height: 500px;
    overflow-x: auto;
}

.invoiceName{
    min-width: 300px;
    /* overflow-wrap: anywhere; */
    overflow-wrap: break-word;
    white-space: break-spaces!important;
    word-wrap: anywhere;
}
.invoiceDate{
    min-width: 150px;
    white-space: nowrap;
}
.display-contents{
    display: contents;
    vertical-align: middle;
}

.nonInvoiceTableTitle:before {
    content: "";
    border: 2px solid #7652d9;
    border-radius: 5px;
    position: absolute;
    height: 100%;
    left: -10px;
    top: 1px;
}

.xmlNotGeneratedTitle{
    position: relative;
}
.xmlNotGeneratedTitle:before {
    content: "";
    border: 2px solid #ef233c;
    border-radius: 5px;
    position: absolute;
    height: 100%;
    left: -10px;
    top: 1px;
}

.failedSyncTitle{
    position: relative;
}

.failedSyncTitle:before {
    content: "";
    border: 2px solid #f47721;
    border-radius: 5px;
    position: absolute;
    height: 100%;
    left: -10px;
    top: 1px;
}

#failedSyncSectionCard .problem-header {
    padding: 0px 5px;
    display: flex;
}

.nonInvoiceTableTitle {
    position: relative;
    margin-left: 10px;
    margin-top: 8px;
}

@media (min-height: 600px) and (max-height: 760px){
    .fs-2 {
        font-size: .75rem !important;
    }
    .form-label {
        margin-bottom: .2rem;
        color: #111c2d;
    }
    #InvoiceUpdateForm .fs-3 {
        font-size: .675rem !important;
    }
    #InvoiceUpdateForm .mb-1 {
        margin-bottom: .05rem !important;
    }
    #InvoiceUpdateForm .mb-2 {
        margin-bottom: .1rem !important;
    }

    #InvoiceUpdateForm .card-p-10 {
        padding: 5px 10px !important;
    }   

    #InvoiceUpdateForm .form-control {
        display: block;
        width: 100%;
        padding: 4px 6px;
        border-radius: 6px;
    }

    #InvoiceUpdateForm .form-select {
        display: block;
        width: 100%;
        padding: 4px 10px 4px 10px;
    }

    #InvoiceUpdateForm .form-label {
        margin-bottom: .01rem;
        color: #111c2d;
    }

    .input-group-text {
        position: absolute;
        right: 0;
        align-items: center;
        padding: 4px 5px;
    }
}

@media(min-height: 900px){
    .invoiceContentFooter {
        margin-top: 0.5% !important;
        height: 9%;
    }
    .form-control {
        display: block;
        width: 100%;
        padding: 12px 15px;
        font-size: 1.05rem;
    }

    .app-invoice {
        height: 85%;
        max-height: 85%;
        overflow-y: scroll;
    }

    embed.pdf {
        height: 75vh;
    }

    .invoiceing-box-formWrap{
        height: -webkit-fill-available;
        padding: 30px;
    }

    .invoiceing-box-form-card {
        padding: 10px !important;
    }
    div#printableArea {
        overflow-x: scroll;
    }
}

@media(min-height: 1024px){

    .simplebar-content {
        height: -webkit-fill-available;
    }

    .app-invoice {
        max-height: -webkit-fill-available;
        overflow-y: scroll;
    }

    .app-invoice .invoice-users {
        height: calc(100vh - 340px) !important;
    }

    embed.pdf {
        height: 80vh;
    }

    .form-control {
        display: block;
        width: 100%;
        padding: 10px 15px;
        font-size: 1.05rem;
    }

    .topbar .navbar {
        min-height: 80px;
    }

    .topbar .navbar .navbar-nav .nav-item .nav-link {
        line-height: 80px;
        height: 100px;
        width: 250px;
    }

    .user-profile.me-sm-3.me-2 > img {
        width: 60px;
    }

    h6.fs-4.mb-1.profile-name {
        font-size: 1.5rem !important;
    } 

    .invoice-inner-part .invoiceing-box #custom-invoice #printableArea {
        height: 80vh;
    }

    .h-100 {
        height: -webkit-fill-available;
        overflow: hidden;
    }

    .invoiceing-box-col{

    }
    .invoiceing-box-formWrap{
        height: -webkit-fill-available;
        padding: 15px;
    }
    form#InvoiceUpdateForm {
        height: -webkit-fill-available;
    }
    .invoiceing-box-form-card{
        padding: 15px !important;
    }

    .invoiceing-box-form-card h5{
        font-size: 1.4rem !important;
    }

    .invoiceing-box-input-col {

    }

    .invoiceing-box-input-col label{
        font-size: 1.05rem !important;
    }

    .invoiceing-box-input-col .form-control {
        font-size: 1.00rem;
        line-height: 1.0;
    }

    .invoiceing-box-input-col-row {
        margin-bottom: 1rem !important;
    }

    .invoiceing-box-input-col select, .invoiceing-box-input-col input{
            font-size: 1.05rem;
    }

    .flex-btns > button {
        font-size: 1.25rem;
        padding: 20px 40px;
        border-radius: 50px;
        height: 100%;
    }
}

@media(min-height: 1140px){
    .text-end.p-2.px-3.flex-btns {
        gap: 10%;
    }
    
    .form-control {
        display: block;
        width: 100%;
        padding: 15px 15px;
        font-size: 1.05rem;
    }

    .app-invoice {
        max-height: 80vh;
        overflow-y: scroll;
    }

    embed.pdf {
        height: 80vh;
    }

    .invoiceing-box-formWrap{
        height: -webkit-fill-available;
        padding: 30px;
    }

    .invoiceing-box-form-card {
        padding: 10px !important;
    }

    .flex-btns > button {
        font-size: 1.25rem;
    }
}

@media(min-height: 1340px){

    .app-invoice {
        max-height: 80vh;
        overflow-y: scroll;
    }

    .simplebar-content {
        height: -webkit-fill-available;
    }

    .app-invoice {
        max-height: -webkit-fill-available;
        overflow-y: scroll;
    }

    .app-invoice .invoice-users {
        height: calc(100vh - 340px) !important;
    }

    embed.pdf {
        height: 80vh;
    }

    .form-control {
        display: block;
        width: 100%;
        padding: 15px 15px;
        font-size: 1.05rem;
    }

    .topbar .navbar {
        min-height: 100px;
    }

    .topbar .navbar .navbar-nav .nav-item .nav-link {
        line-height: 100px;
        height: 100px;
        width: 250px;
    }

    .user-profile.me-sm-3.me-2 > img {
        width: 60px;
    }

    h6.fs-4.mb-1.profile-name {
        font-size: 1.5rem !important;
    } 

    .invoice-inner-part .invoiceing-box #custom-invoice #printableArea {
        height: 80vh;
    }

    .h-100 {
        height: -webkit-fill-available;
        overflow: hidden;
    }

    .invoiceing-box-col{

    }
    .invoiceing-box-formWrap{
        height: -webkit-fill-available;
        padding: 30px;
    }
    form#InvoiceUpdateForm {
        height: -webkit-fill-available;
    }
    .invoiceing-box-form-card{
        padding: 30px !important;
    }

    .invoiceing-box-form-card h5{
        font-size: 1.4rem !important;
    }

    .invoiceing-box-input-col {

    }

    .invoiceing-box-input-col label{
        font-size: 1.15rem !important;
    }

    .invoiceing-box-input-col .form-control {
        font-size: 1.13rem;
        line-height: 1.5;
    }

    .invoiceing-box-input-col-row {
        margin-bottom: 1rem !important;
    }

    .invoiceing-box-input-col select, .invoiceing-box-input-col input{
            font-size: 1.15rem;
    }

    .flex-btns > button {
        font-size: 1.5rem;
        padding: 20px 40px;
        border-radius: 50px;
    }



    #InvoiceUpdateForm .p-2 {
        padding: 1.5rem !important;
    }

    #InvoiceUpdateForm .fs-3 {
        font-size: 1.875rem !important;
    }

    #InvoiceUpdateForm .mb-1 {
        margin-bottom: 1rem !important;
    }

    #InvoiceUpdateForm .fs-2 {
        font-size: 1.55rem !important;
    }

    #InvoiceUpdateForm .form-control {
        display: block;
        width: 100%;
        padding: 14px 20px;
        font-size: 1.5em;
    }

    .card-p-10 {
        padding: 20px 20px !important;
    }

    .card-p-10 {
        padding: 20px 20px !important;
    }

    .form-select {
        padding: 10px 48px 10px 25px;
        font-size: 1.2rem;
    }

    .input-group-text {
        display: flex;
        position: absolute;
        right: 0;
        padding: 10px 15px;
        border-radius: 0 10px 10px 0 !important;
    }

    .input-group-text .fs-5 {
        font-size: 2.125rem !important;
    }
}

@media(min-height: 2040px){

    #InvoiceUpdateForm .p-2 {
        padding: 2.5rem !important;
    }

    #InvoiceUpdateForm .fs-3 {
        font-size: 2.875rem !important;
    }

    #InvoiceUpdateForm .mb-1 {
        margin-bottom: 2rem !important;
    }

    #InvoiceUpdateForm .fs-2 {
        font-size: 1.75rem !important;
    }

    #InvoiceUpdateForm .form-control {
        display: block;
        width: 100%;
        padding: 17px 25px;
        font-size: 2em;
    }

    .card-p-10 {
        padding: 40px 40px !important;
    }

    .card-p-10 {
        padding: 40px 40px !important;
    }

    .form-select {
        padding: 15px 48px 15px 25px;
        font-size: 1.9rem;
    }

    .input-group-text {
        display: flex;
        position: absolute;
        right: 0;
        padding: 14px 16px;
        border-radius: 0 10px 10px 0 !important;
    }

    .input-group-text .fs-5 {
        font-size: 3.125rem !important;
    }
}

@media(min-height: 2040px){

    #InvoiceUpdateForm .p-2 {
        padding: 2.5rem !important;
    }

    #InvoiceUpdateForm .fs-3 {
        font-size: 2.875rem !important;
    }

    #InvoiceUpdateForm .mb-1 {
        margin-bottom: 2rem !important;
    }

    #InvoiceUpdateForm .fs-2 {
        font-size: 1.75rem !important;
    }

    #InvoiceUpdateForm .form-control {
        display: block;
        width: 100%;
        padding: 17px 25px;
        font-size: 2em;
    }

    .card-p-10 {
        padding: 40px 40px !important;
    }

    .card-p-10 {
        padding: 40px 40px !important;
    }

    .form-select {
        padding: 15px 48px 15px 25px;
        font-size: 1.9rem;
    }

    .input-group-text {
        display: flex;
        position: absolute;
        right: 0;
        padding: 14px 16px;
        border-radius: 0 10px 10px 0 !important;
    }

    .input-group-text .fs-5 {
        font-size: 3.125rem !important;
    }
}

@media (max-width: 1024px) {
    .user-chat-box {
        width: 40% !important;
        display: inherit !important;
    }
}

@media (max-width: 989px){
    .invoice-inner-part .invoiceing-box #custom-invoice #printableArea {
        overflow-x: scroll;
    }
    .pdfWrap {
        height: 80% !important;
    }
}

@media (max-width: 780px) {
    .user-chat-box{
        width: 45% !important;
        display: inherit !important;
    }
    .app-invoice .simplebar-content > li > a {
        padding: 5px !important;
    }
    .app-invoice .simplebar-content > li > a > .btn-danger {
        display: none !important;
    }

    .app-invoice .ms-3.d-inline-block.w-75 {
        margin-left: 0px !important;
    }

    .app-invoice .simplebar-content > li > a h6{
        font-size: .7rem;
    }

    .app-invoice .simplebar-content > li > a  span{
        font-size: .675rem !important;
    }

    .w-100.w-xs-100.chat-container{
        height: 100%;
    }

    .invoice-inner-part{
        overflow: scroll;
    }

    .pdfWrap{
        height: 50%;
        min-height: 480px;
    }
    .align-items-stretch{
        height: 50%;
        min-height: 50%;
        overflow: scroll;
    }
}

@media (max-width: 579px) {
    .invoiceContentBody {
        height: 100%;
    }

    .mobileBurger{
        display: flex!important;
    }

    .mobileLogo{
        display: flex;
        align-content: center;
        align-items: center;
        justify-content: flex-start;
    }

    .user-chat-box {
        width: 60% !important;
        height: 90% !important;
        display: none !important;
        position: absolute;
        z-index: 9;
        box-shadow: 0px 15px 10px 5px;
    }

    .user-chat-box-active {
        display: block !important;
    }

    .invoiceContentBody {
        height: 75%;
    }

    .invoiceContentFooter {
        margin-top: 1.5% !important;
        height: 25%;
    }

    .flex-btns {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 10px;
    }

    .text-end.p-2.px-3.flex-btns {
        gap: 10px;
    }

    .d-flex.invoiceContentFooter > div.w-20 {
        width: 0 !important;
    }

}


.dashboard-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    /* position: relative; */
    overflow: hidden;
}

/* .chart-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
} */

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.chart-title-section {
    display: flex;
    flex-direction: column;
}

.chart-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.chart-subtitle {
    font-size: 0.85rem;
    color: #718096;
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chart-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.chart-btn:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.chart-btn.active {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3); */
}

.chart-btn.active {
    background: #e5e5e5;
    color: #000000;
    border-color: #a9a9a9;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.chart-type-selector {
    display: flex;
    gap: 0.25rem;
    margin-left: 1rem;
    padding: 0.25rem;
    background: #f7fafc;
    border-radius: 8px;
}

.chart-type-btn {
    padding: 0.5rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.chart-type-btn.active {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-container {
    position: relative;
    height: 350px;
    margin-bottom: 1rem;
}

.chart-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.chart-stat {
    text-align: center;
}

.chart-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.chart-stat-label {
    font-size: 0.75rem;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    /* border-top: 3px solid #667eea; */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.insights-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
}

.insight-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    height: 47%;
}

.insight-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

.insight-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f7fafc;
}

.insight-item:last-child {
    border-bottom: none;
}

.insight-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #48bb78;
}

.insight-indicator.warning {
    background: #ed8936;
}

.insight-indicator.error {
    background: #f56565;
}

.stat-card {
    display: flex;
}

.stat-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    border-radius: 10px;
    display: flex;
    background: #f0f0f0;
    color: #070707;
    font-size: 1rem;
    justify-content: center;
    align-items: center;
    margin-top: -10px;
}

.text-small {
    font-size: small;
    font-weight: 200;
}
.rangeBlock{
    display: flex;
    justify-content: flex-end;
    margin-top: -75px;
}
.h-35{
    height: 40px;
    align-items: center;
    gap: 10px;
}
/* #pdfExport{
    width: 370px;
    height: 40px;
} */

#pdfExport {
    /* width: 80px; */
    height: 40px;
    border-radius: 10px;
    padding: 5px;
    display: flex;
    flex-direction: row;
    align-content: center;
    justify-content: center;
    align-items: center;
    /* background: #f6f8fb;
    border-color: #aebcc3; */
}

.text-13{
    font-size: 13px;
}
.text-15{
    font-size: 15px;
}


/* #pdfExport > i{
    color: #707a82;
} */

.rangeBlock  input {
    height: 35px;
}
.rangeBlock span.input-group-text{
    height: 35px;
}

/* Button for failed sync invoices */
.failed-sync-btn {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.failed-sync-btn:hover {
    background: #c82333;
    border-color: #bd2130;
}

/* Problem Invoices Sections */
.problem-invoices-section {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 32px;
    overflow: hidden;
}

#xmlNotGeneratedSection{
    display: none;
}

#xmlNotGeneratedSection.active {
    display: block;
}

#failedSyncSection{
    display: none;
}
#failedSyncSection.active {
    display: block;
}

#xmlNotGeneratedSectionCard .card-header{
    display: flex;
    gap: 5px;
    /* background: #ef233c17; */
    align-content: center;
    flex-direction: row;
    justify-content: space-between;
}

.problem-invoices-section.active {
    display: block;
}

.problem-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
}

#xmlNotGeneratedSectionCard .problem-header {
    padding: 0px 10px;
}

.failed-sync-header {
    background: #fff5f5;
    border-bottom-color: #fed7d7;
}

.xml-not-generated-header {
    background: #fffbf0;
    border-bottom-color: #ffeaa7;
}

.problem-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
}

.problem-title.failed-sync {
    color: #c53030;
}

.problem-title.xml-not-generated {
    color: #856404;
}

.problem-count {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    color: white;
}

.problem-count.failed-sync {
    background: #dc3545;
}

.problem-count.xml-not-generated {
    background: #ffc107;
    color: #212529;
}

.bulk-actions {
    display: flex;
    gap: 8px;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: 1px solid #6c757d;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
    border: 1px solid #ffc107;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-warning:hover {
    background: #e0a800;
    border-color: #d39e00;
}

.problem-list {
    max-height: 400px;
    overflow-y: auto;
}

.problem-item {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s;
}

.problem-item:hover {
    background: #f8f9fa;
}

.problem-item:last-child {
    border-bottom: none;
}

.item-checkbox {
    margin-right: 16px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.item-info {
    flex: 1;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 16px;
    align-items: center;
}

.invoice-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.invoice-name {
    font-weight: 500;
    color: #212529;
    font-size: 14px;
}

.invoice-meta {
    font-size: 12px;
    color: #6c757d;
}

.email-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.email-icon {
    color: #007bff;
}

.pdf-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.pdf-icon {
    color: #dc3545;
}

.error-reason {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    max-width: 200px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.error-reason.sync-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: #c53030;
}

.error-reason.xml-error {
    background: #fffbf0;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.item-actions {
    display: flex;
    gap: 8px;
    margin-left: 16px;
}

.rule-action-btn a {
    padding: 6px 10px;
    border: 1px solid #ced4da;
    background: white;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    white-space: nowrap;
}

.action-btn {
    padding: 6px 10px;
    border: 1px solid #ced4da;
    background: white;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    white-space: nowrap;
}

.action-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.action-btn.delete {
    color: #dc3545;
    border-color: #dc3545;
}

.action-btn.delete:hover {
    background: #dc3545;
    color: white;
}

.action-btn.resend {
    color: #007bff;
    border-color: #007bff;
}

.action-btn.resend:hover {
    background: #007bff;
    color: white;
}

.action-btn.download {
    color: #28a745;
    border-color: #28a745;
}

.action-btn.download:hover {
    background: #28a745;
    color: white;
}

.action-btn.view {
    color: #6f42c1;
    border-color: #6f42c1;
}

.action-btn.view:hover {
    background: #6f42c1;
    color: white;
}

.action-btn.rename {
    color: #fd7e14;
    border-color: #fd7e14;
}

.action-btn.rename:hover {
    background: #fd7e14;
    color: white;
}

.no-problem-invoices {
    text-align: center;
    padding: 40px 24px;
    color: #6c757d;
}

.no-problem-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.close-section-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6c757d;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-section-btn:hover {
    background: #f8f9fa;
    color: #212529;
}

/* Button for failed sync invoices */
.failed-sync-btn {
    background: #dc3545;
    color: white;
    border: 1px solid #dc3545;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.failed-sync-btn:hover {
    background: #c82333;
    border-color: #bd2130;
}

@media (max-width: 768px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .item-info {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .item-actions {
        margin-left: 0;
        margin-top: 8px;
        flex-wrap: wrap;
    }

    .bulk-actions {
        flex-direction: column;
        width: 100%;
    }

    .problem-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

.stats-group.warning {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fffbf0 0%, #fff 100%);
}

.stats-group.warning .pipeline-stat-number {
    color: #856404;
}
.hover-border-warning:hover {
    box-shadow: 0px 0px 0px 1px #0285db;
}
.hidden{
    display: none !important;
}



/* Width of the scrollbar */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

/* Track */
::-webkit-scrollbar-track {
  background: transparent;
}

/* Thumb */
::-webkit-scrollbar-thumb {
  background-color: rgba(150, 150, 150, 0.6);
  border-radius: 10px;
}

/* Remove arrows */
::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

* {
  scrollbar-width: thin;           /* thin = ~4px */
  scrollbar-color: rgba(150,150,150,0.6) transparent;
}


/* UI upfdate for design match */
.stat-card {
    display: flex;
    border: 1px solid #eaecf0;
    box-shadow: 0 0 0 0;
    border-radius: 10px;
}

.card {
    margin-bottom: 24px;
    box-shadow: 0 0 0 0;
    border: 1px solid #eaecf0;
}
.chart-section, .insight-card{
    padding: 2rem;
    box-shadow: 0 0 0 0;
    border: 1px solid #eaecf0;
}


#main-wrapper {
    position: relative;
    background-color: #fff;
}
.left-sidebar {
    box-shadow: 0 0px 0px rgba(37, 83, 185, .1);
    border-right: 1px solid #eaecf0;
}


.info-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.info-icon {
  width: 18px;
  height: 18px;
  background: #007bff;
  color: white;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.info-card {
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  padding: 10px;
  background: white;
  border-radius: 6px;
  border: 1px solid #ddd;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 10;
}

.info-wrapper:hover .info-card {
  opacity: 1;
  pointer-events: auto;
}

.info-card:before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: url(../images/shaps/info-shap.png) no-repeat top right;
    top: 0;
    left: 0;
    z-index: -1;
}

span#memberInfoCardCompany, 
span#memberInfoCardCompanySuffix, 
span#memberInfoCardCity, 
span#memberInfoCardPostalCode, 
span#sellerInfoCardCompany, 
span#sellerInfoCardCompanySuffix, 
span#sellerInfoCardCity, 
span#sellerInfoCardPostalCode, 
span#sellerInfoCardCurrency,
span#memberInfoCardCompanyAddress,
span#sellerInfoCardAddress {
    font-size: 12px !important;
    font-weight: 200;
}
.info-card span.label {
    font-weight: bold;
    font-size: smaller;
}


.danger-hover-bg::before, .indigo-hover-bg::before, .info-hover-bg::before, .primary-hover-bg::before, .secondary-hover-bg::before, .success-hover-bg::before, .warning-hover-bg::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    height: 100%;
    z-index: -1;
    border-radius: 0 24px 24px 0;
    /* border-left: 2px solid; */
    transition: all .4s ease-in-out;
}

#sidebarnav .sidebar-item .danger-hover-bg.active::before, 
#sidebarnav .sidebar-item .indigo-hover-bg.active::before, 
#sidebarnav .sidebar-item .info-hover-bg.active::before, 
#sidebarnav .sidebar-item .primary-hover-bg.active::before, 
#sidebarnav .sidebar-item .secondary-hover-bg.active::before, 
#sidebarnav .sidebar-item .success-hover-bg.active::before, 
#sidebarnav .sidebar-item .warning-hover-bg.active::before {
    width: calc(95% + 16px);
    border-radius: 15px;
    transition: none;
}

.primary-hover-bg.btn-toggle[aria-expanded=true]::before, 
.primary-hover-bg:hover::before {
    width: calc(95% + 16px);
    border-left: 2px solid #0285db;
    border-radius: 15px;
    transition: none;
}

#sidebarnav .sidebar-item .primary-hover-bg.active::before  {
    border-left: 2px solid #0285db;
    border-radius: 15px;
    transition: none;
}















/* =========================================
   Icon
   ========================================= */

.stat-icon {
    width: 35px;
    height: 35px;
    padding: 7px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;
}

.stat-icon svg {
    width: 25px;
    height: 25px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.table-responsive{
    overflow: scroll;
}

.card.table-responsive{
    max-height: 600px;
}


/* Icon colors */

.stat-icon-blue {
    color: #1769e0;
    background: #e9efff;
}

.stat-icon-green {
    color: #16a05d;
    background: #e4f8ee;
}

.stat-icon-purple {
    color: #7652d9;
    background: #f0eaff;
}

.stat-icon-orange {
    color: #f47721;
    background: #fff0dd;
}

.stat-icon-red {
    color: #ef233c;
    background: #ffe9ed;
}


/* =========================================
   Bottom Chart
   ========================================= */

.stat-chart {
    width: 100%;
    height: 38px;
    margin-top: auto;
}

.stat-chart svg {
    display: block;

    width: 100%;
    height: 38px;

    overflow: visible;
}

.stat-chart polyline,
.stat-chart line {
    fill: none;

    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* Individual chart colors */

.stat-card:nth-child(1) .stat-chart polyline {
    stroke: #1769e0;
}

.stat-card:nth-child(2) .stat-chart polyline {
    stroke: #16a05d;
}

.stat-card:nth-child(3) .stat-chart polyline {
    stroke: #7652d9;
}

.stat-card:nth-child(4) .stat-chart polyline {
    stroke: #f47721;
}

.stat-card:nth-child(5) .stat-chart polyline {
    stroke: #1769e0;
}

.stat-card:nth-child(6) .stat-chart line {
    stroke: #ef233c;
}


















/* ==========================================
   Matrix / Secondary Statistics
   ========================================== */

.matrix-stats-group {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}


/* ==========================================
   Card
   ========================================== */

.matrix-stat-card {
    position: relative;

    min-width: 0;
    min-height: 190px;

    padding: 22px 24px;

    background: #ffffff;
    border: 1px solid #e9edf3;
    border-radius: 10px;

    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.matrix-stat-card:hover {
    border-color: #d9e0e9;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
    transform: translateY(-1px);
}


/* ==========================================
   Header
   ========================================== */

.matrix-stat-header {
    display: flex;
    align-items: center;
    gap: 12px;

    min-height: 42px;
    margin-bottom: 22px;
}

.matrix-stat-title {
    margin: 0;

    color: #071631;

    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
}


/* ==========================================
   Header Icons
   ========================================== */

.matrix-stat-icon {
    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
}

.matrix-stat-icon svg {
    width: 21px;
    height: 21px;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* Blue */

.matrix-icon-blue {
    color: #1769e0;
    background: #e9efff;
}


/* Green */

.matrix-icon-green {
    color: #16a05d;
    background: #e4f8ee;
}


/* Orange */

.matrix-icon-orange {
    color: #f47721;
    background: #fff0dd;
}


/* Red */

.matrix-icon-red {
    color: #ef233c;
    background: #ffe9ed;
}


/* ==========================================
   Metrics
   ========================================== */

.matrix-stat-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}


/* ==========================================
   Individual Metric
   ========================================== */

.matrix-metric {
    min-width: 0;
    min-height: 80px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    background: #f7f8fa;
    border: 0px solid #eef0f4;
    border-radius: 0px;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.matrix-metric:hover {
    background: #f3f5f8;
    border-color: #e2e6ec;
}


/* ==========================================
   Metric Label
   ========================================== */

.matrix-metric-label {
    display: block;
    color: #6b7280;
    font-size: 13px;
    font-weight: 200;
    line-height: 16px;
    overflow: hidden;
    text-align: center;
}


/* ==========================================
   Metric Value
   ========================================== */

.matrix-metric-value {
    display: block;
    margin-top: 6px;
    color: #071631;
    font-size: 18px;
    font-weight: 600;
    line-height: 30px;
    letter-spacing: -0.5px;
    text-align: center;
}


/* ==========================================
   Details Metric
   ========================================== */

.matrix-metric-details {
    cursor: pointer;

    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.matrix-metric-details .matrix-metric-label {
    color: #1769e0;
}

.matrix-details-arrow {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;

    border-radius: 50%;

    color: #1769e0;
    background: #e9efff;

    font-size: 16px;
    line-height: 1;

    transition: transform 0.2s ease;
}

.matrix-metric-details:hover .matrix-details-arrow {
    transform: translateX(3px);
}


/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 1400px) {

    .matrix-stats-group {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

}


@media (max-width: 768px) {

    .matrix-stats-group {
        grid-template-columns: 2fr;
        gap: 15px;
    }

    .matrix-stat-card {
        min-height: auto;
        padding: 20px;
    }

}


@media (max-width: 480px) {

    .matrix-stat-metrics {
        grid-template-columns: 1fr;
    }

}







/* =========================================
   Invoice Actions Menu
========================================= */

.invoice-menu-wrapper {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}


/* Three dots button */

.invoice-menu-trigger {
    width: 38px;
    height: 38px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;

    padding: 0;

    border: 1px solid #e6e7ee;
    border-radius: 8px;

    background: #fff;

    cursor: pointer;

    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.invoice-menu-trigger span {
    width: 4px;
    height: 4px;

    border-radius: 50%;

    background: #697086;

    transition: background 0.18s ease;
}

.invoice-menu-trigger:hover {
    background: #f8f7ff;
    border-color: #d8d1ff;
}

.invoice-menu-trigger:hover span {
    background: #7252e8;
}


/* =========================================
   Dropdown
========================================= */

.invoice-menu {
    position: absolute;
    top: calc(100% - 1px);
    right: 0;

    z-index: 9999;

    width: 175px;
    padding: 6px;

    background: #fff;
    border: 1px solid #e8e8f0;
    border-radius: 10px;

    box-shadow:
        0 8px 25px rgba(30, 35, 55, 0.10),
        0 2px 8px rgba(30, 35, 55, 0.05);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(4px);

    transition:
        opacity 0.16s ease,
        visibility 0.16s ease,
        transform 0.16s ease;
}


/* Show dropdown on hover */

.invoice-menu-wrapper:hover .invoice-menu,
.invoice-menu-wrapper:focus-within .invoice-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}


/* =========================================
   Menu items
========================================= */

.invoice-menu-item {
    width: 100%;
    height: 40px;

    display: flex;
    align-items: center;

    gap: 10px;

    padding: 0 11px;

    border: 0;
    border-radius: 7px;

    background: transparent;

    font-family: inherit;
    font-size: 13px;
    font-weight: 500;

    text-align: left;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.invoice-menu-item svg {
    flex: 0 0 auto;
}


/* View */

.invoice-menu-item.view {
    color: #7252e8;
}

.invoice-menu-item.view:hover {
    background: #f5f2ff;
}


/* Download */

.invoice-menu-item.download {
    color: #27ae70;
}

.invoice-menu-item.download:hover {
    background: #f0fbf6;
}


/* Delete */

.invoice-menu-item.delete {
    color: #ef4444;
}

.invoice-menu-item.delete:hover {
    background: #fff3f3;
}


/* Purge */

.invoice-menu-item.purge {
    color: #ef4444;
}

.invoice-menu-item.purge:hover {
    background: #fff3f3;
}


/* Divider before destructive actions */

.invoice-menu-item.delete {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #eeeeF3;
}



 /* =========================================
    Rejected Invoices
    ========================================= */


    /* Header */

    .invoice-info {
        display: flex;
        align-items: center;
        gap: 14px;
        min-width: 0;
        height: 0;
    }

    .pdf-icon {
        flex: 0 0 34px;

        width: 34px;
        height: 34px;

        display: flex;
        align-items: center;
        justify-content: center;

        border-radius: 9px;

        background: #fff5f5;
        color: #ff3b45;
    }


   
    /* =========================================
    Pagination
    ========================================= */

    .invoice-pagination {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .pagination-btn {
        width: 42px;
        height: 42px;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        border: 1px solid #e5e5ee;
        border-radius: 8px;

        background: #fff;

        color: #596076;

        font-family: inherit;
        font-size: 14px;
        font-weight: 600;

        cursor: pointer;

        transition:
            background 0.18s ease,
            color 0.18s ease,
            border-color 0.18s ease;
    }

    .pagination-btn:hover:not(:disabled):not(.active) {
        background: #f7f6ff;
        border-color: #d9d1ff;
        color: #7252e8;
    }

    .pagination-btn.active {
        background: #7252e8;
        border-color: #7252e8;
        color: #fff;
        box-shadow: 0 3px 10px rgba(114, 82, 232, 0.22);
    }

    .pagination-arrow {
        color: #858ca0;
    }

    .pagination-arrow:disabled {
        opacity: 0.45;
        cursor: not-allowed;
        background: #f8f8fb;
    }

    .pagination-dots {
        width: 24px;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        color: #858ca0;
        font-size: 14px;
    }

    @media (max-width: 768px) {

        .rejected-invoices-footer {
            flex-direction: column;
            align-items: flex-start;
            gap: 16px;
        }

        .invoice-pagination {
            width: 100%;
            justify-content: flex-end;
        }
    }


/* =========================================
   Day / Night Toggle Switch
   ========================================= */

.theme-switch {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 0;
}

.theme-switch-track {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 58px;
    height: 30px;
    padding: 0 7px;

    border-radius: 20px;

    background: #e2e8f0;
    border: 1px solid #cbd5e1;

    transition: background 0.3s ease, border-color 0.3s ease;
}

.theme-switch-sun,
.theme-switch-moon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    position: relative;
    z-index: 0;
    pointer-events: none;
}

.theme-switch-sun {
    color: #f59e0b;
}

.theme-switch-moon {
    color: #64748b;
}

.theme-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    z-index: 1;

    width: 22px;
    height: 22px;

    border-radius: 50%;

    background: #ffffff;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.25);

    transition: transform 0.3s ease;
}

[data-bs-theme="dark"] .theme-switch-track {
    background: #22374f;
    border-color: #334a63;
}

[data-bs-theme="dark"] .theme-switch-moon {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .theme-switch-thumb {
    transform: translateX(28px);
    background: #fde68a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}


/* =========================================
   Dark / Night Mode Overrides
   ========================================= */

[data-bs-theme="dark"] .left-sidebar {
    border-right-color: #2b4058;
}

[data-bs-theme="dark"] .chart-section,
[data-bs-theme="dark"] .insight-card,
[data-bs-theme="dark"] .matrix-stat-card,
[data-bs-theme="dark"] .problem-invoices-section,
[data-bs-theme="dark"] .pdfWrap,
[data-bs-theme="dark"] .app-invoice-top,
[data-bs-theme="dark"] .user-chat-box > div,
[data-bs-theme="dark"] .invoice-menu,
[data-bs-theme="dark"] .invoice-menu-trigger,
[data-bs-theme="dark"] .pagination-btn,
[data-bs-theme="dark"] .rule-action-btn a,
[data-bs-theme="dark"] .action-btn {
    background: #1a2c42;
}

[data-bs-theme="dark"] .matrix-stat-card,
[data-bs-theme="dark"] .stat-card,
[data-bs-theme="dark"] .chart-section,
[data-bs-theme="dark"] .insight-card,
[data-bs-theme="dark"] .problem-invoices-section,
[data-bs-theme="dark"] .pdfWrap,
[data-bs-theme="dark"] .invoice-menu,
[data-bs-theme="dark"] .invoice-menu-trigger,
[data-bs-theme="dark"] .pagination-btn,
[data-bs-theme="dark"] .rule-action-btn a,
[data-bs-theme="dark"] .action-btn {
    border-color: #2b4058;
}

[data-bs-theme="dark"] .card {
    border-color: #2b4058;
}

[data-bs-theme="dark"] .card-header {
    border-bottom-color: #2b4058;
}

[data-bs-theme="dark"] .matrix-stat-title,
[data-bs-theme="dark"] .matrix-metric-value,
[data-bs-theme="dark"] .chart-title,
[data-bs-theme="dark"] .chart-stat-value,
[data-bs-theme="dark"] .problem-title,
[data-bs-theme="dark"] .invoice-name {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .matrix-metric-label,
[data-bs-theme="dark"] .chart-subtitle,
[data-bs-theme="dark"] .chart-stat-label,
[data-bs-theme="dark"] .invoice-meta,
[data-bs-theme="dark"] .invoice-pagination .pagination-arrow,
[data-bs-theme="dark"] .pagination-dots,
[data-bs-theme="dark"] .no-problem-invoices,
[data-bs-theme="dark"] .close-section-btn {
    color: #8fa1b5;
}

[data-bs-theme="dark"] .matrix-metric {
    background: #15263a;
}

[data-bs-theme="dark"] .matrix-metric:hover {
    background: #22374f;
}

[data-bs-theme="dark"] .chart-btn,
[data-bs-theme="dark"] .chart-type-selector {
    background: #22374f;
    border-color: #334a63;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .chart-btn:hover {
    background: #2b4058;
    border-color: #46607c;
}

[data-bs-theme="dark"] .chart-btn.active {
    background: #2b4058;
    color: #ffffff;
}

[data-bs-theme="dark"] .chart-type-btn.active {
    background: #2b4058;
    box-shadow: none;
}

[data-bs-theme="dark"] .chart-stats {
    border-top-color: #2b4058;
}

[data-bs-theme="dark"] .insight-item {
    border-bottom-color: #2b4058;
}

[data-bs-theme="dark"] .hover-border-primary:hover,
[data-bs-theme="dark"] .hover-border-warning:hover {
    background: #22374f;
}

[data-bs-theme="dark"] .action-btn,
[data-bs-theme="dark"] .rule-action-btn a,
[data-bs-theme="dark"] .pagination-btn {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .action-btn:hover,
[data-bs-theme="dark"] .rule-action-btn a:hover,
[data-bs-theme="dark"] .pagination-btn:hover:not(:disabled):not(.active) {
    background: #2b4058;
    border-color: #46607c;
    color: #ffffff;
}

[data-bs-theme="dark"] .action-btn.delete {
    color: #f87171;
    border-color: #f87171;
}

[data-bs-theme="dark"] .action-btn.resend {
    color: #60a5fa;
    border-color: #60a5fa;
}

[data-bs-theme="dark"] .action-btn.download {
    color: #34d399;
    border-color: #34d399;
}

[data-bs-theme="dark"] .action-btn.view {
    color: #a78bfa;
    border-color: #a78bfa;
}

[data-bs-theme="dark"] .action-btn.rename {
    color: #fb923c;
    border-color: #fb923c;
}

[data-bs-theme="dark"] .action-btn:hover,
[data-bs-theme="dark"] .rule-action-btn a:hover {
    color: #ffffff;
    background: #46607c;
}

[data-bs-theme="dark"] .problem-item {
    border-bottom-color: #2b4058;
}

[data-bs-theme="dark"] .problem-item:hover {
    background: #22374f;
}

[data-bs-theme="dark"] .failed-sync-header {
    background: rgba(220, 53, 69, 0.12);
    border-bottom-color: rgba(220, 53, 69, 0.25);
}

[data-bs-theme="dark"] .xml-not-generated-header {
    background: rgba(255, 193, 7, 0.12);
    border-bottom-color: rgba(255, 193, 7, 0.25);
}

[data-bs-theme="dark"] .error-reason.sync-error {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
    color: #fca5a5;
}

[data-bs-theme="dark"] .error-reason.xml-error {
    background: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.3);
    color: #fcd34d;
}

[data-bs-theme="dark"] .close-section-btn:hover {
    background: #2b4058;
    color: #ffffff;
}

[data-bs-theme="dark"] .invoice-menu-trigger span {
    background: #8fa1b5;
}

[data-bs-theme="dark"] .invoice-menu-trigger:hover {
    background: #22374f;
    border-color: #46607c;
}

[data-bs-theme="dark"] .invoice-menu-item {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .invoice-menu-item.view:hover {
    background: rgba(114, 82, 232, 0.2);
}

[data-bs-theme="dark"] .invoice-menu-item.download:hover {
    background: rgba(39, 174, 112, 0.2);
}

[data-bs-theme="dark"] .invoice-menu-item.delete:hover,
[data-bs-theme="dark"] .invoice-menu-item.purge:hover {
    background: rgba(239, 68, 68, 0.2);
}

[data-bs-theme="dark"] .invoice-menu-item.delete {
    border-top-color: #2b4058;
}

[data-bs-theme="dark"] #main-wrapper.auth-customizer-none,
[data-bs-theme="dark"] .auth-login,
[data-bs-theme="dark"] .auth-login .bg-white {
    background-color: #15263a !important;
}

[data-bs-theme="dark"] .auth-login-wrapper.card {
    background: #1a2c42;
    border-color: #2b4058;
}

[data-bs-theme="dark"] .auth-login-wrapper h2,
[data-bs-theme="dark"] .auth-login-wrapper .form-label,
[data-bs-theme="dark"] .auth-login-wrapper .form-check-label,
[data-bs-theme="dark"] .auth-login-wrapper .text-dark {
    color: #e2e8f0 !important;
}


/* =========================================
   Invoice name cell:
   single line + ellipsis, hover tooltip, click-to-copy
   ========================================= */

.inv-name {
    position: relative;
    display: inline-block;
    max-width: 250px;
    min-width: 0;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
}

.inv-name > .inv-name-text {
    display: block;
    max-width: 250px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.invoice-info .inv-name {
    flex: 1 1 auto;
}

.inv-name-tip {
    position: fixed;
    z-index: 9999;
    max-width: 340px;
    padding: 6px 10px;
    background: #111c2d;
    color: #ffffff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    border-radius: 6px;
    white-space: normal;
    word-break: break-word;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.inv-name-tip.show {
    opacity: 1;
    visibility: visible;
}

.inv-name-tip.copied {
    color: #6ee7b7;
}

.inv-name-tip::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 100%;
    border: 6px solid transparent;
    border-top-color: #111c2d;
}

.inv-name-tip.flip::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: #111c2d;
}

[data-bs-theme="dark"] .inv-name-tip {
    background: #22374f;
    color: #f1f5f9;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .inv-name-tip::after {
    border-top-color: #22374f;
}

[data-bs-theme="dark"] .inv-name-tip.flip::after {
    border-top-color: transparent;
    border-bottom-color: #22374f;
}


.marketplace-wrapper {
    margin-left: 0 !important;
}


/* =========================================
   Table card: show ~5 rows, rest scrollable
   ========================================= */

.table-scroll-body {
    max-height: 420px;
    overflow-y: auto;
}

.table-scroll-body thead,
.table-scroll-body thead tr,
.table-scroll-body thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #ffffff !important;
}

.table-scroll-body thead th {
    box-shadow: 0 1px 0 #eaecf0;
}

.tabledWrapper.table-scroll-body {
    max-height: 420px;
    overflow: auto;
}

[data-bs-theme="dark"] .table-scroll-body thead,
[data-bs-theme="dark"] .table-scroll-body thead tr,
[data-bs-theme="dark"] .table-scroll-body thead th {
    background-color: #15263a !important;
    box-shadow: 0 1px 0 #2b4058;
}
