:root {
  --emr-primary: #644098;
  --emr-accent: #ca2e6d;
  --emr-gradient: linear-gradient(135deg, #644098 0%, #7e52b8 50%, #a8407a 100%);
}

html {
  height: 100%;
}

body {
  background: #eef1f7;
  color: #1f2533;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.emr-topbar {
  background: linear-gradient(90deg, #644098 0%, #7e52b8 55%, #a8407a 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.emr-brand {
  color: #ffffff;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
  margin-right: 0.75rem;
}

.emr-brand span {
  /* color handled by .brand-* classes */
}

/* eClinicPlus+ brand colours */
.brand-eclinic  { color: #1a6efd; }   /* Blue   */
.brand-plus     { color: #f59e0b; }   /* Yellow */
.brand-plussign { color: #ec4899; }   /* Pink   */

.emr-main-menu {
  flex-wrap: wrap;
}

.emr-main-menu > li > .nav-link > i {
  font-size: 0.85rem;
  margin-right: 0.2rem !important;
}

.emr-main-menu .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  padding: 0.8rem 0.45rem;
}

.emr-main-menu .nav-link:hover,
.emr-main-menu .nav-link:focus,
.emr-main-menu .nav-link.active {
  color: #fff;
  border-bottom-color: #ca2e6d;
  background: rgba(255, 255, 255, 0.08);
}

.emr-top-actions {
  min-width: max-content;
}

.emr-icon-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  width: 38px;
  height: 38px;
}

.emr-icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.emr-branch-pill {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.45rem 0.8rem;
  font-weight: 600;
}

.emr-profile-btn {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0.9rem;
}

.emr-profile-btn strong,
.emr-profile-btn small {
  display: block;
  color: #fff;
  line-height: 1.05;
}

.emr-profile-btn small {
  opacity: 0.9;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
}

.emr-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ca2e6d;
  color: #ffffff;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.emr-avatar-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.45);
}

.emr-profile-card {
  width: 340px;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(16, 25, 47, 0.18);
  padding: 0;
}

.dashboard-page {
  margin-top: 0.25rem;
}

.dashboard-title {
  font-size: 2.6rem;
  font-weight: 800;
  color: #644098;
}

.dashboard-subtitle {
  font-size: 1.6rem;
  color: #2b3445;
}

.dashboard-hero-card {
  background: var(--emr-gradient);
  border-radius: 22px;
  padding: 1.6rem 1.8rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 34px rgba(100, 64, 152, 0.28);
}

.dashboard-hero-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.dashboard-hero-subtitle {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.25rem;
}

.dashboard-hero-label {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  font-weight: 600;
}

.dashboard-hero-pill {
  color: #644098;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
  font-weight: 700;
  font-size: 1.05rem;
}

.dashboard-hero-brand {
  min-width: 300px;
  max-width: 420px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 0.75rem 1rem;
}

.dashboard-hero-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 12px;
  padding: 0.35rem;
}

.dashboard-hero-logo-fallback {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: #644098;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.dashboard-hero-hospital {
  color: #fff;
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.kpi-card {
  border-radius: 16px;
  padding: 1.4rem;
  color: #fff;
  min-height: 160px;
  box-shadow: 0 12px 30px rgba(22, 34, 66, 0.16);
}

.kpi-card i {
  font-size: 1.6rem;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kpi-card h2 {
  font-size: 3rem;
  margin: 0;
  font-weight: 800;
}

.kpi-card span,
.kpi-card small {
  font-size: 1.05rem;
  font-weight: 600;
}

.kpi-blue {
  background: linear-gradient(135deg, #644098 0%, #7e52b8 100%);
}

.kpi-red {
  background: linear-gradient(135deg, #c9232e 0%, #f13a43 100%);
}

.kpi-yellow {
  background: linear-gradient(135deg, #ef9f00 0%, #f5bb31 100%);
}

.kpi-green {
  background: linear-gradient(135deg, #05966f 0%, #10b785 100%);
}

.dashboard-panel {
  background: #fff;
  border: 1px solid #e3e8f3;
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 8px 24px rgba(15, 33, 60, 0.06);
}

.doctor-form-panel {
  border-top: 4px solid var(--emr-primary) !important;
  box-shadow: 0 10px 30px rgba(100, 64, 152, 0.06) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doctor-form-panel:hover {
  box-shadow: 0 12px 35px rgba(100, 64, 152, 0.12) !important;
  transform: translateY(-2px);
}

/* ── Compact soft-gradient stat cards for master list pages ── */
.stat-card {
  border: none;
  border-radius: 14px;
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 18px rgba(100, 64, 152, 0.10);
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  right: -18px;
  top: -18px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.stat-card:hover {
  box-shadow: 0 8px 28px rgba(100, 64, 152, 0.18);
  transform: translateY(-3px);
}
.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  color: #fff;
}
.stat-card .stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.02em;
}
.stat-card .stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 4px;
}
.stat-blue   { background: linear-gradient(135deg, #3a5fd9 0%, #5c82f5 100%); }
.stat-green  { background: linear-gradient(135deg, #059c6e 0%, #1fcf96 100%); }
.stat-red    { background: linear-gradient(135deg, #d63447 0%, #f05663 100%); }
.stat-yellow { background: linear-gradient(135deg, #c97d00 0%, #f0a500 100%); }
.stat-teal   { background: linear-gradient(135deg, #0a7f8a 0%, #12b3c2 100%); }
.stat-purple { background: linear-gradient(135deg, #6a3fbc 0%, #9164e0 100%); }

.doctor-table-panel .table,
.doctor-table-panel tbody,
.doctor-table-panel tr,
.doctor-table-panel td {
  overflow: visible;
}

.doctor-action-dropdown .dropdown-menu {
  z-index: 2000;
  min-width: 9rem;
}

.chart-placeholder {
  border: 1px dashed #d2dbec;
  border-radius: 10px;
  min-height: 250px;
  padding: 1rem;
  display: grid;
  gap: 1rem;
  align-content: space-evenly;
}

.chart-line {
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #644098 0%, #e0ccf5 100%);
}

.dept-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e6ebf5;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-weight: 600;
}

/* ── Auth / Login Page ─────────────────────────────────────────── */
.auth-body {
  background: linear-gradient(rgba(50, 20, 70, 0.72), rgba(50, 20, 70, 0.72)),
              url('/Images/login-bg.jpg') center/cover no-repeat;
}

.auth-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-card {
  width: min(1060px, 100%);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 2rem 5rem rgba(5, 14, 40, 0.55);
}

/* ── Left panel ── */
.auth-left {
  background: linear-gradient(160deg, #4a2d75 0%, #644098 45%, #a8407a 100%);
  color: #fff;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  min-height: 520px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.auth-icon-float {
  position: absolute;
  font-size: 3.2rem;
  color: rgba(255, 255, 255, 0.12);
  pointer-events: none;
  user-select: none;
  line-height: 1;
}

.auth-left-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1rem;
}

.auth-medical-cross {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  margin: 0 auto 1.2rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6px);
}
.role-left-profile-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.45);
}
.role-top-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-bottom: 0.8rem;
}
.role-top-profile-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #d8e4f5;
}
.role-top-profile-name {
  font-weight: 700;
  color: #0d1b3e;
  line-height: 1.1;
}
.role-top-profile-branch {
  font-size: 0.8rem;
  color: #6b7a99;
}

.auth-left-title {
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 0.25rem;
}

.auth-left-title span {
  /* color handled by .brand-* classes */
}

.auth-left-sub {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

.auth-left-divider {
  border-color: rgba(255, 255, 255, 0.25);
  margin: 1.5rem auto;
  width: 60%;
}

.auth-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  display: inline-block;
}

.auth-feature-list li {
  padding: 0.4rem 0;
  font-size: 0.95rem;
  opacity: 0.92;
}

.auth-feature-list li i {
  color: #7de8c8;
  margin-right: 0.5rem;
}

/* ── Right panel ── */
.auth-right {
  background: #ffffff;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-right-inner {
  width: 100%;
  max-width: 400px;
  padding: 2.8rem 2rem;
}

.auth-logo-badge {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #644098, #a8407a);
  border-radius: 16px;
  color: #fff;
  font-size: 1.8rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.auth-welcome {
  margin-bottom: 1.8rem;
}

.auth-right-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0d1b3e;
  margin-bottom: 0.3rem;
}

.auth-right-sub {
  color: #6b7a99;
  font-size: 0.92rem;
  margin: 0;
}

.auth-input-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #f5f7fc;
  border: 1.5px solid #e0e6f0;
  border-radius: 12px;
  padding: 0.65rem 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input-group:focus-within {
  border-color: #644098;
  box-shadow: 0 0 0 3px rgba(100, 64, 152, 0.12);
  background: #fff;
}

.auth-input-icon {
  color: #644098;
  font-size: 1.15rem;
  padding-top: 1.55rem;
  flex-shrink: 0;
}

.auth-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6b7a99;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 0.2rem;
}

.auth-input {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: 0.97rem;
  font-weight: 500;
  color: #0d1b3e;
  box-shadow: none !important;
  outline: none !important;
}

.auth-input:focus {
  outline: none !important;
  box-shadow: none !important;
}

.auth-eye-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9aaac5;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
  font-size: 1rem;
}

.auth-eye-btn:hover {
  color: #644098;
}

.auth-remember {
  font-size: 0.88rem;
  color: #4a5568;
}

.auth-signin-btn {
  background: linear-gradient(135deg, #ca2e6d 0%, #e0527f 50%, #a8407a 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: none;
  letter-spacing: 0.3px;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 6px 20px rgba(202, 46, 109, 0.35);
}

.auth-signin-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  color: #fff;
}

.auth-footer-note {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.78rem;
  color: #9aaac5;
  margin-bottom: 0;
}

.auth-footer-note i {
  color: #ca2e6d;
}

.auth-back-link {
  font-size: 0.88rem;
  color: #6b7a99 !important;
}

.auth-back-link:hover {
  color: #644098 !important;
}

/* ── Role Cards ──────────────────────────────────────────────────── */
.role-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.85rem;
}

.role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.2rem 0.75rem 0.9rem;
  border: 1.5px solid #e0e6f0;
  border-radius: 14px;
  background: #f5f7fc;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.15s;
  position: relative;
  text-align: center;
  color: #0d1b3e;
  font-size: 0.88rem;
}

.role-card:hover {
  border-color: #644098;
  background: #f5eeff;
  box-shadow: 0 4px 16px rgba(100, 64, 152, 0.12);
  transform: translateY(-2px);
}

.role-card.selected {
  border-color: #ca2e6d;
  background: linear-gradient(135deg, #fde8f0 0%, #f5d0e3 100%);
  box-shadow: 0 6px 20px rgba(202, 46, 109, 0.18);
  transform: translateY(-2px);
}

.role-card-icon {
  font-size: 1.9rem;
  color: #644098;
  opacity: 0.85;
}

.role-card.selected .role-card-icon {
  opacity: 1;
  color: #ca2e6d;
}

.role-card-name {
  font-weight: 700;
  line-height: 1.2;
}

.role-card-check {
  position: absolute;
  top: 0.45rem;
  right: 0.5rem;
  font-size: 0.95rem;
  color: #ca2e6d;
  opacity: 0;
  transition: opacity 0.18s;
}

.role-card.selected .role-card-check {
  opacity: 1;
}

.brand-title {
  color: var(--emr-primary);
  font-weight: 800;
}

.brand-title span {
  color: var(--emr-accent);
}

/* ── Master Grouped Dropdown ─────────────────────────────────────── */
.dropdown-menu-master {
  min-width: 200px;
  padding: 0.4rem 0;
  border: 1px solid #e0e6f0;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(13, 27, 62, 0.13);
}

/* Submenu parent row */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu-toggle {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: #644098 !important;
}

.submenu-arrow {
  font-size: 0.7rem;
  opacity: 0.6;
  margin-left: auto;
  flex-shrink: 0;
}

/* Flyout submenu panel */
.dropdown-submenu-menu {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 210px;
  padding: 0.4rem 0;
  border: 1px solid #e0e6f0;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(13, 27, 62, 0.13);
  background: #fff;
  z-index: 1055;
  margin-left: 2px;
}

.dropdown-submenu-menu.show {
  display: block;
}

/* Highlight parent row when submenu is open */
.dropdown-submenu:hover > .dropdown-submenu-toggle,
.dropdown-submenu:focus-within > .dropdown-submenu-toggle {
  background: #eef3ff;
}

.card-soft {
  border: 1px solid #e6e9f2;
  border-radius: 12px;
  background: #fff;
}

/* ── Enterprise Dark Footer ─────────────────────────────────────── */
.emr-footer {
  background: #1a2236;
  color: #c9d3e8;
  font-size: 0.82rem;
  padding: 0;
  flex-shrink: 0;
}

.emr-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  max-width: 100%;
}

.emr-footer-brand {
  font-weight: 800;
  font-size: 1rem;
  color: #ffffff;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
}

.emr-footer-brand span {
  /* color handled by .brand-* classes */
}

.emr-footer-copy {
  text-align: center;
  color: #8a98b8;
  flex: 1;
  padding: 0 1rem;
}

.emr-footer-copy strong {
  color: #c9d3e8;
}

.emr-footer-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.emr-footer-link {
  color: #8a98b8;
  text-decoration: none;
  transition: color 0.2s;
}

.emr-footer-link:hover {
  color: #f3c94e;
}

.emr-footer-divider {
  color: #3d4f6e;
}

.emr-footer-version {
  display: inline-block;
  background: #2e3f60;
  color: #f3c94e;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  letter-spacing: 0.5px;
  border: 1px solid #3d5280;
}

@media (max-width: 992px) {
  .auth-right-inner {
    padding: 2rem 1.5rem;
  }

  .emr-main-menu .nav-link {
    border-bottom: 0;
    border-radius: 8px;
    margin-bottom: 0.15rem;
  }

  .emr-profile-card {
    width: 100%;
    max-width: 340px;
  }

  .dashboard-title {
    font-size: 1.9rem;
  }

  .dashboard-subtitle {
    font-size: 1.05rem;
  }
}

/* ── User Form Sections ──────────────────────────────────────────── */
.uf-section {
  background: #fff;
  border: 1px solid #e3e8f3;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(15, 33, 60, 0.05);
}

.uf-section-header {
  background: linear-gradient(90deg, #f0f4ff 0%, #eaf2ff 100%);
  border-bottom: 1px solid #d8e4f5;
  border-radius: 12px 12px 0 0;
  color: var(--emr-primary);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.7rem 1rem;
  letter-spacing: 0.02em;
}

.uf-section-body {
  padding: 1.2rem 1rem;
}

/* ── Input icons ─────────────────────────────────────────────────── */
.input-icon-wrap {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #8a9bbf;
  font-size: 0.95rem;
  pointer-events: none;
  z-index: 4;
}

.ps-icon {
  padding-left: 2.2rem !important;
}

.pe-eye {
  padding-right: 2.6rem !important;
}

.eye-btn {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #8a9bbf;
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  z-index: 4;
}

.eye-btn:hover { color: var(--emr-primary); }

/* ── Custom Multi-Select Dropdown ───────────────────────────────── */
.cms-wrap {
  position: relative;
}

.cms-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  color: #495057;
  user-select: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cms-trigger:hover { border-color: #86b7fe; }
.cms-open .cms-trigger { border-color: #86b7fe; box-shadow: 0 0 0 0.2rem rgba(13,110,253,.25); }

.cms-arrow {
  font-size: 0.75rem;
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.cms-open .cms-arrow { transform: rotate(180deg); }

.cms-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #d0d7e8;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 33, 60, 0.14);
  max-height: 240px;
  overflow-y: auto;
  z-index: 1050;
  padding: 0.4rem 0;
}

.cms-open .cms-dropdown { display: block; }

.cms-group-header {
  padding: 0.45rem 1rem 0.25rem;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--emr-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-top: 1px solid #eef1fa;
}

.cms-group:first-child .cms-group-header { border-top: none; }

.cms-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: #2d3a4e;
  transition: background 0.12s;
}

.cms-option:hover { background: #f0f5ff; }
.cms-option input[type="checkbox"] { flex-shrink: 0; accent-color: var(--emr-primary); }

/* ── Status toggle row ──────────────────────────────────────────── */
.uf-toggle-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.25rem 0;
}

.uf-big-toggle {
  width: 2.8rem !important;
  height: 1.4rem !important;
  cursor: pointer;
  flex-shrink: 0;
}

