.icon-ad {
    width: 1.25rem;
    height: 1.25rem;
    stroke-width: 1.5;
    vertical-align: middle;
}

.nav-link-icon i {
    vertical-align: middle;
    line-height: 1;
    position: relative;
    top: -1px; /* ajustează ±1px dacă mai trebuie */
}

.nav-link-icon i {
    font-size: 18px;
    width: 18px;
    text-align: center;
}

.navbar-brand .navbar-brand-image-ad {
    height: 32px !important;
    width: 110px !important; /* fixează lățimea exactă */
    object-fit: contain; /* de siguranță */
}

/* culori pt rând SELECTAT din tabelul principal */
:root {
    --row-selected-bg: rgba(32, 107, 196, 0.12); /* #206bc4 @ 12% */
    --row-selected-fg: #206bc4;
}

[data-bs-theme="dark"] {
    --row-selected-bg: rgba(32, 107, 196, 0.18);
    --row-selected-fg: #6ea8fe;
}

/* highlight pe rândul selectat din tabelul principal */
#pos-table tbody tr.is-selected > th,
#pos-table tbody tr.is-selected > td {
    background-color: var(--row-selected-bg) !important;
    background-image: none !important; /* taie overlay-urile BS/DT */
    color: var(--row-selected-fg) !important;
    background-clip: padding-box; /* elimină “seams” între celule */
}

/* linkuri / texte “secondary” în rândul selectat */
#pos-table tbody tr.is-selected a,
#pos-table tbody tr.is-selected .text-secondary,
#pos-table tbody tr.is-selected .text-muted {
    color: var(--row-selected-fg) !important;
    opacity: .95;
}

/* păstrează aceeași culoare și la hover peste selected */
#pos-table.table-hover tbody tr.is-selected:hover > * {
    background-color: var(--row-selected-bg) !important;
    color: var(--row-selected-fg) !important;
}


/* dezactivează hover pe rândurile ne-selectate (opțional) */
#pos-table.table-hover tbody tr:hover:not(.is-selected) > * {
    background-color: inherit !important;
    color: inherit !important;
}

/* — Butonul Edit doar pe rând selectat (și la hover, dacă vrei) — */
#pos-table .row-action {
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s;
}

#pos-table tbody tr.is-selected .row-action,
#pos-table tbody tr:hover .row-action {
    opacity: 1;
    pointer-events: auto;
}

/* — Expand icon — */
#pos-table .expander-cell {
    cursor: pointer;
}

#pos-table .row-expand {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    color: var(--tblr-muted);
    outline: none;
}

#pos-table .expander-cell:hover .row-expand,
#pos-table .row-expand:focus-visible {
    background: color-mix(in srgb, var(--tblr-primary) 12%, transparent);
    color: var(--tblr-primary);
}

#pos-table .row-expand i {
    font-size: 16px;
    transition: transform .15s ease;
}

#pos-table tr.dt-hasChild .row-expand i {
    transform: rotate(90deg);
}

/* — Child row — */
#pos-table tr.dt-hasChild + tr.dt-child td {
    background: var(--tblr-bg-surface) !important;
    border-top: 0;
}

.child-wrap {
    border: 1px solid var(--tblr-border-color);
    border-radius: .5rem;
    padding: .75rem;
}

.child-wrap .table {
    margin-bottom: 0;
}


/* ——— buton expand: vizibil mereu, hit-area mare ——— */
#pos-table .expand-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    border-radius: 9999px;
    color: var(--tblr-muted);
    cursor: pointer;
    /* elimină artefactul de focus în Firefox/Chrome */
    outline: none;
    box-shadow: none;
    -moz-appearance: none;
    -webkit-appearance: none;
}

#pos-table .expand-toggle .chev {
    transition: transform .15s ease, color .15s ease;
}

/* hover: doar un halo discret, fără “linie” animată */
#pos-table .expand-toggle:hover {
    background: color-mix(in srgb, var(--tblr-primary) 12%, transparent);
    color: var(--tblr-primary);
}

/* focus accesibil, dar fără animația “ciudată” din FF */
#pos-table .expand-toggle:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--tblr-primary) 40%, transparent);
    outline-offset: 2px;
    box-shadow: none;
}

/* rotire când e deschis */
#pos-table tr.dt-hasChild .expand-toggle .chev {
    transform: rotate(90deg);
}

/* pe rând selectat, lasă iconul mai vizibil */
#pos-table tbody tr.is-selected .expand-toggle {
    color: var(--row-selected-fg);
}

#pos-table.table-hover tbody tr:hover .expand-toggle {
    color: var(--tblr-primary);
}

#pos-table tr.dt-hasChild .expand-toggle {
    background: color-mix(in srgb, var(--tblr-primary) 12%, transparent);
    color: var(--tblr-primary);
}


/* === child-wrap cu fundal de selecție === */
/* === fundal pentru rândul copil (tr[data-dt-row]) === */
#pos-table tr.dt-child[data-dt-row] > td {
    background-color: var(--row-selected-bg) !important;
    color: var(--row-selected-fg) !important;
    border-top: none !important;
    padding: 0.5rem 0.75rem !important;
}


.child-wrap {
    background-color: var(--row-selected-bg) !important;
    color: var(--row-selected-fg) !important;
    border: none;
    border-radius: .5rem;
    padding: .75rem;
}

/* === tabelul din interiorul child-wrap === */
.child-wrap .table {
    width: 100%;
    background-color: #fff; /* alb pentru header și celule */
    border: 1px solid var(--tblr-border-color);
    border-radius: .375rem;
    overflow: hidden;
    margin-bottom: 0;
}

/* header alb, text normal (nu gri) */
.child-wrap .table thead th {
    background-color: #fff !important;
    color: var(--tblr-body-color, #000);
    border-bottom: 1px solid var(--tblr-border-color);
    font-weight: 600;
}

/* celulele din body — fond alb, text normal */
.child-wrap .table tbody td {
    background-color: #fff !important;
    color: var(--tblr-body-color, #000);
    border-color: var(--tblr-border-color);
}

/* păstrează colțurile rotunjite la tabelul copil */
.child-wrap .table {
    border-collapse: separate;
    border-spacing: 0;
}

/* mică umbră subtilă pentru contrast pe fundalul albastru translucid */
.child-wrap .table {
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.08);
}

/* rând selectat în tabelul copil (licență selectată) */
.child-wrap .table tbody tr.child-row-selected > td {
    background-color: rgba(0, 0, 0, 0.06) !important;
    /* dacă e dark mode */

    [data-bs-theme="dark"] & {
        background-color: rgba(255, 255, 255, 0.07) !important;
    }

    color: inherit !important;
}

/* cursor de selecție */
.child-wrap .table tbody tr {
    cursor: pointer;
}

/* opțional: la hover să fie discret, dar altfel decât selected */
.child-wrap .table tbody tr:hover > td {
    background-color: rgba(0, 0, 0, 0.03) !important;
}

[data-bs-theme="dark"] .child-wrap .table tbody tr:hover > td {
    background-color: rgba(255, 255, 255, 0.04) !important;
}

/* Dacă e un rând deja selectat, hover NU schimbă culoarea */
.child-wrap .table tbody tr.child-row-selected:hover > td {
    background-color: rgba(0, 0, 0, 0.06) !important;
}

[data-bs-theme="dark"] .child-wrap .table tbody tr.child-row-selected:hover > td {
    background-color: rgba(255, 255, 255, 0.07) !important;
}

/*pt filtre in tabel*/
#pos-table thead tr.filters-row th {
    background: var(--tblr-bg-surface);
    padding: .25rem;
    vertical-align: bottom;
}

#pos-table thead tr.filters-row .form-control-sm,
#pos-table thead tr.filters-row .form-select-sm {
    font-size: .75rem;
    line-height: 1.2;
    height: auto;
    min-width: 6rem;
}

/*pentru buton filter in header tabel*/

/* header expand/filter cell */
.expand-filter-header {
    vertical-align: middle;
    text-align: center;
    width: 1%;
    white-space: nowrap;
}

.filter-toggle-btn {
    color: inherit;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* stare activă a filtrului: albastru-ish ca să fie clar că sunt filtre aplicate */
.filter-toggle-btn.is-active {
    color: var(--row-selected-fg);
}

.clear-filters-btn {
    color: inherit;
    opacity: 0.75;
    transition: opacity 0.12s;
}

.clear-filters-btn:hover {
    opacity: 1;
}

.expand-filter-header,
#pos-table thead tr.filters-row th:first-child {
    width: 1%;
    text-align: center;
    vertical-align: middle;
}

/*pt filter de tip data calendaritica*/
.date-range-filter .form-control-sm {
    min-width: 7rem;
    padding-top: .15rem;
    padding-bottom: .15rem;
    line-height: 1.2;
    height: auto;
}

.date-range-filter {
    min-width: 7rem;
}


/*pt filtru cu interval de date*/
/* rând cu filtre */
#pos-table thead tr.filters-row th {
    background: var(--tblr-bg-surface);
    padding: .25rem;
    vertical-align: bottom;
}

#pos-table thead tr.filters-row .form-control-sm,
#pos-table thead tr.filters-row .form-select-sm {
    font-size: .75rem;
    line-height: 1.2;
    height: auto;
    min-width: 6rem;
    padding-top: .15rem;
    padding-bottom: .15rem;
}

/* highlight icon funnel când există filtre active */
.filter-toggle-btn.is-active {
    color: var(--row-selected-fg, #206bc4);
    /* fallback la albastru dacă variabila nu există */
    color: #206bc4;
}

#pos-table td.badges-cell {
    max-height: 64px; /* afișează 2-3 rânduri de badge-uri */
    overflow-y: auto; /* scroll vertical */
    overflow-x: hidden;
}

#pos-table td.badges-cell::-webkit-scrollbar {
    width: 6px;
}

#pos-table td.badges-cell::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}


/*
==============================================
 aplică la toate listele SPA
 =============================================
 */
.spa-list-table tbody td,
.spa-list-table thead th {
    border: 1px solid #dee2e6 !important; /* culoare Bootstrap */
}
/* pentru toate tabelele SPA */
.spa-list-table tbody td {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    line-height: 1.1 !important;
}

.spa-list-table tr.table-active {
    background-color: rgba(0, 123, 255, 0.08);
}

.spa-list-table .action-edit {
    opacity: 0;
    transition: opacity 0.15s;
}

.spa-list-table tbody tr:hover .action-edit {
    opacity: 1;
}

.spa-list-table td:first-child {
    color: #666;
    font-size: 0.825rem;
    text-align: right;
    padding-right: 0.75rem;
}

/* Permite glow pe toată lățimea */
.table-responsive {
    overflow: visible !important;
}

.spa-list-table tbody tr.table-active {
    box-shadow: 0 0 0 2px rgba(0, 123, 255, .5);
    position: relative;
    z-index: 6;
}

.spa-list-table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
    box-shadow: 0 0 0 2px rgba(0, 123, 255, .4);
}


/* pagination generic legat de container, nu de id */
.list-pagination-container .pagination {
    margin: 0;
}


.list-pagination-container .page-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 36px !important;
    min-width: calc(1rem + 1.125rem + 2px);
    padding: 0 10px !important;
    line-height: 1em !important;
    border-color: #dfe3e8;
    color: #4b5563;
}

/* hover */
.list-pagination-container .page-link:hover {
    border-color: #b6c2d2;
    background-color: #f8fafc;
    color: #1c64f2;
}

/* activ - dreptunghi albastru */
.list-pagination-container .page-item.active .page-link {
    background-color: #1c64f2;
    border-color: #1c64f2;
    color: #fff;
}

/* disabled (<<, < pt first, last, etc.) */
.list-pagination-container .page-item.disabled .page-link {
    color: #9ca3af;
    background-color: #fff;
}

/* focus – fără glow suplimentar */
.list-pagination-container .page-link:focus {
    box-shadow: none;
}

.pagination {
    --tblr-pagination-gap: 0rem;
    line-height: var(--tblr-body-line-height);
}

/* ascuns implicit */
.table-action-dropdown .action-dots {
    opacity: 0;
    transition: opacity .15s;
}

/* vizibil la hover pe rând */
table.dataTable tbody tr:hover .table-action-dropdown .action-dots {
    opacity: 1;
}

/* când dropdown-ul e deschis, ține butonul ... vizibil, chiar fără hover pe rând */
.table-action-dropdown.show .action-dots {
    opacity: 1 !important;
}

/* butonul ... */
/* iconul din butonul ... */
.action-dots i {
    font-size: 0.95rem !important; /* sau 0.9rem dacă îl vrei și mai mic */
    line-height: 1 !important;
}

/* butonul să nu adauge padding suplimentar */
.action-dots {
    padding: 0 !important;
    line-height: 1 !important;
    color: #6c757d;
    border: none;
}

/* hover pe ... */
.action-dots:hover {
    color: #1c64f2;
}

/* dropdown */
.table-action-dropdown .dropdown-menu {
    min-width: 140px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    border-radius: .375rem;
}

