/* -------------------------------------------------------------
   DESIGN SYSTEM VARIABLES (From .agents/skills/design.md)
   ------------------------------------------------------------- */
:root {
  /* Brand / Primary */
  --color-primary: #2563eb;        /* Cobalt Blue */
  --color-primary-hover: #1d4ed8;  /* Darker Cobalt */
  --color-primary-light: #eff6ff;  /* Soft Ice Blue */
  
  /* Accent / Interactive Link */
  --color-accent: #0284c7;         /* Sky Teal-Blue */
  --color-accent-hover: #0369a1;
  
  /* Neutrals / Grays */
  --color-neutral-50: #f8fafc;
  --color-neutral-100: #f1f5f9;
  --color-neutral-200: #e2e8f0;
  --color-neutral-300: #cbd5e1;
  --color-neutral-400: #94a3b8;
  --color-neutral-500: #64748b;
  --color-neutral-600: #475569;
  --color-neutral-700: #334155;
  --color-neutral-800: #1e293b;    /* Top bar */
  --color-neutral-900: #0f172a;    /* Left Sidebar */
  
  /* Semantic Colors */
  --color-success: #10b981;
  --color-success-bg: #ecfdf5;
  --color-warning: #f59e0b;
  --color-warning-bg: #fffbeb;
  --color-error: #ef4444;
  --color-error-bg: #fef2f2;
  --color-info: #3b82f6;
  --color-info-bg: #eff6ff;
  
  /* Surface Mappings */
  --bg-canvas: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-sidebar: var(--color-neutral-900);
  --bg-topbar: var(--color-neutral-800);
  --border-default: var(--color-neutral-200);
  --text-primary: #1e293b;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  /* Spacing Scale */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  
  /* Border Radii */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  
  /* Transitions */
  --transition-fast: all 0.15s ease-in-out;
  --transition-normal: all 0.25s ease-in-out;
}

/* -------------------------------------------------------------
   BASE RESET & TYPOGRAPHY
   ------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  color: var(--color-neutral-800);
  font-weight: 600;
}

/* Icons styling */
.icon {
  width: 14px;
  height: 14px;
  stroke-width: 2px;
  vertical-align: middle;
}

.divider {
  width: 1px;
  height: 16px;
  background-color: var(--color-neutral-300);
}

/* -------------------------------------------------------------
   LAYOUT SHELL
   ------------------------------------------------------------- */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Left Sidebar Layout */
.sidebar {
  width: 56px;
  background-color: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Separates top and bottom nav structures */
  padding: 0 0 16px 0;
  flex-shrink: 0;
  transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 100;
}

/* Sidebar Top Container */
.sidebar-top {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* Sidebar Bottom Container */
.sidebar-bottom {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Logo Alignment & Topbar Match */
.logo-container {
  height: 48px; /* Match Topbar height */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08); /* Matches topbar line */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 12px;
  margin-bottom: 8px;
}

.logo-text {
  width: 32px;
  height: 32px;
  background-color: var(--color-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
  font-weight: 700;
  font-size: 16px;
  font-family: 'Outfit', sans-serif;
  flex-shrink: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 0 8px;
}

/* Nav Link Button Core Style */
.sidebar-item {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center; /* Center icons when collapsed */
  color: var(--color-neutral-300); /* Elevated contrast: 5.38:1 */
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
}

.sidebar-item:hover, .sidebar-item.active {
  color: var(--text-inverse);
  background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-item svg {
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Expand Collapse Chevron Specifics */
.sidebar-toggle {
  margin-bottom: 8px;
}

/* Label text styles - hidden when collapsed */
.sidebar-label {
  opacity: 0;
  max-width: 0; /* Refined for numerical interpolation to enable smooth animations */
  overflow: hidden;
  white-space: nowrap;
  visibility: hidden;
  transition: opacity 0.15s, max-width 0.15s;
  font-size: 13px;
  font-weight: 500;
}

/* Expanded Sidebar State */
.sidebar.expanded {
  width: 200px;
}

.sidebar.expanded .logo-container {
  justify-content: flex-start;
  padding-left: 16px;
}

.sidebar.expanded .sidebar-item {
  justify-content: flex-start;
  padding-left: 12px;
}

.sidebar.expanded .sidebar-label {
  opacity: 1;
  max-width: 120px; /* Refined from auto to enable CSS transition */
  visibility: visible;
  margin-left: 10px;
}

/* Rotate Chevron Icon when expanded */
.sidebar.expanded .sidebar-toggle svg {
  transform: rotate(180deg);
}

/* Mobile Menu Toggle Button (Hidden on Desktop) */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-inverse);
  width: 44px; /* Explicit size to meet WCAG AA minimum 44px touch target */
  height: 44px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle svg {
  width: 20px; /* Scaled up from default 14px icon for mobile readability */
  height: 20px;
}

.mobile-menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Mobile Sidebar Backdrop Overlay Scrim */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.5); /* Scrim */
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Main Panel */
.main-container {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
}

/* Top Navigation Bar */
.topbar {
  height: 48px;
  background-color: var(--bg-topbar);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: var(--text-inverse);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-title {
  font-size: 16px;
  color: var(--text-inverse);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 28px;
  height: 28px;
  background-color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 11px;
  color: var(--text-inverse);
  cursor: pointer;
}

/* Dashboard Wrapper */
.content-wrapper {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 16px;
  overflow: hidden;
  background-color: var(--bg-canvas);
  gap: 12px;
  position: relative;
}

/* -------------------------------------------------------------
   VIEW PANEL ACCORDIONS
   ------------------------------------------------------------- */
.view-panel {
  display: none;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
  height: 100%;
}

.view-panel.active {
  display: flex;
}

/* -------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
  outline: none;
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--color-neutral-700);
  border-color: var(--border-default);
}

.btn-secondary:hover {
  background-color: var(--color-neutral-50);
  border-color: var(--color-neutral-300);
}

.btn-ghost {
  background: none;
  color: var(--color-neutral-500);
}

.btn-ghost:hover {
  background-color: var(--color-neutral-100);
  color: var(--color-neutral-800);
}

.btn-compact {
  padding: 4px 8px;
  font-size: 11px;
}

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 8px 12px;
}

/* -------------------------------------------------------------
   SAVED VIEW BAR & TABS
   ------------------------------------------------------------- */
.view-bar {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 16px;
  height: 48px;
  flex-shrink: 0;
}

.view-tabs {
  display: flex;
  gap: 4px;
}

.view-tab {
  background: none;
  border: none;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-neutral-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: var(--transition-fast);
  outline: none;
}

.view-tab:hover {
  color: var(--color-neutral-800);
}

.view-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

.view-badge {
  background-color: var(--color-neutral-100);
  color: var(--color-neutral-500);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 10px;
  margin-left: 4px;
}

.view-tab.active .view-badge {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
}

.view-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
}

/* -------------------------------------------------------------
   CONTROL ROW (SEARCH & FILTERS)
   ------------------------------------------------------------- */
.control-row {
  padding: 10px 16px;
  background-color: var(--color-neutral-50);
  border: 1px solid var(--border-default);
  border-top: none;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-container input {
  height: 28px;
  padding: 4px 10px 4px 28px;
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-sm);
  font-size: 12px;
  width: 160px;
  outline: none;
  transition: var(--transition-fast);
}

.search-container input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
  width: 220px;
}

.search-icon {
  position: absolute;
  left: 8px;
  color: var(--color-neutral-400);
}

.filter-select {
  height: 28px;
  padding: 2px 8px;
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-sm);
  font-size: 12px;
  outline: none;
  background-color: var(--bg-surface);
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--color-primary);
}

.active-filters {
  display: flex;
  gap: 6px;
}

.filter-chip {
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.filter-chip-remove {
  cursor: pointer;
  font-weight: bold;
}

/* -------------------------------------------------------------
   CRM DATA TABLE
   ------------------------------------------------------------- */
.table-container {
  flex-grow: 1;
  overflow: auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-top: none;
  border-bottom: none;
  position: relative;
}

.crm-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}

.crm-table th {
  background-color: var(--color-neutral-50);
  color: var(--color-neutral-600);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border-default);
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
}

.crm-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
  vertical-align: middle;
}

.crm-table tr:hover td {
  background-color: var(--color-neutral-50);
}

/* Zebra Striping */
.crm-table tr:nth-child(even) td {
  background-color: #fcfdfe;
}

/* Table Checkbox */
.cell-checkbox {
  width: 32px;
  text-align: center;
}

.custom-checkbox {
  width: 14px;
  height: 14px;
  border: 1px solid var(--color-neutral-300);
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface);
  transition: var(--transition-fast);
}

.custom-checkbox.checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.custom-checkbox.checked::after {
  content: '';
  width: 6px;
  height: 3px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg);
  margin-bottom: 1px;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge.new {
  background-color: var(--color-info-bg);
  color: var(--color-info);
}

.status-badge.active {
  background-color: var(--color-success-bg);
  color: var(--color-success);
}

.status-badge.inactive {
  background-color: var(--color-neutral-100);
  color: var(--color-neutral-500);
}

.status-badge.pending {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
}

.loading-state, .empty-state {
  text-align: center;
  padding: 40px;
  color: var(--color-neutral-400);
  font-style: italic;
}

/* -------------------------------------------------------------
   PAGINATION FOOTER
   ------------------------------------------------------------- */
.pagination-footer {
  height: 48px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.pagination-info {
  color: var(--color-neutral-500);
  font-size: 11px;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-size-label {
  color: var(--color-neutral-500);
  font-size: 11px;
}

.page-size-select {
  height: 24px;
  padding: 0 4px;
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-sm);
  font-size: 11px;
  background-color: var(--bg-surface);
  outline: none;
  cursor: pointer;
}

/* -------------------------------------------------------------
   SETTINGS PANEL UI
   ------------------------------------------------------------- */
.settings-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.settings-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.settings-header p {
  color: var(--text-muted);
  font-size: 12px;
}

.settings-section {
  border-top: 1px solid var(--border-default);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-neutral-800);
}

.section-description {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

/* -------------------------------------------------------------
   PASSWORD LOGIN LAYOUT & CARD
   ------------------------------------------------------------- */
.login-layout {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-neutral-100);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  transition: var(--transition-normal);
}

.login-card {
  width: 340px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.login-logo {
  width: 48px;
  height: 48px;
  background-color: var(--color-primary);
  border-radius: var(--radius-md);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 8px;
}

.login-card h2 {
  font-size: 20px;
  font-weight: 600;
}

.login-card p {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.login-card form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.error-msg {
  color: var(--color-error);
  font-size: 11px;
  text-align: left;
  background-color: var(--color-error-bg);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-group label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-neutral-600);
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12px;
  outline: none;
  background-color: var(--bg-surface);
  transition: var(--transition-fast);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-light);
}

/* -------------------------------------------------------------
   MODAL DIALOG (HubSpot-Style)
   ------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.5); /* Scrim overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 440px;
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-card {
  transform: scale(1);
}

.modal-header {
  padding: 14px 20px;
  background-color: var(--color-neutral-50);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-neutral-800);
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--color-neutral-400);
  cursor: pointer;
  outline: none;
}

.modal-close:hover {
  color: var(--color-neutral-600);
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-intro {
  color: var(--color-neutral-500);
  font-size: 12px;
}

.modal-footer {
  padding: 12px 20px;
  background-color: var(--color-neutral-50);
  border-top: 1px solid var(--border-default);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* -------------------------------------------------------------
   TOAST NOTIFICATION SYSTEM
   ------------------------------------------------------------- */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
}

.toast {
  width: 280px;
  background-color: var(--bg-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--color-info);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  animation: slideIn 0.3s ease;
}

.toast.success {
  border-left-color: var(--color-success);
}

.toast.warning {
  border-left-color: var(--color-warning);
}

.toast.error {
  border-left-color: var(--color-error);
}

.toast-content {
  display: flex;
  gap: 8px;
}

.toast-icon {
  margin-top: 2px;
}

.toast-message {
  font-size: 12px;
  color: var(--color-neutral-800);
}

.toast-close {
  background: none;
  border: none;
  color: var(--color-neutral-400);
  cursor: pointer;
  font-size: 14px;
  outline: none;
  margin-left: 8px;
}

.toast-close:hover {
  color: var(--color-neutral-600);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* -------------------------------------------------------------
   RESPONSIVE DESIGN BREAKPOINTS (Mobile <= 768px)
   ------------------------------------------------------------- */
@media (max-width: 768px) {
  /* Show hamburger button inside header */
  .mobile-menu-toggle {
    display: flex;
  }
  
  /* Convert Sidebar into a slide-out overlay drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: -260px; /* Shift out of viewport */
    width: 260px !important; /* Force width */
    height: 100vh;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 12px;
  }
  
  /* Slide-in class */
  .sidebar.open {
    left: 0 !important;
  }
  
  /* Mobile items always show labels inside the drawer */
  .sidebar .sidebar-item {
    justify-content: flex-start !important;
    padding-left: 16px !important;
    height: 48px !important; /* Satisfies WCAG 44px touch-target bounds */
  }
  
  .sidebar .sidebar-label {
    opacity: 1 !important;
    width: auto !important;
    visibility: visible !important;
    margin-left: 12px !important;
  }
  
  /* Hide desktop collapse toggle button on mobile */
  .sidebar-toggle {
    display: none !important;
  }

  /* Logo container styles on mobile */
  .sidebar .logo-container {
    justify-content: flex-start !important;
    padding-left: 16px !important;
  }
  
  /* Ensure data table container scrolls horizontally rather than squishing layout */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

