/* ExpandHealth V2 - Main Dashboard Styles (Light Theme) */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0F766E;
  --primary-dark: #115E59;
  --primary-light: #14B8A6;
  --secondary: #8B5CF6;
  --bg-light: #F8FAFC;
  --bg-white: #FFFFFF;
  --text-dark: #1F2937;
  --text-medium: #4B5563;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;

  /* Teal color scale (Tailwind-compatible) */
  --teal-50: #F0FDFA;
  --teal-100: #CCFBF1;
  --teal-200: #99F6E4;
  --teal-300: #5EEAD4;
  --teal-400: #2DD4BF;
  --teal-500: #14B8A6;
  --teal-600: #0D9488;
  --teal-700: #0F766E;
  --teal-800: #115E59;
  --teal-900: #134E4A;

  /* Gray color scale */
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Purple color scale */
  --purple-50: #FAF5FF;
  --purple-100: #F3E8FF;
  --purple-200: #E9D5FF;
  --purple-300: #D8B4FE;
  --purple-400: #C084FC;
  --purple-500: #A855F7;
  --purple-600: #9333EA;
  --purple-700: #7E22CE;
  --purple-800: #6B21A8;
  --purple-900: #581C87;

  /* Green color scale */
  --green-50: #F0FDF4;
  --green-100: #DCFCE7;
  --green-200: #BBF7D0;
  --green-300: #86EFAC;
  --green-400: #4ADE80;
  --green-500: #22C55E;
  --green-600: #16A34A;
  --green-700: #15803D;
  --green-800: #166534;
  --green-900: #14532D;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
}

/* ============================================
   APP LAYOUT
   ============================================ */

.app-container {
  display: flex;
  min-height: 100vh;
}

/* ============================================
   SIDEBAR - Light Theme
   ============================================ */

.sidebar {
  width: 260px;
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-light);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.logo-expand {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0.5px;
}

.logo-health {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Legacy logo support */
.logo-small {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-small .logo-icon {
  font-size: 24px;
  color: var(--primary);
}

.logo-small .logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}

.sidebar-nav {
  flex: 1;
  padding: 24px 0;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 28px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  padding: 0 20px;
  margin-bottom: 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-medium);
  text-decoration: none;
  transition: all 0.2s ease;
  margin: 0 12px;
  border-radius: 8px;
}

.nav-item > svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 1.5;
}

.nav-item:hover {
  background: var(--border-light);
  color: var(--text-dark);
}

.nav-item.active {
  background: #F0FDFA;
  color: var(--primary);
}

.nav-icon {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  overflow: hidden;
}

.nav-icon svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  stroke: var(--text-muted);
  stroke-width: 1.5;
  fill: none;
}

.nav-item:hover .nav-icon svg {
  stroke: var(--text-dark);
}

.nav-item.active .nav-icon svg {
  stroke: var(--primary);
}

/* Direct SVG icons in nav-item (without .nav-icon wrapper) */
.nav-item > svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  flex-shrink: 0;
  stroke: var(--text-muted);
  stroke-width: 1.5;
  fill: none;
}

.nav-item:hover > svg {
  stroke: var(--text-dark);
}

.nav-item.active > svg {
  stroke: var(--primary);
}

/* Ensure all SVGs in sidebar nav are properly sized */
.sidebar-nav svg {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  flex-shrink: 0 !important;
}

/* Exception for dropdown arrow - smaller */
.nav-dropdown-arrow {
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  margin-left: auto !important;
  transition: transform 0.2s ease;
}

/* Nav dropdown menu */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-medium);
  text-decoration: none;
  transition: all 0.2s ease;
  margin: 0 12px;
  border-radius: 8px;
  cursor: pointer;
  width: calc(100% - 24px);
  background: none;
  border: none;
  font-size: inherit;
  font-family: inherit;
  text-align: left;
}

.nav-dropdown-trigger > svg:first-child {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 1.5;
}

.nav-dropdown-trigger > svg {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  flex-shrink: 0;
}

.nav-dropdown-trigger:hover {
  background: var(--border-light);
  color: var(--text-dark);
}

.nav-dropdown-trigger.active {
  background: #F0FDFA;
  color: var(--primary);
}

.nav-dropdown.open .nav-dropdown-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  left: 100%;
  top: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.05);
  min-width: 220px;
  padding: 12px 0 12px 8px;
  z-index: 1001;
  display: none;
  margin-left: 8px;
}

/* Bridge to keep hover when moving to dropdown */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 0;
  width: 20px;
  height: 100%;
}

/* Original menu is hidden - portal approach handles display */
/* The nav-dropdown-portal (appended to body) shows the menu content */
.nav-dropdown.open .nav-dropdown-menu {
  display: none;
}

.nav-dropdown-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  padding: 8px 16px 4px;
}

.nav-dropdown-section {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  padding: 12px 16px 4px;
  margin-top: 4px;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--text-medium);
  text-decoration: none;
  transition: all 0.15s ease;
  font-size: 14px;
}

.nav-dropdown-item:hover {
  background: var(--border-light);
  color: var(--text-dark);
}

.nav-dropdown-item.active {
  background: #F0FDFA;
  color: var(--primary);
}

/* Portal menu styles - when appended to body to escape overflow/transform constraints */
.nav-dropdown-portal {
  position: fixed !important;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.05);
  min-width: 220px;
  padding: 12px 0 12px 8px;
  z-index: 99999;
  display: none;
}

.nav-dropdown-portal.open {
  display: block;
}

/* Bridge to keep hover when moving to portal dropdown */
.nav-dropdown-portal::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 0;
  width: 20px;
  height: 100%;
}

/* Portal inherits dropdown item styles */
.nav-dropdown-portal .nav-dropdown-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  padding: 8px 16px 4px;
}

.nav-dropdown-portal .nav-dropdown-section {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  padding: 12px 16px 4px;
  margin-top: 4px;
}

.nav-dropdown-portal .nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--text-medium);
  text-decoration: none;
  transition: all 0.15s ease;
  font-size: 14px;
  cursor: pointer;
}

.nav-dropdown-portal .nav-dropdown-item:hover {
  background: var(--border-light);
  color: var(--text-dark);
}

.nav-dropdown-portal .nav-dropdown-item.active {
  background: #F0FDFA;
  color: var(--primary);
}

.nav-text {
  font-size: 14px;
  font-weight: 500;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border-light);
}

.support-links {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.support-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.support-link:hover {
  color: var(--primary-dark, #0d9488);
}

.support-link svg {
  width: 16px;
  height: 16px;
}

/* Support Modal */
.support-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.support-modal-overlay.active {
  display: flex;
}

.support-modal {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.support-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.support-modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e3a5f;
}

.support-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

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

.support-modal-body {
  padding: 24px;
}

.support-form-group {
  margin-bottom: 20px;
}

.support-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.support-form-label .required {
  color: #dc2626;
}

.support-form-input,
.support-form-select,
.support-form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.875rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.support-form-input:focus,
.support-form-select:focus,
.support-form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.support-form-textarea {
  min-height: 120px;
  resize: vertical;
}

.support-form-file {
  padding: 8px 0;
}

.support-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.support-btn-cancel {
  padding: 10px 20px;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
}

.support-btn-cancel:hover {
  background: var(--gray-50);
}

.support-btn-submit {
  padding: 10px 20px;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  cursor: pointer;
}

.support-btn-submit:hover {
  background: var(--primary-dark, #0d9488);
}

.ask-ai-btn {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-medium);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.ask-ai-btn:hover {
  background: #F0FDFA;
  border-color: var(--primary-light);
  color: var(--primary);
}

.ask-ai-btn svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   MAIN CONTENT - Light Theme
   ============================================ */

.main-content {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg-light);
}

/* Header */
.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-left h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.breadcrumb {
  font-size: 14px;
  color: var(--text-muted);
}

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

.icon-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--border-light);
  color: var(--text-dark);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.user-role {
  font-size: 12px;
  color: var(--text-muted);
}

/* Content Area */
.content {
  flex: 1;
  padding: 32px;
  max-width: 1400px;
}

.welcome-card {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  padding: 32px;
  border-radius: 16px;
  margin-bottom: 32px;
  color: white;
  box-shadow: 0 4px 20px rgba(15, 118, 110, 0.25);
}

.welcome-card h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.welcome-card p {
  font-size: 16px;
  opacity: 0.9;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: var(--primary-light);
  box-shadow: 0 4px 16px rgba(15, 118, 110, 0.1);
}

.stat-icon {
  width: 56px;
  height: 56px;
  background: #F0FDFA;
  border: 1px solid #CCFBF1;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--primary);
  stroke-width: 1.5;
  fill: none;
}

.stat-info h3 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.stat-info p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Quick Actions */
.quick-actions {
  margin-bottom: 32px;
}

.quick-actions h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.action-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.action-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(15, 118, 110, 0.1);
}

.action-icon {
  width: 48px;
  height: 48px;
  background: #F0FDFA;
  border: 1px solid #CCFBF1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.action-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--primary);
  stroke-width: 1.5;
  fill: none;
}

.action-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.action-card p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Dev Notice */
.dev-notice {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 14px;
  padding: 24px;
}

.dev-notice h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #B45309;
}

.dev-notice p {
  margin-bottom: 8px;
  color: var(--text-medium);
}

.dev-notice ul {
  margin-top: 12px;
  padding-left: 20px;
}

.dev-notice li {
  margin-bottom: 4px;
  color: var(--text-medium);
}

/* User Menu Dropdown (matching clients page) */
.user-menu-wrapper {
  position: relative;
}

.user-avatar-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.2s;
}

.user-avatar-btn:hover {
  transform: scale(1.05);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.dropdown-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.dropdown-user-info {
  display: flex;
  flex-direction: column;
}

.dropdown-user-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
}

.dropdown-user-email {
  font-size: 13px;
  color: var(--text-muted);
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-medium);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.user-dropdown-item:hover {
  background: var(--bg-light);
  color: var(--text-dark);
}

.user-dropdown-item svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.user-dropdown-item.logout-item {
  color: var(--error);
}

.user-dropdown-item.logout-item:hover {
  background: #FEF2F2;
  color: #B91C1C;
}

/* ============================================
   TENANT SWITCHER
   ============================================ */

.tenant-switcher-wrapper {
  position: relative;
  margin-right: 16px;
}

.tenant-switcher-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  color: var(--text-dark);
  font-weight: 500;
}

.tenant-switcher-btn:hover {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(15, 118, 110, 0.1);
}

.tenant-switcher-btn .tenant-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.tenant-switcher-btn .tenant-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-switcher-btn .chevron-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.tenant-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  overflow: hidden;
}

.tenant-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.tenant-dropdown-header {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-light);
}

.tenant-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tenant-dropdown-item:hover {
  background: var(--bg-light);
}

.tenant-dropdown-item.active {
  background: rgba(15, 118, 110, 0.05);
}

.tenant-dropdown-item .tenant-item-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-dropdown-item .tenant-item-role {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-light);
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: capitalize;
}

.tenant-dropdown-item .check-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.tenant-dropdown-item.active .tenant-item-name {
  color: var(--primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
  .sidebar {
    width: 80px;
  }

  .sidebar .logo-text,
  .sidebar .nav-text,
  .sidebar .nav-section-title,
  .sidebar .ask-ai-btn span:last-child {
    display: none;
  }

  .sidebar .nav-item {
    justify-content: center;
    padding: 16px;
    margin: 0 8px;
  }

  .sidebar .nav-icon {
    margin: 0;
  }

  .main-content {
    margin-left: 80px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

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

  .sidebar.mobile-open .logo-text,
  .sidebar.mobile-open .nav-text,
  .sidebar.mobile-open .nav-section-title,
  .sidebar.mobile-open .ask-ai-btn span:last-child {
    display: block;
  }

  .sidebar.mobile-open .nav-item {
    justify-content: flex-start;
    padding: 12px 20px;
    margin: 0 12px;
  }

  .main-content {
    margin-left: 0;
  }

  .content {
    padding: 20px;
  }

  .header {
    padding: 16px 20px;
  }

  .user-menu .user-info {
    display: none;
  }

  /* Mobile Menu Button */
  .mobile-menu-btn {
    display: flex;
    width: 40px;
    height: 40px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-medium);
    transition: all 0.2s ease;
  }

  .mobile-menu-btn:hover {
    background: var(--border-light);
    color: var(--text-dark);
  }

  .mobile-menu-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
  }

  /* Mobile Overlay */
  .mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
  }

  .mobile-overlay.active {
    display: block;
  }

  /* Mobile Close Button in Sidebar */
  .mobile-close-btn {
    display: flex;
    position: absolute;
    top: 20px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    z-index: 101;
  }

  .mobile-close-btn:hover {
    background: var(--border);
    color: var(--text-dark);
  }

  .mobile-close-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
  }
}

/* Hide mobile elements on desktop */
@media (min-width: 769px) {
  .mobile-menu-btn,
  .mobile-overlay,
  .mobile-close-btn {
    display: none !important;
  }
}
