:root {
  color-scheme: light;
  --ink: #251f2d;
  --muted: #746b7d;
  --panel: #ffffff;
  --soft: rgba(255, 255, 255, 0.68);
  --line: rgba(105, 87, 130, 0.1);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.84);
  --glass-line: rgba(255, 255, 255, 0.9);
  --glass-rim: rgba(255, 255, 255, 0.96);
  --glass-rim-soft: rgba(154, 78, 125, 0.12);
  --fuchsia: #aa5d86;
  --fuchsia-dark: #743b5f;
  --purple: #7462b4;
  --purple-dark: #443963;
  --amber: #b0782f;
  --rose: #a95b78;
  --shadow: 0 26px 80px rgba(71, 50, 82, 0.12);
  --glass-shadow: 0 28px 80px rgba(71, 50, 82, 0.12), 0 8px 26px rgba(154, 78, 125, 0.07);
  --glass-rim-shadow: 0 0 0 1px var(--glass-rim-soft), 0 0 0 5px rgba(255, 255, 255, 0.2);
  --inner-glow: inset 0 1px 0 rgba(255, 255, 255, 0.96), inset 0 -1px 0 rgba(255, 255, 255, 0.42), inset 1px 0 0 rgba(255, 255, 255, 0.42);
}

.role-switch {
  display: none !important;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 248, 252, 0.92) 38%, rgba(249, 246, 255, 0.9) 100%),
    linear-gradient(158deg, rgba(170, 93, 134, 0.12) 0%, transparent 34%, rgba(116, 98, 180, 0.1) 74%, transparent 100%),
    #fff9fd;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.7) 18%, transparent 42%),
    linear-gradient(245deg, transparent 8%, rgba(255, 239, 249, 0.5) 36%, transparent 66%),
    linear-gradient(170deg, rgba(116, 98, 180, 0.075), transparent 45%, rgba(170, 93, 134, 0.08));
  filter: saturate(1.02);
  pointer-events: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  transition:
    transform 190ms ease,
    box-shadow 190ms ease,
    border-color 190ms ease,
    background 190ms ease,
    filter 190ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-2px);
  filter: saturate(1.06) brightness(1.02);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(128deg, transparent 0%, rgba(255, 255, 255, 0.42) 19%, transparent 38%),
    linear-gradient(22deg, transparent 12%, rgba(170, 93, 134, 0.075) 38%, transparent 68%),
    linear-gradient(315deg, transparent 10%, rgba(116, 98, 180, 0.075) 45%, transparent 74%);
  filter: blur(22px) saturate(1.02);
  pointer-events: none;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1640px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--fuchsia);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
p,
dl,
dd {
  margin: 0;
}

h2 {
  font-size: 1.16rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 82px;
  padding: 0;
}

.brand-mark {
  display: block;
  width: 90px;
  height: 90px;
  object-fit: contain;
  object-position: center;
  filter:
    drop-shadow(0 18px 28px rgba(107, 60, 198, 0.2))
    drop-shadow(0 6px 16px rgba(192, 24, 120, 0.16))
    saturate(1.06);
}

.brand-wordmark {
  display: block;
  width: min(190px, 17vw);
  height: 78px;
  object-fit: contain;
  object-position: left center;
  filter:
    drop-shadow(0 12px 24px rgba(107, 60, 198, 0.16))
    drop-shadow(0 4px 12px rgba(192, 24, 120, 0.14))
    saturate(1.03);
}

.topbar-actions {
  display: grid;
  grid-template-columns:
    minmax(130px, 0.72fr)
    minmax(170px, 0.95fr)
    minmax(180px, 1fr)
    minmax(260px, 1.05fr)
    minmax(210px, 0.95fr)
    minmax(260px, 1.1fr);
  align-items: end;
  gap: 10px;
}

.station-switch,
.top-nav-action,
.user-switch {
  display: grid;
  min-width: 0;
  height: 60px;
  align-items: stretch;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.34));
  box-shadow: var(--inner-glow), var(--glass-rim-shadow), var(--glass-shadow);
  backdrop-filter: blur(30px) saturate(1.55);
  padding: 7px;
}

.top-nav-action {
  align-items: stretch;
}

.top-nav-action button {
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(253, 234, 246, 0.68));
  color: var(--fuchsia-dark);
  font-weight: 850;
  text-align: center;
  box-shadow: var(--inner-glow), 0 14px 30px rgba(107, 60, 198, 0.18), 0 0 0 4px rgba(192, 24, 120, 0.1);
}

.top-nav-action button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(253, 234, 246, 0.82));
}

.user-switch {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  position: relative;
}

.user-switch label {
  display: grid;
  min-width: 0;
  height: 100%;
}

.station-switch span,
.user-switch span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.station-switch select,
.user-switch select {
  width: 100%;
  height: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(253, 234, 246, 0.68));
  color: var(--fuchsia-dark);
  font-size: inherit;
  font-weight: 850;
  text-align: center;
  text-align-last: center;
  box-shadow: var(--inner-glow), 0 14px 30px rgba(107, 60, 198, 0.18), 0 0 0 4px rgba(192, 24, 120, 0.1);
  appearance: none;
}

.user-switch select {
  overflow: hidden;
  padding: 0 34px 0 14px;
  line-height: 1.1;
  text-overflow: ellipsis;
}

.user-switch::after {
  position: absolute;
  top: 50%;
  right: 20px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--fuchsia-dark);
  content: "";
  pointer-events: none;
  transform: translateY(-65%) rotate(45deg);
}

.station-switch select:focus,
.user-switch select:focus {
  color: var(--fuchsia-dark);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(253, 234, 246, 0.82));
}

select option {
  background: #fff9fd;
  color: var(--ink);
}

.role-switch {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  gap: 7px;
  padding: 7px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.34));
  box-shadow: var(--inner-glow), var(--glass-rim-shadow), var(--glass-shadow);
  backdrop-filter: blur(30px) saturate(1.55);
}

.role-button,
.primary-action,
.secondary-action,
.ghost-action,
.top-mobile-link {
  min-width: 0;
  overflow: hidden;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  text-overflow: ellipsis;
  font-weight: 850;
  white-space: nowrap;
}

.role-button,
.station-switch select,
.user-switch select,
.primary-action,
.secondary-action,
.ghost-action,
.top-mobile-link {
  min-height: 46px;
}

.top-mobile-link {
  display: inline-grid;
  width: 100%;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.76);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(253, 234, 246, 0.7));
  box-shadow: var(--inner-glow), 0 12px 28px rgba(87, 38, 104, 0.12);
  color: var(--fuchsia-dark);
  text-decoration: none;
}

.role-button {
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.34);
  color: var(--muted);
  box-shadow: var(--inner-glow);
}

.role-button.active {
  border-color: rgba(255, 255, 255, 0.62);
  background: linear-gradient(135deg, rgba(192, 24, 120, 0.92), rgba(107, 60, 198, 0.92));
  color: #fff;
  box-shadow: var(--inner-glow), 0 12px 28px rgba(107, 60, 198, 0.28), 0 0 0 3px rgba(192, 24, 120, 0.12);
}

.primary-action {
  border: 2px solid rgba(255, 255, 255, 0.76);
  background: linear-gradient(135deg, var(--fuchsia), var(--purple));
  color: #fff;
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(192, 24, 120, 0.18),
    0 0 0 5px rgba(255, 255, 255, 0.16),
    0 16px 36px rgba(192, 24, 120, 0.26),
    0 6px 18px rgba(107, 60, 198, 0.16);
  backdrop-filter: blur(24px) saturate(1.45);
}

.secondary-action {
  border: 2px solid rgba(255, 255, 255, 0.92);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(246, 231, 255, 0.62)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.32), transparent);
  color: var(--purple-dark);
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(107, 60, 198, 0.1),
    0 0 0 5px rgba(255, 255, 255, 0.14),
    0 14px 32px rgba(107, 60, 198, 0.14),
    0 5px 16px rgba(192, 24, 120, 0.08);
  backdrop-filter: blur(24px) saturate(1.42);
}

.ghost-action {
  border: 2px solid rgba(255, 255, 255, 0.9);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.38)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.3), transparent);
  color: #5e5067;
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(107, 60, 198, 0.08),
    0 0 0 5px rgba(255, 255, 255, 0.12),
    0 12px 28px rgba(68, 23, 88, 0.1),
    0 5px 16px rgba(192, 24, 120, 0.06);
  backdrop-filter: blur(24px) saturate(1.38);
}

.primary-action:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(255, 255, 255, 0.52),
    0 0 0 6px rgba(192, 24, 120, 0.18),
    0 22px 46px rgba(192, 24, 120, 0.32),
    0 8px 22px rgba(107, 60, 198, 0.2);
}

.secondary-action:hover:not(:disabled),
.ghost-action:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.98);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(253, 234, 246, 0.58)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.36), transparent);
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(255, 255, 255, 0.62),
    0 0 0 6px rgba(192, 24, 120, 0.12),
    0 18px 40px rgba(87, 38, 104, 0.18),
    0 7px 20px rgba(192, 24, 120, 0.1);
}

.dashboard-view,
.patient-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.dashboard-hero,
.dashboard-card,
.dashboard-patient-panel,
.group-participant-panel {
  border: 2px solid var(--glass-rim);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.34)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.42), rgba(246, 231, 255, 0.22));
  box-shadow: var(--inner-glow), var(--glass-rim-shadow), var(--glass-shadow);
  backdrop-filter: blur(34px) saturate(1.6);
  position: relative;
  overflow: hidden;
}

.dashboard-hero {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  padding: 22px 26px;
}

.dashboard-hero .eyebrow {
  margin: 0;
  font-size: clamp(1rem, 1.3vw, 1.32rem);
  letter-spacing: 0.08em;
}

.dashboard-station-badge {
  display: grid;
  min-width: 230px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(253, 234, 246, 0.5)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.32), transparent);
  box-shadow: var(--inner-glow), 0 14px 34px rgba(107, 60, 198, 0.12);
  padding: 14px;
}

.dashboard-station-badge span,
.dashboard-card-kicker {
  color: var(--fuchsia);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.dashboard-station-badge strong {
  margin-top: 4px;
  font-size: 1.35rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.dashboard-card {
  display: grid;
  min-height: 190px;
  align-content: start;
  gap: 9px;
  border-left: 7px solid rgba(107, 60, 198, 0.82);
  padding: 20px;
  color: var(--ink);
  text-align: left;
}

.dashboard-station-card {
  grid-column: 1 / -1;
  min-height: 340px;
}

.dashboard-card:not(.dashboard-station-card) {
  margin-top: 28px;
}

.dashboard-card:hover:not(:disabled) {
  border-left-color: var(--fuchsia);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(253, 234, 246, 0.62)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.42), transparent);
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(255, 255, 255, 0.72),
    0 0 0 7px rgba(192, 24, 120, 0.12),
    0 30px 70px rgba(87, 38, 104, 0.22);
}

.dashboard-card strong {
  font-size: clamp(1.2rem, 1.55vw, 1.68rem);
  line-height: 1.05;
}

.dashboard-card small {
  max-width: 34ch;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 760;
  line-height: 1.4;
}

.dashboard-station-card {
  grid-column: 1 / -1;
  cursor: default;
}

.dashboard-station-card:hover {
  transform: none;
  filter: none;
}

.dashboard-station-select-field {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.dashboard-station-select-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.dashboard-station-select-field select {
  min-height: 52px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.38)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.28), transparent);
  box-shadow: var(--inner-glow), 0 12px 28px rgba(87, 38, 104, 0.09);
  color: var(--ink);
  padding: 0 38px 0 12px;
  font-size: 0.92rem;
  font-weight: 850;
}

.dashboard-station-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.dashboard-station-option {
  position: relative;
  display: grid;
  min-height: 156px;
  align-content: space-between;
  gap: 10px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-left: 7px solid rgba(107, 60, 198, 0.7);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.36)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.34), rgba(246, 231, 255, 0.22));
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(107, 60, 198, 0.08),
    0 18px 42px rgba(87, 38, 104, 0.13);
  color: var(--purple-dark);
  overflow: hidden;
  padding: 20px;
  text-align: left;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.dashboard-station-option strong {
  position: relative;
  z-index: 1;
  font-size: clamp(1.55rem, 2.15vw, 2.2rem);
  font-weight: 950;
  line-height: 1.02;
}

.station-card-label,
.station-card-count {
  position: relative;
  z-index: 1;
}

.station-card-label {
  width: fit-content;
  border: 1px solid rgba(192, 24, 120, 0.2);
  border-radius: 999px;
  background: rgba(253, 234, 246, 0.62);
  color: var(--fuchsia-dark);
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.station-card-count {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 900;
}

.dashboard-station-option[data-station-tone="green"] {
  border-left-color: rgba(58, 154, 113, 0.78);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(238, 252, 245, 0.5)),
    linear-gradient(315deg, rgba(104, 190, 144, 0.2), transparent);
}

.dashboard-station-option[data-station-tone="blue"] {
  border-left-color: rgba(74, 135, 210, 0.82);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(236, 246, 255, 0.54)),
    linear-gradient(315deg, rgba(92, 145, 220, 0.2), transparent);
}

.dashboard-station-option[data-station-tone="pink"] {
  border-left-color: rgba(218, 92, 158, 0.82);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 239, 248, 0.58)),
    linear-gradient(315deg, rgba(218, 92, 158, 0.22), transparent);
}

.dashboard-station-option[data-station-tone="yellow"] {
  border-left-color: rgba(218, 180, 74, 0.9);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 250, 218, 0.62)),
    linear-gradient(315deg, rgba(224, 190, 82, 0.22), transparent);
}

.dashboard-station-option[data-station-tone="red"] {
  border-left-color: rgba(205, 83, 96, 0.84);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 236, 238, 0.6)),
    linear-gradient(315deg, rgba(205, 83, 96, 0.2), transparent);
}

.dashboard-station-option:hover,
.dashboard-station-option.active {
  border-color: rgba(192, 24, 120, 0.58);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(253, 234, 246, 0.74)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.42), transparent);
  color: var(--fuchsia-dark);
  transform: translateY(-2px);
  box-shadow: var(--inner-glow), 0 0 0 4px rgba(192, 24, 120, 0.12), 0 24px 54px rgba(87, 38, 104, 0.18);
}

.dashboard-station-option[data-station-tone="green"]:hover,
.dashboard-station-option[data-station-tone="green"].active {
  border-left-color: rgba(58, 154, 113, 0.96);
  color: #2f7b5d;
}

.dashboard-station-option[data-station-tone="blue"]:hover,
.dashboard-station-option[data-station-tone="blue"].active {
  border-left-color: rgba(74, 135, 210, 0.98);
  color: #356eaa;
}

.dashboard-station-option[data-station-tone="pink"]:hover,
.dashboard-station-option[data-station-tone="pink"].active {
  border-left-color: rgba(218, 92, 158, 0.98);
  color: #9c3d72;
}

.dashboard-station-option[data-station-tone="yellow"]:hover,
.dashboard-station-option[data-station-tone="yellow"].active {
  border-left-color: rgba(218, 180, 74, 1);
  color: #8a651f;
}

.dashboard-station-option[data-station-tone="red"]:hover,
.dashboard-station-option[data-station-tone="red"].active {
  border-left-color: rgba(205, 83, 96, 1);
  color: #9b3e4b;
}

.dashboard-patient-panel {
  padding: 24px;
}

.dashboard-patient-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-patient-heading h2 {
  margin-top: 4px;
  font-size: clamp(1.45rem, 2vw, 2.15rem);
}

.dashboard-patient-heading > span {
  display: inline-grid;
  min-height: 38px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.38)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.32), transparent);
  box-shadow: var(--inner-glow), 0 10px 24px rgba(107, 60, 198, 0.09);
  color: var(--fuchsia-dark);
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 900;
}

.dashboard-patient-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.dashboard-patient-item {
  position: relative;
  display: grid;
  gap: 12px;
  min-height: 198px;
  width: 100%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background:
    radial-gradient(circle at 14% 0%, rgba(253, 234, 246, 0.72), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.48)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.34), rgba(255, 255, 255, 0.2));
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(192, 24, 120, 0.08),
    0 22px 52px rgba(87, 38, 104, 0.13),
    0 8px 20px rgba(192, 24, 120, 0.06);
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 38px 20px 58px;
  text-align: left;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.dashboard-patient-item.has-photo {
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.dashboard-patient-item.has-photo small {
  grid-column: 1 / -1;
}

.dashboard-patient-photo {
  width: 104px;
  height: 104px;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(192, 24, 120, 0.1),
    0 12px 26px rgba(87, 38, 104, 0.14);
  object-fit: cover;
  object-position: center 22%;
}

.dashboard-patient-item:hover {
  border-color: rgba(255, 255, 255, 0.96);
  box-shadow:
    var(--inner-glow),
    var(--glass-rim-shadow),
    0 26px 58px rgba(87, 38, 104, 0.17);
  transform: translateY(-2px);
}

.dashboard-patient-item strong,
.dashboard-patient-item span,
.dashboard-patient-item small {
  display: block;
}

.dashboard-patient-item strong {
  margin-bottom: 5px;
  color: var(--purple-dark);
  font-size: clamp(1.18rem, 1.55vw, 1.55rem);
  font-weight: 950;
  line-height: 1.05;
}

.dashboard-patient-item span,
.dashboard-patient-item small {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 780;
  line-height: 1.35;
}

.dashboard-patient-empty {
  grid-column: 1 / -1;
}

.care-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.patient-view {
  align-items: stretch;
}

.patient-view.patient-file-open {
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 400px);
}

.patient-view.patient-progress-open {
  grid-template-columns: minmax(0, 1fr);
}

.patient-view.patient-orders-open {
  grid-template-columns: minmax(0, 1fr);
}

.patient-view.patient-medication-open {
  grid-template-columns: minmax(0, 1fr);
}

.patient-view:not(.patient-file-open) .patient-record-panel,
.patient-view.patient-file-open .patient-directory {
  display: none;
}

.patient-view.patient-progress-open .patient-record-panel,
.patient-view.patient-orders-open .patient-record-panel,
.patient-view.patient-medication-open .patient-record-panel {
  display: none;
}

.patient-directory,
.patient-file-main,
.patient-record-panel,
.workspace-header {
  border: 2px solid var(--glass-rim);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.34)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.42), rgba(246, 231, 255, 0.22));
  box-shadow: var(--inner-glow), var(--glass-rim-shadow), var(--glass-shadow);
  backdrop-filter: blur(34px) saturate(1.6);
  padding: 24px;
  overflow: hidden;
  position: relative;
}

.patient-file-main {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: calc(100vh - 176px);
}

.patient-file-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.patient-file-header h1 {
  margin: 0;
  font-size: clamp(2rem, 2.8vw, 3.15rem);
  line-height: 1;
}

.patient-file-header p:last-child {
  margin-top: 4px;
  color: var(--muted);
  font-size: 1.12rem;
  font-weight: 760;
}

.patient-file-header .ghost-action {
  flex: 0 0 auto;
  margin-left: auto;
}

.patient-view.patient-progress-open .patient-file-header {
  display: none;
}

.patient-view.patient-progress-open .patient-file-main {
  min-height: calc(100vh - 104px);
  padding-top: 14px;
}

.patient-view.patient-progress-open .progress-note-panel {
  margin-top: 0;
}

.patient-overview {
  display: grid;
  gap: 10px;
}

.patient-orders-panel,
.patient-visit-orders-panel {
  display: grid;
  gap: 12px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.42)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.24), rgba(246, 231, 255, 0.16));
  box-shadow: var(--inner-glow), 0 0 0 1px rgba(192, 24, 120, 0.08), 0 18px 46px rgba(87, 38, 104, 0.12);
  padding: 14px;
}

.patient-todo-badges {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  display: grid;
  justify-items: end;
  gap: 6px;
  max-width: min(260px, calc(100% - 24px));
}

.patient-todo-badge {
  position: relative;
  display: inline-grid;
  grid-template-columns: auto minmax(0, auto) auto;
  align-items: center;
  gap: 7px;
  width: fit-content;
  min-height: 28px;
  place-items: center;
  border-radius: 999px;
  box-shadow: var(--inner-glow), 0 12px 24px rgba(87, 38, 104, 0.16);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 950;
  padding: 4px 10px 4px 6px;
  text-transform: uppercase;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.patient-todo-badge strong {
  display: inline-grid;
  position: relative;
  width: 24px;
  min-width: 24px;
  height: 24px;
  place-items: center;
  align-items: center;
  justify-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 6px 12px rgba(87, 38, 104, 0.1);
  font-weight: 1000;
  font-size: 0.9rem;
  line-height: 1;
  margin: 0;
  padding: 0;
  text-align: center;
}

.patient-todo-badge span {
  display: inline-block;
}

.patient-todo-badge em {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 5px 12px rgba(87, 38, 104, 0.12);
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 1000;
  line-height: 1;
  padding: 0 6px;
}

.patient-todo-badge.no-icon {
  grid-template-columns: minmax(0, auto) auto;
  padding-left: 10px;
}

.patient-todo-badge.no-icon strong {
  display: none;
}

.patient-todo-badge::after {
  content: attr(data-hint);
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 260;
  width: max-content;
  max-width: min(310px, 76vw);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(253, 234, 246, 0.9)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.76), rgba(255, 255, 255, 0.48));
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(192, 24, 120, 0.14),
    0 18px 40px rgba(87, 38, 104, 0.22);
  color: var(--purple-dark);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.25;
  opacity: 0;
  padding: 10px 12px;
  pointer-events: none;
  text-transform: none;
  transform: translateY(-4px) scale(0.98);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  white-space: pre-line;
}

.patient-todo-badge:hover,
.patient-todo-badge:focus-visible {
  z-index: 240;
  border-color: rgba(192, 24, 120, 0.48);
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(192, 24, 120, 0.12),
    0 18px 36px rgba(87, 38, 104, 0.2);
  transform: translateY(-1px);
}

.patient-todo-badge:hover::after,
.patient-todo-badge:focus-visible::after {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.patient-todo-badge.doctor {
  border: 1px solid rgba(205, 83, 96, 0.32);
  background: rgba(255, 236, 238, 0.9);
  color: #9b3e4b;
}

.patient-todo-badge.visit {
  border: 1px solid rgba(192, 24, 120, 0.32);
  background:
    linear-gradient(145deg, rgba(253, 234, 246, 0.96), rgba(246, 231, 255, 0.82));
  color: var(--fuchsia-dark);
}

.patient-todo-badge.medication {
  border: 1px solid rgba(107, 60, 198, 0.28);
  background:
    linear-gradient(145deg, rgba(246, 231, 255, 0.96), rgba(255, 255, 255, 0.72));
  color: var(--purple-dark);
}

.patient-todo-badge.visit strong::before {
  content: "";
  width: 12px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(253, 234, 246, 0.22));
  box-shadow: inset 0 4px 0 rgba(192, 24, 120, 0.08);
}

.patient-todo-badge.visit strong::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  width: 8px;
  height: 4px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 4px 4px 1px 1px;
  background: rgba(255, 255, 255, 0.86);
  transform: translateX(-50%);
}

.patient-todo-badge.doctor strong {
  display: inline-grid;
  position: relative;
  place-items: center;
  align-items: center;
  justify-items: center;
  text-align: center;
  line-height: 1;
  color: transparent;
}

.patient-todo-badge.doctor strong::before {
  content: "!";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #9b3e4b;
  font-size: 0.95rem;
  font-weight: 1000;
  line-height: 1;
  transform: translateY(-0.5px);
}

.patient-calendar-status {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 3;
  display: inline-grid;
  grid-template-columns: 22px auto;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: calc(100% - 24px);
  border-radius: 999px;
  box-shadow: var(--inner-glow), 0 10px 22px rgba(87, 38, 104, 0.12);
  font-size: 0.72rem;
  font-weight: 950;
  padding: 4px 10px 4px 5px;
  text-transform: uppercase;
}

.patient-calendar-status strong {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  align-items: center;
  justify-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 5px 10px rgba(87, 38, 104, 0.1);
  line-height: 1;
  margin: 0;
}

.patient-calendar-status.sick {
  border: 1px solid rgba(205, 83, 96, 0.32);
  background: linear-gradient(145deg, rgba(255, 240, 243, 0.96), rgba(253, 220, 231, 0.76));
  color: #9b3e4b;
}

.patient-calendar-status.trial {
  border: 1px solid rgba(107, 60, 198, 0.3);
  background: linear-gradient(145deg, rgba(246, 231, 255, 0.96), rgba(234, 240, 255, 0.76));
  color: var(--purple-dark);
}

.patient-calendar-status.schoolTrial {
  border: 1px solid rgba(155, 93, 131, 0.32);
  background: linear-gradient(145deg, rgba(255, 248, 252, 0.96), rgba(248, 236, 246, 0.78));
  color: var(--fuchsia-dark);
}

.dashboard-patient-item.calendar-status-sick,
.station-patient-card.calendar-status-sick {
  border-left-color: rgba(205, 83, 96, 0.88);
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 225, 230, 0.82), transparent 38%),
    radial-gradient(circle at 92% 100%, rgba(246, 231, 255, 0.28), transparent 38%),
    linear-gradient(145deg, rgba(255, 248, 250, 0.94), rgba(255, 239, 243, 0.64)),
    linear-gradient(315deg, rgba(205, 83, 96, 0.14), rgba(255, 255, 255, 0.18));
  padding-bottom: 52px;
}

.dashboard-patient-item.calendar-status-trial,
.station-patient-card.calendar-status-trial,
.dashboard-patient-item.calendar-status-schoolTrial,
.station-patient-card.calendar-status-schoolTrial {
  border-left-color: rgba(58, 154, 113, 0.78);
  background:
    radial-gradient(circle at 16% 0%, rgba(226, 248, 238, 0.82), transparent 38%),
    radial-gradient(circle at 92% 100%, rgba(246, 231, 255, 0.28), transparent 38%),
    linear-gradient(145deg, rgba(250, 255, 252, 0.94), rgba(231, 248, 240, 0.64)),
    linear-gradient(315deg, rgba(58, 154, 113, 0.13), rgba(255, 255, 255, 0.18));
  padding-bottom: 52px;
}

.visit-order-composer,
.visit-order-card {
  display: grid;
  gap: 10px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-left: 7px solid rgba(107, 60, 198, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.24), transparent);
  box-shadow: var(--inner-glow), 0 14px 32px rgba(61, 48, 79, 0.1);
  padding: 14px;
}

.patient-orders-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 14px;
  align-items: start;
}

.patient-orders-panel.orders-readonly .patient-orders-layout {
  grid-template-columns: minmax(0, 1fr);
}

.order-card.readonly {
  border-left-color: rgba(107, 60, 198, 0.52);
}

.order-card.readonly .proposal-text {
  cursor: default;
}

.patient-orders-main,
.order-section {
  display: grid;
  gap: 12px;
}

.order-section {
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.38)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.22), transparent);
  box-shadow: var(--inner-glow), 0 12px 28px rgba(61, 48, 79, 0.08);
  padding: 12px;
}

.order-section-heading strong,
.order-section-heading span {
  display: block;
}

.order-section-heading strong {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 950;
}

.order-section-heading span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 780;
}

.visit-order-composer.compact {
  position: sticky;
  top: 18px;
}

.visit-order-composer.compact textarea,
.visit-order-composer.compact #saveVisitOrderButton {
  display: none;
}

.visit-order-composer.compact.expanded textarea,
.visit-order-composer.compact.expanded #saveVisitOrderButton {
  display: block;
}

.visit-order-composer.compact.expanded #openVisitOrderComposerButton {
  display: none;
}

.visit-order-composer strong,
.visit-order-composer span {
  display: block;
}

.visit-order-composer span,
.visit-order-meta,
.visit-order-done {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 780;
}

.visit-order-list {
  display: grid;
  gap: 10px;
}

.visit-order-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.visit-order-card.urgent {
  border-left-color: rgba(205, 83, 96, 0.84);
}

.visit-order-card.done {
  border-left-color: rgba(58, 154, 113, 0.78);
}

.visit-order-text {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.35;
}

.visit-order-response {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.patient-medication-panel {
  display: grid;
  gap: 14px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.42)),
    linear-gradient(315deg, rgba(236, 246, 255, 0.28), rgba(253, 234, 246, 0.14));
  box-shadow: var(--inner-glow), 0 0 0 1px rgba(116, 98, 180, 0.08), 0 18px 46px rgba(87, 38, 104, 0.12);
  padding: 14px;
}

.medication-section {
  display: grid;
  gap: 8px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42));
  box-shadow: var(--inner-glow), 0 12px 26px rgba(61, 48, 79, 0.08);
  padding: 10px;
}

.medication-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.medication-section-heading strong,
.medication-section-heading span {
  display: block;
}

.medication-section-heading span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
}

.medication-table-wrap {
  overflow-x: auto;
}

.medication-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.medication-table th {
  color: var(--fuchsia-dark);
  font-size: 0.78rem;
  font-weight: 950;
  padding: 0 8px;
  text-align: left;
  text-transform: uppercase;
}

.medication-table td {
  background: rgba(255, 255, 255, 0.58);
  border-bottom: 1px solid rgba(112, 86, 135, 0.12);
  border-top: 1px solid rgba(112, 86, 135, 0.12);
  padding: 7px;
}

.medication-table td:first-child {
  border-left: 1px solid rgba(112, 86, 135, 0.12);
  border-radius: 8px 0 0 8px;
}

.medication-table td:last-child {
  border-right: 1px solid rgba(112, 86, 135, 0.12);
  border-radius: 0 8px 8px 0;
}

.medication-table input[type="text"] {
  width: 100%;
}

.medication-dose-editor {
  display: grid;
  grid-template-columns: minmax(38px, 1fr) auto minmax(38px, 1fr) auto minmax(38px, 1fr);
  align-items: center;
  gap: 6px;
}

.medication-dose-editor input {
  min-width: 0;
  text-align: center;
}

.medication-dose-editor span {
  color: var(--fuchsia-dark);
  font-size: 1.05rem;
  font-weight: 950;
}

.medication-readonly-main {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
}

.medication-dose-chip {
  display: inline-grid;
  min-height: 32px;
  place-items: center;
  border: 1px solid rgba(192, 24, 120, 0.24);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(253, 234, 246, 0.72));
  box-shadow: var(--inner-glow), 0 8px 18px rgba(87, 38, 104, 0.08);
  color: var(--fuchsia-dark);
  font-weight: 950;
  padding: 0 12px;
}

.medication-readonly-note {
  color: var(--muted);
  font-weight: 820;
}

.medication-admin-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 7px;
}

.medication-admin-button {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(112, 86, 135, 0.16);
  border-radius: 999px;
  box-shadow: var(--inner-glow), 0 8px 18px rgba(87, 38, 104, 0.08);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 950;
  padding: 0 11px;
}

.medication-delete-row {
  min-height: 34px;
  width: 100%;
}

.medication-admin-button.open {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 244, 246, 0.68));
  color: #9b3e4b;
}

.medication-admin-button.confirmed {
  border-color: rgba(58, 154, 113, 0.28);
  background: linear-gradient(145deg, rgba(231, 250, 240, 0.96), rgba(203, 242, 222, 0.76));
  color: #26704f;
}

.medication-admin-placeholder {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  border: 1px solid rgba(112, 86, 135, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
  padding: 0 12px;
}

.patient-medication-panel:not(.medication-editing) .medication-table td {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.46));
}

.medication-check-cell {
  text-align: center;
}

.medication-check-cell input {
  width: 24px;
  height: 24px;
}

.medication-given-log {
  display: grid;
  gap: 6px;
  border-top: 1px solid rgba(112, 86, 135, 0.14);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 780;
  padding-top: 10px;
}

.medication-log-item {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  padding: 8px 10px;
}

.patient-overview-card {
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.34)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.36), rgba(246, 231, 255, 0.2));
  box-shadow: var(--inner-glow), 0 0 0 1px rgba(192, 24, 120, 0.08), 0 18px 46px rgba(87, 38, 104, 0.13);
  backdrop-filter: blur(28px) saturate(1.5);
  padding: 12px;
}

.patient-overview-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.patient-overview-facts div {
  min-width: 0;
  min-height: 70px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.3));
  box-shadow: var(--inner-glow), 0 10px 24px rgba(87, 38, 104, 0.08);
  padding: 11px 12px;
}

.patient-overview-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.patient-overview-facts dd {
  max-width: 100%;
  margin-top: 6px;
  color: var(--purple-dark);
  font-size: clamp(1rem, 1.15vw, 1.18rem);
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.daily-medication-card {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.daily-medication-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.daily-medication-heading strong,
.daily-medication-heading span {
  display: block;
}

.daily-medication-heading strong {
  color: var(--purple-dark);
  font-size: 1.08rem;
  font-weight: 950;
}

.daily-medication-heading span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 820;
}

.daily-medication-list {
  display: grid;
  gap: 8px;
}

.daily-medication-item {
  display: grid;
  grid-template-columns: minmax(190px, 0.85fr) minmax(0, 1.65fr);
  align-items: center;
  gap: 10px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.38)),
    linear-gradient(315deg, rgba(236, 246, 255, 0.22), rgba(253, 234, 246, 0.12));
  box-shadow: var(--inner-glow), 0 10px 24px rgba(87, 38, 104, 0.08);
  padding: 9px;
}

.daily-medication-prn {
  border-left: 6px solid rgba(107, 60, 198, 0.5);
}

.daily-medication-main {
  min-width: 0;
}

.daily-medication-main strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.daily-medication-main span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
  line-height: 1.25;
}

.daily-medication-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 7px;
}

.daily-medication-slot {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.daily-medication-slot.active {
  border: 1px solid rgba(112, 86, 135, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.2), rgba(236, 246, 255, 0.18));
  box-shadow: var(--inner-glow), 0 8px 18px rgba(87, 38, 104, 0.08);
  padding: 7px;
}

.daily-medication-slot-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 20px;
}

.daily-medication-slot-label span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 920;
  text-transform: uppercase;
}

.daily-medication-slot-label strong {
  display: inline-grid;
  min-width: 30px;
  min-height: 30px;
  place-items: center;
  border: 1px solid rgba(192, 24, 120, 0.22);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(253, 234, 246, 0.72));
  box-shadow: var(--inner-glow), 0 8px 16px rgba(87, 38, 104, 0.08);
  color: var(--fuchsia-dark);
  font-size: 0.9rem;
  font-weight: 980;
}

.daily-medication-slot-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}

.daily-medication-prn-actions {
  display: grid;
  gap: 5px;
}

.daily-medication-slot.inactive {
  min-height: 58px;
  place-items: center;
  border: 1px solid rgba(112, 86, 135, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.28);
  color: rgba(78, 64, 92, 0.48);
  font-size: 0.78rem;
  font-weight: 850;
}

.daily-medication-slot.inactive em {
  font-style: normal;
}

.daily-medication-give,
.daily-medication-miss {
  width: 100%;
  min-height: 36px;
  border-radius: 999px;
  box-shadow: var(--inner-glow), 0 8px 18px rgba(87, 38, 104, 0.08);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 950;
  padding: 0 9px;
}

.daily-medication-give.compact {
  min-height: 30px;
  padding-inline: 10px;
}

.daily-medication-give.open {
  border: 1px solid rgba(112, 86, 135, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(248, 244, 252, 0.78)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.32), rgba(253, 234, 246, 0.18));
  color: var(--purple-dark);
}

.daily-medication-give.open:hover,
.daily-medication-miss:not(:disabled):hover {
  border-color: rgba(192, 24, 120, 0.36);
  transform: translateY(-1px);
}

.daily-medication-give.given,
.medication-admin-button.given {
  border-color: rgba(58, 154, 113, 0.28);
  background: linear-gradient(145deg, rgba(231, 250, 240, 0.96), rgba(203, 242, 222, 0.76));
  color: #26704f;
}

.daily-medication-give.missed,
.medication-admin-button.missed {
  border-color: rgba(192, 24, 120, 0.28);
  background: linear-gradient(145deg, rgba(255, 236, 243, 0.96), rgba(253, 211, 232, 0.74));
  color: #9b2d68;
}

.daily-medication-miss {
  border: 1px solid rgba(192, 24, 120, 0.18);
  background: rgba(255, 255, 255, 0.58);
  color: var(--fuchsia-dark);
}

.daily-prn-give {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(107, 60, 198, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(246, 231, 255, 0.74)),
    linear-gradient(315deg, rgba(236, 246, 255, 0.28), rgba(253, 234, 246, 0.16));
  box-shadow: var(--inner-glow), 0 8px 18px rgba(87, 38, 104, 0.08);
  color: var(--purple-dark);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 950;
  padding: 0 11px;
}

.daily-prn-give:hover {
  border-color: rgba(107, 60, 198, 0.4);
  transform: translateY(-1px);
}

.daily-prn-give.max-reached,
.daily-prn-give.max-reached:hover {
  border-color: rgba(192, 24, 120, 0.28);
  background:
    linear-gradient(145deg, rgba(255, 241, 247, 0.96), rgba(250, 217, 235, 0.78)),
    linear-gradient(315deg, rgba(255, 255, 255, 0.34), rgba(192, 24, 120, 0.08));
  color: #9b2d68;
  cursor: not-allowed;
  transform: none;
}

.medication-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(96px, 1fr));
  gap: 6px;
  min-width: 760px;
}

.medication-week-grid.no-schema {
  grid-template-columns: 1fr;
  min-width: 220px;
}

.medication-week-day {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(112, 86, 135, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.38));
  box-shadow: var(--inner-glow), 0 8px 18px rgba(87, 38, 104, 0.06);
  padding: 7px;
}

.medication-week-day > strong {
  color: var(--purple-dark);
  font-size: 0.76rem;
  font-weight: 950;
}

.medication-week-day > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 820;
}

.medication-week-doses {
  display: grid;
  gap: 4px;
}

.medication-week-dose {
  display: block;
  border: 1px solid rgba(112, 86, 135, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  overflow: hidden;
  padding: 4px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.medication-week-dose.given {
  border-color: rgba(58, 154, 113, 0.26);
  background: linear-gradient(145deg, rgba(231, 250, 240, 0.96), rgba(203, 242, 222, 0.72));
  color: #26704f;
}

.medication-week-dose.missed {
  border-color: rgba(192, 24, 120, 0.28);
  background: linear-gradient(145deg, rgba(255, 236, 243, 0.96), rgba(253, 211, 232, 0.72));
  color: #9b2d68;
}

.medication-prn-given-summary {
  display: grid;
  gap: 8px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-left: 6px solid rgba(107, 60, 198, 0.5);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.42)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.28), rgba(236, 246, 255, 0.14));
  box-shadow: var(--inner-glow), 0 12px 26px rgba(61, 48, 79, 0.08);
  padding: 10px;
}

.medication-prn-given-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.medication-prn-given-heading strong,
.medication-prn-given-heading span {
  display: block;
}

.medication-prn-given-heading strong {
  color: var(--purple-dark);
  font-size: 0.95rem;
  font-weight: 950;
}

.medication-prn-given-heading span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
}

.medication-prn-given-list {
  display: grid;
  gap: 6px;
}

.medication-prn-given-item {
  display: grid;
  grid-template-columns: minmax(120px, 0.75fr) minmax(0, 1fr) minmax(180px, 0.85fr);
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(112, 86, 135, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  padding: 8px 10px;
}

.medication-prn-given-item strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
}

.medication-prn-given-item span,
.medication-prn-given-item small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 820;
}

.daily-medication-signature {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-medication-signature.max-reached {
  color: #9b2d68;
  font-weight: 950;
}

.daily-medication-give:disabled,
.daily-medication-miss:disabled {
  cursor: default;
}

.daily-medication-empty {
  margin: 0;
  border: 1px dashed rgba(112, 86, 135, 0.22);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 820;
  padding: 12px;
}

.medication-missed-modal {
  max-width: min(980px, calc(100vw - 32px));
}

.medication-missed-modal .patient-modal-grid {
  grid-template-columns: 1fr;
}

.medication-missed-reason-field {
  display: grid;
  gap: 9px;
}

.medication-missed-reason-field > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 920;
  text-transform: uppercase;
}

.medication-missed-reasons {
  display: grid;
  grid-template-columns: repeat(5, minmax(128px, 1fr));
  gap: 10px;
}

.medication-missed-reasons button {
  min-height: 58px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 253, 0.72)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.3), rgba(246, 231, 255, 0.18));
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(112, 86, 135, 0.09),
    0 10px 26px rgba(61, 48, 79, 0.1);
  color: var(--purple-dark);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 920;
  line-height: 1.15;
  padding: 8px 12px;
  text-align: center;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.medication-missed-reasons button:hover,
.medication-missed-reasons button.active {
  border-color: rgba(192, 24, 120, 0.42);
  background:
    linear-gradient(145deg, rgba(253, 234, 246, 0.96), rgba(246, 231, 255, 0.78)),
    rgba(255, 255, 255, 0.8);
  color: var(--fuchsia-dark);
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(192, 24, 120, 0.1),
    0 14px 32px rgba(87, 38, 104, 0.14);
  transform: translateY(-1px);
}

.patient-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
}

.patient-action-grid button {
  min-height: 86px;
  font-size: 1.08rem;
}

.patient-admin-menu {
  position: relative;
  z-index: 120;
}

.patient-admin-menu summary {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.36)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.3), transparent);
  box-shadow: var(--inner-glow), 0 0 0 1px rgba(107, 60, 198, 0.08), 0 12px 28px rgba(68, 23, 88, 0.1);
  color: var(--purple-dark);
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 900;
  list-style: none;
}

.patient-admin-menu summary::-webkit-details-marker {
  display: none;
}

.patient-admin-menu[open] summary {
  border-color: rgba(192, 24, 120, 0.58);
  color: var(--fuchsia-dark);
  box-shadow: var(--inner-glow), 0 0 0 4px rgba(192, 24, 120, 0.12), 0 16px 36px rgba(87, 38, 104, 0.14);
}

.patient-admin-menu[open] {
  z-index: 380;
}

.burger-lines,
.burger-lines::before,
.burger-lines::after {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.burger-lines {
  position: relative;
}

.burger-lines::before,
.burger-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.burger-lines::before {
  top: -7px;
}

.burger-lines::after {
  top: 7px;
}

.patient-admin-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  bottom: auto;
  z-index: 390;
  display: grid;
  width: min(310px, calc(100vw - 48px));
  max-height: min(300px, calc(100vh - 430px));
  overflow-y: auto;
  overscroll-behavior: contain;
  gap: 6px;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(255, 239, 249, 0.94)),
    linear-gradient(135deg, rgba(255, 45, 158, 0.16), rgba(107, 60, 198, 0.12));
  box-shadow: var(--inner-glow), 0 18px 42px rgba(87, 38, 104, 0.22);
  padding: 9px;
}

.patient-admin-menu-list .ghost-action {
  min-height: 40px;
  justify-content: flex-start;
  font-size: 0.9rem;
}

.progress-note-panel {
  position: relative;
  margin-top: 10px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.28)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.34), rgba(246, 231, 255, 0.2));
  box-shadow: var(--inner-glow), var(--glass-rim-shadow), 0 20px 52px rgba(87, 38, 104, 0.14);
  backdrop-filter: blur(28px) saturate(1.48);
  padding: 16px;
}

.progress-note-panel.progress-composer-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  background:
    linear-gradient(145deg, rgba(255, 239, 249, 0.5), rgba(246, 231, 255, 0.38)),
    rgba(42, 21, 56, 0.18);
  backdrop-filter: blur(18px) saturate(1.18);
}

.patient-progress-primary .progress-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  padding: 0 0 12px;
}

.progress-title-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.patient-progress-primary .progress-title-bar h2 {
  margin: 0;
  color: var(--purple-dark);
  font-size: clamp(1.35rem, 1.7vw, 1.85rem);
}

.patient-progress-primary .progress-title-bar p {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 820;
}

.progress-note-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 10px;
  margin-bottom: 0;
}

.progress-composer-tools {
  display: grid;
  grid-template-columns: minmax(170px, 220px);
  gap: 10px;
  align-items: end;
  margin: 10px 0;
}

.progress-filter-menu {
  position: relative;
  width: fit-content;
}

.progress-filter-menu summary {
  display: grid;
  min-height: 44px;
  align-items: center;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.38)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.3), transparent);
  box-shadow: var(--inner-glow), 0 0 0 1px rgba(107, 60, 198, 0.08), 0 12px 28px rgba(68, 23, 88, 0.1);
  color: var(--purple-dark);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 900;
  list-style: none;
  padding: 0 16px;
}

.progress-filter-menu summary::-webkit-details-marker {
  display: none;
}

.progress-filter-menu[open] summary {
  border-color: rgba(192, 24, 120, 0.52);
  color: var(--fuchsia-dark);
}

.progress-filter-menu .progress-source-toggles {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 25;
  display: grid;
  width: min(330px, calc(100vw - 48px));
  gap: 8px;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(255, 239, 249, 0.94)),
    linear-gradient(135deg, rgba(255, 45, 158, 0.16), rgba(107, 60, 198, 0.12));
  box-shadow: var(--inner-glow), 0 18px 42px rgba(87, 38, 104, 0.22);
  padding: 10px;
}

.progress-source-toggles {
  grid-template-columns: repeat(auto-fit, minmax(190px, max-content));
  align-items: center;
  margin: 10px 0;
}

.progress-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  min-height: 42px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.38)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.3), transparent);
  box-shadow: var(--inner-glow), 0 0 0 1px rgba(107, 60, 198, 0.08), 0 12px 28px rgba(68, 23, 88, 0.1);
  padding: 0 12px;
  color: var(--purple-dark);
  font-size: 0.88rem;
  font-weight: 850;
}

.progress-toggle input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--fuchsia);
  box-shadow: none;
}

.progress-toggle.future-toggle {
  opacity: 0.56;
}

.progress-toggle span {
  margin: 0;
  color: var(--purple-dark);
  font-size: 0.88rem;
}

.progress-note-panel textarea {
  min-height: 180px;
  line-height: 1.45;
}

.patient-progress-primary {
  display: grid;
  margin-top: 0;
  min-height: 0;
}

.patient-progress-primary textarea {
  min-height: clamp(240px, 34vh, 430px);
  font-size: 1.06rem;
}

.progress-composer {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 41;
  width: min(1160px, calc(100vw - 40px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  transform: translateX(-50%);
  margin-top: 0;
  border: 3px solid rgba(255, 255, 255, 0.94);
  border-left: 7px solid rgba(192, 24, 120, 0.62);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 246, 252, 0.78)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.4), rgba(246, 231, 255, 0.28));
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(192, 24, 120, 0.12),
    0 28px 80px rgba(87, 38, 104, 0.28);
  padding: 22px;
}

.progress-history-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 8px;
  color: var(--purple-dark);
}

.progress-history-heading span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
}

.progress-date-field,
.progress-time-field {
  display: grid;
  gap: 6px;
  max-width: 220px;
  margin: 10px 0;
}

.progress-entry-meta {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(150px, 190px);
  gap: 10px;
  align-items: end;
  margin: 10px 0 0;
}

.progress-composer textarea,
.progress-entry-meta input {
  border: 3px solid rgba(255, 255, 255, 0.96);
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(192, 24, 120, 0.12),
    0 12px 30px rgba(87, 38, 104, 0.12);
}

.progress-composer textarea:focus,
.progress-entry-meta input:focus {
  border-color: rgba(192, 24, 120, 0.82);
  box-shadow:
    var(--inner-glow),
    0 0 0 4px rgba(255, 255, 255, 0.72),
    0 0 0 7px rgba(192, 24, 120, 0.16),
    0 16px 36px rgba(107, 60, 198, 0.16);
}

.progress-feature-field {
  display: grid;
  gap: 6px;
  margin: 10px 0;
}

.progress-feature-field select,
.intensive-feature-field select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.progress-date-field span,
.progress-time-field span,
.progress-feature-field > span,
.intensive-feature-field > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.large-group-documentation {
  display: grid;
  gap: 10px;
}

.large-group-documentation span {
  color: var(--purple-dark);
  font-size: 0.9rem;
  font-weight: 900;
}

.progress-history {
  display: grid;
  min-height: clamp(480px, 62vh, 760px);
  max-height: calc(100vh - 218px);
  overflow: auto;
  gap: 0;
  margin-top: 0;
  border: 2px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.42)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.16), rgba(253, 234, 246, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 10px 26px rgba(87, 38, 104, 0.07);
  padding: 0 16px;
}

.progress-history-empty,
.progress-history-item {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.progress-history-empty {
  color: var(--muted);
  font-size: 0.88rem;
}

.progress-history-item.draft {
  justify-self: stretch;
  background: transparent;
}

.progress-history-item.role-doctor .progress-history-bubble {
  --role-color: var(--purple-dark);
}

.progress-history-item.role-doctor .progress-history-author span {
  border-color: rgba(107, 60, 198, 0.24);
  background: rgba(246, 231, 255, 0.74);
  color: var(--purple-dark);
}

.progress-history-item.role-ped .progress-history-bubble {
  --role-color: var(--fuchsia-dark);
}

.progress-history-item.role-care .progress-history-bubble {
  --role-color: var(--purple-dark);
}

.progress-history-item.role-care .progress-history-author span {
  border-color: rgba(107, 60, 198, 0.22);
  background: rgba(246, 231, 255, 0.74);
  color: var(--purple-dark);
}

.progress-history-item.role-other .progress-history-bubble {
  --role-color: var(--muted);
}

.progress-history-item.role-other .progress-history-author span {
  border-color: rgba(126, 92, 150, 0.2);
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
}

.progress-history-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-bottom: 5px;
  padding: 0;
}

.progress-history-author {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.progress-history-author strong {
  color: var(--purple-dark);
  font-size: 0.95rem;
  letter-spacing: 0;
  border-bottom: 2px solid rgba(192, 24, 120, 0.2);
  padding-bottom: 2px;
}

.progress-history-author span {
  display: inline-grid;
  min-height: 22px;
  place-items: center;
  border: 1px solid rgba(192, 24, 120, 0.24);
  border-radius: 999px;
  background: rgba(253, 234, 246, 0.72);
  color: var(--fuchsia-dark);
  padding: 0 7px;
  font-size: 0.68rem;
  font-weight: 950;
}

.progress-history-time {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 820;
}

.progress-history-bubble {
  --role-color: var(--fuchsia-dark);
  position: relative;
  width: 100%;
  border: 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  padding: 13px 0 15px;
}

.progress-history-bubble::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -2px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: rgba(107, 60, 198, 0.38);
  box-shadow: 0 1px 8px rgba(107, 60, 198, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

.progress-history-item:last-child .progress-history-bubble {
  border-bottom: 0;
}

.progress-history-item:last-child .progress-history-bubble::after {
  display: none;
}

.progress-history-bubble::before {
  display: none;
}

.progress-history-item.role-doctor .progress-history-bubble::before {
  display: none;
}

.progress-history-item.role-other .progress-history-bubble::before {
  display: none;
}

.progress-history-bubble p {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.48;
  white-space: pre-wrap;
}

.progress-care-detail {
  display: grid;
  gap: 12px;
}

.progress-care-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding-bottom: 11px;
  border-bottom: 2px solid rgba(116, 98, 180, 0.2);
}

.progress-care-summary strong {
  color: var(--purple-dark);
  font-size: 0.96rem;
  font-weight: 950;
}

.progress-care-summary span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
}

.progress-care-observations {
  display: grid;
  gap: 0;
}

.progress-care-observation {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  border-top: 1px solid rgba(116, 98, 180, 0.14);
  padding: 10px 0;
}

.progress-care-observation > strong {
  color: var(--fuchsia-dark);
  font-size: 0.9rem;
  font-weight: 950;
  white-space: nowrap;
}

.progress-care-observation > span {
  display: inline-block;
  color: var(--purple-dark);
  font-size: 0.9rem;
  font-weight: 900;
  white-space: nowrap;
}

.progress-care-observation p,
.progress-care-empty {
  margin: 0;
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.46;
}

.progress-generated-block {
  margin-top: 12px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.32)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.28), transparent);
  box-shadow: var(--inner-glow), 0 12px 32px rgba(87, 38, 104, 0.1);
  padding: 12px;
}

.progress-generated-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.progress-generated-heading span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.progress-generated-text {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.progress-generated-controls {
  margin-top: 8px;
}

.progress-entry-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.progress-actions {
  margin-top: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.intensive-feature-field {
  display: block;
  margin-bottom: 16px;
}

.intensive-feature-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.intensive-feature-choice {
  position: relative;
  display: grid;
  min-height: 62px;
  align-content: center;
  padding: 13px 14px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.4)),
    linear-gradient(135deg, rgba(255, 45, 158, 0.08), rgba(107, 60, 198, 0.1));
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(107, 60, 198, 0.1),
    0 13px 30px rgba(87, 38, 104, 0.11);
  color: var(--purple-dark);
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.intensive-feature-choice:hover,
.intensive-feature-choice:focus-visible {
  z-index: 30;
}

.intensive-feature-choice::after {
  content: attr(data-hint);
  position: fixed;
  top: 74px;
  right: auto;
  bottom: auto;
  left: 50%;
  z-index: 9999;
  width: min(920px, calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  max-height: min(42vh, 360px);
  overflow: auto;
  padding: 18px 20px;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 239, 249, 0.96)),
    linear-gradient(135deg, rgba(255, 45, 158, 0.2), rgba(107, 60, 198, 0.18));
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(255, 45, 158, 0.16),
    0 20px 44px rgba(87, 38, 104, 0.28);
  backdrop-filter: blur(18px) saturate(1.25);
  color: var(--purple-dark);
  font-size: 0.94rem;
  font-weight: 850;
  line-height: 1.42;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  white-space: normal;
  transform: translate(-50%, 0);
  transition: opacity 0.12s ease;
  will-change: opacity;
}

.intensive-feature-choice:hover::after,
.intensive-feature-choice:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.intensive-feature-choice:hover {
  transform: none;
  border-color: rgba(255, 45, 158, 0.46);
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(255, 45, 158, 0.18),
    0 18px 36px rgba(142, 58, 176, 0.18);
}

.intensive-feature-choice.active {
  border-color: rgba(255, 45, 158, 0.82);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(255, 233, 248, 0.54)),
    linear-gradient(135deg, rgba(255, 45, 158, 0.24), rgba(107, 60, 198, 0.18));
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(255, 45, 158, 0.24),
    0 20px 42px rgba(142, 58, 176, 0.22);
}

.intensive-feature-choice strong {
  color: var(--purple-dark);
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1.16;
}

.intensive-feature-choice span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.progress-feature-choices {
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.progress-feature-choices .intensive-feature-choice {
  min-height: 58px;
  padding: 11px 12px;
}

.progress-feature-choices .intensive-feature-choice::after {
  content: attr(data-hint);
  display: block;
}

.intensive-feature-choice::after {
  content: none !important;
  display: none !important;
}

.intensive-feature-overlay {
  position: fixed;
  top: var(--tooltip-top, 72px);
  left: var(--tooltip-left, 14px);
  z-index: 30000;
  display: grid;
  box-sizing: border-box;
  width: min(560px, calc(100vw - 28px));
  max-height: min(36vh, 300px);
  gap: 7px;
  overflow: auto;
  padding: 16px 18px 17px;
  border: 2px solid rgba(255, 255, 255, 0.98);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.98), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 244, 251, 0.88)),
    linear-gradient(135deg, rgba(255, 45, 158, 0.16), rgba(107, 60, 198, 0.14));
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(255, 45, 158, 0.12),
    0 16px 36px rgba(61, 48, 79, 0.22),
    0 2px 10px rgba(255, 45, 158, 0.08);
  backdrop-filter: blur(24px) saturate(1.22);
  color: var(--purple-dark);
  pointer-events: none;
  text-align: left;
  transform: none;
  animation: tooltipFloatIn 0.12s ease-out;
  isolation: isolate;
}

.intensive-feature-overlay.hidden {
  display: none;
}

.intensive-feature-overlay::before {
  content: "";
  position: fixed;
  left: calc(var(--tooltip-left, 14px) + var(--tooltip-arrow-left, 48px) - 9px);
  width: 18px;
  height: 18px;
  border: inherit;
  border-right: 0;
  border-bottom: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 244, 251, 0.88)),
    linear-gradient(135deg, rgba(255, 45, 158, 0.16), rgba(107, 60, 198, 0.14));
  box-shadow: -2px -2px 8px rgba(255, 255, 255, 0.72);
  transform: rotate(45deg);
  z-index: -1;
}

.intensive-feature-overlay[data-placement="below"]::before {
  top: calc(var(--tooltip-top, 72px) - 8px);
}

.intensive-feature-overlay[data-placement="above"]::before {
  top: calc(var(--tooltip-top, 72px) + var(--tooltip-height, 0px) - 10px);
  transform: rotate(225deg);
}

.intensive-feature-overlay strong {
  color: var(--purple);
  font-size: 0.9rem;
  font-weight: 900;
}

.intensive-feature-overlay span {
  color: var(--ink);
  font-size: 0.89rem;
  font-weight: 780;
  line-height: 1.45;
  overflow-wrap: anywhere;
  hyphens: auto;
}

@keyframes tooltipFloatIn {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dashboard-hero::before,
.dashboard-card::before,
.dashboard-patient-panel::before,
.group-participant-panel::before,
.patient-directory::before,
.patient-file-main::before,
.patient-record-panel::before,
.workspace-header::before,
.time-panel::before,
.documentation-panel::before,
.summary-card::before,
.orders-panel::before,
.vision-panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 7px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.46), transparent 28%),
    linear-gradient(245deg, transparent 56%, rgba(253, 234, 246, 0.34));
  opacity: 0.72;
  pointer-events: none;
}

.dashboard-hero > *,
.dashboard-card > *,
.dashboard-patient-panel > *,
.group-participant-panel > *,
.patient-directory > *,
.patient-file-main > *,
.patient-record-panel > *,
.workspace-header > *,
.time-panel > *,
.documentation-panel > *,
.summary-card > *,
.orders-panel > *,
.vision-panel > * {
  position: relative;
  z-index: 1;
}

.patient-directory {
  display: flex;
  min-height: calc(100vh - 176px);
  flex-direction: column;
}

.patient-view .patient-directory {
  height: 100%;
}

.patient-directory-header,
.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.patient-directory-header {
  margin-bottom: 22px;
}

.patient-view:not(.patient-file-open) .patient-directory-header h2 {
  font-size: clamp(2.35rem, 3.45vw, 3.9rem);
  line-height: 1;
}

.patient-directory-header p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.patient-search-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 20px;
}

.patient-search-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
  margin-bottom: 12px;
}

.archive-filter-pill {
  min-height: 34px;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 920;
}

.archive-filter-pill.active {
  border-color: rgba(192, 24, 120, 0.36);
  background:
    linear-gradient(145deg, rgba(253, 234, 246, 0.92), rgba(246, 231, 255, 0.72)),
    rgba(255, 255, 255, 0.72);
  color: var(--fuchsia-dark);
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(192, 24, 120, 0.08),
    0 12px 28px rgba(87, 38, 104, 0.12);
}

.patient-record-panel {
  position: sticky;
  top: 24px;
  min-height: calc(100vh - 176px);
}

.workspace-header {
  grid-column: 1 / -1;
}

.care-view .workspace-header {
  min-height: auto;
  padding: 16px 18px;
}

.care-view .workspace-header h2 {
  font-size: clamp(1.35rem, 1.8vw, 2rem);
  line-height: 1.05;
}

.care-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.care-column {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.care-column .time-panel {
  order: 1;
}

.care-column .measure-panel {
  order: 2;
}

.care-column .documentation-panel {
  order: 3;
}

.measure-panel,
.time-panel,
.documentation-panel,
.summary-card,
.orders-panel,
.vision-panel {
  border: 2px solid var(--glass-rim);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.34)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.38), rgba(246, 231, 255, 0.18));
  box-shadow: var(--inner-glow), var(--glass-rim-shadow), var(--glass-shadow);
  backdrop-filter: blur(34px) saturate(1.58);
  overflow: hidden;
  position: relative;
}

.measure-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.measure-panel,
.time-panel,
.documentation-panel {
  padding: 24px;
}

.documentation-panel {
  overflow: visible;
}

.documentation-panel .intensive-feature-choice::after {
  position: fixed;
  top: 74px;
  right: auto;
  bottom: auto;
  left: 50%;
  z-index: 9999;
  width: min(920px, calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  max-height: min(42vh, 360px);
  overflow: auto;
  transform: translate(-50%, 0);
}

.documentation-panel .intensive-feature-choice:hover::after,
.documentation-panel .intensive-feature-choice:focus-visible::after {
  transform: translate(-50%, 0);
}

.measure-panel {
  padding: 0;
}

.summary-panel {
  display: none;
}

.summary-card {
  padding: 24px;
}

.panel-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.panel-heading p {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.measure-heading-simple {
  margin-bottom: 12px;
}

.measure-heading-simple h2 {
  margin: 0;
  font-size: clamp(1.2rem, 1.45vw, 1.55rem);
}

.measure-heading-simple p {
  margin-top: 3px;
}

.care-view .measure-heading-simple,
.care-view .measure-buttons {
  display: none;
}

.care-view .measure-panel {
  display: none;
}

.step {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--fuchsia-dark), var(--purple-dark));
  color: #fff;
  font-weight: 900;
  box-shadow: var(--inner-glow), 0 10px 24px rgba(107, 60, 198, 0.24);
}

.measure-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.measure-buttons.locked {
  grid-template-columns: 1fr;
}

.group-participant-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
}

.documentation-panel .group-participant-panel {
  margin: 0 0 16px;
  border: 0;
  border-bottom: 1px solid rgba(112, 86, 135, 0.16);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 0 16px;
}

.group-participant-panel.hidden {
  display: none;
}

.group-participant-panel strong,
.group-participant-panel span {
  display: block;
}

.group-participant-panel span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 760;
}

.group-participant-tabs {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 10px;
}

.group-participant-tab {
  min-width: 190px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.34)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.3), transparent);
  box-shadow: var(--inner-glow), 0 12px 28px rgba(87, 38, 104, 0.1);
  color: var(--ink);
  padding: 12px;
  text-align: left;
}

.group-participant-tab.active {
  border-color: rgba(192, 24, 120, 0.58);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(253, 234, 246, 0.72)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.36), transparent);
  box-shadow: var(--inner-glow), 0 0 0 5px rgba(192, 24, 120, 0.16), 0 18px 42px rgba(192, 24, 120, 0.16);
}

.group-participant-tab span {
  color: var(--muted);
  font-size: 0.78rem;
}

.measure-card {
  min-height: 132px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-left: 7px solid rgba(107, 60, 198, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.34)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.38), transparent);
  box-shadow: var(--inner-glow), 0 0 0 1px rgba(107, 60, 198, 0.1), 0 18px 42px rgba(87, 38, 104, 0.14), 0 6px 18px rgba(192, 24, 120, 0.08);
  backdrop-filter: blur(24px) saturate(1.42);
  padding: 18px;
  text-align: left;
}

.measure-card.active {
  border-color: var(--fuchsia);
  border-left-color: var(--fuchsia);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(253, 234, 246, 0.76));
  box-shadow: var(--inner-glow), 0 0 0 2px rgba(255, 255, 255, 0.82), 0 0 0 5px rgba(192, 24, 120, 0.18), 0 18px 46px rgba(192, 24, 120, 0.2);
  outline: 1px solid rgba(255, 255, 255, 0.8);
}

.measure-card:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.98);
  border-left-color: var(--fuchsia);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(253, 234, 246, 0.62)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.42), transparent);
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(255, 255, 255, 0.62),
    0 0 0 6px rgba(192, 24, 120, 0.12),
    0 22px 50px rgba(87, 38, 104, 0.2),
    0 8px 22px rgba(192, 24, 120, 0.12);
}

.measure-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.measure-card span,
.patient-box span,
.time-grid span,
.observation-state,
dt,
.vision-grid span {
  color: var(--muted);
  font-size: 0.86rem;
}

.patient-box,
.time-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.patient-box {
  display: none;
  margin-top: 14px;
}

.group-size {
  grid-column: 1 / -1;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.date-picker-row {
  position: relative;
  display: block;
}

.date-picker-row input[type="text"] {
  min-width: 0;
}

.calendar-native-input {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1px;
  min-height: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.archive-search-field span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

input,
select,
textarea {
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.48));
  box-shadow: var(--inner-glow), 0 0 0 1px rgba(107, 60, 198, 0.07), 0 10px 26px rgba(68, 23, 88, 0.09);
  backdrop-filter: blur(16px) saturate(1.22);
  color: var(--ink);
  outline: none;
}

input {
  min-height: 50px;
  padding: 0 14px;
}

select {
  min-height: 50px;
  padding: 0 38px 0 14px;
}

textarea {
  min-height: 112px;
  padding: 14px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--fuchsia);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(253, 234, 246, 0.58));
  box-shadow: var(--inner-glow), 0 0 0 4px rgba(192, 24, 120, 0.16), 0 14px 34px rgba(107, 60, 198, 0.13);
}

.calculation-card {
  display: grid;
  min-height: 86px;
  align-content: center;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(251, 244, 255, 0.58)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.36), transparent);
  box-shadow: var(--inner-glow), 0 0 0 1px rgba(192, 24, 120, 0.08), 0 14px 30px rgba(107, 60, 198, 0.1);
  padding: 16px;
}

.calculation-card strong {
  font-size: 1.2rem;
}

.duration-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.minutes-pill {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(246, 231, 255, 0.86), rgba(255, 255, 255, 0.52)),
    linear-gradient(315deg, rgba(107, 60, 198, 0.14), transparent);
  box-shadow: var(--inner-glow), 0 8px 18px rgba(107, 60, 198, 0.1);
  color: var(--purple-dark);
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 950;
}

.calculation-card.invalid {
  border-color: #d78ba8;
  background: #fff0f6;
}

.observation-list {
  display: grid;
  gap: 14px;
}

.observation-card {
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.38));
  box-shadow: var(--inner-glow), 0 0 0 1px rgba(107, 60, 198, 0.08), 0 16px 38px rgba(87, 38, 104, 0.12);
  backdrop-filter: blur(24px) saturate(1.42);
  padding: 18px;
}

.observation-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.observation-time {
  display: block;
  margin-bottom: 3px;
  color: var(--purple);
  font-size: 0.82rem;
  font-weight: 900;
}

.observation-state.done {
  color: var(--fuchsia-dark);
  font-weight: 900;
}

.suggestion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.summary-card > h2 {
  margin-bottom: 16px;
}

.status-ring {
  display: grid;
  width: 156px;
  height: 156px;
  place-items: center;
  align-content: center;
  margin: 0 auto 18px;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.82) 0 56%, transparent 57%),
    conic-gradient(var(--fuchsia) var(--completion, 0%), rgba(255, 255, 255, 0.58) 0);
  box-shadow: var(--inner-glow), 0 16px 42px rgba(107, 60, 198, 0.16);
  text-align: center;
}

.status-ring.complete {
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.86) 0 50%, transparent 51%),
    conic-gradient(var(--fuchsia) 100%, var(--fuchsia) 0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -18px 36px rgba(107, 60, 198, 0.22),
    0 22px 54px rgba(192, 24, 120, 0.26);
}

.status-ring strong {
  font-size: 2rem;
}

.status-ring span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

dl {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

dd {
  font-weight: 850;
  text-align: right;
}

.export-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.action-stack {
  display: grid;
  gap: 8px;
}

.care-complete-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.care-complete-actions .primary-action {
  min-width: min(260px, 100%);
}

.archive-section {
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.archive-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.patient-record-panel > .archive-heading {
  display: none;
}

.archive-heading span {
  border-radius: 999px;
  background: rgba(246, 231, 255, 0.72);
  color: var(--purple-dark);
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: var(--inner-glow);
}

.archive-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.archive-controls .secondary-action,
.archive-controls .ghost-action,
.action-stack .primary-action,
.action-stack .secondary-action,
.action-stack .ghost-action {
  min-height: 50px;
  justify-content: center;
  letter-spacing: 0;
}

.archive-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.archive-search {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.archive-search input {
  min-height: 50px;
}

.patient-list {
  display: grid;
  max-height: 420px;
  overflow: auto;
  gap: 12px;
}

.patient-list.station-patient-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  max-height: none;
  overflow: visible;
  gap: 20px;
}

.modal-patient-list {
  max-height: min(420px, 48vh);
  margin-top: 14px;
}

.quick-patient-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(180px, 0.65fr);
  gap: 12px;
  margin: 12px 0 10px;
}

.quick-patient-filters label {
  display: grid;
  gap: 6px;
}

.quick-patient-filters span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.patient-directory .patient-list {
  flex: 1;
  max-height: none;
  align-content: start;
}

.patient-item {
  position: relative;
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-left: 7px solid rgba(107, 60, 198, 0.84);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.36)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.34), transparent);
  box-shadow: var(--inner-glow), 0 0 0 1px rgba(107, 60, 198, 0.09), 0 18px 42px rgba(87, 38, 104, 0.14), 0 6px 18px rgba(192, 24, 120, 0.07);
  backdrop-filter: blur(22px) saturate(1.42);
  color: var(--ink);
  padding: 16px;
  text-align: left;
}

.station-patient-card {
  position: relative;
  display: grid;
  min-height: 236px;
  align-content: stretch;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-left: 3px solid rgba(255, 255, 255, 0.92);
  background:
    radial-gradient(circle at 12% 4%, rgba(253, 234, 246, 0.78), transparent 34%),
    radial-gradient(circle at 92% 100%, rgba(246, 231, 255, 0.5), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.48)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.22), rgba(246, 231, 255, 0.16));
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(192, 24, 120, 0.08),
    0 24px 58px rgba(87, 38, 104, 0.14),
    0 8px 22px rgba(192, 24, 120, 0.06);
  padding: 50px 22px 24px;
}

.station-patient-card.has-photo {
  grid-template-columns: 136px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.station-patient-media {
  display: grid;
  gap: 10px;
  width: 136px;
  align-content: start;
}

.station-patient-copy {
  display: grid;
  min-width: 0;
  align-content: start;
  justify-items: start;
  gap: 10px;
  padding-top: 12px;
}

.station-bed-badge {
  display: inline-flex;
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 247, 252, 0.96), rgba(232, 200, 241, 0.78)),
    linear-gradient(315deg, rgba(205, 161, 232, 0.5), rgba(253, 234, 246, 0.32));
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(147, 71, 162, 0.16),
    0 13px 30px rgba(87, 38, 104, 0.18),
    0 3px 10px rgba(255, 255, 255, 0.7) inset;
  color: #67306f;
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0;
  padding: 0 15px 0 11px;
  text-transform: none;
  backdrop-filter: blur(16px) saturate(1.12);
}

.station-bed-badge::before {
  content: "";
  width: 9px;
  min-width: 9px;
  height: 9px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.94), transparent 30%),
    linear-gradient(135deg, var(--fuchsia), var(--purple));
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.68),
    0 0 16px rgba(192, 24, 120, 0.42);
}

.station-patient-photo {
  width: 136px;
  height: 136px;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(192, 24, 120, 0.12),
    0 16px 36px rgba(87, 38, 104, 0.16);
  object-fit: cover;
  object-position: center 22%;
}

.station-patient-card strong {
  color: var(--purple-dark);
  font-size: clamp(1.55rem, 2vw, 2.2rem);
  font-weight: 960;
  line-height: 1.08;
  text-wrap: balance;
}

.station-card-badges {
  display: grid;
  gap: 7px;
  min-height: 32px;
  align-content: start;
}

.station-patient-copy > span {
  display: none;
}

.patient-list.station-patient-grid .station-patient-card .patient-todo-badges,
.patient-list.station-patient-grid .station-patient-card .patient-calendar-status {
  position: static;
  inset: auto;
  max-width: 100%;
}

.patient-list.station-patient-grid .station-patient-card .patient-todo-badges {
  display: grid;
  justify-items: stretch;
  gap: 7px;
}

.patient-list.station-patient-grid .station-patient-card .patient-todo-badge,
.patient-list.station-patient-grid .station-patient-card .patient-calendar-status {
  width: 100%;
  min-height: 32px;
  justify-content: start;
  border-radius: 8px;
  padding-right: 9px;
}

.station-patient-card .patient-todo-badge {
  display: inline-grid;
}

.station-patient-card .patient-todo-badge strong {
  display: inline-grid;
  width: 24px;
  min-width: 24px;
  height: 24px;
  place-items: center;
  align-items: center;
  justify-items: center;
  color: inherit;
  font-size: 0.9rem;
  line-height: 1;
  margin: 0;
  padding: 0;
}

.station-patient-card .patient-todo-badge span {
  display: inline-block;
  color: inherit;
  font-size: 0.76rem;
  font-weight: 950;
  line-height: 1.2;
}

.station-patient-card .patient-calendar-status strong {
  display: inline-grid;
  width: 22px;
  min-width: 22px;
  height: 22px;
  place-items: center;
  align-items: center;
  justify-items: center;
  color: inherit;
  font-size: 0.72rem;
  line-height: 1;
  margin: 0;
  padding: 0;
}

.station-patient-card .patient-calendar-status span {
  display: inline-block;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1.2;
}

.patient-item.active {
  border-left-color: var(--fuchsia);
  border-color: rgba(192, 24, 120, 0.58);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(253, 234, 246, 0.8));
  box-shadow: var(--inner-glow), 0 0 0 2px rgba(255, 255, 255, 0.82), 0 0 0 5px rgba(192, 24, 120, 0.16), 0 20px 48px rgba(192, 24, 120, 0.18);
}

.patient-item:hover:not(:disabled),
.archive-item:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.98);
  border-left-color: var(--fuchsia);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(253, 234, 246, 0.58)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.38), transparent);
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(255, 255, 255, 0.62),
    0 0 0 6px rgba(192, 24, 120, 0.12),
    0 22px 48px rgba(87, 38, 104, 0.18),
    0 8px 22px rgba(192, 24, 120, 0.11);
}

.patient-item.archived {
  border-left-color: #8f7b96;
  background: rgba(245, 241, 247, 0.62);
  color: #5b4d62;
}

.patient-item strong,
.patient-item span {
  display: block;
}

.patient-item strong {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 1.08rem;
}

.archive-badge {
  display: inline-grid;
  min-height: 22px;
  place-items: center;
  border: 1px solid rgba(192, 24, 120, 0.28);
  border-radius: 999px;
  background: rgba(253, 234, 246, 0.84);
  color: var(--fuchsia-dark);
  padding: 0 8px;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.patient-item span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.38;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(34, 20, 40, 0.28);
  backdrop-filter: blur(18px) saturate(1.2);
  padding: 20px;
}

.patient-modal {
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--glass-line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58));
  box-shadow: var(--inner-glow), 0 28px 90px rgba(80, 20, 70, 0.26);
  backdrop-filter: blur(30px) saturate(1.45);
  padding: 18px;
}

.care-start-modal {
  width: min(860px, 100%);
}

.care-plan-modal {
  width: min(1180px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.care-plan-toolbar,
.care-plan-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.care-plan-toolbar {
  margin-bottom: 14px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 250, 253, 0.5)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.22), rgba(244, 239, 252, 0.14));
  box-shadow: var(--inner-glow), 0 12px 28px rgba(61, 48, 79, 0.08);
  padding: 12px;
}

.care-plan-toolbar strong,
.care-plan-toolbar span {
  display: block;
}

.care-plan-toolbar strong {
  color: var(--purple-dark);
  font-size: 1rem;
}

.care-plan-toolbar span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.care-plan-list {
  display: grid;
  gap: 10px;
}

.care-plan-item {
  display: grid;
  width: 100%;
  gap: 6px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 250, 253, 0.58)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.24), rgba(244, 239, 252, 0.18));
  box-shadow: var(--inner-glow), 0 12px 30px rgba(61, 48, 79, 0.08);
  color: var(--purple-dark);
  cursor: pointer;
  padding: 14px;
  text-align: left;
}

.care-plan-item:hover {
  border-color: rgba(155, 93, 131, 0.36);
  box-shadow: var(--inner-glow), 0 0 0 4px rgba(155, 93, 131, 0.1), 0 18px 38px rgba(61, 48, 79, 0.12);
  transform: translateY(-1px);
}

.care-plan-item strong {
  font-size: 1rem;
}

.care-plan-item span,
.care-plan-item small {
  color: var(--muted);
  font-weight: 800;
}

.lab-modal {
  width: min(980px, 100%);
}

.lab-summary {
  margin-bottom: 14px;
}

.lab-summary-card {
  display: grid;
  gap: 4px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 250, 253, 0.52)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.22), rgba(244, 239, 252, 0.14));
  box-shadow: var(--inner-glow), 0 12px 30px rgba(61, 48, 79, 0.08);
  padding: 13px;
}

.lab-summary-card strong {
  color: var(--purple-dark);
  font-size: 1rem;
  font-weight: 950;
}

.lab-summary-card span,
.lab-summary-card small {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 820;
}

.lab-list {
  display: grid;
  gap: 12px;
}

.lab-card {
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 250, 253, 0.58)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.22), rgba(244, 239, 252, 0.16));
  box-shadow: var(--inner-glow), 0 14px 34px rgba(61, 48, 79, 0.09);
  padding: 13px;
}

.lab-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.lab-card-heading strong,
.lab-card-heading span,
.lab-card-heading small {
  display: block;
}

.lab-card-heading strong {
  color: var(--purple-dark);
  font-size: 1rem;
  font-weight: 950;
}

.lab-card-heading span,
.lab-card-heading small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.lab-card-heading small {
  white-space: nowrap;
}

.lab-value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.lab-value {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(112, 86, 135, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  padding: 9px;
}

.lab-value span,
.lab-value small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.lab-value strong {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 950;
}

.lab-value.alert {
  border-color: rgba(192, 24, 120, 0.28);
  background: linear-gradient(145deg, rgba(255, 246, 250, 0.92), rgba(255, 232, 242, 0.62));
}

.lab-value.alert small {
  color: #9b2d68;
}

.anamnesis-modal {
  width: min(1060px, 100%);
}

.anamnesis-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.anamnesis-section-title {
  grid-column: 1 / -1;
  margin-top: 4px;
  border: 2px solid rgba(255, 255, 255, 0.84);
  border-left: 7px solid rgba(107, 60, 198, 0.62);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 250, 253, 0.52)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.22), rgba(244, 239, 252, 0.14));
  box-shadow: var(--inner-glow), 0 12px 28px rgba(61, 48, 79, 0.08);
  color: var(--purple-dark);
  font-size: 0.92rem;
  font-weight: 950;
  padding: 10px 12px;
}

.anamnesis-field {
  display: grid;
  gap: 6px;
}

.anamnesis-field.full-row {
  grid-column: 1 / -1;
}

.anamnesis-field span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.anamnesis-field input,
.anamnesis-field textarea {
  border-width: 2px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 250, 253, 0.62)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.2), rgba(244, 239, 252, 0.12));
}

.anamnesis-field textarea {
  min-height: 96px;
  resize: vertical;
}

.coding-modal {
  width: min(1420px, 100%);
}

.coding-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.coding-topbar,
.coding-form,
.coding-list {
  display: grid;
  align-content: start;
  gap: 12px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 250, 253, 0.52)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.22), rgba(244, 239, 252, 0.14));
  box-shadow: var(--inner-glow), 0 14px 34px rgba(61, 48, 79, 0.08);
  padding: 14px;
}

.coding-topbar {
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: end;
}

.coding-topbar label {
  margin: 0;
}

.coding-topbar .primary-action {
  min-height: 52px;
}

.coding-form {
  grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
}

.coding-list {
  min-height: 440px;
}

.coding-form > label:first-child {
  grid-column: 1 / -1;
}

.coding-form label,
.coding-form .full-row {
  display: grid;
  gap: 6px;
}

.coding-form .full-row,
.coding-form .primary-action {
  grid-column: 1 / -1;
}

.coding-form span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.coding-form input,
.coding-form select,
.coding-form textarea {
  border-width: 2px;
}

.coding-form select {
  min-height: 52px;
  font-size: 1rem;
  font-weight: 850;
}

.coding-main-diagnosis {
  grid-column: 1 / -1;
}

.coding-main-card,
.coding-secondary-heading,
.coding-secondary-item {
  display: grid;
  gap: 8px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 250, 253, 0.58)),
    linear-gradient(315deg, rgba(244, 226, 246, 0.22), rgba(238, 233, 252, 0.16));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 12px 28px rgba(68, 50, 86, 0.08);
  padding: 12px;
}

.coding-main-card span,
.coding-secondary-heading span,
.coding-secondary-title span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.coding-main-card strong,
.coding-secondary-heading strong,
.coding-secondary-title strong {
  color: var(--purple-dark);
  font-size: 1rem;
  font-weight: 950;
}

.coding-main-card small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1.35;
}

.coding-secondary-list {
  display: grid;
  gap: 10px;
}

.coding-secondary-title {
  display: grid;
  gap: 3px;
}

.coding-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.coding-secondary-actions label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--purple-dark);
  font-size: 0.84rem;
  font-weight: 900;
  padding: 7px 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.coding-secondary-actions input {
  width: 16px;
  height: 16px;
  accent-color: var(--fuchsia);
}

.coding-secondary-item textarea {
  min-height: 76px;
  resize: vertical;
}

.coding-decision-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.coding-status-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  padding: 5px 9px;
}

.coding-status-chip[data-reason] {
  cursor: help;
}

.coding-status-chip[data-reason]::after {
  content: attr(data-reason);
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  z-index: 90;
  width: max-content;
  max-width: min(360px, 64vw);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(253, 234, 246, 0.9)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.72), rgba(255, 255, 255, 0.48));
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(192, 24, 120, 0.12),
    0 18px 42px rgba(87, 38, 104, 0.2);
  color: var(--purple-dark);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.32;
  opacity: 0;
  padding: 10px 12px;
  pointer-events: none;
  transform: translateY(4px) scale(0.98);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
  white-space: normal;
}

.coding-status-chip[data-reason]:hover::after,
.coding-status-chip[data-reason]:focus-visible::after {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.coding-status-chip.accepted {
  background: rgba(86, 178, 132, 0.16);
  color: #236547;
}

.coding-status-chip.rejected {
  background: rgba(135, 116, 150, 0.13);
  color: #584968;
}

.coding-status-chip.open {
  background: rgba(227, 58, 144, 0.12);
  color: var(--fuchsia-dark);
}

.coding-list-heading,
.coding-entry {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(112, 86, 135, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  padding: 11px;
}

.coding-overview-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 14px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 250, 253, 0.62)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.24), rgba(244, 239, 252, 0.16));
  box-shadow: var(--inner-glow), 0 12px 28px rgba(61, 48, 79, 0.08);
  padding: 14px;
}

.coding-overview-heading strong {
  grid-column: 1 / -1;
  color: var(--purple-dark);
  font-size: clamp(1.3rem, 2vw, 1.9rem);
  font-weight: 980;
  line-height: 1.05;
}

.coding-overview-heading small,
.coding-overview-heading span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 880;
}

.coding-overview-heading span {
  display: inline-flex;
  justify-self: start;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  background: rgba(192, 24, 120, 0.1);
  color: var(--fuchsia-dark);
  font-size: 0.82rem;
  padding: 5px 10px;
}

.coding-overview-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 12px;
}

.coding-overview-section {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 260px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 250, 253, 0.48)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.22), rgba(244, 239, 252, 0.14));
  box-shadow: var(--inner-glow), 0 12px 30px rgba(61, 48, 79, 0.08);
  padding: 14px;
}

.coding-overview-section h3 {
  margin: 0;
  color: var(--purple-dark);
  font-size: 1rem;
  font-weight: 960;
}

.coding-secondary-overview > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.coding-ops-overview > div {
  display: grid;
  gap: 8px;
}

.coding-ops-item {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(112, 86, 135, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  padding: 10px;
}

.coding-ops-item.eligible {
  border-color: rgba(73, 166, 121, 0.3);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(240, 255, 248, 0.56)),
    linear-gradient(315deg, rgba(214, 250, 231, 0.34), rgba(255, 255, 255, 0.28));
}

.coding-ops-item.blocked {
  border-color: rgba(192, 24, 120, 0.18);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(255, 248, 252, 0.54)),
    linear-gradient(315deg, rgba(253, 230, 242, 0.3), rgba(255, 255, 255, 0.22));
}

.coding-ops-item strong {
  color: var(--purple-dark);
  font-size: 0.88rem;
  font-weight: 920;
  line-height: 1.28;
}

.coding-ops-item span,
.coding-ops-item small,
.coding-ops-item em,
.coding-overview-empty {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 820;
}

.coding-ops-item em {
  color: var(--purple-dark);
  font-style: normal;
}

.coding-ops-subheading {
  margin: 6px 0 0;
  color: var(--fuchsia-dark);
  font-size: 0.86rem;
  font-weight: 950;
}

.coding-overview-empty {
  margin: 0;
}

.coding-grouper-demo {
  display: grid;
  grid-template-columns: minmax(340px, 0.78fr) minmax(580px, 1.22fr);
  gap: 10px;
}

.coding-grouper-panel {
  overflow: hidden;
  border: 2px solid rgba(50, 116, 110, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(250, 255, 253, 0.72)),
    linear-gradient(315deg, rgba(216, 247, 241, 0.26), rgba(255, 238, 248, 0.18));
  box-shadow: var(--inner-glow), 0 14px 34px rgba(61, 48, 79, 0.1);
}

.coding-grouper-toolbar {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr);
  align-items: center;
  gap: 10px;
  border-bottom: 12px solid rgba(24, 103, 96, 0.88);
  padding: 8px;
}

.coding-grouper-toolbar strong {
  color: #0069a8;
  font-size: 0.95rem;
  font-weight: 980;
}

.coding-grouper-toolbar input {
  min-height: 32px;
  border: 1px solid rgba(46, 53, 68, 0.5);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.86);
}

.coding-grouper-table {
  display: grid;
  min-height: 220px;
  max-height: 390px;
  overflow: auto;
}

.coding-grouper-row {
  position: relative;
  display: grid;
  grid-template-columns: 24px 34px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  border-bottom: 1px solid rgba(57, 75, 88, 0.18);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  padding: 5px 7px;
}

.coding-grouper-row:hover {
  z-index: 3;
  background: rgba(255, 255, 255, 0.92);
}

.coding-grouper-row[data-reason]::after {
  content: attr(data-reason);
  position: absolute;
  left: 36px;
  bottom: calc(100% + 8px);
  z-index: 100;
  width: min(520px, 72vw);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 238, 252, 0.92)),
    linear-gradient(315deg, rgba(255, 45, 158, 0.14), rgba(24, 103, 96, 0.12));
  box-shadow: var(--inner-glow), 0 22px 54px rgba(46, 28, 64, 0.22);
  color: var(--purple-dark);
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.36;
  opacity: 0;
  padding: 10px 12px;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.coding-grouper-row[data-reason]:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.coding-grouper-row.procedure {
  grid-template-columns: 24px 20px 88px minmax(0, 1fr) 88px 48px;
}

.coding-grouper-row.blocked {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 248, 252, 0.68)),
    linear-gradient(315deg, rgba(255, 45, 158, 0.14), rgba(255, 255, 255, 0.2));
}

.coding-grouper-row.blocked .coding-row-check {
  background: rgba(255, 232, 242, 0.96);
  color: var(--fuchsia-dark);
  box-shadow: inset 0 0 0 2px rgba(192, 24, 120, 0.18);
}

.coding-grouper-row.blocked strong,
.coding-grouper-row.blocked em {
  color: var(--fuchsia-dark);
}

.coding-grouper-row.simulated {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(250, 255, 253, 0.68)),
    linear-gradient(315deg, rgba(216, 247, 241, 0.18), rgba(255, 255, 255, 0.18));
}

.coding-grouper-row.simulated .coding-row-alert {
  color: #1b766c;
  font-size: 0.78rem;
  font-weight: 980;
}

.coding-row-check,
.coding-row-alert,
.coding-row-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 980;
}

.coding-row-check {
  background: rgba(228, 248, 255, 0.9);
  color: #0069a8;
  box-shadow: inset 0 0 0 2px rgba(0, 105, 168, 0.16);
}

.coding-row-alert {
  color: #0069a8;
  font-size: 1rem;
}

.coding-row-badge {
  border-radius: 6px;
  background: rgba(255, 231, 48, 0.82);
  color: #241f12;
}

.coding-grouper-row strong,
.coding-grouper-row em {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coding-grouper-row strong {
  font-size: 0.9rem;
  font-weight: 820;
}

.coding-grouper-row em {
  font-size: 0.88rem;
  font-style: normal;
  font-weight: 760;
}

.coding-grouper-row small,
.coding-grouper-row time {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 860;
}

.coding-pepp-panel {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  border: 2px solid rgba(46, 53, 68, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 253, 246, 0.74)),
    linear-gradient(315deg, rgba(245, 238, 252, 0.28), rgba(216, 247, 241, 0.18));
  box-shadow: var(--inner-glow), 0 14px 34px rgba(61, 48, 79, 0.08);
  padding: 12px;
}

.coding-pepp-panel strong {
  color: var(--purple-dark);
  font-size: 1rem;
  font-weight: 980;
}

.coding-pepp-panel strong span {
  color: #0069a8;
  margin-left: 6px;
}

.coding-pepp-panel p {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 780;
}

.coding-pepp-values {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 8px 14px;
}

.coding-pepp-values span,
.coding-pepp-panel aside {
  color: #0069a8;
  font-size: 0.84rem;
  font-weight: 920;
}

.coding-pepp-bar {
  overflow: hidden;
  grid-column: 1 / -1;
  height: 36px;
  border: 1px solid rgba(46, 53, 68, 0.28);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(218, 218, 218, 0.9), rgba(255, 255, 255, 0.94), rgba(208, 208, 208, 0.88));
}

.coding-pepp-bar span {
  display: block;
  height: 100%;
  border-right: 3px solid rgba(192, 24, 120, 0.82);
  background: linear-gradient(90deg, rgba(255, 45, 158, 0.34), rgba(107, 60, 198, 0.26));
}

.coding-pepp-panel aside {
  justify-self: end;
  text-align: right;
}

@media (max-width: 1120px) {
  .coding-grouper-demo {
    grid-template-columns: 1fr;
  }

  .coding-pepp-panel {
    grid-template-columns: 1fr;
  }
}

.coding-overview-note {
  border-left: 5px solid rgba(192, 24, 120, 0.34);
}

.coding-list-heading strong,
.coding-entry strong {
  color: var(--purple-dark);
  font-size: 0.96rem;
  font-weight: 950;
}

.coding-list-heading span,
.coding-entry span,
.coding-entry small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.coding-entry p {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.36;
}

.care-plan-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.care-plan-table-wrap {
  overflow: auto;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 250, 253, 0.48)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.18), rgba(244, 239, 252, 0.12));
  box-shadow: var(--inner-glow), 0 14px 34px rgba(61, 48, 79, 0.09);
}

.care-plan-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}

.care-plan-table th,
.care-plan-table td {
  vertical-align: top;
  border-bottom: 1px solid rgba(112, 86, 135, 0.16);
  padding: 10px;
}

.care-plan-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(255, 252, 255, 0.94);
  color: var(--purple-dark);
  font-size: 0.78rem;
  font-weight: 950;
  text-align: left;
  text-transform: uppercase;
}

.care-plan-table td:nth-child(1),
.care-plan-table td:nth-child(2),
.care-plan-table td:nth-child(3) {
  width: 21%;
}

.care-plan-row-label {
  display: inline-flex;
  margin-bottom: 7px;
  border-radius: 999px;
  background: rgba(155, 93, 131, 0.1);
  color: var(--fuchsia-dark);
  font-size: 0.72rem;
  font-weight: 950;
  padding: 3px 8px;
}

.care-plan-table textarea {
  min-height: 120px;
  resize: vertical;
}

.care-plan-shift-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(64px, 1fr));
  gap: 6px;
}

.care-plan-day-block {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(112, 86, 135, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  padding: 7px;
}

.care-plan-day-block strong {
  color: var(--purple-dark);
  font-size: 0.78rem;
  text-align: center;
}

.care-plan-day-block label {
  gap: 3px;
}

.care-plan-day-block label span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 950;
}

.care-plan-day-block input {
  min-height: 34px;
  padding: 7px;
}

.care-plan-editor-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 14px;
}

.group-count-picker {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.group-count-picker > span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.group-count-picker > div {
  display: flex;
  gap: 10px;
}

.group-count-button {
  min-width: 70px;
  min-height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.38)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.3), transparent);
  box-shadow: var(--inner-glow), 0 12px 28px rgba(87, 38, 104, 0.1);
  color: var(--purple-dark);
  font-weight: 950;
}

.group-count-button.active {
  border-color: rgba(192, 24, 120, 0.58);
  background: linear-gradient(135deg, rgba(192, 24, 120, 0.92), rgba(107, 60, 198, 0.92));
  color: #fff;
  box-shadow: var(--inner-glow), 0 0 0 5px rgba(192, 24, 120, 0.16), 0 16px 36px rgba(107, 60, 198, 0.18);
}

.selected-group-strip {
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(253, 234, 246, 0.72), rgba(255, 255, 255, 0.36)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.34), transparent);
  box-shadow: var(--inner-glow), 0 12px 28px rgba(87, 38, 104, 0.08);
  color: var(--fuchsia-dark);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.35;
  padding: 12px;
}

.conversation-modal {
  width: min(880px, 100%);
}

.conversation-modal .patient-modal-grid {
  grid-template-columns: 170px 118px 118px minmax(150px, 1fr);
  align-items: end;
}

.discharge-letter-modal {
  width: min(1380px, 100%);
}

.discharge-letter-shell {
  display: grid;
  grid-template-columns: minmax(220px, 0.26fr) minmax(0, 1fr);
  gap: 16px;
}

.discharge-letter-source,
.discharge-letter-editor {
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 250, 253, 0.58)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.24), rgba(244, 239, 252, 0.16));
  box-shadow: var(--inner-glow), 0 18px 40px rgba(61, 48, 79, 0.1);
  padding: 14px;
}

.discharge-letter-source {
  align-content: start;
  display: grid;
  gap: 10px;
}

.discharge-letter-source > strong {
  color: var(--purple-dark);
  font-size: 1rem;
  font-weight: 980;
}

#dischargeLetterSourceList {
  display: grid;
  gap: 8px;
}

.discharge-source-item {
  display: grid;
  gap: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
  padding: 10px;
}

.discharge-source-item span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.discharge-source-item strong {
  color: var(--purple-dark);
  font-size: 0.92rem;
  font-weight: 950;
}

.discharge-letter-editor {
  display: grid;
  gap: 12px;
  justify-items: center;
  background:
    linear-gradient(145deg, rgba(250, 250, 250, 0.92), rgba(238, 235, 241, 0.62)),
    linear-gradient(315deg, rgba(255, 255, 255, 0.4), rgba(246, 231, 255, 0.12));
}

.discharge-letter-toolbar {
  display: flex;
  width: min(100%, 880px);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.discharge-letter-toolbar span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

#dischargeLetterText {
  width: min(100%, 880px);
  min-height: min(72vh, 920px);
  border: 1px solid rgba(40, 40, 40, 0.18);
  border-radius: 2px;
  background: #fff;
  color: #111;
  font-family: "Times New Roman", Times, serif;
  font-size: 12pt;
  font-weight: 400;
  line-height: 1.42;
  padding: 56px 64px;
  resize: vertical;
  box-shadow:
    0 1px 1px rgba(20, 20, 20, 0.08),
    0 20px 55px rgba(42, 35, 48, 0.18);
  white-space: pre-wrap;
}

.conversation-date-field input,
.conversation-time-field input {
  min-height: 42px;
  padding: 9px 10px;
}

.conversation-summary,
.conversation-te-box {
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 247, 252, 0.52)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.26), rgba(244, 239, 252, 0.14));
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(112, 86, 135, 0.09),
    0 14px 32px rgba(61, 48, 79, 0.1);
  padding: 13px 14px;
}

.conversation-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}

.conversation-summary strong,
.conversation-summary span,
.conversation-te-box span,
.conversation-te-box strong,
.conversation-te-box small {
  display: block;
}

.conversation-summary strong {
  color: var(--purple-dark);
  font-size: 1rem;
}

.conversation-summary span,
.conversation-te-box span,
.conversation-te-box small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.conversation-te-box strong {
  margin: 6px 0 4px;
  color: var(--fuchsia-dark);
  font-size: 1.45rem;
  font-weight: 950;
}

.conversation-mode-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.conversation-mode-card {
  display: grid;
  min-height: 170px;
  align-content: center;
  gap: 8px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42)),
    linear-gradient(315deg, rgba(236, 246, 255, 0.28), rgba(253, 234, 246, 0.18));
  box-shadow: var(--inner-glow), 0 14px 34px rgba(61, 48, 79, 0.1);
  color: var(--purple-dark);
  cursor: pointer;
  padding: 18px;
  text-align: left;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.conversation-mode-card.ai {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(253, 245, 251, 0.48)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.44), rgba(246, 231, 255, 0.26));
}

.conversation-mode-card:hover,
.conversation-mode-card:focus-visible {
  border-color: rgba(192, 24, 120, 0.36);
  box-shadow: var(--inner-glow), 0 0 0 4px rgba(192, 24, 120, 0.09), 0 22px 46px rgba(61, 48, 79, 0.14);
  transform: translateY(-2px);
}

.conversation-mode-card span {
  color: var(--fuchsia-dark);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.conversation-mode-card strong {
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1;
}

.conversation-mode-card small {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
}

.conversation-ai-panel {
  display: grid;
  gap: 14px;
}

.conversation-ai-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.42)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.48), rgba(246, 231, 255, 0.28));
  box-shadow: var(--inner-glow), 0 16px 40px rgba(61, 48, 79, 0.11);
  padding: 16px;
}

.conversation-ai-hero span,
.conversation-ai-hero strong,
.conversation-ai-hero small {
  display: block;
}

.conversation-ai-hero span {
  color: var(--fuchsia-dark);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.conversation-ai-hero strong {
  color: var(--purple-dark);
  font-size: clamp(1.45rem, 2vw, 2.2rem);
  line-height: 1;
}

.conversation-ai-hero small {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 800;
}

.conversation-ai-pulse {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  border: 2px solid rgba(192, 24, 120, 0.24);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(192, 24, 120, 0.86) 0 9px, rgba(255, 255, 255, 0.88) 10px 22px, rgba(253, 234, 246, 0.6) 23px 100%);
  box-shadow: var(--inner-glow), 0 14px 32px rgba(192, 24, 120, 0.16);
}

.conversation-ai-pulse.recording {
  animation: recordingPulse 1.15s ease-in-out infinite;
}

@keyframes recordingPulse {
  0%,
  100% {
    box-shadow: var(--inner-glow), 0 0 0 0 rgba(192, 24, 120, 0.2), 0 14px 32px rgba(192, 24, 120, 0.16);
    transform: scale(1);
  }
  50% {
    box-shadow: var(--inner-glow), 0 0 0 12px rgba(192, 24, 120, 0.04), 0 18px 40px rgba(192, 24, 120, 0.22);
    transform: scale(1.04);
  }
}

.conversation-ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
}

.conversation-ai-grid .full-row {
  grid-column: 1 / -1;
}

.conversation-ai-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.conversation-ai-actions button {
  min-height: 54px;
}

.conversation-ai-order {
  display: grid;
  gap: 10px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-left: 7px solid rgba(192, 24, 120, 0.62);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.34), rgba(246, 231, 255, 0.16));
  box-shadow: var(--inner-glow), 0 14px 34px rgba(61, 48, 79, 0.1);
  padding: 12px;
}

.conversation-ai-order strong,
.conversation-ai-order span {
  display: block;
}

.conversation-ai-order strong {
  color: var(--purple-dark);
  font-size: 1rem;
  font-weight: 950;
}

.conversation-ai-order span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 820;
}

.conversation-ai-order-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--purple-dark);
  font-weight: 880;
}

.conversation-ai-order-toggle input {
  width: 20px;
  height: 20px;
}

.quick-patient-list .patient-item:disabled {
  opacity: 0.46;
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-close {
  min-width: 112px;
}

.patient-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 12px;
}

.patient-modal-grid .full-row {
  grid-column: 1 / -1;
}

.patient-modal-section-title {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  border-top: 1px solid rgba(112, 86, 135, 0.14);
  padding-top: 14px;
}

.patient-modal-section-title strong {
  color: var(--purple-dark);
  font-size: 1rem;
}

.patient-modal-section-title span {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.patient-modal-grid textarea {
  min-height: 86px;
}

.diagnosis-editor {
  display: grid;
  gap: 10px;
}

.diagnosis-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.diagnosis-editor-heading span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.diagnosis-add-button,
.diagnosis-remove-button {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 0.78rem;
}

.diagnosis-row-list {
  display: grid;
  gap: 8px;
}

.diagnosis-row {
  display: grid;
  grid-template-columns: minmax(86px, 0.28fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 250, 253, 0.54)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.22), rgba(244, 239, 252, 0.16));
  box-shadow: var(--inner-glow), 0 12px 26px rgba(72, 44, 99, 0.08);
  padding: 8px;
}

.diagnosis-row input {
  min-height: 42px;
}

.diagnosis-row input[data-diagnosis-icd] {
  font-weight: 950;
  text-transform: uppercase;
}

.diagnosis-remove-button {
  color: #8c2f61;
}

.modal-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.calendar-box {
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.38)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.34), rgba(246, 231, 255, 0.18));
  box-shadow: var(--inner-glow), 0 0 0 1px rgba(192, 24, 120, 0.09), 0 20px 52px rgba(87, 38, 104, 0.14);
  backdrop-filter: blur(26px) saturate(1.5);
  margin-bottom: 14px;
  padding: 14px;
}

.calendar-header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  text-align: center;
}

.calendar-nav {
  min-height: 36px;
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(246, 231, 255, 0.7));
  color: var(--purple-dark);
  font-size: 1.2rem;
  font-weight: 900;
  box-shadow: var(--inner-glow);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.calendar-weekdays {
  margin-bottom: 7px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

.calendar-day {
  position: relative;
  min-height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.36));
  box-shadow: var(--inner-glow), 0 0 0 1px rgba(107, 60, 198, 0.04), 0 9px 20px rgba(87, 38, 104, 0.08);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
}

.calendar-day.empty {
  background: transparent;
}

.calendar-day.has-records,
.calendar-day.has-note {
  border-color: rgba(107, 60, 198, 0.22);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(246, 231, 255, 0.62));
  box-shadow: var(--inner-glow), 0 0 0 1px rgba(107, 60, 198, 0.12), 0 12px 26px rgba(87, 38, 104, 0.12);
}

.calendar-day.note-sick {
  border-color: rgba(205, 83, 96, 0.44);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 236, 240, 0.82)),
    linear-gradient(315deg, rgba(205, 83, 96, 0.18), rgba(255, 255, 255, 0.2));
  color: #9b3e4b;
}

.calendar-day.note-trial {
  border-color: rgba(107, 60, 198, 0.4);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(246, 231, 255, 0.82)),
    linear-gradient(315deg, rgba(107, 60, 198, 0.16), rgba(255, 255, 255, 0.22));
  color: var(--purple-dark);
}

.calendar-day.note-schoolTrial {
  border-color: rgba(155, 93, 131, 0.38);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 248, 252, 0.82)),
    linear-gradient(315deg, rgba(155, 93, 131, 0.15), rgba(255, 255, 255, 0.22));
  color: var(--fuchsia-dark);
}

.calendar-day.active {
  border-color: var(--fuchsia);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(253, 234, 246, 0.88));
  color: var(--fuchsia-dark);
  box-shadow: var(--inner-glow), 0 0 0 2px rgba(255, 255, 255, 0.82), 0 0 0 5px rgba(192, 24, 120, 0.15), 0 14px 30px rgba(192, 24, 120, 0.22);
}

.calendar-day:hover:not(:disabled):not(.empty),
.date-tab:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.98);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(253, 234, 246, 0.68));
  color: var(--fuchsia-dark);
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(255, 255, 255, 0.62),
    0 0 0 5px rgba(192, 24, 120, 0.13),
    0 16px 34px rgba(192, 24, 120, 0.18);
}

.calendar-note-dot {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), var(--fuchsia));
  box-shadow: 0 0 0 3px rgba(192, 24, 120, 0.14);
}

.calendar-day-info {
  display: grid;
  gap: 10px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 250, 253, 0.5)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.22), rgba(244, 239, 252, 0.14));
  box-shadow: var(--inner-glow), 0 12px 28px rgba(61, 48, 79, 0.08);
  padding: 12px;
}

.calendar-day-info-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.calendar-day-info-heading strong,
.calendar-day-info-heading span {
  display: block;
}

.calendar-day-info-heading strong {
  color: var(--purple-dark);
  font-size: 1rem;
}

.calendar-day-info-heading span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.calendar-info-type {
  display: grid;
  gap: 6px;
}

.calendar-info-type span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.calendar-info-type select {
  min-height: 40px;
}

.calendar-day-info textarea {
  min-height: 110px;
}

.calendar-day-info-actions {
  display: flex;
  justify-content: flex-end;
}

.calendar-day-info-entry {
  display: grid;
  gap: 5px;
  border-top: 1px solid rgba(112, 86, 135, 0.14);
  padding-top: 10px;
}

.calendar-day-info-entry strong {
  color: var(--purple-dark);
  font-size: 0.88rem;
}

.calendar-day-info-entry p {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 760;
  line-height: 1.38;
  white-space: pre-wrap;
}

.calendar-day-info-entry span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.date-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.date-tab {
  min-height: 34px;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.38));
  border: 2px solid rgba(255, 255, 255, 0.9);
  color: var(--muted);
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 850;
  box-shadow: var(--inner-glow), 0 0 0 1px rgba(107, 60, 198, 0.05), 0 8px 20px rgba(68, 23, 88, 0.08);
}

.date-tab.active {
  border-color: var(--fuchsia);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(253, 234, 246, 0.86));
  color: var(--fuchsia-dark);
  box-shadow: var(--inner-glow), 0 10px 24px rgba(192, 24, 120, 0.14), 0 0 0 3px rgba(192, 24, 120, 0.1);
}

.archive-list {
  display: grid;
  gap: 10px;
}

.archive-item {
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-left: 7px solid rgba(107, 60, 198, 0.84);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.38)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.28), transparent);
  box-shadow: var(--inner-glow), 0 0 0 1px rgba(107, 60, 198, 0.09), 0 16px 38px rgba(87, 38, 104, 0.12);
  backdrop-filter: blur(22px) saturate(1.42);
  color: var(--ink);
  padding: 13px;
  text-align: left;
}

.archive-item.active {
  border-left-color: var(--fuchsia);
  border-color: rgba(192, 24, 120, 0.58);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(253, 234, 246, 0.8));
  outline: 4px solid rgba(192, 24, 120, 0.16);
  box-shadow: var(--inner-glow), 0 0 0 2px rgba(255, 255, 255, 0.82), 0 18px 44px rgba(192, 24, 120, 0.18);
}

.archive-item strong,
.archive-item span {
  display: block;
}

.archive-item strong {
  font-size: 0.9rem;
}

.archive-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.archive-empty {
  border: 1px dashed rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.32);
  color: var(--muted);
  padding: 12px;
  font-size: 0.84rem;
  line-height: 1.4;
}

.archive-detail {
  margin-top: 14px;
}

.archive-detail-card {
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 250, 253, 0.74), rgba(255, 255, 255, 0.42));
  box-shadow: var(--inner-glow), 0 0 0 1px rgba(107, 60, 198, 0.08), 0 18px 42px rgba(87, 38, 104, 0.12);
  backdrop-filter: blur(24px) saturate(1.42);
  padding: 16px;
}

.archive-detail-card > strong {
  display: block;
  margin-bottom: 10px;
}

.archive-detail-card dl {
  margin-bottom: 10px;
}

.archive-observations {
  display: grid;
  gap: 6px;
}

.archive-observations p {
  border-top: 1px solid var(--line);
  padding-top: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.archive-detail-actions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.doctor-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 16px;
}

.hidden {
  display: none;
}

.orders-panel,
.vision-panel {
  padding: 18px;
}

.order-list {
  display: grid;
  gap: 10px;
}

.order-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-left: 5px solid var(--purple);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: var(--inner-glow), 0 14px 34px rgba(87, 38, 104, 0.09);
  backdrop-filter: blur(18px) saturate(1.3);
  padding: 14px;
}

.order-card.urgent {
  border-left-color: var(--rose);
}

.order-card.done {
  border-left-color: var(--fuchsia);
  background: rgba(255, 250, 253, 0.68);
}

.order-card p {
  margin-top: 4px;
  color: var(--muted);
}

.task-rule {
  font-size: 0.88rem;
}

.order-proposal {
  display: block;
  margin-top: 12px;
}

.order-proposal span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.proposal-text {
  min-height: 128px;
}

.reject-button {
  background: rgba(251, 233, 239, 0.78);
  color: #8c2443;
}

.task-week {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.week-badge {
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: var(--inner-glow);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 0.78rem;
  font-weight: 850;
}

.week-badge.active {
  border-color: var(--fuchsia);
  background: rgba(253, 234, 246, 0.82);
  color: var(--fuchsia-dark);
}

.progress-history-text {
  white-space: pre-wrap;
}

.intensity-highlight {
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(255, 45, 158, 0.18), rgba(107, 60, 198, 0.14));
  box-shadow: inset 0 0 0 1px rgba(192, 24, 120, 0.16);
  color: var(--fuchsia-dark);
  font-weight: 950;
  padding: 0 4px;
}

.signature-box {
  display: grid;
  gap: 8px;
}

.signature-input {
  min-height: 40px;
}

.vision-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.vision-grid div {
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: var(--inner-glow);
  padding: 14px;
}

.vision-grid strong,
.vision-grid span {
  display: block;
}

.vision-grid strong {
  margin-bottom: 5px;
}

/* Ruhiger Klinik-Look: viel Weissglas, Fuchsia nur als kontrollierter Akzent. */
.brand-mark,
.brand-wordmark {
  filter:
    drop-shadow(0 12px 22px rgba(61, 48, 79, 0.12))
    drop-shadow(0 4px 10px rgba(126, 74, 128, 0.08))
    saturate(0.92);
}

.station-switch,
.top-nav-action,
.user-switch,
.role-switch,
.dashboard-hero,
.dashboard-card,
.dashboard-patient-panel,
.group-participant-panel,
.patient-directory,
.patient-file-main,
.patient-record-panel,
.workspace-header,
.measure-panel,
.time-panel,
.documentation-panel,
.summary-card,
.orders-panel,
.vision-panel,
.patient-overview-card,
.progress-note-panel,
.calendar-box,
.patient-modal,
.archive-detail,
.order-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(255, 250, 253, 0.62)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.28), rgba(244, 239, 252, 0.14));
  box-shadow: var(--inner-glow), var(--glass-rim-shadow), var(--glass-shadow);
  backdrop-filter: blur(30px) saturate(1.12);
}

.top-nav-action button,
.station-switch select,
.user-switch select,
.dashboard-station-select-field select,
.secondary-action,
.ghost-action,
.role-button,
.patient-admin-menu summary,
.progress-filter-menu summary,
.progress-toggle,
input,
select,
textarea {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 253, 0.76)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.2), rgba(244, 239, 252, 0.12));
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(106, 90, 168, 0.06),
    0 10px 26px rgba(61, 48, 79, 0.08);
  color: var(--purple-dark);
}

.primary-action,
.role-button.active {
  background: linear-gradient(135deg, #9b5d83, #6e61ad);
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(106, 90, 168, 0.13),
    0 14px 34px rgba(61, 48, 79, 0.14);
}

.primary-action:hover:not(:disabled) {
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(255, 255, 255, 0.62),
    0 0 0 5px rgba(155, 93, 131, 0.11),
    0 18px 42px rgba(61, 48, 79, 0.16);
}

.secondary-action:hover:not(:disabled),
.ghost-action:hover:not(:disabled),
.top-nav-action button:hover:not(:disabled),
.dashboard-card:hover:not(:disabled),
.dashboard-station-option:hover,
.dashboard-station-option.active,
.patient-item:hover:not(:disabled),
.patient-item.active,
.archive-item.active,
.calendar-day.active,
.date-tab.active,
.group-participant-tab.active,
.measure-card.active,
.intensive-feature-choice.active {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 249, 252, 0.84)),
    linear-gradient(315deg, rgba(249, 238, 247, 0.28), rgba(244, 239, 252, 0.16));
  border-color: rgba(155, 93, 131, 0.34);
  box-shadow:
    var(--inner-glow),
    0 0 0 3px rgba(255, 255, 255, 0.5),
    0 0 0 6px rgba(155, 93, 131, 0.08),
    0 18px 42px rgba(61, 48, 79, 0.13);
}

.dashboard-card,
.dashboard-station-option,
.dashboard-patient-item,
.patient-item,
.archive-item,
.measure-card,
.group-participant-tab {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 250, 253, 0.6)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.24), rgba(244, 239, 252, 0.12));
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(106, 90, 168, 0.06),
    0 14px 34px rgba(61, 48, 79, 0.09);
}

.dashboard-card,
.dashboard-station-option,
.dashboard-patient-item,
.patient-item,
.archive-item,
.measure-card {
  border-left-color: rgba(116, 98, 180, 0.52);
}

.dashboard-card:hover:not(:disabled),
.dashboard-station-option:hover,
.dashboard-station-option.active,
.patient-item:hover:not(:disabled),
.patient-item.active,
.archive-item.active,
.measure-card.active,
.measure-card:hover:not(:disabled) {
  border-left-color: rgba(155, 93, 131, 0.58);
}

.dashboard-patient-list .dashboard-patient-item,
.patient-list.station-patient-grid .station-patient-card {
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-left: 3px solid rgba(255, 255, 255, 0.92);
  background:
    radial-gradient(circle at 16% 0%, rgba(253, 234, 246, 0.78), transparent 34%),
    radial-gradient(circle at 92% 100%, rgba(246, 231, 255, 0.5), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.5)),
    linear-gradient(315deg, rgba(253, 234, 246, 0.24), rgba(246, 231, 255, 0.16));
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(192, 24, 120, 0.08),
    0 24px 58px rgba(87, 38, 104, 0.14),
    0 8px 22px rgba(192, 24, 120, 0.06);
  overflow: visible;
}

.dashboard-patient-list .dashboard-patient-item::before,
.patient-list.station-patient-grid .station-patient-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.58), transparent 34%),
    linear-gradient(90deg, rgba(192, 24, 120, 0.16), rgba(107, 60, 198, 0.13));
  opacity: 0.52;
  pointer-events: none;
  mask-image: linear-gradient(180deg, #000 0 18px, transparent 64px);
}

.dashboard-patient-list .dashboard-patient-item > *,
.patient-list.station-patient-grid .station-patient-card > * {
  position: relative;
  z-index: 1;
}

.dashboard-patient-list .dashboard-patient-item .patient-todo-badges,
.patient-list.station-patient-grid .station-patient-card .patient-todo-badges {
  z-index: 20;
}

.dashboard-patient-list .dashboard-patient-item .patient-calendar-status,
.patient-list.station-patient-grid .station-patient-card .patient-calendar-status {
  z-index: 5;
}

.dashboard-patient-list .dashboard-patient-item:hover,
.patient-list.station-patient-grid .station-patient-card:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.98);
  box-shadow:
    var(--inner-glow),
    var(--glass-rim-shadow),
    0 28px 64px rgba(87, 38, 104, 0.18),
    0 10px 24px rgba(192, 24, 120, 0.08);
  transform: translateY(-2px);
}

.eyebrow,
.dashboard-station-badge span,
.dashboard-card-kicker,
.dashboard-patient-heading > span,
.station-card-label,
.archive-badge,
.calendar-day.active,
.date-tab.active {
  color: var(--fuchsia-dark);
}

.station-card-label,
.archive-badge,
.week-badge.active {
  background: rgba(252, 242, 249, 0.8);
  border-color: rgba(155, 93, 131, 0.18);
}

.progress-note-panel.progress-composer-open::before {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.58), rgba(255, 244, 251, 0.42)),
    rgba(64, 45, 67, 0.1);
  backdrop-filter: blur(16px) saturate(1.04);
}

.progress-composer {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 253, 0.86)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.32), rgba(244, 239, 252, 0.16));
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(106, 90, 168, 0.06),
    0 28px 80px rgba(61, 48, 79, 0.18);
}

.intensive-feature-choice,
.intensive-feature-choice::after {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 250, 253, 0.78)),
    linear-gradient(315deg, rgba(250, 239, 248, 0.24), rgba(244, 239, 252, 0.12));
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(106, 90, 168, 0.07),
    0 14px 32px rgba(61, 48, 79, 0.1);
}

.intensive-feature-choice:hover {
  border-color: rgba(155, 93, 131, 0.3);
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(155, 93, 131, 0.07),
    0 10px 22px rgba(61, 48, 79, 0.08);
}

.completion-ring,
.status-ring {
  box-shadow:
    var(--inner-glow),
    0 18px 42px rgba(61, 48, 79, 0.14);
}

/* Mehr Trennung zwischen Hintergrund, Karten und Eingabefeldern. */
.station-switch,
.top-nav-action,
.user-switch,
.role-switch,
.dashboard-hero,
.dashboard-card,
.dashboard-patient-panel,
.group-participant-panel,
.patient-directory,
.patient-file-main,
.patient-record-panel,
.workspace-header,
.measure-panel,
.time-panel,
.documentation-panel,
.summary-card,
.orders-panel,
.vision-panel,
.patient-overview-card,
.progress-note-panel,
.calendar-box,
.patient-modal,
.archive-detail,
.order-card,
.progress-composer {
  border-color: rgba(255, 255, 255, 0.98);
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(112, 86, 135, 0.12),
    0 18px 52px rgba(61, 48, 79, 0.14);
}

.dashboard-card,
.dashboard-station-option,
.dashboard-patient-item,
.patient-item,
.archive-item,
.measure-card,
.group-participant-tab,
.intensive-feature-choice,
.calculation-card,
.observation-card,
.progress-generated-block {
  border-color: rgba(255, 255, 255, 0.98);
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(112, 86, 135, 0.11),
    0 14px 36px rgba(61, 48, 79, 0.12);
}

.top-nav-action button,
.station-switch select,
.user-switch select,
.dashboard-station-select-field select,
.secondary-action,
.ghost-action,
.role-button,
.patient-admin-menu summary,
.progress-filter-menu summary,
.progress-toggle,
input,
select,
textarea {
  border-color: rgba(255, 255, 255, 0.98);
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(112, 86, 135, 0.14),
    0 10px 28px rgba(61, 48, 79, 0.1);
}

.progress-composer {
  padding: 18px 20px;
}

.progress-composer .progress-history-heading {
  margin-top: 0;
  margin-bottom: 6px;
}

.progress-feature-field {
  margin: 6px 0 8px;
}

.progress-feature-choices {
  gap: 8px;
}

.progress-feature-choices .intensive-feature-choice {
  min-height: 50px;
  padding: 10px 12px;
}

.progress-entry-meta {
  margin-top: 8px;
}

@media (max-width: 1380px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .topbar-actions {
    justify-self: stretch;
  }
}

@media (max-width: 980px) {
  .app-shell {
    padding: 18px;
  }

  .topbar,
  .dashboard-grid,
  .dashboard-station-list,
  .dashboard-patient-list,
  .patient-list.station-patient-grid,
  .patient-view,
  .patient-view.patient-file-open,
  .patient-view.patient-medication-open,
  .patient-orders-layout,
  .care-view,
  .doctor-view {
    display: grid;
    grid-template-columns: 1fr;
  }

  .summary-panel,
  .care-column,
  .workspace-header,
  .patient-file-main,
  .measure-panel,
  .time-panel,
  .documentation-panel,
  .patient-record-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .summary-panel,
  .patient-record-panel {
    position: static;
  }

  .brand-logo {
    min-height: 66px;
  }

  .brand-wordmark {
    width: min(170px, 38vw);
    height: 70px;
  }

  .brand-mark {
    width: 74px;
    height: 74px;
  }

  .patient-directory,
  .patient-record-panel {
    min-height: auto;
  }

  .patient-progress-primary .progress-title-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .progress-title-actions {
    justify-content: flex-start;
  }

  .progress-composer {
    top: 10px;
    width: min(900px, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
    padding: 18px;
  }

  .progress-time-field-header {
    max-width: 100%;
  }

}

/* Stationsübersicht: bewusst schlicht, stabil und klinisch lesbar. */
.patient-list.station-patient-grid {
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 28px 16px;
}

.patient-list.station-patient-grid .station-patient-card {
  display: grid;
  grid-template-columns: 146px minmax(112px, 1fr);
  gap: 16px;
  min-height: 220px;
  align-items: start;
  overflow: visible;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-left: 6px solid rgba(155, 93, 131, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 251, 253, 0.72)),
    linear-gradient(315deg, rgba(246, 239, 252, 0.18), rgba(255, 255, 255, 0.16));
  box-shadow:
    var(--inner-glow),
    0 10px 28px rgba(61, 48, 79, 0.08);
  margin-top: 18px;
  padding: 34px 16px 16px;
  transform: none;
}

.patient-list.station-patient-grid .station-patient-card::before {
  display: none;
}

.patient-list.station-patient-grid .station-patient-card:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.98);
  border-left-color: rgba(155, 93, 131, 0.72);
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(255, 255, 255, 0.56),
    0 14px 34px rgba(61, 48, 79, 0.12);
  transform: translateY(-1px);
}

.dashboard-patient-list .dashboard-patient-item.calendar-status-sick,
.patient-list.station-patient-grid .station-patient-card.calendar-status-sick {
  border-color: rgba(255, 255, 255, 0.96);
  border-left-color: rgba(198, 66, 86, 0.82);
  background:
    radial-gradient(circle at 12% 6%, rgba(255, 205, 214, 0.78), transparent 42%),
    radial-gradient(circle at 92% 92%, rgba(255, 235, 241, 0.92), transparent 48%),
    linear-gradient(145deg, rgba(255, 246, 249, 0.96), rgba(255, 221, 229, 0.72)),
    linear-gradient(315deg, rgba(198, 66, 86, 0.22), rgba(255, 255, 255, 0.2));
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(198, 66, 86, 0.12),
    0 14px 34px rgba(132, 40, 68, 0.14);
}

.dashboard-patient-list .dashboard-patient-item.calendar-status-trial,
.dashboard-patient-list .dashboard-patient-item.calendar-status-schoolTrial,
.patient-list.station-patient-grid .station-patient-card.calendar-status-trial,
.patient-list.station-patient-grid .station-patient-card.calendar-status-schoolTrial {
  border-color: rgba(255, 255, 255, 0.96);
  border-left-color: rgba(58, 154, 113, 0.78);
  background:
    radial-gradient(circle at 12% 6%, rgba(198, 238, 219, 0.8), transparent 42%),
    radial-gradient(circle at 92% 92%, rgba(238, 250, 244, 0.94), transparent 48%),
    linear-gradient(145deg, rgba(250, 255, 253, 0.96), rgba(219, 244, 232, 0.74)),
    linear-gradient(315deg, rgba(58, 154, 113, 0.2), rgba(255, 255, 255, 0.2));
  box-shadow:
    var(--inner-glow),
    0 0 0 2px rgba(58, 154, 113, 0.12),
    0 14px 34px rgba(44, 104, 78, 0.13);
}

.patient-list.station-patient-grid .station-bed-badge {
  position: absolute;
  top: -22px;
  left: 16px;
  z-index: 8;
  width: min(250px, calc(100% - 32px));
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  border-radius: 999px;
  font-size: 0.78rem;
  padding: 0 16px 0 12px;
}

.dashboard-patient-list .station-bed-badge {
  position: absolute;
  top: -21px;
  left: 16px;
  z-index: 8;
  width: min(232px, calc(100% - 32px));
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  border-radius: 999px;
  font-size: 0.78rem;
  padding: 0 15px 0 12px;
}

.dashboard-patient-list .dashboard-patient-item.has-photo {
  grid-template-columns: 124px minmax(100px, 1fr);
  align-items: start;
  gap: 14px;
  min-height: 214px;
  margin-top: 18px;
  padding: 34px 16px 16px;
}

.dashboard-patient-list .dashboard-patient-media {
  position: relative;
  display: grid;
  gap: 8px;
  width: 124px;
  padding-bottom: 12px;
}

.dashboard-patient-list .station-card-badges {
  position: absolute;
  left: 10px;
  bottom: -10px;
  z-index: 7;
  display: flex;
  gap: 6px;
  max-width: calc(100% - 20px);
  pointer-events: none;
}

.dashboard-patient-list .dashboard-patient-media strong {
  margin: 0;
  color: var(--purple-dark);
  font-size: clamp(1rem, 1.2vw, 1.22rem);
  font-weight: 960;
  line-height: 1.06;
  min-height: 2.12em;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.dashboard-patient-list .dashboard-patient-photo {
  width: 124px;
  height: 112px;
}

.dashboard-patient-list .dashboard-patient-copy {
  display: grid;
  justify-items: end;
  gap: 9px;
  min-width: 0;
  padding-top: 34px;
}

.dashboard-patient-list .dashboard-patient-copy > span,
.dashboard-patient-list .dashboard-patient-item > small {
  display: none;
}

.dashboard-patient-list .station-action-badges {
  display: grid;
  justify-items: end;
  gap: 7px;
  width: 100%;
}

.dashboard-patient-list .station-action-badges:empty {
  display: none;
}

.patient-list.station-patient-grid .station-patient-media {
  position: relative;
  display: grid;
  width: 146px;
  gap: 8px;
  align-content: start;
  padding-bottom: 12px;
}

.patient-list.station-patient-grid .station-patient-photo {
  width: 146px;
  height: 126px;
  border-radius: 8px;
}

.patient-list.station-patient-grid .station-patient-media strong {
  max-width: 100%;
  color: var(--purple-dark);
  font-size: clamp(1.02rem, 1.35vw, 1.32rem);
  font-weight: 960;
  line-height: 1.06;
  overflow-wrap: anywhere;
  margin: 0;
  min-height: 2.18em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.patient-list.station-patient-grid .station-card-badges {
  position: absolute;
  left: 12px;
  bottom: -11px;
  z-index: 7;
  display: flex;
  gap: 6px;
  min-height: 0;
  max-width: calc(100% - 24px);
  pointer-events: none;
}

.patient-list.station-patient-grid .station-card-badges:empty {
  display: none;
}

.patient-list.station-patient-grid .station-action-badges {
  display: grid;
  gap: 7px;
  width: 100%;
  justify-items: end;
  align-self: start;
  margin-top: 34px;
}

.patient-list.station-patient-grid .station-action-badges:empty {
  display: none;
}

.patient-list.station-patient-grid .patient-todo-badges,
.patient-list.station-patient-grid .patient-calendar-status {
  position: static;
  inset: auto;
  display: grid;
  max-width: 100%;
}

.patient-list.station-patient-grid .patient-todo-badges {
  justify-items: end;
}

.patient-list.station-patient-grid .patient-todo-badge {
  grid-template-columns: 24px minmax(0, auto) auto;
  justify-content: end;
  width: fit-content;
  max-width: 170px;
  min-height: 30px;
  border-radius: 8px;
  padding: 3px 8px 3px 4px;
}

.patient-list.station-patient-grid .patient-todo-badge.no-icon {
  grid-template-columns: minmax(0, auto) auto;
  padding-left: 9px;
}

.patient-list.station-patient-grid .patient-todo-badge.no-icon strong {
  display: none;
}

.patient-list.station-patient-grid .patient-todo-badge strong {
  display: inline-grid;
  width: 24px;
  min-width: 24px;
  height: 24px;
  place-items: center;
  align-items: center;
  justify-items: center;
  margin: 0;
  padding: 0;
  line-height: 1;
  text-align: center;
}

.patient-list.station-patient-grid .patient-calendar-status {
  display: inline-flex;
  width: fit-content;
  min-height: 29px;
  max-width: 72px;
  justify-content: flex-start;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(253, 234, 246, 0.74)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.48), rgba(255, 255, 255, 0.24));
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(192, 24, 120, 0.08),
    0 10px 20px rgba(87, 38, 104, 0.16);
  padding: 3px 11px;
  backdrop-filter: blur(14px) saturate(1.1);
}

.patient-list.station-patient-grid .patient-calendar-status strong {
  display: none;
}

.dashboard-patient-list .patient-calendar-status {
  display: inline-flex;
  grid-template-columns: none;
  width: fit-content;
  min-height: 28px;
  max-width: 72px;
  justify-content: flex-start;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(253, 234, 246, 0.74)),
    linear-gradient(315deg, rgba(246, 231, 255, 0.48), rgba(255, 255, 255, 0.24));
  box-shadow:
    var(--inner-glow),
    0 0 0 1px rgba(192, 24, 120, 0.08),
    0 10px 20px rgba(87, 38, 104, 0.16);
  padding: 3px 11px;
  backdrop-filter: blur(14px) saturate(1.1);
}

.dashboard-patient-list .patient-calendar-status strong {
  display: none;
}

.patient-list.station-patient-grid .patient-todo-badge span,
.patient-list.station-patient-grid .patient-calendar-status span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-list.station-patient-grid .patient-calendar-status span,
.dashboard-patient-list .patient-calendar-status span {
  font-size: 0.74rem;
}

.patient-list.station-patient-grid .patient-todo-badge::after,
.dashboard-patient-list .patient-todo-badge::after {
  z-index: 360;
  min-width: min(280px, 78vw);
  white-space: pre-line;
}

.patient-list.station-patient-grid .patient-todo-badge:hover,
.patient-list.station-patient-grid .patient-todo-badge:focus-visible,
.dashboard-patient-list .patient-todo-badge:hover,
.dashboard-patient-list .patient-todo-badge:focus-visible {
  z-index: 340;
}

@media (max-width: 640px) {
  .role-switch,
  .user-switch,
  .progress-note-toolbar,
  .progress-composer-tools,
  .progress-entry-meta,
  .progress-entry-actions,
  .progress-actions,
  .patient-overview-facts,
  .patient-action-grid,
  .quick-patient-filters,
  .topbar-actions,
  .measure-buttons,
  .patient-box,
  .time-grid,
  .patient-search-grid,
  .patient-modal-grid,
  .care-plan-meta-grid,
  .order-card {
    grid-template-columns: 1fr;
  }

  .patient-modal {
    max-height: calc(100vh - 32px);
    overflow: auto;
  }

  .topbar,
  .dashboard-hero,
  .patient-directory-header,
  .patient-file-header,
  .modal-heading,
  .workspace-header {
    align-items: stretch;
  }

  .patient-file-header {
    flex-direction: column;
  }

  .patient-file-header .ghost-action {
    margin-left: 0;
  }

  .progress-history-meta {
    display: grid;
  }

  .progress-history-bubble {
    padding: 13px 0 14px;
  }

  .topbar-actions {
    display: grid;
  }

  .station-switch,
  .user-switch {
    min-width: 0;
  }

  .brand-logo {
    min-height: 58px;
    gap: 10px;
  }

  .brand-wordmark {
    width: min(145px, 48vw);
    height: 58px;
  }

  .brand-mark {
    width: 62px;
    height: 62px;
  }

  .patient-directory,
  .dashboard-hero,
  .dashboard-card,
  .dashboard-patient-panel,
  .patient-file-main,
  .patient-record-panel,
  .workspace-header,
  .measure-panel,
  .time-panel,
  .documentation-panel,
  .summary-card,
  .orders-panel,
  .vision-panel {
    padding: 18px;
  }

  .calendar-day {
    min-height: 40px;
    font-size: 0.82rem;
  }
}
