:root {
  --bg: #eef5fb;
  --bg-soft: #f7fbff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --surface-dark: #08324c;
  --surface-deep: #072739;
  --line: rgba(44, 95, 132, 0.16);
  --line-strong: rgba(44, 95, 132, 0.28);
  --text: #0d3550;
  --text-soft: #5b768f;
  --text-faint: #7f96ac;
  --accent: #1497df;
  --accent-strong: #0f7fc0;
  --accent-soft: rgba(20, 151, 223, 0.12);
  --accent-ghost: rgba(20, 151, 223, 0.08);
  --good: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --shadow-lg: 0 20px 50px rgba(6, 32, 50, 0.14);
  --shadow-md: 0 12px 28px rgba(6, 32, 50, 0.10);
  --shadow-sm: 0 6px 14px rgba(6, 32, 50, 0.06);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 10px;
  font-family: "Segoe UI", "Nirmala UI", "Noto Sans Bengali", "SolaimanLipi", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
button, input, select, textarea { font: inherit; }
body {
  margin: 0;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(20, 151, 223, 0.16), transparent 32%),
    radial-gradient(circle at top right, rgba(20, 151, 223, 0.10), transparent 28%),
    linear-gradient(180deg, #fdfefe 0%, var(--bg) 100%);
}
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
code { background: rgba(20, 151, 223, 0.08); padding: .12rem .35rem; border-radius: 6px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}

.muted { color: var(--text-soft); }

.btn {
  border: 1px solid transparent;
  background: var(--surface-strong);
  color: var(--text);
  padding: .56rem .86rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: wait; box-shadow: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #1cb0ff 100%);
  color: white;
  border-color: rgba(255,255,255,.16);
}
.btn-primary:hover { filter: brightness(1.03); }
.btn-ghost { background: transparent; box-shadow: none; border-color: var(--line); color: var(--text); }
.btn-pill { border-radius: 999px; }
.btn-block { width: 100%; }
.btn-sm {
  min-height: 32px;
  padding: .4rem .68rem;
  border-radius: 9px;
  font-size: .8rem;
}
.btn-warning {
  border-color: rgba(245, 158, 11, .24);
  background: rgba(245, 158, 11, .12);
  color: #92400e;
}
.btn-soft {
  background: rgba(20, 151, 223, 0.1);
  border-color: rgba(20, 151, 223, 0.15);
  color: var(--accent-strong);
}
.btn-with-icon,
.badge-with-icon,
.page-note,
.modal-title-with-icon,
.tenant-identity,
.meta-chip,
.contact-inline {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.btn-with-icon {
  justify-content: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
}
.badge-ok { background: rgba(16, 185, 129, 0.12); color: #047857; }
.badge-warn { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.badge-info { background: rgba(20, 151, 223, 0.12); color: var(--accent-strong); }
.badge-warning { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.badge-error { background: rgba(239, 68, 68, 0.11); color: #b91c1c; }

.toast-host {
  position: fixed;
  z-index: 5000;
  top: 1rem;
  right: 1rem;
  display: grid;
  gap: .7rem;
  width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}
.toast-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .7rem;
  padding: .78rem .85rem;
  border: 1px solid rgba(44, 95, 132, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 54px rgba(6, 32, 50, 0.18);
  pointer-events: auto;
  animation: toast-in .18s ease-out;
}
.toast-card p {
  color: var(--text);
  font-weight: 700;
  line-height: 1.35;
}
.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 900;
}
.toast-success .toast-icon {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}
.toast-error .toast-icon {
  background: rgba(239, 68, 68, 0.13);
  color: #dc2626;
}
.toast-success {
  border-left: 4px solid var(--good);
}
.toast-error {
  border-left: 4px solid var(--danger);
}
.toast-close {
  border: 0;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
  padding: .2rem;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.ui-icon {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: currentColor;
}
.ui-icon::before,
.ui-icon::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}
.icon-plus::before,
.icon-plus::after {
  left: 50%;
  top: 50%;
  width: 10px;
  height: 1.8px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.icon-plus::after {
  width: 1.8px;
  height: 10px;
}
.icon-edit::before {
  left: 2px;
  top: 7px;
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-35deg);
}
.icon-edit::after {
  right: 1px;
  top: 1px;
  width: 4px;
  height: 4px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(10deg);
}
.icon-pause::before,
.icon-pause::after {
  top: 2px;
  width: 3px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
}
.icon-pause::before { left: 3px; }
.icon-pause::after { right: 3px; }
.icon-play::before {
  left: 4px;
  top: 2px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}
.icon-check::before {
  left: 2px;
  top: 5px;
  width: 9px;
  height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}
.icon-alert::before {
  left: 1px;
  top: 1px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 11px solid currentColor;
}
.icon-alert::after {
  left: 6px;
  top: 5px;
  width: 2px;
  height: 3px;
  background: #fff7ed;
  box-shadow: 0 5px 0 0 #fff7ed;
}
.icon-info::before {
  inset: 1px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}
.icon-info::after {
  left: 6px;
  top: 3px;
  width: 2px;
  height: 6px;
  background: currentColor;
  box-shadow: 0 -3px 0 0 currentColor;
}
.icon-lock::before {
  left: 2px;
  bottom: 1px;
  width: 10px;
  height: 8px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
}
.icon-lock::after {
  left: 4px;
  top: 1px;
  width: 6px;
  height: 7px;
  border: 1.8px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
.icon-key::before {
  left: 1px;
  top: 4px;
  width: 6px;
  height: 6px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}
.icon-key::after {
  left: 7px;
  top: 7px;
  width: 7px;
  height: 2px;
  background: currentColor;
  box-shadow: 4px 2px 0 -0.5px currentColor, 2px 2px 0 -0.5px currentColor;
}
.icon-shield::before {
  left: 2px;
  top: 1px;
  width: 10px;
  height: 12px;
  border: 1.8px solid currentColor;
  border-radius: 6px 6px 8px 8px;
  clip-path: polygon(50% 0, 100% 18%, 86% 78%, 50% 100%, 14% 78%, 0 18%);
}
.icon-shield::after {
  left: 5px;
  top: 5px;
  width: 5px;
  height: 3px;
  border-left: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg);
}
.icon-building::before {
  left: 2px;
  bottom: 1px;
  width: 10px;
  height: 11px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
}
.icon-building::after {
  left: 4px;
  top: 4px;
  width: 2px;
  height: 2px;
  background: currentColor;
  box-shadow: 4px 0 0 0 currentColor, 0 4px 0 0 currentColor, 4px 4px 0 0 currentColor;
}
.icon-globe::before {
  inset: 1px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}
.icon-globe::after {
  left: 6px;
  top: 1px;
  width: 2px;
  height: 12px;
  background: currentColor;
  box-shadow: -4px 4px 0 -1px transparent;
}
.icon-mail::before {
  left: 1px;
  top: 3px;
  width: 12px;
  height: 8px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
}
.icon-mail::after {
  left: 3px;
  top: 5px;
  width: 8px;
  height: 5px;
  border-left: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: skewY(-35deg) rotate(-45deg);
}
.icon-stack::before,
.icon-stack::after {
  left: 2px;
  width: 10px;
  height: 6px;
  border: 1.6px solid currentColor;
  border-radius: 3px;
}
.icon-stack::before { top: 2px; }
.icon-stack::after { top: 6px; background: rgba(20, 151, 223, 0.08); }
.icon-close::before,
.icon-close::after {
  left: 6px;
  top: 1px;
  width: 2px;
  height: 12px;
  border-radius: 999px;
  background: currentColor;
}
.icon-close::before { transform: rotate(45deg); }
.icon-close::after { transform: rotate(-45deg); }
.icon-save::before {
  left: 2px;
  top: 1px;
  width: 10px;
  height: 12px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
}
.icon-save::after {
  left: 4px;
  top: 3px;
  width: 4px;
  height: 3px;
  border: 1.6px solid currentColor;
  border-top: 0;
  background: transparent;
  box-shadow: 0 5px 0 -1px currentColor;
}
.icon-refresh::before {
  left: 1px;
  top: 1px;
  width: 10px;
  height: 10px;
  border: 1.8px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}
.icon-refresh::after {
  right: 0;
  top: 1px;
  width: 0;
  height: 0;
  border-left: 4px solid currentColor;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  transform: rotate(12deg);
}
.icon-task::before {
  left: 2px;
  top: 1px;
  width: 10px;
  height: 12px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
}
.icon-task::after {
  left: 4px;
  top: 5px;
  width: 6px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 3px 0 currentColor;
}
.icon-user::before {
  left: 3px;
  top: 1px;
  width: 8px;
  height: 8px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}
.icon-user::after {
  left: 2px;
  bottom: 1px;
  width: 10px;
  height: 5px;
  border: 1.8px solid currentColor;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}
.icon-calendar::before {
  left: 1px;
  top: 2px;
  width: 12px;
  height: 10px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
}
.icon-calendar::after {
  left: 3px;
  top: 0;
  width: 8px;
  height: 4px;
  border-top: 1.8px solid currentColor;
  border-left: 1.8px solid transparent;
  border-right: 1.8px solid transparent;
  box-shadow: -3px 4px 0 -2px currentColor, 3px 4px 0 -2px currentColor;
}
.icon-clock::before {
  inset: 1px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}
.icon-clock::after {
  left: 6px;
  top: 3px;
  width: 2px;
  height: 5px;
  background: currentColor;
  transform-origin: bottom center;
  transform: rotate(45deg);
  box-shadow: 0 0 0 0 currentColor, -2px 2px 0 -0.5px currentColor;
}
.icon-service::before {
  left: 1px;
  top: 6px;
  width: 12px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transform: rotate(-25deg);
}
.icon-service::after {
  left: 7px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: 1.8px solid currentColor;
  border-left: 0;
  border-radius: 0 5px 5px 0;
  transform: rotate(-25deg);
}
.icon-id::before {
  left: 1px;
  top: 2px;
  width: 12px;
  height: 10px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
}
.icon-id::after {
  left: 3px;
  top: 5px;
  width: 6px;
  height: 1.8px;
  background: currentColor;
  box-shadow: 0 3px 0 0 currentColor;
}
.icon-open::before {
  left: 2px;
  top: 2px;
  width: 9px;
  height: 9px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
}
.icon-open::after {
  right: 1px;
  top: 1px;
  width: 5px;
  height: 5px;
  border-top: 1.8px solid currentColor;
  border-right: 1.8px solid currentColor;
  transform: rotate(0deg);
}
.icon-delete::before,
.icon-delete::after {
  left: 4px;
  width: 6px;
  border-radius: 999px;
  background: currentColor;
}
.icon-delete::before {
  top: 4px;
  height: 8px;
  border: 1.8px solid currentColor;
  background: transparent;
  border-top: 0;
  border-radius: 0 0 3px 3px;
}
.icon-delete::after {
  top: 2px;
  height: 2px;
  box-shadow: -2px -1px 0 0 currentColor, 2px -1px 0 0 currentColor;
}
.icon-export::before {
  left: 2px;
  top: 2px;
  width: 10px;
  height: 10px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
}
.icon-export::after {
  left: 5px;
  top: 0;
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-bottom: 5px solid currentColor;
  box-shadow: 0 9px 0 -1px currentColor;
}
.icon-search::before {
  left: 1px;
  top: 1px;
  width: 8px;
  height: 8px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}
.icon-search::after {
  right: 0;
  bottom: 0;
  width: 6px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transform: rotate(45deg);
  transform-origin: center;
}
.icon-pill::before {
  left: 1px;
  top: 3px;
  width: 12px;
  height: 8px;
  border: 1.8px solid currentColor;
  border-radius: 999px;
}
.icon-pill::after {
  left: 7px;
  top: 3px;
  width: 1.8px;
  height: 8px;
  background: currentColor;
}
.icon-prescription::before {
  left: 1px;
  top: 1px;
  width: 10px;
  height: 12px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
}
.icon-prescription::after {
  left: 3px;
  top: 4px;
  width: 6px;
  height: 1.8px;
  background: currentColor;
  box-shadow: 0 3px 0 0 currentColor, 0 6px 0 0 currentColor;
}

.page-note {
  margin-top: .22rem;
}
.modal-title-with-icon {
  display: flex;
  align-items: center;
  gap: .55rem;
}
.tenant-identity {
  font-weight: 700;
}
.tenant-cell-icon {
  color: var(--accent-strong);
}
.meta-chip {
  padding: .22rem .4rem;
  border-radius: 999px;
  background: rgba(20, 151, 223, 0.08);
  color: var(--accent-strong);
}
.meta-chip-soft {
  background: rgba(20, 151, 223, 0.06);
  color: var(--text-soft);
}
.contact-inline {
  color: var(--text-soft);
}

.alert {
  padding: .7rem .85rem;
  border-radius: var(--radius-md);
  margin: .55rem 0;
  font-size: .9rem;
  border: 1px solid transparent;
}
.alert-error { background: rgba(239, 68, 68, 0.1); color: #b91c1c; border-color: rgba(239, 68, 68, 0.16); }
.alert-ok { background: rgba(16, 185, 129, 0.1); color: #047857; border-color: rgba(16, 185, 129, 0.16); }
.alert-info { background: rgba(20, 151, 223, 0.1); color: var(--accent-strong); border-color: rgba(20, 151, 223, 0.16); }
.alert-warn { background: rgba(245, 158, 11, 0.12); color: #92400e; border-color: rgba(245, 158, 11, 0.16); }
.alert-success { background: rgba(16, 185, 129, 0.1); color: #047857; border-color: rgba(16, 185, 129, 0.16); }
.alert-warning { background: rgba(245, 158, 11, 0.12); color: #92400e; border-color: rgba(245, 158, 11, 0.16); }

label {
  display: block;
  margin: .65rem 0 .25rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
}
input[type=text], input[type=password], input[type=email], input[type=date], input[type=time], input[type=number], select, textarea, .auth-card input:not([type=checkbox]), .modal input:not([type=checkbox]), .modal select, .modal textarea, .search-box {
  width: 100%;
  padding: .62rem .78rem;
  border: 1px solid rgba(44, 95, 132, 0.14);
  border-radius: 10px;
  font-size: .9rem;
  color: var(--text);
  background: rgba(255,255,255,.96);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
:where(
  input:not([type]),
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  input[type="month"],
  input[type="week"],
  input[type="number"],
  select,
  textarea
) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: .62rem .78rem;
  border: 1px solid rgba(44, 95, 132, 0.16);
  border-radius: 11px;
  outline: 0;
  background-color: rgba(255,255,255,.97);
  color: var(--text);
  font: inherit;
  font-size: .9rem;
  line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
:where(select) {
  padding-right: 2.25rem;
  cursor: pointer;
}
:where(textarea) {
  min-height: 88px;
  resize: vertical;
}
:where(
  input:not([type]),
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  input[type="month"],
  input[type="week"],
  input[type="number"],
  select,
  textarea
):hover:not(:disabled):not(:focus) {
  border-color: rgba(44, 95, 132, 0.26);
}
:where(
  input:not([type]),
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  input[type="month"],
  input[type="week"],
  input[type="number"],
  select,
  textarea
):focus {
  border-color: rgba(20, 151, 223, .58);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(20, 151, 223, .12);
}
:where(input, select, textarea).invalid {
  border-color: rgba(220, 38, 38, .55);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .08);
}
:where(input, select, textarea):disabled {
  cursor: not-allowed;
  opacity: .7;
  background-color: rgba(226, 238, 246, .72);
}
:where(input, textarea)[readonly] {
  background-color: rgba(240, 247, 251, .86);
}
label > :where(input:not([type]), input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  margin-top: .35rem;
}
input[type="file"] {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: .35rem;
  border: 1px solid rgba(44, 95, 132, 0.16);
  border-radius: 11px;
  background: rgba(255,255,255,.97);
  color: var(--text-soft);
}
input[type="file"]::file-selector-button {
  min-height: 32px;
  margin-right: .65rem;
  padding: .4rem .72rem;
  border: 1px solid rgba(20, 151, 223, .16);
  border-radius: 8px;
  background: rgba(20, 151, 223, .09);
  color: var(--accent-strong);
  font-weight: 700;
  cursor: pointer;
}
input::placeholder, textarea::placeholder, .search-box::placeholder { color: var(--text-faint); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  border-color: rgba(20, 151, 223, 0.5);
  box-shadow: 0 0 0 4px rgba(20, 151, 223, 0.12);
}
input[type=time] {
  appearance: none;
  -webkit-appearance: none;
}
input[type=time]::-webkit-calendar-picker-indicator {
  opacity: .8;
  filter: saturate(0.8) hue-rotate(170deg);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-top: .7rem;
  font-weight: 500;
  color: var(--text-soft);
}
.checkbox input[type=checkbox],
.modal input[type=checkbox] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  padding: 0;
  flex: 0 0 1rem;
  accent-color: var(--accent);
  box-shadow: none;
}
.checkbox span,
.checkbox strong {
  line-height: 1.4;
}
.validation-message { color: var(--danger); font-size: .82rem; }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: .75rem;
  padding: .75rem;
}

.mobile-topbar,
.mobile-topbar-brand,
.mobile-menu-btn,
.mobile-menu-icon,
.mobile-close-btn,
.sidebar-mobile-head,
.sidebar-backdrop {
  display: none;
}

.sidebar {
  position: sticky;
  top: .75rem;
  align-self: start;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 1.5rem);
  padding: .6rem .55rem .55rem;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(245,250,255,.95) 100%);
  color: var(--text);
  box-shadow: 0 14px 36px rgba(6, 32, 50, 0.1);
  overflow: hidden;
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(20, 151, 223, 0.08), transparent 28%),
    radial-gradient(circle at bottom left, rgba(10, 187, 255, 0.06), transparent 30%);
  pointer-events: none;
}
.sidebar > * { position: relative; z-index: 1; }

.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .2rem .25rem .65rem;
  font-weight: 800;
  font-size: .95rem;
  color: var(--text);
}
.brand-mark {
  display: block;
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  object-fit: contain;
  filter: drop-shadow(0 5px 8px rgba(28, 176, 255, 0.22));
}
.brand-name {
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  gap: .35rem;
  height: 100%;
}
.sidebar-nav-section {
  display: flex;
  flex-direction: column;
  gap: .28rem;
  min-height: 0;
  overflow-y: auto;
  padding-right: .15rem;
}
.nav-group {
  display: grid;
  gap: .25rem;
  margin-bottom: .15rem;
}
.nav-group-collapsible {
  padding: 0;
}
.nav-group-collapsible > summary {
  list-style: none;
}
.nav-group-collapsible > summary::-webkit-details-marker {
  display: none;
}
.nav-group-collapsible:not([open]) > .sidebar-nav-link {
  display: none;
}
.nav-section-title {
  padding: .3rem .75rem .22rem;
  color: var(--text-faint);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: .5rem;
  cursor: pointer;
  user-select: none;
}
.nav-section-icon {
  position: relative;
  flex: 0 0 auto;
  width: .95rem;
  height: .95rem;
  color: #8aa4bb;
}
.nav-section-icon::before,
.nav-section-icon::after {
  content: "";
  position: absolute;
}
.nav-section-icon-toggle::before,
.nav-section-icon-toggle::after {
  left: 50%;
  top: 50%;
  width: .42rem;
  height: .42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform-origin: center;
  transition: transform .16s ease;
}
.nav-section-icon-toggle::before {
  transform: translate(-50%, -65%) rotate(45deg);
}
.nav-section-icon-toggle::after {
  transform: translate(-50%, -35%) rotate(45deg);
}
.nav-group-collapsible[open] .nav-section-icon-toggle::before {
  transform: translate(-50%, -35%) rotate(-135deg);
}
.nav-group-collapsible[open] .nav-section-icon-toggle::after {
  transform: translate(-50%, -65%) rotate(-135deg);
}
.sidebar-nav-home,
.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  position: relative;
  color: var(--text);
  text-decoration: none;
  padding: .62rem .75rem;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background .16s ease, transform .16s ease, border-color .16s ease, box-shadow .16s ease;
  font-size: .88rem;
}
.sidebar-nav-home::before,
.sidebar-nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  border-radius: 999px;
  background: var(--accent);
  transition: height .16s ease;
}
.sidebar-nav-home:hover,
.sidebar-nav-link:hover {
  text-decoration: none;
  background: rgba(20, 151, 223, 0.06);
  transform: translateX(1px);
}
.sidebar-nav-home.active,
.sidebar-nav-link.active {
  color: var(--accent-strong);
  background: linear-gradient(90deg, rgba(20,151,223,.12) 0%, rgba(20,151,223,.06) 100%);
  border-color: rgba(20, 151, 223, 0.14);
  box-shadow: inset 0 0 0 1px rgba(20, 151, 223, 0.03);
}
.sidebar-nav-home.active::before,
.sidebar-nav-link.active::before { height: 60%; }

.nav-icon {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 1.15rem;
  color: var(--accent-strong);
  overflow: visible;
}
.nav-icon::before,
.nav-icon::after {
  content: "";
  position: absolute;
}
.nav-icon-home::before {
  left: 2px;
  top: 5px;
  width: 11px;
  height: 8px;
  border: 1.8px solid currentColor;
  border-top: 0;
  border-radius: 2px;
}
.nav-icon-home::after {
  left: 1px;
  top: 1px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 6px solid currentColor;
}
.nav-icon-apps::before {
  left: 2px;
  top: 2px;
  width: 11px;
  height: 11px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
}
.nav-icon-apps::after {
  left: 7px;
  top: 3px;
  width: 1.8px;
  height: 9px;
  background: currentColor;
  box-shadow: -4px 4px 0 -0.2px currentColor, 4px 4px 0 -0.2px currentColor;
}
.nav-icon-widgets::before {
  left: 2px;
  top: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 5px 5px 0 0 currentColor, 9px 1px 0 0 rgba(20, 151, 223, 0.35);
}
.nav-icon-task::before {
  left: 2px;
  top: 1px;
  width: 10px;
  height: 12px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
}
.nav-icon-task::after {
  left: 4px;
  top: 4px;
  width: 6px;
  height: 1.8px;
  background: currentColor;
  box-shadow: 0 3px 0 0 currentColor, 0 6px 0 0 currentColor;
}
.nav-icon-charts::before {
  left: 2px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.8px solid currentColor;
}
.nav-icon-charts::after {
  left: 7px;
  top: 4px;
  width: 1.8px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: bottom center;
  transform: rotate(-42deg);
}
.nav-icon-report::before {
  left: 2px;
  top: 1px;
  width: 9px;
  height: 12px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
}
.nav-icon-report::after {
  left: 4px;
  top: 5px;
  width: 2px;
  height: 5px;
  background: currentColor;
  box-shadow:
    3px 2px 0 0 currentColor,
    6px 0 0 0 currentColor;
}
.nav-icon-reports::before {
  left: 2px;
  top: 2px;
  width: 11px;
  height: 10px;
  border-left: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  border-radius: 0 0 0 2px;
}
.nav-icon-reports::after {
  left: 4px;
  top: 4px;
  width: 2px;
  height: 6px;
  border-radius: 2px 2px 0 0;
  background: currentColor;
  box-shadow: 3px -2px 0 0 currentColor, 6px -5px 0 0 currentColor;
}
.nav-icon-calendar::before {
  left: 2px;
  top: 3px;
  width: 11px;
  height: 10px;
  border: 1.8px solid currentColor;
  border-radius: 3px;
}
.nav-icon-calendar::after {
  left: 4px;
  top: 1px;
  width: 7px;
  height: 4px;
  border-left: 1.8px solid currentColor;
  border-right: 1.8px solid currentColor;
  box-shadow: 0 4px 0 -1px currentColor;
}
.nav-icon-media::before {
  left: 2px;
  top: 3px;
  width: 10px;
  height: 7px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
}
.nav-icon-media::after {
  left: 5px;
  top: 1px;
  width: 0;
  height: 0;
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
  border-bottom: 3px solid currentColor;
}
.nav-icon-maps::before {
  left: 2px;
  top: 2px;
  width: 9px;
  height: 9px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}
.nav-icon-maps::after {
  left: 5px;
  top: 5px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}
.nav-icon-extras::before,
.nav-icon-auth::before,
.nav-icon-error::before,
.nav-icon-tenant::before,
.nav-icon-docs::before {
  left: 1.5px;
  top: 2px;
  width: 11px;
  height: 11px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
}
.nav-icon-extras::after {
  left: 4px;
  top: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.nav-icon-auth::after {
  left: 4px;
  top: 6px;
  width: 6px;
  height: 4px;
  border: 1.8px solid currentColor;
  border-top: 0;
  border-radius: 0 0 3px 3px;
}
.nav-icon-error::after {
  left: 5px;
  top: 1px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 8px solid currentColor;
}
.nav-icon-tenant::after {
  left: 4px;
  top: 5px;
  width: 6px;
  height: 6px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
}
.nav-icon-docs::after {
  left: 4px;
  top: 3px;
  width: 5px;
  height: 7px;
  border-left: 1.8px solid currentColor;
  border-top: 1.8px solid currentColor;
  transform: skewY(-10deg);
}
.nav-icon-medicine::before {
  left: 1px;
  top: 3px;
  width: 12px;
  height: 8px;
  border: 1.8px solid currentColor;
  border-radius: 999px;
}
.nav-icon-medicine::after {
  left: 7px;
  top: 3px;
  width: 1.8px;
  height: 8px;
  background: currentColor;
}
.nav-label {
  flex: 1;
  min-width: 0;
}
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.15rem;
  padding: 0 .4rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
}
.nav-badge-new {
  background: #ff2e3a;
  color: #fff;
}
.nav-badge-pill {
  background: rgba(255, 46, 58, 0.12);
  color: #ff2e3a;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: .65rem;
  border-top: 1px solid rgba(20,151,223,.08);
}
.sidebar-nav-footer {
  margin-top: auto;
  flex-shrink: 0;
  display: grid;
  gap: .5rem;
  padding-top: .6rem;
  align-self: stretch;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(247, 251, 255, .98) 28%);
  backdrop-filter: blur(6px);
}
.language-picker {
  display: grid;
  gap: .28rem;
}
.language-picker-label {
  margin: 0;
  padding-left: .15rem;
  color: var(--text-faint);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.language-picker-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .42rem;
  padding: .38rem .48rem;
  border: 1px solid rgba(20, 151, 223, .14);
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
}
.language-picker-control .ui-icon {
  color: var(--accent-strong);
}
.language-picker select {
  width: 100%;
  min-height: 32px;
  padding: .18rem .15rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: .84rem;
  font-weight: 800;
  box-shadow: none;
  cursor: pointer;
}
.language-picker select:focus-visible {
  box-shadow: 0 0 0 3px rgba(20, 151, 223, .12);
}
.sidebar-footer-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .55rem;
  padding: .5rem .55rem;
  border-radius: 12px;
  background: rgba(20,151,223,.06);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avatar-sm {
  width: 2rem;
  height: 2rem;
  font-size: .85rem;
}
.sidebar-footer-copy {
  min-width: 0;
  display: grid;
  gap: .1rem;
}
.sidebar-footer-email {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  font-size: 12px;
}
.sidebar-footer-subtle {
  font-size: .78rem;
  color: var(--text-soft);
  text-align: left;
}
.sidebar-logout {
  width: 100%;
  text-align: left;
  justify-content: flex-start;
  border-color: rgba(20,151,223,.16);
  background: #fff;
  color: var(--accent-strong);
  box-shadow: none;
  padding: .5rem .6rem;
  border-radius: 12px;
}

.content {
  min-width: 0;
  overflow-x: clip;
  padding: .1rem .75rem .75rem 0;
}
.content-inner {
  min-height: auto;
  min-width: 0;
  overflow-x: clip;
  padding: .9rem .9rem 1rem;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(249, 252, 255, .96) 0%, rgba(240, 247, 252, .88) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
  margin-bottom: .75rem;
}
.page-head h1 {
  font-size: 1.55rem;
  color: var(--text);
}
.tenant-page {
  display: grid;
  gap: .6rem;
}
.tenant-page-head {
  margin-bottom: .35rem;
}
.tenant-page-head p {
  margin-top: .18rem;
  font-size: .85rem;
}
.tenant-panel {
  padding: .35rem;
}
.tenant-table th, .tenant-table td {
  padding: .58rem .7rem;
}
.tenant-table td:first-child {
  font-weight: 600;
}
.tenant-table .actions {
  display: flex;
  justify-content: flex-end;
  gap: .35rem;
}
.tenant-logo-thumb,
.tenant-logo-preview {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(44, 95, 132, 0.14);
  background: #fff;
  object-fit: contain;
  box-shadow: var(--shadow-sm);
}
.tenant-logo-preview {
  width: 96px;
  height: 96px;
  border-radius: 18px;
}
.tenant-logo-fallback {
  color: var(--accent-strong);
  font-weight: 800;
  background: linear-gradient(180deg, rgba(20, 151, 223, 0.1), rgba(20, 151, 223, 0.04));
}
.tenant-table .btn {
  padding: .45rem .75rem;
  font-size: .85rem;
}

.panel {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(44, 95, 132, 0.12);
  border-radius: 16px;
  padding: .9rem 1rem;
  box-shadow: var(--shadow-sm);
}
.page-header,
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.page-header {
  margin-bottom: 1rem;
}
.page-header h1,
.panel-header h2 {
  margin: 0;
  color: var(--text);
}
.page-header h1 {
  font-size: clamp(1.65rem, 2.3vw, 2.1rem);
  letter-spacing: -.035em;
}
.page-header p {
  margin: .2rem 0 0;
  color: var(--text-soft);
}
.panel-header {
  margin-bottom: .8rem;
}
.panel-header h2 {
  font-size: 1.2rem;
  letter-spacing: -.02em;
}
.actions {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-width: 0;
  flex-wrap: wrap;
}
.panel-header > .actions {
  justify-content: flex-end;
  max-width: min(100%, 620px);
}
.panel-header > .actions select {
  width: min(420px, 100%);
  min-width: 240px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .8rem;
}
.stats-grid + .panel,
.panel + .panel {
  margin-top: .9rem;
}
.panel .table-wrap {
  border: 1px solid rgba(44, 95, 132, 0.11);
  background: rgba(255,255,255,.74);
}
.panel .table-wrap > table {
  width: 100%;
  border-collapse: collapse;
}
.panel .table-wrap > table th,
.panel .table-wrap > table td {
  padding: .72rem .8rem;
  border-bottom: 1px solid rgba(44, 95, 132, 0.09);
  text-align: left;
  vertical-align: middle;
}
.panel .table-wrap > table th {
  background: rgba(20, 151, 223, 0.055);
  color: var(--text-soft);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;
}
.panel .table-wrap > table tbody tr {
  transition: background .16s ease;
}
.panel .table-wrap > table tbody tr:nth-child(even) {
  background: rgba(20, 151, 223, 0.025);
}
.panel .table-wrap > table tbody tr:hover {
  background: rgba(20, 151, 223, 0.065);
}
.panel .table-wrap > table tbody tr:last-child td {
  border-bottom: 0;
}
.panel-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem .85rem;
  border-radius: 14px;
  background: rgba(20, 151, 223, 0.05);
  border: 1px solid rgba(20, 151, 223, 0.10);
}
.panel-subhead strong {
  display: block;
  font-size: .98rem;
}
.prescription-lines {
  display: grid;
  gap: .6rem;
  margin-top: .65rem;
}
.prescription-line {
  padding: .72rem;
  border-radius: 14px;
  background: rgba(248, 252, 255, .96);
  border: 1px solid rgba(44, 95, 132, 0.10);
}
.modal-medication {
  width: min(980px, 96vw);
}
.modal-medication .modal-subtitle {
  max-width: 720px;
}
.modal-medication .prescription-line {
  padding: .9rem;
}
.medication-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem .8rem;
}
.medication-field-full {
  grid-column: 1 / -1;
}
.prescription-line-picker {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: .55rem;
}
.prescription-line-picker .btn {
  min-width: 78px;
}
.prescription-medicine-row td {
  padding-top: 0;
  background: rgba(248, 252, 255, 0.72);
  border-top: 0;
}
.prescription-medicine-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  padding: .2rem 0 .25rem;
}
.prescription-medicine-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  max-width: 100%;
  padding: .35rem .55rem;
  border: 1px solid rgba(20, 151, 223, 0.14);
  border-radius: 999px;
  background: rgba(20, 151, 223, 0.07);
  color: var(--text);
  font-size: .78rem;
}
.prescription-medicine-pill strong,
.prescription-medicine-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prescription-medicine-pill span {
  color: var(--muted);
}
.typeahead-shell {
  position: relative;
}
.typeahead-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + .35rem);
  left: 0;
  right: 0;
  display: grid;
  gap: .25rem;
  max-height: 260px;
  overflow: auto;
  padding: .42rem;
  border: 1px solid rgba(20, 151, 223, 0.20);
  border-radius: 14px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 44px rgba(6, 32, 50, 0.18);
}
.typeahead-option {
  display: grid;
  gap: .1rem;
  width: 100%;
  padding: .58rem .65rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.typeahead-option:hover,
.typeahead-option:focus-visible {
  background: rgba(20, 151, 223, 0.08);
  outline: none;
}
.typeahead-option strong {
  font-size: .88rem;
}
.typeahead-option span,
.typeahead-state {
  color: var(--text-soft);
  font-size: .78rem;
}
.typeahead-state {
  padding: .58rem .65rem;
}
.typeahead-error {
  color: var(--danger);
}
.picker-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem;
  align-items: center;
}
.picker-results {
  display: grid;
  gap: .45rem;
  margin-top: .75rem;
  max-height: 48vh;
  overflow: auto;
}
.picker-result {
  border: 1px solid rgba(44, 95, 132, 0.10);
  background: rgba(255,255,255,.96);
  border-radius: 12px;
  padding: .7rem .8rem;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: .15rem;
  box-shadow: var(--shadow-sm);
}
.picker-result strong { font-size: .92rem; }
.picker-result span { color: var(--text-soft); font-size: .8rem; }
.picker-result:hover {
  background: rgba(20, 151, 223, 0.05);
  border-color: rgba(20, 151, 223, 0.18);
}
.clickable-row {
  cursor: pointer;
}
.clickable-row:hover {
  background: rgba(20, 151, 223, 0.055);
}
.clickable-row:focus-visible {
  outline: 3px solid rgba(20, 151, 223, 0.24);
  outline-offset: -3px;
}
.medicine-detail-hero,
.medicine-detail-grid {
  display: grid;
  gap: .75rem;
}
.medicine-detail-hero {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: .85rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(20, 151, 223, 0.10), rgba(255,255,255,.78));
  border: 1px solid rgba(20, 151, 223, 0.14);
}
.medicine-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: .75rem;
}
.medicine-detail-grid > div,
.medicine-detail-section {
  padding: .75rem;
  border-radius: 14px;
  background: rgba(248, 252, 255, .94);
  border: 1px solid rgba(44, 95, 132, 0.10);
}
.medicine-detail-section {
  margin-top: .75rem;
}
.medicine-detail-section p {
  margin: .25rem 0 0;
  color: var(--text);
  line-height: 1.45;
}
.detail-label {
  display: block;
  margin-bottom: .22rem;
  color: var(--text-soft);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); }
.medicine-catalog-table-wrap {
  max-height: 580px;
  overflow: auto;
  border: 1px solid rgba(44, 95, 132, 0.16);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.medicine-catalog-table {
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
input[type="checkbox"],
input[type="radio"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
  box-shadow: none;
}
.check-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 38px;
  margin: 0;
  padding: .5rem .65rem;
  border: 1px solid rgba(44, 95, 132, .12);
  border-radius: 10px;
  background: rgba(248, 252, 255, .9);
  font-weight: 600;
}
.medicine-catalog-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: .82rem 1rem;
  border-bottom: 1px solid rgba(44, 95, 132, 0.18);
  background: linear-gradient(180deg, #f2f9fd, #edf6fb);
  box-shadow: 0 1px 0 rgba(44, 95, 132, 0.06);
}
.medicine-catalog-table td {
  padding: .82rem 1rem;
  border-bottom: 1px solid rgba(44, 95, 132, 0.12);
}
.medicine-catalog-table tbody tr:nth-child(even) {
  background: rgba(20, 151, 223, 0.035);
}
.medicine-catalog-table tbody tr:hover {
  background: rgba(20, 151, 223, 0.09);
}
.medicine-catalog-table th:nth-child(1),
.medicine-catalog-table td:nth-child(1) {
  width: 15%;
}
.medicine-catalog-table th:nth-child(2),
.medicine-catalog-table td:nth-child(2) {
  width: 24%;
}
.medicine-catalog-table th:nth-child(3),
.medicine-catalog-table td:nth-child(3) {
  width: 14%;
}
.medicine-catalog-table th:nth-child(4),
.medicine-catalog-table td:nth-child(4) {
  width: 23%;
}
.medicine-catalog-table th:nth-child(5),
.medicine-catalog-table td:nth-child(5) {
  width: 24%;
}
.medicine-trade-name {
  color: var(--text);
  font-weight: 800;
}
.medicine-form-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: .28rem .62rem;
  border: 1px solid rgba(20, 151, 223, 0.15);
  border-radius: 999px;
  background: rgba(20, 151, 223, 0.07);
  color: var(--accent-strong);
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.2;
}
.medicine-manufacturer {
  line-height: 1.4;
}
.medicine-regulatory-reference {
  font-variant-numeric: tabular-nums;
}
.medicine-regulatory-reference .cell-sub {
  flex-wrap: wrap;
}
.table {
  width: 100%;
  border-collapse: collapse;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,252,255,.98));
  border: 1px solid rgba(44, 95, 132, 0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.table th, .table td {
  text-align: left;
  padding: .8rem .95rem;
  border-bottom: 1px solid rgba(44, 95, 132, 0.08);
  font-size: .89rem;
  vertical-align: middle;
}
.table th {
  background: linear-gradient(180deg, rgba(20, 151, 223, 0.06), rgba(20, 151, 223, 0.03));
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-soft);
}
.table tbody tr {
  transition: background .18s ease, transform .18s ease;
}
.table tbody tr:hover {
  background: rgba(20, 151, 223, 0.035);
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .7rem;
  color: var(--text-soft);
  font-size: .84rem;
}
.pagination-actions {
  display: flex;
  align-items: center;
  gap: .45rem;
}
.pagination-size {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  color: var(--text-soft);
  font-size: .82rem;
  font-weight: 700;
}
.pagination-size select {
  min-height: 32px;
  padding: .25rem .45rem;
  border: 1px solid rgba(20,151,223,.16);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}
.page-chip {
  padding: .42rem .62rem;
  border-radius: 999px;
  background: rgba(20, 151, 223, 0.08);
  color: var(--accent-strong);
  font-weight: 700;
}
.table .actions {
  white-space: nowrap;
  text-align: right;
  display: flex;
  justify-content: flex-end;
  gap: .45rem;
  flex-wrap: wrap;
}
.table .actions .btn {
  min-width: 0;
}
.table-card {
  position: relative;
}
.table-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(20, 151, 223, 0.06), transparent 22%);
}
.table .cell-stack {
  display: grid;
  gap: .18rem;
}
.table .cell-main {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  font-weight: 600;
}
.table .cell-sub {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--text-soft);
  font-size: .81rem;
  line-height: 1.35;
}
.table .cell-kicker {
  color: var(--text-faint);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.table .cell-code {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
}
.table .btn-icon-only {
  padding-inline: .72rem;
}
.table .btn-label-strong {
  font-weight: 700;
}
.table .user-role-td {
  vertical-align: middle;
}
.user-role-pill {
  white-space: nowrap;
}
.table .user-role-td .badge {
  min-height: 2rem;
}
.table th:nth-child(2),
.table td:nth-child(2) {
  width: 16rem;
}
.row-suspended td { opacity: .62; }

.notification-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.notification-list li {
  display: grid;
  gap: .2rem;
  padding: .68rem .78rem;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(243,248,252,.96));
  border: 1px solid rgba(44, 95, 132, 0.08);
}
.notification-list li.unread {
  border-color: rgba(20, 151, 223, 0.16);
  box-shadow: 0 12px 24px rgba(20, 151, 223, 0.06);
}
.notification-list li.unread strong::before { content: "* "; color: var(--accent); }
.notification-list span { color: var(--text-soft); }
.notification-list time { color: var(--text-faint); font-size: .8rem; }
.live-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #8fffcf 0%, #10b981 65%);
  margin-left: .35rem;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.error-panel {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.14);
  border-radius: 14px;
  padding: .85rem 1rem;
}

.auth-layout {
  min-height: 100vh;
  padding: .75rem;
}
.auth-shell {
  min-height: calc(100vh - 1.5rem);
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(420px, 1.05fr);
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(145deg, #071f34 0%, #0a3b5d 42%, #0f5f86 100%);
  box-shadow: var(--shadow-lg);
}
.auth-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.4rem;
  color: #edf8ff;
  background:
    radial-gradient(circle at 12% 18%, rgba(98, 223, 255, 0.22), transparent 22%),
    radial-gradient(circle at 72% 86%, rgba(20, 151, 223, 0.2), transparent 26%),
    linear-gradient(180deg, rgba(5, 28, 44, 0.7) 0%, rgba(8, 42, 65, 0.9) 100%);
}
.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(150deg, transparent 52%, rgba(255,255,255,.08) 52.5%, transparent 53.5%),
    linear-gradient(15deg, transparent 60%, rgba(255,255,255,.06) 60.5%, transparent 61.5%);
  pointer-events: none;
  opacity: .6;
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-weight: 800;
  font-size: 1.2rem;
}
.auth-brand .brand-mark { width: 2.8rem; height: 2.8rem; }
.auth-brand .brand-mark { flex-basis: 2.8rem; }
.auth-prompt {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .8rem;
  border-radius: 999px;
  color: rgba(237, 248, 255, .85);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
}
.auth-hero-copy {
  max-width: 420px;
  padding: 1.2rem 0 1.2rem;
}
.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: .85rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  color: rgba(237, 248, 255, .76);
}
.auth-title {
  font-size: clamp(2rem, 3vw, 3.5rem);
  line-height: .98;
}
.auth-title span { color: #54d6ff; }
.auth-text {
  margin-top: 1rem;
  max-width: 34ch;
  color: rgba(237, 248, 255, .84);
  line-height: 1.6;
}
.auth-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.4rem;
}
.auth-chip {
  padding: .55rem .8rem;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(237, 248, 255, .92);
  font-size: .88rem;
}
.auth-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  font-size: .82rem;
  color: rgba(237, 248, 255, .76);
}

.auth-panel-wrap {
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(circle at top left, rgba(20, 151, 223, 0.08), transparent 20%),
    linear-gradient(180deg, #f9fcff 0%, #edf5fb 100%);
}
.auth-card {
  width: min(520px, 100%);
  padding: 1.35rem;
  border-radius: 20px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(44, 95, 132, 0.12);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}
.auth-language-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: .9rem;
}
.auth-language-row .language-picker {
  min-width: 170px;
}
.auth-language-row .language-picker-label {
  text-align: right;
}
.auth-card h1 {
  font-size: 1.6rem;
  line-height: 1.02;
  margin-bottom: .3rem;
}
.auth-card p { color: var(--text-soft); line-height: 1.55; }
.auth-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
  color: var(--text-soft);
  font-size: .94rem;
}
.auth-subtle {
  color: var(--text-faint);
  font-size: .9rem;
}
.auth-access-badge {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  padding: .42rem .65rem;
  border-radius: 999px;
  color: #0b608a;
  background: rgba(28, 176, 255, 0.08);
  border: 1px solid rgba(20, 151, 223, 0.14);
  font-size: .82rem;
  font-weight: 700;
}
.auth-access-badge .ui-icon {
  width: .9rem;
  height: .9rem;
}
.auth-form-options {
  display: flex;
  align-items: center;
  min-height: 2.25rem;
  margin: .8rem 0 .95rem;
}
.auth-signin-note {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin-top: 1rem;
  padding: .72rem .78rem;
  border-radius: 12px;
  color: var(--text-soft);
  background: rgba(20, 151, 223, 0.05);
  border: 1px solid rgba(20, 151, 223, 0.1);
  font-size: .82rem;
  line-height: 1.45;
}
.auth-signin-note .ui-icon {
  flex: 0 0 1rem;
  width: 1rem;
  height: 1rem;
  margin-top: .08rem;
  color: var(--accent-strong);
}

.dashboard-page {
  display: grid;
  min-width: 0;
  gap: .75rem;
}
.desktop-only {
  display: grid;
  gap: .75rem;
}
.mobile-only {
  display: none;
}
.dashboard-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  gap: .75rem;
  align-items: center;
}
.search-shell {
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
  gap: .6rem;
  min-height: 46px;
  padding: .45rem .7rem;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(44, 95, 132, 0.1);
  box-shadow: var(--shadow-sm);
}
.search-pill {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}
.search-icon {
  display: inline-grid;
  place-items: center;
  min-width: 4.8rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(20, 151, 223, 0.12);
  color: var(--accent-strong);
  padding: 0 .75rem;
  font-size: .8rem;
  font-weight: 700;
}
.topbar-actions {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: .5rem;
}
.mini-badge {
  min-width: 34px;
  height: 34px;
  padding: 0 .6rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(20, 151, 223, 0.12);
  color: var(--accent-strong);
  font-size: .8rem;
  font-weight: 700;
}
.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #1497df, #5dc9ff);
  box-shadow: 0 12px 24px rgba(20, 151, 223, 0.25);
  font-weight: 800;
}
.mobile-dashboard {
  display: grid;
  gap: .6rem;
}
.mobile-summary-card {
  display: grid;
  gap: .7rem;
  padding: .9rem;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(20, 151, 223, 0.16), transparent 26%),
    linear-gradient(145deg, rgba(255,255,255,.97), rgba(242,248,253,.95));
  border: 1px solid rgba(44, 95, 132, 0.1);
  box-shadow: var(--shadow-sm);
}
.mobile-summary-title {
  font-size: 1.28rem;
  line-height: 1.18;
  color: var(--text);
}
.mobile-summary-text {
  color: var(--text-soft);
  font-size: .92rem;
  line-height: 1.55;
}
.mobile-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}
.mobile-stat {
  display: grid;
  gap: .2rem;
  padding: .72rem .75rem;
  border-radius: 14px;
  background: rgba(20, 151, 223, 0.06);
  border: 1px solid rgba(20, 151, 223, 0.1);
}
.mobile-stat strong {
  font-size: 1.3rem;
  line-height: 1;
}
.mobile-stat span {
  color: var(--text-soft);
  font-size: .78rem;
}
.mobile-stat-dark {
  background: linear-gradient(180deg, rgba(7, 39, 57, 0.96), rgba(10, 59, 93, 0.94));
  border-color: rgba(7, 39, 57, 0.3);
}
.mobile-stat-dark strong,
.mobile-stat-dark span {
  color: #eaf6ff;
}
.mobile-panel {
  padding: .8rem;
}
.mobile-card-head {
  align-items: flex-start;
}
.mobile-list,
.mobile-load-list {
  display: grid;
  gap: .55rem;
}
.mobile-list-row,
.mobile-load-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-width: 0;
  padding: .72rem .75rem;
  border-radius: 12px;
  background: rgba(247, 251, 255, 0.96);
  border: 1px solid rgba(44, 95, 132, 0.1);
}
.mobile-list-row span,
.mobile-load-copy span {
  color: var(--text-soft);
  font-size: .84rem;
}
.mobile-list-row strong,
.mobile-load-copy strong {
  color: var(--text);
  font-size: .95rem;
}
.mobile-load-copy {
  min-width: 0;
  display: grid;
  gap: .12rem;
}
.mobile-load-copy strong,
.mobile-load-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-plain-list,
.mobile-notification-list {
  gap: .55rem;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  min-width: 0;
  gap: .8rem;
  padding: .95rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(20, 151, 223, 0.14), transparent 24%),
    linear-gradient(135deg, #ffffff 0%, #f4f9fd 100%);
  border: 1px solid rgba(44, 95, 132, 0.1);
  box-shadow: var(--shadow-md);
}
.hero-copy {
  display: grid;
  min-width: 0;
  width: 100%;
  gap: .65rem;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  width: fit-content;
  padding: .34rem .72rem;
  border-radius: 999px;
  background: rgba(20, 151, 223, 0.09);
  color: var(--accent-strong);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero-title {
  display: block;
  width: 100%;
  max-width: 18ch;
  white-space: normal;
  word-break: break-word;
  font-size: clamp(1.8rem, 2.8vw, 3rem);
  line-height: 1.02;
  overflow-wrap: anywhere;
}
.hero-title span { color: var(--accent); }
.hero-title-mobile,
.hero-lede-mobile {
  display: none;
}
.hero-lede {
  width: 100%;
  max-width: 60ch;
  color: var(--text-soft);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
}
.hero-metric {
  padding: .7rem .8rem;
  border-radius: 12px;
  background: rgba(20, 151, 223, 0.06);
  border: 1px solid rgba(20, 151, 223, 0.08);
}
.hero-metric strong {
  display: block;
  font-size: 1.25rem;
  margin-bottom: .18rem;
}
.hero-metric span {
  color: var(--text-soft);
  font-size: .84rem;
}
.hero-side {
  display: grid;
  min-width: 0;
  gap: .55rem;
  align-content: start;
}
.glass-card {
  padding: .8rem .85rem;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(7, 39, 57, 0.96), rgba(10, 59, 93, 0.94));
  color: #eaf6ff;
  box-shadow: 0 18px 36px rgba(6, 32, 50, 0.2);
}
.glass-card small {
  display: block;
  color: rgba(234, 246, 255, .72);
  font-size: .82rem;
  margin-bottom: .35rem;
}
.glass-card strong {
  display: block;
  font-size: 1.6rem;
  margin-bottom: .2rem;
}
.mini-progress {
  display: grid;
  gap: .5rem;
}
.mini-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  color: rgba(234, 246, 255, .9);
  font-size: .86rem;
}
.mini-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  overflow: hidden;
}
.mini-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #54d6ff, #1cb0ff);
}
.mini-fill.alt { background: linear-gradient(90deg, #8bf5da, #21d4a7); }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  min-width: 0;
  gap: .75rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  min-width: 0;
}
.grid-2 > * {
  min-width: 0;
}
.dashboard-grid > .panel,
.dashboard-grid > section.panel,
.grid-2 > .panel,
.grid-2 > section.panel,
.dash-cols > .panel,
.dash-cols > section.panel {
  margin-top: 0;
}
.panel form {
  min-width: 0;
}
.panel form > .btn:not(:first-child) {
  margin-top: .8rem;
}
.text-muted {
  color: var(--text-soft);
}
.detail-actions {
  flex-wrap: wrap;
}
.booking-slots-section {
  display: grid;
  gap: .65rem;
  margin-top: .8rem;
}
.prescription-added-table-wrap {
  margin-top: .65rem;
}
.dashboard-stack {
  display: grid;
  min-width: 0;
  gap: .75rem;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .6rem;
}
.kpi {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(44, 95, 132, 0.12);
  border-radius: 14px;
  padding: .72rem .8rem .7rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  box-shadow: var(--shadow-sm);
}
.kpi-value {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}
.kpi-value small { font-size: 1rem; font-weight: 700; }
.kpi-label {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-faint);
}
.kpi-warn .kpi-value { color: #dc2626; }

.dash-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  gap: .75rem;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: .55rem;
  margin-bottom: .75rem;
}
.card-head > div,
.summary-grid > *,
.dashboard-grid > *,
.dash-cols > *,
.hero-card > *,
.ring-card > * {
  min-width: 0;
}
.card-title {
  font-size: .95rem;
  font-weight: 800;
  color: var(--text);
}
.card-subtitle {
  color: var(--text-soft);
  font-size: .8rem;
}

.trend-svg {
  width: 100%;
  height: 140px;
  display: block;
}
.trend-bar {
  fill: var(--accent, #1497df);
  opacity: .9;
}
.trend-bar:hover { opacity: 1; }
.trend-bar-zero { fill: #c7d9e8; }
.trend-axis { stroke: rgba(44, 95, 132, 0.12); stroke-width: .4; }
.trend-labels {
  display: flex;
  justify-content: space-between;
  font-size: .72rem;
  color: var(--text-faint);
  margin-top: .3rem;
}

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .75rem;
}

.load-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 2fr auto;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}
.load-name {
  font-size: .88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 600;
}
.load-bar {
  background: rgba(20, 151, 223, 0.08);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}
.load-fill {
  background: linear-gradient(90deg, #1497df, #5dc9ff);
  height: 100%;
  border-radius: inherit;
  transition: width .4s ease;
}
.load-hot { background: linear-gradient(90deg, #f59e0b, #fb7185); }
.load-num {
  font-size: .8rem;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.schedule-table td:first-child { font-weight: 700; }

.section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.section-tab {
  padding: .45rem .72rem;
  border-radius: 999px;
  border: 1px solid rgba(44, 95, 132, 0.12);
  background: rgba(255,255,255,.82);
  color: var(--text-soft);
  font-weight: 700;
}
.section-tab.active {
  background: linear-gradient(135deg, rgba(20, 151, 223, 0.12), rgba(20, 151, 223, 0.06));
  color: var(--accent-strong);
  border-color: rgba(20, 151, 223, 0.22);
}

.summary-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  min-width: 0;
  gap: .75rem;
}
.ring-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-width: 0;
  gap: .75rem;
  align-items: center;
}
.ring {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background:
    conic-gradient(#0f7fc0 0 20%, #ee22ff 20% 45%, #f7a6ef 45% 85%, #a88baa 85% 100%);
  position: relative;
  box-shadow: inset 0 0 0 18px rgba(255,255,255,.88);
}
.ring::after {
  content: "";
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,.96);
}
.ring-legend {
  display: grid;
  gap: .8rem;
}
.legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text);
}
.legend-key {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.legend-dot {
  width: .85rem;
  height: .85rem;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot.purple { background: #7d117c; }
.legend-dot.pink { background: #ee22ff; }
.legend-dot.lilac { background: #f7a6ef; }
.legend-dot.mauve { background: #a88baa; }
.legend-value {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--accent-strong);
}

.mini-bars {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: .45rem;
  align-items: end;
  min-height: 96px;
}
.mini-bars span {
  display: block;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, #a9f3d7, #63dcff);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.3);
}
.mini-bars.pink span { background: linear-gradient(180deg, #f7a6ef, #ee22ff); }
.mini-bars.orange span { background: linear-gradient(180deg, #ffd69b, #f59e0b); }

.stat-card {
  position: relative;
  min-height: 104px;
  padding: 1rem;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(44, 95, 132, 0.12);
  box-shadow: var(--shadow-sm);
}
.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -1.5rem -2.5rem auto;
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  background: rgba(20, 151, 223, 0.055);
  pointer-events: none;
}
.stat-card > span {
  display: block;
  margin-bottom: .45rem;
  color: var(--text-soft);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .025em;
}
.stat-card strong {
  display: block;
  position: relative;
  z-index: 1;
  margin-bottom: .35rem;
  color: var(--text);
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.stat-card small {
  display: block;
  color: var(--text-soft);
  line-height: 1.5;
}

.empty-state {
  padding: .8rem .85rem;
  border-radius: 12px;
  background: rgba(20, 151, 223, 0.06);
  border: 1px dashed rgba(20, 151, 223, 0.18);
  color: var(--text-soft);
}
.error-details {
  margin: .75rem 0;
  padding: .65rem .75rem;
  border: 1px solid rgba(44, 95, 132, .12);
  border-radius: 10px;
  background: rgba(248, 252, 255, .9);
}
.error-details summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
}
.error-details code {
  display: block;
  max-width: 100%;
  margin-top: .55rem;
  overflow-wrap: anywhere;
  color: var(--text-soft);
  white-space: pre-wrap;
}
.table-empty-state {
  display: grid;
  place-items: center;
  min-height: 108px;
  margin-top: .7rem;
  text-align: center;
}
.table-empty-state strong {
  display: block;
  margin-bottom: .2rem;
  color: var(--text);
}
.operational-page {
  display: grid;
  gap: 1rem;
}
.operational-page > .page-header {
  margin-bottom: 0;
}
.operational-page > .stats-grid + .panel,
.operational-page .panel + .panel {
  margin-top: 0;
}
.revenue-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  min-width: 0;
}
.revenue-secondary-grid > .panel {
  min-width: 0;
  margin-top: 0;
}
.revenue-page .operational-table {
  min-width: 720px;
}
.revenue-page .actions {
  display: flex;
  justify-content: flex-end;
  gap: .35rem;
  white-space: nowrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background:
    radial-gradient(circle at top, rgba(20, 151, 223, 0.14), transparent 28%),
    rgba(7, 20, 33, .54);
  backdrop-filter: blur(8px);
}
.modal-backdrop-top {
  z-index: 1020;
}
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  z-index: 1001;
  background:
    radial-gradient(circle at top right, rgba(20, 151, 223, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,251,255,.96));
  border: 1px solid rgba(44, 95, 132, 0.12);
  border-radius: 24px;
  padding: 1rem;
  width: min(560px, 94vw);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 28px 80px rgba(6, 32, 50, 0.28);
}
.modal-top {
  z-index: 1021;
}
.modal-form-shell {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, calc(100vh - 2rem));
  padding: 0;
  overflow: hidden;
}
.modal-header {
  padding: 1.15rem 1.2rem .95rem;
  border-bottom: 1px solid rgba(44, 95, 132, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(242,248,253,.68));
}
.modal-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
}
.modal-title-icon {
  width: 2.5rem;
  height: 2.5rem;
  flex: 0 0 2.5rem;
  border-radius: 14px;
  color: var(--accent-strong);
  background: rgba(20, 151, 223, 0.1);
  box-shadow: inset 0 0 0 1px rgba(20, 151, 223, 0.06);
}
.modal-title-icon::before,
.modal-title-icon::after {
  left: 50%;
  top: 50%;
}
.modal-title {
  font-size: 1.45rem;
  line-height: 1.05;
  color: var(--text);
}
.modal-subtitle {
  margin-top: .3rem;
  color: var(--text-soft);
  font-size: .9rem;
  line-height: 1.5;
}
.modal-form {
  display: grid;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.modal-section {
  display: grid;
  gap: .8rem;
  padding: 1rem 1.2rem;
}
.modal-section-compact {
  gap: .65rem;
  padding-top: .85rem;
  padding-bottom: .85rem;
}
.modal-section + .modal-section {
  border-top: 1px solid rgba(44, 95, 132, 0.06);
}
.modal-section-heading {
  display: grid;
  gap: .18rem;
  margin-bottom: .05rem;
}
.modal-section-heading strong {
  color: var(--text);
  font-size: .92rem;
}
.modal-section-heading span {
  color: var(--text-soft);
  font-size: .78rem;
  line-height: 1.45;
}
.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}
.field-row-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
}
.field-row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
}
.field-row-12 {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: .65rem;
}
.field-col-6 {
  grid-column: span 6;
}
.field-col-3 {
  grid-column: span 3;
}
.field-block {
  display: grid;
  gap: .28rem;
  min-width: 0;
}
.field-block-full {
  grid-column: 1 / -1;
}
.field-span-2 {
  grid-column: span 2;
}
.field-block label {
  margin: 0;
}
.report-page-head {
  align-items: flex-start;
}
.report-actions,
.report-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  flex-wrap: wrap;
}
.report-filter-panel {
  display: grid;
  gap: .85rem;
}
.report-filter-grid label {
  display: grid;
  gap: .32rem;
  min-width: 0;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-soft);
}
.report-control {
  width: 100%;
  min-height: 42px;
  padding: .52rem .72rem;
  border: 1px solid rgba(20, 151, 223, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(248,252,255,.99));
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92);
}
select.report-control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent-strong) 50%),
    linear-gradient(135deg, var(--accent-strong) 50%, transparent 50%);
  background-position:
    calc(100% - .92rem) calc(50% - 2px),
    calc(100% - .78rem) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.report-control:focus {
  outline: none;
  border-color: rgba(20, 151, 223, 0.42);
  box-shadow: 0 0 0 3px rgba(20, 151, 223, 0.12);
}
.report-control::placeholder {
  color: #7f93aa;
}
.report-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
  margin: .85rem 0;
}
.report-summary-strip > div {
  display: grid;
  gap: .2rem;
  padding: .8rem .9rem;
  border: 1px solid rgba(44, 95, 132, 0.09);
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow-sm);
}
.report-summary-strip span {
  color: var(--text-soft);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.report-summary-strip strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}
.report-table th,
.report-table td {
  white-space: nowrap;
}
.modal .validation-message {
  margin-top: .1rem;
}
.modal textarea {
  min-height: 88px;
  resize: vertical;
}
.modal textarea.compact-textarea {
  min-height: 64px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: .55rem;
  padding: 1rem 1.2rem 1.2rem;
  border-top: 1px solid rgba(44, 95, 132, 0.08);
  background: rgba(255,255,255,.58);
}
.modal-actions-split {
  align-items: center;
}
.modal-action-spacer {
  flex: 1 1 auto;
}
.btn.btn-danger {
  color: #b42318;
  border-color: rgba(239, 68, 68, .2);
  background: rgba(254, 242, 242, .88);
}
.btn.btn-danger:hover {
  color: #991b1b;
  border-color: rgba(239, 68, 68, .32);
  background: rgba(254, 226, 226, .94);
}
.modal-form-shell .modal-form > .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  backdrop-filter: blur(12px);
}
.modal-wide { width: min(1080px, 96vw); }
.modal-patient { width: min(960px, 96vw); }
.modal.modal-medication { width: min(980px, 96vw); }
.modal-confirm { width: min(540px, 94vw); }
.modal-picker { width: min(680px, 94vw); }
.modal-detail { width: min(720px, 94vw); }

.cal-toolbar { display: flex; justify-content: space-between; align-items: center; margin: .75rem 0; gap: .75rem; flex-wrap: wrap; }
.cal-toolbar select { padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-strong); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .5rem; }
.cal-day { background: var(--surface-strong); border: 1px solid var(--line); border-radius: var(--radius-md); padding: .4rem; min-height: 140px; display: flex; flex-direction: column; gap: .3rem; }
.cal-today { outline: 2px solid var(--accent); }
.cal-day-head { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); padding: .15rem .2rem .3rem; border-bottom: 1px solid var(--line); }
.cal-slot { display: flex; justify-content: space-between; align-items: center; gap: .25rem; width: 100%; border: none; border-left: 4px solid transparent; border-radius: 5px; padding: .3rem .4rem; font-size: .76rem; cursor: pointer; text-align: left; }
.cal-slot-who { font-weight: 700; }
.cal-slot-cap { opacity: .75; }
.cal-available { background: #d8f5ee; border-left-color: #0f9d84; color: #065f51; }
.cal-draft { background: #eef2f6; border-left-color: #94a3b8; color: #475569; }
.cal-full { background: #fef3c7; border-left-color: #d97706; color: #92400e; }
.cal-blocked { background: #fde8e8; border-left-color: #dc2626; color: #991b1b; }
.cal-cancelled { background: #f3f4f6; border-left-color: #9ca3af; color: #9ca3af; text-decoration: line-through; }
.cal-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin: 0 .3rem 0 .9rem; vertical-align: -1px; }

.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem 1.5rem; margin-bottom: .75rem; }
.patient-tabs {
  margin-bottom: .75rem;
}
.note-panel { margin-top: .6rem; }
.note-content { white-space: pre-wrap; font-size: .92rem; margin: .25rem 0 0; }
.document-empty-state {
  display: grid;
  gap: .25rem;
  padding: 1rem;
  border: 1px dashed rgba(20, 151, 223, .25);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(248, 252, 255, .95), rgba(238, 247, 253, .88));
  color: var(--text-soft);
}
.document-empty-state strong {
  color: var(--text);
}
.document-table th:nth-child(2),
.document-table td:nth-child(2) {
  width: 8.5rem;
}
.document-preview-tile {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-width: 6.8rem;
  padding: .46rem .58rem;
  border: 1px solid rgba(20, 151, 223, .18);
  border-radius: 8px;
  background: rgba(20, 151, 223, .07);
  color: var(--accent-strong);
  font-weight: 800;
  font-size: .82rem;
  cursor: pointer;
}
.document-preview-tile:hover {
  background: rgba(20, 151, 223, .12);
}
.document-file-chip {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .65rem;
  width: fit-content;
  max-width: 100%;
  margin-top: .35rem;
  padding: .48rem .65rem;
  border-radius: 8px;
  background: rgba(20, 151, 223, .08);
  color: var(--text-soft);
  font-size: .84rem;
  font-weight: 700;
}
.document-file-chip span:nth-child(2) {
  color: var(--text);
}
.document-preview-modal {
  width: min(1120px, 96vw);
}
.document-preview-frame {
  display: block;
  width: 100%;
  height: min(68vh, 720px);
  margin-top: .85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
}
.document-preview-fallback {
  display: grid;
  justify-items: center;
  gap: .4rem;
  margin-top: .85rem;
  padding: 2.4rem 1rem;
  border: 1px dashed rgba(20, 151, 223, .24);
  border-radius: var(--radius-md);
  background: rgba(248, 252, 255, .92);
  color: var(--text-soft);
  text-align: center;
}
.document-preview-fallback strong {
  color: var(--text);
}
.slot-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .4rem; max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-md); padding: .5rem; margin: .25rem 0 .5rem; }
.slot-selected { outline: 2px solid var(--accent); }
.booking-flow {
  display: grid;
  gap: .8rem;
}
.booking-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .78fr);
  gap: .8rem;
  align-items: start;
}
.booking-slot-picker {
  max-height: 230px;
  margin-bottom: .2rem;
}
.booking-empty-state {
  min-height: 3rem;
  display: flex;
  align-items: center;
  padding: .7rem .8rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: rgba(248, 252, 255, .72);
}
.booking-inline-hint {
  display: block;
  margin-top: .3rem;
  font-size: .8rem;
}
.booking-patient-summary {
  display: grid;
  gap: .35rem;
  margin-top: .55rem;
  padding: .72rem .82rem;
  border: 1px solid rgba(20, 151, 223, 0.16);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(232, 246, 255, .92), rgba(248, 252, 255, .96));
}
.booking-patient-summary > div {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  align-items: center;
}
.booking-patient-summary strong {
  font-size: .95rem;
}
.booking-patient-summary span {
  color: var(--text-soft);
  font-size: .82rem;
}
.booking-patient-address {
  width: 100%;
}
.booking-patient-warning {
  color: #b45309;
  font-size: .82rem;
  font-weight: 700;
}
.admission-table th:first-child,
.admission-table td:first-child {
  width: 13rem;
}
.admission-table th:nth-child(5),
.admission-table td:nth-child(5) {
  width: 8rem;
}
.admission-step-title {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--text);
  font-size: .94rem;
}
.admission-step-title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 8px;
  background: rgba(20, 151, 223, .12);
  color: var(--accent-strong);
  font-weight: 900;
}
.admission-patient-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .8rem;
  padding: .65rem .75rem;
  border: 1px solid rgba(20, 151, 223, .14);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(232, 246, 255, .9), rgba(248, 252, 255, .96));
  color: var(--text-soft);
  font-size: .84rem;
}
.admission-patient-strip strong {
  color: var(--text);
}
.admission-consent {
  align-self: end;
  min-height: 42px;
}
.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: .85rem;
}
.diagnostic-card {
  display: grid;
  gap: .85rem;
  padding: .95rem;
  border: 1px solid rgba(44, 95, 132, .12);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(20, 151, 223, .10), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,251,255,.92));
  box-shadow: var(--shadow-sm);
}
.diagnostic-card-top,
.diagnostic-actions,
.diagnostic-files-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}
.diagnostic-card h3 {
  margin: .18rem 0 0;
  font-size: 1.05rem;
}
.diagnostic-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .35rem;
}
.diagnostic-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}
.diagnostic-meta span {
  display: grid;
  gap: .12rem;
  padding: .55rem .65rem;
  border-radius: 12px;
  background: rgba(20, 151, 223, .06);
  color: var(--text-soft);
  font-size: .82rem;
}
.diagnostic-meta strong {
  color: var(--text);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.diagnostic-result {
  display: grid;
  grid-template-columns: minmax(120px, .36fr) minmax(0, 1fr);
  gap: .7rem;
  align-items: stretch;
}
.diagnostic-result p {
  margin-top: .25rem;
  color: var(--text-soft);
  line-height: 1.45;
  white-space: pre-wrap;
}
.result-chip {
  display: grid;
  gap: .18rem;
  align-content: center;
  min-height: 86px;
  padding: .75rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(20,151,223,.14), rgba(16,185,129,.10));
  border: 1px solid rgba(20,151,223,.14);
}
.result-chip span {
  color: var(--text-soft);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.result-chip strong {
  font-size: 1.1rem;
}
.result-chip em {
  color: #b45309;
  font-style: normal;
  font-weight: 800;
}
.diagnostic-files {
  display: grid;
  gap: .45rem;
  padding: .72rem;
  border: 1px dashed rgba(20,151,223,.18);
  border-radius: var(--radius-md);
  background: rgba(248, 252, 255, .78);
}
.diagnostic-files-head span {
  color: var(--text-soft);
  font-size: .8rem;
}
.diagnostic-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.diagnostic-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.qr-box { width: 184px; height: 184px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; }
.qr-box img, .qr-box canvas { display: block; }
.recovery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .4rem; }
.recovery-grid code { background: rgba(20, 151, 223, 0.06); border: 1px dashed var(--line); border-radius: 10px; padding: .35rem .5rem; text-align: center; font-size: .95rem; letter-spacing: .04em; }

.table-wrap, .dash-cols, .kpi-grid, .summary-grid, .dashboard-grid, .dashboard-stack, .hero-card, .hero-side, .mini-progress, .section-tabs, .ring-legend, .auth-chips {
  animation: fade-up .45s ease both;
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 220px minmax(0, 1fr);
    padding: .65rem;
  }
  .sidebar {
    min-height: calc(100vh - 1.3rem);
  }
  .content {
    padding: 0;
  }
  .content-inner {
    min-height: auto;
    padding: .8rem;
  }
  .hero-card {
    grid-template-columns: 1fr;
  }
  .dashboard-grid,
  .summary-grid,
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .topbar-actions {
    flex-wrap: wrap;
  }
  .auth-shell {
    min-height: auto;
  }
  .revenue-secondary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .shell {
    display: block;
    padding: .5rem;
  }
  .sidebar {
    position: fixed;
    inset: .5rem auto .5rem .5rem;
    width: min(320px, calc(100vw - 1rem));
    min-height: auto;
    height: calc(100vh - 1rem);
    z-index: 40;
    transform: translateX(-110%);
    transition: transform .22s ease;
    overflow: hidden;
  }
  .shell.sidebar-open .sidebar {
    transform: translateX(0);
  }
  .sidebar-nav {
    min-height: 0;
  }
  .sidebar-nav-section {
    overflow-y: auto;
    max-height: calc(100vh - 7.5rem);
    padding-right: .2rem;
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    border: 0;
    background: rgba(8, 25, 38, .42);
    padding: 0;
    margin: 0;
  }
  .content {
    padding: 0;
  }
  .content-inner {
    min-height: calc(100vh - 1rem);
    border-radius: 18px;
    padding: .75rem;
  }
  .page-header,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-header .btn,
  .panel-header .btn {
    width: 100%;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mobile-topbar {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: .75rem;
    padding: .55rem .75rem;
    margin-bottom: .5rem;
    border-radius: 16px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(44, 95, 132, 0.1);
    box-shadow: var(--shadow-sm);
  }
  .mobile-topbar-brand {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
    min-width: 0;
    font-size: .95rem;
    font-weight: 800;
    color: var(--text);
  }
  .mobile-brand-mark {
    width: 1.75rem;
    height: 1.75rem;
    flex: 0 0 1.75rem;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(28, 176, 255, 0.2));
  }
  .mobile-menu-btn,
  .mobile-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 36px;
    padding: .45rem .75rem;
    border-radius: 10px;
    border: 1px solid rgba(20, 151, 223, 0.16);
    background: white;
    color: var(--accent-strong);
    box-shadow: none;
    visibility: visible;
    opacity: 1;
    white-space: nowrap;
  }
  .mobile-menu-btn {
    justify-content: flex-start;
    gap: .45rem;
  }
  .mobile-menu-icon {
    display: inline-block;
    width: 14px;
    height: 10px;
    position: relative;
    flex: 0 0 14px;
  }
  .mobile-menu-icon::before,
  .mobile-menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }
  .mobile-menu-icon::before {
    top: 0;
    box-shadow: 0 4px 0 0 currentColor, 0 8px 0 0 currentColor;
  }
  .mobile-close-btn {
    width: 36px;
    padding: 0;
    font-weight: 800;
  }
  .sidebar-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .15rem .15rem .6rem;
  }
  .sidebar > .brand {
    display: none;
  }
  .sidebar-nav-footer {
    padding-top: .5rem;
    position: static;
    background: linear-gradient(180deg, rgba(255,255,255,0), rgba(247, 251, 255, .98) 24%);
  }
  .sidebar-footer-card {
    padding: .45rem .5rem;
  }
  .sidebar-logout {
    min-height: 38px;
  }
  .dash-cols, .hero-metrics, .ring-card, .dashboard-topbar, .detail-grid, .booking-flow, .booking-top-row { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-head { flex-wrap: wrap; }
  .page-head > * { min-width: 0; }
  .hero-title { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .hero-lede { max-width: none; }
  .search-shell { width: 100%; }
  .topbar-actions { justify-content: flex-start; }
  .auth-layout { padding: .5rem; }
  .auth-panel-wrap { padding: .9rem; }
  .auth-card { padding: 1rem; }
  .auth-hero { padding: 1rem; }
}

@media (max-width: 760px) {
  .shell, .auth-layout { padding: .4rem; }
  .content-inner, .sidebar, .auth-shell { border-radius: 18px; }
  .content-inner {
    padding: .55rem;
  }
  .mobile-topbar {
    position: sticky;
    top: .4rem;
    z-index: 15;
  }
  .dashboard-page {
    gap: .45rem;
  }
  .dashboard-topbar {
    display: none;
  }
  .desktop-only {
    display: none;
  }
  .mobile-only {
    display: grid;
  }
  .platform-kpis,
  .tenant-kpis {
    display: none;
  }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .search-shell {
    min-height: 42px;
    padding: .45rem .6rem;
  }
  .search-icon {
    min-width: 3.7rem;
    padding: 0 .55rem;
    font-size: .74rem;
  }
  .mini-badge,
  .avatar {
    width: 34px;
    height: 34px;
    min-width: 34px;
  }
  .panel, .kpi, .auth-card, .tenant-panel { padding: .65rem; }
  .hero-card {
    display: block;
    gap: .45rem;
    border-radius: 16px;
  }
  .hero-copy,
  .hero-side,
  .hero-metrics,
  .hero-lede,
  .hero-title {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .hero-title {
    max-width: none;
    font-size: 1.08rem;
    line-height: 1.22;
    letter-spacing: -.01em;
  }
  .hero-title-desktop,
  .hero-lede-desktop {
    display: none;
  }
  .hero-title-mobile,
  .hero-lede-mobile {
    display: block;
  }
  .hero-lede {
    font-size: .84rem;
    line-height: 1.42;
  }
  .eyebrow {
    font-size: .68rem;
    padding: .28rem .58rem;
    letter-spacing: .06em;
  }
  .hero-copy {
    gap: .35rem;
  }
  .hero-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
    margin-top: .5rem;
  }
  .hero-metric {
    padding: .5rem .55rem;
    border-radius: 10px;
  }
  .hero-metric strong,
  .glass-card strong {
    font-size: .98rem;
  }
  .hero-metric span,
  .glass-card small,
  .glass-card span {
    font-size: .74rem;
  }
  .glass-card {
    padding: .62rem .65rem;
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(6, 32, 50, 0.16);
  }
  .dashboard-grid,
  .summary-grid,
  .dash-cols {
    gap: .45rem;
  }
  .card-head {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: .4rem;
  }
  .card-title {
    font-size: .88rem;
  }
  .card-subtitle {
    font-size: .76rem;
  }
  .trend-svg {
    height: 116px;
  }
  .section-tabs {
    width: 100%;
  }
  .section-tab {
    flex: 1 1 auto;
    text-align: center;
  }
  .table th, .table td { padding: .5rem .55rem; font-size: .82rem; }
  .table { min-width: 560px; }
  .tenant-table .btn, .btn { padding: .5rem .72rem; }
  .tenant-table .actions { gap: .25rem; flex-wrap: wrap; }
  .tenant-page-head {
    gap: .45rem;
  }
  .tenant-page-head .btn {
    width: 100%;
  }
  .kpi {
    padding: .55rem .6rem;
  }
  .kpi-value {
    font-size: 1.12rem;
  }
  .mobile-topbar {
    padding: .5rem .6rem;
    border-radius: 14px;
  }
  .hero-metrics { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 1.35rem; }
  .mobile-summary-card {
    padding: .85rem;
    gap: .6rem;
  }
  .mobile-summary-title {
    font-size: 1.08rem;
    line-height: 1.22;
  }
  .mobile-summary-text {
    font-size: .84rem;
    line-height: 1.45;
  }
  .mobile-stat-grid {
    grid-template-columns: 1fr;
  }
  .mobile-stat,
  .mobile-list-row,
  .mobile-load-item {
    padding: .62rem .68rem;
  }
  .mobile-load-item {
    align-items: flex-start;
  }
  .mobile-load-item .badge {
    flex: 0 0 auto;
  }
  .modal {
    width: min(94vw, 560px);
    max-height: 92vh;
  }
  .modal-header,
  .modal-section,
  .modal-actions {
    padding-left: .85rem;
    padding-right: .85rem;
  }
  .field-row {
    grid-template-columns: 1fr;
    gap: .7rem;
  }
  .field-row-4 {
    grid-template-columns: 1fr;
  }
  .field-row-3 {
    grid-template-columns: 1fr;
  }
  .field-row-12 {
    grid-template-columns: 1fr;
  }
  .field-row-12 > .field-col-6,
  .field-row-12 > .field-col-3 {
    grid-column: 1 / -1;
  }
  .report-actions,
  .report-filter-actions {
    justify-content: flex-start;
  }
  .report-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .field-span-2 {
    grid-column: 1 / -1;
  }
  .diagnostic-grid,
  .diagnostic-meta,
  .diagnostic-result {
    grid-template-columns: 1fr;
  }
  .diagnostic-card-top,
  .diagnostic-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .diagnostic-badges {
    justify-content: flex-start;
  }
  .prescription-line-picker,
  .picker-search-row {
    grid-template-columns: 1fr;
  }
  .medication-form-grid {
    grid-template-columns: 1fr;
  }
  .medication-field-full {
    grid-column: 1 / -1;
  }
  .modal-title {
    font-size: 1.2rem;
  }
  .modal-subtitle {
    font-size: .82rem;
  }
  .modal-actions-split {
    flex-wrap: wrap;
  }
  .modal-actions-split .modal-action-spacer {
    display: none;
  }
  .modal-actions-split .btn-danger {
    width: 100%;
    margin-bottom: .2rem;
  }
  .tenant-identity,
  .contact-inline,
  .meta-chip {
    gap: .35rem;
  }
  .contact-inline {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body {
    background: #fff !important;
  }
  .sidebar,
  .mobile-topbar,
  .report-filter-panel,
  .report-actions,
  .pagination-bar,
  .alert {
    display: none !important;
  }
  .shell,
  .content,
  .content-inner {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    background: #fff !important;
  }
  .page-head,
  .panel,
  .table-card,
  .report-summary-strip > div {
    box-shadow: none !important;
  }
  .panel,
  .table-card,
  .report-summary-strip > div {
    border-color: #d8dee7 !important;
    background: #fff !important;
  }
  .report-summary-strip {
    grid-template-columns: repeat(4, 1fr);
  }
  .table-wrap {
    overflow: visible !important;
  }
  .report-table {
    font-size: 10px;
  }
}
.tenant-switcher {
    padding: .25rem .75rem .65rem;
}

.tenant-switcher select {
    width: 100%;
    min-width: 0;
    font-size: .82rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
