/* ============================================================
   NigeriaHealth HMO Platform — Main Stylesheet
   Bootstrap 5.3 companion | v1.0.0
   ============================================================ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  --hmo-primary:        #1a56db;
  --hmo-primary-dark:   #1e429f;
  --hmo-primary-light:  #ebf5ff;
  --hmo-secondary:      #7e3af2;
  --hmo-success:        #057a55;
  --hmo-warning:        #c27803;
  --hmo-danger:         #c81e1e;
  --hmo-info:           #1c64f2;
  --hmo-light:          #f8f9fa;

  /* Sidebar */
  --hmo-sidebar-bg:       #0f1f35;
  --hmo-sidebar-text:     #94a3b8;
  --hmo-sidebar-hover:    rgba(255,255,255,0.06);
  --hmo-sidebar-active:   rgba(26,86,219,0.2);
  --hmo-sidebar-border:   rgba(255,255,255,0.07);
  --hmo-sidebar-w:        258px;
  --hmo-topbar-h:         60px;

  /* Surfaces */
  --hmo-body-bg:          #f1f5f9;
  --hmo-surface:          #ffffff;
  --hmo-surface-2:        #f8fafc;
  --hmo-border:           #e2e8f0;
  --hmo-border-hover:     #cbd5e1;

  /* Text */
  --hmo-text-primary:   #0f172a;
  --hmo-text-secondary: #475569;
  --hmo-text-light:     #f8f9fa;
  --hmo-text-muted:     #94a3b8;

  /* Shadows */
  --hmo-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --hmo-shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --hmo-shadow-lg: 0 8px 32px rgba(0,0,0,0.14);

  /* Border radii */
  --hmo-radius-sm:  6px;
  --hmo-radius-md: 10px;
  --hmo-radius-lg: 16px;
  --hmo-radius-xl: 22px;

  /* Transition */
  --hmo-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.hmo-body {
  font-family: 'DM Sans', 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  background: var(--hmo-body-bg);
  color: var(--hmo-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── App Shell ───────────────────────────────────────────────── */
.hmo-app-shell {
  display: flex;
  min-height: 100vh;
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════════════════════════ */
.hmo-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--hmo-sidebar-w);
  height: 100vh;
  background: var(--hmo-sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 1040;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--hmo-transition);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.hmo-sidebar::-webkit-scrollbar { width: 4px; }
.hmo-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

/* Brand */
.hmo-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.1rem 1rem;
  border-bottom: 1px solid var(--hmo-sidebar-border);
  text-decoration: none;
}
.hmo-brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--hmo-primary) 0%, var(--hmo-secondary) 100%);
  border-radius: var(--hmo-radius-md);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(26,86,219,0.4);
}
.hmo-brand-name {
  font-family: 'Sora', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #f1f5f9;
  display: block;
  line-height: 1.2;
}
.hmo-brand-tagline {
  font-size: 0.65rem;
  color: var(--hmo-sidebar-text);
  display: block;
  opacity: 0.6;
}

/* User mini-card */
.hmo-sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--hmo-sidebar-border);
}
.hmo-user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, var(--hmo-secondary) 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.hmo-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hmo-avatar-initials {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.hmo-user-info { min-width: 0; }
.hmo-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f1f5f9;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hmo-user-role.badge {
  font-size: 0.65rem;
  font-weight: 500;
  background: rgba(255,255,255,0.1);
  color: var(--hmo-sidebar-text);
  padding: 0.15em 0.5em;
  border-radius: 4px;
}

/* Navigation */
.hmo-nav { padding: 0.5rem 0; flex: 1; }

.hmo-nav-section {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(148,163,184,0.5);
  padding: 1rem 1.1rem 0.35rem;
}

.hmo-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.52rem 1.1rem;
  color: var(--hmo-sidebar-text);
  text-decoration: none;
  font-size: 0.855rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all var(--hmo-transition);
  white-space: nowrap;
  overflow: hidden;
}
.hmo-nav-link:hover {
  background: var(--hmo-sidebar-hover);
  color: #f1f5f9;
  border-left-color: rgba(26,86,219,0.3);
}
.hmo-nav-link.active {
  background: var(--hmo-sidebar-active);
  color: #fff;
  border-left-color: var(--hmo-primary);
}
.hmo-nav-link i {
  font-size: 1rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.75;
}
.hmo-nav-link.active i { opacity: 1; }

.hmo-nav-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15em 0.45em;
  border-radius: 10px;
  line-height: 1.4;
}
.hmo-nav-badge.badge-warning { background: #fef3c7; color: #92400e; }
.hmo-nav-badge.badge-danger  { background: #fee2e2; color: #991b1b; }

.hmo-sidebar-footer {
  padding: 0.85rem 1.1rem;
  border-top: 1px solid var(--hmo-sidebar-border);
  color: var(--hmo-text-muted);
}

/* Sidebar toggle button */
.hmo-sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--hmo-radius-sm);
  color: var(--hmo-text-secondary);
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  transition: background var(--hmo-transition);
}
.hmo-sidebar-toggle:hover { background: var(--hmo-surface-2); color: var(--hmo-text-primary); }

/* ══════════════════════════════════════════════════════════════
   MAIN CONTENT
══════════════════════════════════════════════════════════════ */
.hmo-main {
  flex: 1;
  margin-left: var(--hmo-sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin var(--hmo-transition);
}

/* Topbar */
.hmo-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--hmo-surface);
  border-bottom: 1px solid var(--hmo-border);
  height: var(--hmo-topbar-h);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 0.75rem;
  box-shadow: var(--hmo-shadow-sm);
}

.hmo-breadcrumb .breadcrumb { margin: 0; }
.hmo-breadcrumb .breadcrumb-item { font-size: 0.8rem; color: var(--hmo-text-secondary); }
.hmo-breadcrumb .breadcrumb-item a { color: var(--hmo-primary); text-decoration: none; }
.hmo-breadcrumb .breadcrumb-item a:hover { text-decoration: underline; }
.hmo-breadcrumb .breadcrumb-item.active { color: var(--hmo-text-muted); }

.hmo-topbar-actions { display: flex; align-items: center; gap: 0.35rem; }

.hmo-topbar-btn {
  width: 36px; height: 36px;
  border-radius: var(--hmo-radius-sm);
  border: 1px solid var(--hmo-border);
  background: var(--hmo-surface);
  color: var(--hmo-text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--hmo-transition);
}
.hmo-topbar-btn:hover { background: var(--hmo-surface-2); border-color: var(--hmo-border-hover); color: var(--hmo-text-primary); }

.hmo-notif-dot {
  position: absolute;
  top: 4px; right: 4px;
  width: 7px; height: 7px;
  background: var(--hmo-danger);
  border-radius: 50%;
  border: 1.5px solid var(--hmo-surface);
}
.hmo-notif-panel { min-width: 300px; }

.hmo-topbar-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--hmo-border);
  border-radius: var(--hmo-radius-sm);
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--hmo-text-primary);
  transition: all var(--hmo-transition);
}
.hmo-topbar-user:hover { background: var(--hmo-surface-2); border-color: var(--hmo-border-hover); }
.hmo-topbar-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hmo-primary) 0%, var(--hmo-secondary) 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hmo-topbar-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Page content */
.hmo-content {
  flex: 1;
  padding: 1.5rem;
  max-width: 100%;
}

/* ══════════════════════════════════════════════════════════════
   CARDS & KPI COMPONENTS
══════════════════════════════════════════════════════════════ */
.hmo-card {
  background: var(--hmo-surface);
  border-radius: var(--hmo-radius-lg);
  border: 1px solid var(--hmo-border);
  box-shadow: var(--hmo-shadow-sm);
  overflow: hidden;
}
.hmo-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--hmo-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--hmo-surface);
}
.hmo-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--hmo-text-primary);
  margin: 0;
}
.hmo-card-body { padding: 1.25rem; }

/* KPI card */
.hmo-kpi {
  background: var(--hmo-surface);
  border-radius: var(--hmo-radius-lg);
  border: 1px solid var(--hmo-border);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: box-shadow var(--hmo-transition), transform var(--hmo-transition);
}
.hmo-kpi:hover { box-shadow: var(--hmo-shadow-md); transform: translateY(-1px); }
.hmo-kpi-icon {
  width: 48px; height: 48px;
  border-radius: var(--hmo-radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.hmo-kpi-icon.blue   { background: #dbeafe; color: #1d4ed8; }
.hmo-kpi-icon.green  { background: #d1fae5; color: #065f46; }
.hmo-kpi-icon.orange { background: #fed7aa; color: #c2410c; }
.hmo-kpi-icon.purple { background: #ede9fe; color: #7c3aed; }
.hmo-kpi-icon.red    { background: #fee2e2; color: #b91c1c; }
.hmo-kpi-icon.teal   { background: #ccfbf1; color: #0f766e; }

.hmo-kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hmo-text-secondary);
}
.hmo-kpi-value {
  font-family: 'Sora', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--hmo-text-primary);
  line-height: 1.15;
  margin: 0.2rem 0 0.15rem;
}
.hmo-kpi-sub { font-size: 0.75rem; color: var(--hmo-text-muted); }
.hmo-kpi-change { font-size: 0.75rem; display: inline-flex; align-items: center; gap: 0.2rem; border-radius: 4px; padding: 0.1em 0.35em; font-weight: 600; }
.hmo-kpi-change.up { background: #d1fae5; color: #065f46; }
.hmo-kpi-change.dn { background: #fee2e2; color: #991b1b; }

/* ══════════════════════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════════════════════ */
.hmo-table {
  font-size: 0.83rem;
  margin: 0;
}
.hmo-table thead th {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hmo-text-secondary);
  border-bottom: 2px solid var(--hmo-border);
  background: var(--hmo-surface-2);
  padding: 0.65rem 1rem;
  white-space: nowrap;
}
.hmo-table tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-color: var(--hmo-border);
  color: var(--hmo-text-primary);
}
.hmo-table tbody tr { transition: background var(--hmo-transition); }
.hmo-table tbody tr:hover { background: var(--hmo-surface-2); }
.hmo-table .member-code { font-family: monospace; font-size: 0.8rem; font-weight: 600; color: var(--hmo-primary); }

/* ══════════════════════════════════════════════════════════════
   BADGES & STATUS
══════════════════════════════════════════════════════════════ */
.hmo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22em 0.6em;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
}
.hmo-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; display: inline-block; }

.hmo-badge-active    { background: #d1fae5; color: #065f46; }
.hmo-badge-inactive  { background: #f1f5f9; color: #64748b; }
.hmo-badge-pending   { background: #fef3c7; color: #92400e; }
.hmo-badge-approved  { background: #d1fae5; color: #065f46; }
.hmo-badge-denied    { background: #fee2e2; color: #991b1b; }
.hmo-badge-submitted { background: #dbeafe; color: #1e40af; }
.hmo-badge-review    { background: #ede9fe; color: #7c3aed; }
.hmo-badge-paid      { background: #d1fae5; color: #065f46; }
.hmo-badge-overdue   { background: #fee2e2; color: #991b1b; }
.hmo-badge-partial   { background: #fef3c7; color: #92400e; }
.hmo-badge-flagged   { background: #fee2e2; color: #991b1b; }
.hmo-badge-suspended { background: #fce7f3; color: #9d174d; }

/* ══════════════════════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════════════════════ */
.hmo-form-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hmo-primary);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--hmo-primary-light);
  margin-bottom: 1.25rem;
}

.form-label { font-size: 0.82rem; font-weight: 600; color: #374151; margin-bottom: 0.3rem; }
.form-text  { font-size: 0.75rem; color: var(--hmo-text-muted); }

.form-control, .form-select {
  font-size: 0.875rem;
  border-color: var(--hmo-border);
  border-radius: var(--hmo-radius-sm);
  transition: border-color var(--hmo-transition), box-shadow var(--hmo-transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--hmo-primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,0.12);
  outline: none;
}
.form-control.is-invalid { border-color: var(--hmo-danger); }
.invalid-feedback { font-size: 0.78rem; }

/* ══════════════════════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════════════════════ */
.btn { font-size: 0.85rem; font-weight: 600; border-radius: var(--hmo-radius-sm); transition: all var(--hmo-transition); }
.btn-primary { background: var(--hmo-primary); border-color: var(--hmo-primary); }
.btn-primary:hover { background: var(--hmo-primary-dark); border-color: var(--hmo-primary-dark); }
.btn-sm { font-size: 0.78rem; padding: 0.3rem 0.7rem; }

/* ══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
══════════════════════════════════════════════════════════════ */
.hmo-toast-container {
  position: fixed;
  top: calc(var(--hmo-topbar-h) + 0.75rem);
  right: 1rem;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
}
.hmo-toast {
  border-radius: var(--hmo-radius-md) !important;
  box-shadow: var(--hmo-shadow-md);
  font-size: 0.85rem;
}
.hmo-toast-success { background: #d1fae5; color: #065f46; }
.hmo-toast-error   { background: #fee2e2; color: #991b1b; }
.hmo-toast-warning { background: #fef3c7; color: #92400e; }
.hmo-toast-info    { background: #dbeafe; color: #1e40af; }
.hmo-toast .btn-close-white { filter: invert(0.5); }

/* ══════════════════════════════════════════════════════════════
   AUTH PAGES
══════════════════════════════════════════════════════════════ */
body.hmo-auth-page { background: linear-gradient(135deg, #0f1f35 0%, #1e3a5f 100%); }

.hmo-auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.hmo-auth-brand {
  flex: 0 0 420px;
  background: linear-gradient(160deg, #0f1f35 0%, #1a56db 70%, #7e3af2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
}
.hmo-auth-brand::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  top: -100px; right: -100px;
}
.hmo-auth-brand::after {
  content: '';
  position: absolute;
  width: 250px; height: 250px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  bottom: -50px; left: -50px;
}
.hmo-auth-brand-inner { position: relative; z-index: 1; color: #fff; }

.hmo-auth-logo {
  width: 72px; height: 72px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  color: #fff;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}
.hmo-auth-brand-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.hmo-auth-brand-sub { color: rgba(255,255,255,0.7); font-size: 0.88rem; line-height: 1.6; margin-bottom: 2rem; }

.hmo-auth-features { display: flex; flex-direction: column; gap: 0.75rem; }
.hmo-auth-feature {
  display: flex; align-items: center; gap: 0.75rem;
  background: rgba(255,255,255,0.08);
  border-radius: var(--hmo-radius-md);
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
}
.hmo-auth-feature i { color: #a5f3fc; font-size: 1rem; }

/* Auth form panel */
.hmo-auth-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: #f8fafc;
}
.hmo-auth-form-wrap { width: 100%; max-width: 420px; }
.hmo-auth-form-title { font-family: 'Sora', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--hmo-text-primary); margin-bottom: 0.35rem; }
.hmo-auth-form-sub { font-size: 0.85rem; color: var(--hmo-text-secondary); margin-bottom: 1.75rem; }

.hmo-input-group .input-group-text { background: var(--hmo-surface-2); border-color: var(--hmo-border); color: var(--hmo-text-muted); }

.hmo-auth-submit {
  width: 100%;
  padding: 0.7rem;
  background: var(--hmo-primary);
  color: #fff;
  border: none;
  border-radius: var(--hmo-radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--hmo-transition);
}
.hmo-auth-submit:hover { background: var(--hmo-primary-dark); }

/* ══════════════════════════════════════════════════════════════
   SEARCH MODAL
══════════════════════════════════════════════════════════════ */
.hmo-search-modal { border-radius: var(--hmo-radius-xl); overflow: hidden; border: none; }
.hmo-search-bar { display: flex; align-items: center; padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--hmo-border); }
.hmo-search-icon { font-size: 1.1rem; color: var(--hmo-text-muted); margin-right: 0.75rem; }
.hmo-search-input { flex: 1; border: none; outline: none; font-size: 1rem; background: transparent; color: var(--hmo-text-primary); }
.hmo-search-kbd { font-size: 0.7rem; background: var(--hmo-surface-2); border: 1px solid var(--hmo-border); border-radius: 4px; padding: 0.15rem 0.4rem; color: var(--hmo-text-muted); }
.hmo-search-results { min-height: 200px; padding: 0.5rem; }
.hmo-search-hint { display: flex; align-items: center; gap: 0.6rem; padding: 1rem; font-size: 0.82rem; color: var(--hmo-text-muted); }

/* ══════════════════════════════════════════════════════════════
   UTILITY CLASSES
══════════════════════════════════════════════════════════════ */
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.text-naira::before { content: '₦'; }
.font-mono { font-family: 'Fira Code', 'Courier New', monospace; }
.divider-v { width: 1px; background: var(--hmo-border); align-self: stretch; margin: 0 0.5rem; }

/* Scrollable table container */
.table-responsive-hmo { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Empty states */
.hmo-empty-state { text-align: center; padding: 3rem 1rem; }
.hmo-empty-state i { font-size: 3rem; color: var(--hmo-border); margin-bottom: 1rem; display: block; }
.hmo-empty-state h6 { font-size: 0.9rem; font-weight: 600; color: var(--hmo-text-secondary); }
.hmo-empty-state p { font-size: 0.82rem; color: var(--hmo-text-muted); }

/* Progress bars */
.progress { height: 6px; border-radius: 99px; background: var(--hmo-border); }
.progress-bar { border-radius: 99px; }

/* Avatar list */
.hmo-avatar-stack { display: flex; }
.hmo-avatar-stack .hmo-avatar { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; margin-right: -8px; font-size: 0.65rem; }

/* Page header */
.hmo-page-header { margin-bottom: 1.5rem; }
.hmo-page-header h1 { font-family: 'Sora', sans-serif; font-size: 1.4rem; font-weight: 700; color: var(--hmo-text-primary); margin: 0; }
.hmo-page-header p { font-size: 0.83rem; color: var(--hmo-text-secondary); margin: 0.2rem 0 0; }

/* Member ID card */
.hmo-id-card {
  background: linear-gradient(135deg, #0f1f35 0%, #1a56db 60%, #7e3af2 100%);
  border-radius: var(--hmo-radius-xl);
  padding: 1.75rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hmo-id-card::before {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  top: -60px; right: -60px;
}
.hmo-id-card .id-label { font-size: 0.68rem; opacity: 0.65; text-transform: uppercase; letter-spacing: 0.08em; }
.hmo-id-card .id-value { font-family: 'Sora', sans-serif; font-size: 1.05rem; font-weight: 700; }
.hmo-id-card .id-code { font-family: monospace; font-size: 1.2rem; font-weight: 800; letter-spacing: 0.05em; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 1199.98px) {
  :root { --hmo-sidebar-w: 240px; }
}

@media (max-width: 991.98px) {
  .hmo-sidebar {
    transform: translateX(calc(-1 * var(--hmo-sidebar-w)));
    box-shadow: none;
  }
  .hmo-sidebar.show {
    transform: translateX(0);
    box-shadow: var(--hmo-shadow-lg);
  }
  .hmo-main { margin-left: 0 !important; }

  .hmo-auth-brand { display: none; }
  .hmo-auth-panel { padding: 2rem 1rem; }

  /* Overlay when sidebar open */
  .hmo-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1039;
    backdrop-filter: blur(2px);
  }
  .hmo-sidebar-overlay.show { display: block; }
}

@media (max-width: 575.98px) {
  .hmo-content { padding: 1rem; }
  .hmo-kpi-value { font-size: 1.4rem; }
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 2 ADDITIONS — Component Styles
══════════════════════════════════════════════════════════════ */

/* ── Page Headers ──────────────────────────────────────────── */
.hmo-page-header {
  margin-bottom: 1.5rem;
}
.hmo-page-title {
  font-family: var(--hmo-font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--hmo-text-primary);
  margin-bottom: 0.25rem;
}

/* ── KPI Stat Cards ────────────────────────────────────────── */
.hmo-stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--hmo-surface);
  border-radius: var(--hmo-radius-lg);
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--hmo-border);
  transition: box-shadow 0.2s;
}
.hmo-stat-card:hover { box-shadow: var(--hmo-shadow-md); }
.hmo-stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--hmo-radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.hmo-stat-primary .hmo-stat-icon { background: rgba(26,86,219,0.12); color: var(--hmo-primary); }
.hmo-stat-success .hmo-stat-icon { background: rgba(5,122,85,0.12); color: var(--hmo-success); }
.hmo-stat-warning .hmo-stat-icon { background: rgba(194,120,3,0.12); color: var(--hmo-warning); }
.hmo-stat-danger  .hmo-stat-icon { background: rgba(200,30,30,0.12); color: var(--hmo-danger); }
.hmo-stat-info    .hmo-stat-icon { background: rgba(28,100,262,0.12); color: var(--hmo-info); }
.hmo-stat-value   { font-size: 1.25rem; font-weight: 700; color: var(--hmo-text-primary); line-height: 1.2; }
.hmo-stat-title   { font-size: 0.78rem; color: var(--hmo-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.hmo-stat-change  { font-size: 0.75rem; color: var(--hmo-text-muted); margin-top: 0.1rem; }

/* ── Filter Bar ─────────────────────────────────────────────── */
.hmo-filter-bar {
  background: var(--hmo-surface);
  border: 1px solid var(--hmo-border);
  border-radius: var(--hmo-radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center;
}
.hmo-filter-search {
  position: relative; flex: 1; min-width: 240px;
}
.hmo-filter-search > i {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  color: var(--hmo-text-muted); font-size: 0.9rem;
}
.hmo-filter-search .form-control { padding-left: 2.25rem; }
.hmo-filter-select { max-width: 180px; min-width: 140px; }

/* ── Table Enhancements ─────────────────────────────────────── */
.hmo-table { margin-bottom: 0; }
.hmo-table thead th {
  background: var(--hmo-surface-2);
  font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.05em; font-weight: 600;
  color: var(--hmo-text-muted);
  border-bottom: 2px solid var(--hmo-border);
  padding: 0.75rem 1rem;
  white-space: nowrap;
}
.hmo-table tbody td { padding: 0.875rem 1rem; vertical-align: middle; border-bottom: 1px solid var(--hmo-border); font-size: 0.875rem; }
.hmo-table tbody tr:last-child td { border-bottom: none; }
.hmo-table tbody tr:hover { background: var(--hmo-surface-2); }
.hmo-table tfoot td { padding: 0.75rem 1rem; font-size: 0.875rem; }
.hmo-row-danger  { background: rgba(200,30,30,0.04) !important; }
.hmo-row-warning { background: rgba(194,120,3,0.05) !important; }
.hmo-table-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--hmo-primary-light); color: var(--hmo-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; flex-shrink: 0;
}

/* ── Status / Claim / Auth Badges ──────────────────────────── */
.hmo-badge-status-active     { background: rgba(5,122,85,0.12); color: var(--hmo-success); }
.hmo-badge-status-inactive   { background: var(--hmo-surface-2); color: var(--hmo-text-muted); }
.hmo-badge-status-suspended  { background: rgba(194,120,3,0.12); color: var(--hmo-warning); }
.hmo-badge-status-terminated { background: rgba(200,30,30,0.12); color: var(--hmo-danger); }
.hmo-badge-status-pending    { background: rgba(28,100,242,0.12); color: var(--hmo-info); }
.hmo-badge-status-paid       { background: rgba(5,122,85,0.12); color: var(--hmo-success); }

.hmo-badge-claim-submitted    { background: rgba(28,100,242,0.12); color: var(--hmo-info); }
.hmo-badge-claim-under_review { background: rgba(194,120,3,0.12); color: var(--hmo-warning); }
.hmo-badge-claim-partial      { background: rgba(5,122,85,0.12); color: var(--hmo-success); }
.hmo-badge-claim-approved     { background: rgba(5,122,85,0.12); color: var(--hmo-success); }
.hmo-badge-claim-paid         { background: rgba(5,122,85,0.2); color: var(--hmo-success); }
.hmo-badge-claim-denied       { background: rgba(200,30,30,0.12); color: var(--hmo-danger); }
.hmo-badge-claim-flagged      { background: rgba(200,30,30,0.2); color: var(--hmo-danger); }

.hmo-badge-auth-pending   { background: rgba(28,100,242,0.12); color: var(--hmo-info); }
.hmo-badge-auth-approved  { background: rgba(5,122,85,0.12); color: var(--hmo-success); }
.hmo-badge-auth-denied    { background: rgba(200,30,30,0.12); color: var(--hmo-danger); }
.hmo-badge-auth-expired   { background: var(--hmo-surface-2); color: var(--hmo-text-muted); }

.hmo-badge-invoice-draft   { background: var(--hmo-surface-2); color: var(--hmo-text-muted); }
.hmo-badge-invoice-issued    { background: rgba(28,100,242,0.12); color: var(--hmo-info); }
.hmo-badge-invoice-paid    { background: rgba(5,122,85,0.12); color: var(--hmo-success); }
.hmo-badge-invoice-overdue { background: rgba(200,30,30,0.12); color: var(--hmo-danger); }

.hmo-badge-tier-t0    { background: rgba(126,58,252,0.12); color: var(--hmo-secondary); }
.hmo-badge-tier-t1    { background: rgba(126,58,242,0.12); color: var(--hmo-secondary); }
.hmo-badge-tier-t2    { background: rgba(26,86,219,0.12); color: var(--hmo-primary); }
.hmo-badge-tier-t3    { background: rgba(5,122,85,0.12); color: var(--hmo-success); }
.hmo-badge-tier-t4    { background: var(--hmo-surface-2); color: var(--hmo-text-muted); }

.hmo-badge-plan-individual { background: rgba(26,86,219,0.1); color: var(--hmo-primary); }
.hmo-badge-plan-family     { background: rgba(5,122,85,0.1); color: var(--hmo-success); }
.hmo-badge-plan-group      { background: rgba(126,58,242,0.1); color: var(--hmo-secondary); }

/* ── Member ID Card ─────────────────────────────────────────── */
.hmo-id-card {
  background: linear-gradient(135deg, var(--hmo-sidebar-bg) 0%, #1e3a5f 100%);
  border-radius: 16px;
  color: white;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  aspect-ratio: 1.586;
}
.hmo-id-card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem 0.5rem;
}
.hmo-id-brand { font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; }
.hmo-id-type  { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.7; }
.hmo-id-body  { display: flex; align-items: center; gap: 1rem; padding: 0.5rem 1.25rem 1rem; }
.hmo-id-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.3);
}
.hmo-id-name   { font-size: 1rem; font-weight: 700; }
.hmo-id-number { font-size: 0.8rem; opacity: 0.8; font-family: monospace; letter-spacing: 0.05em; }
.hmo-id-plan   { font-size: 0.7rem; opacity: 0.7; margin-top: 2px; }
.hmo-id-footer {
  display: flex; justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: rgba(255,255,255,0.08);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hmo-id-footer-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.6; }
.hmo-id-footer-value { font-size: 0.8rem; font-weight: 600; }

/* ── Member Detail Avatar ───────────────────────────────────── */
.hmo-member-detail-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--hmo-primary-light); color: var(--hmo-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; flex-shrink: 0;
}

/* ── Detail Rows (key-value display) ────────────────────────── */
.hmo-detail-row {
  display: flex; align-items: baseline; gap: 0.5rem;
  padding: 0.5rem 0; border-bottom: 1px solid var(--hmo-border);
}
.hmo-detail-row:last-child { border-bottom: none; }
.hmo-detail-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--hmo-text-muted); min-width: 140px; flex-shrink: 0; }
.hmo-detail-value { font-size: 0.875rem; color: var(--hmo-text-primary); flex: 1; }

/* ── Tabs ───────────────────────────────────────────────────── */
.hmo-tabs { border-bottom: 2px solid var(--hmo-border); gap: 0.25rem; flex-wrap: wrap; }
.hmo-tab {
  padding: 0.6rem 1.1rem; border: none; background: none;
  font-size: 0.875rem; font-weight: 500; color: var(--hmo-text-muted);
  border-radius: var(--hmo-radius) var(--hmo-radius) 0 0;
  cursor: pointer; transition: all 0.15s;
}
.hmo-tab:hover  { color: var(--hmo-primary); background: var(--hmo-primary-light); }
.hmo-tab.active { color: var(--hmo-primary); border-bottom: 2px solid var(--hmo-primary); margin-bottom: -2px; background: none; }

/* ── Empty State ────────────────────────────────────────────── */
.hmo-empty-state {
  text-align: center; padding: 4rem 2rem; color: var(--hmo-text-muted);
}
.hmo-empty-state > i  { font-size: 3.5rem; opacity: 0.2; display: block; margin-bottom: 1rem; }
.hmo-empty-state > p  { margin-bottom: 1rem; }

/* ── Forms ──────────────────────────────────────────────────── */
.hmo-form-label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--hmo-text-muted); margin-bottom: 0.4rem; display: block; }
.hmo-field-error { color: var(--hmo-danger); font-size: 0.78rem; margin-top: 0.25rem; }
.hmo-section-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--hmo-text-muted); border-bottom: 1px solid var(--hmo-border); padding-bottom: 0.5rem; }
.hmo-password-wrapper { position: relative; }
.hmo-password-toggle {
  position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--hmo-text-muted); cursor: pointer; padding: 0;
}

/* ── Action Buttons ─────────────────────────────────────────── */
.hmo-btn-primary {
  background: var(--hmo-primary); border-color: var(--hmo-primary);
  color: #fff; font-weight: 600; border-radius: var(--hmo-radius);
}
.hmo-btn-primary:hover { background: var(--hmo-primary-dark); color: #fff; }
.hmo-btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.hmo-btn-icon { background: var(--hmo-surface-2); border: 1px solid var(--hmo-border); color: var(--hmo-text-muted); border-radius: var(--hmo-radius); }
.hmo-btn-icon:hover { background: var(--hmo-primary-light); color: var(--hmo-primary); border-color: var(--hmo-primary); }
.hmo-btn-icon-secondary { background: var(--hmo-surface-2); border: 1px solid var(--hmo-border); color: var(--hmo-text-muted); border-radius: var(--hmo-radius); }
.hmo-btn-icon-secondary:hover { background: var(--hmo-surface-2); color: var(--hmo-text-primary); }
.hmo-action-group { display: flex; gap: 0.35rem; }
.hmo-link { color: var(--hmo-primary); text-decoration: none; font-weight: 500; }
.hmo-link:hover { text-decoration: underline; }
.hmo-mono { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.82rem; }
.hmo-member-id { font-size: 0.8rem; background: var(--hmo-surface-2); padding: 2px 8px; border-radius: 4px; }

/* ── Eligibility Check ──────────────────────────────────────── */
.hmo-eligibility-icon {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; margin: 0 auto;
}
.hmo-eligibility-ok  { background: rgba(5,122,85,0.12); color: var(--hmo-success); }
.hmo-eligibility-no  { background: rgba(200,30,30,0.12); color: var(--hmo-danger); }
.hmo-eligibility-limit-card { background: var(--hmo-surface-2); border-radius: var(--hmo-radius); padding: 0.75rem; }
.hmo-eligibility-limit-value { font-size: 1rem; font-weight: 700; }
.hmo-eligibility-limit-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--hmo-text-muted); }

/* ── Plan Cards ─────────────────────────────────────────────── */
.hmo-plan-card {
  background: var(--hmo-surface); border: 2px solid var(--hmo-border);
  border-radius: var(--hmo-radius-lg); padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  height: 100%; transition: all 0.2s;
}
.hmo-plan-card:hover { box-shadow: var(--hmo-shadow-lg); transform: translateY(-2px); }
.hmo-plan-tier-executive { border-color: #7e3af2; }
.hmo-plan-tier-gold      { border-color: #d4a017; }
.hmo-plan-tier-silver    { border-color: #94a3b8; }
.hmo-plan-tier-bronze    { border-color: #c07a2a; }
.hmo-plan-card-tier    { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: var(--hmo-text-muted); }
.hmo-plan-card-name    { font-size: 1.1rem; font-weight: 700; color: var(--hmo-text-primary); margin: 0; }
.hmo-plan-card-premium { font-size: 1.6rem; font-weight: 800; color: var(--hmo-primary); }
.hmo-plan-card-per     { font-size: 0.85rem; font-weight: 400; color: var(--hmo-text-muted); }
.hmo-plan-card-limit   { font-size: 0.82rem; color: var(--hmo-text-muted); }
.hmo-plan-card-features { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.hmo-plan-feature      { font-size: 0.7rem; padding: 0.2rem 0.5rem; border-radius: 20px; background: var(--hmo-surface-2); color: var(--hmo-text-muted); }
.hmo-plan-feature.active { background: var(--hmo-primary-light); color: var(--hmo-primary); }

/* ── Provider Cards (Find Provider) ─────────────────────────── */
.hmo-provider-card {
  background: var(--hmo-surface); border: 1px solid var(--hmo-border);
  border-radius: var(--hmo-radius-lg); overflow: hidden;
  transition: all 0.2s;
}
.hmo-provider-card:hover { box-shadow: var(--hmo-shadow-md); transform: translateY(-1px); }
.hmo-provider-card-header { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--hmo-border); }
.hmo-provider-icon { width: 40px; height: 40px; border-radius: var(--hmo-radius); background: var(--hmo-primary-light); color: var(--hmo-primary); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.hmo-provider-card-body { padding: 0.875rem 1.25rem; }

/* ── Progress Bars ──────────────────────────────────────────── */
.hmo-progress    { height: 8px;  border-radius: 4px; background: var(--hmo-border); }
.hmo-progress-lg { height: 12px; border-radius: 6px; background: var(--hmo-border); }

/* ── Pagination ─────────────────────────────────────────────── */
.hmo-pagination .page-link {
  border-color: var(--hmo-border); color: var(--hmo-primary);
  border-radius: var(--hmo-radius) !important; margin: 0 2px;
}
.hmo-pagination .page-item.active .page-link { background: var(--hmo-primary); border-color: var(--hmo-primary); color: var(--hmo-text-light);}
.hmo-pagination .page-item.disabled .page-link { opacity: 0.5; }

/* ── Auth Page ──────────────────────────────────────────────── */
.hmo-auth-page   { background: var(--hmo-body-bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.hmo-auth-shell  { display: flex; min-height: 100vh; width: 100%; max-width: 1100px; margin: auto; background: var(--hmo-surface); border-radius: 16px; overflow: hidden; box-shadow: var(--hmo-shadow-lg); }
.hmo-auth-panel  { flex: 1; display: flex; align-items: center; justify-content: center; padding: 3rem 2.5rem; }
.hmo-auth-brand  { background: linear-gradient(135deg, #0f1f35 0%, #1e3a5f 50%, #1a56db 100%); color: white; flex: 1.2; position: relative; overflow: hidden; display: flex; align-items: center; }
.hmo-auth-brand-inner { position: relative; z-index: 1; }
.hmo-auth-logo  { width: 64px; height: 64px; background: rgba(255,255,255,0.15); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: white; margin-bottom: 1.5rem; }
.hmo-auth-brand-title { font-size: 1.8rem; font-weight: 800; font-family: var(--hmo-font-display); color: white; margin-bottom: 0.75rem; }
.hmo-auth-brand-sub   { color: rgba(255,255,255,0.7); font-size: 0.9rem; line-height: 1.6; max-width: 340px; }
.hmo-auth-feature { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; color: rgba(255,255,255,0.85); font-size: 0.875rem; }
.hmo-auth-feature > i { width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; }
.hmo-auth-form-panel { flex: 1; }
.hmo-auth-form-inner { max-width: 420px; width: 100%; }
.hmo-auth-title    { font-size: 1.6rem; font-weight: 700; font-family: var(--hmo-font-display); color: var(--hmo-text-primary); }
.hmo-auth-subtitle { color: var(--hmo-text-muted); margin-bottom: 1.5rem; }
.hmo-auth-divider  { text-align: center; position: relative; margin: 1.5rem 0; color: var(--hmo-text-muted); font-size: 0.8rem; }
.hmo-auth-divider::before, .hmo-auth-divider::after { content:''; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--hmo-border); }
.hmo-auth-divider::before { left: 0; } .hmo-auth-divider::after { right: 0; }
.hmo-auth-decorative { position: absolute; inset: 0; pointer-events: none; }
.hmo-auth-circle { position: absolute; border-radius: 50%; opacity: 0.06; background: white; }
.hmo-auth-circle-1 { width: 300px; height: 300px; bottom: -80px; right: -80px; }
.hmo-auth-circle-2 { width: 180px; height: 180px; top: 20%; left: -60px; }
.hmo-auth-circle-3 { width: 100px; height: 100px; top: 10%; right: 20%; }
.hmo-role-tabs     { display: flex; gap: 0.5rem; background: var(--hmo-surface-2); border-radius: var(--hmo-radius); padding: 0.35rem; margin-bottom: 1.5rem; }
.hmo-role-tab      { flex: 1; border: none; background: none; border-radius: 6px; padding: 0.5rem 0; font-size: 0.8rem; font-weight: 600; color: var(--hmo-text-muted); cursor: pointer; transition: all 0.15s; }
.hmo-role-tab.active { background: white; color: var(--hmo-primary); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.hmo-link-subtle   { color: var(--hmo-primary); font-weight: 500; text-decoration: none; }
.hmo-link-subtle:hover { text-decoration: underline; }
.hmo-alert-error   { background: rgba(200,30,30,0.08); border: 1px solid rgba(200,30,30,0.2); color: var(--hmo-danger); border-radius: var(--hmo-radius); padding: 0.75rem 1rem; }
.hmo-alert-info    { background: rgba(28,100,242,0.08); border: 1px solid rgba(28,100,242,0.2); color: var(--hmo-info); border-radius: var(--hmo-radius); }
.hmo-alert-warning-soft { background: rgba(194,120,3,0.06); border: 1px solid rgba(194,120,3,0.2); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hmo-auth-brand  { display: none; }
  .hmo-auth-shell  { border-radius: 0; min-height: 100vh; }
  .hmo-stat-value  { font-size: 1.2rem; }
  .hmo-id-card     { max-width: 340px; margin: 0 auto; }
  .hmo-filter-select { max-width: 100%; }
  .hmo-detail-label { min-width: 110px; }
}
@media (max-width: 576px) {
  .hmo-page-title  { font-size: 1.25rem; }
  .hmo-table thead { display: none; }
  .hmo-table tbody td { display: block; padding: 0.4rem 0.75rem; border: none; }
  .hmo-table tbody td::before { content: attr(data-label); font-weight: 600; font-size: 0.7rem; text-transform: uppercase; color: var(--hmo-text-muted); display: block; }
  .hmo-table tbody tr { border: 1px solid var(--hmo-border); border-radius: var(--hmo-radius); margin-bottom: 0.75rem; display: block; }
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 4 ADDITIONS
══════════════════════════════════════════════════════════════ */

/* ── Enrollment Banner (member dashboard) ───────────────────── */
.hmo-enrollment-banner {
  background: linear-gradient(135deg, var(--hmo-primary-dark) 0%, var(--hmo-primary) 60%, #3b82f6 100%);
  border-radius: var(--hmo-radius-lg);
  padding: 1.5rem 2rem;
  color: white;
}

/* ── Auth Item in admin dash ────────────────────────────────── */
.hmo-auth-item:last-child { border-bottom: none !important; }
.hmo-auth-item:hover { background: var(--hmo-surface-2); }

/* ── ID Card (large avatar in member dash) ──────────────────── */
.hmo-id-avatar-lg {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800; border: 2px solid rgba(255,255,255,0.4);
  flex-shrink: 0;
}

/* ── Profile Avatar (profile page) ─────────────────────────── */
.hmo-profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--hmo-primary-light); color: var(--hmo-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 800;
}

/* ── File Drop Zone (bulk import) ───────────────────────────── */
.hmo-file-drop {
  border: 2px dashed var(--hmo-border);
  border-radius: var(--hmo-radius-lg);
  padding: 2.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.hmo-file-drop:hover, .hmo-file-drag { border-color: var(--hmo-primary); background: var(--hmo-primary-light); }
.hmo-file-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.hmo-file-drop-content { pointer-events: none; }

/* ── Search Modal ───────────────────────────────────────────── */
.hmo-search-modal   { border-radius: var(--hmo-radius-lg); overflow: hidden; }
.hmo-search-bar     { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--hmo-border); }
.hmo-search-icon    { color: var(--hmo-text-muted); font-size: 1rem; flex-shrink: 0; }
.hmo-search-input   { border: none; outline: none; flex: 1; font-size: 1rem; background: none; color: var(--hmo-text-primary); }
.hmo-search-kbd     { background: var(--hmo-surface-2); border: 1px solid var(--hmo-border); border-radius: 4px; padding: 0.2rem 0.5rem; font-size: 0.75rem; color: var(--hmo-text-muted); }
.hmo-search-results { max-height: 400px; overflow-y: auto; }
.hmo-search-hint    { padding: 1.5rem; text-align: center; color: var(--hmo-text-muted); font-size: 0.875rem; }
.hmo-search-result-item { display: flex; align-items: center; gap: 0.875rem; padding: 0.875rem 1.25rem; text-decoration: none; color: inherit; border-bottom: 1px solid var(--hmo-border); transition: background 0.1s; }
.hmo-search-result-item:hover { background: var(--hmo-surface-2); }
.hmo-search-result-icon { width: 36px; height: 36px; border-radius: var(--hmo-radius); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.hmo-search-icon-member   { background: rgba(26,86,219,0.1); color: var(--hmo-primary); }
.hmo-search-icon-claim    { background: rgba(194,120,3,0.1); color: var(--hmo-warning); }
.hmo-search-icon-provider { background: rgba(5,122,85,0.1);  color: var(--hmo-success); }
.hmo-search-result-title  { font-size: 0.875rem; font-weight: 600; color: var(--hmo-text-primary); }
.hmo-search-result-sub    { font-size: 0.75rem; color: var(--hmo-text-muted); }

/* ── Toast Notifications ────────────────────────────────────── */
.hmo-toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; max-width: 380px; }
.hmo-toast           { border-radius: var(--hmo-radius); }
.hmo-toast-success   { background: var(--hmo-success); color: white; }
.hmo-toast-error     { background: var(--hmo-danger);  color: white; }
.hmo-toast-warning   { background: var(--hmo-warning); color: white; }
.hmo-toast-info      { background: var(--hmo-primary); color: white; }

/* ── Notification Panel ─────────────────────────────────────── */
.hmo-notif-panel { width: 340px; max-height: 450px; overflow-y: auto; }
.hmo-notif-dot   { position: absolute; top: 4px; right: 4px; width: 8px; height: 8px; background: var(--hmo-danger); border-radius: 50%; border: 2px solid var(--hmo-topbar-bg, white); }

/* ── Section Label ──────────────────────────────────────────── */
.hmo-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--hmo-text-muted);
  border-bottom: 1px solid var(--hmo-border);
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
}

/* ── Plan picker in enrollment form ────────────────────────── */
.hmo-plan-picker { position: sticky; top: 80px; }
.hmo-plan-option {
  border-left: 3px solid var(--hmo-border);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 0 var(--hmo-radius) var(--hmo-radius) 0;
  background: var(--hmo-surface-2);
  cursor: pointer; transition: all 0.15s;
}
.hmo-plan-option:hover { border-left-color: var(--hmo-primary); background: var(--hmo-primary-light); }
.hmo-plan-tier-executive { border-left-color: #7e3af2; }
.hmo-plan-tier-gold      { border-left-color: #d4a017; }
.hmo-plan-tier-silver    { border-left-color: #94a3b8; }
.hmo-plan-tier-bronze    { border-left-color: #c07a2a; }

/* ═══════════════════════════════════════════════════════════════
   PHASE 6 — Multi-Tenancy & BI Dashboard Styles
══════════════════════════════════════════════════════════════ */

/* ── MLR Banner ─────────────────────────────────────────────── */
.hmo-mlr-banner {
  border-radius: var(--hmo-radius-lg);
  padding: 1.5rem 2rem;
  color: white;
}
.hmo-mlr-ok    { background: linear-gradient(135deg,#057a55,#0d9488); }
.hmo-mlr-over  { background: linear-gradient(135deg,#b91c1c,#c81e1e); }
.hmo-mlr-under { background: linear-gradient(135deg,#92400e,#c27803); }
.hmo-mlr-value { font-size: 3rem; font-weight: 800; font-family: var(--hmo-font-display); line-height: 1; }

/* ── Chart Cards ─────────────────────────────────────────────── */
.hmo-chart-card {
  background: var(--hmo-surface);
  border: 1px solid var(--hmo-border);
  border-radius: var(--hmo-radius-lg);
  overflow: hidden;
  height: 100%;
}
.hmo-chart-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--hmo-border);
}
.hmo-chart-title { font-size: 0.875rem; font-weight: 600; color: var(--hmo-text-primary); margin: 0; }
.hmo-chart-body  { padding: 1.25rem; }
.hmo-chart-legend {
  font-size: 0.72rem; padding: 2px 8px;
  border-radius: 12px; font-weight: 600;
}
.hmo-legend-ok { background: rgba(5,122,85,0.12); color: var(--hmo-success); }
.btn-xs { padding: 0.2rem 0.6rem; font-size: 0.75rem; }

/* ── Analytics Nav Cards ─────────────────────────────────────── */
.hmo-analytics-nav-card {
  background: var(--hmo-surface);
  border: 1px solid var(--hmo-border);
  border-radius: var(--hmo-radius-lg);
  padding: 1.5rem;
  text-align: center;
  display: block;
  transition: all 0.2s;
  color: var(--hmo-text-primary);
}
.hmo-analytics-nav-card:hover {
  border-color: var(--hmo-primary);
  box-shadow: var(--hmo-shadow-md);
  transform: translateY(-2px);
  color: var(--hmo-primary);
}
.hmo-analytics-nav-card > i { font-size: 2rem; }

/* ── Tenant Card ─────────────────────────────────────────────── */
.hmo-surface-2 { background: var(--hmo-surface-2); }

/* ── BI sidebar nav active states ───────────────────────────── */
.hmo-nav-section {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--hmo-sidebar-text);
  padding: 0.75rem 1.25rem 0.25rem;
  font-weight: 700;
  opacity: 0.6;
}
