/* ============================================================
   Adopt[IA] Agency OS — Enhancement Layer
   enhance.css — Responsive + Aesthetic + Animations
   Injected on every page, defensive overrides only.
   ============================================================ */

/* ─── 0. Mesh gradient background ──────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 15% 20%, rgba(0, 214, 138, 0.032) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 85% 75%, rgba(61, 79, 155, 0.038) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 50% 10%, rgba(79, 224, 122, 0.018) 0%, transparent 60%);
}

/* Ensure stacking context is preserved */
.sidebar,
.page-wrap,
main,
.content,
.layout {
  position: relative;
  z-index: 1;
}

/* ─── 1. RESPONSIVE — Drawer mobile ────────────────────────── */

/* Drawer overlay */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 900;
}

/* Hamburger button — hidden by default, JS injects it */
.mobile-hamburger {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1100;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 20, 0.92);
  border: 1px solid rgba(0, 214, 138, 0.2);
  border-radius: 9px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  gap: 5px;
  transition: background 0.15s, border-color 0.15s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mobile-hamburger:hover {
  background: rgba(0, 214, 138, 0.08);
  border-color: rgba(0, 214, 138, 0.35);
}

.mobile-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #00D68A;
  border-radius: 2px;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
  transform-origin: center;
}

/* Hamburger → X when open */
.mobile-hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-hamburger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Breakpoint 768px — Mobile ───────────────────────────────── */
@media (max-width: 768px) {
  /* Activate hamburger */
  .mobile-hamburger {
    display: flex !important;
  }

  /* Activate overlay */
  .drawer-overlay {
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .drawer-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  /* Sidebar becomes a slide-in drawer */
  .sidebar {
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease !important;
    z-index: 1000 !important;
    position: fixed !important;
    height: 100vh !important;
    top: 0 !important;
    left: 0 !important;
    box-shadow: none;
  }

  .sidebar.drawer-open {
    transform: translateX(0) !important;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(0, 214, 138, 0.08) !important;
  }

  /* Reset page wrap offset */
  body.has-drawer .page-wrap,
  body.has-drawer main,
  body.has-drawer .content {
    margin-left: 0 !important;
    padding: 16px !important;
    padding-top: 62px !important; /* space for hamburger */
  }

  /* Fluid typography on mobile */
  .page-header-left h1,
  h1 {
    font-size: clamp(18px, 5vw, 26px) !important;
  }

  /* Stats row → 2 cols then 1 col */
  .stats-row,
  .stat-grid,
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  /* Tables overflow scroll */
  .table-wrap,
  .card-body table,
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Page header flex → column */
  .page-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .page-header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  /* Card bodies full width */
  .card {
    border-radius: 10px;
  }

  /* Modal full-screen on mobile */
  .modal-overlay {
    padding: 10px;
    align-items: flex-end;
  }

  .modal {
    max-width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
    max-height: 90vh;
  }

  /* Form rows → 1 col */
  .form-row {
    grid-template-columns: 1fr !important;
  }

  /* Hide non-essential columns in task/client tables */
  .hide-mobile {
    display: none !important;
  }
}

/* ── Breakpoint 560px — Extra small ─────────────────────────── */
@media (max-width: 560px) {
  .stats-row,
  .stat-grid,
  .kpi-grid {
    grid-template-columns: 1fr !important;
  }

  .stat-card .stat-value {
    font-size: 26px !important;
  }
}

/* ── Breakpoint 769–1024px — Tablet ─────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Keep sidebar at full width but tighten content */
  .page-wrap {
    padding: 24px 22px;
  }

  .stats-row,
  .stat-grid,
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Desktop: hamburger stays hidden ─────────────────────────── */
@media (min-width: 769px) {
  .mobile-hamburger {
    display: none !important;
  }

  .drawer-overlay {
    display: none !important;
  }
}

/* ─── 2. ESTHETIC — Depth & hover glow ─────────────────────── */

/* Elevated utility class */
.elevated {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Generic card hover: elevation + subtle green glow */
.card:hover,
.stat-card:hover,
.project-card:hover,
.kpi-card:hover {
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 214, 138, 0.1) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.15s ease, border-color 0.15s ease;
}

/* Prevent double-transform on project-card (already has translateY in styles.css) */
.card:hover,
.stat-card:hover,
.kpi-card:hover {
  transform: translateY(-2px);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* Empty state enhancement */
.empty-state {
  min-height: 120px;
}

.empty-state .empty-icon {
  font-size: 32px;
  opacity: 0.35;
  margin-bottom: 4px;
}

.empty-state .empty-text {
  font-size: 13px;
  color: var(--muted);
  max-width: 260px;
  line-height: 1.5;
}

/* Pulse dot — "live" indicator */
@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 214, 138, 0.5);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 0 5px rgba(0, 214, 138, 0);
  }
}

.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

.pulse-dot.dot-red    { background: var(--red);    animation-name: pulse-dot-red; }
.pulse-dot.dot-orange { background: var(--orange);  animation-name: pulse-dot-orange; }

@keyframes pulse-dot-red {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.5); }
  50% { transform: scale(1.15); box-shadow: 0 0 0 5px rgba(255, 77, 77, 0); }
}

@keyframes pulse-dot-orange {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 140, 66, 0.5); }
  50% { transform: scale(1.15); box-shadow: 0 0 0 5px rgba(255, 140, 66, 0); }
}

/* Signature — thin green pulse line (top of viewport) */
.aos-signature-line {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 9999;
  background: linear-gradient(90deg, transparent 0%, #00D68A 40%, #4FE07A 60%, transparent 100%);
  opacity: 0.55;
  animation: signature-pulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes signature-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.65; }
}

/* ─── 3. ANIMATIONS ─────────────────────────────────────────── */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  opacity: 0;
  animation: fadeUp 0.4s ease forwards;
}

/* Stagger delays — applied via JS data-stagger attribute, but CSS fallbacks */
.fade-up[data-stagger="0"]  { animation-delay: 0ms; }
.fade-up[data-stagger="1"]  { animation-delay: 50ms; }
.fade-up[data-stagger="2"]  { animation-delay: 100ms; }
.fade-up[data-stagger="3"]  { animation-delay: 150ms; }
.fade-up[data-stagger="4"]  { animation-delay: 200ms; }
.fade-up[data-stagger="5"]  { animation-delay: 250ms; }
.fade-up[data-stagger="6"]  { animation-delay: 300ms; }
.fade-up[data-stagger="7"]  { animation-delay: 350ms; }
.fade-up[data-stagger="8"]  { animation-delay: 400ms; }
.fade-up[data-stagger="9"]  { animation-delay: 450ms; }
.fade-up[data-stagger="10"] { animation-delay: 500ms; }

/* Skeleton shimmer loading state */
@keyframes skeleton-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 600px 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm, 8px);
  color: transparent !important;
}

.skeleton * { visibility: hidden !important; }

/* Skeleton sizing helpers */
.skeleton-line {
  height: 14px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-40 { width: 40%; }

/* Button active press */
button:active,
.btn:active {
  transform: scale(0.97) !important;
  transition: transform 0.08s ease !important;
}

/* Progress bar width transition */
.progress-fill {
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ─── 4. MICRO — Scrollbars ─────────────────────────────────── */

/* Already in styles.css; reinforce for dynamically injected containers */
.modal::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 4px;
}
.modal::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.modal::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
}

/* Focus visible — accessible green outline */
:focus-visible {
  outline: 2px solid rgba(0, 214, 138, 0.65) !important;
  outline-offset: 2px !important;
}

/* Remove outline on mouse clicks, keep on keyboard */
:focus:not(:focus-visible) {
  outline: none;
}

/* ─── 4b. TOOLTIPS CSS ──────────────────────────────────────── */
.has-tip {
  position: relative;
  cursor: default;
}

.has-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(16, 22, 32, 0.97);
  border: 1px solid rgba(0, 214, 138, 0.18);
  color: rgba(255, 255, 255, 0.88);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 7px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 9000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  max-width: 260px;
  text-overflow: ellipsis;
}

.has-tip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Tooltip arrow */
.has-tip::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 214, 138, 0.18);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 9001;
}

.has-tip:hover::before {
  opacity: 1;
}

/* ─── 5. CMD+K Palette ──────────────────────────────────────── */
.aoscmdk-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 8000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  animation: fadeIn 0.15s ease;
}

.aoscmdk-box {
  background: rgba(14, 20, 30, 0.98);
  border: 1px solid rgba(0, 214, 138, 0.2);
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 214, 138, 0.06);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.aoscmdk-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cmdk-icon {
  font-size: 16px;
  color: rgba(0, 214, 138, 0.6);
  flex-shrink: 0;
}

.aoscmdk-input {
  flex: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  font-family: 'Manrope', sans-serif !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.aoscmdk-input::placeholder {
  color: rgba(255, 255, 255, 0.3) !important;
}

.cmdk-shortcut {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.aoscmdk-results {
  max-height: 340px;
  overflow-y: auto;
  padding: 6px 0;
}

.aoscmdk-empty {
  padding: 24px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
}

.aoscmdk-section-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 10px 18px 4px;
}

.aoscmdk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  cursor: pointer;
  transition: background 0.1s;
}

.aoscmdk-item:hover,
.aoscmdk-item.is-focused {
  background: rgba(0, 214, 138, 0.07);
}

.aoscmdk-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  color: rgba(0, 214, 138, 0.7);
}

.aoscmdk-item-label {
  flex: 1;
  font-size: 13.5px;
  font-weight: 500;
  color: #ffffff;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aoscmdk-item-meta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.aoscmdk-footer {
  padding: 8px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 12px;
  align-items: center;
}

.aoscmdk-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 4px;
}

.aoscmdk-hint kbd {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: inherit;
}

/* ─── 6. TOAST ──────────────────────────────────────────────── */
#aos-toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.aos-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 10px;
  background: rgba(14, 20, 30, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  min-width: 220px;
  max-width: 360px;
  pointer-events: auto;
  animation: toastIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.aos-toast.toast-out {
  animation: toastOut 0.2s ease forwards;
}

.aos-toast.toast-ok    { border-color: rgba(0, 214, 138, 0.3); }
.aos-toast.toast-warn  { border-color: rgba(255, 210, 63, 0.3); }
.aos-toast.toast-error { border-color: rgba(255, 77, 77, 0.3); }

.aos-toast .toast-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.toast-ok    .toast-dot { background: #00D68A; }
.toast-warn  .toast-dot { background: #FFD23F; }
.toast-error .toast-dot { background: #FF4D4D; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(16px) scale(0.95); }
}

/* ─── 7. QUICK CAPTURE modal ────────────────────────────────── */
.aosqc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 7500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.18s ease;
}

.qc-box {
  background: #0f161f;
  border: 1px solid rgba(0, 214, 138, 0.18);
  border-radius: 14px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
  overflow: hidden;
  animation: slideUp 0.2s ease;
}

.aosqc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.aosqc-header h4 {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qc-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 18px;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 5px;
  transition: background 0.12s, color 0.12s;
  line-height: 1;
}
.qc-close:hover { background: rgba(255,255,255,0.06); color: #fff; }

.aosqc-body {
  padding: 16px 20px;
}

.aosqc-input {
  width: 100% !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-family: 'Manrope', sans-serif !important;
  padding: 10px 14px !important;
  outline: none !important;
  transition: border-color 0.15s !important;
  margin-bottom: 14px;
}

.aosqc-input:focus {
  border-color: rgba(0, 214, 138, 0.5) !important;
  background: rgba(0, 214, 138, 0.04) !important;
  box-shadow: 0 0 0 3px rgba(0, 214, 138, 0.07) !important;
}

.aosaosqc-types {
  display: flex;
  gap: 8px;
}

.aosqc-type-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 600;
  font-family: 'Manrope', sans-serif;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.aosqc-type-btn .aosqc-type-icon {
  font-size: 16px;
}

.aosqc-type-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}

.aosqc-type-btn.is-selected {
  border-color: rgba(0, 214, 138, 0.4);
  background: rgba(0, 214, 138, 0.09);
  color: #00D68A;
}

.qc-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.aosqc-hint {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.2);
  padding: 0 20px 12px;
}

/* ─── 8. PAGE TRANSITION ────────────────────────────────────── */
.aos-page-fade-out {
  animation: fadeOut 0.12s ease forwards;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* ─── 9. REDUCED MOTION — respect user preference ──────────── */
@media (prefers-reduced-motion: reduce) {
  .fade-up,
  .aos-toast,
  .aoscmdk-overlay,
  .aosqc-overlay,
  .sidebar,
  .aos-signature-line {
    animation: none !important;
    transition: none !important;
  }

  .pulse-dot,
  .pulse-dot.dot-red,
  .pulse-dot.dot-orange {
    animation: none !important;
  }

  .skeleton {
    animation: none !important;
    background: rgba(255, 255, 255, 0.06) !important;
  }

  .card:hover,
  .stat-card:hover,
  .kpi-card:hover,
  .project-card:hover {
    transform: none !important;
  }
}

/* Fond opaque pour le drawer mobile (sinon le contenu transparaît) */
@media (max-width: 768px){
  .sidebar.drawer-open{ background:#0A0E14 !important; }
  nav.sidebar.drawer-open{ background:#0A0E14 !important; }
}

/* ═══ FIX LAYOUT DESKTOP — garantit sidebar fixe + contenu décalé ═══
   Certaines pages (okr, matrix...) avaient une sidebar en position relative
   qui poussait le contenu hors écran. On force le layout correct. */
@media (min-width: 769px){
  nav.sidebar, .sidebar{
    position: fixed !important;
    top: 0; left: 0;
    height: 100vh !important;
    z-index: 100;
  }
  body > .page-wrap,
  body > .content,
  body > main,
  body > .main-content{
    margin-left: var(--sidebar-w, 240px) !important;
  }
}
