:root {
  /* Apple-inspired light — SF grays + system blue */
  --background: 240 5% 96%;
  --foreground: 240 6% 10%;
  --card: 0 0% 100%;
  --card-foreground: 240 6% 10%;
  --popover: 0 0% 100%;
  --popover-foreground: 240 6% 10%;
  --primary: 211 100% 45%;
  --primary-foreground: 0 0% 100%;
  --secondary: 240 5% 93%;
  --secondary-foreground: 240 6% 10%;
  --muted: 240 5% 94%;
  --muted-foreground: 240 4% 46%;
  --accent: 240 5% 93%;
  --accent-foreground: 240 6% 10%;
  --destructive: 3 100% 59%;
  --destructive-foreground: 0 0% 100%;
  --border: 240 6% 88%;
  --input: 240 6% 88%;
  --ring: 211 100% 45%;
  --radius: 0.75rem;

  /* Soft Apple-like elevation */
  --shadow-xs: 0 1px 2px hsl(240 6% 10% / 0.04);
  --shadow-sm: 0 1px 3px hsl(240 6% 10% / 0.06), 0 1px 2px hsl(240 6% 10% / 0.04);
  --shadow-md: 0 4px 14px hsl(240 6% 10% / 0.08), 0 2px 4px hsl(240 6% 10% / 0.04);
  --shadow-lg: 0 12px 32px hsl(240 6% 10% / 0.1), 0 4px 10px hsl(240 6% 10% / 0.05);
  --shadow-border: 0 0 0 1px hsl(var(--border) / 0.8), var(--shadow-sm);
  --wa-dialog-z: 9999;
}

.dark {
  /* Apple iOS/macOS dark — system background + elevated surfaces */
  --background: 0 0% 0%;
  --foreground: 0 0% 98%;
  --card: 240 5% 11%;
  --card-foreground: 0 0% 98%;
  --popover: 240 5% 13%;
  --popover-foreground: 0 0% 98%;
  --primary: 211 100% 50%;
  --primary-foreground: 0 0% 100%;
  --secondary: 240 4% 16%;
  --secondary-foreground: 0 0% 98%;
  --muted: 240 4% 14%;
  --muted-foreground: 240 5% 62%;
  --accent: 240 4% 16%;
  --accent-foreground: 0 0% 98%;
  --destructive: 3 100% 61%;
  --destructive-foreground: 0 0% 100%;
  --border: 240 4% 18%;
  --input: 240 4% 16%;
  --ring: 211 100% 50%;

  --shadow-xs: 0 1px 0 hsl(0 0% 100% / 0.04);
  --shadow-sm: 0 2px 8px hsl(0 0% 0% / 0.45), 0 0 0 0.5px hsl(0 0% 100% / 0.08);
  --shadow-md: 0 8px 24px hsl(0 0% 0% / 0.5), 0 0 0 0.5px hsl(0 0% 100% / 0.1);
  --shadow-lg: 0 20px 50px hsl(0 0% 0% / 0.55), 0 0 0 0.5px hsl(0 0% 100% / 0.12);
  --shadow-border: 0 0 0 0.5px hsl(0 0% 100% / 0.12), var(--shadow-sm);
  --borderColor: hsl(240 4% 18% / 0.95);
}

html {
  direction: rtl;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', 'Tahoma', 'Geneva', 'Verdana', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Light theme: soft Apple gray wash */
html:not(.dark) body {
  background-image: radial-gradient(
    ellipse 100% 60% at 50% -10%,
    hsl(240 8% 92% / 0.9),
    transparent 55%
  );
}

/* Dark theme: deep black with faint gray lift */
html.dark body {
  background-image:
    radial-gradient(
      ellipse 120% 70% at 50% -18%,
      hsl(240 4% 14% / 0.55),
      transparent 58%
    ),
    radial-gradient(
      ellipse 70% 45% at 100% 100%,
      hsl(240 4% 10% / 0.4),
      transparent 52%
    );
}

/* Light theme: soft shadows on bordered surfaces */
html:not(.dark) .bg-card.border,
html:not(.dark) aside.bg-card,
html:not(.dark) section.bg-card {
  border-color: hsl(var(--border) / 0.7) !important;
  box-shadow: var(--shadow-sm);
}

html:not(.dark) .rounded-2xl.border,
html:not(.dark) .rounded-xl.border {
  box-shadow: var(--shadow-md);
}

html:not(.dark) header.border-b,
html:not(.dark) .border-b {
  border-bottom-color: hsl(var(--border) / 0.65) !important;
}

html:not(.dark) header.sticky,
html:not(.dark) header.shrink-0 {
  box-shadow: var(--shadow-xs);
}

html:not(.dark) input,
html:not(.dark) textarea,
html:not(.dark) select {
  border-color: hsl(var(--border) / 0.75) !important;
  box-shadow: var(--shadow-xs);
  background-color: hsl(0 0% 100%);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

html:not(.dark) input:focus,
html:not(.dark) textarea:focus,
html:not(.dark) select:focus {
  outline: none;
  border-color: hsl(var(--ring) / 0.45) !important;
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.12), var(--shadow-xs);
}

html:not(.dark) button.border,
html:not(.dark) .border.rounded-lg {
  box-shadow: var(--shadow-xs);
}

html:not(.dark) .divide-y > :not([hidden]) ~ :not([hidden]) {
  border-color: hsl(var(--border) / 0.55);
}

html:not(.dark) .hover\:bg-muted:hover {
  box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.4);
}

/* Dark theme: stronger borders + gray elevation */
html.dark .bg-card.border,
html.dark aside.bg-card,
html.dark section.bg-card {
  border-color: hsl(var(--border) / 0.95) !important;
  box-shadow: var(--shadow-sm);
}

html.dark .rounded-2xl.border,
html.dark .rounded-xl.border {
  border-color: hsl(var(--border) / 0.95) !important;
  box-shadow: var(--shadow-md);
}

html.dark header.border-b,
html.dark .border-b {
  border-bottom-color: hsl(var(--border) / 0.85) !important;
}

html.dark header.sticky,
html.dark header.shrink-0 {
  box-shadow: var(--shadow-xs);
  border-bottom-color: hsl(var(--border) / 0.9) !important;
}

html.dark aside.border-l,
html.dark aside.border-r,
html.dark .border-l,
html.dark .border-r,
html.dark .border-s,
html.dark .border-e {
  border-color: hsl(var(--border) / 0.85) !important;
}

html.dark input,
html.dark textarea,
html.dark select {
  border-color: hsl(var(--border) / 0.9) !important;
  box-shadow: var(--shadow-xs);
  background-color: hsl(var(--input) / 0.55);
  transition: box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

html.dark input:focus,
html.dark textarea:focus,
html.dark select:focus {
  outline: none;
  border-color: hsl(var(--ring) / 0.55) !important;
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.18), var(--shadow-xs);
  background-color: hsl(var(--card));
}

html.dark button.border,
html.dark .border.rounded-lg,
html.dark .border.rounded-xl,
html.dark .border.rounded-2xl {
  border-color: hsl(var(--border) / 0.9) !important;
  box-shadow: var(--shadow-xs);
}

html.dark .divide-y > :not([hidden]) ~ :not([hidden]) {
  border-color: hsl(var(--border) / 0.85);
}

/* Dark mode tables — clearer headers, rows, and hover */
html.dark table {
  border-color: hsl(var(--border) / 0.9);
}

html.dark thead,
html.dark thead.bg-muted\/50,
html.dark .bg-muted\/50 {
  background-color: hsl(var(--muted) / 0.95) !important;
}

html.dark thead th {
  color: hsl(var(--foreground) / 0.92);
  font-weight: 600;
  border-bottom: 1px solid hsl(var(--border) / 0.95);
  letter-spacing: 0.01em;
}

html.dark tbody td {
  color: hsl(var(--foreground) / 0.9);
  border-color: hsl(var(--border) / 0.75);
}

html.dark tbody tr,
html.dark tbody tr.border-t {
  border-top-color: hsl(var(--border) / 0.8) !important;
}

html.dark tbody tr:nth-child(even) {
  background-color: hsl(0 0% 100% / 0.03);
}

html.dark tbody tr:hover,
html.dark tbody tr.hover\:bg-muted\/30:hover {
  background-color: hsl(0 0% 100% / 0.07) !important;
}

html.dark tbody .text-muted-foreground,
html.dark thead.text-muted-foreground,
html.dark thead .text-muted-foreground {
  color: hsl(var(--muted-foreground));
}

html.dark table .font-mono {
  color: hsl(var(--foreground) / 0.85);
}

html.dark .hover\:bg-muted:hover {
  box-shadow: inset 0 0 0 1px hsl(var(--border) / 0.55);
}

html.dark .shadow-card {
  box-shadow: var(--shadow-sm);
}

html.dark .shadow-elevated,
html.dark .shadow-lg {
  box-shadow: var(--shadow-md);
}

html.dark ::-webkit-scrollbar-thumb {
  background: hsl(0 0% 100% / 0.18);
}

html.dark ::-webkit-scrollbar-thumb:hover {
  background: hsl(0 0% 100% / 0.28);
}

/* Token utility classes (to keep the existing design classes working) */
.bg-background {
  background-color: hsl(var(--background));
}

.text-foreground {
  color: hsl(var(--foreground));
}

.bg-card {
  background-color: hsl(var(--card));
}

.text-card-foreground {
  color: hsl(var(--card-foreground));
}

.bg-muted {
  background-color: hsl(var(--muted));
}

.text-muted-foreground {
  color: hsl(var(--muted-foreground));
}

.bg-primary {
  background-color: hsl(var(--primary));
}

.text-primary {
  color: hsl(var(--primary));
}

.text-primary-foreground {
  color: hsl(var(--primary-foreground));
}

.bg-secondary {
  background-color: hsl(var(--secondary));
}

.border-border {
  border-color: hsl(var(--border));
}

.shadow-card {
  box-shadow: var(--shadow-sm);
}

.shadow-elevated {
  box-shadow: var(--shadow-md);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: hsl(var(--muted));
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--muted-foreground) / 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--muted-foreground) / 0.5);
}

html:not(.dark) ::-webkit-scrollbar-thumb {
  background: hsl(var(--muted-foreground) / 0.22);
}

/* Animations from original app */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

.animate-slide-in {
  animation: slideIn 0.3s ease-out forwards;
}

/* Status indicators */
.status-online {
  background-color: #22c55e;
  box-shadow: 0 0 0 2px hsl(var(--background));
}

.status-offline {
  background-color: #ef4444;
  box-shadow: 0 0 0 2px hsl(var(--background));
}

.status-warning {
  background-color: #f59e0b;
  box-shadow: 0 0 0 2px hsl(var(--background));
}

/* Themed dialogs (waAlert / waConfirm / waPrompt) */
.wa-dialog-root {
  position: fixed;
  inset: 0;
  z-index: var(--wa-dialog-z, 9999);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.wa-dialog-root--open {
  pointer-events: auto;
  opacity: 1;
}

.wa-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: hsl(240 6% 10% / 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dark .wa-dialog-backdrop {
  background: hsl(0 0% 0% / 0.62);
}

.wa-dialog-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border) / 0.75);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.2s ease;
}

.dark .wa-dialog-panel {
  border-color: hsl(var(--border) / 0.95);
  box-shadow: var(--shadow-lg);
}

.wa-dialog-root--open .wa-dialog-panel {
  transform: translateY(0) scale(1);
}

.wa-dialog-header {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin-bottom: 0.75rem;
}

.wa-dialog-icon {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wa-dialog-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.wa-dialog-icon--info {
  background: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
}

.wa-dialog-icon--success {
  background: hsl(145 63% 42% / 0.14);
  color: hsl(145 63% 36%);
}

.wa-dialog-icon--warning {
  background: hsl(38 92% 50% / 0.14);
  color: hsl(32 95% 44%);
}

.wa-dialog-icon--error {
  background: hsl(var(--destructive) / 0.12);
  color: hsl(var(--destructive));
}

.wa-dialog-icon--confirm {
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

.wa-dialog-title-wrap {
  flex: 1;
  min-width: 0;
  padding-top: 0.125rem;
}

.wa-dialog-title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

.wa-dialog-message {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
  white-space: pre-wrap;
  margin: 0 0 1rem;
}

.wa-dialog-message--indented {
  margin-right: 3.375rem;
}

.wa-dialog-field {
  margin-bottom: 1rem;
}

.wa-dialog-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  color: hsl(var(--foreground));
}

.wa-dialog-input,
.wa-dialog-textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.9375rem;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wa-dialog-input:focus,
.wa-dialog-textarea:focus {
  border-color: hsl(var(--ring) / 0.45);
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.12), var(--shadow-xs);
}

.wa-dialog-textarea {
  min-height: 5rem;
  resize: vertical;
}

.wa-dialog-actions {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
}

.wa-profile-panel {
  max-width: 28rem;
  max-height: min(92vh, 40rem);
  overflow-y: auto;
}
.wa-profile-form .wa-dialog-field {
  margin-bottom: 0.75rem;
}
.wa-profile-form .wa-dialog-input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.wa-profile-form .dir-ltr {
  direction: ltr;
  text-align: left;
}
.wa-profile-error {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: hsl(var(--destructive));
}
.wa-profile-form .wa-dialog-actions {
  margin-top: 0.25rem;
}

.wa-dialog-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.wa-dialog-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px hsl(var(--ring) / 0.25);
}

.wa-dialog-btn--primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.wa-dialog-btn--primary:hover {
  opacity: 0.92;
}

.wa-dialog-btn--destructive {
  background: hsl(var(--destructive));
  color: hsl(var(--destructive-foreground));
}

.wa-dialog-btn--destructive:hover {
  opacity: 0.92;
}

.wa-dialog-btn--ghost {
  background: transparent;
  color: hsl(var(--foreground));
  border-color: hsl(var(--border));
}

.wa-dialog-btn--ghost:hover {
  background: hsl(var(--muted));
}

html.wa-dialog-open,
html.wa-dialog-open body {
  overflow: hidden;
}

/* ---- Notifications (bell + toast) ---- */
.wa-toast-host {
  position: fixed;
  top: 1rem;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10050;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(24rem, calc(100vw - 1.5rem));
  pointer-events: none;
}

@media (max-width: 639px) {
  .wa-toast-host {
    top: auto;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    flex-direction: column-reverse;
  }
  .wa-toast {
    animation-name: waToastInMobile;
  }
  .wa-toast--out {
    animation-name: waToastOutMobile;
  }
}

.wa-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  box-shadow: var(--shadow-lg);
  animation: waToastIn 0.22s ease-out;
}

.wa-toast--out {
  animation: waToastOut 0.18s ease-in forwards;
}

.wa-toast__icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.1rem;
}

.wa-toast--success .wa-toast__icon { color: #16a34a; }
.wa-toast--error .wa-toast__icon { color: #dc2626; }
.wa-toast--warning .wa-toast__icon { color: #d97706; }
.wa-toast--info .wa-toast__icon { color: hsl(var(--primary)); }

.wa-toast__body {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  line-height: 1.4;
}

.wa-notif-wrap {
  position: relative;
}

.wa-notif-btn {
  position: relative;
  padding: 0.5rem;
  border-radius: 0.5rem;
  color: hsl(var(--foreground));
}

.wa-notif-btn:hover {
  background: hsl(var(--muted));
}

.wa-notif-badge {
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.25rem;
  border-radius: 9999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.05rem;
  text-align: center;
  box-shadow: 0 0 0 2px hsl(var(--background));
}

.wa-notif-panel {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(28rem, 70vh);
  display: flex;
  flex-direction: column;
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border));
  border-radius: 0.75rem;
  box-shadow: var(--shadow-lg);
  z-index: 80;
  overflow: hidden;
}

.wa-notif-panel[hidden] {
  display: none !important;
}

.wa-notif-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid hsl(var(--border) / 0.85);
}

.wa-notif-panel__title {
  font-size: 0.9rem;
  font-weight: 600;
}

.wa-notif-panel__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.wa-notif-panel__actions button {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  color: hsl(var(--primary));
}

.wa-notif-panel__actions button:hover {
  background: hsl(var(--muted));
}

.wa-notif-list {
  overflow-y: auto;
  flex: 1;
}

.wa-notif-empty {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
}

.wa-notif-item {
  display: block;
  width: 100%;
  text-align: start;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid hsl(var(--border) / 0.55);
  transition: background 0.15s ease;
}

.wa-notif-item:hover {
  background: hsl(var(--muted) / 0.55);
}

.wa-notif-item--unread {
  background: hsl(var(--primary) / 0.06);
}

.wa-notif-item__row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.wa-notif-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  margin-top: 0.35rem;
  flex-shrink: 0;
  background: hsl(var(--muted-foreground) / 0.35);
}

.wa-notif-dot--warning { background: #d97706; }
.wa-notif-dot--error { background: #dc2626; }
.wa-notif-dot--success { background: #16a34a; }
.wa-notif-dot--info { background: hsl(var(--primary)); }

.wa-notif-item__title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
}

.wa-notif-item__body {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.15rem;
  line-height: 1.4;
}

.wa-notif-item__time {
  font-size: 0.68rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.35rem;
}

@keyframes waToastIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes waToastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-6px); }
}

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

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

.border, .border-t, .border-r, .border-b, .border-l {
  border-color: rgba(0, 0, 0, 0.1) !important;
}
/* Sidebar: slightly denser nav items */
#sidebar .sidebar-nav-link {
  gap: 0.5rem;
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem;
}
#sidebar .sidebar-nav-link svg {
  width: 1rem;
  height: 1rem;
}
#sidebar .sidebar-label {
  font-size: 0.8125rem;
  line-height: 1.25rem;
}
#sidebar .border-t button {
  gap: 0.5rem;
  padding: 0.375rem 0.625rem;
}
#sidebar .border-t button .text-sm {
  font-size: 0.8125rem;
  line-height: 1.25rem;
}
#sidebar .border-t button svg {
  width: 1rem;
  height: 1rem;
}

/* Mobile drawer: larger, easier-to-tap nav + sticky logout */
#mobileMenu .sidebar-group {
  margin-bottom: 0.75rem;
}
#mobileMenu .sidebar-group-label {
  font-size: 0.75rem !important;
  letter-spacing: 0.04em;
  padding: 0.35rem 1rem 0.5rem !important;
  opacity: 0.9;
}
#mobileMenu .sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
#mobileMenu .sidebar-nav-link {
  gap: 0.75rem;
  min-height: 3.25rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
}
#mobileMenu .sidebar-nav-link svg {
  width: 1.375rem;
  height: 1.375rem;
}
#mobileMenu .sidebar-label {
  font-size: 1rem !important;
  font-weight: 600;
  line-height: 1.4;
}
#mobileMenu .mobile-menu-action {
  min-height: 3.25rem;
}
#mobileMenu [data-mobile-user] #mobileUserMenuBtn.is-open .mobile-user-chevron {
  transform: rotate(180deg);
}
#mobileMenu [data-mobile-user] .mobile-user-chevron {
  transition: transform 0.15s ease;
}

/* Sidebar: fixed viewport height on desktop */
@media (min-width: 1024px) {
  #sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    align-self: flex-start;
    overflow: hidden;
  }

  #sidebar #sidebarNav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
}
