:root {
  --app-bg: #07111f;
  --app-bg-soft: #0d1b2c;
  --app-surface: rgba(9, 18, 34, 0.78);
  --app-surface-light: rgba(255, 255, 255, 0.08);
  --app-border: rgba(255, 255, 255, 0.12);
  --app-text: #e7edf7;
  --app-text-muted: #a8b5ca;
  --app-primary: #35c7a3;
  --app-primary-dark: #1ea986;
  --app-accent: #67a7ff;
  --app-danger: #ff7e8a;
  --app-shadow: 0 24px 80px rgba(1, 8, 20, 0.45);
  --scrollbar-size: 10px;
  --scrollbar-radius: 999px;
  --scrollbar-thumb: rgba(148, 163, 184, 0.3);
  --scrollbar-thumb-hover: rgba(148, 163, 184, 0.5);
  --scrollbar-track: rgba(148, 163, 184, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 14px;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--app-text);
  background:
    radial-gradient(circle at top left, rgba(103, 167, 255, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(53, 199, 163, 0.16), transparent 24%),
    linear-gradient(135deg, #06101d 0%, #0a1728 50%, #0f1f36 100%);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(10, 40, 36, 0.68) 0%, rgba(8, 28, 26, 0.55) 100%);
  border-bottom: 1px solid rgba(53, 199, 163, 0.12);
}

.app-header-inner,
.app-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.app-header-inner {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--app-text);
}

.app-brand strong,
.app-brand small {
  display: block;
}

.app-brand strong {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.app-brand small,
.app-nav a,
.app-footer {
  color: var(--app-text-muted);
}

.app-brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--app-primary), var(--app-accent));
  color: #04101d;
  font-size: 1.45rem;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(53, 199, 163, 0.28);
}

.app-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.app-nav a {
  padding: 0.6rem 1rem;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.app-nav a:hover {
  color: var(--app-text);
  background: rgba(255, 255, 255, 0.06);
}

.app-main {
  flex: 1;
}

.page-container {
  padding-top: 0.75rem;
  padding-bottom: 2rem;
}

.app-footer {
  padding: 1rem 0 1.5rem;
  font-size: 0.9rem;
}

.auth-page {
  background: #f5f5f5;
}

.auth-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 12px 40px rgba(0, 0, 0, 0.08);
  padding: 2.75rem 2.5rem 2.25rem;
}

.auth-card-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.75rem;
}

.auth-card-logo-icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: #0f6cbd;
  color: #ffffff;
}

.auth-card-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-card-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 700;
  color: #1b1b1b;
  letter-spacing: -0.01em;
}

.auth-card-header p {
  margin: 0;
  font-size: 0.9rem;
  color: #616161;
  font-weight: 400;
}

.auth-form {
  display: grid;
  gap: 1.25rem;
}

.auth-field-group {
  display: grid;
  gap: 0.5rem;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #242424;
}

.auth-forgot-link {
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 500;
  color: #0f6cbd;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s;
}

.auth-forgot-link:hover,
.auth-forgot-link[aria-expanded="true"] {
  color: #0a548a;
  text-decoration: underline;
}

.auth-forgot-link:focus-visible {
  outline: 2px solid rgba(15, 108, 189, 0.2);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

.auth-input-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 0.875rem;
  color: #9e9e9e;
  pointer-events: none;
  flex-shrink: 0;
}

.auth-input {
  width: 100%;
  height: 2.875rem;
  padding: 0 0.875rem 0 2.75rem;
  border: 1px solid #d1d1d1;
  border-radius: 0.5rem;
  background: #ffffff;
  color: #1b1b1b;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input::placeholder {
  color: #afafaf;
  font-weight: 400;
}

.auth-input:hover {
  border-color: #b0b0b0;
}

.auth-input:focus {
  border-color: #0f6cbd;
  box-shadow: 0 0 0 1px #0f6cbd;
}

.auth-input-shell-password .auth-input {
  padding-right: 3rem;
}

.auth-password-toggle {
  position: absolute;
  right: 0.5rem;
  width: 2.125rem;
  height: 2.125rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: #9e9e9e;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.auth-password-toggle:hover {
  background: #f5f5f5;
  color: #616161;
}

.auth-password-toggle.is-visible {
  color: #0f6cbd;
}

.auth-password-toggle.is-visible .auth-eye-open {
  display: none;
}

.auth-password-toggle.is-visible .auth-eye-closed {
  display: block !important;
}

.auth-error-msg {
  background: #fef0f1;
  color: #c4314b;
  border: 1px solid #eeacb2;
  border-radius: 0.5rem;
  padding: 0.7rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
}

.auth-submit-btn {
  width: 100%;
  height: 2.875rem;
  margin-top: 0.5rem;
  border: none;
  border-radius: 0.5rem;
  background: #0f6cbd;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.auth-submit-btn:hover {
  background: #0a548a;
}

.auth-submit-btn:active {
  background: #084272;
}

.auth-submit-btn:focus-visible {
  outline: 2px solid #0f6cbd;
  outline-offset: 2px;
}

.auth-submit-btn:disabled {
  background: #bdbdbd;
  cursor: not-allowed;
}

.auth-forgot-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #dce9f8;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%);
  display: grid;
  gap: 1rem;
}

.auth-forgot-panel-header {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.auth-forgot-panel-header h2 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: #17365f;
}

.auth-forgot-panel-header p {
  margin: 0;
  color: #60758f;
  font-size: 0.84rem;
}

.auth-forgot-panel-icon {
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #0f6cbd 0%, #35c7a3 100%);
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 12px 24px rgba(15, 108, 189, 0.18);
}

.auth-forgot-steps {
  display: grid;
  gap: 0.7rem;
}

.auth-forgot-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.8rem 0.85rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 108, 189, 0.08);
}

.auth-forgot-step > span {
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0f6cbd;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.auth-forgot-step strong,
.auth-forgot-note strong {
  display: block;
  color: #17365f;
  font-size: 0.85rem;
  font-weight: 700;
}

.auth-forgot-step small,
.auth-forgot-note span {
  display: block;
  margin-top: 0.2rem;
  color: #60758f;
  font-size: 0.8rem;
  line-height: 1.45;
}

.auth-forgot-note {
  padding: 0.85rem 0.9rem;
  border-radius: 0.8rem;
  background: rgba(15, 108, 189, 0.06);
  border: 1px dashed rgba(15, 108, 189, 0.2);
}

.auth-card-footer {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e8e8e8;
  text-align: center;
  font-size: 0.78rem;
  color: #9e9e9e;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus,
.auth-password-toggle:focus {
  box-shadow: 0 0 0 0.1rem rgba(247, 248, 252, 0.9), 0 0 0 0.25rem rgba(15, 108, 189, 0.18);
}

/* SweetAlert2 professional theme */
.swal2-container {
  z-index: 999999 !important;
}

.swal2-popup.hospital-swal-popup {
  border-radius: 1.05rem;
  border: 1px solid rgba(22, 58, 99, 0.12);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2), 0 6px 18px rgba(15, 23, 42, 0.08);
}

.swal2-popup.hospital-swal-popup .swal2-title,
.swal2-popup.hospital-swal-popup .hospital-swal-title {
  margin: 0.15rem 0 0.35rem;
  color: #163a63;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.swal2-popup.hospital-swal-popup .swal2-html-container,
.swal2-popup.hospital-swal-popup .hospital-swal-html {
  margin: 0.4rem 0 0;
  color: #5b6f86;
  font-size: 0.95rem;
  line-height: 1.5;
}

.swal2-popup.hospital-swal-popup .swal2-icon {
  margin: 0.2rem auto 0.6rem;
  border-width: 0.18rem;
}

.swal2-popup.hospital-swal-popup .swal2-styled {
  min-width: 5.75rem;
  padding: 0.66rem 1rem;
  border-radius: 0.7rem;
  font-weight: 700;
  box-shadow: none !important;
}

.swal2-popup.hospital-swal-popup .swal2-confirm.hospital-swal-confirm {
  background: linear-gradient(135deg, #1f5ca8 0%, #2570bd 100%);
}

.swal2-popup.hospital-swal-popup .swal2-cancel.hospital-swal-cancel {
  background: #e5e7eb;
  color: #344054;
}

.swal2-popup.hospital-swal-popup .swal2-actions,
.swal2-popup.hospital-swal-popup .hospital-swal-actions {
  gap: 0.55rem;
  margin-top: 1rem;
}

.swal2-popup.hospital-swal-toast {
  border-radius: 0.85rem;
  border: 1px solid rgba(22, 58, 99, 0.08);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
}

.swal2-popup.hospital-swal-message {
  max-width: min(440px, calc(100vw - 2rem));
}

.swal2-popup.hospital-swal-toast .swal2-icon {
  margin: 0.05rem 0.65rem 0 0;
  transform: scale(0.9);
}

.swal2-popup.hospital-swal-toast .swal2-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0;
  color: #163a63;
}

.swal2-popup.hospital-swal-toast .swal2-html-container {
  margin: 0.2rem 0 0;
  color: #5b6f86;
  font-size: 0.84rem;
  line-height: 1.35;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  text-align: start;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 2rem 1.5rem 1.75rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .auth-card-header h1 {
    font-size: 1.4rem;
  }

  .auth-label-row,
  .auth-forgot-panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}

.dashboard-page {
  --dash-accent: #22d3a0;
  --dash-accent-dim: rgba(34, 211, 160, 0.12);
  --dash-accent-mid: #14b88a;
  --dash-accent-glow: rgba(34, 211, 160, 0.25);
  --sb-panel: 272px;
  --sb-width: var(--sb-panel);
  --sb-bg: #0b1120;
  --sb-bg-soft: #131c31;
  --sb-border: rgba(255, 255, 255, 0.06);
  --sb-text: #cbd5e1;
  --sb-text-muted: #94a3b8;
  --sb-hover: rgba(255, 255, 255, 0.05);
  --sb-active: rgba(34, 211, 160, 0.1);
  --sb-icon: #64748b;
  --sb-icon-active: #22d3a0;
  background: #f1f5f9;
  color: #1e293b;
  overflow-x: hidden;
}

.master-shell {
  height: 100vh;
  position: relative;
  display: flex;
  flex-direction: row-reverse; /* Sidebar on right */
  background: #f1f5f9;
  overflow: hidden; /* Prevent page scroll, use internal scroll */
}

.master-sidebar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  width: var(--sb-width);
  max-width: min(var(--sb-width), calc(100vw - 2rem));
  height: 100dvh;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background: var(--sb-bg);
  color: var(--sb-text);
  border-left: 1px solid var(--sb-border);
  box-shadow: -6px 0 48px rgba(0, 0, 0, 0.25), -2px 0 12px rgba(0, 0, 0, 0.1);
  transition:
    width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.35s ease;
  z-index: 1040;
}

.master-sidebar-panel {
  flex: 1 1 auto;
  min-height: 0;
  min-width: var(--sb-panel);
  width: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0b1120 0%, #111a2e 40%, #0f172a 100%);
  color: var(--sb-text);
  border-right: none;
  overflow: hidden;
  opacity: 1;
  transition:
    min-width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    flex-basis 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease;
}

.dashboard-page.sidebar-collapsed .master-sidebar-panel {
  min-width: 0;
  width: 0;
  flex: 0 0 0;
  opacity: 0;
  pointer-events: none;
  border-right: none;
}

.master-sidebar-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem 1.15rem 0.85rem;
  flex-shrink: 0;
  border-bottom: 1px solid var(--sb-border);
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
}

.master-sidebar-panel-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

.master-sidebar-panel-logo {
  flex-shrink: 0;
  width: 2.65rem;
  height: 2.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #22d3a0 0%, #0ea878 100%);
  color: #0b1120;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(34, 211, 160, 0.35), 0 0 0 1px rgba(34, 211, 160, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.master-sidebar-panel-logo:hover {
  color: #0b1120;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 32px rgba(34, 211, 160, 0.5), 0 0 0 2px rgba(34, 211, 160, 0.3);
}

.master-sidebar-panel-brand-text {
  min-width: 0;
}

.master-sidebar-panel-brand-text strong {
  display: block;
  font-family: Inter, "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f1f5f9;
  line-height: 1.2;
}

.master-sidebar-panel-brand-text small {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--sb-text-muted);
  letter-spacing: 0.03em;
}

.master-sidebar-close {
  width: 2.2rem;
  height: 2.2rem;
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--sb-text-muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.master-sidebar-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}

/* Legacy brand block kept for non-dashlite pages if referenced */
.master-sidebar-header {
  display: none;
}

.master-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 1;
  min-width: 0;
  padding: 0;
  color: #fff;
  font-size: 0.82rem;
}

.master-sidebar-brand-icon {
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  background: #efc14b;
  color: #0d2748;
  font-size: 0.8rem;
  font-weight: 800;
}

.master-sidebar-brand strong,
.master-sidebar-brand small {
  display: block;
}

.master-sidebar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.master-sidebar-brand-text strong {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.master-sidebar-brand-text small {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.master-sidebar-brand small,
.master-sidebar-label {
  color: rgba(216, 228, 243, 0.6);
}

.master-sidebar-nav {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-content: start;
  gap: 0.2rem;
  padding: 0.65rem 0.75rem 1.25rem;
  overflow-y: auto;
  overflow-x: hidden;
}

.master-sidebar.sidebar-compact .master-sidebar-nav {
  flex: 1;
}

.master-sidebar-nav.master-sidebar-nav-compact {
  gap: 0.18rem;
}

.master-sidebar-group {
  display: grid;
  gap: 0.35rem;
}

.master-sidebar-nav.master-sidebar-nav-compact .master-sidebar-group {
  gap: 0.5rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.master-sidebar-label {
  padding: 0.5rem 0.35rem 0.25rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sb-text-muted);
  opacity: 0.7;
}

.master-sidebar-dash-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.65rem;
  padding: 0.6rem 0.85rem;
  color: var(--sb-text);
  font-size: 0.84rem;
  font-weight: 500;
  font-family: Inter, "Plus Jakarta Sans", system-ui, sans-serif;
  border-radius: 0.7rem;
  text-decoration: none;
  position: relative;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.18s ease;
}

.master-sidebar-dash-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: linear-gradient(135deg, rgba(34, 211, 160, 0.08), rgba(34, 211, 160, 0.02));
  transition: opacity 0.25s ease;
}

.master-sidebar-dash-link:hover {
  background: var(--sb-hover);
  color: #f1f5f9;
}

.master-sidebar-dash-link:hover::before {
  opacity: 1;
}

.master-sidebar-dash-link.active,
.master-sidebar-dash-link[aria-current="page"] {
  color: var(--dash-accent);
  background: var(--sb-active);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--dash-accent), 0 0 20px var(--dash-accent-glow);
}

.master-sidebar-dash-link.active::before,
.master-sidebar-dash-link[aria-current="page"]::before {
  opacity: 1;
}

.master-nav-accordion {
  border-radius: 0.7rem;
  overflow: hidden;
}

.master-nav-accordion-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.65rem;
  padding: 0.55rem 0.85rem;
  border: none;
  background: transparent;
  color: var(--sb-text);
  font-size: 0.84rem;
  font-weight: 500;
  font-family: Inter, "Plus Jakarta Sans", system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
  border-radius: 0.7rem;
  transition: background-color 0.2s ease, color 0.2s ease;
  line-height: 1.3;
}

.master-nav-accordion-head:hover {
  background: var(--sb-hover);
  color: #f1f5f9;
}

.master-nav-accordion.is-open .master-nav-accordion-head {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.03);
}

.master-nav-accordion-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sb-icon);
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.master-nav-accordion.is-open .master-nav-accordion-ico {
  color: var(--sb-icon-active);
}

.master-nav-accordion-head:hover .master-nav-accordion-ico {
  color: var(--sb-icon-active);
}

.master-nav-accordion-title {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.master-nav-accordion-chevron {
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translateY(-2px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  opacity: 0.5;
  align-self: center;
}

.master-nav-accordion.is-open .master-nav-accordion-chevron {
  transform: rotate(45deg) translateY(2px);
  opacity: 0.9;
}

.master-nav-accordion-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.master-nav-accordion.is-open > .master-nav-accordion-body {
  grid-template-rows: 1fr;
}

.master-nav-accordion-inner {
  overflow: hidden;
  min-height: 0;
  padding-bottom: 0.3rem;
}

.master-nav-accordion-inner-admin > .master-nav-accordion-nested {
  margin: 0.2rem 0.2rem 0.15rem 0.5rem;
}

.master-nav-accordion-nested > .master-nav-accordion-head-nested {
  min-height: 2.2rem;
  padding: 0.38rem 0.75rem;
  font-size: 0.78rem;
}

.master-nav-sublink.master-nav-sublink-nested {
  padding-left: 2.35rem;
  font-size: 0.78rem;
  min-height: 2.15rem;
}

.master-nav-sublink {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.85rem 0.45rem 1.85rem;
  margin: 0.08rem 0.2rem;
  border-radius: 0.55rem;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--sb-text-muted);
  text-decoration: none;
  font-family: Inter, "Plus Jakarta Sans", system-ui, sans-serif;
  transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.master-nav-sublink-dot {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--sb-icon);
  flex-shrink: 0;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.master-nav-sublink:hover {
  background: var(--sb-hover);
  color: #e2e8f0;
  padding-left: 2rem;
}

.master-nav-sublink:hover .master-nav-sublink-dot {
  background: var(--dash-accent);
  box-shadow: 0 0 8px var(--dash-accent-glow);
}

.master-nav-sublink.active,
.master-nav-sublink[aria-current="page"] {
  color: var(--dash-accent);
  font-weight: 600;
  background: var(--sb-active);
}

.master-nav-sublink.active .master-nav-sublink-dot,
.master-nav-sublink[aria-current="page"] .master-nav-sublink-dot {
  background: var(--dash-accent);
  transform: scale(1.3);
  box-shadow: 0 0 10px var(--dash-accent-glow);
}

.master-nav-sublink-with-ico {
  gap: 0.55rem;
}

.master-nav-sublink-ico {
  width: 1.35rem;
  min-width: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
  line-height: 1;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.master-nav-sublink:hover .master-nav-sublink-ico {
  opacity: 0.95;
}

.master-nav-sublink.active .master-nav-sublink-ico,
.master-nav-sublink[aria-current="page"] .master-nav-sublink-ico {
  opacity: 1;
}

.master-nav-sublink-coming-soon {
  cursor: default;
  opacity: 0.45;
}

.master-nav-sublink-coming-soon:hover {
  background: transparent;
  color: var(--sb-text-muted);
  padding-left: 1.85rem;
}

.master-nav-sublink-coming-soon:hover .master-nav-sublink-ico {
  opacity: 0.6;
}

.master-nav-coming-soon-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.master-nav-soon-chip {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sb-text-muted);
}

.master-sidebar a:visited,
.master-sidebar a:active {
  text-decoration: none;
}

.master-sidebar-group a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.85rem;
  padding: 0.72rem 0.9rem;
  color: var(--sb-text);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 0.9rem;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.master-sidebar a,
.master-sidebar a:visited,
.master-sidebar a:active {
  color: inherit;
  text-decoration: none;
}

.master-sidebar-group a:hover,
.master-sidebar-group a.active,
.master-sidebar-group a[aria-current="page"] {
  color: var(--dash-accent-mid);
  background: var(--dash-accent-dim);
  transform: translateX(2px);
}

.master-sidebar-group a:focus-visible {
  outline: 2px solid var(--dash-accent);
  outline-offset: 2px;
}

.master-sidebar-dash-link:focus-visible,
.master-nav-accordion-head:focus-visible,
.master-nav-sublink:focus-visible {
  outline: 2px solid var(--dash-accent);
  outline-offset: 1px;
}

.master-sidebar-empty {
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--sb-border);
  border-radius: 1rem;
  background: var(--sb-hover);
  color: var(--sb-text);
}

.master-sidebar-empty strong,
.master-sidebar-empty small {
  display: block;
}

.master-sidebar-empty small {
  color: var(--sb-text-muted);
  line-height: 1.45;
}

.master-nav-icon {
  flex: 0 0 auto;
  width: 1.5rem;
  min-height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  text-align: center;
  opacity: 0.96;
}

.master-nav-label {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.master-nav-section-anchor {
  scroll-margin-top: 0.35rem;
}

.master-sidebar-footer {
  display: grid;
  flex: 0 0 auto;
  gap: 0.8rem;
  margin-top: auto;
  padding-top: 1rem;
  background: linear-gradient(180deg, rgba(11, 17, 32, 0) 0%, rgba(15, 25, 45, 0.92) 18%, rgba(11, 17, 32, 1) 100%);
  border-top: 1px solid var(--sb-border);
}

.master-sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.2rem;
}

.master-sidebar-user strong,
.master-sidebar-user small {
  display: block;
}

.master-sidebar-user strong {
  color: #fff;
  font-size: 0.82rem;
}

.master-sidebar-user small {
  color: rgba(216, 228, 243, 0.68);
  font-size: 0.68rem;
}

.master-signout {
  margin: 0;
  min-height: 2.9rem;
  padding: 0.75rem 0.95rem;
  border: none;
  border-radius: 0.85rem;
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s ease, color 0.2s ease;
}
.master-signout:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fecaca;
}

.master-main-shell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: transparent;
  overflow-x: hidden;
  overflow-y: auto; /* Enable vertical scrolling internally */
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   MODERN TOPBAR â€” Dark Glassmorphism Design
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.master-topbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0 1.75rem;
  background: linear-gradient(135deg, rgba(8, 15, 28, 0.97) 0%, rgba(12, 22, 40, 0.96) 40%, rgba(8, 18, 34, 0.98) 100%);
  backdrop-filter: blur(32px) saturate(220%);
  -webkit-backdrop-filter: blur(32px) saturate(220%);
  border-bottom: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 4px 32px rgba(0, 0, 0, 0.35),
    0 1px 4px rgba(0, 0, 0, 0.2);
  color: #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 60px;
}

.master-topbar::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    #14b8a6 15%,
    #6366f1 35%,
    #8b5cf6 50%,
    #6366f1 65%,
    #14b8a6 85%,
    transparent 100%);
  background-size: 200% 100%;
  animation: topbarShimmer 6s ease-in-out infinite;
  opacity: 0.7;
}

@keyframes topbarShimmer {
  0%, 100% { background-position: 200% 0; opacity: 0.5; }
  50% { background-position: -200% 0; opacity: 0.8; }
}

.master-topbar-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

.master-topbar-secondary {
  width: 100%;
  min-width: 0;
}

.master-topbar-start,
.master-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.master-topbar-actions {
  margin-left: auto;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.master-topbar-start {
  min-width: 0;
  flex: 1 1 auto;
}

/* â”€â”€ Hamburger toggle â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.master-nav-toggle {
  width: 2.65rem;
  height: 2.65rem;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.26rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.master-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  transform: scale(1.04);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.master-nav-toggle span {
  width: 1.05rem;
  height: 0.11rem;
  border-radius: 999px;
  background: currentColor;
}

/* â”€â”€ Page title area â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.master-topbar-page {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.master-topbar-page-label {
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.master-topbar-page strong {
  color: #f1f5f9;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.master-topbar-page small {
  color: #94a3b8;
  font-size: 0.76rem;
  line-height: 1.5;
}

/* â”€â”€ Live Clock â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.master-topbar-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 2.65rem;
  min-width: 7rem;
  padding: 0.35rem 0.85rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  line-height: 1.3;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  position: relative;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.master-topbar-clock:hover {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.master-topbar-clock::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  right: 0.45rem;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.7), 0 0 16px rgba(34, 197, 94, 0.3);
  animation: clockPulse 2s ease-in-out infinite;
}

.clock-pulse {
  display: none;
}

@keyframes clockPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.65); }
}

.master-topbar-clock strong {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  color: #f8fafc;
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.master-topbar-clock small {
  font-size: 0.58rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.04em;
}

/* â”€â”€ Scrollbar toggle â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.master-scrollbar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.8rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.master-scrollbar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.master-scrollbar-toggle[aria-pressed="true"] {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.35);
}

.master-scrollbar-toggle-icon {
  font-size: 0.9rem;
}

.master-scrollbar-toggle-text {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

/* â”€â”€ Shift Badge â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.master-topbar-shift {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.5rem;
  min-height: 2.65rem;
  min-width: 9.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  line-height: 1.3;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

.master-topbar-shift:hover {
  border-color: rgba(99, 102, 241, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.master-topbar-shift::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #64748b;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.shift-dot {
  display: none;
}

.master-topbar-shift .shift-icon {
  font-size: 1rem;
  margin-left: 0.3rem;
  filter: grayscale(0.3);
  transition: filter 0.3s ease;
}

.master-topbar-shift .shift-info {
  display: flex;
  flex-direction: column;
}

.master-topbar-shift .shift-info strong {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  color: #f1f5f9;
}

.master-topbar-shift .shift-info small {
  font-size: 0.58rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.03em;
}

/* Shift type color variants */
.master-topbar-shift[data-shift-type="morning"] {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, rgba(245, 158, 11, 0.08) 100%);
  border-color: rgba(251, 191, 36, 0.3);
}
.master-topbar-shift[data-shift-type="morning"]::after {
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}
.master-topbar-shift[data-shift-type="morning"] .shift-icon {
  filter: none;
}

.master-topbar-shift[data-shift-type="evening"] {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.12) 0%, rgba(59, 130, 246, 0.08) 100%);
  border-color: rgba(96, 165, 250, 0.3);
}
.master-topbar-shift[data-shift-type="evening"]::after {
  background: #60a5fa;
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.6);
}
.master-topbar-shift[data-shift-type="evening"] .shift-icon {
  filter: none;
}

.master-topbar-shift[data-shift-type="night"] {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
  border-color: rgba(167, 139, 250, 0.3);
}
.master-topbar-shift[data-shift-type="night"]::after {
  background: #a78bfa;
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.6);
}
.master-topbar-shift[data-shift-type="night"] .shift-icon {
  filter: none;
}

.master-topbar-shift.no-shift {
  opacity: 0.45;
}
.master-topbar-shift.no-shift::after {
  background: #64748b;
  box-shadow: none;
}

/* â”€â”€ Brand area â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.master-topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.85rem;
  margin-left: 0;
  min-width: 0;
}

.master-topbar-logo {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 0.82rem;
  font-weight: 800;
}

.master-topbar-brand strong,
.master-topbar-brand small {
  display: block;
}

.master-topbar-brand small,
.master-topbar-meta {
  color: rgba(255, 255, 255, 0.6);
}

.master-topbar-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.75rem;
  text-align: center;
}

/* â”€â”€ Profile Pill â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.master-profile-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  min-height: 2.65rem;
  min-width: 10rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
  position: relative;
}

.master-profile-pill::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  padding: 2px;
  background: linear-gradient(135deg, #14b8a6, #6366f1, #8b5cf6, #14b8a6);
  background-size: 300% 300%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  animation: profileBorderRotate 4s linear infinite;
}

@keyframes profileBorderRotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.master-profile-pill:hover,
.master-profile-pill[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.master-profile-pill:hover::before,
.master-profile-pill[aria-expanded="true"]::before {
  opacity: 1;
}

.master-profile-pill:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35), 0 6px 24px rgba(0, 0, 0, 0.3);
}

.master-profile-pill > span {
  display: flex;
  flex-direction: column;
}

.master-profile-pill > span strong {
  color: #f8fafc;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: -0.01em;
}

.master-profile-pill > span small {
  color: #64748b;
  font-size: 0.6rem;
}

.profile-chevron {
  font-size: 0.6rem;
  color: #475569;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.25s ease;
  margin-left: auto;
  flex-shrink: 0;
}

.master-profile-pill[aria-expanded="true"] .profile-chevron {
  transform: rotate(180deg);
  color: #a78bfa;
}

/* Profile avatar inside pill */
.master-profile-avatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
  transition: box-shadow 0.3s ease;
}

.master-profile-pill:hover .master-profile-avatar {
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.55);
}

.master-profile-avatar-img {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* â”€â”€ Profile Menu â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.master-profile-menu {
  position: relative;
  flex: 0 0 auto;
}

.master-profile-dropdown {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  width: min(21rem, 90vw);
  padding: 0;
  border-radius: 1.1rem;
  background: linear-gradient(135deg, rgba(10, 17, 35, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
  backdrop-filter: blur(40px) saturate(220%);
  -webkit-backdrop-filter: blur(40px) saturate(220%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.06) inset;
  z-index: 1100;
  overflow: hidden;
  animation: dropdownSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownSlideIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.master-profile-dropdown-body {
  display: block;
  padding: 1.15rem;
}

.master-profile-dropdown-loading,
.master-profile-dropdown-error {
  color: #94a3b8;
  font-size: 0.85rem;
}

.master-profile-dropdown-error {
  color: #fca5a5;
}

.master-profile-dropdown-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.master-profile-dropdown-avatar,
.master-profile-dropdown-avatar-img {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

.master-profile-dropdown-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e2e8f0;
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
}

.master-profile-dropdown-avatar-img {
  object-fit: cover;
}

.master-profile-dropdown-heading {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  padding-top: 0.1rem;
}

.master-profile-dropdown-heading strong {
  color: #f1f5f9;
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.master-profile-dropdown-heading small {
  color: #94a3b8;
  font-size: 0.78rem;
}

.master-profile-dropdown-meta {
  color: #64748b;
  font-size: 0.74rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.master-profile-dropdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.master-profile-dropdown-grid > div {
  display: grid;
  gap: 0.18rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.master-profile-dropdown-grid span {
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.master-profile-dropdown-grid strong {
  color: #e2e8f0;
  font-size: 0.82rem;
  line-height: 1.4;
  word-break: break-word;
}

.master-profile-dropdown-grid-full {
  grid-column: 1 / -1;
}

.master-profile-dropdown-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 0;
  padding: 0.7rem 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.master-profile-dropdown-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.3rem;
  padding: 0.4rem 0.55rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.master-profile-dropdown-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}

.master-profile-dropdown-link-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.master-profile-dropdown-link.danger {
  background: transparent;
  color: #94a3b8;
  border-color: transparent;
}

.master-profile-dropdown-link.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.account-profile-card {
  display: grid;
  gap: 1.25rem;
}

.account-profile-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #edf3fa;
}

.account-profile-avatar,
.account-profile-avatar-img {
  width: 5rem;
  height: 5rem;
  border-radius: 1.2rem;
  background: #eef3f9;
  border: 1px solid #d5dfe9;
}

.account-profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #143865;
  font-size: 2rem;
  font-weight: 800;
}

.account-profile-avatar-img {
  object-fit: cover;
}

.account-profile-hero h2 {
  margin: 0;
  color: #17365f;
  font-size: 1.2rem;
}

.account-profile-hero p {
  margin: 0.2rem 0 0;
}

.account-profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.account-profile-note {
  margin: 0;
  color: #7d8ea3;
  font-size: 0.78rem;
}

.account-profile-readonly {
  background: #f8fbff;
}

.master-profile-avatar {
  width: 1.7rem;
  height: 1.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: #143865;
  font-size: 0.72rem;
  font-weight: 800;
}

.master-profile-avatar-img {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.master-profile-pill strong,
.master-profile-pill small {
  display: block;
}

.master-profile-pill small {
  color: #94a3b8;
  font-size: 0.6rem;
}

.master-content-shell {
  flex: 1 1 auto;
  min-height: calc(100dvh - 5.75rem);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.master-content {
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
  padding: 0.75rem 1rem 1rem;
  overflow-x: hidden;
}

.master-footer {
  display: flex;
  margin-top: auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem 1.25rem;
  color: #7d8ea3;
  font-size: 0.78rem;
}

.master-footer-content {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.master-footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.master-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s ease, visibility 0.32s ease;
  z-index: 1035;
}

.master-sidebar,
.master-sidebar-nav,
.master-main-shell,
.master-content,
.table-responsive,
.shift-table-wrap {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  scrollbar-gutter: stable;
}

.master-sidebar::-webkit-scrollbar,
.master-sidebar-nav::-webkit-scrollbar,
.master-main-shell::-webkit-scrollbar,
.master-content::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
.shift-table-wrap::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

.master-sidebar::-webkit-scrollbar-track,
.master-sidebar-nav::-webkit-scrollbar-track,
.master-main-shell::-webkit-scrollbar-track,
.master-content::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track,
.shift-table-wrap::-webkit-scrollbar-track {
  background: transparent;
  border-radius: var(--scrollbar-radius);
}

.master-sidebar::-webkit-scrollbar-thumb,
.master-sidebar-nav::-webkit-scrollbar-thumb,
.master-main-shell::-webkit-scrollbar-thumb,
.master-content::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb,
.shift-table-wrap::-webkit-scrollbar-thumb {
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--scrollbar-radius);
  background-clip: padding-box;
}

.master-sidebar:hover,
.master-sidebar:focus-within,
.master-sidebar-nav:hover,
.master-sidebar-nav:focus-within,
.master-main-shell:hover,
.master-main-shell:focus-within,
.master-content:hover,
.master-content:focus-within,
.table-responsive:hover,
.table-responsive:focus-within,
.shift-table-wrap:hover,
.shift-table-wrap:focus-within {
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.master-sidebar:hover::-webkit-scrollbar-track,
.master-sidebar:focus-within::-webkit-scrollbar-track,
.master-sidebar-nav:hover::-webkit-scrollbar-track,
.master-sidebar-nav:focus-within::-webkit-scrollbar-track,
.master-main-shell:hover::-webkit-scrollbar-track,
.master-main-shell:focus-within::-webkit-scrollbar-track,
.master-content:hover::-webkit-scrollbar-track,
.master-content:focus-within::-webkit-scrollbar-track,
.table-responsive:hover::-webkit-scrollbar-track,
.table-responsive:focus-within::-webkit-scrollbar-track,
.shift-table-wrap:hover::-webkit-scrollbar-track,
.shift-table-wrap:focus-within::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

.master-sidebar:hover::-webkit-scrollbar-thumb,
.master-sidebar:focus-within::-webkit-scrollbar-thumb,
.master-sidebar-nav:hover::-webkit-scrollbar-thumb,
.master-sidebar-nav:focus-within::-webkit-scrollbar-thumb,
.master-main-shell:hover::-webkit-scrollbar-thumb,
.master-main-shell:focus-within::-webkit-scrollbar-thumb,
.master-content:hover::-webkit-scrollbar-thumb,
.master-content:focus-within::-webkit-scrollbar-thumb,
.table-responsive:hover::-webkit-scrollbar-thumb,
.table-responsive:focus-within::-webkit-scrollbar-thumb,
.shift-table-wrap:hover::-webkit-scrollbar-thumb,
.shift-table-wrap:focus-within::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
}

.master-sidebar::-webkit-scrollbar-thumb:hover,
.master-sidebar-nav::-webkit-scrollbar-thumb:hover,
.master-main-shell::-webkit-scrollbar-thumb:hover,
.master-content::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover,
.shift-table-wrap::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

.dashboard-page.scrollbars-visible .master-sidebar,
.dashboard-page.scrollbars-visible .master-sidebar-nav,
.dashboard-page.scrollbars-visible .master-main-shell,
.dashboard-page.scrollbars-visible .master-content,
.dashboard-page.scrollbars-visible .table-responsive,
.dashboard-page.scrollbars-visible .shift-table-wrap {
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.dashboard-page.scrollbars-visible .master-sidebar::-webkit-scrollbar-track,
.dashboard-page.scrollbars-visible .master-sidebar-nav::-webkit-scrollbar-track,
.dashboard-page.scrollbars-visible .master-main-shell::-webkit-scrollbar-track,
.dashboard-page.scrollbars-visible .master-content::-webkit-scrollbar-track,
.dashboard-page.scrollbars-visible .table-responsive::-webkit-scrollbar-track,
.dashboard-page.scrollbars-visible .shift-table-wrap::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

.dashboard-page.scrollbars-visible .master-sidebar::-webkit-scrollbar-thumb,
.dashboard-page.scrollbars-visible .master-sidebar-nav::-webkit-scrollbar-thumb,
.dashboard-page.scrollbars-visible .master-main-shell::-webkit-scrollbar-thumb,
.dashboard-page.scrollbars-visible .master-content::-webkit-scrollbar-thumb,
.dashboard-page.scrollbars-visible .table-responsive::-webkit-scrollbar-thumb,
.dashboard-page.scrollbars-visible .shift-table-wrap::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
}

.master-dashboard-page {
  display: grid;
  gap: 0.75rem;
}

.master-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.master-page-header h1 {
  margin: 0;
  color: #0f172a;
  font-size: 1.3rem;
}

.master-page-header p {
  margin: 0.15rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
}

.master-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.master-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7rem;
  padding: 0.5rem 0.85rem;
  border-radius: 0.6rem;
  background: #ffffff;
  color: #17365f;
  border: 1px solid #dfe8f3;
  font-size: 0.78rem;
  font-weight: 700;
}

.master-toolbar-btn.primary {
  background: #173f72;
  color: #fff;
  border-color: #173f72;
}

.master-toolbar-btn.danger-outline {
  background: #fff5f4;
  color: #c83f3f;
  border-color: #f3c6c6;
}

.master-toolbar-btn.danger-outline:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.master-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.master-stat-card,
.master-card {
  border-radius: 1.1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.06),
    0 8px 28px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.06);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.master-stat-card:hover,
.master-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 8px rgba(15, 23, 42, 0.08),
    0 16px 40px rgba(15, 23, 42, 0.12);
  border-color: rgba(99, 102, 241, 0.12);
}

.master-stat-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1rem;
  border-left: 4px solid transparent;
  position: relative;
  overflow: hidden;
}

.master-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: 0.06;
  transform: translate(25%, -25%);
  transition: opacity 0.3s ease;
}

.master-stat-card:hover::before {
  opacity: 0.12;
}

.master-stat-card.navy { border-left-color: #4f46e5; }
.master-stat-card.navy::before { background: #4f46e5; }
.master-stat-card.gold { border-left-color: #f59e0b; }
.master-stat-card.gold::before { background: #f59e0b; }
.master-stat-card.green { border-left-color: #10b981; }
.master-stat-card.green::before { background: #10b981; }
.master-stat-card.red { border-left-color: #ef4444; }
.master-stat-card.red::before { background: #ef4444; }

.master-stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.85rem;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.master-stat-card.navy .master-stat-icon { background: linear-gradient(135deg, #4f46e5, #6366f1); }
.master-stat-card.gold .master-stat-icon { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #78350f; }
.master-stat-card.green .master-stat-icon { background: linear-gradient(135deg, #10b981, #34d399); }
.master-stat-card.red .master-stat-icon { background: linear-gradient(135deg, #ef4444, #f87171); }

.master-stat-card strong {
  display: block;
  color: #0f172a;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.master-stat-card span,
.master-stat-card small,
.master-card p,
.master-mini-list span,
.master-table td,
.master-table th {
  color: #64748b;
}

.master-stat-card span,
.master-stat-card small {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
}

.master-stat-card small {
  margin-top: 0.25rem;
  color: #10b981;
  font-size: 0.7rem;
  font-weight: 600;
}

.master-dashboard-grid,
.master-dashboard-bottom {
  display: grid !important;
  gap: 1.15rem;
}

.master-secondary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.master-dashboard-grid {
  grid-template-columns: minmax(0, 1.85fr) minmax(280px, 0.95fr);
}

.master-dashboard-bottom {
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
}

.master-card {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.master-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.master-card-header h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.master-card-badge {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
  color: #4338ca;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(99, 102, 241, 0.12);
}

.master-card-badge.soft {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.15);
}

.master-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.master-table th,
.master-table td {
  padding: 0.75rem 0.6rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  text-align: left;
  font-size: 0.78rem;
}

.master-table thead th {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  font-weight: 700;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 2px solid rgba(99, 102, 241, 0.08);
}

.master-table thead th:first-child {
  border-radius: 0.5rem 0 0 0;
}

.master-table thead th:last-child {
  border-radius: 0 0.5rem 0 0;
}

.master-table tbody tr {
  transition: background-color 0.15s ease;
}

.master-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.03);
}

.master-table tbody tr:last-child td {
  border-bottom: 0;
}

.master-table td {
  color: #334155;
  font-weight: 500;
}

.master-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.master-status::before {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.master-status.pending {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.master-status.pending::before {
  background: #f59e0b;
  box-shadow: 0 0 4px rgba(245, 158, 11, 0.5);
}

.master-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.master-action-tile {
  min-height: 4.8rem;
  display: grid;
  place-items: center;
  gap: 0.35rem;
  padding: 0.85rem;
  text-align: center;
  border-radius: 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.5) 0%, rgba(241, 245, 249, 0.8) 100%);
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 700;
  transition: all 0.25s ease;
  cursor: pointer;
}

.master-action-tile:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 1) 100%);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.05);
  color: #4f46e5;
}

.master-action-tile span {
  font-size: 1.25rem;
  transition: transform 0.25s ease;
}

.master-action-tile:hover span {
  transform: scale(1.1);
}

.master-chart-placeholder {
  padding: 1.15rem;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.6) 0%, rgba(241, 245, 249, 0.4) 100%);
  border: 1px dashed rgba(148, 163, 184, 0.4);
}

.master-chart-bars {
  height: 15rem;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 0.9rem;
}

.master-chart-bars div {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  position: relative;
}

.master-chart-bars span {
  width: 100%;
  border-radius: 0.4rem 0.4rem 0 0;
  background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
  transition: height 1s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.master-chart-bars div:hover span {
  filter: brightness(1.1);
}

.master-chart-bars small {
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 600;
}

.master-bottom-side {
  display: grid;
  gap: 1.15rem;
}

.master-ward-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.master-ward-card {
  padding: 1rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.6) 100%);
  border: 1px solid rgba(15, 23, 42, 0.05);
  font-size: 0.78rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.master-ward-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.05);
}

.master-ward-card strong,
.master-alert-item strong {
  display: block;
  color: #0f172a;
  margin-bottom: 0.35rem;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.master-ward-card span,
.master-alert-item span {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 500;
}

.master-progress {
  height: 0.45rem;
  margin-top: 1rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.06);
}

.master-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399 0%, #10b981 100%);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

@media (max-width: 1199.98px) {
  .master-dashboard-grid,
  .master-dashboard-bottom,
  .master-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .master-topbar {
    flex-wrap: wrap;
  }

  .master-footer {
    flex-wrap: wrap;
  }

  .master-footer-content {
    flex-direction: column;
    gap: 1rem;
  }

  .master-footer-left {
    width: 100%;
  }
}

@media (max-width: 1023.98px) {
  .dashboard-page {
    --sb-panel: 252px;
  }

  .master-shell {
    display: block;
  }

  .master-sidebar {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(var(--sb-width), min(300px, 92vw));
    max-width: 92vw;
    transform: translateX(105%);
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.35);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .dashboard-page.sidebar-open {
    overflow: hidden;
  }

  .dashboard-page.sidebar-open .master-sidebar {
    transform: translateX(0);
    box-shadow: -24px 0 80px rgba(0, 0, 0, 0.45);
  }

  .dashboard-page.sidebar-open .master-sidebar-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .master-nav-toggle,
  .master-sidebar-close {
    display: inline-flex;
  }

  .master-main-shell {
    min-height: 100vh;
  }

  .master-topbar {
    padding: 0.35rem 1rem;
    min-height: 56px;
  }

  .master-topbar-actions {
    flex: 1 1 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .master-topbar-clock,
  .master-topbar-shift {
    align-items: flex-start;
  }

  .master-stat-grid,
  .master-dashboard-grid,
  .master-dashboard-bottom,
  .master-secondary-grid,
  .master-ward-grid,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-menu {
    position: static;
    top: auto;
  }
}

@media (max-width: 767.98px) {
  .master-content {
    padding: 0.75rem 1rem 1rem;
  }

  .master-topbar {
    gap: 0;
    min-height: 56px;
  }

  .master-topbar-actions {
    justify-content: stretch;
  }

  .master-scrollbar-toggle,
  .master-topbar-clock,
  .master-topbar-shift,
  .master-profile-menu,
  .master-profile-pill {
    width: 100%;
  }

  .master-scrollbar-toggle,
  .master-topbar-clock,
  .master-topbar-shift,
  .master-profile-pill {
    justify-content: flex-start;
    border-radius: 1rem;
  }

  .master-profile-dropdown {
    width: 100%;
    left: 0;
    right: auto;
  }

  .master-profile-dropdown-grid {
    grid-template-columns: 1fr;
  }

  .account-profile-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .master-page-header,
  .patient-summary-strip,
  .settings-logo-card,
  .settings-logo-actions,
  .settings-form-actions,
  .patient-form-actions,
  .master-toolbar-actions,
  .app-header-inner,
  .app-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .master-toolbar-btn,
  .settings-btn,
  .patient-form-actions .master-toolbar-btn {
    width: 100%;
    min-height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .master-card,
  .patient-form-section,
  .settings-section {
    padding: 1rem;
  }

  .master-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 1rem 1rem;
  }

  .master-footer-content {
    flex-direction: column;
    width: 100%;
  }

  .master-footer-left {
    width: 100%;
  }

  .master-stat-grid {
    grid-template-columns: 1fr;
  }

  .app-nav {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 575.98px) {
  .master-topbar-clock,
  .master-topbar-shift,
  .master-profile-pill {
    padding-inline: 0.85rem;
  }

  .master-profile-pill > span {
    min-width: 0;
  }

  .master-sidebar {
    width: min(280px, 88vw);
    max-width: 88vw;
  }
}

.master-alert-list {
  display: grid;
  gap: 0.85rem;
}

.master-alert-item {
  padding: 0.75rem;
  border-radius: 0.7rem;
  border: 1px solid #e8edf5;
  background: #f8fbff;
  font-size: 0.78rem;
}

.master-alert-item.warning {
  border-left: 4px solid #efc14b;
}

.master-alert-item.danger {
  border-left: 4px solid #ef5a4c;
}

.master-alert-item.info {
  border-left: 4px solid #2a74d6;
}

.master-mini-list {
  display: grid;
  gap: 0.9rem;
}

.master-mini-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid #edf2f7;
}

.master-mini-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.master-mini-list strong {
  color: #17365f;
  font-size: 0.82rem;
}

.master-mini-list span {
  font-size: 0.75rem;
}

/* â”€â”€ Settings Page â”€â”€ */

.settings-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.settings-menu {
  position: sticky;
  top: 0;
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 0;
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 6px 20px rgba(18, 45, 82, 0.07);
  align-self: start;
  height: fit-content;
  margin-top: 0;
}

.settings-menu-label {
  display: block;
  padding: 0 1rem 0.65rem;
  color: #143865;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.settings-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1rem;
  border: 0;
  background: transparent;
  color: #4a5a72;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

button.settings-menu-item,
button.report-module-tile {
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.settings-menu-item:hover {
  color: #143865;
  background: #f0f5fc;
}

.settings-menu-item.active {
  color: #143865;
  background: #e2edfc;
  border-left: 3px solid #143865;
  padding-left: calc(1rem - 3px);
  font-weight: 700;
}

.settings-menu-icon {
  width: 0.9rem;
  text-align: center;
  font-size: 0.82rem;
  opacity: 0.75;
}

.settings-content {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.settings-section {
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 6px 20px rgba(18, 45, 82, 0.07);
  padding: 1.25rem;
  display: none;
  margin: 0;
}

.settings-section.active {
  display: block;
}

.settings-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #edf2f7;
}

.settings-section-icon {
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  background: #e2edfc;
  color: #143865;
  font-size: 0.95rem;
  font-weight: 800;
}

.settings-section-header h2 {
  margin: 0;
  color: #17365f;
  font-size: 1rem;
  font-weight: 700;
}

.settings-section-header p {
  margin: 0.15rem 0 0;
  color: #7d8ea3;
  font-size: 0.75rem;
}

.settings-logo-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.15rem;
  border: 2px dashed #d5dfe9;
  border-radius: 0.85rem;
  margin-bottom: 1.25rem;
}

.settings-logo-preview {
  flex-shrink: 0;
  width: 5.5rem;
  height: 5.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: #eef3f9;
  border: 1px solid #d5dfe9;
  overflow: hidden;
}

.settings-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-logo-placeholder {
  color: #143865;
  font-size: 1.8rem;
  font-weight: 800;
}

.settings-logo-info strong {
  display: block;
  color: #17365f;
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
}

.settings-logo-info p {
  margin: 0 0 0.65rem;
  color: #7d8ea3;
  font-size: 0.75rem;
  line-height: 1.5;
}

.settings-logo-info small {
  display: block;
  margin-top: 0.55rem;
  color: #9aa7bc;
  font-size: 0.68rem;
}

.settings-logo-actions {
  display: flex;
  gap: 0.5rem;
}

.settings-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid #d5dfe9;
  border-radius: 0.55rem;
  background: #fff;
  color: #17365f;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.settings-btn.primary {
  background: #143865;
  color: #fff;
  border-color: #143865;
}

.settings-btn.primary:hover {
  background: #1a4c8b;
}

.settings-btn.danger-outline {
  color: #d85a46;
  border-color: #f5c6bf;
}

.settings-btn.danger-outline:hover {
  background: #fff5f4;
}

.settings-btn.btn-sm {
  padding: 0.42rem 0.8rem;
  min-height: 2.1rem;
  border-radius: 0.5rem;
  font-size: 0.76rem;
  line-height: 1;
  justify-content: center;
}

.settings-form {
  display: grid;
  gap: 1rem;
}

.settings-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.settings-field {
  display: grid;
  gap: 0.3rem;
}

.settings-field label {
  color: #4a5a72;
  font-size: 0.75rem;
  font-weight: 700;
}

.settings-field input,
.settings-field select,
.settings-field textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #dfe8f3;
  border-radius: 0.55rem;
  background: #f8fbff;
  color: #1c2c45;
  font-size: 0.82rem;
  font-family: inherit;
}

/* â”€â”€ Patient Registration â”€â”€ */

.patient-template-page {
  gap: 1.5rem;
}

.patient-template-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
  gap: 1.25rem;
  padding: 1.4rem;
  background: linear-gradient(135deg, #173f72 0%, #224f8d 54%, #f7fbff 54%, #ffffff 100%);
  overflow: hidden;
}

.patient-template-hero-single {
  grid-template-columns: 1fr;
}

.patient-template-hero-copy {
  display: grid;
  align-content: center;
  gap: 0.55rem;
  color: #fff;
}

.patient-template-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.patient-template-hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.patient-template-hero p {
  margin: 0;
  max-width: 42rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  line-height: 1.7;
}

.patient-template-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.patient-template-hero-actions .master-toolbar-btn {
  min-height: 2.95rem;
  padding: 0.65rem 1rem;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: 0 12px 28px rgba(8, 24, 47, 0.18);
}

.patient-template-hero-actions .master-toolbar-btn.primary {
  background: #ffffff;
  color: #173f72;
  border-color: #ffffff;
}

.patient-template-hero-actions .master-toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.patient-template-hero-actions .master-toolbar-btn.primary:hover {
  background: #eef6ff;
  color: #173f72;
}

.patient-template-hero-stats {
  display: grid;
  gap: 0.9rem;
}

.patient-template-stat-card {
  display: grid;
  gap: 0.18rem;
  padding: 1rem 1.05rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 24px rgba(20, 56, 101, 0.08);
}

.patient-template-stat-card span,
.patient-profile-meta span,
.patient-note-grid span {
  color: #70819a;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.patient-template-stat-card strong {
  color: #17365f;
  font-size: 1.05rem;
  font-weight: 800;
}

.patient-template-stat-card small {
  color: #7d8ea3;
  font-size: 0.78rem;
}

.patient-template-stat-card.accent {
  background: #fff8e7;
}

.patient-template-stat-card.soft {
  background: #eef6ff;
}

.patient-template-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.8fr);
  gap: 1.25rem;
  align-items: start;
}

.patient-template-form-card {
  padding: 1.25rem;
}

.patient-template-sidebar {
  display: grid;
  gap: 1.25rem;
}

.patient-profile-panel,
.patient-side-card {
  padding: 1.25rem;
}

.patient-profile-panel {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.9rem;
}

.patient-profile-avatar {
  width: 5.5rem;
  height: 5.5rem;
  display: grid;
  place-items: center;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #173f72, #4f84d9);
  color: #fff;
  font-size: 1.75rem;
  font-weight: 800;
  box-shadow: 0 18px 36px rgba(23, 63, 114, 0.22);
}

.patient-profile-panel h2,
.patient-side-card-header h3 {
  margin: 0;
  color: #17365f;
}

.patient-profile-panel h2 {
  font-size: 1.05rem;
}

.patient-profile-panel p {
  margin: 0;
  color: #7d8ea3;
  font-size: 0.82rem;
  line-height: 1.65;
}

.patient-profile-upload {
  width: 100%;
  min-height: 2.9rem;
  border: 1px dashed #aac1e3;
  border-radius: 0.95rem;
  background: #f7fbff;
  color: #173f72;
  font-size: 0.82rem;
  font-weight: 700;
}

.patient-profile-meta,
.patient-side-list,
.patient-note-grid {
  width: 100%;
  display: grid;
  gap: 0.8rem;
}

.patient-profile-meta div,
.patient-side-list div,
.patient-note-grid div {
  padding: 0.85rem 0.95rem;
  border-radius: 0.9rem;
  background: #f8fbff;
  border: 1px solid #e4edf7;
}

.patient-profile-meta strong,
.patient-side-list strong,
.patient-note-grid strong {
  display: block;
  margin-top: 0.22rem;
  color: #17365f;
  font-size: 0.86rem;
}

.patient-side-card {
  display: grid;
  gap: 1rem;
}

.patient-side-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.patient-side-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #edf4ff;
  color: #2a5b97;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.patient-side-list span {
  display: block;
  margin-top: 0.25rem;
  color: #7d8ea3;
  font-size: 0.78rem;
  line-height: 1.55;
}

.patient-side-card-accent {
  background: linear-gradient(180deg, #fffaf0 0%, #ffffff 100%);
}

.patient-recent-card {
  padding: 1.15rem;
}

.patient-registration-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

.patient-registration-page {
  width: 100%;
  max-width: none;
  margin: 0;
}

.patient-registration-card {
  padding: 1.1rem;
}

.patient-sidebar-stack {
  display: grid;
  gap: 1.25rem;
}

.patient-form-grid {
  display: grid;
  gap: 0.85rem;
}

.patient-hero-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.15rem;
}

.patient-hero-strip div,
.patient-form-section {
  border: 1px solid #e7edf6;
  border-radius: 1rem;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9fd 100%);
}

.patient-hero-strip div {
  padding: 1rem 1.05rem;
}

.patient-hero-strip strong,
.patient-section-header h3 {
  display: block;
  color: #17365f;
}

.patient-hero-strip strong {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.patient-hero-strip span,
.patient-section-header p {
  color: #66768d;
  font-size: 0.78rem;
  line-height: 1.55;
}

.patient-form-section {
  display: grid;
  gap: 1rem;
  padding: 1.1rem;
}

.patient-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.patient-section-header h3 {
  margin: 0;
  font-size: 1rem;
}

.patient-section-header p {
  margin: 0.3rem 0 0;
}

.patient-section-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.3rem;
  height: 2.3rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  background: #e9f2ff;
  color: #1f63d1;
  font-size: 0.78rem;
  font-weight: 800;
}

.patient-summary-strip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.patient-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem 0.5rem 0.6rem;
  border-radius: 0.6rem;
  background: #ffffff;
  border: 1px solid #e4eaf3;
  box-shadow: 0 1px 3px rgba(18, 45, 82, 0.06);
  transition: box-shadow 0.15s;
}

.patient-summary-pill:hover {
  box-shadow: 0 3px 10px rgba(18, 45, 82, 0.1);
}

.patient-summary-pill-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.45rem;
  color: #fff;
  flex-shrink: 0;
}

.patient-summary-pill.navy .patient-summary-pill-icon {
  background: #173f72;
}

.patient-summary-pill.gold .patient-summary-pill-icon {
  background: #efc14b;
  color: #684d00;
}

.patient-summary-pill-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #5a6a80;
}

.patient-summary-pill-value {
  font-size: 0.82rem;
  font-weight: 800;
  color: #17365f;
  padding-left: 0.25rem;
  border-left: 2px solid #e4eaf3;
}

.patient-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.patient-form-row-wide {
  grid-column: 1 / -1;
}

.patient-field {
  display: grid;
  gap: 0.4rem;
}

.patient-field label {
  color: #4a5a72;
  font-size: 0.74rem;
  font-weight: 700;
}

.patient-input {
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid #dbe5f1;
  border-radius: 0.7rem;
  background: #f8fbff;
  color: #1c2c45;
  box-shadow: none;
  font-size: 0.88rem;
}

.patient-input:focus {
  border-color: #90b2e6;
  box-shadow: 0 0 0 0.2rem rgba(20, 56, 101, 0.08);
}

.patient-textarea {
  min-height: 5rem;
  resize: vertical;
}

.patient-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 0.85rem;
  background: #f5f8fd;
  color: #4a5a72;
  font-size: 0.8rem;
}

.patient-checkbox-row input {
  width: 1rem;
  height: 1rem;
}

.patient-checkbox-row-inline {
  margin-bottom: 0;
}

.patient-estimation-box {
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem;
  border: 1px solid #e1e9f4;
  border-radius: 0.85rem;
  background: #fbfdff;
}

.patient-age-row {
  margin-top: 0.1rem;
}

.patient-age-row-compact {
  grid-template-columns: minmax(0, 1.25fr) minmax(180px, 0.75fr);
}

.patient-field-note {
  color: #66768d;
  font-size: 0.78rem;
  line-height: 1.5;
}

.patient-live-age-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.patient-live-age-panel div {
  padding: 0.75rem 0.85rem;
  border: 1px solid #e1e9f4;
  border-radius: 0.75rem;
  background: #f5f8fd;
}

.patient-live-age-panel strong {
  display: block;
  margin-bottom: 0.3rem;
  color: #17365f;
  font-size: 0.78rem;
}

.patient-live-age-panel span {
  color: #66768d;
  font-size: 0.8rem;
}

.patient-input:disabled {
  background: #eef3f9;
  opacity: 0.85;
}

.patient-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.patient-validation-summary ul {
  margin-bottom: 0;
  padding-left: 1.2rem;
}

.patient-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 0.9rem;
  background: #fff;
  box-shadow: 0 6px 20px rgba(18, 45, 82, 0.07);
}

.patient-alert strong,
.patient-alert span,
.patient-empty-state,
.patient-table td small {
  display: block;
}

.patient-alert.success {
  border-left: 4px solid #23b26f;
}

.patient-alert.warning {
  border-left: 4px solid #efc14b;
}

.patient-alert-badge {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: #e6f7ef;
  color: #0d7a49;
  font-size: 0.8rem;
  font-weight: 800;
}

.patient-mini-list div {
  align-items: start;
}

.patient-mini-list span {
  text-align: right;
}

.patient-table td strong {
  display: block;
  color: #17365f;
}

.patient-table td small {
  margin-top: 0.2rem;
  color: #7d8ea3;
}

.patient-empty-state {
  padding: 1rem;
  border-radius: 0.85rem;
  background: #f8fbff;
  color: #7d8ea3;
  font-size: 0.82rem;
  text-align: center;
}

.patient-registration-modal .modal-content {
  border: 0;
  border-radius: 0.2rem;
  overflow: hidden;
  box-shadow: 0 32px 90px rgba(6, 16, 29, 0.38);
  background: #f7fafe;
}

.patient-registration-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #173f72 0%, #1f5fae 58%, #35c7a3 100%);
  color: #fff;
  border-bottom: 0;
  padding: 0.75rem 1rem;
}

.patient-registration-modal .modal-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0;
}

.patient-modal-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  line-height: 1;
  background: transparent;
}

.patient-registration-modal .modal-body {
  padding: 0.95rem 0.9rem 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.patient-precheck-modal .modal-dialog {
  max-width: 680px;
}

.patient-precheck-body {
  display: grid;
  gap: 1rem;
}

.patient-precheck-copy {
  color: #60758f;
  font-size: 0.84rem;
  line-height: 1.5;
}

.patient-precheck-grid {
  margin: 0;
}

.patient-precheck-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.patient-precheck-btn {
  min-width: 9rem;
  height: 2.4rem;
  border: 0;
  padding: 0 1rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.patient-precheck-btn.primary {
  background: linear-gradient(135deg, #173f72 0%, #1f5fae 60%, #35c7a3 100%);
  color: #fff;
}

.patient-precheck-btn.secondary {
  background: #eaf1fb;
  color: #17365f;
}

.patient-modal-form {
  display: grid;
  gap: 0.9rem;
}

.patient-modal-grid {
  display: grid;
  gap: 0.95rem;
}

.patient-modal-row {
  display: grid;
  gap: 0.75rem;
  align-items: start;
}

.patient-modal-row-single {
  grid-template-columns: minmax(0, 1fr);
}

.patient-modal-row-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.patient-modal-row-three {
  grid-template-columns: 1fr 1fr 2fr;
}

.patient-modal-row-top {
  grid-template-columns: minmax(0, 1fr) 118px;
  align-items: start;
  column-gap: 1rem;
}

.patient-modal-top-fields {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.patient-modal-row-medical {
  grid-template-columns: minmax(220px, 360px);
}

.patient-modal-row-five {
  grid-template-columns: 0.9fr 1.05fr 1.4fr 0.85fr 0.95fr;
}

.patient-modal-validation {
  margin-bottom: 0;
}

.patient-modal-validation ul {
  margin: 0;
}

.patient-modal-alert {
  margin-bottom: 0;
  padding: 0.55rem 0.75rem;
  font-size: 0.8rem;
  border-color: #c8def8;
  background: #eaf4ff;
  color: #18426f;
}

.patient-registration-modal .patient-field {
  display: grid;
  gap: 0.3rem;
  align-content: start;
}

.patient-registration-modal .patient-field label {
  display: inline-block;
  color: #464646;
  font-size: 0.78rem;
  font-weight: 600;
}

.patient-field-label-row {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  min-height: 1.15rem;
}

.patient-field-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1rem;
  color: #1f5fae;
  font-size: 0.82rem;
  line-height: 1;
}

.patient-required-mark {
  color: #1ea986;
  font-weight: 700;
  line-height: 1;
}

.patient-modal-input {
  width: 100%;
  height: 2.1rem;
  min-height: 2.1rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid #d6e1ef;
  border-radius: 0;
  background: #fff;
  color: #243447;
  font-size: 0.78rem;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.patient-modal-input:focus {
  border-color: #67a7ff;
  background: #fcfeff;
  box-shadow: 0 0 0 0.18rem rgba(103, 167, 255, 0.14);
}

.patient-modal-input::placeholder {
  color: #9aa1ab;
}

.patient-cnic-lookup-note {
  color: #1f5fae;
  font-size: 0.72rem;
  font-weight: 600;
}

.patient-cnic-modal-body {
  display: grid;
  gap: 0.8rem;
}

.patient-cnic-table th,
.patient-cnic-table td {
  vertical-align: middle;
  text-align: left;
}

.patient-cnic-photo-cell {
  width: 4.5rem;
}

.patient-cnic-photo {
  width: 2.8rem;
  height: 3.2rem;
  display: block;
  border-radius: 0.35rem;
  object-fit: cover;
  object-position: center top;
  background: #eef4fb;
  border: 1px solid #d8e3f0;
}

.patient-cnic-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7890ad;
  font-size: 1.1rem;
}

.patient-cnic-result-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.patient-cnic-result-row:hover {
  background: #eef5ff;
}

.patient-cnic-select-btn {
  min-width: 5.25rem;
  height: 2rem;
  border: 0;
  background: linear-gradient(135deg, #173f72 0%, #1f5fae 60%, #35c7a3 100%);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0 0.75rem;
}

.patient-cnic-select-btn:hover {
  filter: brightness(1.04);
}

.patient-modern-datepicker-input {
  padding-right: 2.2rem;
  background-image: linear-gradient(135deg, rgba(31, 95, 174, 0.08), rgba(53, 199, 163, 0.08));
}

.flatpickr-calendar {
  border: 1px solid #d9e4f2;
  border-radius: 0;
  background: #ffffff;
  box-shadow: 0 24px 50px rgba(19, 58, 107, 0.18);
  padding: 0.45rem 0.4rem 0.55rem;
}

.flatpickr-calendar.arrowTop::before,
.flatpickr-calendar.arrowTop::after,
.flatpickr-calendar.arrowBottom::before,
.flatpickr-calendar.arrowBottom::after {
  display: none;
}

.flatpickr-months {
  align-items: center;
  padding: 0.15rem 0.2rem 0.45rem;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  top: 0.35rem;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  color: #173f72;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  background: #eef5ff;
  color: #1f5fae;
}

.flatpickr-current-month {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  color: #173f72;
  font-size: 0.96rem;
  font-weight: 700;
  padding-top: 0.2rem;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  font-weight: 700;
  color: #173f72;
}

.flatpickr-weekdays {
  margin-bottom: 0.2rem;
}

span.flatpickr-weekday {
  color: #6d7f97;
  font-size: 0.77rem;
  font-weight: 700;
}

.flatpickr-day {
  border-radius: 0;
  color: #213449;
  font-weight: 500;
}

.flatpickr-day:hover {
  background: #eef5ff;
  border-color: #eef5ff;
}

.flatpickr-day.today {
  border-color: #67a7ff;
  color: #1f5fae;
}

.flatpickr-day.today:hover,
.flatpickr-day.today:focus {
  background: #eef5ff;
  border-color: #67a7ff;
  color: #1f5fae;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
  background: linear-gradient(135deg, #173f72 0%, #1f5fae 70%, #35c7a3 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(31, 95, 174, 0.24);
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: #aab6c7;
}

.flatpickr-innerContainer,
.flatpickr-rContainer,
.flatpickr-days,
.dayContainer {
  width: 100%;
}

.flatpickr-time input:hover,
.flatpickr-time .flatpickr-am-pm:hover,
.numInputWrapper:hover,
.numInputWrapper span:hover {
  background: #eef5ff;
}

.patient-search-select {
  position: relative;
}

.settings-field .patient-search-select {
  overflow: visible;
}

.settings-field .patient-search-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  z-index: 100;
}

.patient-search-select-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  text-align: left;
  cursor: pointer;
}

.patient-search-select-display,
.patient-search-select-option {
  gap: 0.45rem;
}

.patient-search-select-display {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.patient-search-select-arrow {
  color: #6f86a7;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.patient-search-select-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
  border: 1px solid #cddcf0;
  background: #fff;
  box-shadow: 0 16px 34px rgba(23, 63, 114, 0.12);
}

.patient-search-select-search {
  width: 100%;
  height: 2.1rem;
  padding: 0.3rem 0.65rem;
  border: 0;
  border-bottom: 1px solid #d9e4f2;
  color: #243447;
  font-size: 0.78rem;
  outline: none;
}

.patient-search-select-options {
  max-height: 220px;
  overflow-y: auto;
}

.patient-search-select-option,
.patient-search-select-empty {
  width: 100%;
  min-height: 2rem;
  display: flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border: 0;
  background: #fff;
  color: #243447;
  font-size: 0.78rem;
  text-align: left;
}

.patient-search-select-option {
  cursor: pointer;
}

.patient-search-select-option:hover,
.patient-search-select-option.is-selected {
  background: #eef5ff;
}

.patient-search-select-option-add {
  background: #f4fbf6;
  color: #166534;
  font-weight: 700;
  border-top: 1px dashed #c7ead1;
}

.patient-search-select-option-add:hover,
.patient-search-select-option-add.is-selected {
  background: #dcfce7;
}

.patient-search-select-empty {
  color: #7f8fa6;
}

.patient-option-icon {
  flex-shrink: 0;
}

.patient-flag {
  width: 1rem;
  height: 0.72rem;
  display: inline-block;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.1rem;
  overflow: hidden;
}

.patient-flag-pakistan {
  background: linear-gradient(90deg, #ffffff 0 24%, #0b7a43 24% 100%);
  position: relative;
}

.patient-flag-pakistan::before {
  content: "";
  position: absolute;
  top: 0.12rem;
  left: 0.56rem;
  width: 0.22rem;
  height: 0.22rem;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: -0.06rem 0 0 0.05rem #0b7a43;
}

.patient-flag-afghanistan {
  background: linear-gradient(90deg, #111111 0 33.33%, #c71f2d 33.33% 66.66%, #1f8a44 66.66% 100%);
}

.patient-modal-age-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  align-items: stretch;
}

.patient-photo-input {
  display: none;
}

.patient-photo-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #c6d8ee;
  border-radius: 0.35rem;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8ff 100%);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.patient-photo-preview:hover,
.patient-photo-preview:focus-visible {
  border-color: #67a7ff;
  background: linear-gradient(180deg, #fafdff 0%, #edf6ff 100%);
  box-shadow: 0 0 0 0.18rem rgba(103, 167, 255, 0.12);
  outline: none;
}

.patient-photo-preview-placeholder {
  display: grid;
  justify-items: center;
  gap: 0.2rem;
  color: #7f8fa6;
}

.patient-photo-preview-placeholder span {
  font-size: 1.2rem;
  line-height: 1;
}

.patient-photo-preview-placeholder small {
  font-size: 0.72rem;
  font-weight: 600;
}

.patient-photo-preview-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #fff;
}

.patient-photo-field-top {
  align-self: start;
  justify-self: end;
  width: 112px;
}

.patient-photo-preview-top {
  min-height: 148px;
  aspect-ratio: 3 / 4;
}

.patient-modal-textarea {
  height: auto;
  min-height: 4rem;
  resize: none;
}

.patient-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
  padding-top: 0.15rem;
}

.appointment-payment-row {
  margin-bottom: 0.35rem;
}

.appointment-modal-actions {
  margin-top: 0.45rem;
}

.patient-modal-save {
  min-width: 4.75rem;
  min-height: 2rem;
  padding: 0.2rem 0.75rem;
  border: 0;
  border-radius: 0.25rem;
  background: linear-gradient(135deg, #1ea986 0%, #35c7a3 100%);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(30, 169, 134, 0.22);
}

.patient-modal-save:hover,
.patient-modal-save:focus {
  background: linear-gradient(135deg, #169878 0%, #28b894 100%);
}

.patient-registration-modal .text-danger {
  font-size: 0.7rem;
}

.patient-modal-close {
  margin-left: auto;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.patient-modal-close:hover,
.patient-modal-close:focus {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  transform: scale(1.04);
}

.patient-modal-close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}

.patient-registration-modal .modal-dialog {
  max-width: 1080px;
}

.patient-registration-modal .modal-backdrop,
.modal-backdrop.show {
  opacity: 0.55;
}

@media (max-width: 1200px) {
  .patient-modal-row-medical,
  .patient-modal-row-five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .patient-modal-row-top {
    grid-template-columns: minmax(0, 1fr) 118px;
  }
}

@media (max-width: 768px) {
  .patient-modal-row-top,
  .patient-modal-row-medical,
  .patient-modal-row-two,
  .patient-modal-row-three,
  .patient-modal-row-five {
    grid-template-columns: 1fr;
  }

  .patient-photo-field-top {
    width: 100%;
  }

  .patient-photo-preview-top {
    min-height: 140px;
  }
}

.patient-list-card {
  display: grid;
  gap: 0;
  overflow: visible;
}

.patient-list-page {
  gap: 0.5rem;
}

.patient-list-card-full {
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.patient-list-header,
.patient-list-tools,
.patient-list-tools-end,
.patient-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.patient-list-header {
  align-items: flex-start;
  padding: 0.7rem 0.9rem 0.65rem;
  border: 1px solid #d5dce7;
  border-bottom: 0;
  background: #fff;
}

.patient-list-title-block {
  display: grid;
  gap: 0.18rem;
}

.patient-list-header h2 {
  margin: 0;
  color: #17365f;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.patient-list-header p {
  margin: 0;
  color: #7d8ea3;
  font-size: 0.76rem;
  line-height: 1.55;
}

.patient-list-toolbar-danger {
  gap: 0.35rem;
}

.patient-danger-btn {
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border-radius: 0.12rem;
  border-color: #b7151b;
  background: #c51a1f;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: none;
}

.patient-danger-btn:hover,
.patient-danger-btn:focus {
  background: #aa1318;
  color: #fff;
}

.patient-list-toolbar-theme {
  gap: 0.55rem;
  flex-wrap: wrap;
}

.patient-theme-btn {
  min-height: 2.7rem;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  background: linear-gradient(180deg, #ffffff 0%, #f1f7ff 100%);
  color: #1f4f88;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(35, 79, 140, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.patient-theme-btn.primary {
  border-color: #1f5fae;
  background: linear-gradient(135deg, #2f74d0 0%, #1c5ab2 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(29, 90, 178, 0.2);
}

.patient-theme-btn.appointment {
  border-color: #9cd4cc;
  background: linear-gradient(135deg, #ecfffb 0%, #d9f8ef 100%);
  color: #0e6b67;
  box-shadow: 0 12px 24px rgba(32, 134, 122, 0.12);
}

.patient-theme-btn.direct {
  border-color: #f3c793;
  background: linear-gradient(135deg, #fff6e8 0%, #ffe7c7 100%);
  color: #a05600;
  box-shadow: 0 12px 24px rgba(198, 123, 20, 0.12);
}

.patient-theme-btn-icon {
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.82rem;
  line-height: 1;
  flex-shrink: 0;
}

.patient-theme-btn:not(.primary) .patient-theme-btn-icon {
  background: rgba(255, 255, 255, 0.72);
}

.patient-theme-btn:hover,
.patient-theme-btn:focus {
  border-color: #a9c8eb;
  background: linear-gradient(180deg, #ffffff 0%, #e8f2ff 100%);
  color: #17497f;
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(35, 79, 140, 0.12);
}

.patient-theme-btn.primary:hover,
.patient-theme-btn.primary:focus {
  background: linear-gradient(135deg, #3b82de 0%, #215db8 100%);
  color: #fff;
  border-color: #215db8;
  box-shadow: 0 16px 28px rgba(29, 90, 178, 0.24);
}

.patient-theme-btn.appointment:hover,
.patient-theme-btn.appointment:focus {
  border-color: #7ec7bb;
  background: linear-gradient(135deg, #e4fff8 0%, #cef5ea 100%);
  color: #0a5c58;
  box-shadow: 0 16px 28px rgba(32, 134, 122, 0.16);
}

.patient-theme-btn.direct:hover,
.patient-theme-btn.direct:focus {
  border-color: #ebb56a;
  background: linear-gradient(135deg, #fff2df 0%, #ffdcae 100%);
  color: #8a4c00;
  box-shadow: 0 16px 28px rgba(198, 123, 20, 0.16);
}

.patient-list-tools-plain {
  align-items: flex-start;
  padding: 0.55rem 0.9rem 0.55rem;
  border: 1px solid #d5dce7;
  border-top: 0;
  border-bottom: 0;
  background: #fff;
}

.patient-list-search-shell-medium {
  flex: 1;
  max-width: 620px;
}

.patient-list-search-box-medium {
  width: 100%;
  min-height: 3.15rem;
  display: flex;
  align-items: center;
  border: 1px solid #d9e3ef;
  border-radius: 0.45rem;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(28, 58, 97, 0.08);
}

.patient-list-search-panel-left,
.patient-list-search-panel-right {
  width: 4.1rem;
  min-height: 3.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.6rem;
  line-height: 1;
}

.patient-list-search-panel-left {
  background: #4f6280;
  color: #ffffff;
}

.patient-list-search-box-medium .patient-list-search-input-medium {
  padding-right: 1.2rem;
}

.patient-list-search-panel-right {
  background: #ffffff;
  color: #c8c8c8;
}

.patient-list-search-input-medium {
  width: 100%;
  min-width: 0;
  min-height: 3.15rem;
  padding: 0 1.2rem;
  border: 0;
  background: #ffffff;
  color: #6b7280;
  font-size: 0.95rem;
  font-weight: 500;
}

.patient-list-search-input-medium::placeholder {
  color: #c1c5cc;
}

.patient-list-search-input-medium:focus {
  outline: none;
}

.patient-list-search-box-medium:focus-within {
  border-color: #8eb2df;
  box-shadow: 0 12px 24px rgba(28, 58, 97, 0.1), 0 0 0 3px rgba(66, 133, 244, 0.08);
}

.patient-list-tools-end-plain {
  margin-left: auto;
}

.patient-list-pagination-toolbar {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.patient-page-size-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #5f7087;
  font-size: 0.78rem;
  font-weight: 700;
}

.patient-page-size-select {
  min-width: 5rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid #d9e3ef;
  border-radius: 0.45rem;
  background: #ffffff;
  color: #1f2f45;
  font-size: 0.78rem;
  font-weight: 600;
}

.patient-page-summary {
  color: #6a7a90;
  font-size: 0.76rem;
  font-weight: 600;
}

.patient-page-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.patient-page-nav-btn {
  min-width: 4.4rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid #d9e3ef;
  border-radius: 0.45rem;
  background: #ffffff;
  color: #1f4f88;
  font-size: 0.76rem;
  font-weight: 700;
}

.patient-page-nav-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.patient-directory-wrap {
  position: relative;
  border: 1px solid #d5dce7;
  border-top: 0;
  background: #fff;
  overflow: visible !important;
}

.patient-list-toolbar,
.patient-list-tools-end {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.patient-directory-table th,
.patient-directory-table td {
  vertical-align: top;
}

.patient-directory-table-plain th,
.patient-directory-table-plain td {
  padding: 0.62rem 0.6rem;
  border-bottom: 1px solid #eceff4;
  color: #243447;
  font-size: 0.78rem;
}

.patient-directory-table-plain thead th {
  color: #1f2f45;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.patient-directory-table-plain tbody tr:hover {
  background: #fafcff;
}

.patient-directory-table th {
  white-space: nowrap;
}

.patient-name-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: #f5f8fc;
  color: #2f4b76;
  font-weight: 600;
}

.patient-row-action {
  width: 1.55rem;
  height: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #edf0f5;
  border-radius: 0.15rem;
  background: #f5f6f8;
  color: #4a5668;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.patient-row-action:hover {
  background: #eceff4;
}

.patient-row-actions {
  position: relative;
  display: inline-flex;
  overflow: visible;
  z-index: 2;
}

.patient-row-actions .dropdown-menu {
  position: absolute !important;
  top: calc(100% + 0.35rem) !important;
  right: 0 !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  z-index: 1060 !important;
  min-width: 11rem;
  margin: 0;
}

.table-responsive,
.card-body,
.table-container {
  overflow: visible !important;
}

.dropdown-menu {
  z-index: 9999 !important;
}

.dropdown-menu-end {
  right: 0;
  left: auto;
}

.patient-row-menu {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 10.5rem;
  display: grid;
  gap: 0.15rem;
  padding: 0.35rem;
  border: 1px solid #d9e3ef;
  border-radius: 0.55rem;
  background: #ffffff;
  box-shadow: 0 14px 26px rgba(28, 58, 97, 0.12);
  z-index: 3000;
}

.patient-row-menu-item {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: #1f2f45;
  font-size: 0.76rem;
  font-weight: 600;
  text-align: left;
}

.patient-row-menu-item:hover,
.patient-row-menu-item:focus {
  background: #eef5ff;
  color: #17497f;
}

@media (max-width: 1100px) {
  .patient-template-hero,
  .patient-template-layout {
    grid-template-columns: 1fr;
  }

  .patient-registration-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .patient-list-search-shell-medium {
    max-width: 100%;
    width: 100%;
  }

  .patient-list-search-panel-left,
  .patient-list-search-panel-right {
    width: 3.3rem;
    min-height: 2.9rem;
    font-size: 1.3rem;
  }

  .patient-list-search-box-medium,
  .patient-list-search-input-medium {
    min-height: 2.9rem;
  }

  .patient-template-hero {
    padding: 1.1rem;
    background: linear-gradient(180deg, #173f72 0%, #224f8d 48%, #ffffff 48%, #ffffff 100%);
  }

  .patient-template-hero-actions {
    flex-direction: column;
  }

  .patient-template-hero-actions .master-toolbar-btn {
    width: 100%;
  }

  .patient-template-hero-stats {
    grid-template-columns: 1fr;
  }

  .patient-list-header,
  .patient-list-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .patient-list-toolbar,
  .patient-list-tools-end {
    justify-content: flex-start;
  }

  .patient-side-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .patient-hero-strip,
  .patient-summary-grid,
  .patient-form-row {
    grid-template-columns: 1fr;
  }

  .patient-age-row-compact,
  .patient-live-age-panel {
    grid-template-columns: 1fr;
  }

  .patient-alert {
    flex-direction: column;
    align-items: flex-start;
  }

  .patient-mini-list span {
    text-align: left;
  }
}

.settings-field input:focus,
.settings-field select:focus,
.settings-field textarea:focus {
  outline: none;
  border-color: #a4c0e4;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(20, 56, 101, 0.08);
}

.settings-field textarea {
  resize: vertical;
}

.settings-form-actions {
  display: flex;
  gap: 0.65rem;
  padding-top: 0.5rem;
}

.settings-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.settings-table-search {
  flex: 1 1 320px;
}

.settings-table-search-input {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid #d9e3ef;
  border-radius: 0.45rem;
  background: #ffffff;
  color: #1f2f45;
  font-size: 0.8rem;
}

.settings-table-search-input:focus {
  outline: none;
  border-color: #a4c0e4;
  box-shadow: 0 0 0 3px rgba(20, 56, 101, 0.08);
}

.settings-hours-grid {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.settings-hour-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 0.55rem;
  background: #f8fbff;
  border: 1px solid #edf2f7;
  font-size: 0.8rem;
}

.settings-hour-day {
  min-width: 5.5rem;
  color: #17365f;
  font-weight: 700;
}

.settings-hour-row input[type="time"] {
  padding: 0.4rem 0.55rem;
  border: 1px solid #dfe8f3;
  border-radius: 0.45rem;
  background: #fff;
  color: #1c2c45;
  font-size: 0.78rem;
  font-family: inherit;
}

.settings-hour-row > span {
  color: #7d8ea3;
  font-size: 0.75rem;
}

.settings-toggle {
  position: relative;
  display: inline-block;
  width: 2.4rem;
  height: 1.35rem;
  flex-shrink: 0;
  cursor: pointer;
}

.settings-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.settings-toggle span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #d5dfe9;
  transition: background-color 0.2s ease;
}

.settings-toggle span::after {
  content: "";
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.settings-toggle input:checked + span {
  background: #2bb673;
}

.settings-toggle input:checked + span::after {
  transform: translateX(1.05rem);
}

.settings-toggle-list {
  display: grid;
  gap: 0.2rem;
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.55rem;
  border: 1px solid #edf2f7;
  background: #f8fbff;
}

.settings-toggle-row strong {
  display: block;
  color: #17365f;
  font-size: 0.82rem;
}

.settings-toggle-row span {
  color: #7d8ea3;
  font-size: 0.72rem;
}

.settings-field-note {
  display: block;
  margin-top: 0.45rem;
  color: #7d8ea3;
  font-size: 0.72rem;
  line-height: 1.4;
}

.shift-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.shift-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.shift-table th,
.shift-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
  white-space: nowrap;
}

.shift-table th {
  background: #f4f6fa;
  font-weight: 600;
  color: #3a4a5c;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.shift-table tbody tr:hover {
  background: #f8fafd;
}

.shift-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.shift-badge.morning {
  background: #e3f2fd;
  color: #1565c0;
}

.shift-badge.evening {
  background: #fff3e0;
  color: #e65100;
}

.shift-badge.night {
  background: #ede7f6;
  color: #4527a0;
}

.shift-badge.rotational {
  background: #e8f5e9;
  color: #2e7d32;
}

.shift-badge.oncall {
  background: #fce4ec;
  color: #c62828;
}

.shift-badge.role-admin {
  background: #e8eaf6;
  color: #283593;
}

.shift-badge.role-doctor {
  background: #e3f2fd;
  color: #1565c0;
}

.shift-badge.role-nurse {
  background: #f3e5f5;
  color: #7b1fa2;
}

.shift-badge.role-receptionist {
  background: #fff3e0;
  color: #e65100;
}

.shift-badge.role-pharmacist {
  background: #e8f5e9;
  color: #2e7d32;
}

.shift-badge.role-labtech {
  background: #fff8e1;
  color: #f57f17;
}

.shift-badge.role-accountant {
  background: #efebe9;
  color: #4e342e;
}

.shift-badge.role-staff {
  background: #eceff1;
  color: #37474f;
}

.user-table-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  border: 2px solid #e0e5ed;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.user-table-avatar-initials {
  background: linear-gradient(135deg, #143558, #1e6bb8);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border-color: #1e6bb8;
}

.user-image-upload-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 2px dashed #d0d7e2;
  border-radius: 10px;
  background: #fafbfd;
  transition: border-color 0.2s, background 0.2s;
}

.user-image-upload-row.drag-over {
  border-color: #1e6bb8;
  background: rgba(30, 107, 184, 0.06);
}

.user-image-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 3px solid #d0d7e2;
  transition: border-color 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.drag-over .user-image-preview {
  border-color: #1e6bb8;
}

.user-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-image-initials {
  font-size: 1.25rem;
  font-weight: 700;
  color: #8a9bb5;
  user-select: none;
}

.user-image-upload-info {
  font-size: 0.82rem;
  color: #3a4a5c;
}

.user-image-upload-info strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.15rem;
}

.user-image-upload-info p {
  margin: 0 0 0.5rem;
  color: #7a8a9c;
  font-size: 0.78rem;
}

.user-image-upload-info small {
  display: block;
  margin-top: 0.35rem;
  color: #a0aab5;
  font-size: 0.72rem;
}

.user-image-upload-actions {
  display: flex;
  gap: 0.5rem;
}

.user-image-file-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.45rem;
  padding: 0.35rem 0.7rem;
  background: #eef3f9;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #3a4a5c;
}

.user-image-file-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.user-image-file-size {
  color: #7a8a9c;
  white-space: nowrap;
}

.shift-form-card {
  background: #f8fafd;
  border: 1px dashed #d0d7e2;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}

.shift-form-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1c2d41;
  margin: 0 0 1rem;
}

.shift-days-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.shift-day-check {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.82rem;
  background: #fff;
  border: 1px solid #d0d7e2;
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  transition: all 0.15s;
}

.shift-day-check:has(input:checked) {
  background: #143558;
  border-color: #143558;
  color: #fff;
}

.shift-day-check input {
  display: none;
}

@media (max-width: 991.98px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-menu {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.65rem;
  }

  .settings-menu-label {
    width: 100%;
    padding: 0 0.35rem 0.45rem;
  }

  .settings-menu-item {
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
  }

  .settings-menu-item.active {
    border-left: 0;
    padding-left: 0.75rem;
    border-radius: 999px;
  }
}

@media (max-width: 767.98px) {
  .settings-form-row {
    grid-template-columns: 1fr;
  }

  .settings-table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-logo-card {
    flex-direction: column;
    text-align: center;
  }

  .settings-logo-actions {
    justify-content: center;
  }

  .settings-hour-row {
    flex-wrap: wrap;
  }
}

.dashboard-grid {
  display: grid;
  gap: 1.5rem;
}

.dashboard-hero,
.dashboard-card,
.dashboard-stat {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--app-shadow);
  backdrop-filter: blur(16px);
}

.dashboard-hero {
  padding: 2rem;
  overflow: hidden;
}

.dashboard-hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.dashboard-hero-copy h1 {
  margin: 0.65rem 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.dashboard-hero-copy p,
.dashboard-card p,
.dashboard-list-meta,
.dashboard-table td,
.dashboard-table th,
.dashboard-muted {
  color: var(--app-text-muted);
}

.dashboard-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(53, 199, 163, 0.14);
  color: #9ef0da;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.dashboard-btn-primary,
.dashboard-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  padding: 0.9rem 1.1rem;
  font-weight: 700;
}

.dashboard-btn-primary {
  background: linear-gradient(135deg, var(--app-primary), #8aefd7);
  color: #05111b;
}

.dashboard-btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--app-text);
}

.dashboard-hero-side {
  min-width: 280px;
  max-width: 320px;
  padding: 1.25rem;
  border-radius: 1.25rem;
  background: linear-gradient(160deg, rgba(103, 167, 255, 0.14), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-hero-side h3,
.dashboard-card h3,
.dashboard-card h4 {
  margin-top: 0;
}

.dashboard-kpi-list {
  display: grid;
  gap: 0.9rem;
}

.dashboard-kpi-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-kpi-item strong,
.dashboard-stat-value,
.dashboard-table strong {
  color: #fff;
}

.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-stat {
  padding: 1.4rem;
}

.dashboard-stat-label {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--app-text-muted);
}

.dashboard-stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
}

.dashboard-stat-trend {
  display: inline-flex;
  margin-top: 0.85rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.dashboard-stat-trend.positive {
  color: #9ef0da;
  background: rgba(53, 199, 163, 0.12);
}

.dashboard-stat-trend.warning {
  color: #ffd89a;
  background: rgba(255, 197, 92, 0.12);
}

.dashboard-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.95fr);
  gap: 1.5rem;
}

.dashboard-card {
  padding: 1.5rem;
}

.dashboard-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-table {
  width: 100%;
}

.dashboard-table th,
.dashboard-table td {
  padding: 0.95rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.dashboard-table tbody tr:last-child td {
  border-bottom: 0;
}

.dashboard-status {
  display: inline-flex;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.dashboard-status.success {
  background: rgba(53, 199, 163, 0.14);
  color: #9ef0da;
}

.dashboard-status.info {
  background: rgba(103, 167, 255, 0.14);
  color: #bcd5ff;
}

.dashboard-status.danger {
  background: rgba(255, 126, 138, 0.14);
  color: #ffc1c7;
}

.dashboard-list {
  display: grid;
  gap: 1rem;
}

.dashboard-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-list-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.dashboard-progress {
  height: 0.75rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--app-primary), var(--app-accent));
}

.dashboard-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.dashboard-action-card {
  padding: 1rem;
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-action-card strong {
  display: block;
  margin-bottom: 0.35rem;
}

.dashboard-stat-trend.info,
.dashboard-status.warning {
  color: #ffd89a;
  background: rgba(255, 197, 92, 0.12);
}

.admin-dashboard-hero {
  background:
    radial-gradient(circle at top right, rgba(53, 199, 163, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(103, 167, 255, 0.09), rgba(255, 255, 255, 0.04));
}

.admin-spotlight-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.admin-dashboard-layout {
  align-items: start;
}

.admin-stat-card {
  position: relative;
  overflow: hidden;
}

.admin-stat-card::after {
  content: "";
  position: absolute;
  inset: auto -1rem -2.5rem auto;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.admin-module-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-module-card {
  min-height: 10.5rem;
}

.admin-module-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.8rem;
  border-radius: 1rem;
  background: rgba(103, 167, 255, 0.12);
  font-size: 1.4rem;
}

.admin-side-card {
  background: rgba(255, 255, 255, 0.045);
}

.admin-metric-stack {
  display: grid;
  gap: 0.85rem;
}

.admin-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-metric-row strong {
  color: #fff;
}

@media (max-width: 1199.98px) {
  .master-topbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .master-topbar-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .master-stat-grid,
  .dashboard-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .master-dashboard-grid,
  .master-secondary-grid,
  .master-dashboard-bottom,
  .dashboard-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .master-shell {
    grid-template-columns: 1fr;
  }

  .master-sidebar {
    order: 2;
  }

  .master-main-shell {
    order: 1;
  }

  .dashboard-hero-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-hero-side {
    min-width: 100%;
    max-width: none;
  }
}

@media (max-width: 767.98px) {
  .master-content,
  .master-topbar {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .master-page-header,
  .master-toolbar-actions,
  .master-topbar-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .master-stat-grid,
  .master-action-grid,
  .master-ward-grid,
  .dashboard-stats-grid,
  .dashboard-actions-grid,
  .admin-module-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-card-header,
  .dashboard-list-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-table {
    display: block;
    overflow-x: auto;
  }
}

/* â”€â”€â”€ Department Category Styles â”€â”€â”€ */
.dept-color-swatch {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    border: 1px solid #d1d5db;
    vertical-align: middle;
}

.dept-color-picker-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.dept-color-input {
    width: 40px;
    height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 2px;
    cursor: pointer;
    background: none;
}

.dept-color-text {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.92rem;
    font-family: monospace;
}

.dept-category-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.dept-category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eef4ff;
    font-size: 1rem;
    line-height: 1;
}

/* â”€â”€â”€ OPD Charges Styles â”€â”€â”€ */
.opd-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.opd-badge.general {
    background: #e0f2fe;
    color: #0369a1;
}

.opd-badge.doctor {
    background: #fef3c7;
    color: #92400e;
}

.opd-amount {
    font-weight: 700;
    color: #059669;
    white-space: nowrap;
}

.opd-type-toggle {
    display: flex;
    gap: 16px;
    align-items: center;
    padding-top: 6px;
}

.opd-radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.93rem;
    cursor: pointer;
    user-select: none;
}

.opd-radio-label input[type="radio"] {
    accent-color: #1e3a5f;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* â”€â”€ Entitle Type Badges â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.entitle-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.entitle-badge.payable {
    background: #fef3c7;
    color: #92400e;
}

.entitle-badge.free {
    background: #d1fae5;
    color: #065f46;
}

.entitle-badge.half-fee {
    background: #e0e7ff;
    color: #4338ca;
}

.entitle-badge.discount {
    background: #f3e8ff;
    color: #7c3aed;
}

.entitle-badge.discount-fixed {
    background: #fee2e2;
    color: #b91c1c;
}

.entitle-badge.discount-percentage {
    background: #dcfce7;
    color: #166534;
}

.entitle-action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* â”€â”€â”€ Responsive Layout Hardening â”€â”€â”€ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
video,
canvas,
iframe,
table {
  max-width: 100%;
}

.dashboard-page .master-main-shell,
.dashboard-page .master-content,
.dashboard-page .master-card,
.dashboard-page .master-dashboard-page {
  max-width: 100%;
  min-width: 0;
}

.dashboard-page .master-topbar-page strong,
.dashboard-page .master-card-header h2,
.dashboard-page .master-page-header h1,
.dashboard-page .settings-section-header h2 {
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.dashboard-page .master-topbar-page small,
.dashboard-page .master-profile-pill small,
.dashboard-page .master-sidebar-user small,
.dashboard-page .master-card-header p,
.dashboard-page .settings-section-header p {
  font-size: clamp(0.72rem, 1.4vw, 0.9rem);
  overflow-wrap: anywhere;
}

.dashboard-page .dashboard-income-value,
.dashboard-page .master-stat-card .master-stat-value {
  font-size: clamp(0.95rem, 2vw, 1.35rem);
  overflow-wrap: anywhere;
}

.dashboard-page .dashboard-income-title,
.dashboard-page .master-stat-card .master-stat-label {
  font-size: clamp(0.72rem, 1.5vw, 0.9rem);
  overflow-wrap: anywhere;
}

.dashboard-page table {
  width: 100%;
}

.dashboard-page .table-responsive,
.dashboard-page .shift-table-wrap,
.dashboard-page .dashboard-monthly-chart-layout,
.dashboard-page .dashboard-patient-chart-canvas {
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dashboard-page .table-responsive > table,
.dashboard-page .shift-table-wrap > table {
  flex: 1;
}

html {
  font-size: 14px;
}

body,
.master-shell,
.master-main-shell,
.master-content-shell,
.master-content,
.settings-content,
.settings-section,
.master-card,
.patient-form-section,
.patient-list-card,
.patient-list-card-full,
.table-responsive,
.shift-table-wrap {
  min-width: 0;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
  height: auto;
}

.master-content,
.page-container,
.container {
  width: 100%;
}

.master-topbar,
.master-page-header,
.master-toolbar-actions,
.settings-logo-card,
.patient-list-header,
.patient-list-tools,
.patient-list-tools-end,
.patient-list-toolbar,
.patient-form-actions,
.patient-modal-actions,
.appointment-modal-actions,
.patient-precheck-actions,
.app-header-inner,
.app-footer-inner {
  flex-wrap: wrap;
}

.master-topbar-start,
.master-topbar-page,
.master-topbar-actions,
.master-profile-menu,
.settings-menu,
.settings-content,
.patient-list-title-block,
.patient-list-tools,
.patient-list-tools-end,
.patient-list-toolbar,
.master-card-header,
.master-sidebar-brand,
.master-sidebar-user {
  min-width: 0;
}

.master-topbar-page strong,
.master-topbar-page small,
.master-profile-pill strong,
.master-profile-pill small,
.master-sidebar-user strong,
.master-sidebar-user small,
.patient-list-header h2,
.patient-list-title-block,
.master-card-header h2,
.settings-section-header h2,
.settings-section-header p {
  overflow-wrap: anywhere;
}

.table-responsive,
.shift-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.table-responsive > table,
.shift-table,
.master-table,
.dashboard-table,
.patient-cnic-table {
  min-width: 42rem;
}

.modal-dialog {
  width: auto;
  max-width: min(100vw - 1rem, 100%);
  margin: 0.5rem auto;
}

.modal-content {
  max-height: calc(100dvh - 1rem);
}

.modal-body {
  overflow-y: auto;
}

.patient-registration-modal .modal-dialog,
.patient-precheck-modal .modal-dialog {
  max-width: min(1080px, calc(100vw - 1rem));
}

.patient-registration-modal .modal-content {
  max-height: calc(100dvh - 1rem);
}

.patient-registration-modal .modal-body {
  max-height: calc(100dvh - 5.5rem);
  overflow-y: auto;
  overflow-x: hidden;
}

.swal2-popup {
  width: min(42rem, calc(100vw - 1rem)) !important;
  max-width: calc(100vw - 1rem) !important;
}

.swal2-html-container {
  overflow-wrap: anywhere;
  max-height: min(60vh, 28rem);
  overflow-y: auto;
}

.swal2-title {
  overflow-wrap: anywhere;
}

.master-topbar {
  align-items: flex-start;
  padding: 0.9rem 1rem;
  gap: 0.85rem;
}

.master-topbar-start,
.master-topbar-actions {
  width: 100%;
}

.master-topbar-start {
  align-items: flex-start;
}

.master-topbar-actions {
  justify-content: stretch;
  gap: 0.75rem;
}

.master-topbar-clock,
.master-topbar-shift,
.master-profile-menu,
.master-profile-pill {
  width: 100%;
}

.master-topbar-clock,
.master-topbar-shift,
.master-profile-pill {
  min-width: 0;
  justify-content: flex-start;
  border-radius: 1rem;
}

.master-profile-dropdown {
  left: 0;
  right: auto;
  width: min(24rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
}

.master-stat-grid,
.dashboard-stats-grid,
.master-action-grid,
.dashboard-actions-grid,
.admin-module-grid,
.master-dashboard-grid,
.master-dashboard-bottom,
.master-secondary-grid,
.dashboard-content-grid,
.master-ward-grid,
.settings-layout,
.settings-form-row,
.patient-modal-row-two,
.patient-modal-row-three,
.patient-modal-row-five,
.patient-modal-row-medical,
.patient-modal-row-top,
.patient-modal-age-group {
  grid-template-columns: 1fr;
}

.master-content {
  padding: 0.75rem 1rem 1rem;
}

.master-card,
.settings-section,
.patient-form-section,
.auth-card {
  padding: 1rem;
}

.master-footer {
  flex-direction: column;
  align-items: flex-start;
  padding: 0 1rem 1rem;
}

.app-nav {
  width: 100%;
  flex-wrap: wrap;
}

.patient-list-header,
.patient-list-tools,
.patient-list-tools-end,
.patient-list-toolbar,
.patient-form-actions,
.master-page-header,
.master-toolbar-actions,
.settings-logo-card,
.patient-modal-actions,
.appointment-modal-actions,
.patient-precheck-actions,
.app-header-inner,
.app-footer-inner {
  flex-direction: column;
  align-items: stretch;
}

.master-toolbar-btn,
.settings-btn,
.patient-form-actions .master-toolbar-btn,
.patient-precheck-btn,
.patient-modal-save,
.master-profile-dropdown-link {
  width: 100%;
  min-height: 2.85rem;
}

.patient-modal-row-top {
  column-gap: 0.75rem;
}

.patient-photo-field-top,
.patient-photo-preview-top {
  width: 100%;
}

.patient-photo-preview-top {
  min-height: 9rem;
}

.master-profile-dropdown-grid {
  grid-template-columns: 1fr;
}

.dashboard-filter-toolbar {
  flex-direction: column;
  align-items: stretch;
  padding: 0.75rem 0.85rem;
}

.dashboard-chart-filter-form {
  width: 100%;
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.dashboard-chart-filter-form > .dashboard-chart-filter-select {
  flex: 1 1 8rem;
  min-width: 0;
  width: 100%;
}

.dashboard-chart-filter-check {
  flex: 1 1 100%;
  justify-content: center;
}

.dashboard-chart-summary-strip {
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dashboard-chart-summary-pill {
  flex: 1 1 8rem;
  min-width: 0;
}

.dashboard-chart-legend:not(.dashboard-chart-legend--bars) {
  grid-template-columns: 1fr !important;
}

@media (min-width: 768px) {
  html {
    font-size: 15px;
  }

  .master-topbar {
    padding: 0.35rem 1.25rem;
    min-height: 56px;
  }

  .master-content {
    padding: 1.25rem;
  }

  .master-card,
  .settings-section,
  .patient-form-section,
  .auth-card {
    padding: 1.25rem;
  }

  .master-topbar-actions {
    flex-direction: row;
    align-items: stretch;
  }

  .dashboard-filter-toolbar {
    flex-direction: row;
    align-items: center;
    padding: 0.85rem 1rem;
  }

  .dashboard-chart-filter-form {
    width: auto;
  }

  .dashboard-chart-filter-form > .dashboard-chart-filter-select {
    flex: 0 0 auto;
    width: auto;
  }

  .dashboard-chart-filter-check {
    flex: 0 0 auto;
    justify-content: flex-start;
  }

  .dashboard-chart-summary-pill {
    flex: 0 1 auto;
  }

  .dashboard-chart-legend {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  }

  .master-topbar-clock,
  .master-topbar-shift {
    width: auto;
  }

  .master-profile-menu {
    width: auto;
    min-width: 11rem;
  }

  .master-profile-pill {
    width: 100%;
  }

  .master-stat-grid,
  .dashboard-stats-grid,
  .master-action-grid,
  .dashboard-actions-grid,
  .admin-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-form-row,
  .patient-modal-row-two,
  .patient-modal-age-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .patient-list-header,
  .patient-list-tools,
  .patient-list-tools-end,
  .patient-list-toolbar,
  .patient-form-actions,
  .master-page-header,
  .master-toolbar-actions,
  .settings-logo-card,
  .patient-modal-actions,
  .appointment-modal-actions,
  .patient-precheck-actions,
  .app-header-inner,
  .app-footer-inner {
    flex-direction: row;
    align-items: center;
  }

  .master-toolbar-btn,
  .settings-btn,
  .patient-form-actions .master-toolbar-btn,
  .patient-precheck-btn,
  .patient-modal-save,
  .master-profile-dropdown-link {
    width: auto;
  }

  .master-profile-dropdown {
    left: auto;
    right: 0;
    width: min(24rem, calc(100vw - 2rem));
  }

  .swal2-popup {
    width: min(44rem, calc(100vw - 2rem)) !important;
  }
}

@media (min-width: 1024px) {
  .dashboard-page {
    --master-topbar-height: 3.5rem;
    --master-topbar-height-expanded: 4.25rem;
  }

  html {
    font-size: 16px;
  }

  .master-shell {
    display: grid;
    grid-template-columns: var(--sb-width) minmax(0, 1fr);
  }

  .dashboard-page.sidebar-collapsed {
    --sb-panel: 0px;
  }

  .master-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sb-width);
    max-width: calc(100vw - 2rem);
    height: 100dvh;
    transform: none;
    transition:
      width 0.32s cubic-bezier(0.4, 0, 0.2, 1),
      box-shadow 0.28s ease;
    grid-column: 1;
    grid-row: 1;
  }

  .master-main-shell {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    min-height: 100dvh;
  }

  .dashboard-page.sidebar-open {
    overflow: visible;
  }

  .master-nav-toggle {
    display: inline-flex;
  }

  .master-sidebar-close {
    display: none;
  }

  .master-sidebar-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .master-topbar {
    position: fixed;
    top: 0;
    left: var(--sb-width);
    right: 0;
    align-items: center;
    flex-wrap: nowrap;
    padding: 0.35rem 1.5rem;
    gap: 0.5rem;
    min-height: 56px;
    transition: left 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .dashboard-page.sidebar-collapsed .master-topbar {
    left: var(--sb-width);
  }

  .master-content-shell {
    min-height: 100dvh;
    padding-top: 0;
  }

  .master-content-shell.has-topbar-extra {
    padding-top: 0;
  }

  .master-topbar-start,
  .master-topbar-actions {
    width: auto;
  }

  .master-topbar-actions {
    margin-left: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .master-content {
    padding: 0.75rem 1.5rem 1.5rem;
  }

  .master-card,
  .settings-section,
  .patient-form-section {
    padding: 1.25rem;
  }

  .master-topbar-clock,
  .master-topbar-shift,
  .master-profile-menu,
  .master-profile-pill {
    width: auto;
  }

  .master-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .dashboard-stats-grid,
  .master-action-grid,
  .dashboard-actions-grid,
  .admin-module-grid,
  .master-secondary-grid,
  .master-ward-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .master-dashboard-grid {
    grid-template-columns: minmax(0, 1.85fr) minmax(260px, 0.95fr);
  }

  .master-dashboard-bottom,
  .dashboard-content-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.9fr);
  }

  .settings-layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .settings-form-row {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .patient-modal-row-top {
    grid-template-columns: minmax(0, 1fr) 118px;
  }

  .patient-modal-row-medical {
    grid-template-columns: minmax(220px, 360px);
  }

  .patient-modal-row-three {
    grid-template-columns: 1fr 1fr 2fr;
  }

  .patient-modal-row-five {
    grid-template-columns: 0.9fr 1.05fr 1.4fr 0.85fr 0.95fr;
  }

  .patient-modal-age-group {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .master-footer {
    flex-direction: row;
    align-items: center;
    padding: 1rem 1.5rem 1.25rem;
  }
}

/* â•â•â• Dashboard Â· analytics overview (Admin Dashboard) â•â•â• */

.dashboard-page .master-content {
  background:
    radial-gradient(1200px 480px at 10% -10%, rgba(34, 211, 160, 0.06), transparent),
    radial-gradient(900px 400px at 95% 0%, rgba(34, 211, 160, 0.04), transparent),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 42%, #e2e8f0 100%);
}

.dashboard-page .master-chart-card {
  border: 1px solid rgba(31, 111, 178, 0.12);
  box-shadow:
                                0 1px 0 rgba(255, 255, 255, 0.75) inset,
                                0 18px 40px rgba(15, 45, 90, 0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 350px;
}

.dashboard-page .master-chart-card .master-card-header.dashboard-chart-card-header {
  margin-bottom: 0;
  border-radius: 0;
}

.dashboard-chart-section {
  margin-bottom: 0.75rem;
}

.dashboard-overview-hero {
  margin-bottom: 1.5rem;
  padding: 1.1rem 1.25rem;
  border-radius: 20px;
  border: 1px solid rgba(31, 111, 178, 0.14);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(243, 248, 255, 0.92) 100%);
  box-shadow: 0 14px 36px rgba(18, 52, 98, 0.08);
}

.dashboard-overview-hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.dashboard-overview-eyebrow {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(31, 111, 178, 0.12);
  color: #1f6fb2;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-overview-hero-title {
  margin: 0 0 0.35rem;
  color: #0f2942;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.dashboard-overview-hero-desc {
  margin: 0;
  max-width: 36rem;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
}

.dashboard-overview-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dashboard-hero-stat {
  min-width: 9.5rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(31, 111, 178, 0.1);
  box-shadow: 0 6px 16px rgba(15, 45, 90, 0.05);
}

.dashboard-hero-stat-label {
  display: block;
  margin-bottom: 0.35rem;
  color: #67809a;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dashboard-hero-stat-value {
  display: block;
  color: #0f2942;
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dashboard-income-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.dashboard-income-card {
  display: flex;
  align-items: stretch;
  min-height: 82px;
  min-width: 0;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(31, 111, 178, 0.14);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-income-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.dashboard-income-card.is-zero {
  opacity: 0.72;
}

.dashboard-income-card.is-zero:hover {
  opacity: 0.88;
}

.dashboard-income-icon {
  width: 58px;
  min-width: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
}

.dashboard-income-card.income .dashboard-income-icon {
  background: linear-gradient(160deg, #62b313 0%, #4a9a0c 50%, #73c41d 100%);
}

.dashboard-income-card.expense .dashboard-income-icon {
  background: linear-gradient(160deg, #ff5f8a 0%, #e8457a 50%, #ff8fb0 100%);
}

.dashboard-income-body {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dashboard-income-title {
  color: #1e293b;
  font-size: clamp(0.74rem, 1.45vw, 0.82rem);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.dashboard-income-value {
  color: #0f172a;
  font-size: clamp(0.95rem, 1.9vw, 1.05rem);
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.dashboard-income-note {
  margin-bottom: 0.9rem;
  color: #4f6b87;
  font-size: 0.9rem;
  font-weight: 600;
}

.dashboard-patient-chart-shell {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(246, 250, 255, 0.95) 100%);
  border: 1px solid rgba(217, 231, 244, 0.85);
  border-radius: 18px;
  padding: 1rem 1.05rem;
}

.dashboard-patient-chart-canvas {
  width: 100%;
  overflow-x: auto;
}

.dashboard-patient-chart-canvas svg {
  display: block;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.dashboard-monthly-chart-canvas svg {
  max-width: 680px;
}

.dashboard-monthly-chart-layout {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.dashboard-monthly-chart-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(64px, 1fr));
  gap: 0.75rem;
  min-width: 780px;
  align-items: end;
}

.dashboard-monthly-chart-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.dashboard-daily-chart-row {
  gap: 0.5rem;
}

.dashboard-daily-chart-column .dashboard-monthly-chart-month,
.dashboard-daily-chart-column .dashboard-monthly-chart-value,
.dashboard-daily-chart-column .dashboard-monthly-chart-pct {
  font-size: 0.68rem;
}

.dashboard-monthly-chart-value {
  color: #163a63;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
}

.dashboard-monthly-chart-bar-wrap {
  width: 100%;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0.25rem;
  border-bottom: 1px dashed #cfe0ef;
}

.dashboard-monthly-chart-bar {
  width: min(100%, 34px);
  min-height: 3px;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #3d8fd4 0%, #1f6fb2 100%);
  box-shadow: 0 6px 14px rgba(31, 111, 178, 0.25);
}

.dashboard-monthly-chart-month {
  color: #163a63;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-monthly-chart-pct {
  color: #67809a;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.dashboard-shift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.dashboard-shift-card {
  min-width: 0;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(217, 231, 244, 0.95);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.dashboard-shift-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.8rem;
}

.dashboard-shift-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.dashboard-shift-icon {
  width: 2.45rem;
  height: 2.45rem;
  min-width: 2.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(180deg, #eef6ff 0%, #dbeafe 100%);
  color: #1f6fb2;
  font-size: 1.15rem;
  box-shadow: inset 0 0 0 1px rgba(31, 111, 178, 0.08);
}

.dashboard-shift-name {
  color: #163a63;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
  word-break: break-word;
}

.dashboard-shift-type {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #eef6ff;
  color: #1f6fb2;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.dashboard-shift-count {
  color: #0f172a;
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.dashboard-shift-note {
  color: #67809a;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}

.dashboard-patient-chart-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: #7188a0;
  font-size: 0.95rem;
  font-weight: 600;
}

.dashboard-chart-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e4edf7;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fd 100%);
}

.dashboard-chart-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-chart-card-header h2 {
  margin: 0;
  color: #163a63;
  font-size: clamp(0.84rem, 1.45vw, 0.95rem);
  font-weight: 800;
  overflow-wrap: anywhere;
  letter-spacing: -0.01em;
}

.dashboard-filter-toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 250, 255, 0.95) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(31, 111, 178, 0.12);
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.dashboard-chart-filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin: 0;
  min-width: 0;
}

.dashboard-chart-filter-form > label {
  color: #4f6b87;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-chart-filter-select {
  min-width: 0;
  flex: 1 1 120px;
  padding: 0.42rem 0.65rem;
  border: 1px solid #c4d6ea;
  border-radius: 10px;
  background: #fff;
  color: #163a63;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.dashboard-chart-filter-select:focus {
  outline: none;
  border-color: #1f6fb2;
  box-shadow: 0 0 0 3px rgba(31, 111, 178, 0.18);
}

.dashboard-chart-filter-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 1 auto;
  padding: 0.36rem 0.7rem;
  border: 1px solid #c4d6ea;
  border-radius: 10px;
  background: #fff;
  color: #163a63;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dashboard-chart-filter-check:has(input:checked) {
  background: #eef6ff;
  border-color: #1f6fb2;
}

.dashboard-chart-summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.dashboard-chart-summary-pill {
  display: inline-flex;
  align-items: baseline;
  flex: 1 1 180px;
  min-width: 0;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  background: #fff;
  border: 1px solid #d9e7f4;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.dashboard-chart-summary-pill.total {
  background: linear-gradient(135deg, #163a63 0%, #1f6fb2 100%);
  border-color: transparent;
}

.dashboard-chart-summary-pill-label {
  color: #67809a;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dashboard-chart-summary-pill.total .dashboard-chart-summary-pill-label {
  color: rgba(255, 255, 255, 0.82);
}

.dashboard-chart-summary-pill-value {
  color: #163a63;
  font-size: clamp(0.76rem, 1.45vw, 0.82rem);
  font-weight: 800;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.dashboard-chart-summary-pill.total .dashboard-chart-summary-pill-value {
  color: #fff;
}

.dashboard-chart-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.45rem 1rem;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #d9e7f4;
}

.dashboard-chart-legend--bars {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  grid-template-columns: unset;
}

.dashboard-chart-legend-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 0.55rem;
  font-size: 0.76rem;
  color: #1e293b;
  min-width: 0;
}

.dashboard-chart-legend--bars .dashboard-chart-legend-item,
.dashboard-dept-bar-item {
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(217, 231, 244, 0.95);
}

.dashboard-dept-bar-top {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 0.55rem;
  margin-bottom: 0.45rem;
}

.dashboard-dept-bar-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(15, 45, 90, 0.08);
  overflow: hidden;
}

.dashboard-dept-bar-fill {
  height: 100%;
  border-radius: inherit;
  min-width: 0;
  max-width: 100%;
  transition: width 0.35s ease;
  opacity: 0.92;
}

.dashboard-chart-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.dashboard-chart-legend-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-chart-legend-count {
  font-weight: 800;
  color: #163a63;
  min-width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dashboard-chart-legend-pct {
  font-weight: 600;
  color: #67809a;
  min-width: 44px;
  text-align: right;
}

.dashboard-live-status {
  min-height: 1.2rem;
  color: #4f6b87;
  font-size: 0.82rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.dashboard-overview-container {
  min-width: 0;
  transition: opacity 0.15s ease;
  scroll-margin-top: 150px;
  margin-top: 1rem;
}

.dashboard-overview-container.loading {
  opacity: 0.55;
  pointer-events: none;
}

.dashboard-page .master-dashboard-page {
  gap: 0.35rem;
}

@media (max-width: 991.98px) {
  .dashboard-filter-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-chart-filter-form {
    width: 100%;
  }

  .dashboard-chart-filter-check {
    flex: 1 1 100%;
    justify-content: center;
  }

  .dashboard-monthly-chart-row {
    min-width: 720px;
    gap: 0.6rem;
  }

  .dashboard-daily-chart-row {
    gap: 0.45rem;
  }

  .dashboard-monthly-chart-bar-wrap {
    min-height: 180px;
  }

  .dashboard-shift-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .dashboard-overview-hero-inner {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 575.98px) {
  .dashboard-income-grid,
  .dashboard-shift-grid,
  .dashboard-chart-legend:not(.dashboard-chart-legend--bars) {
    grid-template-columns: 1fr;
  }

  .dashboard-chart-summary-pill {
    border-radius: 18px;
  }

  .dashboard-monthly-chart-row {
    min-width: 660px;
    gap: 0.5rem;
  }

  .dashboard-daily-chart-row {
    gap: 0.4rem;
  }

  .dashboard-monthly-chart-month,
  .dashboard-monthly-chart-value,
  .dashboard-monthly-chart-pct {
    font-size: 0.7rem;
  }

  .dashboard-monthly-chart-bar-wrap {
    min-height: 150px;
  }

  .dashboard-shift-grid {
    grid-template-columns: 1fr;
  }
}

/* â•â•â• HMIS Premium Admin Dashboard (2026) â•â•â• */
.dashboard-page {
  --hmis-primary: #0f4c81;
  --hmis-secondary: #14b8a6;
  --hmis-success: #22c55e;
  --hmis-danger: #ef4444;
  --hmis-bg: #f5f7fa;
  --hmis-glass: rgba(255, 255, 255, 0.72);
  --hmis-shadow: 0 8px 32px rgba(15, 76, 129, 0.08);
  --hmis-radius-lg: 20px;
  --hmis-radius-xl: 24px;
  --hmis-space: 8px;
  --dash-accent: #1ee0ac;
  --dash-accent-dim: rgba(30, 224, 172, 0.14);
  --dash-accent-mid: #0daf84;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.dashboard-page .master-sidebar.sidebar-dashlite {
  box-shadow: 12px 0 40px rgba(15, 35, 55, 0.08);
}

.dashboard-page .master-content {
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(20, 184, 166, 0.07), transparent),
    radial-gradient(800px 380px at 96% 4%, rgba(15, 76, 129, 0.09), transparent),
    linear-gradient(180deg, var(--hmis-bg) 0%, #eef1f6 100%);
}

.dashboard-page .master-topbar {
  padding: 0.35rem calc(var(--hmis-space) * 2);
  gap: 0;
  min-height: 56px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(15, 76, 129, 0.08);
  box-shadow: 0 4px 24px rgba(15, 76, 129, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.dashboard-page .master-topbar-primary {
  align-items: center;
  gap: 1rem;
}

.dashboard-page .master-topbar-start,
.dashboard-page .master-topbar-actions {
  align-items: center;
  gap: 0.75rem;
}

.dashboard-page .master-topbar-page strong {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f2948;
}

.dashboard-page .master-topbar-page-label {
  color: #64748b;
  font-weight: 700;
}

.dashboard-page .master-topbar-page small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: min(52ch, 100%);
}

.dashboard-page .master-topbar-clock {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  min-width: unset;
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
  border: 1px solid rgba(15, 76, 129, 0.1);
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(15, 76, 129, 0.06);
  color: #0f2948;
}

.dashboard-page .master-topbar-clock::before {
  top: 0.45rem;
  right: 0.5rem;
  width: 0.38rem;
  height: 0.38rem;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5), 0 0 10px rgba(34, 197, 94, 0.25);
}

.dashboard-page .master-topbar-clock strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f2948;
  letter-spacing: 0.02em;
}

.dashboard-page .master-topbar-clock small {
  font-size: 0.68rem;
  font-weight: 600;
  color: #475569;
}

.dashboard-page .master-topbar-shift {
  min-width: unset;
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
  border: 1px solid rgba(15, 76, 129, 0.1);
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(15, 76, 129, 0.06);
  color: #0f2948;
}

.dashboard-page .master-topbar-shift .shift-info strong {
  color: #0f2948;
  font-weight: 700;
}

.dashboard-page .master-topbar-shift .shift-info small {
  color: #475569;
  font-weight: 600;
}

.dashboard-page .master-topbar-shift[data-shift-type="morning"] {
  border-color: rgba(251, 191, 36, 0.35);
  background: #ffffff;
}

.dashboard-page .master-topbar-shift[data-shift-type="morning"]::after {
  background: #fbbf24;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

.dashboard-page .master-topbar-shift[data-shift-type="evening"],
.dashboard-page .master-topbar-shift[data-shift-type="night"] {
  border-color: rgba(99, 102, 241, 0.35);
  background: #ffffff;
}

.dashboard-page .master-topbar-shift[data-shift-type="evening"]::after {
  background: #60a5fa;
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
}

.dashboard-page .master-topbar-shift[data-shift-type="night"]::after {
  background: #a78bfa;
  box-shadow: 0 0 8px rgba(167, 139, 250, 0.5);
}

.dashboard-page .master-profile-pill {
  padding: 0.4rem 0.75rem 0.4rem 0.4rem;
  border-radius: 20px;
  border: 1px solid rgba(15, 76, 129, 0.1);
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(15, 76, 129, 0.06);
  gap: 0.55rem;
  min-height: unset;
}

.dashboard-page .master-profile-pill::before {
  display: none;
}

.dashboard-page .master-profile-pill:hover,
.dashboard-page .master-profile-pill[aria-expanded="true"] {
  background: #ffffff;
  border-color: rgba(15, 76, 129, 0.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(15, 76, 129, 0.1);
  transform: translateY(-1px);
}

.dashboard-page .master-profile-pill strong {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f2948;
}

.dashboard-page .master-profile-pill small {
  font-size: 0.64rem;
  font-weight: 600;
  color: #475569;
}

.dashboard-page .profile-chevron {
  color: #64748b;
  font-size: 0.6rem;
}

.dashboard-page .master-profile-avatar,
.dashboard-page .master-profile-avatar-img {
  width: 2rem;
  height: 2rem;
}

/* Patient Registration desk Â· compact chrome, unified actions, richer empty state */
.dashboard-page.patient-reg-desk .master-topbar-primary {
  align-items: center;
}

.dashboard-page.patient-reg-desk .master-topbar {
  gap: 0;
  padding: 0.35rem calc(var(--hmis-space) * 1.35);
  min-height: 56px;
}

.dashboard-page.patient-reg-desk .master-topbar-start,
.dashboard-page.patient-reg-desk .master-topbar-actions {
  gap: 0.65rem;
}

.dashboard-page.patient-reg-desk .master-topbar-page {
  gap: 0.05rem;
}

.dashboard-page.patient-reg-desk .master-topbar-page strong {
  font-size: clamp(1rem, 1.65vw, 1.15rem);
  line-height: 1.22;
}

.dashboard-page.patient-reg-desk .master-topbar-page small {
  line-clamp: 1;
  -webkit-line-clamp: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: min(54ch, 100%);
}

.dashboard-page.patient-reg-desk .patient-registration-page {
  margin-block-start: 0;
  padding-block-start: 0;
}

@media (min-width: 768px) {
  .dashboard-page.patient-reg-desk .master-content {
    padding: 0.35rem 1.05rem 1.05rem;
  }
}

@media (max-width: 767.98px) {
  .dashboard-page.patient-reg-desk .master-content {
    padding: 0.3rem 0.85rem 0.9rem;
  }
}

.dashboard-page.patient-reg-desk .master-dashboard-page {
  gap: 0.35rem;
}

.dashboard-page.patient-reg-desk .patient-registration-dashboard {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: 0.55rem;
}

.dashboard-page.patient-reg-desk .patient-list-card-full {
  padding: 0;
  border-radius: 14px;
  border: 1px solid rgba(15, 76, 129, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 14px 34px rgba(15, 45, 88, 0.09),
    0 2px 6px rgba(15, 45, 88, 0.04);
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.dashboard-page.patient-reg-desk .patient-list-header,
.dashboard-page.patient-reg-desk .patient-list-tools-plain {
  border-color: transparent;
  border-inline: 0;
  border-block-end: 1px solid rgba(15, 76, 129, 0.08);
  padding-inline: 0.85rem;
}

.dashboard-page.patient-reg-desk .patient-list-header {
  border-block-start: 0;
  padding-block: 0.5rem;
}

.dashboard-page.patient-reg-desk .patient-list-tools-plain {
  border-block-end-color: transparent;
}

.dashboard-page.patient-reg-desk .patient-directory-wrap {
  border: 0;
  background: transparent;
}

.dashboard-page.patient-reg-desk .patient-directory-wrap.patient-desk-queue-scroll {
  flex: 1 1 auto;
  min-height: 9.5rem;
  max-height: min(620px, calc(100dvh - 17.25rem));
  overflow: auto;
  overscroll-behavior: contain;
  border-block-start: 1px solid rgba(15, 76, 129, 0.08);
}

.dashboard-page.patient-reg-desk .patient-directory-table-plain.patient-desk-queue-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: linear-gradient(180deg, #eef4fc 0%, #dfeaf8 100%);
  box-shadow: 0 1px 0 rgba(15, 76, 129, 0.12);
}

.dashboard-page.patient-reg-desk .patient-directory-table-plain.patient-desk-queue-table tbody tr:nth-child(even) {
  background: rgba(248, 251, 255, 0.85);
}

.dashboard-page.patient-reg-desk .patient-directory-table-plain.patient-desk-queue-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.08);
}

.dashboard-page.patient-reg-desk .patient-directory-table-plain.patient-desk-queue-table th.patient-desk-actions-th,
.dashboard-page.patient-reg-desk .patient-directory-table-plain.patient-desk-queue-table td.patient-desk-actions-cell {
  width: 1%;
  white-space: nowrap;
  text-align: start;
}

.dashboard-page.patient-reg-desk .patient-directory-table-plain.patient-desk-queue-table th,
.dashboard-page.patient-reg-desk .patient-directory-table-plain.patient-desk-queue-table td {
  padding-block: 0.32rem;
  padding-inline: 0.4rem;
  font-size: 0.72rem;
}

.dashboard-page.patient-reg-desk .patient-directory-table-plain.patient-desk-queue-table .patient-desk-queue-name {
  padding: 0.05rem 0.28rem;
  border-radius: 0.33rem;
  background: rgba(59, 130, 246, 0.1);
}

.dashboard-page.patient-reg-desk .patient-desk-pay-cell {
  min-width: 6.75rem;
  display: grid;
  gap: 0.18rem;
  align-content: center;
}

.dashboard-page.patient-reg-desk .patient-queue-pay-badge {
  font-size: 0.61rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 0.14rem 0.45rem;
  width: fit-content;
}

.dashboard-page.patient-reg-desk .patient-queue-pay-badge--due {
  color: #0f2948;
  background: rgba(29, 90, 178, 0.12);
  border: 1px solid rgba(29, 90, 178, 0.2);
}

.dashboard-page.patient-reg-desk .patient-queue-pay-badge--free {
  color: #0f5132;
  background: rgba(25, 135, 84, 0.12);
  border: 1px solid rgba(25, 135, 84, 0.24);
}

.dashboard-page.patient-reg-desk .patient-queue-status-badge {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 0.38rem;
  padding: 0.1rem 0.42rem;
  width: fit-content;
}

.dashboard-page.patient-reg-desk .patient-queue-status-badge.is-ok {
  color: #0c4f4a;
  background: rgba(20, 184, 166, 0.12);
}

.dashboard-page.patient-reg-desk .patient-queue-status-badge.is-warn {
  color: #b45309;
  background: rgba(245, 158, 11, 0.18);
}

.dashboard-page.patient-reg-desk .patient-desk-queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.18rem;
  align-items: center;
}

.dashboard-page.patient-reg-desk .patient-desk-queue-action {
  min-height: 1.62rem;
  padding: 0.12rem 0.42rem;
  border-radius: 0.42rem;
  border: 1px solid rgba(15, 76, 129, 0.2);
  background: rgba(255, 255, 255, 0.95);
  font-size: 0.61rem;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f4c81;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.dashboard-page.patient-reg-desk .patient-desk-queue-action:not(:disabled):hover,
.dashboard-page.patient-reg-desk .patient-desk-queue-action:not(:disabled):focus-visible {
  border-color: rgba(29, 90, 178, 0.45);
  background: rgba(232, 242, 255, 0.95);
  box-shadow: 0 3px 10px rgba(15, 45, 88, 0.08);
  outline: none;
}

.dashboard-page.patient-reg-desk .patient-desk-queue-action:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.dashboard-page.patient-reg-desk .patient-desk-queue-action--danger {
  border-color: rgba(217, 45, 32, 0.35);
  color: #9f1239;
  background: rgba(254, 226, 226, 0.55);
}

.dashboard-page.patient-reg-desk .patient-desk-queue-action--danger:not(:disabled):hover,
.dashboard-page.patient-reg-desk .patient-desk-queue-action--danger:not(:disabled):focus-visible {
  border-color: rgba(217, 45, 32, 0.55);
  background: rgba(254, 202, 202, 0.75);
}

.dashboard-page.patient-reg-desk .patient-desk-queue-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.dashboard-page.patient-reg-desk .patient-desk-queue-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: 0;
}

.dashboard-page.patient-reg-desk .patient-desk-queue-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #39506d;
}

.dashboard-page.patient-reg-desk .patient-desk-queue-filter-label {
  white-space: nowrap;
}

.dashboard-page.patient-reg-desk .patient-desk-queue-dept {
  min-width: 10.5rem;
  max-width: 16rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(15, 76, 129, 0.16);
  padding: 0.32rem 0.52rem;
  font-size: 0.73rem;
  font-weight: 600;
  color: #14324f;
  background: rgba(255, 255, 255, 0.95);
}

.dashboard-page.patient-reg-desk .patient-list-toolbar-theme .patient-theme-btn-compact {
  min-height: 2.05rem;
  padding: 0.35rem 0.76rem;
  border-radius: 0.62rem;
  font-size: 0.71rem;
  box-shadow: 0 8px 16px rgba(35, 79, 140, 0.08);
}

.dashboard-page.patient-reg-desk .patient-list-toolbar-theme .patient-theme-btn-compact .patient-theme-btn-icon {
  width: 1.06rem;
  height: 1.06rem;
  font-size: 0.72rem;
}

.dashboard-page.patient-reg-desk .patient-list-title-block {
  gap: 0.12rem;
}

.dashboard-page.patient-reg-desk .patient-list-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.dashboard-page.patient-reg-desk .patient-list-live-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid rgba(20, 184, 166, 0.4);
  color: #0c6f66;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(255, 255, 255, 0.95));
  box-shadow: 0 1px 6px rgba(12, 74, 66, 0.08);
}

.dashboard-page.patient-reg-desk .patient-list-header p {
  max-width: 44rem;
  line-height: 1.42;
}

.dashboard-page.patient-reg-desk .patient-reg-action-primary {
  border-color: rgba(15, 95, 174, 0.95);
  background: linear-gradient(135deg, #2f74d0 0%, #1c5ab2 100%);
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(29, 90, 178, 0.2);
}

.dashboard-page.patient-reg-desk .patient-reg-action-primary .patient-theme-btn-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.dashboard-page.patient-reg-desk .patient-reg-action-primary:hover,
.dashboard-page.patient-reg-desk .patient-reg-action-primary:focus {
  background: linear-gradient(135deg, #3b82de 0%, #215db8 100%);
  color: #fff !important;
  border-color: #215db8;
}

.dashboard-page.patient-reg-desk .patient-reg-action-outline {
  border-color: rgba(15, 76, 129, 0.2);
  background: rgba(255, 255, 255, 0.95);
  color: #0f4c81 !important;
  box-shadow: 0 4px 12px rgba(15, 76, 129, 0.07);
}

.dashboard-page.patient-reg-desk .patient-reg-action-outline .patient-theme-btn-icon {
  background: rgba(15, 76, 129, 0.08);
  color: inherit;
}

.dashboard-page.patient-reg-desk .patient-reg-action-outline:hover,
.dashboard-page.patient-reg-desk .patient-reg-action-outline:focus {
  border-color: rgba(15, 76, 129, 0.32);
  background: #f8fbff;
  color: #082e52 !important;
  box-shadow: 0 6px 14px rgba(15, 76, 129, 0.1);
}

.dashboard-page.patient-reg-desk .patient-list-tools-plain {
  padding-block: 0.42rem;
  align-items: center;
}

.dashboard-page.patient-reg-desk .patient-list-search-box-medium {
  min-height: 2.58rem;
  border-radius: 0.42rem;
  box-shadow: 0 4px 14px rgba(28, 58, 97, 0.06);
}

.dashboard-page.patient-reg-desk .patient-list-search-panel-left,
.dashboard-page.patient-reg-desk .patient-list-search-box-medium .patient-list-search-input-medium {
  min-height: 2.58rem;
}

.dashboard-page.patient-reg-desk .patient-list-search-input-medium {
  font-size: 0.875rem;
  min-height: 2.58rem;
  padding-inline: 0.85rem;
}

.dashboard-page.patient-reg-desk .patient-directory-table-plain thead th {
  background: linear-gradient(180deg, #f1f5fb 0%, #e9f0fb 100%);
  color: #0f2948;
  font-weight: 800;
  border-bottom: 1px solid rgba(15, 76, 129, 0.1);
}

.dashboard-page.patient-reg-desk .patient-directory-table-plain th,
.dashboard-page.patient-reg-desk .patient-directory-table-plain td {
  padding-block: 0.48rem;
  padding-inline: 0.52rem;
  font-size: 0.77rem;
}

.dashboard-page.patient-reg-desk .patient-directory-table-plain td {
  border-bottom-color: #e8edf4;
}

.dashboard-page.patient-reg-desk .patient-empty-state--appointment-desk {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: min(100%, 30rem);
  max-width: 30rem;
  margin-inline: auto;
  padding: 2.25rem 1.25rem 2.75rem;
  text-align: center;
  border: 1px dashed rgba(15, 76, 129, 0.18);
  border-radius: 1rem;
  background: radial-gradient(120% 80% at 50% -20%, rgba(59, 130, 246, 0.08), transparent 55%), #fbfdff;
  color: #5b6b82;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.dashboard-page.patient-reg-desk .patient-empty-state-visual--appointment {
  width: 3.65rem;
  height: 3.65rem;
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.15), rgba(20, 184, 166, 0.12));
  border: 1px solid rgba(15, 76, 129, 0.12);
  box-shadow: 0 12px 22px rgba(15, 76, 129, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.dashboard-page.patient-reg-desk .patient-empty-state-visual--appointment::after {
  content: "ðŸ“…";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.75rem;
  line-height: 1;
}

.dashboard-page.patient-reg-desk .patient-empty-state-title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 800;
  color: #122b45;
  letter-spacing: -0.02em;
}

.dashboard-page.patient-reg-desk .patient-empty-state-copy {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.52;
}

.dashboard-page.patient-reg-desk .patient-empty-state-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
}

.dashboard-page.patient-reg-desk .patient-empty-metric {
  flex: 1 1 auto;
  min-width: min(42%, 8.5rem);
  padding: 0.45rem 0.55rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(15, 76, 129, 0.1);
  background: rgba(255, 255, 255, 0.9);
}

.dashboard-page.patient-reg-desk .patient-empty-metric strong {
  display: block;
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  font-weight: 800;
  color: #0f2948;
}

.dashboard-page.patient-reg-desk .patient-empty-metric span:last-child {
  display: block;
  margin-top: 0.06rem;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7b8aa0;
}

.dashboard-page.patient-reg-desk .patient-empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.dashboard-page.patient-reg-desk button.patient-empty-state-cta {
  min-height: 2.42rem;
  padding: 0.35rem 0.95rem;
  border-radius: 0.62rem;
  border: 1px solid rgba(15, 76, 129, 0.2);
  background: rgba(255, 255, 255, 0.95);
  color: #0f4c81 !important;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.dashboard-page.patient-reg-desk button.patient-empty-state-cta.primary {
  border-color: rgba(29, 90, 178, 0.85);
  background: linear-gradient(135deg, #2f74d0 0%, #1c5ab2 100%);
  color: #fff !important;
  box-shadow: 0 10px 20px rgba(29, 90, 178, 0.2);
}

.dashboard-page.patient-reg-desk button.patient-empty-state-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 76, 129, 0.12);
}

.dashboard-page.patient-reg-desk button.patient-empty-state-cta.primary:hover {
  box-shadow: 0 12px 22px rgba(29, 90, 178, 0.26);
}

.dashboard-page .master-dashboard-page.hmis-dash-page {
  gap: calc(var(--hmis-space) * 1);
  max-width: 1400px;
  margin: calc(var(--hmis-space) * 2) auto 0;
  padding-top: 0;
}

.dashboard-page #dashboard-overview-container {
  margin-top: calc(var(--hmis-space) * 4);
  margin-bottom: calc(var(--hmis-space) * 0.5);
  scroll-margin-top: 150px;
}

.hmis-dash-toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  border-radius: var(--hmis-radius-lg) !important;
  padding: calc(var(--hmis-space) * 1.25) calc(var(--hmis-space) * 2) !important;
  border: 1px solid rgba(15, 76, 129, 0.08) !important;
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: var(--hmis-shadow) !important;
  margin-bottom: calc(var(--hmis-space) * 4);
}

.hmis-dash-filters {
  gap: calc(var(--hmis-space) * 3);
}

.hmis-dash-live-status {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--hmis-secondary);
}

.hmis-dash-shell {
  width: 100%;
  min-width: 0;
}

.hmis-dash-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: calc(var(--hmis-space) * 2);
  margin-bottom: calc(var(--hmis-space) * 2);
  padding: calc(var(--hmis-space) * 2);
  border-radius: var(--hmis-radius-xl);
  background: var(--hmis-glass);
  backdrop-filter: blur(14px);
  box-shadow: var(--hmis-shadow);
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.hmis-dash-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 76, 129, 0.1);
  color: var(--hmis-primary);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hmis-dash-title {
  margin: 0.35rem 0 0.25rem;
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.hmis-dash-lead {
  margin: 0;
  max-width: 42rem;
  color: #1e293b;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
}

.hmis-dash-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hmis-space);
}

.hmis-dash-meta-chip {
  padding: calc(var(--hmis-space) * 1.25) calc(var(--hmis-space) * 1.75);
  border-radius: var(--hmis-radius-lg);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 76, 129, 0.08);
  min-width: 9rem;
}

.hmis-dash-meta-chip.accent {
  border-color: rgba(20, 184, 166, 0.35);
  background: linear-gradient(145deg, rgba(20, 184, 166, 0.12), #fff);
}

.hmis-dash-meta-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.hmis-dash-meta-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.hmis-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--hmis-space);
  margin-bottom: calc(var(--hmis-space) * 1);
  align-items: stretch;
}

/* Single composite KPI: OPD revenue + paid / entitled counts */
.hmis-kpi-block {
  position: relative;
  min-width: 0;
  border-radius: var(--hmis-radius-lg);
  background: var(--hmis-glass);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--hmis-shadow);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.hmis-kpi-block::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  opacity: 0.95;
  z-index: 1;
}

.hmis-kpi-block--opd::before {
  background: linear-gradient(90deg, var(--hmis-primary), #3b82f6);
}

.hmis-kpi-block:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(15, 76, 129, 0.12);
}

.hmis-kpi-block-main {
  display: flex;
  gap: calc(var(--hmis-space) * 1.5);
  padding: calc(var(--hmis-space) * 2);
}

.hmis-kpi-block-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid rgba(15, 76, 129, 0.1);
  background: rgba(255, 255, 255, 0.42);
}

.hmis-kpi-block-split-cell {
  padding: calc(var(--hmis-space) * 1.35) calc(var(--hmis-space) * 1.75);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hmis-kpi-block-split-cell:first-child {
  border-right: 1px solid rgba(15, 76, 129, 0.08);
}

@media (max-width: 575.98px) {
  .hmis-kpi-block-split {
    grid-template-columns: 1fr;
  }

  .hmis-kpi-block-split-cell:first-child {
    border-right: none;
    border-bottom: 1px solid rgba(15, 76, 129, 0.08);
  }
}

.hmis-kpi-substat-label {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: #64748b;
}

.hmis-kpi-substat-value {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.hmis-kpi-substat-hint {
  font-size: 0.65rem;
  color: #94a3b8;
  line-height: 1.25;
}

@media (max-width: 1199.98px) {
  .hmis-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .hmis-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.hmis-kpi-card {
  position: relative;
  display: flex;
  gap: calc(var(--hmis-space) * 1.5);
  padding: calc(var(--hmis-space) * 2);
  border-radius: var(--hmis-radius-lg);
  background: var(--hmis-glass);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--hmis-shadow);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.hmis-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  opacity: 0.95;
}

.hmis-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(15, 76, 129, 0.12);
}

.hmis-kpi-card--primary::before {
  background: linear-gradient(90deg, var(--hmis-primary), #3b82f6);
}

.hmis-kpi-card--teal::before {
  background: linear-gradient(90deg, var(--hmis-secondary), #06b6d4);
}

.hmis-kpi-card--success::before {
  background: linear-gradient(90deg, var(--hmis-success), #14b8a6);
}

.hmis-kpi-card--slate::before {
  background: linear-gradient(90deg, #475569, #94a3b8);
}

.hmis-kpi-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(15, 76, 129, 0.08);
  color: var(--hmis-primary);
}

.hmis-kpi-card--teal .hmis-kpi-card-icon {
  background: rgba(20, 184, 166, 0.15);
  color: #0d9488;
}

.hmis-kpi-card--success .hmis-kpi-card-icon {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.hmis-kpi-card--slate .hmis-kpi-card-icon {
  background: rgba(71, 85, 105, 0.12);
  color: #475569;
}

.hmis-kpi-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hmis-kpi-card-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.hmis-kpi-card-value {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.hmis-kpi-trend {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.hmis-kpi-trend--up {
  color: #15803d;
}

.hmis-kpi-trend--down {
  color: #b91c1c;
}

.hmis-kpi-trend--neutral {
  color: #64748b;
}

.hmis-kpi-trend-note {
  font-weight: 600;
  opacity: 0.85;
}

.hmis-quick-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hmis-space);
  margin-bottom: calc(var(--hmis-space) * 2);
}

.hmis-quick-pill {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 76, 129, 0.08);
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}

.hmis-quick-pill strong {
  color: var(--hmis-primary);
  font-weight: 800;
}

.hmis-dash-analytics-row {
  margin-bottom: calc(var(--hmis-space) * 2);
}

.hmis-glass-panel {
  border-radius: var(--hmis-radius-xl);
  background: var(--hmis-glass);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: var(--hmis-shadow);
  padding: calc(var(--hmis-space) * 2);
}

.hmis-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--hmis-space);
  margin-bottom: calc(var(--hmis-space) * 2);
}

.hmis-panel-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.hmis-panel-sub {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  max-width: 36rem;
}

.hmis-panel-badge {
  flex-shrink: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--hmis-primary), #1e40af);
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.hmis-panel-badge.soft {
  background: rgba(20, 184, 166, 0.15);
  color: #0f766e;
}

.hmis-panel-empty {
  border-radius: var(--hmis-radius-lg);
}

.hmis-revenue-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.35rem;
  min-height: 200px;
  padding-top: 0.5rem;
}

.hmis-revenue-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.hmis-revenue-col.is-current .hmis-revenue-bar {
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.55), 0 12px 28px rgba(15, 76, 129, 0.18);
}

.hmis-revenue-bar-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 172px;
}

.hmis-revenue-bar {
  width: min(100%, 36px);
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, #5eead4 0%, var(--hmis-primary) 100%);
  position: relative;
  transition: height 0.35s ease;
}

.hmis-revenue-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  background: #0f172a;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.hmis-revenue-bar:hover .hmis-revenue-tip {
  opacity: 1;
}

.hmis-revenue-month {
  font-size: 0.62rem;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hmis-spark-wrap {
  padding: 0.25rem 0;
}

.hmis-spark-svg {
  width: 100%;
  height: 120px;
  display: block;
}

.hmis-spark-area {
  fill: url(#hmisGrowthFill);
}

.hmis-spark-line {
  stroke: var(--hmis-secondary);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 8px rgba(20, 184, 166, 0.25));
}

.hmis-spark-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
}

.hmis-mini-trend {
  display: flex;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: calc(var(--hmis-space) * 2);
}

.hmis-mini-trend-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.hmis-mini-bar {
  width: min(100%, 28px);
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #99f6e4, var(--hmis-primary));
  transition: height 0.3s ease;
}

.hmis-mini-day {
  font-size: 0.62rem;
  font-weight: 800;
  color: #64748b;
}

.hmis-mini-val {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--hmis-primary);
  font-variant-numeric: tabular-nums;
}

.hmis-rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--hmis-space);
  margin-bottom: var(--hmis-space);
}

.hmis-rank-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.hmis-rank-empty {
  margin: 0;
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 600;
}

.hmis-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: calc(var(--hmis-space) * 1.25);
}

.hmis-rank-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.hmis-rank-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(15, 76, 129, 0.1);
  color: var(--hmis-primary);
  font-size: 0.72rem;
  font-weight: 900;
}

.hmis-rank-body {
  flex: 1;
  min-width: 0;
}

.hmis-rank-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.hmis-rank-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hmis-rank-count {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--hmis-primary);
  font-variant-numeric: tabular-nums;
}

.hmis-analytics-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 76, 129, 0.08);
  overflow: hidden;
}

.hmis-analytics-track--thin {
  height: 5px;
  margin-top: 0.35rem;
}

.hmis-analytics-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.hmis-analytics-fill--danger {
  background: linear-gradient(90deg, #fca5a5, var(--hmis-danger));
}

.hmis-finance-section {
  margin-bottom: calc(var(--hmis-space) * 3);
}

.hmis-section-heading {
  margin-bottom: calc(var(--hmis-space) * 2);
}

.hmis-section-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.hmis-section-desc {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: #64748b;
}

.hmis-fin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--hmis-space);
}

.hmis-fin-card {
  display: flex;
  gap: calc(var(--hmis-space) * 1.5);
  padding: calc(var(--hmis-space) * 2);
  border-radius: var(--hmis-radius-lg);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 76, 129, 0.06);
  box-shadow: 0 8px 28px rgba(15, 76, 129, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hmis-fin-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(15, 76, 129, 0.1);
}

.hmis-fin-card.is-zero {
  opacity: 0.72;
}

.hmis-fin-card--expense {
  border-color: rgba(239, 68, 68, 0.25);
  background: linear-gradient(145deg, rgba(254, 226, 226, 0.35), #fff);
}

.hmis-fin-icon {
  width: 52px;
  min-width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(20, 184, 166, 0.18), rgba(15, 76, 129, 0.08));
  font-size: 1.45rem;
}

.hmis-fin-card--expense .hmis-fin-icon {
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.2), rgba(254, 226, 226, 0.5));
}

.hmis-fin-body {
  flex: 1;
  min-width: 0;
}

.hmis-fin-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.hmis-fin-value {
  display: block;
  margin: 0.25rem 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.hmis-fin-share {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}

.hmis-fin-share.danger {
  color: #b91c1c;
}

.hmis-chart-section {
  margin-bottom: calc(var(--hmis-space) * 2);
}

.hmis-chart-shell {
  border-radius: var(--hmis-radius-xl) !important;
  border: 1px solid rgba(15, 76, 129, 0.06) !important;
  box-shadow: var(--hmis-shadow) !important;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92) !important;
}

.hmis-chart-card-head {
  padding: calc(var(--hmis-space) * 2) !important;
  border-bottom: 1px solid rgba(15, 76, 129, 0.06) !important;
  background: transparent !important;
}

.hmis-chart-card-head h2 {
  font-size: 1rem !important;
  font-weight: 800 !important;
}

.hmis-chart-body {
  border-radius: 0 0 var(--hmis-radius-xl) var(--hmis-radius-xl);
  border: 0 !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(245, 247, 250, 0.95) 100%) !important;
}

.hmis-summary-strip .dashboard-chart-summary-pill {
  border-radius: 14px;
  border: 0;
}

.hmis-dept-yearly .dashboard-dept-bar-top {
  grid-template-columns: 28px 12px minmax(0, 1fr) auto auto;
  align-items: center;
}

.hmis-dept-rank-badge {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(15, 76, 129, 0.1);
  color: var(--hmis-primary);
  font-size: 0.68rem;
  font-weight: 900;
}

.hmis-dept-rank-row {
  animation: hmisFadeUp 0.45s ease backwards;
}

.hmis-dept-rank-row:nth-child(1) { animation-delay: 0.03s; }
.hmis-dept-rank-row:nth-child(2) { animation-delay: 0.06s; }
.hmis-dept-rank-row:nth-child(3) { animation-delay: 0.09s; }
.hmis-dept-rank-row:nth-child(4) { animation-delay: 0.12s; }
.hmis-dept-rank-row:nth-child(5) { animation-delay: 0.15s; }

@keyframes hmisFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hmis-analytics-fill-animated {
  animation: hmisBarReveal 0.65s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

@keyframes hmisBarReveal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hmis-bar-chart-wrap {
  padding-bottom: 0.25rem;
}

.hmis-month-bars .dashboard-monthly-chart-column.is-active-month .hmis-appt-bar {
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.55), 0 12px 26px rgba(15, 76, 129, 0.18);
}

.hmis-appt-bar {
  background: linear-gradient(180deg, #7dd3fc 0%, var(--hmis-primary) 100%) !important;
  box-shadow: 0 8px 18px rgba(15, 76, 129, 0.22);
}

.hmis-appt-bar--daily {
  background: linear-gradient(180deg, #5eead4 0%, #0e7490 100%) !important;
}

.hmis-bar-wrap {
  border-bottom-color: rgba(15, 76, 129, 0.12) !important;
}

.hmis-swatch-gradient {
  background: linear-gradient(180deg, #7dd3fc, var(--hmis-primary)) !important;
}

.hmis-swatch-teal {
  background: linear-gradient(180deg, #5eead4, #0e7490) !important;
}

.hmis-legend-compact {
  margin-top: 0.75rem !important;
}

.hmis-metric-grid {
  gap: var(--hmis-space) !important;
}

.hmis-metric-card {
  border-radius: var(--hmis-radius-lg) !important;
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  background: rgba(255, 255, 255, 0.82) !important;
  box-shadow: 0 8px 28px rgba(15, 76, 129, 0.06) !important;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hmis-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(15, 76, 129, 0.1) !important;
}

.hmis-side-card {
  border-radius: var(--hmis-radius-lg) !important;
  border: 1px solid rgba(255, 255, 255, 0.65) !important;
  background: var(--hmis-glass) !important;
  backdrop-filter: blur(12px);
  box-shadow: var(--hmis-shadow) !important;
}

.hmis-dash-split {
  align-items: stretch;
}

.hmis-action-grid .master-action-tile {
  border-radius: 16px;
  border: 1px solid rgba(15, 76, 129, 0.08);
  background: rgba(255, 255, 255, 0.82);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hmis-action-grid .master-action-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.35);
  box-shadow: 0 12px 28px rgba(15, 76, 129, 0.1);
}

.hmis-dash-secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

@media (min-width: 1200px) {
  .hmis-dash-secondary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.master-card-mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin-top: 0.85rem;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid rgba(15, 76, 129, 0.07);
  background: rgba(241, 245, 249, 0.42);
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
}

.master-card-mini-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
  white-space: nowrap;
}

.master-card-mini-stats strong {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.hmis-capacity-bar {
  height: 10px;
  margin-top: 0.75rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 76, 129, 0.08);
}

.hmis-capacity-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hmis-secondary), var(--hmis-primary));
  box-shadow: 0 0 12px rgba(20, 184, 166, 0.35);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.hmis-ward-chip {
  border-radius: 16px !important;
  border: 1px solid rgba(15, 76, 129, 0.06) !important;
  background: rgba(255, 255, 255, 0.75) !important;
}

@media (min-width: 992px) {
  .dashboard-page .master-topbar-actions {
    flex-wrap: nowrap;
    width: auto;
    flex: 0 1 auto;
    justify-content: flex-end;
    gap: 0.65rem;
  }

  .dashboard-page .master-topbar-clock,
  .dashboard-page .master-topbar-shift,
  .dashboard-page .master-profile-menu {
    width: auto;
  }

  .dashboard-page .master-profile-pill {
    max-width: 16rem;
  }
}

/* â”€â”€â”€ Departmental BI analytics (compact enterprise layout) â”€â”€â”€ */
.dashboard-page .hmis-dash-analytics-row--slim {
  margin-bottom: calc(var(--hmis-space, 8px) * 2);
}

.hmis-panel--slim {
  padding: calc(var(--hmis-space, 8px) * 1.75);
}

.hmis-panel-head--slim {
  margin-bottom: calc(var(--hmis-space, 8px) * 1.25);
}

.hmis-panel-empty--sm {
  padding: 1rem !important;
  min-height: unset;
}

.hmis-revenue-chart--slim .hmis-revenue-bar-wrap {
  min-height: 96px;
}

.hmis-spark-wrap--slim .hmis-spark-svg--slim {
  height: 88px;
}

.hmis-spark-labels--slim {
  font-size: 0.58rem;
}

.hmis-dept-bi {
  margin-bottom: calc(var(--hmis-space, 8px) * 2);
}

.hmis-dept-bi-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--hmis-space, 8px);
  margin-bottom: calc(var(--hmis-space, 8px) * 2);
}

.hmis-dept-bi-title {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #0f172a;
}

.hmis-dept-bi-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: #64748b;
}

.hmis-dept-bi-subtitle--tight {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
}

.hmis-dept-bi-panel {
  padding: calc(var(--hmis-space, 8px) * 2);
  height: 100%;
}

.hmis-dept-bi-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: calc(var(--hmis-space, 8px) * 2);
  margin-bottom: calc(var(--hmis-space, 8px) * 2);
}

@media (max-width: 767.98px) {
  .hmis-dept-bi-top {
    grid-template-columns: 1fr;
  }
}

.hmis-dept-bi-h3 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.hmis-dept-bi-hint {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
}

.hmis-dept-empty {
  padding: 1.25rem 0.75rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  border-radius: 14px;
  background: rgba(245, 247, 250, 0.85);
}

.hmis-dept-empty--flat {
  padding: 0.75rem;
  background: transparent;
}

.hmis-donut-stage {
  position: relative;
  width: 148px;
  height: 148px;
  margin: 0.5rem auto 0.75rem;
}

.hmis-donut-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(15, 76, 129, 0.12);
}

.hmis-donut-hole {
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.35rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.hmis-donut-hole strong {
  font-size: 1.05rem;
  font-weight: 900;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.hmis-donut-hole span {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.hmis-donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hmis-donut-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
}

.hmis-donut-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.hmis-donut-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hmis-donut-pct {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--hmis-primary, #0f4c81);
}

.hmis-micro-spark {
  width: 100%;
  height: 72px;
  display: block;
  margin-top: 0.35rem;
}

.hmis-micro-spark-line {
  stroke: var(--hmis-primary, #0f4c81);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 8px rgba(15, 76, 129, 0.2));
}

.hmis-micro-spark-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
}

.hmis-micro-spark-meta strong {
  color: var(--hmis-primary, #0f4c81);
  font-weight: 900;
}

.hmis-micro-spark-dot {
  opacity: 0.45;
}

.hmis-dept-monthly-trend {
  padding-top: calc(var(--hmis-space, 8px) * 1.5);
}

.hmis-dept-monthly-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0.65rem;
}

.hmis-dept-monthly-meta {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
}

.hmis-dept-trend-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  min-height: 118px;
}

.hmis-dept-trend-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.hmis-dept-trend-col.is-focus .hmis-dept-trend-fill {
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.55), 0 8px 18px rgba(15, 76, 129, 0.18);
}

.hmis-dept-trend-val {
  font-size: 0.58rem;
  font-weight: 800;
  color: var(--hmis-primary, #0f4c81);
  font-variant-numeric: tabular-nums;
}

.hmis-dept-trend-track {
  width: 100%;
  min-height: 88px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hmis-dept-trend-fill {
  width: min(100%, 22px);
  min-height: 4px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, #5eead4, var(--hmis-primary, #0f4c81));
  transition: height 0.35s ease;
}

.hmis-dept-trend-mo {
  font-size: 0.58rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hmis-dept-aside-stack {
  display: flex;
  flex-direction: column;
  gap: calc(var(--hmis-space, 8px) * 1.5);
  height: 100%;
}

.hmis-stat-micro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 575.98px) {
  .hmis-stat-micro-grid {
    grid-template-columns: 1fr;
  }
}

.hmis-stat-micro {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 22px rgba(15, 76, 129, 0.06);
}

.hmis-stat-micro-label {
  display: block;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.hmis-stat-micro-value {
  display: block;
  margin-top: 2px;
  font-size: 1rem;
  font-weight: 900;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.hmis-stat-micro-note {
  display: block;
  margin-top: 2px;
  font-size: 0.62rem;
  font-weight: 600;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hmis-dept-list-panel {
  padding: calc(var(--hmis-space, 8px) * 1.75);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(15, 76, 129, 0.07);
}

.hmis-dept-list-panel--top {
  border: 1px solid rgba(20, 184, 166, 0.22);
}

.hmis-dept-list-panel--low {
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.hmis-dept-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0.65rem;
}

.hmis-dept-list-head h3 {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
}

.hmis-dept-tag {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.18);
  color: #0f766e;
}

.hmis-dept-tag--warn {
  background: rgba(245, 158, 11, 0.2);
  color: #b45309;
}

.hmis-dept-ranked-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hmis-dept-ranked-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 22px;
  gap: 10px;
  align-items: start;
  padding: 8px;
  margin: 0 -8px;
  border-radius: 12px;
  transition: background 0.18s ease;
}

.hmis-dept-ranked-row:hover {
  background: rgba(245, 247, 250, 0.95);
}

.hmis-dept-ranked-row--top:hover {
  background: rgba(20, 184, 166, 0.06);
}

.hmis-dept-ranked-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(145deg, var(--dc, #0f4c81), #1e3a5f);
  box-shadow: 0 6px 14px rgba(15, 76, 129, 0.18);
}

.hmis-dept-ranked-icon--muted {
  opacity: 0.88;
  filter: saturate(0.85);
}

.hmis-dept-ranked-body {
  min-width: 0;
}

.hmis-dept-ranked-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.hmis-dept-ranked-name {
  font-size: 0.76rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.hmis-dept-ranked-metrics {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.hmis-dept-ranked-count {
  font-size: 0.76rem;
  font-weight: 900;
  color: var(--hmis-primary, #0f4c81);
  font-variant-numeric: tabular-nums;
}

.hmis-radial-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(var(--hmis-secondary, #14b8a6) calc(var(--rp, 0) * 1%), rgba(15, 76, 129, 0.08) 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
}

.hmis-dept-ranked-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.hmis-dept-pct {
  font-size: 0.62rem;
  font-weight: 700;
  color: #64748b;
}

.hmis-dept-pace {
  font-size: 0.62rem;
  font-weight: 800;
}

.hmis-dept-pace.is-up {
  color: var(--hmis-success, #22c55e);
}

.hmis-dept-pace.is-down {
  color: var(--hmis-danger, #ef4444);
}

.hmis-dept-pace.is-muted {
  color: #94a3b8;
  font-weight: 600;
}

.hmis-dept-pace-h {
  font-weight: 600;
  opacity: 0.75;
}

.hmis-dept-bar-animate {
  height: 5px;
  border-radius: 999px;
  margin-top: 6px;
  background: rgba(15, 76, 129, 0.06);
  overflow: hidden;
}

.hmis-dept-bar-animate > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.hmis-dept-ranked-rank {
  font-size: 0.68rem;
  font-weight: 900;
  color: var(--hmis-primary, #0f4c81);
  text-align: right;
  padding-top: 2px;
}

.hmis-dept-ranked-rank--soft {
  color: #94a3b8;
}

.hmis-modal-sheet {
  border-radius: 20px !important;
  border: 0 !important;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22) !important;
  overflow: hidden;
}

.hmis-modal-head {
  border-bottom: 0 !important;
  padding: 1.1rem 1.25rem !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 250, 0.96));
}

.hmis-modal-title {
  font-size: 1.05rem !important;
  font-weight: 800 !important;
}

.hmis-modal-lead {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
}

.hmis-modal-body {
  padding: 0 1.25rem 1.25rem !important;
}

.hmis-rank-table-wrap {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(15, 76, 129, 0.06);
}

.hmis-rank-table thead th {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b !important;
  font-weight: 800 !important;
  padding-top: 0.85rem;
  padding-bottom: 0.5rem;
}

.hmis-rank-table tbody td {
  font-size: 0.78rem;
  vertical-align: middle;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.hmis-rank-tr {
  animation: hmisFadeUp 0.35s ease backwards;
}

.hmis-rank-table-num {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(15, 76, 129, 0.08);
  font-size: 0.68rem;
  font-weight: 900;
  color: var(--hmis-primary, #0f4c81);
}

.hmis-rank-sw {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}

/* â”€â”€â”€ Dashboard: operational density, empty states, unified actions â”€â”€â”€ */
.dashboard-page .master-dashboard-page.hmis-dash-page {
  gap: 0.5rem;
}

.dashboard-page #dashboard-overview-container.loading {
  opacity: 0.72;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.hmis-dash-header--compact {
  align-items: flex-start;
  margin-bottom: 0.25rem;
  padding: 0.45rem 0.85rem;
  gap: 0.85rem;
  border: 1px solid rgba(15, 76, 129, 0.1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.97) 0%, rgba(241, 245, 249, 0.88) 100%);
  box-shadow: 0 6px 22px rgba(15, 76, 129, 0.07);
}

.hmis-dash-header-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  width: 100%;
}

.hmis-dash-header-meta--embedded {
  margin: 0;
  justify-content: flex-end;
}

.hmis-dash-title-muted {
  font-weight: 700;
  color: #64748b;
  letter-spacing: -0.02em;
}

.dashboard-page .hmis-dash-header--compact .hmis-dash-title {
  margin: 0.15rem 0 0;
  font-size: clamp(1.1rem, 2.1vw, 1.42rem);
  line-height: 1.2;
}

.dashboard-page .hmis-dash-header--compact .hmis-dash-lead {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  max-width: 40rem;
}

.dashboard-page .hmis-dash-header--compact .hmis-dash-meta-chip {
  padding: 0.45rem 0.75rem;
  min-width: 6.5rem;
  border: 1px solid rgba(15, 76, 129, 0.1);
}

.dashboard-page .hmis-dash-header--compact .hmis-dash-meta-value {
  font-size: 0.98rem;
}

.dashboard-page .hmis-kpi-grid {
  gap: 0.65rem;
  margin-bottom: 0.25rem;
}

.dashboard-page .hmis-kpi-block,
.dashboard-page .hmis-kpi-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(15, 76, 129, 0.12);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04), 0 14px 34px rgba(15, 76, 129, 0.09);
}

.dashboard-page .hmis-kpi-block-main,
.dashboard-page .hmis-kpi-card {
  padding: 1rem 1.05rem;
}

.dashboard-page .hmis-kpi-block-main {
  gap: 0.75rem;
}

.dashboard-page .hmis-kpi-block-split-cell {
  padding: 0.65rem 1rem;
}

.dashboard-page .hmis-quick-stats {
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.dashboard-page .hmis-quick-pill {
  padding: 0.28rem 0.6rem;
  font-size: 0.7rem;
  border: 1px solid rgba(15, 76, 129, 0.09);
  background: rgba(255, 255, 255, 0.92);
}

.dashboard-page .hmis-finance-section {
  margin-bottom: 0.85rem;
}

.dashboard-page .hmis-section-heading {
  margin-bottom: 0.55rem;
}

.dashboard-page .hmis-section-desc {
  font-size: 0.76rem;
}

.hmis-section-desc--tight {
  margin-top: 0.2rem;
}

.dashboard-page .hmis-glass-panel {
  border: 1px solid rgba(15, 76, 129, 0.11);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 14px rgba(15, 76, 129, 0.06);
}

.dashboard-page .hmis-panel--slim {
  padding: calc(var(--hmis-space, 8px) * 1.35);
}

.dashboard-page .hmis-dept-bi {
  margin-bottom: 0.85rem;
}

.dashboard-page .hmis-dept-bi-intro {
  margin-bottom: 0.65rem;
}

.dashboard-page .hmis-fin-grid {
  gap: 0.65rem;
}

.dashboard-page .hmis-fin-card {
  border: 1px solid rgba(15, 76, 129, 0.1);
  background: rgba(255, 255, 255, 0.96);
}

.dashboard-page .dashboard-chart-section,
.dashboard-page .hmis-chart-section {
  margin-bottom: 0.75rem;
}

.dashboard-page .hmis-chart-shell {
  border-color: rgba(15, 76, 129, 0.12) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05), 0 16px 38px rgba(15, 76, 129, 0.08) !important;
}

.dashboard-page .hmis-chart-card-head {
  padding: 0.6rem 0.85rem !important;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%) !important;
  border-bottom: 1px solid rgba(15, 76, 129, 0.12) !important;
}

.dashboard-page .hmis-chart-body {
  padding: 0.65rem 0.85rem 0.85rem !important;
}

.dashboard-page .master-dashboard-grid,
.dashboard-page .master-dashboard-bottom {
  gap: 0.75rem;
}

.dashboard-page .master-secondary-grid {
  gap: 0.75rem;
}

.dashboard-page .hmis-dash-page .master-card {
  padding: 0.85rem;
  border: 1px solid rgba(23, 54, 95, 0.11);
  box-shadow: 0 6px 22px rgba(18, 45, 82, 0.1);
  background: rgba(255, 255, 255, 0.98);
}

.dashboard-page .hmis-dash-page .master-card-header {
  margin-bottom: 0.6rem;
}

.dashboard-page .hmis-dash-page .master-card-header h2 {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dashboard-page .hmis-dash-page .master-table thead th {
  background: linear-gradient(180deg, #e8edf3 0%, #dce3ed 100%);
  color: #334155;
  font-weight: 800;
  border-bottom: 1px solid #cbd5e1;
}

.dashboard-page .hmis-dash-page .master-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.85);
}

.dashboard-page .hmis-dash-page .master-table td {
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
  font-weight: 600;
}

.dashboard-page .hmis-dash-page .master-table th {
  color: #475569;
}

.dashboard-page .hmis-action-grid .master-action-tile {
  min-height: 3.6rem;
  padding: 0.55rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 12px;
  border: 1px solid rgba(15, 76, 129, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 76, 129, 0.06);
}

.dashboard-page .hmis-action-grid .master-action-tile span:first-child {
  font-size: 1.05rem;
  opacity: 0.9;
}

.dashboard-page .hmis-dash-toolbar {
  padding: 0.5rem 0.75rem !important;
}

.hmis-dash-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.35rem 1.1rem;
  border-radius: var(--hmis-radius-lg);
  border: 1px dashed rgba(15, 76, 129, 0.22);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.hmis-dash-empty--sm {
  padding: 0.85rem 0.75rem;
}

.hmis-dash-empty--compact,
.hmis-dash-empty--inset {
  padding: 0.85rem 0.65rem;
}

.hmis-dash-empty--inset .hmis-dash-empty-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 0.45rem;
}

.hmis-dash-empty--inset .hmis-dash-empty-title {
  font-size: 0.8rem;
}

.hmis-dash-empty--inset .hmis-dash-empty-text {
  font-size: 0.72rem;
  margin-top: 0.25rem;
}

.hmis-dash-empty--inset .hmis-dash-empty-actions {
  margin-top: 0.55rem;
}

.hmis-dash-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(15, 76, 129, 0.09);
  color: var(--hmis-primary);
  margin-bottom: 0.6rem;
}

.hmis-dash-empty-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.hmis-dash-empty-text {
  margin: 0.4rem 0 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.4;
  max-width: 26rem;
}

.hmis-dash-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 0.8rem;
}

.hmis-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.42rem 0.85rem;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid rgba(15, 76, 129, 0.16);
  background: rgba(255, 255, 255, 0.96);
  color: var(--hmis-primary, #0f4c81);
  text-decoration: none;
  line-height: 1.2;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
  cursor: pointer;
}

button.hmis-btn {
  font-family: inherit;
}

.hmis-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 184, 166, 0.45);
  color: #0b3d66;
  box-shadow: 0 8px 20px rgba(15, 76, 129, 0.1);
}

.hmis-btn--primary {
  background: linear-gradient(135deg, var(--hmis-primary, #0f4c81), #1e40af);
  color: #fff !important;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(15, 76, 129, 0.28);
}

.hmis-btn--primary:hover {
  color: #fff !important;
  filter: brightness(1.05);
}

.hmis-btn--ghost {
  background: rgba(255, 255, 255, 0.85);
}

.hmis-btn--sm {
  padding: 0.34rem 0.72rem;
  font-size: 0.7rem;
  border-radius: 9px;
}

.hmis-btn--block {
  width: 100%;
}

.dashboard-patient-chart-empty:not(.hmis-dash-empty) {
  padding: 1.1rem 0.85rem;
  border-radius: var(--hmis-radius-lg);
  border: 1px dashed rgba(15, 76, 129, 0.18);
  background: rgba(248, 250, 252, 0.9);
}

.dashboard-page .hmis-ward-chip {
  border: 1px solid rgba(15, 76, 129, 0.12) !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 2px 10px rgba(15, 76, 129, 0.05);
}

#dashboard-filters-anchor {
  scroll-margin-top: 5.5rem;
}

.dashboard-page .hmis-stat-micro {
  border: 1px solid rgba(15, 76, 129, 0.1);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(15, 76, 129, 0.07);
}