/* =============================================================
   Cloud HMS — Global Shell Styles
   ============================================================= */

:root {
  --hms-sidebar-width: 250px;
  --hms-sidebar-collapsed-width: 56px;
  --hms-topbar-height: 52px;
  --hms-sidebar-bg: #1a2035;
  --hms-sidebar-hover: #2a3450;
  --hms-sidebar-active: #0d6efd;
  --hms-sidebar-text: #c8ccd4;
  --hms-sidebar-icon: #8892a4;
  --hms-body-bg: #f0f2f5;
  --hms-card-bg: #ffffff;
  --hms-border: #dee2e6;
  --hms-primary: #0d6efd;
  --hms-danger: #dc3545;
  --hms-warning: #ffc107;
  --hms-success: #198754;
  --hms-transition: 0.22s ease;
}

/* ---- Reset / Base ---- */
*, *::before, *::after { box-sizing: border-box; }

body.hms-body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  background: var(--hms-body-bg);
  overflow-x: hidden;
}

/* ---- TOPBAR ---- */
.hms-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--hms-topbar-height);
  background: linear-gradient(to right, #161d30, #1e2b47) !important;
  display: flex;
  flex-wrap: nowrap !important;
  align-items: center;
  padding: 0 1rem;
  z-index: 1050;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 2px 16px rgba(0,0,0,0.28);
  color: #fff;
}

.hms-topbar.d-none { display: none !important; }

.hms-logo-text {
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

/* ---- TOPBAR USER PILL ---- */
.hms-user-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.65rem 0.3rem 0.35rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.07);
  transition: background 0.2s, border-color 0.2s;
  color: #fff !important;
  text-decoration: none;
  line-height: 1;
}
.hms-user-pill:hover,
.hms-user-pill:focus {
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.22);
  outline: none;
  color: #fff !important;
}
.hms-user-pill.show {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.25);
}

.hms-avatar-topbar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  user-select: none;
}

.hms-user-info { text-align: left; }

.hms-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.hms-user-role {
  font-size: 0.69rem;
  color: rgba(255,255,255,0.52);
  font-weight: 400;
  white-space: nowrap;
  line-height: 1.2;
}

.hms-user-chevron {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.45);
  margin-left: 0.1rem;
}

.hms-facility-select {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: #fff;
  max-width: 180px;
  font-size: 0.8rem;
}
.hms-facility-select option { color: #212529; background: #fff; }

/* ---- NOTIFICATION BUTTON ---- */
.hms-notif-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.07);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  padding: 0;
}
.hms-notif-btn:hover,
.hms-notif-btn:focus { background: rgba(255,255,255,0.13); border-color: rgba(255,255,255,0.22); outline: none; }
.hms-notif-btn.show  { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.25); }

.hms-notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #dc3545;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border: 2px solid #161d30;
  pointer-events: none;
}

/* ---- NOTIFICATION DROPDOWN ---- */
.hms-notif-dropdown {
  width: 360px;
  max-width: calc(100vw - 1.5rem);
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  padding: 0 !important;
  margin-top: 0.5rem !important;
}

.hms-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: #fff;
  border-bottom: 1px solid #f0f2f5;
  font-size: 0.88rem;
  position: sticky;
  top: 0;
  z-index: 1;
}

.hms-notif-mark-all {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--hms-primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
}
.hms-notif-mark-all:hover { opacity: 0.75; }

.hms-notif-body {
  max-height: 340px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #dee2e6 transparent;
  background: #fff;
}
.hms-notif-body::-webkit-scrollbar { width: 4px; }
.hms-notif-body::-webkit-scrollbar-thumb { background: #dee2e6; border-radius: 2px; }

.hms-notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2.5rem 1rem;
  color: #adb5bd;
  font-size: 0.85rem;
}
.hms-notif-empty i { font-size: 2rem; }

.hms-notif-footer {
  padding: 0.6rem 1rem;
  border-top: 1px solid #f0f2f5;
  background: #fafbfc;
  text-align: center;
}
.hms-notif-footer-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--hms-primary);
  text-decoration: none;
}
.hms-notif-footer-link:hover { text-decoration: underline; }

/* ---- NOTIFICATION ITEMS ---- */
.hms-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f4f5f7;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.hms-notif-item:last-child { border-bottom: none; }
.hms-notif-item:hover { background: #f8f9ff; }
.hms-notif-item--unread { background: #f0f5ff; }
.hms-notif-item--unread:hover { background: #e8f0fe; }

.hms-notif-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.hms-notif-item-icon--primary   { background: #dbeafe; color: #0d6efd; }
.hms-notif-item-icon--danger     { background: #fee2e2; color: #dc3545; }
.hms-notif-item-icon--warning    { background: #fef9c3; color: #d97706; }
.hms-notif-item-icon--success    { background: #dcfce7; color: #198754; }

.hms-notif-item-body { flex: 1; min-width: 0; }

.hms-notif-item-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #212529;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.hms-notif-item-msg {
  font-size: 0.77rem;
  color: #6c757d;
  margin-top: 0.15rem;
  line-height: 1.4;
  max-height: calc(1.4em * 2);
  overflow: hidden;
}

.hms-notif-item-time {
  font-size: 0.7rem;
  color: #adb5bd;
  margin-top: 0.25rem;
}

.hms-notif-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hms-primary);
  flex-shrink: 0;
  margin-top: 0.35rem;
}

/* ---- LAYOUT ---- */
.hms-layout {
  display: flex;
  padding-top: var(--hms-topbar-height);
  height: 100vh;
}

/* ---- SIDEBAR ---- */
.hms-sidebar {
  width: var(--hms-sidebar-width);
  background: var(--hms-sidebar-bg);
  height: calc(100vh - var(--hms-topbar-height));
  position: fixed;
  top: var(--hms-topbar-height);
  left: 0;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--hms-transition);
  z-index: 1040;
  scrollbar-width: thin;
  scrollbar-color: #2a3450 transparent;
}

.hms-sidebar::-webkit-scrollbar { width: 4px; }
.hms-sidebar::-webkit-scrollbar-thumb { background: #2a3450; border-radius: 2px; }

.hms-sidebar.collapsed { width: var(--hms-sidebar-collapsed-width); }

.hms-sidebar-nav {
  padding: 0.5rem 0 1rem;
  min-height: 100%;
}

/* Section labels */
.hms-nav-section {
  padding: 0.7rem 1rem 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hms-sidebar-icon);
  white-space: nowrap;
  overflow: hidden;
  opacity: 1;
  transition: opacity var(--hms-transition);
}
.hms-sidebar.collapsed .hms-nav-section { opacity: 0; }

/* Nav items */
.hms-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1rem;
  color: var(--hms-sidebar-text);
  text-decoration: none;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background var(--hms-transition), border-color var(--hms-transition), color var(--hms-transition);
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.hms-nav-item:hover {
  background: var(--hms-sidebar-hover);
  color: #fff;
}

.hms-nav-item.active {
  background: rgba(13, 110, 253, 0.18);
  border-left-color: var(--hms-sidebar-active);
  color: #fff;
}

.hms-nav-item .nav-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  color: var(--hms-sidebar-icon);
  transition: color var(--hms-transition);
}
.hms-nav-item:hover .nav-icon,
.hms-nav-item.active .nav-icon { color: var(--hms-primary); }

.hms-nav-item .nav-label {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 1;
  transition: opacity var(--hms-transition);
}
.hms-sidebar.collapsed .hms-nav-label { opacity: 0; }

/* Sub-items (accordion) */
.hms-sub-nav { background: rgba(0,0,0,0.15); }
.hms-sub-nav .hms-nav-item { padding-left: 2.5rem; font-size: 0.82rem; }

/* ---- MAIN CONTENT ---- */
.hms-main-content {
  margin-left: var(--hms-sidebar-width);
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  height: calc(100vh - var(--hms-topbar-height));
  transition: margin-left var(--hms-transition);
}

.hms-sidebar.collapsed ~ .hms-main-content,
body.sidebar-collapsed .hms-main-content {
  margin-left: var(--hms-sidebar-collapsed-width);
}

/* ---- ALERTS / TOAST PANEL ---- */
.hms-alerts-panel {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: 360px;
  width: 100%;
}

.hms-toast {
  pointer-events: all;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  font-size: 0.85rem;
  animation: toastIn 0.25s ease forwards;
}

.hms-toast.hiding { animation: toastOut 0.25s ease forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(12px); }
}

/* ---- LOGIN OVERLAY ---- */
.hms-login-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0a1628 0%, #0d2847 40%, #0f3460 70%, #16213e 100%);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Animated floating shapes */
.login-bg-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.login-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
  background: #fff;
  animation: loginFloat 20s infinite ease-in-out;
}
.login-shape-1 { width: 400px; height: 400px; top: -100px; left: -100px; animation-duration: 22s; }
.login-shape-2 { width: 300px; height: 300px; bottom: -80px; right: -60px; animation-duration: 18s; animation-delay: -5s; }
.login-shape-3 { width: 200px; height: 200px; top: 40%; left: 30%; animation-duration: 25s; animation-delay: -10s; }
.login-shape-4 { width: 150px; height: 150px; top: 20%; right: 20%; animation-duration: 16s; animation-delay: -3s; opacity: 0.04; }
.login-shape-5 { width: 250px; height: 250px; bottom: 10%; left: 50%; animation-duration: 20s; animation-delay: -8s; opacity: 0.03; }

@keyframes loginFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(15px, 30px) scale(1.02); }
}

/* Container: side-by-side */
.login-container {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 960px;
  min-height: 540px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
  animation: loginSlideUp 0.6s ease-out;
}

@keyframes loginSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Left branding panel */
.login-brand-panel {
  flex: 0 0 45%;
  background: linear-gradient(160deg, #0d6efd 0%, #0a58ca 50%, #084298 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}
.login-brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.login-brand-content {
  position: relative;
  text-align: center;
  color: #fff;
}
.login-brand-icon-wrap {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  background: rgba(255,255,255,0.15);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.2);
  animation: loginPulse 3s ease-in-out infinite;
}
.login-brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: contain;
}
.login-brand-icon-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #fff;
}
@keyframes loginPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.2); }
  50% { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
}
.login-brand-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}
.login-brand-subtitle {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: 2rem;
}
.login-brand-features {
  text-align: left;
  display: inline-block;
}
.login-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  opacity: 0.9;
  margin-bottom: 0.75rem;
}
.login-feature i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
}

/* Right form panel */
.login-form-panel {
  flex: 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
}
.login-form-inner {
  width: 100%;
  max-width: 360px;
}

/* Mobile icon */
.login-mobile-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  background: linear-gradient(135deg, #0d6efd, #0a58ca);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: loginPulse 3s ease-in-out infinite;
}
.login-mobile-logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
}
.login-mobile-icon .login-brand-icon-fallback {
  font-size: 1.8rem;
  color: #fff;
}

/* Input styling */
.login-input-group .input-group-text {
  background: #f8f9fa;
  border-color: #dee2e6;
  color: #6c757d;
}
.login-input-group .form-control {
  border-color: #dee2e6;
}
.login-input-group .form-control:focus {
  border-color: var(--hms-primary);
  box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}

/* Sign-in button */
.login-btn {
  padding: 0.75rem;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(13,110,253,0.25);
}
.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13,110,253,0.35);
}
.login-btn:active {
  transform: translateY(0);
}

/* Full-screen on mobile */
@media (max-width: 991.98px) {
  .login-container {
    max-width: 440px;
    min-height: auto;
    border-radius: 16px;
    margin: 1rem;
  }
  .login-form-panel { padding: 2rem 1.5rem; }
}

.hms-login-card {
  width: 100%;
  max-width: 420px;
  border: none;
  border-radius: 12px;
}

/* ---- TOPBAR FACILITY NAME ---- */
.hms-facility-name-full {
  font-size: 0.95rem;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hms-facility-name-short {
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

/* ---- AVATAR (legacy small) ---- */
.hms-avatar-sm { font-size: 0.75rem; }

/* ---- PAGE HEADER ---- */
.hms-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.hms-page-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #212529;
  margin: 0;
}

/* ---- CARDS ---- */
.hms-card {
  background: var(--hms-card-bg);
  border: 1px solid var(--hms-border);
  border-radius: 10px;
  padding: 1.25rem;
}

/* ---- STAT CARDS ---- */
.hms-stat-card {
  background: var(--hms-card-bg);
  border: 1px solid var(--hms-border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hms-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.hms-stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.hms-stat-label { font-size: 0.78rem; color: #6c757d; margin-top: 2px; }

/* ---- TABLES ---- */
.hms-table th {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  background: #f8f9fa;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid var(--hms-border);
}
.hms-table td { padding: 0.65rem 0.75rem; vertical-align: middle; font-size: 0.85rem; }
.hms-table tr:hover td { background: #f8f9fa; }

/* ---- STATUS BADGES ---- */
.badge-critical  { background: #fde8ea; color: #dc3545; }
.badge-warning   { background: #fff3cd; color: #856404; }
.badge-stable    { background: #d1e7dd; color: #146c43; }
.badge-pending   { background: #e2e3e5; color: #41464b; }
.badge-admitted  { background: #cfe2ff; color: #084298; }
.badge-discharged{ background: #d1e7dd; color: #146c43; }

/* ---- TRIAGE COLORS ---- */
.triage-1 { background: #dc3545; color: #fff; } /* Immediate / Resuscitation */
.triage-2 { background: #fd7e14; color: #fff; } /* Urgent */
.triage-3 { background: #ffc107; color: #212529; } /* Less urgent */
.triage-4 { background: #198754; color: #fff; } /* Non-urgent */
.triage-5 { background: #6c757d; color: #fff; } /* Expectant */

/* ---- BREADCRUMB ---- */
.hms-breadcrumb { font-size: 0.8rem; }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c1c9d2; border-radius: 3px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .hms-sidebar {
    transform: translateX(-100%);
    width: var(--hms-sidebar-width) !important;
    transition: transform var(--hms-transition);
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  }
  .hms-sidebar.mobile-open {
    transform: translateX(0);
  }
  .hms-main-content {
    margin-left: 0 !important;
    padding: 1rem 0.75rem;
  }

  /* Topbar mobile tweaks */
  .hms-topbar {
    padding: 0 0.5rem;
    gap: 0;
  }
  .hms-topbar .d-flex.gap-2 { gap: 0.35rem !important; }
  .hms-logo-text { font-size: 0.9rem; }
  .hms-topbar #sidebar-toggle { padding: 0.15rem !important; }
  .hms-topbar #sidebar-toggle .bi-list { font-size: 1.25rem !important; }

  /* Tighten right-side controls */
  .hms-topbar .ms-auto { gap: 0.2rem !important; }
  .hms-topbar .ms-auto .btn-link { padding: 0.2rem !important; }
  .hms-topbar .ms-auto .bi-chevron-down { display: none; }
  .hms-topbar #topbar-avatar {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.65rem;
  }

  /* Notification button: slightly smaller */
  .hms-notif-btn { width: 34px; height: 34px; font-size: 1rem; }

  /* Notification dropdown: full-width on mobile */
  .hms-notif-dropdown {
    width: calc(100vw - 1rem) !important;
    border-radius: 12px;
  }
}

@media (max-width: 576px) {
  .hms-page-header { flex-direction: column; align-items: flex-start; }
  .hms-stat-value { font-size: 1.3rem; }

  /* Extra-small: hide logo text, show only icon */
  .hms-logo-text .me-1 + text,
  .hms-logo-text {
    font-size: 0.85rem;
    letter-spacing: 0;
  }
}

/* ---- SIDEBAR OVERLAY (mobile) ---- */
#sidebar-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1039;
}
#sidebar-mobile-overlay.active { display: block; }
