/* ==========================================================
   HEALTH WORLD PATHOLOGY — Layout System
   Razorpay Dashboard Architecture
   Full-width dark topbar, light categorized sidebar, workspace canvas
   ========================================================== */

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family) !important;
}

button, input, select, textarea, table, th, td, optgroup, option {
  font-family: var(--font-family) !important;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-app);
  overflow: hidden;
  height: 100vh;
  transition: background var(--transition-theme), color var(--transition-theme);
}

a { color: var(--text-link); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ════════════════════════════════════════
   APP SHELL & TOPBAR
   ════════════════════════════════════════ */
.app,
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ── Sidebar Brand Header (Logo and Lab Name top of Menu) ── */
/* ── Fixed Dashboard Topbar (Left: Logo & Brand + Search | Right: Theme Toggle & Profile Logo) ── */
.dashboard-topbar {
  height: var(--topbar-height, 56px);
  min-height: var(--topbar-height, 56px);
  max-height: var(--topbar-height, 56px);
  box-sizing: border-box;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.dashboard-topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  min-width: 0;
}

.dashboard-topbar .global-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 4px;
}

.dashboard-topbar .global-header__brand-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  display: inline-block;
}

.dashboard-topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
}

.dashboard-topbar__menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.dashboard-topbar__menu-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--color-primary-400);
}

.dashboard-topbar__menu-btn i,
.dashboard-topbar__menu-btn svg {
  width: 18px;
  height: 18px;
}

.dashboard-topbar__theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-topbar__theme-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--color-primary-400);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.dashboard-topbar__theme-btn i,
.dashboard-topbar__theme-btn svg {
  width: 17px;
  height: 17px;
}

/* Dashboard Topbar Search Adjustments */
.dashboard-topbar .global-header__search {
  width: 280px;
  max-width: 360px;
  min-width: 180px;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-topbar .global-header__search:focus-within {
  width: 380px;
  max-width: 440px;
}

.dashboard-topbar .global-header__search-input {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  height: 34px;
  font-size: 12.5px;
  box-shadow: none;
}

.dashboard-topbar .global-header__search-input::placeholder {
  color: var(--text-muted);
}

.dashboard-topbar .global-header__search-input:hover {
  border-color: var(--color-primary-400);
}

.dashboard-topbar .global-header__search-input:focus {
  background: var(--bg-surface);
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.dashboard-topbar .global-header__search-icon {
  color: var(--text-muted);
}

.dashboard-topbar .global-header__search:focus-within .global-header__search-icon {
  color: var(--color-primary-600);
}

/* Brand Logo */
.global-header__brand,
.sidebar__logo-top {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
}

.global-header__logo-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.global-header__logo-img {
  max-height: 28px;
  max-width: 60px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.global-header__brand-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  line-height: 1.25;
  display: block;
}

.global-header__brand-title span {
  color: inherit;
  font-weight: inherit;
  font-size: inherit;
}

/* Global Navigation Tabs (Horizontal Topbar Tabs) */
.global-header__nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
}

.global-header__tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--rp-topbar-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.global-header__tab:hover {
  background: var(--rp-topbar-tab-hover);
  color: #ffffff;
  text-decoration: none;
}

.global-header__tab.active {
  background: var(--rp-topbar-tab-active);
  color: #ffffff;
  font-weight: 600;
  border-color: rgba(255, 255, 255, 0.12);
}

.global-header__tab-icon {
  width: 15px;
  height: 15px;
  opacity: 0.85;
}

/* Global Topbar Right Actions */
.global-header__right,
.topbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.global-header__search {
  position: relative;
  width: 215px;
  margin-left: 0;
  transition: width 0.2s ease;
}

.global-header__search:focus-within {
  width: 265px;
}

/* Simple Clean White Pill (Compact size matching screenshot) */
.global-header__search-input {
  width: 100%;
  height: 32px;
  background: #ffffff;
  border: 1px solid #dce4f0;
  border-radius: 9999px;
  padding: 0 28px 0 30px;
  font-size: 12px;
  font-weight: 400;
  color: #1e293b;
  outline: none;
  transition: all 0.18s ease;
  font-family: var(--font-family);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.global-header__search-input:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.global-header__search-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2.5px rgba(59, 130, 246, 0.16), 0 1px 4px rgba(0, 0, 0, 0.06);
}

.global-header__search-input::placeholder {
  color: #64748b;
  font-size: 11.5px;
  font-weight: 400;
}

.global-header__search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  color: #475569;
  pointer-events: none;
  transition: color 0.18s ease;
}

.global-header__search:focus-within .global-header__search-icon {
  color: #2563eb;
}

.global-header__search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: #f1f5f9;
  border: none;
  color: #64748b;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
}

.global-header__search-clear:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.global-header__search-clear i {
  width: 11px;
  height: 11px;
}

/* ── Global Real-Time Search Results Dropdown ── */
.global-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  width: 440px;
  max-width: 90vw;
  max-height: 480px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.16), 0 6px 16px -2px rgba(0, 0, 0, 0.08);
  z-index: 2200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: globalSearchPop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .global-search-dropdown {
  background: #111827;
  border-color: #374151;
  box-shadow: 0 20px 40px -4px rgba(0, 0, 0, 0.65), 0 8px 20px -2px rgba(0, 0, 0, 0.4);
}

@keyframes globalSearchPop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.global-search-body {
  overflow-y: auto;
  padding: 6px;
  max-height: 420px;
  scrollbar-width: thin;
}

.global-search-group {
  margin-bottom: 6px;
}

.global-search-group:last-child {
  margin-bottom: 0;
}

.global-search-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 4px 10px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

[data-theme="dark"] .global-search-group-header {
  color: #94a3b8;
}

.global-search-group-count {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
}

[data-theme="dark"] .global-search-group-count {
  background: #1f2937;
  color: #cbd5e1;
}

.global-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.12s ease;
  border: 1px solid transparent;
  color: inherit;
  user-select: none;
}

.global-search-item:hover,
.global-search-item.active {
  background: #f0f9ff;
  border-color: #bae6fd;
}

[data-theme="dark"] .global-search-item:hover,
[data-theme="dark"] .global-search-item.active {
  background: rgba(14, 116, 144, 0.2);
  border-color: rgba(14, 116, 144, 0.4);
}

.global-search-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.global-search-icon-box i {
  width: 15px;
  height: 15px;
}

.global-search-icon-box--command {
  background: #e0f2fe;
  color: #0284c7;
}

.global-search-icon-box--order {
  background: #e0e7ff;
  color: #4338ca;
}

.global-search-icon-box--patient {
  background: #ecfdf5;
  color: #059669;
}

.global-search-icon-box--test {
  background: #fef3c7;
  color: #d97706;
}

.global-search-icon-box--doctor {
  background: #fae8ff;
  color: #a21caf;
}

[data-theme="dark"] .global-search-icon-box--command {
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
}

[data-theme="dark"] .global-search-icon-box--order {
  background: rgba(67, 56, 202, 0.2);
  color: #818cf8;
}

[data-theme="dark"] .global-search-icon-box--patient {
  background: rgba(5, 150, 105, 0.2);
  color: #34d399;
}

[data-theme="dark"] .global-search-icon-box--test {
  background: rgba(217, 119, 6, 0.2);
  color: #fbbf24;
}

[data-theme="dark"] .global-search-icon-box--doctor {
  background: rgba(162, 28, 175, 0.2);
  color: #e879f9;
}

.global-search-info {
  flex: 1;
  min-width: 0;
}

.global-search-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.global-search-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .global-search-title {
  color: #f8fafc;
}

.global-search-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.global-search-desc {
  font-size: 11.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

[data-theme="dark"] .global-search-desc {
  color: #94a3b8;
}

.global-search-arrow {
  color: #94a3b8;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.12s ease;
  flex-shrink: 0;
}

.global-search-arrow i {
  width: 14px;
  height: 14px;
}

.global-search-item:hover .global-search-arrow,
.global-search-item.active .global-search-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--color-primary-500);
}

.global-search-empty {
  padding: 32px 16px;
  text-align: center;
  color: #64748b;
}

[data-theme="dark"] .global-search-empty {
  color: #94a3b8;
}

.global-search-empty i {
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  color: #94a3b8;
}

.global-search-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
  color: #64748b;
}

[data-theme="dark"] .global-search-footer {
  background: #1e293b;
  border-color: #374151;
  color: #94a3b8;
}

.global-search-footer-shortcuts {
  display: flex;
  align-items: center;
  gap: 10px;
}

.global-search-footer kbd {
  font-family: inherit;
  font-size: 10px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 1px 4px;
  border-radius: 3px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
  color: #334155;
}

[data-theme="dark"] .global-search-footer kbd {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

.global-header__icon-btn,
.topbar__icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--rp-topbar-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.global-header__icon-btn:hover,
.topbar__icon-btn:hover {
  background: var(--rp-topbar-tab-hover);
  color: #ffffff;
}

.global-header__icon-btn .dot,
.topbar__notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
}

.global-header__profile {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  flex-shrink: 0;
}

.global-header__user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 3px 8px 3px 4px;
  border-radius: var(--radius-md);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.global-header__user-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
}

.global-header__user-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.2;
}

.global-header__user-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #ffffff;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-header__user-role {
  font-size: 0.66rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 4px;
}

.scope-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.scope-dot--all {
  background: #10b981;
  box-shadow: 0 0 5px rgba(16, 185, 129, 0.6);
}

.scope-dot--own {
  background: #f59e0b;
  box-shadow: 0 0 5px rgba(245, 158, 11, 0.6);
}

/* User Session Dropdown */
.user-session-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 310px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  padding: 10px;
  z-index: 1050;
  animation: dropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.user-session-dropdown__header {
  padding: 8px 10px 10px 10px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}

.user-session-dropdown__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  overflow-y: auto;
}

.user-session-dropdown__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.user-session-dropdown__item:hover {
  background: var(--bg-surface-alt);
}

.user-session-dropdown__item.active {
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(14, 165, 233, 0.25);
}

/* ════════════════════════════════════════
   WORKSPACE LAYOUT (Sidebar + Main Content)
   ════════════════════════════════════════ */
.workspace-layout {
  display: flex;
  flex: 1;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Stable spacer on desktop so workspace NEVER shifts or squishes */
@media (min-width: 769px) {
  .workspace-layout::before {
    content: '';
    display: block;
    width: var(--sidebar-collapsed, 64px);
    min-width: var(--sidebar-collapsed, 64px);
    height: 100vh;
    flex-shrink: 0;
    pointer-events: none;
  }
}

body.b2b-portal-active .workspace-layout::before,
body.patient-portal-active .workspace-layout::before {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
}

/* ── Sleek Dark Slate Sidebar (#0E172A) ── */
.sidebar {
  width: var(--sidebar-collapsed, 64px);
  min-width: var(--sidebar-collapsed, 64px);
  height: 100vh;
  background: #0E172A !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  z-index: var(--z-sticky, 100);
  overflow: hidden;
  flex-shrink: 0;
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              min-width 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              max-width 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: width, box-shadow;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed, 64px);
  min-width: var(--sidebar-collapsed, 64px);
}

/* Desktop & Tablet: Fixed overlay drawer on top of workspace */
@media (min-width: 769px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
  }

  .sidebar.collapsed {
    position: fixed;
    width: var(--sidebar-collapsed, 64px) !important;
    min-width: var(--sidebar-collapsed, 64px) !important;
    max-width: var(--sidebar-collapsed, 64px) !important;
    z-index: 100;
    box-shadow: none !important;
  }

  /* When expanded, opens as a floating overlay ON TOP of the workspace */
  .sidebar:not(.collapsed) {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width, 260px) !important;
    min-width: var(--sidebar-width, 260px) !important;
    max-width: var(--sidebar-width, 260px) !important;
    z-index: 1050 !important;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.55) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
  }
}

/* ── Sidebar Top Header (Matches Topbar Header Height: 56px) ── */
.sidebar__top-header {
  height: calc(var(--topbar-height, 56px) - 1px);
  min-height: calc(var(--topbar-height, 56px) - 1px);
  max-height: calc(var(--topbar-height, 56px) - 1px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: 0 18px;
  flex-shrink: 0;
  background: #0E172A;
  overflow: hidden;
}

.sidebar__top-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1) 0.05s, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1) 0.05s;
}

.sidebar__header-nav-btn {
  display: none !important;
}

.sidebar.collapsed .sidebar__top-header {
  padding: 0;
  justify-content: center;
}

.sidebar.collapsed .sidebar__top-title {
  opacity: 0 !important;
  transform: translateX(-8px) !important;
  max-width: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.12s ease, transform 0.12s ease !important;
}

.sidebar.collapsed .sidebar__header-nav-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  margin: 0 auto;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  animation: sidebarNavBtnPop 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes sidebarNavBtnPop {
  0% {
    opacity: 0;
    transform: scale(0.72) rotate(-12deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.sidebar.collapsed .sidebar__header-nav-btn:hover {
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(14, 165, 233, 0.45);
  color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.3);
}

.sidebar.collapsed .sidebar__header-nav-btn:active {
  transform: translateY(0);
  background: rgba(14, 165, 233, 0.28);
}

.sidebar.collapsed .sidebar__header-nav-btn i,
.sidebar.collapsed .sidebar__header-nav-btn svg,
.sidebar.collapsed .sidebar__header-nav-btn [data-lucide] {
  width: 18px;
  height: 18px;
  color: inherit;
  transition: transform 0.2s ease;
}

.sidebar.collapsed .sidebar__header-nav-btn:hover i,
.sidebar.collapsed .sidebar__header-nav-btn:hover svg,
.sidebar.collapsed .sidebar__header-nav-btn:hover [data-lucide] {
  transform: scale(1.08);
}

.sidebar__hr {
  border: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0;
  padding: 0;
  width: 100%;
  flex-shrink: 0;
}

/* Sidebar Nav */
.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 40px;
  scrollbar-width: thin;
}

.sidebar__nav::-webkit-scrollbar { width: 4px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 4px; }

.sidebar__nav-group {
  margin-bottom: 6px;
}

.sidebar__nav-group:first-child {
  margin-top: 0;
}

.sidebar__nav-label,
.sidebar__section-label {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 18px 4px;
  overflow: hidden;
  white-space: nowrap;
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1) 0.06s, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1) 0.06s;
}

.sidebar.collapsed .sidebar__nav-label,
.sidebar.collapsed .sidebar__section-label {
  opacity: 0 !important;
  transform: translateX(-10px) !important;
  pointer-events: none !important;
  height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  transition: opacity 0.12s ease, transform 0.12s ease, height 0.24s ease, padding 0.24s ease !important;
}

/* Sidebar Nav Link — Full-width, no radius */
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  margin: 0;
  border-radius: 0;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  text-decoration: none;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
}

.sidebar__link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  text-decoration: none;
}

/* Active Nav Item — Gradient: dark left → light right, full width */
.sidebar__link.active {
  background: linear-gradient(90deg, #1d4ed8 0%, #0ea5e9 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(14, 165, 233, 0.3);
}

.sidebar__link-icon,
.sidebar__link i,
.sidebar__link svg,
.sidebar__link [data-lucide] {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: #94a3b8;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), color var(--transition-fast);
}

.sidebar__link.active .sidebar__link-icon,
.sidebar__link.active i,
.sidebar__link.active svg,
.sidebar__link.active [data-lucide] {
  color: #ffffff;
}

.sidebar__link:hover .sidebar__link-icon,
.sidebar__link:hover i,
.sidebar__link:hover svg,
.sidebar__link:hover [data-lucide] {
  transform: scale(1.14) translateX(1px);
  color: #ffffff;
}

.sidebar__link:active {
  transform: scale(0.98);
  transition: transform 0.08s ease;
}

.sidebar__link-text,
.sidebar__link span:not(.sidebar__badge):not(.sidebar__badge--danger) {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  opacity: 1;
  transform: translateX(0);
  display: inline-block;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1) 0.05s, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1) 0.05s;
}

.sidebar.collapsed .sidebar__link-text,
.sidebar.collapsed .sidebar__link span:not(.sidebar__badge):not(.sidebar__badge--danger) {
  opacity: 0 !important;
  transform: translateX(-10px) !important;
  max-width: 0 !important;
  pointer-events: none !important;
  display: inline-block !important;
  transition: opacity 0.12s ease, transform 0.12s ease, max-width 0.24s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.sidebar__badge,
.sidebar__link-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  line-height: 1.3;
  flex-shrink: 0;
}

.sidebar__badge--success {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.sidebar__badge--danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

/* Hide all notification badges & badge numbers when sidebar is collapsed */
.sidebar.collapsed .sidebar__badge,
.sidebar.collapsed .sidebar__link-badge,
.sidebar.collapsed #sidebarPendingBadge,
.sidebar.collapsed [class*="badge"],
.sidebar.collapsed a[data-route="dues-list"] .sidebar__badge,
.sidebar.collapsed a[data-route="pending-result"] .sidebar__badge {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ── Sidebar Submenu & Dropdown (Settings etc.) ── */
.sidebar__submenu-group {
  display: flex;
  flex-direction: column;
  scroll-margin-bottom: 25px;
}

.sidebar__link--has-sub,
#settingsMenuToggle {
  justify-content: flex-start;
}

/* Ensure Settings toggle never gets active gradient background or glow */
.sidebar__link--has-sub.active,
#settingsMenuToggle.active,
.sidebar__link[data-route="settings"].active {
  background: transparent !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
  font-weight: 500 !important;
}

.sidebar__link--has-sub.active:hover,
#settingsMenuToggle.active:hover,
.sidebar__link[data-route="settings"].active:hover {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #ffffff !important;
}

.sidebar__link--has-sub.active .sidebar__link-icon,
.sidebar__link--has-sub.active i,
.sidebar__link--has-sub.active svg,
.sidebar__link--has-sub.active [data-lucide],
#settingsMenuToggle.active .sidebar__link-icon,
#settingsMenuToggle.active i,
#settingsMenuToggle.active svg,
#settingsMenuToggle.active [data-lucide] {
  color: #94a3b8 !important;
}

.sidebar__link--has-sub.active:hover .sidebar__link-icon,
.sidebar__link--has-sub.active:hover i,
.sidebar__link--has-sub.active:hover svg,
.sidebar__link--has-sub.active:hover [data-lucide],
#settingsMenuToggle.active:hover .sidebar__link-icon,
#settingsMenuToggle.active:hover i,
#settingsMenuToggle.active:hover svg,
#settingsMenuToggle.active:hover [data-lucide] {
  color: #ffffff !important;
}

.sidebar__link-arrow {
  margin-left: auto;
  width: 14px !important;
  height: 14px !important;
  color: #94a3b8;
  transition: transform 0.32s cubic-bezier(0.25, 1, 0.5, 1);
  flex-shrink: 0;
}

.sidebar__submenu-group.open .sidebar__link-arrow {
  transform: rotate(90deg);
}

.sidebar__submenu {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s cubic-bezier(0.25, 1, 0.5, 1);
  overflow: hidden;
}

.sidebar__submenu-group.open .sidebar__submenu {
  grid-template-rows: 1fr;
}

.sidebar__submenu-inner {
  min-height: 0;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.26s cubic-bezier(0.25, 1, 0.5, 1), transform 0.32s cubic-bezier(0.25, 1, 0.5, 1);
}

.sidebar__submenu-group.open .sidebar__submenu-inner {
  opacity: 1;
  transform: translateY(0);
  padding: 0;
}

.sidebar__sublink {
  display: flex;
  align-items: center;
  padding: 8px 18px 8px 36px;
  border-radius: 0;
  margin: 0;
  width: 100%;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.sidebar__sublink:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  text-decoration: none;
}

/* Subtle staggered entry */
.sidebar__submenu-group.open .sidebar__sublink {
  animation: submenuFadeIn 0.3s cubic-bezier(0.25, 1, 0.5, 1) both;
}
.sidebar__submenu-group.open .sidebar__sublink:nth-child(1) { animation-delay: 0.02s; }
.sidebar__submenu-group.open .sidebar__sublink:nth-child(2) { animation-delay: 0.04s; }
.sidebar__submenu-group.open .sidebar__sublink:nth-child(3) { animation-delay: 0.06s; }
.sidebar__submenu-group.open .sidebar__sublink:nth-child(4) { animation-delay: 0.08s; }
.sidebar__submenu-group.open .sidebar__sublink:nth-child(5) { animation-delay: 0.10s; }

@keyframes submenuFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Active Sublink — Gradient: dark left → light right, full width */
.sidebar__sublink.active {
  background: linear-gradient(90deg, #1d4ed8 0%, #0ea5e9 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.25);
}

[data-theme="dark"] .sidebar__sublink.active {
  background: linear-gradient(90deg, #1d4ed8 0%, #0ea5e9 100%);
  color: #ffffff;
}

.sidebar.collapsed .sidebar__link-arrow {
  display: none !important;
}

.sidebar.collapsed .sidebar__sublink span {
  display: none;
}

/* ── Collapsed Sidebar Settings Flyout (Opens on Right Side) ── */
.sidebar.collapsed .sidebar__submenu-group {
  position: relative;
}

.sidebar.collapsed .sidebar__submenu {
  display: none;
}

.sidebar.collapsed .sidebar__submenu-group.flyout-open .sidebar__submenu {
  display: block !important;
  grid-template-rows: unset !important;
  position: fixed !important;
  min-width: 220px;
  background: #0E172A;
  background: linear-gradient(180deg, #111C38 0%, #0A1020 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.7), 0 6px 16px rgba(0, 0, 0, 0.45);
  padding: 6px 0;
  z-index: 1200;
  overflow: visible;
  animation: flyoutSlideRight 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sidebar.collapsed .sidebar__submenu-group.flyout-open .sidebar__submenu::before {
  content: 'Settings';
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  padding: 6px 14px 6px;
  letter-spacing: 0.08em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 4px;
}

.sidebar.collapsed .sidebar__submenu-group.flyout-open .sidebar__submenu-inner {
  opacity: 1 !important;
  transform: none !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 4px !important;
  overflow: visible !important;
}

.sidebar.collapsed .sidebar__submenu-group.flyout-open .sidebar__sublink {
  display: flex !important;
  align-items: center !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #cbd5e1 !important;
  border-radius: 6px !important;
  margin: 1px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  text-decoration: none !important;
  transition: all 0.15s ease !important;
}

.sidebar.collapsed .sidebar__submenu-group.flyout-open .sidebar__sublink span {
  display: inline-block !important;
}

.sidebar.collapsed .sidebar__submenu-group.flyout-open .sidebar__sublink:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

.sidebar.collapsed .sidebar__submenu-group.flyout-open .sidebar__sublink.active {
  background: linear-gradient(90deg, #1d4ed8 0%, #0ea5e9 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3) !important;
}

.sidebar.collapsed .sidebar__submenu-group.flyout-open #settingsMenuToggle {
  background: rgba(14, 165, 233, 0.15) !important;
  color: #38bdf8 !important;
}

.sidebar.collapsed .sidebar__submenu-group.flyout-open #settingsMenuToggle i,
.sidebar.collapsed .sidebar__submenu-group.flyout-open #settingsMenuToggle svg {
  color: #38bdf8 !important;
}

@keyframes flyoutSlideRight {
  0% {
    opacity: 0;
    transform: translateX(-8px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Sidebar Footer & Collapse Button */
.sidebar__footer {
  padding: 8px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #090e1a;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.sidebar__collapse-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  outline: none;
}

.sidebar__collapse-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}

.sidebar__collapse-btn i,
.sidebar__collapse-btn svg,
.sidebar__collapse-btn [data-lucide] {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: inherit;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.18s ease;
}

.sidebar__collapse-btn:hover i,
.sidebar__collapse-btn:hover svg,
.sidebar__collapse-btn:hover [data-lucide] {
  transform: scale(1.18);
  color: #38bdf8 !important;
}

.sidebar__collapse-btn:active {
  transform: scale(0.97);
}

.sidebar.collapsed .sidebar__footer {
  padding: 8px 6px;
}

.sidebar.collapsed .sidebar__collapse-btn {
  justify-content: center;
  padding: 8px 0;
}

.sidebar__collapse-text {
  opacity: 1;
  transform: translateX(0);
  white-space: nowrap;
  display: inline-block;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1) 0.05s, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1) 0.05s;
}

.sidebar.collapsed .sidebar__collapse-text {
  opacity: 0 !important;
  transform: translateX(-10px) !important;
  max-width: 0 !important;
  pointer-events: none !important;
  display: inline-block !important;
  transition: opacity 0.12s ease, transform 0.12s ease, max-width 0.24s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.sidebar__footer-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: #94a3b8;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.sidebar__footer-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  text-decoration: none;
}

.sidebar__footer-link i {
  width: 16px;
  height: 16px;
}

/* ── Main Content Canvas ── */
.main,
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  height: 100%;
  background: var(--bg-app);
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  scroll-behavior: smooth;
  position: relative;
}

.content::-webkit-scrollbar { width: 6px; }
.content::-webkit-scrollbar-track { background: transparent; }
.content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
[data-theme="dark"] .content::-webkit-scrollbar-thumb {
  background: #334155;
}

/* ── Page Header / Section Header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header__left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.page-header__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.page-header__subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
}

.page-header__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

/* ── Razorpay Floating Help & Support Pill ── */
.floating-support-btn {
  position: fixed;
  bottom: 20px;
  right: 24px;
  z-index: var(--z-sticky);
  background: #1e293b;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.floating-support-btn:hover {
  background: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
}

.floating-support-btn i {
  width: 15px;
  height: 15px;
}

/* ── Grid Layouts ── */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* ════════════════════════════════════════
   BACKDROP BLUR OVERLAY & RESPONSIVE
   ════════════════════════════════════════ */
.sidebar-overlay {
  display: block !important;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.26s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.26s cubic-bezier(0.16, 1, 0.3, 1),
              backdrop-filter 0.26s ease,
              -webkit-backdrop-filter 0.26s ease;
  cursor: pointer;
}

.sidebar.mobile-open + .sidebar-overlay,
.sidebar-overlay.active {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Laptop / Tablet / Compact Screen & Aspect Ratio Auto-Collapse */
@media (max-width: 1440px) and (min-width: 769px), screen and (max-aspect-ratio: 16/10) and (max-width: 1560px) and (min-width: 769px) {
  .sidebar.collapsed {
    width: var(--sidebar-collapsed) !important;
    min-width: var(--sidebar-collapsed) !important;
  }
  .sidebar.collapsed .sidebar__top-header {
    padding: 0 !important;
    justify-content: center !important;
  }
  .sidebar.collapsed .sidebar__top-title {
    opacity: 0 !important;
    transform: translateX(-8px) !important;
    max-width: 0 !important;
    pointer-events: none !important;
  }
  .sidebar.collapsed .sidebar__header-nav-btn {
    display: inline-flex !important;
  }
  .sidebar.collapsed .sidebar__nav-label,
  .sidebar.collapsed .sidebar__section-label {
    opacity: 0 !important;
    transform: translateX(-10px) !important;
    pointer-events: none !important;
    height: 0 !important;
    padding: 0 !important;
  }
  .sidebar.collapsed .sidebar__link-text,
  .sidebar.collapsed .sidebar__link span:not(.sidebar__badge):not(.sidebar__badge--danger) {
    opacity: 0 !important;
    transform: translateX(-10px) !important;
    max-width: 0 !important;
    pointer-events: none !important;
    display: inline-block !important;
  }
  .sidebar.collapsed .sidebar__badge,
  .sidebar.collapsed .sidebar__link-badge,
  .sidebar.collapsed #sidebarPendingBadge,
  .sidebar.collapsed [class*="badge"],
  .sidebar.collapsed .sidebar__link-arrow,
  .sidebar.collapsed .sidebar__sublink span {
    display: none !important;
  }
  .sidebar.collapsed .sidebar__collapse-text {
    opacity: 0 !important;
    transform: translateX(-10px) !important;
    max-width: 0 !important;
    pointer-events: none !important;
    display: inline-block !important;
  }
  .sidebar.collapsed .sidebar__collapse-btn {
    justify-content: center !important;
    padding: 8px 0 !important;
  }
}

/* Tablet */
@media (max-width: 1100px) {
  .global-header__nav {
    display: none; /* Hide horizontal tabs on tablet, accessible from sidebar */
  }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 768px) {
  .global-header__menu-btn,
  .topbar__menu-btn,
  .dashboard-topbar__menu-btn {
    display: flex;
  }

  .dashboard-topbar {
    padding: 0 12px;
    gap: 10px;
  }

  .dashboard-topbar .global-header__brand-title {
    display: none;
  }

  .dashboard-topbar .global-header__search {
    width: auto;
    max-width: 190px;
    flex: 1;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    z-index: var(--z-overlay);
    width: 260px;
    min-width: 260px;
    box-shadow: var(--shadow-xl);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar.mobile-open + .sidebar-overlay,
  .sidebar-overlay.active {
    display: block;
  }

  .content {
    padding: 14px 16px;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .floating-support-btn span {
    display: none;
  }
  .floating-support-btn {
    padding: 10px;
    border-radius: 50%;
  }
}

/* ── 4:3 Aspect Ratio Screen Auto-Collapse Accommodation ── */
@media screen and (max-aspect-ratio: 4/3) and (min-width: 769px) {
  .workspace-layout {
    gap: 0;
  }
}

