/* =============================================================================
   App Layout: Sidebar + Top Bar
   =============================================================================
   CSS Grid layout with collapsible sidebar, slim top bar, and responsive
   mobile drawer. Activated by wrapping content in .app-layout.

   Design tokens:
     Sidebar width:    240px
     Top bar height:   48px
     Mobile breakpoint: 1024px (sidebar becomes overlay drawer)
   ============================================================================= */

/* ----------------------------------------------------------------------------
   Brand Color Variables (resolved from Sass variables)
   ---------------------------------------------------------------------------- */
:root {
  /* Brand palette — indigo/violet theme */
  --brand-primary: #4F46E5;
  --brand-primary-light: #6366F1;
  --brand-primary-dark: #4338CA;
  --brand-link: #0EA5E9;
  --brand-accent: #8B5CF6;
  --brand-success: #10B981;
  --brand-warning: #F59E0B;
  --brand-danger: #EF4444;
  --brand-info: #0EA5E9;
  --brand-dark: #1E293B;
  --brand-grey-darker: #334155;
  --brand-grey-dark: #64748B;
  --brand-grey: #94A3B8;
  --brand-grey-light: #E2E8F0;
  --brand-grey-lighter: #F1F5F9;
  --brand-white-ter: #F8FAFC;
  --brand-white-bis: #FAFBFC;
  /* Integration brand colors */
  --brand-clover: #4CAF50;
  --brand-quickbooks: #2CA01C;
  --sidebar-width: 240px;
  --topbar-height: 48px;
  --sidebar-z-index: 40;
  --topbar-z-index: 30;
  --overlay-z-index: 35;
  --sidebar-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-small: 3px;
  --control-radius: 4px;
  --box-radius: 6px;
  --radius-large: 8px;
  --radius-rounded: 12px;
  --radius-pill: 9999px;
}

/* ----------------------------------------------------------------------------
   Global Base Styles
   ---------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

main.section {
  flex: 1;
}

/* Support light and dark mode */
:root {
  color-scheme: light dark;
}

/* Fix [hidden] attribute */
[hidden] {
  display: none !important;
}

/* ----------------------------------------------------------------------------
   CSS Grid Container
   ---------------------------------------------------------------------------- */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--topbar-height) 1fr auto;
  grid-template-areas:
    "sidebar topbar"
    "sidebar main"
    "sidebar footer";
  min-height: 100vh;
  width: 100%;
}

/* ----------------------------------------------------------------------------
   Sidebar
   ---------------------------------------------------------------------------- */
.app-sidebar {
  grid-area: sidebar;
  width: var(--sidebar-width);
  background: white;
  border-right: 1px solid var(--brand-grey-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: var(--sidebar-z-index);
  transition: width var(--sidebar-transition);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-grey-light) transparent;
}

.app-sidebar::-webkit-scrollbar {
  width: 4px;
}

.app-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.app-sidebar::-webkit-scrollbar-thumb {
  background: var(--brand-grey-light);
  border-radius: 2px;
}

.app-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--brand-grey);
}

/* Sidebar header (logo area) */
.sidebar-header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  height: var(--topbar-height);
  border-bottom: 1px solid var(--brand-grey-lighter);
  flex-shrink: 0;
}

.sidebar-header .sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--brand-dark);
}

.sidebar-header .sidebar-logo-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-header .sidebar-logo-icon img,
.sidebar-header .sidebar-logo-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar-header .sidebar-logo-icon .icon {
  font-size: 1.25rem;
  color: var(--brand-primary);
}

.sidebar-header .sidebar-logo-text {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  transition: opacity 0.2s ease, width 0.2s ease;
}

/* Company/Location context block */
.sidebar-context {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.625rem 1rem;
  margin: 0.5rem 0.75rem;
  background: var(--brand-white-ter);
  border-radius: var(--box-radius);
}

.sidebar-context__company {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--brand-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-context__location {
  font-size: 0.7rem;
  color: var(--brand-grey-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* Navigation groups */
.sidebar-nav {
  flex: 1;
  padding: 0.5rem 0;
  overflow-y: auto;
}

.sidebar-group {
  padding: 0.25rem 0;
}

.sidebar-group + .sidebar-group {
  border-top: 1px solid var(--brand-grey-lighter);
  margin-top: 0.25rem;
  padding-top: 0.5rem;
}

.sidebar-group-label {
  padding: 0.375rem 1.25rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-grey);
  white-space: nowrap;
  transition: opacity 0.2s ease, width 0.2s ease;
}

/* Navigation items */
.sidebar-nav-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  margin: 1px 0.5rem;
  border-radius: var(--control-radius);
  color: var(--brand-grey-darker);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  position: relative;
  cursor: pointer;
  white-space: nowrap;
  border-left: 3px solid transparent;
}

.sidebar-nav-item:hover {
  background: var(--brand-white-ter);
  color: var(--brand-dark);
}

.sidebar-nav-item:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: -2px;
}

.sidebar-nav-item.is-active {
  background: rgba(79, 70, 229, 0.08);
  color: var(--brand-primary);
  border-left-color: var(--brand-primary);
  font-weight: 600;
}

.sidebar-nav-item.is-active .sidebar-nav-icon {
  color: var(--brand-primary);
}

.sidebar-nav-icon {
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  font-size: 0.9rem;
  color: var(--brand-grey-dark);
  flex-shrink: 0;
  transition: color 0.15s ease, margin 0.2s ease;
}

.sidebar-nav-text {
  flex: 1;
  transition: opacity 0.2s ease, width 0.2s ease;
}

/* Badge (e.g. pending count) */
.sidebar-nav-badge {
  background: var(--brand-danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-pill);
  min-width: 18px;
  text-align: center;
  line-height: 1.2;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

/* Sidebar company switcher */
.sidebar-switcher {
  padding: 0.15rem 0.75rem 0.35rem;
}

.sidebar-switcher__trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  background: rgba(79, 70, 229, 0.04);
  border: 1px solid rgba(79, 70, 229, 0.1);
  border-radius: 0.5rem;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sidebar-switcher__trigger:hover {
  background: rgba(79, 70, 229, 0.07);
  border-color: rgba(79, 70, 229, 0.18);
}

.sidebar-switcher__trigger--static {
  cursor: default;
}

.sidebar-switcher__trigger--static:hover {
  background: rgba(79, 70, 229, 0.04);
  border-color: rgba(79, 70, 229, 0.1);
}

.sidebar-switcher__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 0.35rem;
  background: var(--brand-primary);
  color: white;
  font-size: 0.65rem;
  flex-shrink: 0;
}

.sidebar-switcher__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.sidebar-switcher__label {
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-grey);
  line-height: 1;
}

.sidebar-switcher__name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.sidebar-switcher__arrow {
  font-size: 0.55rem;
  color: var(--brand-grey-light);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.sidebar-switcher.is-open .sidebar-switcher__arrow {
  transform: rotate(180deg);
}

.sidebar-switcher__menu {
  margin-top: 0.3rem;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.4rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.sidebar-switcher__menu[hidden] {
  display: none;
}

.sidebar-switcher__item {
  display: block;
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
  color: var(--brand-dark);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s ease;
}

.sidebar-switcher__item:hover {
  background: rgba(79, 70, 229, 0.06);
}

.sidebar-switcher__item--active {
  font-weight: 600;
  color: var(--brand-primary);
  background: rgba(79, 70, 229, 0.04);
  cursor: default;
}

.sidebar-switcher__item--active i {
  margin-right: 0.3rem;
  font-size: 0.65rem;
}

/* User footer in sidebar */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--brand-grey-lighter);
  flex-shrink: 0;
  transition: padding 0.2s ease;
}

.sidebar-user__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-grey-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-grey-darker);
}

.sidebar-user__details {
  flex: 1;
  min-width: 0;
  transition: opacity 0.2s ease, width 0.2s ease;
}

.sidebar-user__name {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--brand-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user__role {
  font-size: 0.65rem;
  color: var(--brand-grey-dark);
  text-transform: capitalize;
}

.sidebar-user__actions {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  flex-shrink: 0;
}

.sidebar-user__actions .button {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  height: auto;
  border: none;
}

/* ----------------------------------------------------------------------------
   Top Bar
   ---------------------------------------------------------------------------- */
.app-topbar {
  grid-area: topbar;
  height: var(--topbar-height);
  background: white;
  border-bottom: 1px solid var(--brand-grey-lighter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: var(--topbar-z-index);
}

.app-topbar__left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.app-topbar__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Mobile hamburger button (hidden on desktop) */
.app-topbar__mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--brand-grey-darker);
  cursor: pointer;
  border-radius: var(--control-radius);
  font-size: 1.1rem;
}

.app-topbar__mobile-toggle:hover {
  background: var(--brand-white-ter);
}

.app-topbar__mobile-toggle:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: -2px;
}

/* Breadcrumbs in topbar */
.app-topbar__breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.85rem;
  color: var(--brand-grey-dark);
  min-width: 0;
}

.app-topbar__breadcrumbs a {
  color: var(--brand-grey-dark);
  text-decoration: none;
  white-space: nowrap;
}

.app-topbar__breadcrumbs a:hover {
  color: var(--brand-primary);
}

.app-topbar__breadcrumbs .breadcrumb-separator {
  color: var(--brand-grey-light);
  font-size: 0.7rem;
  flex-shrink: 0;
}

.app-topbar__breadcrumbs .breadcrumb-current {
  color: var(--brand-dark);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* CTA button in topbar */
.app-topbar__cta .button {
  height: 32px;
  font-size: 0.8rem;
  padding: 0 0.875rem;
}

/* User wrapper */
.app-topbar__user {
  position: relative;
}

/* User avatar in topbar */
.app-topbar__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--brand-grey-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-grey-darker);
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.app-topbar__avatar:hover {
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.app-topbar__avatar:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* Avatar dropdown menu */
.app-topbar__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 220px;
  background: white;
  border: 1px solid var(--brand-grey-lighter);
  border-radius: var(--control-radius);
  box-shadow: 0 4px 12px rgba(54, 54, 54, 0.1);
  z-index: calc(var(--topbar-z-index) + 1);
  overflow: hidden;
}

.is-active > .app-topbar__dropdown {
  display: block;
}

.app-topbar__dropdown-header {
  padding: 0.75rem 1rem;
  border-bottom: none;
}

.app-topbar__dropdown-email {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-dark);
  word-break: break-all;
}

.app-topbar__dropdown-divider {
  margin: 0;
  height: 1px;
  background: var(--brand-grey-lighter);
  border: none;
}

.app-topbar__dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--brand-grey-darker);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background 0.1s ease;
}

.app-topbar__dropdown-item:hover {
  background: var(--brand-white-ter);
  color: var(--brand-dark);
}

.app-topbar__dropdown-item:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: -2px;
}

.app-topbar__dropdown-item--danger {
  color: var(--brand-danger);
}

.app-topbar__dropdown-item--danger:hover {
  background: rgba(239, 68, 68, 0.05);
  color: var(--brand-danger);
}

.app-topbar__dropdown-item i {
  width: 16px;
  text-align: center;
  font-size: 0.85rem;
}

/* ----------------------------------------------------------------------------
   Main Content Area
   ---------------------------------------------------------------------------- */
.app-main {
  grid-area: main;
  min-width: 0;
  background: var(--brand-white-bis);
}

.app-content {
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media screen and (min-width: 1200px) {
  .app-content {
    padding: 1.5rem 2rem;
  }
}

/* ----------------------------------------------------------------------------
   Footer
   ---------------------------------------------------------------------------- */
.app-footer {
  grid-area: footer;
  padding: 0.75rem 1.5rem;
  font-size: 0.75rem;
  color: var(--brand-grey);
  border-top: 1px solid var(--brand-grey-lighter);
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-footer a {
  color: var(--brand-grey);
  text-decoration: none;
}

.app-footer a:hover {
  color: var(--brand-primary);
}

.app-footer__meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ----------------------------------------------------------------------------
   Connection Health Dot
   ---------------------------------------------------------------------------- */
.health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.health-dot--healthy {
  background-color: var(--brand-success);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.health-dot--warning {
  background-color: var(--brand-warning);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
  animation: health-dot-pulse 2s ease-in-out infinite;
}

.health-dot--error {
  background-color: var(--brand-danger);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
  animation: health-dot-pulse 1.5s ease-in-out infinite;
}

.health-dot--setup {
  background-color: var(--brand-grey);
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2);
}

@keyframes health-dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ----------------------------------------------------------------------------
   Page Header
   ---------------------------------------------------------------------------- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header__title-group {
  flex: 1;
  min-width: 0;
}

.page-header__title-group .title {
  margin-bottom: 0.25rem;
}

.page-header__title-group .subtitle {
  margin-bottom: 0;
}

.page-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ----------------------------------------------------------------------------
   Mobile Overlay
   ---------------------------------------------------------------------------- */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(54, 54, 54, 0.5);
  z-index: var(--overlay-z-index);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.sidebar-overlay.is-active {
  opacity: 1;
}

/* ----------------------------------------------------------------------------
   Mobile Responsive (< 1024px): Sidebar becomes overlay drawer
   ---------------------------------------------------------------------------- */
@media screen and (max-width: 1023px) {
  .app-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "topbar"
      "main"
      "footer";
  }

  .app-sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
    box-shadow: none;
    transition: transform var(--sidebar-transition), box-shadow var(--sidebar-transition);
  }

  .app-sidebar.is-open {
    transform: translateX(0);
    box-shadow: 4px 0 16px rgba(54, 54, 54, 0.15);
  }

  .sidebar-overlay {
    display: block;
  }

  .app-topbar__mobile-toggle {
    display: flex;
  }

  .app-content {
    padding: 1rem;
  }

  .page-header {
    flex-direction: column;
  }

  .page-header__actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Tablet adjustments (1024px - 1215px) */
@media screen and (min-width: 1024px) and (max-width: 1215px) {
  .app-content {
    padding: 1.25rem;
  }
}

/* Hide old navbar and footer when using the new CSS Grid layout */
.app-layout .navbar.is-fixed-top {
  display: none;
}

.app-layout > .footer:not(.app-footer) {
  display: none;
}

/* ----------------------------------------------------------------------------
   Topbar Context: Connected accounts (Clover + QuickBooks)
   ---------------------------------------------------------------------------- */
.topbar-context {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 auto;
}

.topbar-context__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.topbar-context__item i {
  font-size: 0.72rem;
  opacity: 0.7;
}

.topbar-context__item--clover i {
  color: var(--brand-primary);
}

.topbar-context__item--qbo i {
  color: var(--brand-info);
}

.topbar-context__label {
  font-weight: 500;
  color: var(--brand-grey);
  font-size: 0.72rem;
}

.topbar-context__value {
  font-weight: 600;
  color: var(--brand-dark);
  font-size: 0.78rem;
}

.topbar-context__sep {
  width: 1px;
  height: 1rem;
  background: rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  margin: 0 0.15rem;
}

@media screen and (max-width: 1023px) {
  .topbar-context {
    display: none;
  }
}

/* ----------------------------------------------------------------------------
   Dropdown: show menu when parent has is-open class
   ---------------------------------------------------------------------------- */
.is-open > [hidden],
.is-open > .hidden {
  display: block !important;
}

/* ----------------------------------------------------------------------------
   Dark mode overrides
   ---------------------------------------------------------------------------- */
.dark .app-sidebar {
  background: #1F2937; /* gray-800 */
  border-right-color: #374151; /* gray-700 */
}

.dark .sidebar-header {
  border-bottom-color: #374151;
}

.dark .sidebar-header .sidebar-logo {
  color: #F9FAFB; /* gray-50 */
}

.dark .sidebar-nav-item {
  color: #D1D5DB; /* gray-300 */
}

.dark .sidebar-nav-item:hover {
  background: #374151;
  color: #F9FAFB;
}

.dark .sidebar-nav-item.is-active {
  background: rgba(99, 102, 241, 0.15);
  color: #A5B4FC; /* indigo-300 */
  border-left-color: #A5B4FC;
}

.dark .sidebar-nav-item.is-active .sidebar-nav-icon {
  color: #A5B4FC;
}

.dark .sidebar-nav-icon {
  color: #9CA3AF; /* gray-400 */
}

.dark .sidebar-group + .sidebar-group {
  border-top-color: #374151;
}

.dark .sidebar-group-label {
  color: #6B7280; /* gray-500 */
}

.dark .sidebar-nav-badge {
  background: #DC2626; /* red-600 */
}

.dark .sidebar-switcher__trigger {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.15);
}

.dark .sidebar-switcher__trigger:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.25);
}

.dark .sidebar-switcher__label {
  color: #6B7280;
}

.dark .sidebar-switcher__name {
  color: #F9FAFB;
}

.dark .sidebar-switcher__menu {
  background: #1F2937;
  border-color: #374151;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.dark .sidebar-switcher__item {
  color: #D1D5DB;
}

.dark .sidebar-switcher__item:hover {
  background: rgba(99, 102, 241, 0.1);
}

.dark .sidebar-switcher__item--active {
  color: #A5B4FC;
  background: rgba(99, 102, 241, 0.08);
}

.dark .sidebar-user {
  border-top-color: #374151;
}

.dark .sidebar-user__avatar {
  background: #374151;
  color: #D1D5DB;
}

.dark .sidebar-user__name {
  color: #F9FAFB;
}

.dark .app-topbar {
  background: #1F2937;
  border-bottom-color: #374151;
}

.dark .app-topbar__mobile-toggle {
  color: #D1D5DB;
}

.dark .app-topbar__mobile-toggle:hover {
  background: #374151;
}

.dark .app-topbar__breadcrumbs {
  color: #9CA3AF;
}

.dark .app-topbar__breadcrumbs a {
  color: #9CA3AF;
}

.dark .app-topbar__breadcrumbs a:hover {
  color: #A5B4FC;
}

.dark .app-topbar__breadcrumbs .breadcrumb-current {
  color: #F9FAFB;
}

.dark .topbar-context__label {
  color: #6B7280;
}

.dark .topbar-context__value {
  color: #F9FAFB;
}

.dark .topbar-context__sep {
  background: rgba(255, 255, 255, 0.1);
}

.dark .app-main {
  background: #111827; /* gray-900 */
}

.dark .app-footer {
  background: #1F2937;
  border-top-color: #374151;
  color: #6B7280;
}

.dark .app-footer a:hover {
  color: #A5B4FC;
}

.dark .sidebar-overlay {
  background: rgba(0, 0, 0, 0.6);
}
