  .notif-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;margin-left:8px;border-radius:999px;background:#e8192c;color:#fff;font-size:10px;font-weight:700;line-height:1;vertical-align:middle;box-shadow:0 0 0 2px rgba(232,25,44,0.15);}
  #notifFilters{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px;}
  #notifFilters .notif-filter{display:inline-flex;align-items:center;gap:5px;padding:6px 11px;border-radius:999px;background:rgba(255,255,255,0.04);border:1px solid var(--uborder);color:var(--um);font-size:11px;cursor:pointer;transition:all .15s;font-family:inherit;}
  #notifFilters .notif-filter:hover{background:rgba(255,255,255,0.08);color:var(--ut);}
  #notifFilters .notif-filter.active{background:rgba(232,25,44,0.18);border-color:rgba(232,25,44,0.55);color:#fff;}
  #notifFilters .notif-filter i{font-size:13px;}
  .notif-entry{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:11px 14px;border-bottom:1px solid var(--uborder);cursor:pointer;transition:background .15s;}
  .notif-entry:last-child{border-bottom:none;}
  .notif-entry:hover{background:rgba(255,255,255,0.03);}
  .notif-entry.is-read{opacity:.5;}
  .notif-cat{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:999px;border:1px solid;font-size:10.5px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;white-space:nowrap;}
  .notif-cat i{font-size:12px;}
  .notif-msg{font-size:12.5px;color:var(--ut);line-height:1.5;}
  .notif-meta{font-size:10.5px;color:var(--um);margin-top:3px;}
  .notif-dot{width:8px;height:8px;border-radius:50%;background:#e8192c;box-shadow:0 0 0 3px rgba(232,25,44,0.18);}
  .notif-empty{padding:48px 24px;text-align:center;color:var(--um);font-size:13px;}
  /* Masquer le panel si pas connecté */
  body:not(.logged-in) .app,
  body:not(.logged-in) .hamburger,
  body:not(.logged-in) .sidebar-overlay {
      display: none !important;
  }

  /* Masquer le login ET le panel pendant la vérification de session (évite le flash) */
  html.session-pending #loginScreen {
      display: none !important;
  }
  html.session-pending .app,
  html.session-pending .hamburger,
  html.session-pending .sidebar-overlay {
      display: none !important;
  }

  /* ── Nouveau système de gestion des comptes (style Pterodactyl) ── */

  #accountsGrid { display: flex; flex-direction: column; gap: 10px; }

  .acc2-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--uborder);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color .2s;
  }
  .acc2-card.expanded { border-color: rgba(232,25,44,0.3); }
  .acc2-card.primary-account { border-color: rgba(255,193,7,0.25); background: rgba(255,193,7,0.04); }

  .acc2-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
  }

  .acc2-av {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(232,25,44,0.18);
    border: 1px solid rgba(232,25,44,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: var(--ur);
    flex-shrink: 0;
  }
  .primary-av {
    background: rgba(255,193,7,0.15);
    border-color: rgba(255,193,7,0.35);
    color: #f59e0b;
  }

  .acc2-info { flex: 1; min-width: 0; }
  .acc2-name {
    font-size: 13.5px; font-weight: 600; color: var(--ut);
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  }
  .acc2-role { font-size: 11.5px; color: var(--um); margin-top: 2px; }

  .acc2-primary-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 999px;
    background: rgba(255,193,7,0.15);
    border: 1px solid rgba(255,193,7,0.3);
    color: #f59e0b; font-size: 10.5px; font-weight: 600;
    letter-spacing: .3px;
  }
  .acc2-primary-badge i { font-size: 11px; }

  .acc2-locked {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; color: var(--ulow);
  }

  .acc2-actions {
    display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  }

  .acc2-toggle {
    width: 30px; height: 30px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--uborder);
    border-radius: 6px;
    color: var(--um); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s;
    font-size: 14px;
  }
  .acc2-toggle:hover { background: rgba(255,255,255,0.08); color: var(--ut); }
  .acc2-toggle i { transition: transform .2s; }

  /* Panneau de permissions — fermé par défaut */
  .acc2-perms {
    display: none;
    border-top: 1px solid var(--uborder);
    background: rgba(0,0,0,0.15);
  }
  .acc2-perms.open { display: block; }

  .acc2-perm-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0;
  }

  .acc2-perm-group {
    padding: 16px 20px;
    border-right: 1px solid var(--uborder);
    border-bottom: 1px solid var(--uborder);
  }
  .acc2-perm-group:last-child { border-right: none; }

  .acc2-perm-group-title {
    font-size: 10.5px; font-weight: 700;
    color: var(--um); text-transform: uppercase;
    letter-spacing: .6px; margin-bottom: 10px;
    display: flex; align-items: center; gap: 6px;
  }
  .acc2-perm-group-title i { font-size: 13px; color: var(--ur); }

  .acc2-perm-list { display: flex; flex-direction: column; gap: 6px; }

  .acc2-perm-item {
    display: flex; align-items: center; gap: 9px;
    cursor: pointer; padding: 5px 6px; border-radius: 6px;
    transition: background .12s;
  }
  .acc2-perm-item:hover:not(.readonly) { background: rgba(255,255,255,0.04); }
  .acc2-perm-item.readonly { cursor: default; opacity: .55; }
  .acc2-perm-item input[type="checkbox"] { display: none; }

  .acc2-perm-check {
    width: 16px; height: 16px; flex-shrink: 0;
    border-radius: 4px;
    border: 1.5px solid var(--uborder);
    background: rgba(255,255,255,0.04);
    position: relative; transition: all .15s;
  }
  .acc2-perm-item input:checked ~ .acc2-perm-check {
    background: var(--ur);
    border-color: var(--ur);
  }
  .acc2-perm-item input:checked ~ .acc2-perm-check::after {
    content: '';
    position: absolute; left: 4px; top: 1px;
    width: 4px; height: 8px;
    border: 2px solid #fff;
    border-top: none; border-left: none;
    transform: rotate(45deg);
  }

  .acc2-perm-label { font-size: 12px; color: var(--ut); line-height: 1.3; }

  .acc2-input-name {
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    color: var(--ut);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    padding: 2px 4px;
    width: 150px;
    transition: border-bottom-color 0.2s;
  }
  .acc2-input-name:focus {
    border-bottom-color: var(--ur);
    outline: none;
    background: rgba(255, 255, 255, 0.02);
  }

  .acc2-input-role {
    background: transparent;
    border: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    color: var(--um);
    font-family: inherit;
    font-size: 11.5px;
    padding: 2px 4px;
    width: 150px;
    margin-top: 2px;
    transition: border-bottom-color 0.2s;
  }
  .acc2-input-role:focus {
    border-bottom-color: var(--ur);
    outline: none;
    background: rgba(255, 255, 255, 0.02);
  }

  .cat-card-body {
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.3s ease;
    max-height: 2000px;
    opacity: 1;
  }
  .cat-card-body.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
  }

  /* ── THÈME CLAIR (Light Theme) ULTRA-NET & HAUT CONTRASTE ── */
  body.light-theme {
    --ubg: #f8fafc;
    --usbg: #ffffff;
    --usbg2: #f1f5f9;
    --usbg3: #e2e8f0;
    --bg-input: #ffffff;
    --uborder: rgba(0, 0, 0, 0.12);
    --uborder-strong: rgba(0, 0, 0, 0.22);
    --ut: #000000;
    --um: #1e293b;
    --ulow: #475569;
    background: #f8fafc !important;
    color: #000000 !important;
  }

  /* Universal typography in Light Theme */
  body.light-theme,
  body.light-theme .app,
  body.light-theme .main,
  body.light-theme p,
  body.light-theme td,
  body.light-theme th,
  body.light-theme label,
  body.light-theme b,
  body.light-theme strong,
  body.light-theme h1,
  body.light-theme h2,
  body.light-theme h3,
  body.light-theme h4,
  body.light-theme .sec-title,
  body.light-theme .cat-card-title,
  body.light-theme .st-title,
  body.light-theme .topbar-title,
  body.light-theme .topbar-user-name,
  body.light-theme .modal-head span,
  body.light-theme .login-title,
  body.light-theme .card-title {
    color: #000000 !important;
  }

  /* Subtitles & Secondary info in dark charcoal (not faint gray) */
  body.light-theme .topbar-sub,
  body.light-theme .sb-logo-sub,
  body.light-theme .topbar-user-role,
  body.light-theme .login-sub,
  body.light-theme .text-muted,
  body.light-theme small {
    color: #334155 !important;
  }

  /* Topbar & Sidebar */
  body.light-theme .topbar {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03) !important;
  }
  body.light-theme .sidebar {
    background: #ffffff !important;
    border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
  }
  body.light-theme .sb-logo {
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
  }
  body.light-theme .sb-logo-text {
    color: #000000 !important;
  }
  body.light-theme .sb-section {
    color: #475569 !important;
    font-weight: 700 !important;
  }
  body.light-theme .sb-item {
    color: #0f172a !important;
    font-weight: 600 !important;
  }
  body.light-theme .sb-item:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    color: var(--ur) !important;
  }
  body.light-theme .sb-item.active {
    background: rgba(232, 25, 44, 0.1) !important;
    color: var(--ur) !important;
    font-weight: 700 !important;
  }

  /* Inputs, Textareas, Selects */
  body.light-theme input:not([type="checkbox"]):not([type="radio"]),
  body.light-theme select,
  body.light-theme textarea {
    color: #000000 !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.18) !important;
    font-weight: 500 !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  }
  body.light-theme input:focus,
  body.light-theme select:focus,
  body.light-theme textarea:focus {
    border-color: var(--ur) !important;
    box-shadow: 0 0 0 3px rgba(232, 25, 44, 0.15) !important;
    outline: none !important;
  }
  body.light-theme input::placeholder,
  body.light-theme textarea::placeholder {
    color: #64748b !important;
    opacity: 1 !important;
  }
  body.light-theme select option {
    background: #ffffff !important;
    color: #000000 !important;
  }

  /* Cards, Panels & Containers */
  body.light-theme .panel-card,
  body.light-theme .cat-card,
  body.light-theme .staff-card,
  body.light-theme .stat-card,
  body.light-theme .profile-detail-card,
  body.light-theme .accounts-grid > div,
  body.light-theme .login-box {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    color: #000000 !important;
  }
  body.light-theme .cat-card-header {
    background: #f8fafc !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  }
  body.light-theme .cat-card-count {
    color: #000000 !important;
    background: #e2e8f0 !important;
    font-weight: 700 !important;
  }

  /* Tables & Lists */
  body.light-theme table {
    color: #000000 !important;
  }
  body.light-theme table thead tr,
  body.light-theme .staff-table thead tr,
  body.light-theme .cat-table th {
    background: #f1f5f9 !important;
    color: #000000 !important;
    font-weight: 700 !important;
    border-bottom: 2px solid rgba(0, 0, 0, 0.12) !important;
  }
  body.light-theme table tbody tr,
  body.light-theme .staff-table tbody tr,
  body.light-theme .cat-table td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #000000 !important;
  }
  body.light-theme table tbody tr:hover,
  body.light-theme .staff-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02) !important;
  }

  /* Modals */
  body.light-theme .modal-overlay {
    background: rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: blur(4px) !important;
  }
  body.light-theme .modal-box {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18) !important;
    color: #000000 !important;
  }
  body.light-theme .modal-head {
    background: #f8fafc !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #000000 !important;
  }
  body.light-theme .modal-head span,
  body.light-theme .modal-head h3,
  body.light-theme .modal-head i {
    color: #000000 !important;
  }
  body.light-theme .modal-close {
    color: #475569 !important;
  }
  body.light-theme .modal-close:hover {
    color: #000000 !important;
    background: rgba(0, 0, 0, 0.05) !important;
  }
  body.light-theme .modal-actions {
    background: #f8fafc !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
  }
  body.light-theme .btn-cancel {
    background: #f1f5f9 !important;
    color: #000000 !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    font-weight: 600 !important;
  }
  body.light-theme .btn-cancel:hover {
    background: #e2e8f0 !important;
  }

  /* Filter Tabs, Buttons & Pills */
  body.light-theme .staff-cat-tab,
  body.light-theme .notif-filter,
  body.light-theme .month-tab,
  body.light-theme .acc-btn.pwd,
  body.light-theme .btn:not(.btn-red) {
    background: #f1f5f9 !important;
    color: #000000 !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    font-weight: 600 !important;
  }
  body.light-theme .staff-cat-tab:hover,
  body.light-theme .notif-filter:hover,
  body.light-theme .month-tab:hover,
  body.light-theme .btn:not(.btn-red):hover {
    background: #e2e8f0 !important;
    color: #000000 !important;
  }
  body.light-theme .staff-cat-tab.active,
  body.light-theme .notif-filter.active,
  body.light-theme .month-tab.active {
    background: var(--ur) !important;
    color: #ffffff !important;
    border-color: var(--ur) !important;
  }

  /* Inline white/dark blocks override in Light Theme */
  body.light-theme div[style*="background:rgba(255,255,255,0.02)"],
  body.light-theme div[style*="background:rgba(255,255,255,0.03)"],
  body.light-theme div[style*="background:rgba(255,255,255,0.04)"],
  body.light-theme div[style*="background:rgba(255,255,255,0.05)"],
  body.light-theme div[style*="background:rgba(0,0,0,0.2)"],
  body.light-theme span[style*="background:rgba(255,255,255,0.02)"],
  body.light-theme span[style*="background:rgba(255,255,255,0.04)"],
  body.light-theme span[style*="background:rgba(255,255,255,0.06)"],
  body.light-theme button[style*="background:rgba(255,255,255,0.05)"],
  body.light-theme button[style*="background:rgba(255,255,255,0.06)"] {
    background: #f1f5f9 !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #000000 !important;
  }

  /* Force all light/gray colors to high-contrast dark/black in Light Theme */
  body.light-theme [style*="color:var(--um)"],
  body.light-theme [style*="color: var(--um)"],
  body.light-theme [style*="color:var(--ut)"],
  body.light-theme [style*="color: var(--ut)"],
  body.light-theme [style*="color:var(--ulow)"],
  body.light-theme [style*="color: var(--ulow)"] {
    color: #0f172a !important;
  }

  /* Fix hardcoded gray/white text shades */
  body.light-theme div[style*="color:#fff"],
  body.light-theme div[style*="color: #fff"],
  body.light-theme div[style*="color:#ffffff"],
  body.light-theme div[style*="color: #ffffff"],
  body.light-theme span[style*="color:#fff"],
  body.light-theme span[style*="color: #fff"],
  body.light-theme span[style*="color:#ffffff"],
  body.light-theme span[style*="color: #ffffff"],
  body.light-theme p[style*="color:#fff"],
  body.light-theme label[style*="color:#fff"],
  body.light-theme h1[style*="color:#fff"],
  body.light-theme h2[style*="color:#fff"],
  body.light-theme h3[style*="color:#fff"] {
    color: #000000 !important;
  }

  body.light-theme [style*="color:#8a8a96"],
  body.light-theme [style*="color: #8a8a96"],
  body.light-theme [style*="color:#5a5a64"],
  body.light-theme [style*="color: #5a5a64"],
  body.light-theme [style*="color:#94a3b8"],
  body.light-theme [style*="color: #94a3b8"],
  body.light-theme [style*="color:#cbd0db"],
  body.light-theme [style*="color: #cbd0db"],
  body.light-theme [style*="color:#cbd5e1"],
  body.light-theme [style*="color: #cbd5e1"],
  body.light-theme [style*="color:#a0aec0"],
  body.light-theme [style*="color: #a0aec0"] {
    color: #1e293b !important;
  }

  /* Acc2 account list items high-contrast */
  body.light-theme .acc2-name {
    color: #000000 !important;
  }
  body.light-theme .acc2-card {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
  }
  body.light-theme .acc2-header:hover {
    background: rgba(0, 0, 0, 0.02) !important;
  }
  body.light-theme .acc2-perm-group {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
  }
  body.light-theme .acc2-perm-group-title {
    color: #000000 !important;
    font-weight: 700 !important;
  }
  body.light-theme .acc2-perm-label {
    color: #0f172a !important;
    font-weight: 500 !important;
  }

  /* ── ACCENT COLOR SELECTION ── */
  .accent-dot.active {
    border-color: #fff !important;
    box-shadow: 0 0 0 2px var(--ur) !important;
    transform: scale(1.15);
  }
  .accent-dot {
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  }
  .accent-dot:hover {
    transform: scale(1.1);
  }