/* ============================================================================
   DaCucina — Navigation sidebar (dc-sidebar) 2026-09-24
   Scope: everything lives under .sidebar.dc-sidebar / .dc-sb-tip / .dc-qs /
   .dc-sb-backdrop. Loaded AFTER styles.css so equal-specificity rules win.
   Markup ids/classes the app relies on are untouched: .nav-item[data-view],
   .nav-badge#badge-*, #nav-whatsapp, #current-user-chip, #user-avatar,
   #current-user-name, #current-user-role, #logout-btn, .sidebar.mobile-open,
   body.sidebar-open.
   ============================================================================ */

.sidebar.dc-sidebar {
  --sb-bg: #F7F5F0;
  --sb-surface: #FFFEFC;
  --sb-text: #292621;
  --sb-text2: #756D63;
  --sb-border: #E5DDD2;
  --sb-bronze: #A78053;
  --sb-bronze-soft: rgba(167, 128, 83, 0.14);
  --sb-hover: #EEE9E0;
  --sb-active: #2B2724;
  --sb-active-text: #F7F3EC;
  --sb-badge-bg: #E9E3D9;
  --sb-badge-text: #5F564C;
  --sb-alert: #C2410C;
  --sb-w: 272px;
  --sb-wc: 76px;
  --sb-t: 170ms;
  --sb-tc: 220ms;
  --sb-ease: cubic-bezier(0.4, 0, 0.2, 1);

  width: var(--sb-w);
  min-width: 0;
  background: var(--sb-bg);
  border-left: 1px solid var(--sb-border);
  color: var(--sb-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
  transition: width var(--sb-tc) var(--sb-ease);
  will-change: width;
}
.sidebar.dc-sidebar.dc-sb--collapsed { width: var(--sb-wc); }

body.dark .sidebar.dc-sidebar {
  --sb-bg: #161922;
  --sb-surface: #1c2030;
  --sb-text: #f5f1ea;
  --sb-text2: #b3ada1;
  --sb-border: rgba(245, 241, 234, 0.10);
  --sb-bronze: #c89d6b;
  --sb-bronze-soft: rgba(200, 157, 107, 0.16);
  --sb-hover: #222737;
  --sb-active: #f2ede4;
  --sb-active-text: #1a1713;
  --sb-badge-bg: #2a3045;
  --sb-badge-text: #d3cdc1;
  --sb-alert: #fb923c;
}

/* ---------- head: logo + collapse ---------- */
.dc-sb__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--sb-border);
  min-height: 64px;
}
.dc-sb__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 0;
  background: none;
  padding: 4px;
  border-radius: 8px;
  cursor: pointer;
  color: inherit;
  transition: background var(--sb-t) var(--sb-ease), transform var(--sb-t) var(--sb-ease);
}
.dc-sb__brand:hover { background: var(--sb-hover); }
.dc-sb__brand:active { transform: scale(0.985); }
.dc-sb__logo { height: 32px; width: auto; display: block; }
body.dark .dc-sb__logo { filter: invert(1) hue-rotate(180deg) brightness(1.05); }
.dc-sb__mono {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--sb-active);
  color: var(--sb-active-text);
  font-family: 'Cormorant Garamond', 'Frank Ruhl Libre', Georgia, serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.04em;
  align-items: center;
  justify-content: center;
  direction: ltr;
}
.dc-sb__mono b { color: var(--sb-bronze); font-weight: 500; }

.dc-sb__toggle,
.dc-sb__close {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--sb-border);
  background: var(--sb-surface);
  color: var(--sb-text2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--sb-t) var(--sb-ease), color var(--sb-t) var(--sb-ease), border-color var(--sb-t) var(--sb-ease), transform var(--sb-t) var(--sb-ease);
}
.dc-sb__toggle i, .dc-sb__close i { font-size: 18px; }
.dc-sb__toggle:hover, .dc-sb__close:hover { background: var(--sb-hover); color: var(--sb-bronze); border-color: var(--sb-bronze); }
.dc-sb__toggle:active, .dc-sb__close:active { transform: scale(0.94); }
.dc-sb__close { display: none; }

/* ---------- search trigger ---------- */
.dc-sb__search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 12px 4px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--sb-border);
  border-radius: 10px;
  background: var(--sb-surface);
  color: var(--sb-text2);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: right;
  transition: border-color var(--sb-t) var(--sb-ease), background var(--sb-t) var(--sb-ease), color var(--sb-t) var(--sb-ease), transform var(--sb-t) var(--sb-ease);
}
.dc-sb__search i { font-size: 18px; flex-shrink: 0; }
.dc-sb__search > span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-sb__search:hover { border-color: var(--sb-bronze); color: var(--sb-text); }
.dc-sb__search:active { transform: scale(0.99); }
.dc-sb__kbd {
  flex-shrink: 0;
  font-family: inherit;
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: 0.02em;
  padding: 3px 6px;
  border: 1px solid var(--sb-border);
  border-radius: 5px;
  background: var(--sb-bg);
  color: var(--sb-text2);
  direction: ltr;
}

/* ---------- nav ---------- */
.dc-sidebar .sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 10px 12px;
  gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--sb-border) transparent;
}
.dc-sidebar .sidebar-nav::-webkit-scrollbar { width: 6px; }
.dc-sidebar .sidebar-nav::-webkit-scrollbar-thumb { background: var(--sb-border); border-radius: 6px; }

.dc-sidebar .nav-section { display: flex; flex-direction: column; gap: 0; }
.dc-sidebar .nav-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 6px 0 2px;
  padding: 6px 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--sb-text2);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  cursor: pointer;
  text-align: right;
  transition: background var(--sb-t) var(--sb-ease), color var(--sb-t) var(--sb-ease);
}
.dc-sidebar .nav-section-title:hover { background: var(--sb-hover); color: var(--sb-text); }
.dc-sidebar .nav-section-title i {
  font-size: 14px;
  transition: transform 200ms var(--sb-ease);
}
.dc-sidebar .nav-section-title[aria-expanded="false"] i { transform: rotate(-90deg); }

.dc-sidebar .nav-section-items {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 200ms var(--sb-ease);
}
.dc-sidebar .nav-section.is-folded .nav-section-items { grid-template-rows: 0fr; }
.dc-sidebar .nav-section-inner { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.dc-sidebar .nav-section.is-folded .nav-section-inner > * { visibility: hidden; }

.dc-sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--sb-text);
  font-size: 14.5px;
  font-weight: 400;
  line-height: 1.2;
  cursor: pointer;
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--sb-t) var(--sb-ease), color var(--sb-t) var(--sb-ease), transform 120ms var(--sb-ease);
}
.dc-sidebar .nav-item > i {
  font-size: 20px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  opacity: 1;
  color: var(--sb-text2);
  transition: color var(--sb-t) var(--sb-ease), transform var(--sb-t) var(--sb-ease);
}
.dc-sidebar .nav-item > span:not(.nav-badge):not(.tasks-nav-badge) {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dc-sidebar .nav-item:hover { background: var(--sb-hover); color: var(--sb-text); }
.dc-sidebar .nav-item:hover > i { color: var(--sb-bronze); transform: translateY(-1px); }
.dc-sidebar .nav-item:active { transform: scale(0.985); }

.dc-sidebar .nav-item.active {
  background: var(--sb-active);
  color: var(--sb-active-text);
  font-weight: 500;
}
.dc-sidebar .nav-item.active > i { color: var(--sb-active-text); opacity: 1; }
.dc-sidebar .nav-item.active::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 58%;
  background: var(--sb-bronze);
  border-radius: 0 3px 3px 0;
}
.dc-sidebar .nav-item:focus-visible,
.dc-sidebar .nav-section-title:focus-visible,
.dc-sb__search:focus-visible,
.dc-sb__toggle:focus-visible,
.dc-sb__close:focus-visible,
.dc-sb__brand:focus-visible,
.dc-sidebar .user-chip:focus-visible,
.dc-sidebar .logout-btn:focus-visible {
  outline: 2px solid var(--sb-bronze);
  outline-offset: 2px;
}
.dc-sidebar .nav-item:focus { outline: none; }
.dc-sidebar .nav-item:focus-visible { outline: 2px solid var(--sb-bronze); }

/* counters: neutral, small; hidden while 0 / unknown */
.dc-sidebar .nav-badge,
.dc-sidebar .tasks-nav-badge {
  flex: 0 0 auto;
  background: var(--sb-badge-bg);
  color: var(--sb-badge-text);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 16px;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.dc-sidebar .nav-badge.is-empty { display: none !important; }
.dc-sidebar .nav-item.active .nav-badge { background: rgba(255, 255, 255, 0.16); color: var(--sb-active-text); }
body.dark .dc-sidebar .nav-item.active .nav-badge { background: rgba(0, 0, 0, 0.12); }

/* ---------- footer ---------- */
.dc-sidebar .sidebar-footer { padding: 10px; border-top: 1px solid var(--sb-border); }
.dc-sidebar .user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 12px;
  background: var(--sb-surface);
  border: 1px solid var(--sb-border);
  cursor: pointer;
  transition: border-color var(--sb-t) var(--sb-ease), background var(--sb-t) var(--sb-ease), transform var(--sb-t) var(--sb-ease);
}
.dc-sidebar .user-chip:hover { border-color: var(--sb-bronze); background: var(--sb-surface); }
.dc-sidebar .user-chip:active { transform: scale(0.99); }
.dc-sidebar .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sb-active);
  color: var(--sb-active-text);
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--sb-bronze-soft);
}
.dc-sidebar .user-name { font-size: 13.5px; font-weight: 500; color: var(--sb-text); }
.dc-sidebar .user-role { font-size: 11px; color: var(--sb-bronze); letter-spacing: 0.02em; }
.dc-sidebar .logout-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--sb-text2);
  background: none;
  border: 0;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--sb-t) var(--sb-ease), color var(--sb-t) var(--sb-ease), transform var(--sb-t) var(--sb-ease);
}
.dc-sidebar .logout-btn:hover { background: rgba(194, 65, 12, 0.10); color: var(--sb-alert); }
.dc-sidebar .logout-btn:active { transform: scale(0.94); }
.dc-sidebar .logout-btn i { font-size: 17px; }

/* ---------- collapsed rail (desktop only) ---------- */
.dc-sb--collapsed .dc-sb__head { flex-direction: column; padding: 12px 8px 10px; gap: 8px; }
.dc-sb--collapsed .dc-sb__logo { display: none; }
.dc-sb--collapsed .dc-sb__mono { display: inline-flex; }
.dc-sb--collapsed .dc-sb__brand { padding: 2px; }
.dc-sb--collapsed .dc-sb__search { margin: 10px auto 4px; width: 44px; height: 40px; padding: 0; justify-content: center; }
.dc-sb--collapsed .dc-sb__search > span, .dc-sb--collapsed .dc-sb__kbd { display: none; }
.dc-sb--collapsed .sidebar-nav { padding: 6px 6px 10px; }
.dc-sb--collapsed .nav-section-title { display: none; }
.dc-sb--collapsed .nav-section-items { grid-template-rows: 1fr !important; }
.dc-sb--collapsed .nav-section.is-folded .nav-section-inner > * { visibility: visible; }
.dc-sb--collapsed .nav-section { padding-top: 6px; margin-top: 4px; border-top: 1px solid var(--sb-border); }
.dc-sb--collapsed .nav-section.dc-first { border-top: 0; margin-top: 0; padding-top: 0; }
.dc-sb--collapsed .nav-section-inner { align-items: center; }
.dc-sb--collapsed .nav-item {
  width: 48px;
  min-height: 44px;
  padding: 0;
  justify-content: center;
  gap: 0;
}
.dc-sb--collapsed .nav-item > span:not(.nav-badge):not(.tasks-nav-badge) { display: none; }
.dc-sb--collapsed .nav-item > i { width: auto; }
.dc-sb--collapsed .nav-item.active::before { right: -6px; height: 50%; }
.dc-sb--collapsed .nav-badge,
.dc-sb--collapsed .tasks-nav-badge {
  position: absolute;
  top: 5px;
  left: 6px;
  margin: 0 !important;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  padding: 0 4px !important;
  font-size: 9.5px !important;
  border: 1px solid var(--sb-border);
  box-shadow: 0 0 0 2px var(--sb-bg);
}
.dc-sb--collapsed .sidebar-footer { padding: 8px 6px; }
.dc-sb--collapsed .user-chip { flex-direction: column; gap: 6px; padding: 8px 4px; border-radius: 12px; }
.dc-sb--collapsed .user-info { display: none; }

/* ---------- tooltip (collapsed rail) ---------- */
.dc-sb-tip {
  position: fixed;
  z-index: 3000;
  max-width: 260px;
  padding: 7px 11px;
  border-radius: 8px;
  background: #2B2724;
  color: #F7F3EC;
  font-family: var(--font-sans, inherit);
  font-size: 12.5px;
  line-height: 1.25;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(41, 38, 33, 0.22);
  opacity: 0;
  transform: translate(6px, -50%);
  transition: opacity 150ms ease, transform 150ms ease;
  direction: rtl;
}
.dc-sb-tip.show { opacity: 1; transform: translate(0, -50%); }
.dc-sb-tip::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: translateY(-50%) rotate(45deg);
  border-radius: 2px;
}
.dc-sb-tip b { font-weight: 600; color: #E3C9A4; margin-inline-start: 6px; }
body.dark .dc-sb-tip { background: #f2ede4; color: #1a1713; }
body.dark .dc-sb-tip b { color: #8a6236; }

/* ---------- quick search (Ctrl/Cmd+K) ---------- */
.dc-qs {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 16px 16px;
  direction: rtl;
}
.dc-qs.open { display: flex; }
.dc-qs__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(41, 38, 33, 0.38);
  opacity: 0;
  transition: opacity 160ms ease;
}
.dc-qs.open .dc-qs__backdrop { opacity: 1; }
.dc-qs__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 78vh;
  display: flex;
  flex-direction: column;
  background: #FFFEFC;
  color: #292621;
  border: 1px solid #E5DDD2;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(41, 38, 33, 0.25);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease;
  font-family: var(--font-sans, inherit);
}
.dc-qs.open .dc-qs__panel { opacity: 1; transform: none; }
.dc-qs__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #E5DDD2;
}
.dc-qs__row > i { font-size: 20px; color: #A78053; flex-shrink: 0; }
.dc-qs__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
}
.dc-qs__input::placeholder { color: #9A9186; }
.dc-qs__clear {
  border: 0;
  background: none;
  color: #756D63;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: none;
  align-items: center;
  justify-content: center;
}
.dc-qs__clear.show { display: inline-flex; }
.dc-qs__clear:hover { background: #EEE9E0; color: #292621; }
.dc-qs__esc { font-size: 11px; color: #756D63; border: 1px solid #E5DDD2; border-radius: 5px; padding: 3px 6px; flex-shrink: 0; }
.dc-qs__list { overflow-y: auto; padding: 6px; margin: 0; list-style: none; }
.dc-qs__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  color: #292621;
  transition: background 120ms ease;
}
.dc-qs__item > i { font-size: 20px; width: 24px; text-align: center; color: #756D63; flex-shrink: 0; }
.dc-qs__item .t { flex: 1; min-width: 0; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-qs__item .g { font-size: 12px; color: #756D63; flex-shrink: 0; }
.dc-qs__item .b { font-size: 10.5px; font-weight: 600; background: #E9E3D9; color: #5F564C; border-radius: 999px; padding: 1px 7px; flex-shrink: 0; }
.dc-qs__item:hover, .dc-qs__item[aria-selected="true"] { background: #EEE9E0; }
.dc-qs__item[aria-selected="true"] > i { color: #A78053; }
.dc-qs__item mark { background: rgba(167, 128, 83, 0.22); color: inherit; border-radius: 2px; padding: 0 1px; }
/* unified search (2026-09-24 tabs round): screens + business records, per-row "open in a new tab" */
.dc-qs__group { font-size: 11px; font-weight: 600; color: #756D63; padding: 8px 12px 2px; letter-spacing: .03em; }
.dc-qs__item--rec { align-items: flex-start; }
.dc-qs__item .rec { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dc-qs__item .rec .t { font-size: 14px; }
.dc-qs__item .rec small { display: block; font-size: 11.5px; color: #756D63; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-qs__item .rec small.m { font-size: 11px; color: #9A9186; }
.dc-qs__nt { width: 28px; height: 28px; flex-shrink: 0; border: 0; border-radius: 7px; background: transparent; color: #756D63; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity 120ms ease, background 120ms ease; }
.dc-qs__nt i { font-size: 16px; }
.dc-qs__item:hover .dc-qs__nt, .dc-qs__item[aria-selected="true"] .dc-qs__nt { opacity: 1; }
.dc-qs__nt:hover { background: rgba(167,128,83,.18); color: #A78053; }
.dc-qs__item--more { color: #756D63; font-size: 13px; }
.dc-qs__state { padding: 10px 14px; font-size: 12.5px; color: #756D63; display: flex; align-items: center; gap: 8px; }
.dc-qs__state--err { color: #C2410C; }
.dc-qs__state button { border: 1px solid #E5DDD2; background: #FFFEFC; border-radius: 6px; padding: 3px 10px; font: inherit; font-size: 12px; cursor: pointer; }
.dc-qs__spin { display: inline-block; color: #A78053; } /* static loader glyph: no endless animation (spec) */
body.dark .dc-qs__group, body.dark .dc-qs__item .rec small, body.dark .dc-qs__state, body.dark .dc-qs__nt { color: #b3ada1; }
body.dark .dc-qs__state button { background: #161922; color: #f5f1ea; border-color: rgba(245,241,234,.15); }
.dc-qs__empty { padding: 26px 16px; text-align: center; color: #756D63; font-size: 14px; }
.dc-qs__empty button {
  margin-top: 12px;
  border: 1px solid #E5DDD2;
  background: #FFFEFC;
  color: #292621;
  border-radius: 8px;
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.dc-qs__empty button:hover { border-color: #A78053; }
.dc-qs__hint {
  display: flex;
  gap: 14px;
  padding: 8px 14px;
  border-top: 1px solid #E5DDD2;
  color: #756D63;
  font-size: 11.5px;
}
.dc-qs__hint kbd { font-family: inherit; border: 1px solid #E5DDD2; border-radius: 4px; padding: 0 5px; margin-inline-end: 4px; background: #F7F5F0; }
body.dark .dc-qs__panel { background: #1c2030; color: #f5f1ea; border-color: rgba(245,241,234,.12); }
body.dark .dc-qs__row, body.dark .dc-qs__hint { border-color: rgba(245,241,234,.12); }
body.dark .dc-qs__item { color: #f5f1ea; }
body.dark .dc-qs__item:hover, body.dark .dc-qs__item[aria-selected="true"] { background: #232838; }
body.dark .dc-qs__item .g, body.dark .dc-qs__item > i, body.dark .dc-qs__empty, body.dark .dc-qs__hint, body.dark .dc-qs__esc { color: #b3ada1; }
body.dark .dc-qs__item .b { background: #2a3045; color: #d3cdc1; }
body.dark .dc-qs__hint kbd, body.dark .dc-qs__empty button { background: #161922; color: #f5f1ea; border-color: rgba(245,241,234,.15); }
body.dark .dc-qs__input::placeholder { color: #8a8578; }

/* ---------- mobile drawer (<=900px) ---------- */
.dc-sb-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(41, 38, 33, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.dc-sb-backdrop.show { opacity: 1; pointer-events: auto; }
@media (max-width: 900px) {
  body.sidebar-open::before { display: none; content: none; }
  body.sidebar-open { overflow: hidden; }
  .sidebar.dc-sidebar,
  .sidebar.dc-sidebar.dc-sb--collapsed {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    height: 100dvh;
    width: min(300px, 86vw);
    transform: translateX(105%);
    transition: transform 240ms var(--sb-ease);
    box-shadow: -8px 0 28px rgba(41, 38, 33, 0.18);
    z-index: 1200; /* above the mobile topbar (1001) so the drawer head is never covered */
    padding-top: env(safe-area-inset-top, 0px);
  }
  .dc-sb-backdrop { z-index: 1100; }
  .sidebar.dc-sidebar.mobile-open { transform: none; right: 0; }
  .dc-sb__toggle { display: none; }
  .dc-sb__close { display: inline-flex; }
  .dc-sb__kbd { display: none; }
  .dc-sidebar .nav-item { min-height: 46px; }
  .dc-sidebar .sidebar-footer { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .dc-qs { padding: 12px 12px 16px; }
  .dc-qs__panel { max-height: calc(100dvh - 28px); }
  .dc-qs__esc { display: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .sidebar.dc-sidebar,
  .dc-sidebar .nav-item,
  .dc-sidebar .nav-item > i,
  .dc-sidebar .nav-section-title i,
  .dc-sidebar .nav-section-items,
  .dc-sb__brand, .dc-sb__toggle, .dc-sb__close, .dc-sb__search,
  .dc-sidebar .user-chip, .dc-sidebar .logout-btn,
  .dc-sb-tip, .dc-qs__backdrop, .dc-qs__panel, .dc-qs__item, .dc-sb-backdrop {
    transition: none !important;
  }
  .dc-sidebar .nav-item:hover > i { transform: none; }
  .dc-sidebar .nav-item:active, .dc-sb__brand:active, .dc-sb__toggle:active, .dc-sb__search:active { transform: none; }
}
