/* Toast Notification discreet top banner */
.toast-notification {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #0de5d6;
    border: 1px solid #0de5d6;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 99999;
    transition: top 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.toast-notification.show {
    top: 20px;
    opacity: 1;
}

/* Mode Édition pour les items */
.registration-card.edit-mode {
    border-color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.03) !important;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.1);
}

.registration-card.edit-mode h1 {
    color: #f59e0b !important;
}

.registration-card.edit-mode #techSheetSubmitBtn {
    background: #f59e0b !important;
    color: #0f172a !important;
}

.registration-card.edit-mode .btn-add-value {
    background: #f59e0b !important;
    color: #0f172a !important;
}

.qr-item-select {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qr-item-select:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.qr-item-select.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.1);
}

.qr-item-select.active div {
    color: var(--primary);
}


#btnCopyQR:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: scale(1.1);
}

.printer-model-card {
    flex-direction: row !important;
    gap: 15px !important;
}

.printer-model-card:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
    transform: translateY(-2px);
}

.carto-list-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
    transform: translateX(4px);
}

/* Sidebar Back Button Custom Style */
.back-home-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px !important;
    margin-bottom: 25px !important;
    border-radius: 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.back-home-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--primary) !important;
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-home-btn .icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.back-home-btn:hover .icon {
    transform: translateX(-3px);
}

/* GLOBAL LOADER */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(15px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    color: white;
    transition: all 0.3s ease;
}

#loader.visible {
    display: flex;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    margin-bottom: 25px;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
}

#loaderText {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin: 0;
    background: linear-gradient(to right, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Sidebar Footer & Version */
.sidebar-footer {
    padding-top: 15px;
    margin-top: auto;
    border-top: 1px solid var(--glass-border);
}

.sidebar-version-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.sidebar-version-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-version-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

/* Tableaux de données Back-office (Entreprises, Utilisateurs) */
.bo-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: white;
    font-size: 0.85rem;
    table-layout: fixed;
}

.bo-data-table thead {
    background: rgba(255, 255, 255, 0.05);
    text-align: left;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    position: sticky;
    top: 0;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.bo-data-table th,
.bo-data-table td {
    padding: 12px 14px;
    vertical-align: middle;
    text-align: left;
    box-sizing: border-box;
}

/* Séparations visibles entre les colonnes */
.bo-data-table th:not(:last-child),
.bo-data-table td:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/* Séparation horizontale des lignes */
.bo-data-table thead tr th {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.bo-data-table tbody tr {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s ease;
}

.bo-data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Badge cliquable pour voir les comptes d'une entreprise */
.btn-company-users {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    outline: none;
    white-space: nowrap;
}

.btn-company-users.has-users {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.btn-company-users.has-users:hover {
    background: rgba(16, 185, 129, 0.25);
    border-color: rgba(16, 185, 129, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-company-users.no-users {
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    color: var(--text-muted);
}

.btn-company-users.no-users:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.35);
    color: white;
    transform: translateY(-1px);
}


/* ============================================================ */
/* VUES D'ADMINISTRATION PLEINE LARGEUR & SCROLL SANS DÉBORDEMENT */
/* ============================================================ */

/* RÈGLE ABSOLUE : Toute vue ou élément masqué DOIT être masqué sans exception */
.hidden,
.list-column.hidden,
.bo-admin-view.hidden,
.modal-overlay.hidden {
    display: none !important;
}

/* Vue active (non masquée) uniquement */
.bo-admin-view:not(.hidden) {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 20px 35px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.bo-admin-view-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

#companyProjectsTabContent,
#companyMembersTabContent,
#companyMasterPickerContainer,
#companyDetailContainer {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.company-master-card {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    cursor: default;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.company-master-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    background: rgba(15, 23, 42, 0.55);
}

.bo-admin-scroll-container {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-bottom: 80px !important;
    padding-right: 6px;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
}

/* Scrollbar ergonomique */
.bo-admin-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.bo-admin-scroll-container::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
}

.bo-admin-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.35);
    border-radius: 8px;
}

.bo-admin-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.6);
}


/* Layout global Back-office (évite les décalages et débordements horizontaux) */
.app-layout {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

.content-body {
    display: flex !important;
    gap: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

/* Onglets de la vue Mon équipe (Projets / Membres) */
.team-tab-btn {
    padding: 9px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.4);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.team-tab-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: white;
    border-color: rgba(99, 102, 241, 0.3);
}

.team-tab-btn.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.2));
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.project-access-member-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    transition: all 0.2s ease;
    gap: 12px;
}

.project-access-member-row:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(99, 102, 241, 0.3);
}

.project-access-member-row.assigned {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.08);
}

