:root {
  --navy-950: #071721;
  --navy-900: #0b2231;
  --navy-800: #123249;
  --blue-700: #0b63b8;
  --blue-600: #1477d4;
  --blue-500: #2d8ae3;
  --blue-100: #eaf4ff;
  --cyan-400: #44c6e8;
  --slate-900: #17232d;
  --slate-700: #435563;
  --slate-500: #70808c;
  --slate-300: #cbd5dc;
  --slate-200: #dde5ea;
  --slate-100: #edf2f5;
  --surface: #ffffff;
  --background: #f4f7f9;
  --success: #16825d;
  --success-bg: #e5f7f0;
  --warning: #9a6407;
  --warning-bg: #fff4d7;
  --danger: #b84343;
  --danger-bg: #ffebea;
  --shadow: 0 20px 60px rgba(4, 26, 42, 0.12);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--slate-900);
  background: var(--background);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--background);
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.62;
}

.application-body {
  background:
    radial-gradient(circle at 92% 6%, rgba(45, 138, 227, 0.12), transparent 27rem),
    var(--background);
}

.application-header {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 42px max(24px, calc((100vw - 1180px) / 2)) 18px;
  border-bottom: 1px solid var(--slate-200);
  background: rgba(255, 255, 255, 0.94);
}

.application-owner {
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.application-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0 90px;
}

.application-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(250px, 0.75fr);
  align-items: center;
  gap: 62px;
  margin-bottom: 46px;
}

.application-hero h1 {
  max-width: 800px;
  margin: 0;
  color: var(--navy-900);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.application-hero > div > p {
  max-width: 760px;
  margin: 22px 0;
  color: var(--slate-700);
  font-size: 17px;
  line-height: 1.7;
}

.application-promises {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.application-promises span,
.reference-chip {
  padding: 7px 11px;
  border: 1px solid #bfdaef;
  border-radius: 999px;
  color: var(--blue-700);
  background: var(--blue-100);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.application-brand-card {
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  color: #eaf7ff;
  background: linear-gradient(145deg, var(--navy-950), var(--navy-800));
  box-shadow: var(--shadow);
  text-align: center;
}

.application-brand-card img {
  width: min(230px, 100%);
  height: 150px;
  object-fit: contain;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
}

.application-brand-card strong {
  display: block;
  color: #fff;
  font-size: 16px;
}

.application-brand-card p {
  margin: 8px 0 0;
  color: #b8d1df;
  font-size: 12px;
  line-height: 1.6;
}

.application-panel {
  margin-top: 24px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--slate-200);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 16px 48px rgba(8, 39, 59, 0.08);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.section-heading h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-intro,
.commercial-note {
  color: var(--slate-500);
  font-size: 13px;
  line-height: 1.65;
}

.application-form {
  margin-top: 26px;
}

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

.form-grid label,
.capability-fieldset,
.attestation {
  color: var(--slate-700);
  font-size: 12px;
  font-weight: 750;
}

.form-grid label {
  display: grid;
  gap: 7px;
}

.capability-fieldset {
  margin: 26px 0;
  padding: 20px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
}

.capability-fieldset legend {
  padding: 0 8px;
  color: var(--navy-900);
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 20px;
}

.capability-grid label,
.attestation {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.45;
}

.capability-grid input,
.attestation input {
  width: 17px;
  min-height: 17px;
  flex: 0 0 auto;
  margin: 1px 0 0;
}

.attestation {
  padding: 15px;
  border-radius: 12px;
  background: var(--slate-100);
}

.form-submit-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
}

.form-submit-row .form-error {
  margin: 0;
}

.success-notice {
  display: grid;
  gap: 5px;
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid #b9e4d5;
  border-radius: 12px;
  color: #145e47;
  background: var(--success-bg);
  font-size: 13px;
  line-height: 1.5;
}

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

.offer-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  background: #fbfdff;
}

.offer-card.featured {
  border-color: var(--blue-500);
  box-shadow: inset 0 4px 0 var(--blue-600);
}

.offer-type {
  color: var(--blue-700);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.offer-card h3 {
  margin: 7px 0 4px;
  color: var(--navy-900);
  font-size: 22px;
}

.offer-card-header p,
.offer-summary {
  color: var(--slate-500);
  font-size: 12px;
  line-height: 1.55;
}

.offer-card ul {
  flex: 1;
  margin: 12px 0 20px;
  padding-left: 18px;
  color: var(--slate-700);
  font-size: 12px;
  line-height: 1.65;
}

.offer-capacity {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.capacity-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 10px;
  background: var(--slate-100);
}

.capacity-item small {
  color: var(--slate-500);
  font-size: 9px;
  text-transform: uppercase;
}

.capacity-item strong {
  color: var(--navy-900);
  font-size: 11px;
}

.proposal-label {
  margin-top: 16px;
  color: var(--blue-700);
  font-size: 12px;
}

.access-boundary {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding: 15px 18px;
  border: 1px solid #bfd8eb;
  border-radius: 12px;
  color: var(--navy-800);
  background: var(--blue-100);
}

.access-boundary p {
  margin: 0;
  color: var(--slate-700);
  font-size: 11px;
  line-height: 1.6;
}

.access-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.compact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: #fbfdff;
}

.compact-form label {
  display: grid;
  gap: 5px;
  color: var(--slate-700);
  font-size: 10px;
  font-weight: 750;
}

.compact-form input,
.compact-form select {
  min-height: 37px;
  font-size: 11px;
}

.compact-action {
  align-self: end;
  min-height: 37px;
  padding: 9px 12px;
  font-size: 10px;
}

.subsection-title {
  margin: 19px 0 9px;
  color: var(--navy-900);
  font-size: 12px;
}

.subsection-title:first-child {
  margin-top: 0;
}

.subsection-title.divided {
  padding-top: 17px;
  border-top: 1px solid var(--slate-200);
}

.invitation-form {
  grid-template-columns: 1fr;
}

.facility-list,
.identity-list {
  display: grid;
  gap: 8px;
}

.facility-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--slate-200);
  border-radius: 11px;
}

.facility-card > div,
.identity-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.facility-card strong,
.identity-row strong {
  color: var(--navy-900);
  font-size: 11px;
}

.facility-card small,
.identity-row small {
  overflow: hidden;
  color: var(--slate-500);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.facility-card .compact-action {
  grid-column: 1 / -1;
  justify-self: start;
}

.identity-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--slate-200);
}

.access-badge {
  justify-self: start;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.access-verified {
  color: var(--success);
  background: var(--success-bg);
}

.access-pending {
  color: var(--blue-700);
  background: var(--blue-100);
}

.access-required {
  color: var(--warning);
  background: var(--warning-bg);
}

.preview-ribbon {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 6px 20px;
  color: #e8f8ff;
  background: linear-gradient(90deg, #075682, #0b6f9d, #075682);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.login-view {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 72px 22px 42px;
  background:
    radial-gradient(circle at 75% 20%, rgba(39, 139, 216, 0.25), transparent 35%),
    radial-gradient(circle at 10% 90%, rgba(68, 198, 232, 0.12), transparent 28%),
    linear-gradient(135deg, var(--navy-950), #0e2c40 58%, #123c58);
}

.login-atmosphere {
  position: absolute;
  width: 650px;
  height: 650px;
  right: -160px;
  top: -180px;
  border: 1px solid rgba(104, 195, 244, 0.16);
  border-radius: 50%;
  box-shadow:
    0 0 0 80px rgba(104, 195, 244, 0.025),
    0 0 0 160px rgba(104, 195, 244, 0.02);
}

.login-card {
  position: relative;
  width: min(760px, 100%);
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 34px 90px rgba(0, 10, 18, 0.42);
}

.product-lockup,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-lockup {
  margin-bottom: 32px;
}

.medz-brand-logo {
  display: block;
  width: min(330px, 100%);
  height: auto;
}

.sidebar-brand.medz-logo-panel {
  width: 100%;
  min-height: 64px;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid rgba(174, 199, 216, 0.34);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 10, 18, 0.18);
}

.sidebar-brand.medz-logo-panel .medz-brand-logo {
  width: 100%;
  max-height: 48px;
  object-fit: contain;
}

.application-logo-lockup {
  width: min(280px, 62vw);
}

.application-logo-lockup .medz-brand-logo {
  width: 100%;
}

.medz-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px 4px 14px 4px;
  color: white;
  background: linear-gradient(145deg, var(--blue-500), #07538f);
  box-shadow: 0 7px 18px rgba(11, 99, 184, 0.28);
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 700;
}

.medz-mark.small {
  width: 40px;
  height: 40px;
  font-size: 23px;
}

.medz-name {
  color: var(--navy-900);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1;
}

.medz-subtitle {
  margin-top: 5px;
  color: var(--slate-500);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.login-card h1,
.topbar h1 {
  margin: 0;
  color: var(--navy-900);
  font-weight: 750;
  letter-spacing: -0.03em;
}

.login-card h1 {
  font-size: clamp(28px, 5vw, 42px);
}

.login-intro {
  max-width: 610px;
  margin: 12px 0 26px;
  color: var(--slate-700);
  font-size: 16px;
  line-height: 1.6;
}

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

.role-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 128px;
  padding: 18px;
  text-align: left;
  color: var(--slate-900);
  border: 1px solid var(--slate-200);
  border-radius: 16px;
  background: #fbfdff;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.role-card:hover,
.role-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--blue-500);
  box-shadow: 0 12px 30px rgba(10, 89, 151, 0.12);
  outline: none;
}

.role-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  align-self: start;
  border-radius: 11px;
  font-size: 22px;
  font-weight: 500;
}

.clinician-icon {
  color: var(--blue-700);
  background: var(--blue-100);
}

.role-copy {
  display: grid;
  gap: 7px;
}

.role-copy strong {
  color: var(--navy-900);
  font-size: 15px;
}

.role-copy small {
  color: var(--slate-500);
  font-size: 12px;
  line-height: 1.5;
}

.role-arrow {
  color: var(--blue-600);
  font-size: 20px;
}

.access-code-field {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  color: var(--slate-700);
  font-size: 12px;
  font-weight: 700;
}

.access-code-field small {
  color: var(--slate-500);
  font-weight: 500;
}

.portal-login-card,
.neutral-access-card {
  width: min(620px, 100%);
}

.portal-login-form {
  display: grid;
  gap: 12px;
}

.portal-entry-button {
  width: 100%;
  margin-top: 2px;
}

input,
select,
textarea {
  width: 100%;
  color: var(--slate-900);
  border: 1px solid var(--slate-300);
  border-radius: 10px;
  background: #fff;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input,
select {
  min-height: 42px;
  padding: 9px 12px;
}

textarea {
  min-height: 178px;
  padding: 12px;
  line-height: 1.55;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(45, 138, 227, 0.13);
}

.form-error {
  margin: 9px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.ownership-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--slate-200);
}

.ownership-lockup img {
  width: 78px;
  height: 62px;
  object-fit: contain;
}

.ownership-lockup p {
  margin: 0;
  color: var(--slate-500);
  font-size: 11px;
  line-height: 1.55;
}

.ownership-lockup strong {
  display: block;
  color: var(--slate-700);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  padding-top: 30px;
}

.sidebar {
  position: sticky;
  top: 30px;
  height: calc(100vh - 30px);
  display: flex;
  flex-direction: column;
  padding: 26px 20px 20px;
  color: #e8f1f6;
  background: linear-gradient(180deg, var(--navy-950), #0b2536 60%, #0a1d2b);
}

.sidebar .medz-name {
  color: white;
}

.sidebar .medz-subtitle {
  color: #91a9b9;
}

.main-nav {
  display: grid;
  gap: 6px;
  margin-top: 42px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 13px;
  color: #a9becb;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}

.nav-item.active {
  color: white;
  background: linear-gradient(90deg, rgba(45, 138, 227, 0.3), rgba(45, 138, 227, 0.08));
  box-shadow: inset 3px 0 var(--cyan-400);
}

.nav-item:disabled {
  opacity: 0.72;
}

.nav-symbol {
  width: 22px;
  color: #75b9e9;
  text-align: center;
  font-size: 17px;
}

.sidebar-spacer {
  flex: 1;
}

.control-badge {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px;
  border: 1px solid rgba(143, 183, 208, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.control-badge strong,
.control-badge small {
  display: block;
}

.control-badge strong {
  color: #dcecf5;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.control-badge small {
  margin-top: 4px;
  color: #849dac;
  font-size: 9px;
  line-height: 1.4;
}

.control-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 3px;
  border-radius: 50%;
  background: #55d9ad;
  box-shadow: 0 0 0 4px rgba(85, 217, 173, 0.1);
}

.sign-out {
  margin-top: 11px;
  padding: 10px;
  color: #93adbd;
  border: 0;
  background: transparent;
  font-size: 11px;
}

.sign-out:hover {
  color: white;
}

.main-content {
  min-width: 0;
  padding: 0 34px 50px;
}

.topbar {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.topbar h1 {
  font-size: 25px;
}

.topbar-actions,
.user-chip {
  display: flex;
  align-items: center;
}

.topbar-actions {
  gap: 18px;
}

.environment-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: var(--warning);
  border: 1px solid #efd899;
  border-radius: 999px;
  background: var(--warning-bg);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.environment-pill span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d79015;
}

.user-chip {
  gap: 10px;
}

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

.user-chip strong {
  color: var(--navy-900);
  font-size: 12px;
}

.user-chip small {
  margin-top: 3px;
  color: var(--slate-500);
  font-size: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--blue-600), var(--navy-800));
  font-size: 11px;
  font-weight: 800;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 6px 0 20px;
}

.metric-card,
.panel {
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(21, 54, 75, 0.035);
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 110px;
  padding: 18px;
}

.metric-card::after {
  content: "";
  position: absolute;
  width: 58px;
  height: 58px;
  right: -19px;
  bottom: -21px;
  border-radius: 50%;
  background: var(--blue-100);
}

.metric-label {
  display: block;
  color: var(--slate-500);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.metric-value {
  display: block;
  margin-top: 11px;
  color: var(--navy-900);
  font-size: 27px;
  font-weight: 780;
  letter-spacing: -0.03em;
}

.metric-caption {
  display: block;
  margin-top: 3px;
  color: var(--slate-500);
  font-size: 10px;
}

.workspace-content {
  min-width: 0;
}

.export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding: 17px 19px;
  color: var(--slate-700);
  border: 1px solid #b9daef;
  border-radius: 14px;
  background: linear-gradient(145deg, #f3faff, #fbfdff);
}

.export-bar strong {
  color: var(--navy-900);
  font-size: 13px;
}

.export-bar p {
  max-width: 720px;
  margin: 5px 0 0;
  font-size: 10px;
  line-height: 1.5;
}

.export-bar button {
  flex: 0 0 auto;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  gap: 20px;
  align-items: start;
}

.panel {
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--slate-200);
}

.panel-header h2,
.composer h2,
.note-detail h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 15px;
}

.panel-header p,
.composer-intro,
.detail-intro {
  margin: 5px 0 0;
  color: var(--slate-500);
  font-size: 11px;
  line-height: 1.5;
}

.panel-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: var(--blue-700);
  border-radius: 999px;
  background: var(--blue-100);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.note-list {
  display: grid;
}

.note-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(130px, 0.9fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 14px 20px;
  color: inherit;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--slate-100);
  background: white;
}

.compact-button {
  min-height: 34px;
  padding: 6px 11px;
}

.note-row:hover,
.note-row.selected {
  background: #f8fbfd;
}

.note-row.selected {
  box-shadow: inset 3px 0 var(--blue-500);
}

.note-row:last-child {
  border-bottom: 0;
}

.note-primary strong,
.note-secondary strong {
  display: block;
  color: var(--navy-900);
  font-size: 12px;
}

.note-primary small,
.note-secondary small {
  display: block;
  margin-top: 4px;
  color: var(--slate-500);
  font-size: 10px;
  line-height: 1.35;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-accepted,
.status-ready {
  color: var(--success);
  background: var(--success-bg);
}

.status-denied,
.status-draft {
  color: var(--danger);
  background: var(--danger-bg);
}

.status-approved {
  color: #255e9c;
  background: #e4f0ff;
}

.composer,
.note-detail {
  padding: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 17px;
}

.form-field {
  display: grid;
  gap: 6px;
  color: var(--slate-700);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.03em;
}

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

.primary-button,
.secondary-button,
.danger-button {
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 750;
}

.primary-button {
  color: white;
  border: 1px solid var(--blue-700);
  background: linear-gradient(180deg, var(--blue-600), var(--blue-700));
  box-shadow: 0 7px 16px rgba(20, 119, 212, 0.2);
}

.secondary-button {
  color: var(--blue-700);
  border: 1px solid #a8cae8;
  background: #f6fbff;
}

.danger-button {
  color: var(--danger);
  border: 1px solid #eab8b5;
  background: #fff7f6;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 17px;
}

.ai-guidance {
  margin-top: 15px;
  padding: 14px;
  border: 1px solid #b9daef;
  border-radius: 11px;
  background: linear-gradient(145deg, #f3faff, #f8fcff);
}

.ai-guidance strong {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--blue-700);
  font-size: 11px;
}

.ai-guidance p,
.ai-guidance li {
  color: var(--slate-700);
  font-size: 10px;
  line-height: 1.55;
}

.ai-guidance p {
  margin: 7px 0 0;
}

.ai-guidance ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin-top: 17px;
}

.detail-field {
  padding: 11px;
  border-radius: 9px;
  background: var(--slate-100);
}

.detail-field.wide {
  grid-column: 1 / -1;
}

.detail-field span,
.detail-field strong {
  display: block;
}

.detail-field span {
  color: var(--slate-500);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.detail-field strong {
  margin-top: 6px;
  color: var(--navy-900);
  font-size: 11px;
  line-height: 1.45;
}

.narrative-box {
  max-height: 170px;
  overflow: auto;
  margin-top: 14px;
  padding: 14px;
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  background: #fbfcfd;
  font-size: 11px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.code-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.code-chip {
  padding: 5px 7px;
  color: var(--navy-800);
  border: 1px solid #c8dbe8;
  border-radius: 6px;
  background: #f4faff;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
}

.warning-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--warning);
  font-size: 10px;
  line-height: 1.5;
}

.payout-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 14px;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 24px;
  max-width: 380px;
  padding: 13px 16px;
  color: white;
  border-radius: 10px;
  background: var(--navy-900);
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.45;
}

.guided-help-button,
.notification-button {
  min-height: 36px;
  color: var(--blue-700);
  border: 1px solid #b9d8ee;
  border-radius: 999px;
  background: #f5fbff;
  font-size: 10px;
  font-weight: 800;
}

.guided-help-button {
  padding: 7px 12px;
}

.notification-button {
  position: relative;
  width: 38px;
  padding: 0;
  font-size: 17px;
}

.notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  place-items: center;
  color: white;
  border: 2px solid white;
  border-radius: 999px;
  background: var(--danger);
  font-size: 8px;
  font-weight: 900;
}

.guided-tour {
  position: fixed;
  z-index: 100;
  inset: 0;
  pointer-events: none;
}

.guided-tour::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(45, 138, 227, 0.14), transparent 28rem),
    rgba(4, 22, 34, 0.66);
  backdrop-filter: blur(3px);
}

.tour-focus {
  position: relative !important;
  z-index: 102 !important;
  scroll-margin-block: 24px;
  outline: 4px solid #64c9ff !important;
  outline-offset: 5px;
  border-radius: 12px;
  box-shadow: 0 0 0 8px rgba(100, 201, 255, 0.22), 0 18px 48px rgba(0, 0, 0, 0.28) !important;
}

.tour-card {
  position: absolute;
  z-index: 104;
  right: 30px;
  bottom: 30px;
  width: min(440px, calc(100% - 36px));
  padding: 24px;
  overflow: hidden;
  pointer-events: auto;
  border: 1px solid #9fd4f3;
  border-radius: 20px;
  background: white;
  box-shadow: 0 28px 80px rgba(1, 20, 32, 0.38);
}

.tour-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--blue-700), var(--cyan-400));
}

.tour-card[data-placement="top-left"] {
  top: 30px;
  right: auto;
  bottom: auto;
  left: 30px;
}

.tour-card[data-placement="top-right"] {
  top: 30px;
  right: 30px;
  bottom: auto;
  left: auto;
}

.tour-card[data-placement="bottom-left"] {
  top: auto;
  right: auto;
  bottom: 30px;
  left: 30px;
}

.tour-card[data-placement="bottom-right"] {
  top: auto;
  right: 30px;
  bottom: 30px;
  left: auto;
}

.tour-card h2 {
  margin: 8px 0 8px;
  color: var(--navy-900);
  font-size: 21px;
  line-height: 1.25;
}

.tour-card p {
  margin: 0;
  color: var(--slate-700);
  font-size: 13px;
  line-height: 1.6;
}

.tour-progress,
.tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tour-progress {
  color: var(--slate-500);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.tour-progress-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 8px;
}

.tour-progress-track {
  width: min(230px, 100%);
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--slate-100);
}

.tour-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-700), var(--cyan-400));
  transition: width 180ms ease;
}

.tour-progress button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  color: var(--slate-500);
  border: 0;
  border-radius: 50%;
  background: #f3f7f9;
  font-size: 20px;
}

.tour-key-point {
  position: relative;
  margin-top: 16px;
  padding: 12px 13px 12px 38px;
  border: 1px solid #c7e1f4;
  border-radius: 12px;
  background: #f5fbff;
  color: var(--navy-800);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.tour-key-point::before {
  content: "✓";
  position: absolute;
  top: 12px;
  left: 13px;
  color: var(--success);
  font-size: 14px;
  font-weight: 900;
}

.tour-actions {
  justify-content: space-between;
  margin-top: 18px;
}

.tour-navigation {
  display: flex;
  gap: 9px;
}

.tour-skip-button {
  min-height: 40px;
  padding: 8px 4px;
  color: var(--slate-500);
  border: 0;
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

.tour-skip-button:hover,
.tour-skip-button:focus-visible {
  color: var(--blue-700);
  text-decoration: underline;
}

.learning-hero,
.reminder-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 20px;
  color: white;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--navy-900), #114c78);
  box-shadow: 0 14px 30px rgba(7, 38, 58, 0.16);
}

.learning-hero h2,
.reminder-hero h2 {
  margin: 0;
  font-size: 18px;
}

.learning-hero p,
.reminder-hero p {
  max-width: 760px;
  margin: 7px 0 0;
  color: #d8efff;
  font-size: 11px;
  line-height: 1.55;
}

.learning-hero .secondary-button,
.reminder-hero .secondary-button {
  flex: 0 0 auto;
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
}

.knowledge-library-preview {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid #bed9e9;
  border-radius: 15px;
  background: linear-gradient(145deg, #ffffff, #f5fbff);
  box-shadow: 0 8px 24px rgba(20, 66, 91, 0.07);
}

.knowledge-library-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.knowledge-library-heading h2 {
  margin: 5px 0 0;
  color: var(--navy-900);
  font-size: 17px;
}

.knowledge-library-heading p {
  max-width: 780px;
  margin: 7px 0 0;
  color: var(--slate-600);
  font-size: 10px;
  line-height: 1.55;
}

.knowledge-library-state {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: #76510a;
  border: 1px solid #ecd291;
  border-radius: 999px;
  background: #fff9e8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.knowledge-query-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin: 17px 0 14px;
}

.knowledge-query-field {
  display: grid;
  gap: 6px;
  color: var(--slate-700);
  font-size: 9px;
  font-weight: 800;
}

.knowledge-query-field input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  color: var(--navy-900);
  border: 1px solid var(--slate-200);
  border-radius: 9px;
  background: white;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
}

.knowledge-query-field input:focus-visible {
  outline: 3px solid rgba(24, 135, 196, 0.2);
  border-color: var(--blue-500);
}

.knowledge-source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.knowledge-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 11px 12px;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  background: white;
}

.knowledge-source-row strong,
.knowledge-source-row small {
  display: block;
}

.knowledge-source-row strong {
  color: var(--navy-900);
  font-size: 10px;
}

.knowledge-source-row small {
  margin-top: 4px;
  color: var(--slate-500);
  font-size: 8px;
  line-height: 1.35;
}

.knowledge-status {
  flex: 0 0 auto;
  max-width: 132px;
  padding: 5px 7px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.knowledge-status-current { color: #176544; background: #e4f7ed; }
.knowledge-status-review { color: #245f89; background: #e7f3fb; }
.knowledge-status-quarantined { color: #9b342c; background: #fce9e7; }
.knowledge-status-approval { color: #76510a; background: #fff4d6; }

.knowledge-guardrail {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  color: #57430f;
  border-left: 3px solid #d7a72f;
  border-radius: 7px;
  background: #fff9e8;
  font-size: 9px;
  line-height: 1.45;
}

.knowledge-guardrail strong {
  flex: 0 0 auto;
}

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

.learning-card {
  display: grid;
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: white;
  box-shadow: 0 2px 10px rgba(21, 54, 75, 0.035);
}

.learning-card.high-risk {
  border-color: #efc39a;
  box-shadow: inset 0 3px #e7963b;
}

.learning-card .learning-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--slate-500);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.learning-card h3 {
  margin: 16px 0 8px;
  color: var(--navy-900);
  font-size: 14px;
}

.learning-card p {
  margin: 0;
  color: var(--slate-700);
  font-size: 10px;
  line-height: 1.6;
}

.learning-source {
  align-self: end;
  margin-top: 16px;
  padding-top: 12px;
  color: var(--slate-500);
  border-top: 1px solid var(--slate-100);
  font-size: 9px;
  line-height: 1.45;
}

.digest-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 15px 18px;
  border: 1px solid #b9daef;
  border-radius: 13px;
  background: #f4faff;
}

.digest-banner strong,
.digest-banner small {
  display: block;
}

.digest-banner strong {
  color: var(--navy-900);
  font-size: 12px;
}

.digest-banner small {
  margin-top: 4px;
  color: var(--slate-500);
  font-size: 10px;
}

.reminder-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}

.reminder-settings label,
.preference-group {
  display: grid;
  gap: 7px;
  color: var(--slate-700);
  font-size: 10px;
  font-weight: 750;
}

.preference-group.wide,
.reminder-actions {
  grid-column: 1 / -1;
}

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

.check-option {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--slate-200);
  border-radius: 9px;
  background: #fbfcfd;
  font-weight: 600 !important;
}

.check-option input {
  width: auto;
  margin: 0 8px 0 0;
}

.practice-selection-fieldset legend small {
  color: var(--slate-500);
  font-size: 11px;
  font-weight: 600;
}

.field-help {
  margin: 0 0 14px;
  color: var(--slate-600);
  font-size: 12px;
  line-height: 1.55;
}

.practice-option-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 430px;
  padding: 4px;
  overflow: auto;
}

.practice-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  background: #fbfcfd;
}

.practice-option input {
  width: auto;
  min-height: auto;
  margin-top: 3px;
}

.practice-option span,
.practice-option strong,
.practice-option small {
  display: block;
}

.practice-option small {
  margin-top: 3px;
  color: var(--slate-500);
  font-weight: 500;
  line-height: 1.35;
}

.practice-chip-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.practice-chip { padding: 7px 10px; border: 1px solid #b9d7ec; border-radius: 999px; background: #eef8ff; color: #0b527e; font-size: 11px; font-weight: 750; }
.compact-form .preference-group, .practice-request-form, .practice-catalog-form { grid-column: 1 / -1; }
.practice-request-list { display: grid; gap: 9px; }
.practice-request-row, .practice-approval-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px; border: 1px solid var(--slate-200); border-radius: 10px; background: #fbfcfd; }
.practice-request-row strong, .practice-request-row small, .practice-approval-row strong, .practice-approval-row small { display: block; }
.practice-request-row small, .practice-approval-row small, .practice-approval-row p { margin: 4px 0 0; color: var(--slate-500); font-size: 11px; }

.team-invite-form { margin-bottom: 0; }
.team-member-list { display: grid; gap: 12px; }
.team-member-card { padding: 15px; border: 1px solid var(--slate-200); border-radius: 12px; background: #fbfcfd; }
.team-member-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.team-member-heading strong, .team-member-heading small { display: block; }
.team-member-heading small { margin-top: 4px; color: var(--slate-500); font-size: 10px; }
.team-settings-form { margin-top: 12px; }

.signature-boundary {
  background: linear-gradient(135deg, #eef8ff, #f8fbfd);
}

.signature-profile-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(280px, 1.2fr);
  gap: 18px;
  align-items: stretch;
}

.signature-specimen-card {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 22px;
  border: 1px solid #b9d7ec;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #f1f8fc);
  text-align: center;
}

.signature-specimen-label {
  color: var(--slate-500);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.signature-specimen {
  color: #0b527e;
  font-family: "Segoe Script", "Bradley Hand", cursive;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  transform: rotate(-3deg);
}

.signature-specimen-card small,
.signature-change-status small {
  color: var(--slate-500);
  line-height: 1.45;
}

.signature-profile-details,
.signature-identity-grid {
  align-content: start;
}

.signature-change-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.signature-change-form textarea {
  min-height: 88px;
}

.signature-change-status {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid #e7c879;
  border-radius: 12px;
  background: #fff9e9;
}

.signature-change-status strong,
.signature-change-status small {
  display: block;
}

.signature-change-status p,
.signature-lock-note {
  margin: 7px 0;
  color: var(--slate-600);
  font-size: 12px;
  line-height: 1.55;
}

.wet-signature-flow {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--slate-700);
  font-size: 12px;
  line-height: 1.55;
}

.reminder-actions {
  display: flex;
  justify-content: flex-end;
}

.empty-state {
  padding: 40px 20px;
  color: var(--slate-500);
  text-align: center;
  font-size: 12px;
}

@media (max-width: 1080px) {
  .practice-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .application-hero,
  .access-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .main-content {
    padding-inline: 24px;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .signature-profile-layout {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .learning-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  button,
  input,
  select {
    min-height: 44px;
  }

  textarea {
    min-height: 220px;
  }

  .application-header,
  .section-heading,
  .form-submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .application-main {
    width: min(100% - 28px, 1180px);
    padding-top: 34px;
  }

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

  .learning-grid,
  .knowledge-source-list,
  .reminder-settings,
  .check-grid {
    grid-template-columns: 1fr;
  }

  .learning-hero,
  .knowledge-library-heading,
  .reminder-hero,
  .digest-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .knowledge-query-form {
    grid-template-columns: 1fr;
  }

  .knowledge-source-row,
  .knowledge-guardrail {
    align-items: flex-start;
    flex-direction: column;
  }

  .knowledge-status {
    max-width: none;
  }

  .tour-card {
    right: 14px;
    bottom: 14px;
    left: 14px;
    width: auto;
    padding: 20px;
  }

  .tour-card[data-placement^="top"] {
    top: 14px;
    right: 14px;
    bottom: auto;
    left: 14px;
  }

  .tour-card[data-placement^="bottom"] {
    top: auto;
    right: 14px;
    bottom: 14px;
    left: 14px;
  }

  .tour-actions {
    align-items: stretch;
  }

  .tour-navigation {
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  .application-hero {
    gap: 28px;
  }

  .form-grid,
  .capability-grid,
  .offer-grid,
  .compact-form {
    grid-template-columns: 1fr;
  }

  .practice-option-grid {
    grid-template-columns: 1fr;
    max-height: 520px;
  }

  .offer-capacity {
    grid-template-columns: 1fr;
  }

  .role-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: 27px 22px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px 18px;
    flex-direction: row;
    align-items: center;
    gap: 15px;
  }

  .sidebar .medz-logo-panel {
    width: min(190px, calc(100% - 92px));
    min-height: 54px;
  }

  .main-nav,
  .control-badge,
  .sidebar-spacer {
    display: none;
  }

  .privileged-body .sidebar {
    flex-wrap: wrap;
  }

  .clinical-body .sidebar {
    flex-wrap: wrap;
  }

  .privileged-body .main-nav {
    order: 3;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .clinical-body .main-nav {
    order: 3;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .clinical-body .main-nav .nav-item[disabled] {
    display: none;
  }

  .practice-request-row,
  .practice-approval-row,
  .team-member-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .privileged-body .main-nav .nav-item[disabled] {
    display: none;
  }

  .identity-row {
    grid-template-columns: 1fr 1fr;
  }

  .toast {
    right: 14px;
    bottom: 14px;
    left: 14px;
    max-width: none;
  }

  .sign-out {
    margin: 0 0 0 auto;
  }

  .main-content {
    padding: 0 16px 35px;
  }

  .topbar {
    align-items: flex-start;
    padding: 20px 0;
  }

  .environment-pill,
  .user-chip > span:not(.avatar) {
    display: none;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .export-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .note-row {
    grid-template-columns: 1fr auto;
  }

  .note-row .note-secondary:first-of-type {
    display: none;
  }
}

@media (max-width: 470px) {
  .metrics-grid,
  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .form-field.full,
  .detail-field.wide {
    grid-column: auto;
  }

  .ownership-lockup img {
    width: 60px;
  }

  .preview-ribbon {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.assistant-launch {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid rgba(68, 198, 232, 0.52);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--navy-900), var(--blue-700));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 42px rgba(7, 23, 33, 0.28);
}

.assistant-launch span {
  color: var(--cyan-400);
  font-size: 18px;
}

.assistant-panel {
  position: fixed;
  right: 24px;
  bottom: 86px;
  z-index: 69;
  display: grid;
  grid-template-rows: auto auto minmax(150px, 1fr) auto auto;
  width: min(420px, calc(100vw - 32px));
  max-height: min(700px, calc(100vh - 126px));
  overflow: hidden;
  border: 1px solid var(--slate-200);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 26px 74px rgba(7, 23, 33, 0.28);
}

.assistant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
  color: #fff;
}

.assistant-header h2 {
  margin: 3px 0 0;
  font-size: 18px;
}

.assistant-header .eyebrow {
  color: var(--cyan-400);
}

.assistant-header button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.assistant-notice {
  margin: 0;
  padding: 11px 20px;
  border-bottom: 1px solid var(--slate-200);
  background: var(--blue-100);
  color: var(--slate-700);
  font-size: 12px;
  line-height: 1.45;
}

.assistant-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 170px;
  padding: 18px;
  overflow-y: auto;
  background: #f8fafb;
}

.assistant-message {
  max-width: 88%;
  padding: 12px 14px;
  border: 1px solid var(--slate-200);
  border-radius: 15px 15px 15px 4px;
  background: #fff;
  color: var(--slate-900);
  box-shadow: 0 7px 18px rgba(7, 23, 33, 0.06);
}

.assistant-message-user {
  align-self: flex-end;
  border-color: var(--blue-700);
  border-radius: 15px 15px 4px 15px;
  background: var(--blue-700);
  color: #fff;
}

.assistant-message strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.assistant-message p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.assistant-evidence {
  margin: 9px 0 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.45;
}

.assistant-prompts {
  display: flex;
  gap: 7px;
  padding: 10px 16px;
  overflow-x: auto;
  border-top: 1px solid var(--slate-200);
  background: #fff;
}

.assistant-prompt {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--slate-300);
  border-radius: 999px;
  background: #fff;
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 700;
}

.assistant-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--slate-200);
  background: #fff;
}

.assistant-form textarea {
  width: 100%;
  min-height: 46px;
  max-height: 120px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--slate-300);
  border-radius: 12px;
}

.document-intake {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid #b9d9f6;
  border-radius: 16px;
  background: linear-gradient(145deg, #f7fbff, #fff);
}

.document-intake-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.document-intake-heading h3,
.document-intake-heading p {
  margin: 0;
}

.document-intake-heading p {
  margin-top: 5px;
  color: var(--slate-700);
  font-size: 13px;
  line-height: 1.5;
}

.intake-status-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.synthetic-attestation {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--warning-bg);
  color: #694708;
  font-size: 13px;
  font-weight: 700;
}

.synthetic-attestation input {
  width: 18px;
  height: 18px;
}

.intake-source-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.intake-source-card {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(7, 34, 49, 0.05);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease, background 150ms ease;
}

.intake-source-button {
  color: var(--navy-900);
  text-align: left;
}

.intake-source-button:not(:disabled):hover {
  border-color: #79b7e9;
  background: #f8fcff;
  box-shadow: 0 10px 24px rgba(11, 99, 184, 0.12);
  transform: translateY(-1px);
}

.intake-source-button:focus-visible {
  outline: 3px solid rgba(20, 119, 212, 0.3);
  outline-offset: 3px;
}

.intake-source-button.selected {
  border-color: var(--blue-600);
  background: linear-gradient(145deg, #f2f9ff, #fff);
  box-shadow: 0 0 0 2px rgba(20, 119, 212, 0.12), 0 10px 24px rgba(11, 99, 184, 0.1);
}

.intake-source-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--blue-100);
  color: var(--blue-700);
}

.intake-source-icon svg {
  width: 25px;
  height: 25px;
}

.intake-source-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.intake-source-copy strong {
  color: var(--navy-900);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.intake-source-copy small {
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 550;
  line-height: 1.35;
}

.intake-source-arrow {
  color: var(--slate-300);
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.intake-source-button.selected .intake-source-icon {
  color: #fff;
  background: linear-gradient(145deg, var(--blue-600), var(--blue-700));
}

.intake-source-button.selected .intake-source-arrow {
  color: var(--blue-600);
}

.intake-selection {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border: 1px dashed var(--slate-300);
  border-radius: 10px;
  background: #fff;
}

.intake-selection small {
  color: var(--slate-500);
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .assistant-launch {
    right: 16px;
    bottom: 16px;
  }

  .assistant-panel {
    right: 8px;
    bottom: 76px;
    width: calc(100vw - 16px);
    max-height: calc(100vh - 100px);
    border-radius: 18px;
  }

  .intake-source-card {
    min-height: 80px;
  }

  .document-intake-heading,
  .assistant-form {
    grid-template-columns: 1fr;
  }

  .document-intake-heading {
    flex-direction: column;
  }

  .assistant-form button {
    width: 100%;
  }
}

.directory-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid #b9d9f6;
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 20%, rgba(68, 198, 232, 0.18), transparent 17rem),
    linear-gradient(135deg, #f8fcff, #fff);
}

.directory-hero h2,
.directory-hero p {
  margin: 0;
}

.directory-hero h2 {
  margin-top: 5px;
  font-size: 24px;
}

.directory-hero p {
  max-width: 760px;
  margin-top: 8px;
  color: var(--slate-700);
  line-height: 1.55;
}

.directory-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px auto auto;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: #fff;
}

.directory-filter-bar input,
.directory-filter-bar select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--slate-300);
  border-radius: 10px;
  background: #fff;
}

.facility-directory-layout {
  display: grid;
  grid-template-columns: minmax(330px, 0.78fr) minmax(0, 1.55fr);
  gap: 18px;
  align-items: start;
}

.facility-directory-layout > .panel,
.facility-workspace-detail {
  min-width: 0;
}

.facility-directory-list {
  display: grid;
}

.facility-directory-card {
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 17px 18px;
  border: 0;
  border-top: 1px solid var(--slate-200);
  background: #fff;
  color: var(--slate-900);
  text-align: left;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.facility-directory-card:first-child {
  border-top: 0;
}

.facility-directory-card:hover,
.facility-directory-card.selected {
  background: #f4faff;
}

.facility-directory-card.selected {
  box-shadow: inset 4px 0 0 var(--blue-600);
}

.facility-directory-heading,
.facility-directory-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.facility-directory-heading > span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.facility-directory-heading strong {
  font-size: 15px;
}

.facility-directory-heading small,
.facility-directory-footer small {
  color: var(--slate-500);
  line-height: 1.4;
}

.facility-directory-counts,
.record-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.directory-count {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 9px;
  background: var(--slate-100);
  text-align: center;
}

.directory-count strong {
  font-size: 15px;
}

.directory-count small {
  color: var(--slate-500);
  font-size: 10px;
  text-transform: uppercase;
}

.facility-risk {
  color: var(--danger);
  font-size: 11px;
  white-space: nowrap;
}

.facility-clear {
  color: var(--success);
  font-size: 11px;
  white-space: nowrap;
}

.facility-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 180px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.facility-status-verified {
  background: var(--success-bg);
  color: var(--success);
}

.facility-status-pending {
  background: var(--warning-bg);
  color: var(--warning);
}

.facility-status-blocked {
  background: var(--danger-bg);
  color: var(--danger);
}

.facility-workspace-detail {
  overflow: hidden;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 13px 40px rgba(7, 23, 33, 0.08);
}

.facility-workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
  color: #fff;
}

.facility-workspace-header h2,
.facility-workspace-header p {
  margin: 0;
}

.facility-workspace-header h2 {
  margin-top: 5px;
  font-size: 22px;
}

.facility-workspace-header p {
  margin-top: 5px;
  color: #cfe0ea;
  font-size: 12px;
}

.facility-workspace-header .eyebrow {
  color: var(--cyan-400);
}

.facility-tabs {
  display: flex;
  gap: 2px;
  padding: 0 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--slate-200);
  background: #fff;
}

.facility-tab {
  flex: 0 0 auto;
  padding: 14px 11px 12px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 800;
}

.facility-tab:hover,
.facility-tab.active {
  color: var(--blue-700);
}

.facility-tab.active {
  border-bottom-color: var(--blue-600);
}

.facility-workspace-body {
  padding: 20px;
}

.facility-overview {
  display: grid;
  gap: 18px;
}

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

.facility-metric {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--slate-200);
  border-radius: 11px;
  background: #f9fbfc;
}

.facility-metric small {
  color: var(--slate-500);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.facility-metric strong {
  font-size: 17px;
}

.facility-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.75fr);
  gap: 14px;
}

.facility-overview-card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--slate-200);
  border-radius: 13px;
}

.facility-overview-card > h3:first-child {
  margin: 0 0 14px;
}

.compact-details {
  margin-bottom: 14px;
}

.overview-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--slate-200);
}

.overview-line:first-of-type {
  border-top: 0;
}

.overview-line span {
  color: var(--slate-700);
  font-size: 13px;
}

.facility-record-list,
.facility-audit-list {
  display: grid;
  gap: 10px;
}

.facility-record-card,
.facility-document-card,
.facility-audit-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 15px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: #fff;
}

.facility-record-card > div:first-child,
.facility-document-card > div:nth-child(2),
.facility-audit-event > div:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.facility-record-card small,
.facility-document-card small,
.facility-audit-event small {
  color: var(--slate-500);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.record-counts {
  grid-template-columns: repeat(3, 72px);
}

.note-record-card {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.document-register-notice {
  padding: 13px 15px;
  border: 1px solid #b9d9f6;
  border-radius: 11px;
  background: var(--blue-100);
}

.document-register-notice p {
  margin: 5px 0 0;
  color: var(--slate-700);
  font-size: 12px;
  line-height: 1.45;
}

.facility-document-card {
  grid-template-columns: 54px minmax(0, 1fr) auto auto;
}

.document-type-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 11px;
  background: var(--navy-900);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.document-status-stack {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.facility-audit-event {
  grid-template-columns: 16px minmax(0, 1fr) auto;
}

.audit-marker {
  width: 11px;
  height: 11px;
  border: 3px solid #d5f2e7;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px #edf9f4;
}

.audit-marker.review {
  border-color: #ffe6a8;
  background: var(--warning);
  box-shadow: 0 0 0 3px #fff8e7;
}

@media (max-width: 1180px) {
  .facility-directory-layout {
    grid-template-columns: 1fr;
  }

  .facility-directory-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facility-directory-card:nth-child(2) {
    border-top: 0;
    border-left: 1px solid var(--slate-200);
  }
}

@media (max-width: 900px) {
  .directory-filter-bar {
    grid-template-columns: 1fr 180px;
  }

  .facility-overview-grid {
    grid-template-columns: 1fr;
  }

  .facility-record-card,
  .note-record-card,
  .facility-document-card {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .document-status-stack {
    justify-items: start;
  }
}

@media (max-width: 760px) {
  .directory-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .directory-filter-bar,
  .facility-directory-list,
  .facility-metric-grid {
    grid-template-columns: 1fr;
  }

  .facility-directory-card:nth-child(2) {
    border-left: 0;
    border-top: 1px solid var(--slate-200);
  }

  .facility-directory-heading,
  .facility-directory-footer,
  .facility-workspace-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .facility-directory-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .facility-workspace-body {
    padding: 14px;
  }

  .facility-audit-event {
    grid-template-columns: 16px minmax(0, 1fr);
  }

  .facility-audit-event .facility-status-badge {
    grid-column: 2;
  }
}
