:root {
  --bg: #eef3f8;
  --surface: rgba(255, 255, 255, 0.7);
  --surface-solid: #ffffff;
  --surface-soft: rgba(235, 242, 249, 0.78);
  --text: #132238;
  --muted: #65758a;
  --line: rgba(44, 76, 112, 0.12);
  --primary: #0a84ff;
  --primary-dark: #0067cc;
  --accent: #5ac8fa;
  --danger: #b91c1c;
  --glass-border: rgba(255, 255, 255, 0.78);
  --shadow: 0 12px 30px rgba(38, 68, 104, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  --shadow-raised: 0 18px 42px rgba(32, 58, 92, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  --control-shadow: 0 0 0 4px rgba(10, 132, 255, 0.13);
  --field-interaction-shadow: 0 0 0 3px rgba(10, 132, 255, 0.08);
  --radius-card: 24px;
  --radius-control: 14px;
  --ease-fluid: cubic-bezier(0.22, 1, 0.36, 1);
  --font-caption: 12px;
  --font-label: 13px;
  --font-body: 14px;
  --font-section: 19px;
  --font-page: 28px;
  --button-height-large: 48px;
  --button-height-medium: 40px;
  --button-height-small: 32px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  min-height: 36px;
  padding: 0 14px;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

button:hover:not(:disabled) {
  background: var(--primary-dark);
  color: #fff;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button.is-click-feedback {
  animation: portal-button-feedback 420ms var(--ease-fluid);
}

button.is-operation-loading {
  cursor: progress;
  pointer-events: none;
}

button.is-operation-loading .operation-button-spinner {
  animation: portal-loading-spin 720ms linear infinite;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  border-top-color: currentColor;
  display: inline-block;
  flex: 0 0 auto;
  height: 14px;
  margin-left: 8px;
  vertical-align: -2px;
  width: 14px;
}

body.portal-data-loading {
  cursor: progress;
  overflow: hidden;
}

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

.portal-loading-overlay {
  align-items: center;
  background: linear-gradient(135deg, rgba(224, 236, 248, 0.68), rgba(242, 247, 252, 0.54));
  backdrop-filter: blur(8px) saturate(1.08);
  border: 0;
  display: flex;
  inset: 0;
  justify-content: center;
  margin: 0;
  max-height: none;
  max-width: none;
  overflow: hidden;
  padding: 24px;
  pointer-events: auto;
  position: fixed;
  height: 100vh;
  transition: backdrop-filter 460ms ease, -webkit-backdrop-filter 460ms ease;
  width: 100vw;
  z-index: 300;
}

.portal-loading-overlay.is-task-entering {
  animation: portal-loading-overlay-in 180ms ease-out both;
}

.portal-loading-overlay::backdrop {
  background: transparent;
}

.portal-loading-dialog {
  align-items: center;
  background: var(--surface-solid);
  border: 1px solid #d5e4ef;
  border-radius: 16px;
  box-shadow: var(--shadow-raised);
  display: grid;
  column-gap: 14px;
  grid-template-columns: auto minmax(0, 1fr);
  justify-items: start;
  max-width: 420px;
  padding: 22px 24px;
  position: relative;
  text-align: left;
  width: min(100%, 420px);
  z-index: 2;
}

.portal-loading-overlay.is-task-entering .portal-loading-dialog {
  animation: portal-loading-dialog-in 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.portal-loading-logo {
  filter: drop-shadow(0 5px 12px rgba(21, 77, 138, 0.1));
  grid-column: 1 / -1;
  height: auto;
  justify-self: center;
  margin-bottom: 4px;
  max-width: 148px;
  width: 42%;
}

.portal-loading-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.portal-login-identity {
  align-items: center;
  column-gap: 14px;
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(0, 1fr);
  justify-self: stretch;
  min-width: 0;
}

.portal-loading-overlay.is-login-identity .portal-loading-spinner,
.portal-loading-overlay.is-login-identity .portal-loading-copy {
  display: none;
}

.portal-loading-overlay.is-login-identity .portal-login-identity {
  display: grid;
}

.portal-login-identity-mark {
  align-items: center;
  animation: portal-login-identity-mark-in 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
  background: linear-gradient(145deg, #074f9b, #0a84ff);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(16, 90, 161, 0.22), 0 0 0 6px rgba(10, 132, 255, 0.08);
  color: #fff;
  display: inline-flex;
  font-size: 21px;
  font-weight: 800;
  height: 52px;
  justify-content: center;
  position: relative;
  width: 52px;
}

.portal-login-identity-mark::after {
  background: #23a875;
  border: 2px solid #fff;
  border-radius: 50%;
  bottom: -4px;
  box-shadow: 0 3px 8px rgba(35, 168, 117, 0.28);
  content: "";
  height: 12px;
  position: absolute;
  right: -4px;
  width: 12px;
}

.portal-login-identity-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.portal-login-identity-copy > * {
  animation: portal-login-identity-copy-in 520ms cubic-bezier(0.22, 1, 0.36, 1) 110ms backwards;
}

.portal-login-identity-copy small {
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.portal-login-identity-copy strong {
  font-size: 19px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-login-identity-copy span {
  color: var(--muted);
  font-size: 13px;
}

.portal-loading-overlay.is-login-identity .portal-loading-dialog {
  animation: portal-login-identity-card-confirm 760ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.portal-loading-spinner {
  animation: portal-loading-spin 720ms linear infinite;
  border: 3px solid rgba(10, 132, 255, 0.16);
  border-radius: 50%;
  border-top-color: var(--primary);
  height: 30px;
  position: relative;
  width: 30px;
}

.portal-loading-dialog strong {
  color: var(--text);
  font-size: 17px;
}

.portal-loading-copy p {
  color: var(--muted);
  font-size: 13px;
  margin: 3px 0 0;
}

.portal-loading-overlay.is-complete .portal-loading-logo {
  animation: portal-loading-logo-confirm 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.portal-loading-overlay.is-complete .portal-loading-spinner {
  animation: portal-loading-brand-confirm 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
  background: #23a875;
  border-color: #23a875;
  box-shadow: 0 0 0 7px rgba(35, 168, 117, 0.12);
}

.portal-loading-overlay.is-complete .portal-loading-spinner::after {
  border: solid #fff;
  border-width: 0 2px 2px 0;
  content: "";
  height: 11px;
  left: 10px;
  position: absolute;
  top: 6px;
  transform: rotate(45deg);
  width: 6px;
}

.portal-loading-overlay.is-complete .portal-loading-progress > span {
  animation: none;
  background: linear-gradient(90deg, #0a84ff, #23a875);
  transform: translateX(0);
  width: 100%;
}

.portal-loading-overlay.is-revealing {
  -webkit-backdrop-filter: blur(0) saturate(1);
  backdrop-filter: blur(0) saturate(1);
}

.portal-loading-overlay.is-revealing .portal-loading-dialog {
  animation: portal-loading-dialog-out 360ms cubic-bezier(0.4, 0, 1, 1) both;
}

.portal-loading-progress {
  background: rgba(10, 132, 255, 0.1);
  border-radius: 999px;
  grid-column: 1 / -1;
  height: 3px;
  margin-top: 4px;
  overflow: hidden;
  width: 100%;
}

.portal-loading-progress > span {
  animation: portal-loading-progress 1.1s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
  display: block;
  height: 100%;
  transform: translateX(-100%);
  width: 58%;
}

@keyframes portal-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes portal-loading-overlay-in {
  from {
    opacity: 0;
  }
}

@keyframes portal-loading-dialog-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}

@keyframes portal-loading-dialog-out {
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.975);
  }
}

@keyframes portal-loading-logo-confirm {
  50% {
    filter: drop-shadow(0 0 18px rgba(10, 132, 255, 0.38));
    transform: scale(1.035);
  }
}

@keyframes portal-loading-brand-confirm {
  from {
    opacity: 0.75;
    transform: scale(0.78);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes portal-login-identity-card-confirm {
  0% {
    border-color: #d5e4ef;
    box-shadow: var(--shadow-raised);
  }
  46% {
    border-color: rgba(10, 132, 255, 0.38);
    box-shadow: 0 22px 52px rgba(19, 86, 151, 0.2), 0 0 0 8px rgba(10, 132, 255, 0.06);
  }
}

@keyframes portal-login-identity-mark-in {
  from {
    opacity: 0;
    transform: scale(0.72) rotate(-7deg);
  }
}

@keyframes portal-login-identity-copy-in {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
}

@keyframes portal-loading-progress {
  50% {
    transform: translateX(72%);
  }
  100% {
    transform: translateX(172%);
  }
}

@keyframes portal-button-feedback {
  0% {
    box-shadow: 0 0 0 0 rgba(10, 132, 255, 0.34);
  }
  55% {
    box-shadow: 0 0 0 5px rgba(10, 132, 255, 0.14);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(10, 132, 255, 0);
  }
}

.sidebar {
  background: #dcecf7;
  border-right: 1px solid #bdd5e5;
  color: #24445c;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
}

.brand {
  display: grid;
  margin-bottom: 32px;
}

.brand-logo-frame {
  background: #fff;
  border: 1px solid #d4e4ef;
  border-radius: 6px;
  height: 70px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.brand-logo {
  display: block;
  left: 50%;
  max-width: none;
  position: absolute;
  top: -12px;
  transform: translateX(-50%);
  width: 240px;
}

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

.account-profile-nav {
  margin-top: 12px;
}

.nav-item {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: #395a72;
  display: flex;
  justify-content: flex-start;
  min-height: 42px;
  text-align: left;
  width: 100%;
}

.nav-item:hover {
  background: #eaf5fc;
  border-color: #b6d5e8;
  color: #1f567c;
}

.nav-item.active {
  background: #fff;
  border-color: #78add0;
  box-shadow: 0 3px 10px rgba(42, 104, 145, 0.09);
  color: #175c8b;
  font-weight: 700;
}

.user-card {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid #c8ddea;
  border-radius: 8px;
  margin-top: auto;
  padding: 14px;
}

.user-card strong,
.user-card span {
  display: block;
}

.user-identity {
  min-width: 0;
}

.user-identity strong {
  overflow-wrap: anywhere;
}

.user-role {
  color: #d9a441;
  font-size: 12px;
  margin-bottom: 6px;
}

.user-card button {
  margin-top: 12px;
  width: 100%;
}

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

.topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 28px;
  margin-bottom: 0;
}

h2 {
  font-size: 18px;
  margin-bottom: 0;
}

h3 {
  font-size: 15px;
  margin-bottom: 0;
}

.account-box {
  align-items: center;
  display: flex;
  gap: 12px;
}

.account-box span {
  color: var(--muted);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.account-profile-layout {
  display: grid;
  gap: 20px;
}

.account-profile-panel {
  margin: 0;
}

.account-profile-summary {
  margin-top: 18px;
}

.account-profile-readonly-grid {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.account-profile-readonly-grid > div {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 6px;
  padding: 15px 10px;
}

.account-profile-readonly-grid dt {
  color: var(--muted);
  font-size: 13px;
}

.account-profile-readonly-grid dd {
  color: var(--text);
  font-weight: 600;
  margin: 0;
  overflow-wrap: anywhere;
}

.account-profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.account-profile-tags > span {
  background: #f4f8fb;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  padding: 4px 9px;
}

.account-profile-form-grid {
  margin-top: 18px;
}

.account-profile-form-grid .wide-field {
  grid-column: 1 / -1;
}

.account-profile-actions {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-top: 20px;
}

.account-profile-actions .system-form-status {
  margin-right: auto;
}

.metric-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.metric-card {
  padding: 18px;
}

.metric-card span,
.metric-card em {
  color: var(--muted);
  display: block;
  font-style: normal;
}

.metric-card strong {
  display: block;
  font-size: 28px;
  margin: 10px 0 8px;
}

.metric-card strong.good {
  color: #166534;
}

.metric-card strong.warning {
  color: #92400e;
}

.metric-card strong.expired {
  color: #b91c1c;
}

.content-grid {
  display: grid;
  gap: 18px;
}

.two-columns {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.panel {
  padding: 18px;
}

.hospital-directory-panel {
  margin-inline: auto;
  max-width: 1680px;
}

.hospital-directory-header p,
.hospital-directory-search-hint {
  color: var(--muted);
  margin: 4px 0 0;
}

.hospital-directory-search {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(280px, 1fr) minmax(130px, 180px) auto;
}

.hospital-directory-search > label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.hospital-directory-search > label > span {
  color: var(--muted);
  font-size: var(--font-label);
  font-weight: 650;
}

.hospital-directory-search button {
  min-height: 42px;
  white-space: nowrap;
  word-break: keep-all;
}

.hospital-directory-search-hint {
  font-size: var(--font-caption);
}

.hospital-directory-status {
  display: none;
}

.hospital-directory-query-field.combobox-field {
  position: relative;
  z-index: 3;
}

.hospital-directory-query-field .combobox-menu {
  background: var(--surface-solid);
  max-height: 320px;
  overflow-y: auto;
}

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

.hospital-directory-results > .empty-state {
  grid-column: 1 / -1;
}

.hospital-directory-card {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 14px;
  min-width: 0;
  padding: 16px;
}

.hospital-directory-card header {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.hospital-directory-card header > span {
  align-items: center;
  background: rgba(10, 132, 255, 0.1);
  border-radius: 999px;
  color: var(--primary-dark);
  display: inline-flex;
  flex: 0 0 28px;
  font-weight: 700;
  height: 28px;
  justify-content: center;
}

.hospital-directory-card-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  margin-left: auto;
}

.hospital-directory-edit-dialog {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(31, 60, 82, 0.24);
  color: var(--text);
  height: min(820px, calc(100vh - 40px));
  max-height: calc(100vh - 40px);
  max-width: calc(100vw - 32px);
  overflow: hidden;
  padding: 0;
  width: 1120px;
}

.hospital-directory-edit-dialog::backdrop {
  background: rgba(28, 52, 70, 0.42);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.hospital-directory-edit-form {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

.hospital-directory-edit-form > .system-log-dialog-header {
  flex: 0 0 auto;
  padding: 24px 24px 16px;
}

#inventoryCheckDialog {
  height: min(640px, calc(100vh - 40px));
}

.inventory-check-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 24px 22px;
}

.inventory-check-body > .precision-date-field {
  max-width: 280px;
}

.hospital-directory-edit-fields {
  display: grid;
  flex: 1 1 auto;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 24px 22px;
  scrollbar-gutter: stable;
}

.hospital-directory-edit-fields label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.hospital-directory-edit-fields label > span {
  color: var(--muted);
  font-size: var(--font-caption);
  font-weight: 700;
}

.hospital-directory-edit-span-2 {
  grid-column: span 2;
}

.hospital-directory-edit-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  flex: 0 0 auto;
  margin: 0 24px;
  padding: 18px 0 24px;
}

.hospital-directory-edit-footer > span {
  color: var(--muted);
  font-size: var(--font-caption);
}

.hospital-directory-edit-footer > div {
  display: flex;
  gap: 10px;
}

.hospital-directory-card header div,
.hospital-directory-card header strong,
.hospital-directory-card header small {
  min-width: 0;
}

.hospital-directory-card header strong,
.hospital-directory-card header small {
  display: block;
}

.hospital-directory-card header strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.hospital-directory-card header small {
  color: var(--muted);
  margin-top: 3px;
}

.hospital-directory-card dl {
  display: grid;
  gap: 10px 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.hospital-directory-card dl > div {
  min-width: 0;
}

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

.hospital-directory-card dt {
  color: var(--muted);
  font-size: var(--font-caption);
  margin-bottom: 2px;
}

.hospital-directory-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.order-form {
  margin-inline: auto;
  max-width: 1680px;
}

.panel-header,
.line-header,
.action-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.schema-status {
  background: #f6fafd;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  margin-bottom: 14px;
  padding: 10px 12px;
}

.diagnostics-box {
  background: #0f1f20;
  border-radius: 8px;
  color: #d9f7ef;
  font-family: Consolas, "Courier New", monospace;
  margin: 12px 0 0;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.status-chip {
  background: var(--surface-soft);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  line-height: 1;
  padding: 7px 10px;
  white-space: nowrap;
}

.status-chip.good {
  background: #dcfce7;
  color: #166534;
}

.status-chip.warning {
  background: #fef3c7;
  color: #92400e;
}

.status-chip.expired {
  background: #fee2e2;
  color: #b91c1c;
}

.link-button {
  background: transparent;
  color: var(--primary);
  padding: 0;
}

.link-button:hover {
  background: transparent;
  color: var(--primary-dark);
}

.compact-button {
  align-items: center;
  background: #e2f1fb;
  border: 1px solid #b9d8ec;
  color: var(--primary);
  display: inline-flex;
  justify-content: center;
  min-height: 30px;
  padding: 5px 12px;
  white-space: nowrap;
}

.compact-button:hover {
  background: #cfe7f7;
  color: var(--primary-dark);
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.info-list dt {
  color: var(--muted);
  font-size: 13px;
}

.info-list dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.info-list .info-list-title {
  border-bottom: 0;
  padding: 2px 0 0;
}

.info-list .info-list-title dt {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.dashboard-account-count {
  background: #e2f1fb;
  border: 1px solid #bddced;
  border-radius: 999px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 9px;
}

.dashboard-customer-grid,
.dashboard-scope-grid {
  align-content: start;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-height: 310px;
  overflow-y: auto;
  padding-right: 4px;
}

.info-list .dashboard-customer-item,
.info-list .dashboard-scope-item {
  background: #f5faff;
  border: 1px solid #cfe3f1;
  border-radius: 6px;
  min-width: 0;
  padding: 11px 12px;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.info-list .dashboard-customer-item:hover,
.info-list .dashboard-scope-item:hover {
  background: #edf7fd;
  border-color: #9fcbe4;
  box-shadow: 0 4px 14px rgba(52, 127, 179, 0.09);
}

.dashboard-customer-item dt,
.dashboard-scope-item dt {
  color: #57748a;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-customer-item dd,
.dashboard-scope-item dd {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
  margin-top: 5px;
}

.info-list .dashboard-customer-documents {
  border: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  padding: 0;
}

.dashboard-customer-documents .status-chip {
  font-size: 11px;
  padding: 2px 6px;
}

.dashboard-scope-item dt:first-child {
  align-items: center;
  display: flex;
  gap: 7px;
}

.dashboard-scope-item dt:first-child span {
  align-items: center;
  background: #dceefa;
  border-radius: 4px;
  color: var(--primary-dark);
  display: inline-flex;
  height: 22px;
  justify-content: center;
  width: 28px;
}

.dashboard-scope-item dt:nth-of-type(2) {
  align-items: center;
  border-top: 1px solid #dceaf4;
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 9px;
}

.dashboard-scope-item dt small {
  color: #7291a8;
  font-size: 11px;
  font-weight: 600;
}

.dashboard-scope-products {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dashboard-scope-products li {
  background: #e8f4fc;
  border: 1px solid #c9e1f1;
  border-radius: 4px;
  color: #294f6a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
  padding: 6px 8px;
}

.info-list .dashboard-scope-empty {
  background: #f5faff;
  border: 1px dashed #bdd7e8;
  border-radius: 6px;
  color: var(--muted);
  grid-column: 1 / -1;
  padding: 24px 12px;
  text-align: center;
}

.dashboard-scope-empty dd {
  margin: 0;
}

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

.form-section {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 16px;
}

.form-section:first-of-type {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.form-section h3 {
  margin-bottom: 12px;
}

.compact-grid {
  grid-template-columns: minmax(220px, 1.25fr) minmax(160px, 0.75fr);
  margin-top: 12px;
}

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

.form-field > span,
.document-filter-field > span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid #cbdce8;
  border-radius: 6px;
  color: var(--text);
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}

select {
  cursor: pointer;
}

input[readonly] {
  background: #edf4f8;
  color: #526677;
  cursor: not-allowed;
}

input.field-invalid {
  border-color: var(--danger);
  outline-color: rgba(190, 54, 54, 0.14);
}

.field-feedback {
  color: var(--danger);
  display: block;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 5px;
}

.contract-status-message {
  background: #f6eaea;
  border-left: 3px solid var(--danger);
  border-radius: 4px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 12px;
  padding: 9px 11px;
}

.contract-status-message[data-tone="info"] {
  background: rgba(10, 132, 255, 0.08);
  border-left-color: var(--primary);
  color: var(--primary-dark);
}

.contract-status-message[data-tone="warning"] {
  background: rgba(213, 139, 16, 0.1);
  border-left-color: #d58b10;
  color: #8d5a05;
}

.contract-status-message[data-tone="success"] {
  background: rgba(32, 169, 105, 0.1);
  border-left-color: #20a969;
  color: #137c47;
}

#orderForm input:disabled,
#orderForm select:disabled,
#orderForm textarea:disabled,
#orderForm input[readonly] {
  background: #e3f2fd;
  border-color: #b9d9ee;
  color: #668196;
  cursor: not-allowed;
  opacity: 1;
}

.contract-blocked button:disabled,
#orderForm button[type="submit"]:disabled {
  background: #aeb8b7;
  color: #eef1f1;
  cursor: not-allowed;
  opacity: 1;
}

.contract-blocked .line-item {
  background: #f0f4f7;
}

.form-grid > label,
.form-grid > .form-field,
.line-fields > label,
.summary-fields label {
  min-width: 0;
}

.combobox-control {
  position: relative;
}

.combobox-field {
  position: relative;
}

.portal-dropdown.portal-dropdown-open,
.portal-dropdown.portal-dropdown-closing {
  z-index: 140;
}

.portal-dropdown-menu {
  display: none;
}

.portal-dropdown-option {
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.portal-dropdown-open .portal-dropdown-menu {
  animation: combobox-in 150ms cubic-bezier(0.2, 0.75, 0.25, 1);
  display: block;
  transform-origin: top center;
}

.portal-dropdown-closing .portal-dropdown-menu {
  animation: combobox-out 150ms cubic-bezier(0.4, 0, 0.7, 0.2) forwards;
  display: block;
  pointer-events: none;
  transform-origin: top center;
}

.combobox-input {
  padding-right: 72px;
}

/* The enhanced combobox already provides one accessible clear button. */
.combobox-input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

/* Safari can expose a native list indicator even after enhancement. */
.combobox-input::-webkit-calendar-picker-indicator,
.combobox-input::-webkit-list-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.portal-dropdown-toggle {
  align-items: center;
  background: transparent;
  bottom: 0;
  color: var(--muted);
  display: flex;
  height: 30px;
  justify-content: center;
  margin-block: auto;
  min-height: 30px;
  padding: 0;
  position: absolute;
  right: 5px;
  top: 0;
  transform: none;
  width: 30px;
  z-index: 3;
}

.portal-dropdown-toggle:disabled {
  background: transparent;
  cursor: not-allowed;
  opacity: 0.45;
}

.portal-dropdown-arrow {
  border: 0;
  color: inherit;
  display: grid;
  height: 12px;
  margin: 0;
  place-items: center;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  transition: transform 160ms ease;
  width: 12px;
}

.portal-dropdown-arrow svg {
  display: block;
  height: 100%;
  overflow: visible;
  width: 100%;
}

.portal-dropdown-arrow path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.portal-dropdown-open .portal-dropdown-arrow {
  transform: rotate(180deg);
}

.combobox-menu {
  display: none;
  left: 0;
  max-height: 224px;
  min-width: min(240px, calc(100vw - 16px));
  overflow-y: auto;
  padding: 5px;
  position: absolute;
  right: 0;
  top: calc(100% + 5px);
  z-index: 80;
}

.combobox-option {
  background: #fff;
  border-radius: 4px;
  color: var(--text);
  display: block;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.45;
  min-height: 36px;
  overflow: hidden;
  padding: 7px 9px;
  text-align: left;
  overflow-wrap: anywhere;
  transition: background-color 120ms ease, color 120ms ease;
  white-space: normal;
  width: 100%;
}

.select-clear-control {
  position: relative;
}

.select-clear-control select {
  padding-right: 62px;
}

.portal-clear-button {
  align-items: center;
  background: transparent;
  bottom: 0;
  color: #668196;
  display: flex;
  font-size: 20px;
  height: 28px;
  justify-content: center;
  margin-block: auto;
  min-height: 28px;
  opacity: 0;
  padding: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  transform: none;
  transition:
    background-color 140ms ease,
    color 140ms ease,
    opacity 120ms ease,
    transform 160ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
  visibility: hidden;
  width: 28px;
  z-index: 4;
}

.portal-clear-button[hidden] {
  display: none;
}

.portal-clear-button > span {
  color: inherit;
  display: block;
  font-size: 0;
  height: 12px;
  line-height: 0;
  margin: 0;
  position: relative;
  width: 12px;
}

.portal-clear-button > span::before,
.portal-clear-button > span::after {
  background: currentColor;
  border-radius: 999px;
  content: "";
  height: 1.5px;
  left: 50%;
  position: absolute;
  top: 50%;
  width: 8px;
}

.portal-clear-button > span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.portal-clear-button > span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.portal-clear-button.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  transition-delay: 0s;
  visibility: visible;
}

.portal-clear-button:hover:not(:disabled) {
  background: #dceefa;
  color: var(--primary-dark);
  transform: scale(1.04);
}

.portal-clear-button:active:not(:disabled) {
  transform: scale(0.92);
}

.portal-clear-button.is-visible:disabled {
  background: transparent;
  cursor: not-allowed;
  opacity: 0.45;
}

.combobox-clear-button {
  right: 36px;
}

.select-clear-button {
  right: 30px;
}

.reset-order-button {
  min-width: 96px;
}

.order-header-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.order-submit-status {
  align-items: center;
  background: #e8f4fb;
  border: 1px solid #bddced;
  border-radius: 6px;
  color: var(--primary-dark);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  min-height: 36px;
  max-width: min(620px, 100%);
  overflow-wrap: anywhere;
  padding: 7px 11px;
}

.order-submit-status.is-complete {
  background: #edf7fd;
  border-color: #8fc4e2;
}

.order-status-spinner,
.order-submit-spinner {
  animation: login-spin 720ms linear infinite;
  border: 2px solid rgba(52, 127, 179, 0.22);
  border-radius: 50%;
  border-top-color: var(--primary);
  display: none;
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
}

.order-submit-status.is-loading .order-status-spinner,
.order-form.is-submitting .order-submit-spinner {
  display: inline-block;
}

.order-form.is-submitting .total-box button[type="submit"] {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.order-form.is-submitting .order-submit-spinner {
  border-color: rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
}

#newOrderBtn {
  min-width: 104px;
}

#newOutboundBtn {
  min-width: 112px;
}

#newHospitalApplicationBtn {
  min-width: 128px;
}

.order-form.is-submitting button:disabled,
.order-form.is-submitted button:disabled,
.flow-tracking-form.is-submitting button:disabled,
.flow-tracking-form.is-submitted button:disabled,
.hospital-application-form.is-submitting button:disabled,
.hospital-application-form.is-submitted button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.order-form.is-submitted,
.flow-tracking-form.is-submitted,
.hospital-application-form.is-submitted {
  border-color: #9fcbe4;
  box-shadow: 0 10px 30px rgba(52, 127, 179, 0.12);
}

.flow-tracking-form.is-submitting .flow-generate-button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
}

.flow-tracking-form.is-submitting .order-submit-spinner {
  border-color: rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  display: inline-block;
}

.hospital-application-form.is-submitting #generateHospitalApplicationBtn {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
}

.hospital-application-form.is-submitting .order-submit-spinner {
  border-color: rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  display: inline-block;
}

@keyframes combobox-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes combobox-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
}

.wide {
  grid-column: span 2;
}

.line-header {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 18px;
}

.line-items {
  display: grid;
  gap: 12px;
}

.line-item {
  align-items: start;
  background: #f7fbfe;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  padding: 12px;
}

.line-fields {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  min-width: 0;
}

.line-item .line-no {
  background: var(--surface-soft);
  border-radius: 6px;
  display: grid;
  font-weight: 700;
  min-height: 42px;
  place-items: center;
}

.line-item > .remove-line-button {
  align-self: end;
  background: #e7f2fb;
  border: 1px solid #b8d5ea;
  color: #24658f;
  justify-self: end;
  min-height: 32px;
  min-width: 60px;
  padding: 0 10px;
}

.line-item > .remove-line-button:hover {
  background: #d5eafa;
  color: #174f75;
}

.order-summary {
  align-items: end;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 250px;
  margin-top: 18px;
}

.summary-fields {
  min-width: 0;
}

textarea[name="specialRequirements"] {
  overflow-y: auto;
  resize: none;
}

.total-box {
  background: #2d668e;
  border-radius: 8px;
  color: #fff;
  padding: 16px;
}

.total-box > span,
.total-box > strong,
.total-box > button {
  display: block;
  width: 100%;
}

.total-box strong {
  font-size: 24px;
  margin: 8px 0 14px;
}

.filters {
  display: flex;
  gap: 10px;
}

.history-panel-header {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
}

.history-title-block {
  display: grid;
  gap: 4px;
}

#inventoryStockPanel .history-title-block {
  align-items: center;
  column-gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

#inventoryStockScopeNote {
  grid-column: 1 / -1;
}

#inventoryCheckBtn {
  justify-self: end;
  white-space: nowrap;
}

.history-title-block p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

.history-filters {
  align-items: start;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: none;
  width: 100%;
}

.history-filters.without-customer-filter {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.history-filters [hidden] {
  display: none;
}

.history-filters label,
.history-filter-group {
  align-self: start;
  min-width: 0;
}

.history-filters > label {
  display: flex;
  flex-direction: column;
}

.history-filter-group {
  position: relative;
}

.filter-reset-action,
.document-filter-actions {
  align-items: flex-end;
  display: flex;
  min-width: 0;
}

.filter-reset-action {
  align-self: start;
  padding-top: 19px;
}

.submitted-order-history-filters .filter-reset-action {
  align-self: flex-end;
  padding-top: 0;
}

.history-date-filter {
  grid-column: span 2;
}

.filter-label {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.multi-filter-control {
  min-width: 0;
}

.multi-filter-trigger {
  cursor: text;
}

.multi-filter-options {
  display: contents;
}

.multi-filter-option {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 9px;
}

.multi-filter-option input[type="checkbox"] {
  appearance: auto;
  accent-color: var(--primary);
  flex: 0 0 auto;
  height: 16px;
  margin: 0;
  min-height: 0;
  padding: 0;
  width: 16px;
}

.multi-filter-option span {
  font: inherit;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.filter-select-empty {
  color: var(--muted);
  padding: 12px 8px;
  text-align: center;
}

.date-range-fields {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(140px, 1fr) auto minmax(140px, 1fr);
}

.date-range-fields > span {
  color: var(--muted);
  font-size: 13px;
}

.precision-date-picker {
  min-width: 0;
  position: relative;
}

.precision-date-trigger {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  color: var(--muted);
  display: flex;
  font-size: var(--font-body);
  font-weight: 400;
  gap: 10px;
  justify-content: space-between;
  min-height: 42px;
  padding: 8px 72px 8px 11px;
  text-align: left;
  width: 100%;
}

.precision-date-trigger > span {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.precision-date-trigger.has-value {
  color: var(--text);
}

.precision-date-trigger:hover,
.precision-date-trigger:focus-visible,
.precision-date-picker.portal-dropdown-open .precision-date-trigger {
  background: #fff;
  border-color: rgba(10, 132, 255, 0.34);
  box-shadow: var(--field-interaction-shadow);
}

.precision-date-trigger.is-invalid {
  border-color: var(--danger);
}

.precision-date-clear-button {
  right: 36px;
}

.precision-date-menu {
  left: 0;
  padding: 10px;
  position: absolute;
  top: calc(100% + 7px);
  width: min(320px, calc(100vw - 32px));
  z-index: 120;
}

.precision-date-menu[hidden] {
  display: none;
}


.precision-date-menu.align-end {
  left: auto;
  right: 0;
}

.precision-date-menu-header {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
}

.precision-date-menu-header .icon-button {
  height: 34px;
  min-height: 34px;
  width: 34px;
}

.precision-date-title {
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  min-height: 34px;
  padding: 4px 8px;
}

.precision-date-title:hover:not(:disabled) {
  background: rgba(10, 132, 255, 0.08);
  box-shadow: none;
}

.precision-date-title:disabled {
  color: var(--text);
  opacity: 1;
}

.precision-date-options {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.precision-date-options.year-view,
.precision-date-options.month-view {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.precision-date-options.day-view {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.precision-date-options button {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  min-height: 34px;
  padding: 4px;
  transition: background-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.precision-date-weekday,
.precision-date-blank {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 11px;
  height: 24px;
  justify-content: center;
  margin: 0;
}

.precision-date-menu-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 9px;
  padding-top: 9px;
}

.precision-date-menu-footer > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
}

.precision-date-menu-footer > div {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.precision-date-menu-footer button {
  min-height: 32px;
  padding-inline: 10px;
}

.date-filter-header {
  margin-bottom: 6px;
}

.date-filter-header .filter-label {
  margin-bottom: 0;
}

.date-granularity,
.date-presets {
  display: flex;
  gap: 4px;
}

.date-filter-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  justify-content: space-between;
  margin-top: 6px;
}

.date-granularity button,
.date-presets button {
  background: var(--surface-soft);
  color: var(--primary-dark);
  min-height: 28px;
  padding: 0 10px;
}

.date-granularity button:hover,
.date-granularity button.active,
.date-presets button:hover,
.date-presets button.active {
  background: #cfe7f7;
  color: #194d70;
}

.history-filter-summary {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid #cfe2ef;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  justify-content: flex-end;
  margin: -4px 0 14px;
  padding: 10px 14px;
}

.history-filter-summary span {
  color: var(--muted);
  font-size: 13px;
}

.history-filter-summary strong {
  color: var(--primary-dark);
  font-size: 15px;
  margin-left: 4px;
}

.hospital-development-filters {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.hospital-development-search-field {
  grid-column: span 2;
}

.hospital-development-summary {
  justify-content: flex-start;
}

.hospital-development-duplicate-reset {
  margin-left: auto;
}

.hospital-development-duplicate-badge {
  background: #fff0ef;
  border: 1px solid #efb2ae;
  border-radius: 999px;
  color: #a52b25;
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  margin-right: 6px;
  padding: 2px 7px;
  white-space: nowrap;
}

.hospital-development-create-button {
  margin-top: 12px;
  width: max-content;
}

.hospital-development-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.hospital-development-header-actions .hospital-development-create-button {
  margin-top: 0;
}

.hospital-development-year-control {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.hospital-development-year-control > span {
  min-width: 0;
}

.hospital-development-year-control select {
  background: var(--surface-solid);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--primary-dark);
  font: inherit;
  font-weight: 700;
  min-height: 42px;
  padding: 8px 34px 8px 12px;
  width: 100%;
}

.detail-modal.hospital-development-editor-modal {
  background: rgba(30, 57, 78, 0.38);
  z-index: 180;
}

.detail-dialog.hospital-development-editor-dialog {
  --hospital-development-editor-ink: #102a47;
  --hospital-development-editor-line: #d8e3ed;
  --hospital-development-editor-surface: #f4f7fa;
  background: var(--hospital-development-editor-surface);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-color: rgba(17, 51, 86, 0.18);
  border-radius: 18px;
  padding: 0 24px 24px;
  width: min(1240px, 100%);
}

.hospital-development-editor-header {
  align-items: start;
  background: #edf5fb;
  border-bottom: 1px solid #d5e4ef;
  color: var(--hospital-development-editor-ink);
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0 -24px;
  min-height: 0;
  padding: 24px 28px 22px;
}

.hospital-development-editor-header h2 {
  color: var(--hospital-development-editor-ink);
  font-size: 25px;
  letter-spacing: -0.01em;
  margin: 5px 0 6px;
}

.hospital-development-editor-header p {
  color: #657b90;
  font-size: 12px;
  margin: 0;
}

.hospital-development-editor-header .admin-confirm-eyebrow {
  color: var(--primary-dark);
}

.dialog-close-button {
  align-self: start;
  white-space: nowrap;
}

.hospital-development-month-editor {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hospital-development-future-month {
  align-items: center;
  background: #edf2f6;
  border: 1px dashed #c8d4de;
  border-radius: 8px;
  color: #8a99a8;
  display: flex;
  font-size: 12px;
  min-height: 44px;
  padding: 0 12px;
  user-select: none;
}

.hospital-development-month-editor .is-future-month > span:first-child {
  color: #8a99a8;
}

.hospital-development-system-info .admin-confirm-details {
  background: #edf4f9;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-height: none;
  padding: 12px;
}

.hospital-development-system-info .admin-confirm-details > div {
  background: var(--surface-solid);
  border: 1px solid #cfdee9;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
}

.hospital-development-system-info .admin-confirm-details dt {
  font-size: 12px;
  font-weight: 650;
}

.hospital-development-system-info .admin-confirm-details dd {
  line-height: 1.5;
  text-align: left;
}

.hospital-development-editor-actions {
  border-top: 1px solid #d9e5ed;
  margin-top: 16px;
  padding-top: 16px;
}

.hospital-development-editor-actions .secondary-button {
  background: #d4d8dc;
  border-color: #b7bdc3;
  color: #343a40;
  box-shadow: none;
}

.hospital-development-editor-actions .secondary-button:hover:not(:disabled) {
  background: #c4c9ce;
  border-color: #a4abb2;
}

/* Hospital development is presented as one continuous hospital lifecycle. */
#hospital-development .history-panel-header {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

.hospital-development-page-eyebrow {
  color: var(--primary);
  display: block;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}

#hospital-development .history-title-block {
  align-items: end;
  display: grid;
  gap: 4px 20px;
  grid-template-columns: minmax(0, 1fr) auto;
}

#hospital-development .history-title-block h2,
#hospital-development .history-title-block p {
  grid-column: 1;
}

#hospital-development .hospital-development-header-actions {
  grid-column: 2;
  grid-row: 1 / 4;
  margin: 0;
}

#hospital-development .hospital-development-filters {
  align-items: start;
  background: rgba(247, 251, 254, 0.88);
  border: 1px solid #d7e5ef;
  border-radius: 14px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 16px;
}

#hospital-development .hospital-development-filters > label {
  align-content: start;
  display: grid;
  gap: 7px;
  min-width: 0;
}

#hospital-development .hospital-development-filters > label > span {
  line-height: 1.4;
  min-height: 18px;
}

#hospital-development .hospital-development-search-field {
  grid-column: span 2;
}

#hospital-development .document-filter-actions {
  align-self: end;
  align-items: end;
  display: flex;
}

#hospital-development .document-filter-actions button {
  min-height: 42px;
  width: 100%;
}

.hospital-development-overview {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 16px 0 14px;
}

.hospital-development-overview article {
  --hospital-overview-tone: #1689e8;
  align-items: center;
  background: var(--surface-solid);
  border: 1px solid #d5e4ee;
  border-radius: 13px;
  box-shadow: 0 7px 18px rgba(41, 82, 112, 0.06);
  display: flex;
  gap: 11px;
  min-height: 76px;
  padding: 12px 13px;
}

.hospital-development-overview article[data-tone="pending"] { --hospital-overview-tone: #7c72e8; }
.hospital-development-overview article[data-tone="tracking"] { --hospital-overview-tone: #1689e8; }
.hospital-development-overview article[data-tone="submitted"] { --hospital-overview-tone: #13a8b8; }
.hospital-development-overview article[data-tone="admitted"] { --hospital-overview-tone: #20a969; }
.hospital-development-overview article[data-tone="stopped"] { --hospital-overview-tone: #7f8c98; }
.hospital-development-overview article[data-tone="approval"] {
  --hospital-overview-tone: #e59b13;
  border-style: dashed;
}

.hospital-development-overview-icon {
  align-items: center;
  background: var(--hospital-overview-tone);
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 38px;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.hospital-development-overview-icon img {
  height: 22px;
  object-fit: contain;
  width: 22px;
}

.hospital-development-overview article > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.hospital-development-overview article > div > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.hospital-development-overview strong {
  color: var(--hospital-overview-tone);
  font-size: 25px;
  line-height: 1;
}

#hospital-development .hospital-development-summary {
  background: transparent;
  border: 0;
  margin: 0 0 10px;
  padding: 0 2px;
}

#hospital-development .hospital-development-table-wrap {
  border: 1px solid #d5e4ee;
  border-radius: 14px;
  overflow-x: auto;
}

#hospital-development .hospital-development-table {
  --hospital-development-table-columns: minmax(220px, 1.6fr) minmax(145px, 1fr) minmax(145px, 1fr) minmax(150px, 1.02fr) minmax(140px, .95fr) minmax(155px, 1.02fr) minmax(190px, 1.2fr);
  display: block;
  min-width: 1120px;
  width: 100%;
}

#hospital-development .hospital-development-table thead tr,
.hospital-development-project-summary {
  display: grid;
  grid-template-columns: var(--hospital-development-table-columns);
  width: 100%;
}

#hospital-development .hospital-development-table thead {
  background: #edf5fb;
  display: block;
}

#hospital-development .hospital-development-table tbody,
#hospital-development .hospital-development-table tbody > tr,
#hospital-development .hospital-development-table tbody > tr > td {
  display: block;
  width: 100%;
}

#hospital-development .hospital-development-table th {
  align-items: center;
  border: 0;
  color: #5f7488;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  min-height: 42px;
  padding: 10px 14px;
}

#hospital-development .hospital-development-table tbody > tr > td {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  position: static;
}

#hospital-development .hospital-development-table th:first-child,
#hospital-development .hospital-development-table th:last-child {
  background: #edf5fb;
  box-shadow: none;
  left: auto;
  position: static;
  right: auto;
}

.hospital-development-project-card {
  background: var(--surface-solid);
  border-top: 1px solid #dbe7ef;
}

.hospital-development-record-row:first-child .hospital-development-project-card {
  border-top: 0;
}

.hospital-development-project-summary > div {
  align-content: center;
  border-right: 1px solid #edf2f6;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 15px 14px;
}

.hospital-development-project-summary > div:last-child {
  border-right: 0;
}

.hospital-development-project-summary strong,
.hospital-development-project-summary span,
.hospital-development-project-summary small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hospital-development-project-summary strong {
  color: #18384f;
  font-size: 13px;
}

.hospital-development-project-summary small {
  color: #708396;
  font-size: 11px;
  line-height: 1.45;
}

.hospital-development-project-identity {
  align-items: center;
  grid-template-columns: 26px minmax(0, 1fr);
}

.hospital-development-project-identity > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.hospital-development-project-identity > div > span {
  color: #334f65;
  font-size: 12px;
}

.hospital-development-detail-toggle {
  align-items: center;
  align-self: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  height: 26px;
  justify-content: center;
  min-height: 26px;
  padding: 0;
  width: 26px;
}

.hospital-development-detail-toggle:hover:not(:disabled),
.hospital-development-detail-toggle:focus-visible {
  background: #e7f2fa;
}

.hospital-development-detail-toggle img {
  height: 16px;
  transition: transform 160ms ease;
  width: 16px;
}

.hospital-development-record-row.is-expanded .hospital-development-detail-toggle img {
  transform: rotate(180deg);
}

.hospital-development-stage-badge {
  background: #e7f1ff;
  border: 1px solid #bdd9f9;
  border-radius: 999px;
  color: #126bc2;
  font-size: 11px;
  font-weight: 750;
  justify-self: start;
  padding: 5px 9px;
}

.hospital-development-stage-badge[data-stage="pending"] { background: #f0eefc; border-color: #d8d2f5; color: #6258c8; }
.hospital-development-stage-badge[data-stage="submitted"] { background: #e8f8fa; border-color: #b7e4e9; color: #087e89; }
.hospital-development-stage-badge[data-stage="admitted"] { background: #e9f8ef; border-color: #bee6ce; color: #137c47; }
.hospital-development-stage-badge[data-stage="stopped"] { background: #f1f2f4; border-color: #d6dbe0; color: #66717a; }

.hospital-development-owner-cell {
  gap: 2px !important;
}

.hospital-development-update-recency-cell > strong {
  justify-self: start;
}

.hospital-development-update-recency-cell > strong[data-tone="fresh"] { color: #137c47; }
.hospital-development-update-recency-cell > strong[data-tone="recent"] { color: #126bc2; }
.hospital-development-update-recency-cell > strong[data-tone="attention"] { color: #a86508; }
.hospital-development-update-recency-cell > strong[data-tone="overdue"] { color: #c3423f; }
.hospital-development-update-recency-cell > strong[data-tone="complete"] { color: #137c47; }
.hospital-development-update-recency-cell > strong[data-tone="stopped"] { color: #66717a; }
.hospital-development-update-recency-cell > strong[data-tone="unknown"] { color: #708396; }

.hospital-development-actions-cell {
  min-width: 0;
}

.hospital-development-row-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  width: auto;
}

.hospital-development-row-actions button {
  border-radius: 7px;
  font-size: 10px;
  min-height: 28px;
  padding: 4px 7px;
  width: auto;
}

.hospital-development-summary-actions {
  border-top: 1px solid #edf2f6;
  margin-top: 4px;
  padding-top: 7px;
}

.hospital-development-summary-actions .hospital-development-row-actions {
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.hospital-development-summary-actions .hospital-development-row-actions button {
  min-height: 28px;
  padding: 4px 7px;
}

.hospital-development-project-year-switcher {
  min-width: 0;
}

.hospital-development-project-year-buttons {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
}

.hospital-development-project-year-button,
.hospital-development-project-year-more {
  background: #f1f5f8;
  border: 1px solid #dce5ec;
  border-radius: 7px;
  color: #536b7e;
  flex: 0 0 auto;
  font-size: 10px;
  min-height: 28px;
  padding: 4px 7px;
}

.hospital-development-project-year-button:hover:not(:disabled),
.hospital-development-project-year-button:focus-visible,
.hospital-development-project-year-more:hover:not(:disabled),
.hospital-development-project-year-more:focus-visible {
  background: #e6f2fb;
  border-color: #bad8ee;
  color: #0d68b4;
}

.hospital-development-project-year-button.is-active,
.hospital-development-project-year-button[aria-current="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 750;
}

.hospital-development-project-year-overflow {
  flex: 0 0 auto;
  position: relative;
}

.hospital-development-project-year-menu {
  display: grid;
  gap: 5px;
  max-height: 154px;
  min-width: 86px;
  overflow-y: auto;
  padding: 6px;
  margin-top: 5px;
}

.hospital-development-project-year-menu[hidden] {
  display: none;
}

.hospital-development-project-year-menu button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #31536d;
  justify-content: flex-start;
  min-height: 30px;
  padding: 5px 8px;
  text-align: left;
  width: 100%;
}

.hospital-development-project-detail-footer {
  align-items: center;
  border-top: 1px solid #e0eaf1;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 5px;
  padding-top: 8px;
}

.hospital-development-project-detail-footer .hospital-development-row-actions {
  min-width: max-content;
}

.hospital-development-project-detail-footer .hospital-development-detail-actions {
  align-self: end;
}

.hospital-development-project-detail {
  background: #f8fbfd;
  border-top: 1px solid #dbe8f0;
  padding: 12px 12px 10px;
}

.hospital-development-record-row.is-expanded .hospital-development-project-detail {
  animation: hospital-development-detail-enter 180ms cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: top center;
}

@keyframes hospital-development-detail-enter {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hospital-development-project-detail-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.hospital-development-project-detail-heading > div {
  display: grid;
  gap: 3px;
}

.hospital-development-project-detail-heading strong { color: #1d4059; font-size: 14px; }
.hospital-development-project-detail-heading span { color: #75899a; font-size: 11px; }

.hospital-development-timeline {
  display: grid;
  grid-template-columns: repeat(12, minmax(72px, 1fr));
  overflow-x: auto;
  padding: 0 4px 10px;
}

.hospital-development-timeline-month {
  align-items: center;
  display: grid;
  gap: 7px;
  grid-template-rows: auto 12px auto;
  min-width: 72px;
  position: relative;
  text-align: center;
}

.hospital-development-timeline-month::before {
  background: #d4e0e9;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
  top: 28px;
}

.hospital-development-timeline-month i {
  background: #cbd9e4;
  border: 3px solid #f8fbfd;
  border-radius: 50%;
  height: 12px;
  justify-self: center;
  position: relative;
  width: 12px;
  z-index: 1;
}

.hospital-development-timeline-month.has-value { --hospital-timeline-tone: #1689e8; }
.hospital-development-timeline-month[data-stage="pending"] { --hospital-timeline-tone: #7c72e8; }
.hospital-development-timeline-month[data-stage="tracking"] { --hospital-timeline-tone: #1689e8; }
.hospital-development-timeline-month[data-stage="submitted"] { --hospital-timeline-tone: #13a8b8; }
.hospital-development-timeline-month[data-stage="admitted"] { --hospital-timeline-tone: #20a969; }
.hospital-development-timeline-month[data-stage="stopped"] { --hospital-timeline-tone: #7f8c98; }
.hospital-development-timeline-month.has-value i { background: var(--hospital-timeline-tone); }
.hospital-development-timeline-month > span { color: #4f687c; font-size: 11px; }
.hospital-development-timeline-month > strong { color: #506b7f; font-size: 10px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hospital-development-timeline-month.has-value > strong { color: var(--hospital-timeline-tone); }
.hospital-development-timeline-month.is-transition i {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hospital-timeline-tone) 18%, transparent);
  transform: scale(1.18);
}
.hospital-development-timeline-month.is-transition > strong { font-weight: 800; }
.hospital-development-timeline-month.is-continuation i { opacity: 0.34; }
.hospital-development-timeline-month.is-continuation > strong { opacity: 0.62; }

.hospital-development-project-meta {
  display: grid;
  column-gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  row-gap: 8px;
}

.hospital-development-project-meta > div { min-width: 0; }
.hospital-development-project-meta dt { color: #7a8d9d; font-size: 11px; }
.hospital-development-project-meta dd { color: #29475d; font-size: 12px; line-height: 1.35; margin: 2px 0 0; overflow-wrap: anywhere; }

.hospital-development-project-meta-wide {
  grid-column: span 2;
}

.hospital-development-web-update-history {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hospital-development-web-update-chip {
  align-items: center;
  background: #edf6fd;
  border: 1px solid #c9e0f1;
  border-radius: 999px;
  color: #176aa9;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  gap: 5px;
  padding: 4px 8px;
}

.hospital-development-web-update-chip em {
  color: #688093;
  font-size: 9px;
  font-style: normal;
  font-weight: 650;
}

.hospital-development-web-update-empty {
  color: #708396;
}

.hospital-development-editor-nav {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #d8e3ed;
  border-radius: 12px;
  box-shadow: 0 9px 22px rgba(27, 65, 101, 0.09);
  display: grid;
  gap: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 16px 0 0;
  overflow: hidden;
  padding: 0 10px;
  position: sticky;
  top: 0;
  z-index: 18;
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  backdrop-filter: blur(14px) saturate(130%);
}

.hospital-development-editor-nav button {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: #5b6f83;
  cursor: pointer;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 56px;
  min-width: 0;
  padding: 8px 7px 6px;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  white-space: nowrap;
}

.hospital-development-editor-nav button > span {
  align-items: center;
  background: #fff;
  border: 1px solid #cad7e3;
  border-radius: 50%;
  color: #405770;
  display: inline-flex;
  flex: 0 0 26px;
  height: 26px;
  justify-content: center;
}

.hospital-development-editor-nav button:hover,
.hospital-development-editor-nav button:focus-visible {
  background: #f4f8fc;
  color: #155f9f;
}

.hospital-development-editor-nav button.is-active {
  background: #f7fbff;
  border-bottom-color: #0d75d6;
  color: #0b66ba;
}

.hospital-development-editor-nav button.is-active > span {
  background: #0d6fc8;
  border-color: #0d6fc8;
  color: #fff;
}

.hospital-development-editor-layout {
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 16px;
}

.hospital-development-editor-card {
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--hospital-development-editor-line);
  border-radius: 0;
  margin: 0 !important;
  padding: 24px 20px 26px !important;
  scroll-margin-top: 74px;
}

.hospital-development-editor-dialog .form-section {
  border-top: 0;
}

.hospital-development-editor-card:nth-of-type(odd),
.hospital-development-month-section {
  background: #f8fbfe;
}

.hospital-development-editor-layout > .hospital-development-editor-card:first-child {
  border-radius: 12px 12px 0 0;
}

.hospital-development-submit-section {
  border-bottom: 0;
  border-radius: 0 0 12px 12px;
}

.hospital-development-section-heading {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  padding-left: 14px;
  position: relative;
}

.hospital-development-section-heading::before {
  background: #0d75d6;
  border-radius: 999px;
  bottom: 1px;
  content: "";
  left: 0;
  position: absolute;
  top: 1px;
  width: 3px;
}

.hospital-development-section-heading > span {
  align-items: center;
  background: #0d6fc8;
  border-radius: 50%;
  color: white;
  display: inline-flex;
  flex: 0 0 28px;
  font-size: 12px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
}

.hospital-development-section-heading h3 {
  color: var(--hospital-development-editor-ink);
  font-size: 16px;
  line-height: 1.35;
  margin: 2px 0 4px;
}

.hospital-development-editor-dialog .hospital-development-section-heading h3::before {
  content: none;
}

.hospital-development-section-heading p {
  color: #728498;
  font-size: 11px;
  line-height: 1.5;
  margin: 0;
}

.hospital-development-editor-card .hospital-development-editor-grid {
  column-gap: 20px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  row-gap: 18px;
}

.hospital-development-editor-card .hospital-development-editor-grid > label {
  gap: 7px;
  min-width: 0;
}

.hospital-development-editor-card .hospital-development-editor-grid > label > span {
  color: #415a73;
  font-size: 12px;
  font-weight: 650;
}

.hospital-development-editor-dialog :is(
  .hospital-development-editor-grid,
  .hospital-development-month-editor
) :is(input:not([type="hidden"]), select, .portal-control-shell) {
  min-height: 44px;
}

.hospital-development-editor-dialog :is(
  .hospital-development-editor-grid,
  .hospital-development-month-editor
) .precision-date-trigger {
  min-height: 44px;
}

.hospital-development-editor-card[data-editor-section="ownership"] .hospital-development-editor-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hospital-development-editor-card[data-editor-section="customer"] .hospital-development-editor-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hospital-development-stage-grid { align-items: start; }

.hospital-development-month-section {
  margin-top: 0;
}

.hospital-development-submit-section {
  margin-top: 0;
}

.hospital-development-editor-card.is-editor-locked .hospital-development-section-heading h3::after {
  background: #e8edf1;
  border-radius: 999px;
  color: #677886;
  content: "已锁定";
  font-size: 10px;
  font-weight: 700;
  margin-left: 7px;
  padding: 2px 6px;
  vertical-align: middle;
}

.hospital-development-editor-card .is-editor-locked input,
.hospital-development-editor-card input[data-editor-locked="true"],
.hospital-development-editor-card .is-editor-locked .portal-control-shell {
  background: #eef3f6;
  border-color: #d5dfe6;
  color: #687a88;
  pointer-events: none;
}

.hospital-development-editor-card .is-editor-locked .portal-control-shell button,
.hospital-development-editor-card .is-editor-locked select {
  pointer-events: none;
}

/* Safari may still expose a datalist for readonly inputs. Locked monthly values
   stay in the form for validation, but their visible controls must not open. */
.hospital-development-month-editor .is-month-locked :is(input, .portal-control-shell, .portal-control-shell button) {
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 1100px) {
  .hospital-development-editor-card .hospital-development-editor-grid,
  .hospital-development-editor-card[data-editor-section="ownership"] .hospital-development-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.detail-modal.hospital-development-statistics-modal {
  background: rgba(30, 57, 78, 0.38);
  z-index: 180;
}

.detail-dialog.hospital-development-statistics-dialog {
  background: #e7eef4;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-sizing: border-box;
  max-height: calc(100vh - 32px);
  overflow-x: hidden;
  padding: 16px 18px 18px;
  width: min(1240px, 100%);
}

.hospital-development-statistics-header {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 0;
  padding-right: 0;
}

.hospital-development-statistics-header h2 {
  margin: 3px 0;
}

.hospital-development-statistics-header p {
  color: var(--muted);
  margin: 0;
}

.hospital-development-statistics-header > div:first-child {
  min-width: 250px;
}

.hospital-development-statistics-controls {
  align-items: flex-end;
  display: flex;
  gap: 8px;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.hospital-development-statistics-controls label {
  display: grid;
  gap: 5px;
}

.hospital-development-statistics-controls label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.hospital-development-statistics-controls .portal-control-shell {
  min-width: 118px;
  width: 100%;
}

.hospital-development-statistics-tabs {
  background: #d8e5ef;
  border-radius: 6px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
  padding: 4px;
}

.hospital-development-statistics-tabs button {
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: #597187;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  min-height: 32px;
}

.hospital-development-statistics-tabs button.active {
  background: var(--surface-solid);
  box-shadow: 0 2px 7px rgba(39, 71, 105, 0.1);
  color: #1169a9;
}

.hospital-development-statistics-tabs small {
  background: #e5eef5;
  border-radius: 999px;
  font-size: 10px;
  margin-left: 4px;
  padding: 1px 6px;
}

.hospital-development-statistics-content {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 10px;
}

.hospital-development-statistics-content.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.hospital-development-statistics-filter-summary {
  align-items: center;
  background: #e8f3fb;
  border: 1px solid #a8cde8;
  border-radius: 6px;
  color: #1169a9;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 12px;
  justify-content: space-between;
  padding: 7px 10px;
}

.hospital-development-statistics-filter-summary > div {
  display: flex;
  gap: 6px;
}

.hospital-development-statistics-filter-summary[hidden] {
  display: none;
}

.hospital-development-statistics-kpis {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 10px;
}

.hospital-development-statistics-scope-note,
.hospital-development-statistics-data-note {
  background: #fff7e6;
  border: 1px solid #f0cf8a;
  border-radius: 6px;
  color: #805b13;
  font-size: 11px;
  line-height: 1.5;
  margin: 8px 0 0;
  padding: 7px 9px;
}

.hospital-development-statistics-scope-note[hidden] {
  display: none;
}

.hospital-development-statistics-data-note {
  margin: 0 0 8px;
}

.hospital-development-statistics-kpis article,
.hospital-development-statistics-card {
  background: var(--surface-solid);
  border: 1px solid #cbdbe7;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(39, 71, 105, 0.07);
}

.hospital-development-statistics-kpis article {
  min-width: 0;
  overflow: hidden;
  padding: 12px 14px;
  position: relative;
}

.hospital-development-statistics-kpis article::after {
  background: #188ce5;
  bottom: 0;
  content: "";
  height: 3px;
  left: 0;
  opacity: 0.7;
  position: absolute;
  transform: scaleX(0);
  transform-origin: left center;
  width: 100%;
  animation: hospital-stat-reveal 420ms cubic-bezier(0.2, 0.75, 0.25, 1) forwards;
}

.hospital-development-statistics-kpis span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.hospital-development-statistics-kpis strong {
  color: var(--primary-dark);
  display: inline-block;
  font-size: 22px;
  line-height: 1.2;
  margin-top: 4px;
}

.hospital-development-statistics-kpis small {
  color: #658098;
  margin-left: 6px;
}

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

.hospital-development-statistics-card {
  min-height: 210px;
  padding: 12px;
}

.hospital-development-statistics-card-wide {
  grid-column: span 2;
}

.hospital-development-statistics-card-full {
  grid-column: 1 / -1;
}

.hospital-development-statistics-card > header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 9px;
}

.hospital-development-statistics-card > header > small {
  color: #6b8499;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.hospital-development-statistics-card > header span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hospital-development-statistics-card-title {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  min-width: 0;
}

.hospital-development-statistics-card-title > span {
  white-space: nowrap;
}

.hospital-development-statistics-help {
  align-items: center;
  background: transparent;
  border: 1px solid #9ab1c3;
  border-radius: 50%;
  color: #688198;
  cursor: help;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 800;
  height: 15px;
  justify-content: center;
  line-height: 1;
  min-height: 15px;
  padding: 0;
  position: relative;
  width: 15px;
  z-index: 8;
}

.hospital-development-statistics-help::before,
.hospital-development-statistics-help::after {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 150ms ease, transform 150ms ease;
  visibility: hidden;
}

.hospital-development-statistics-help::before {
  background: #243b50;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  content: "";
  height: 6px;
  left: 50%;
  top: -9px;
  transform: translate(-50%, 3px);
  width: 9px;
}

.hospital-development-statistics-help::after {
  background: #243b50;
  border-radius: 6px;
  bottom: calc(100% + 8px);
  box-shadow: 0 8px 20px rgba(31, 54, 75, 0.2);
  color: #fff;
  content: attr(data-tooltip);
  font-size: 11px;
  font-weight: 500;
  left: 0;
  line-height: 1.5;
  max-width: 300px;
  padding: 7px 9px;
  text-align: left;
  transform: translateY(3px);
  white-space: normal;
  width: max-content;
}

.hospital-development-statistics-help:hover,
.hospital-development-statistics-help:focus-visible {
  background: #e8f3fb;
  border-color: #5f9ccb;
  color: #1169a9;
  outline: none;
}

.hospital-development-statistics-help:hover::before,
.hospital-development-statistics-help:hover::after,
.hospital-development-statistics-help:focus-visible::before,
.hospital-development-statistics-help:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.hospital-development-statistics-help:hover::after,
.hospital-development-statistics-help:focus-visible::after {
  transform: translateY(0);
}

.hospital-development-statistics-card-controls {
  align-items: flex-end;
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  justify-content: flex-end;
  margin-left: auto;
}

.hospital-development-statistics-card-controls label {
  display: grid;
  gap: 4px;
}

.hospital-development-statistics-card-controls .portal-control-shell {
  min-width: 108px;
  width: 132px;
}

.hospital-development-statistics-card-controls-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  margin: -2px 0 9px;
  width: 100%;
}

.hospital-development-statistics-card-controls-row label,
.hospital-development-statistics-card-controls-row .portal-control-shell {
  min-width: 0;
  width: 100%;
}

/* 统计弹窗空间有限：复用公共控件行为，仅在弹窗内压缩视觉尺寸。 */
#hospitalDevelopmentStatisticsModal .hospital-development-statistics-controls {
  gap: 5px;
}

#hospitalDevelopmentStatisticsModal .hospital-development-statistics-controls label,
#hospitalDevelopmentStatisticsModal .hospital-development-statistics-card-controls label {
  gap: 2px;
}

#hospitalDevelopmentStatisticsModal .hospital-development-statistics-controls label span,
#hospitalDevelopmentStatisticsModal .hospital-development-statistics-card-controls label span {
  font-size: 10px;
  line-height: 1.2;
}

#hospitalDevelopmentStatisticsModal .hospital-development-statistics-controls .portal-control-shell {
  min-width: 86px;
}

#hospitalDevelopmentStatisticsModal .hospital-development-statistics-card-controls {
  gap: 4px;
}

#hospitalDevelopmentStatisticsModal .portal-control-shell {
  border-radius: 6px;
  min-height: 24px;
}

#hospitalDevelopmentStatisticsModal .portal-control-shell > .combobox-input {
  font-size: 10px;
  line-height: 1.2;
  min-height: 24px;
  padding: 2px 39px 2px 7px;
}

#hospitalDevelopmentStatisticsModal .portal-clear-button {
  border-radius: 5px;
  font-size: 12px;
  height: 16px;
  min-height: 16px;
  width: 16px;
}

#hospitalDevelopmentStatisticsModal .portal-clear-button > span {
  height: 8px;
  width: 8px;
}

#hospitalDevelopmentStatisticsModal .portal-clear-button > span::before,
#hospitalDevelopmentStatisticsModal .portal-clear-button > span::after {
  height: 1px;
  width: 6px;
}

#hospitalDevelopmentStatisticsModal .combobox-clear-button {
  right: 20px;
}

#hospitalDevelopmentStatisticsModal .combobox-toggle {
  height: 18px;
  min-height: 18px;
  right: 2px;
  width: 18px;
}

#hospitalDevelopmentStatisticsModal .portal-dropdown-arrow {
  height: 8px;
  width: 8px;
}

#hospitalDevelopmentStatisticsModal .combobox-menu {
  border-radius: 6px;
  max-height: 180px;
  padding: 3px;
}

#hospitalDevelopmentStatisticsModal .combobox-option {
  border-radius: 4px;
  font-size: 10px;
  min-height: 26px;
  padding: 5px 7px;
}

.hospital-development-chart-empty {
  color: var(--muted);
  margin: 62px 0;
  text-align: center;
}

.hospital-development-bars {
  display: grid;
  gap: 5px;
}

.hospital-development-bars.compact {
  gap: 4px;
}

.hospital-development-chart-legend {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  margin: -3px 0 5px;
}

.hospital-development-chart-legend span {
  align-items: center;
  color: #587188;
  display: inline-flex;
  gap: 6px;
  white-space: nowrap;
}

.hospital-development-chart-legend i {
  background: #188ce5;
  border-radius: 3px;
  height: 9px;
  width: 9px;
}

.hospital-development-chart-legend i.is-updated {
  background: #20a88a;
}

.hospital-development-monthly-changes {
  display: grid;
  gap: 9px;
  grid-auto-columns: minmax(60px, 1fr);
  grid-auto-flow: column;
  min-height: 175px;
  overflow-x: auto;
  padding: 8px 2px 2px;
}

.hospital-development-monthly-changes article {
  display: grid;
  gap: 7px;
  grid-template-rows: minmax(140px, 1fr) auto;
  min-width: 60px;
}

.hospital-development-monthly-columns {
  align-items: end;
  border-bottom: 1px solid #d9e4ec;
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 22px 5px 0;
}

.hospital-development-monthly-columns button {
  align-items: center;
  align-self: stretch;
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  padding: 0;
}

.hospital-development-monthly-columns button strong {
  color: #42627e;
  font-size: 10px;
  margin-bottom: 4px;
}

.hospital-development-monthly-columns button i {
  background: #188ce5;
  border-radius: 4px 4px 0 0;
  display: block;
  height: max(2px, var(--hospital-stat-height));
  min-height: 2px;
  transform: scaleY(0);
  transform-origin: bottom center;
  width: 100%;
  animation: hospital-stat-grow 760ms cubic-bezier(0.2, 0.75, 0.25, 1) forwards;
}

.hospital-development-monthly-columns button i.is-updated {
  background: #20a88a;
}

.hospital-development-monthly-columns button:hover i,
.hospital-development-monthly-columns button.is-active i {
  box-shadow: 0 0 0 2px rgba(17, 105, 169, 0.18);
}

.hospital-development-monthly-columns button:hover:not(:disabled),
.hospital-development-monthly-columns button:focus-visible,
.hospital-development-monthly-columns button.is-active {
  background: transparent;
  color: inherit;
  box-shadow: none;
  transform: none;
}

.hospital-development-monthly-changes article > span {
  color: #587188;
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

.hospital-development-bar-row {
  appearance: none;
  align-items: center;
  background: var(--surface-solid);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(82px, 150px) minmax(90px, 1fr) 48px;
  padding: 3px 4px;
  text-align: left;
}

button.hospital-development-bar-row:hover:not(:disabled),
button.hospital-development-bar-row:focus-visible,
button.hospital-development-bar-row.is-active {
  background: #edf6fc;
  color: inherit;
  border-color: #a8cde8;
  box-shadow: none;
  transform: none;
}

.hospital-development-bar-row > span {
  color: #48627a;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hospital-development-bar-row > i {
  background: #e8eff5;
  border-radius: 999px;
  display: block;
  height: 8px;
  overflow: hidden;
}

.hospital-development-bar-row > i b {
  border-radius: inherit;
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  animation: hospital-stat-grow-x 740ms cubic-bezier(0.2, 0.75, 0.25, 1) forwards;
}

.hospital-development-bar-row > strong {
  color: var(--primary-dark);
  font-size: 12px;
  text-align: right;
}

.hospital-development-donut-wrap {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 118px minmax(0, 1fr);
  margin-top: 18px;
}

.hospital-development-donut {
  align-items: center;
  border-radius: 50%;
  display: flex;
  height: 118px;
  justify-content: center;
  width: 118px;
  animation: hospital-stat-donut-in 620ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.hospital-development-donut > span {
  align-items: center;
  background: var(--surface-solid);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  height: 72px;
  justify-content: center;
  width: 72px;
}

.hospital-development-donut > span strong {
  color: var(--primary-dark);
  font-size: 19px;
}

.hospital-development-donut > span small {
  color: var(--muted);
  font-size: 11px;
}

.hospital-development-donut-legend {
  display: grid;
  gap: 4px;
}

.hospital-development-donut-legend > button {
  appearance: none;
  align-items: center;
  background: var(--surface-solid);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  display: grid;
  gap: 7px;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  padding: 4px;
  text-align: left;
}

.hospital-development-donut-legend > button:hover:not(:disabled),
.hospital-development-donut-legend > button:focus-visible,
.hospital-development-donut-legend > button.is-active {
  background: #edf6fc;
  color: inherit;
  border-color: #a8cde8;
  box-shadow: none;
  transform: none;
}

.hospital-development-donut-legend i {
  border-radius: 50%;
  height: 9px;
  width: 9px;
}

.hospital-development-donut-legend span,
.hospital-development-donut-legend strong {
  color: #48627a;
  font-size: 12px;
}

.hospital-development-statistics-details {
  background: var(--surface-solid);
  border: 1px solid #cbdbe7;
  border-radius: 8px;
  min-width: 0;
  padding: 12px;
}

.hospital-development-statistics-details .table-wrap {
  width: 100%;
}

.hospital-development-statistics-details > header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.hospital-development-statistics-details > header span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
}

.hospital-development-statistics-details > header strong {
  color: var(--primary-dark);
  display: block;
  margin-top: 3px;
}

.hospital-development-statistics-details > header em {
  color: #1169a9;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.hospital-development-statistics-details table {
  min-width: 1120px;
}

.hospital-development-statistics-details th,
.hospital-development-statistics-details td {
  font-size: 12px;
  white-space: nowrap;
}

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

.document-panel-header {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
}

.document-panel-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.authorization-create-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

.authorization-create-status {
  color: var(--muted);
  font-size: 13px;
  margin: 14px 0 0;
  min-height: 20px;
}

.authorization-create-grid .wide {
  grid-column: 1 / -1;
}

.authorization-create-grid .contract-maintenance-date-field {
  grid-column: span 1;
}

.contract-lookup-controls {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
}

.contract-lookup-controls > label {
  min-width: 0;
}

.contract-lookup-button {
  align-self: end;
  min-height: 44px;
  min-width: 112px;
  width: auto;
}

.contract-query-dialog {
  max-width: 1120px;
}

.detail-dialog.authorization-create-dialog.contract-query-dialog {
  overflow-x: hidden;
  scrollbar-gutter: auto;
}

.contract-query-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(150px, 0.35fr) minmax(260px, 1fr) auto;
  margin-top: 20px;
}

.contract-query-results {
  display: grid;
  gap: 16px;
  margin-top: 4px;
}

.contract-query-pagination {
  margin-top: 0;
}

.contract-query-result {
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.contract-query-result > header,
.contract-query-result-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.contract-query-result > header div {
  display: grid;
  gap: 4px;
}

.contract-query-result > header span:not(.status-badge) {
  color: var(--muted);
  font-size: 12px;
}

.contract-query-result .admin-confirm-details {
  column-gap: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 16px 0;
  max-height: none;
  overflow: visible;
}

.contract-query-result .admin-confirm-details > div {
  grid-template-columns: minmax(110px, 0.7fr) minmax(0, 1.3fr);
}

.contract-query-result-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.authorization-create-grid .qualification-warehouse-field {
  grid-column: span 2;
}

.qualification-license-expiry-control {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.authorization-create-grid .authorization-product-field {
  grid-column: span 2;
}

.authorization-create-grid .authorization-recipient-field {
  grid-column: span 3;
}

.form-date-shortcuts {
  align-content: end;
  display: grid;
}

.form-date-shortcuts .date-presets {
  align-items: center;
  flex-wrap: wrap;
  min-height: 44px;
}

@media (max-width: 1100px) {
  .authorization-create-grid .authorization-recipient-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .contract-query-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .contract-query-result .admin-confirm-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .contract-lookup-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .contract-lookup-button {
    justify-self: start;
  }
}

.authorization-create-grid small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 5px;
}

.authorization-create-note {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}

/* Reuse the hospital-development editor's modal as the authorization editor's
   single scroll container. The authorization form keeps only its own fields. */
.detail-dialog.authorization-create-dialog {
  max-height: calc(100vh - 48px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 24px 24px;
  scrollbar-gutter: stable;
  width: min(1240px, 100%);
}

.authorization-create-dialog > .authorization-create-content {
  max-height: none;
  overflow: visible;
  padding: 0;
  scrollbar-gutter: auto;
}

.hospital-development-editor-header.authorization-create-heading {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: normal;
}

.hospital-development-editor-nav.authorization-create-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 16px 0 0;
}

@media (max-width: 760px) {
  .detail-dialog.authorization-create-dialog {
    max-height: calc(100vh - 20px);
  }
}

.document-filters {
  align-items: flex-end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 280px));
  justify-content: start;
  width: 100%;
}

.document-filters label {
  min-width: 0;
}

.document-filter-actions .filter-reset-button {
  width: 100%;
}

.document-tabs {
  background: #f7fbfe;
  border: 1px solid #cfe2ef;
  border-radius: 7px;
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 5px;
}

.document-tab {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  display: inline-flex;
  gap: 9px;
  justify-content: center;
  min-width: 120px;
  padding: 9px 16px;
}

.document-tab:hover {
  background: #eaf4fb;
  color: var(--primary);
}

.document-tab.active {
  background: #dceefa;
  color: var(--primary-dark);
  box-shadow: inset 0 0 0 1px #b9d8ec;
}

.document-tab small {
  align-items: center;
  background: #fff;
  border: 1px solid #c6deed;
  border-radius: 999px;
  color: #567a92;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  height: 22px;
  justify-content: center;
  min-width: 28px;
  padding: 0 7px;
}

.document-panel {
  display: none;
}

.document-panel.active {
  display: block;
}

.document-card {
  background: #fff;
  border: 1px solid #c9deec;
  border-radius: 7px;
  box-shadow: 0 5px 18px rgba(47, 102, 141, 0.06);
  overflow: hidden;
  padding: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.document-card:hover {
  border-color: #9fc8e0;
  box-shadow: 0 8px 24px rgba(47, 102, 141, 0.1);
}

.contract-card-header {
  align-items: center;
  background: #eef7fc;
  border-bottom: 1px solid #c9deec;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 14px;
}

.document-card-heading {
  align-items: center;
  display: flex;
  gap: 11px;
  min-width: 0;
}

.document-record-index {
  align-items: center;
  background: #d8ecf8;
  border: 1px solid #b8d7e9;
  border-radius: 5px;
  color: var(--primary-dark);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  margin: 0;
  width: 38px;
}

.document-card-heading > div {
  min-width: 0;
}

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

.document-card-heading strong {
  color: #244d68;
  font-size: 14px;
}

.document-card-heading small {
  color: #6a879a;
  font-size: 12px;
  font-weight: 500;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-detail-grid {
  border-left: 1px solid #d7e6ef;
  border-top: 1px solid #d7e6ef;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px;
}

.contract-detail-grid div {
  border-bottom: 1px solid #d7e6ef;
  border-right: 1px solid #d7e6ef;
  min-width: 0;
  padding: 9px 11px;
}

.contract-detail-grid dt {
  color: #69869a;
  font-size: 12px;
  font-weight: 600;
}

.contract-detail-grid dd {
  color: #263f51;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.contract-detail-grid dd.expired-date {
  color: #c62828;
  font-weight: 700;
}

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

.qualification-detail-grid,
.authorization-detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contract-detail-grid .document-section-label {
  align-items: center;
  background: #e8f3fa;
  display: flex;
  grid-column: 1 / -1;
  min-height: 34px;
  padding: 7px 11px;
}

.contract-detail-grid .document-section-label dt {
  color: #315d7b;
  font-size: 12px;
  font-weight: 800;
}

.authorization-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.authorization-badges .status-chip {
  display: inline-flex;
  margin-top: 0;
}

.empty-state,
.empty-list {
  color: var(--muted);
  text-align: center;
}

.mapping-table {
  margin-top: 16px;
}

.rule-editor {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
}

.rule-editor p {
  color: var(--muted);
  margin-bottom: 0;
}

.rule-editor textarea {
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.55;
  min-height: 360px;
  white-space: pre;
}

.rule-help {
  background: #f6fafd;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 6px;
  padding: 12px;
}

.rule-help strong {
  color: var(--text);
}

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

.tab {
  background: #e7f1f8;
  color: var(--text);
}

.tab.active,
.tab:hover {
  background: var(--primary);
  color: #fff;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

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

.data-board article {
  background: #f6fafd;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.data-board ul {
  color: var(--muted);
  margin: 12px 0 0;
  padding-left: 18px;
}

body.modal-open {
  overflow: hidden;
}

.portal-action-dialog {
  background: transparent;
  border: 0;
  color: var(--text);
  max-width: calc(100vw - 32px);
  overflow: visible;
  padding: 0;
  width: 520px;
}

.portal-action-dialog::backdrop {
  background: rgba(28, 52, 70, 0.42);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

/* Shared fallback for browsers where dialog.showModal() is unavailable. */
dialog.portal-modal-fallback[open] {
  box-shadow: 0 24px 70px rgba(31, 60, 82, 0.24), 0 0 0 100vmax rgba(28, 52, 70, 0.42);
  display: block;
  inset: 50% auto auto 50%;
  margin: 0;
  position: fixed;
  transform: translate(-50%, -50%);
  z-index: 300;
}

.portal-action-content {
  background: #fafdff;
  border: 1px solid #c8dfed;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(31, 60, 82, 0.24);
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

.portal-action-dialog[open] .portal-action-content {
  animation: portal-action-enter 220ms cubic-bezier(0.2, 0.72, 0.3, 1);
  transform-origin: center bottom;
}

@keyframes portal-action-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.portal-action-content::before {
  background: var(--primary);
  content: "";
  height: 4px;
  inset: 0 0 auto;
  position: absolute;
}

.portal-action-dialog[data-tone="success"] .portal-action-content::before {
  background: #1aa77c;
}

.portal-action-dialog[data-tone="warning"] .portal-action-content::before {
  background: #d79a28;
}

.portal-action-dialog[data-tone="danger"] .portal-action-content::before,
.portal-action-dialog.is-error .portal-action-content::before {
  background: #d94e55;
}

.order-result-dialog {
  width: 560px;
}

.order-result-content {
  align-items: start;
  display: grid;
  gap: 0 14px;
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 28px;
  text-align: left;
}

.order-result-icon {
  align-items: center;
  background: #dff1fb;
  border: 1px solid #8fc9e7;
  border-radius: 50%;
  color: var(--primary-dark);
  display: flex;
  font-size: 20px;
  font-weight: 800;
  grid-row: 1 / span 3;
  height: 42px;
  justify-content: center;
  line-height: 1;
  width: 42px;
}

.order-result-dialog.is-error .order-result-icon {
  background: #fff3dc;
  border-color: #e5b964;
  color: #8a5d13;
}

.order-result-content h2 {
  font-size: 20px;
  line-height: 1.35;
  margin: 0 0 6px;
}

.order-result-content > .admin-confirm-eyebrow {
  align-self: end;
  margin-bottom: 3px;
}

.order-result-content p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
  overflow-wrap: anywhere;
}

.generated-result-block {
  background: #f4f9fc;
  border: 1px solid #dce9f3;
  border-radius: 8px;
  grid-column: 1 / -1;
  margin-top: 16px;
  padding: 12px 14px;
  text-align: left;
  width: auto;
}

.generated-result-block > strong {
  color: var(--text);
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.generated-result-block > p {
  font-size: 13px;
}

.generated-data-notice {
  background: #fffaf0;
  border-color: #eedcaf;
}

#generatedDeliveryBlock[data-delivery-status="sent"] {
  background: #f2fbf7;
  border-color: #cce8db;
}

#generatedDeliveryBlock[data-delivery-status="partial"],
#generatedDeliveryBlock[data-delivery-status="failed"] {
  background: #fff8ed;
  border-color: #ecd5aa;
}

.order-result-actions {
  align-items: center;
  border-top: 1px solid #dbe8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  grid-column: 1 / -1;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 18px;
  width: 100%;
}

.order-result-actions button {
  min-width: 112px;
}

.generated-result-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-confirm-dialog {
  width: 500px;
}

.admin-confirm-content {
  padding: 26px 26px 22px;
}

.admin-confirm-eyebrow {
  color: var(--primary);
  display: block;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.admin-confirm-content h2 {
  font-size: 20px;
  line-height: 1.35;
  margin: 6px 0 8px;
}

.admin-confirm-content > p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
  white-space: pre-line;
}

.admin-confirm-details {
  background: #f3f8fb;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 16px 0 0;
  padding: 4px 14px;
  max-height: min(46vh, 420px);
  overflow: auto;
}

.admin-confirm-details > div {
  align-items: start;
  border-bottom: 1px solid rgba(183, 208, 224, 0.58);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr);
  padding: 10px 0;
}

.admin-confirm-details > div:last-child {
  border-bottom: 0;
}

.admin-confirm-details dt,
.admin-confirm-details dd {
  font-size: 13px;
  margin: 0;
}

.admin-confirm-details dt {
  color: var(--muted);
}

.admin-confirm-details dd {
  color: var(--text);
  font-weight: 650;
  overflow-wrap: anywhere;
  text-align: right;
}

.admin-confirm-actions {
  align-items: center;
  border-top: 1px solid #dbe8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 18px;
}

.admin-confirm-actions button {
  min-width: 104px;
}

.draft-choice-dialog .admin-confirm-content {
  width: min(500px, calc(100vw - 32px));
}

.draft-choice-details > div {
  grid-template-columns: 90px minmax(0, 1fr);
}

#addFlowLineBtn.is-limit-reached,
#openFlowBatchEntryBtn.is-limit-reached {
  cursor: pointer;
  opacity: 0.68;
}

.detail-modal {
  background: rgba(30, 57, 78, 0.38);
  display: grid;
  inset: 0;
  padding: 24px;
  place-items: center;
  position: fixed;
  z-index: 50;
}

.detail-modal[hidden] {
  display: none;
}

.detail-dialog.dingtalk-oa-field-mapping-dialog {
  background: #fff;
  box-sizing: border-box;
  height: min(50vh, 560px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  width: min(50vw, 960px, calc(100vw - 48px));
}

.dingtalk-oa-mapping-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.dingtalk-oa-mapping-row {
  align-items: center;
  background: #f7f9fc;
  border: 1px solid #e1e8f0;
  border-radius: 10px;
  display: grid;
  gap: 8px;
  grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr) auto;
  padding: 8px;
}

.dingtalk-oa-mapping-sequence {
  color: var(--muted);
  text-align: center;
}

.dingtalk-oa-mapping-source,
.dingtalk-oa-mapping-target {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dingtalk-oa-mapping-source > span,
.dingtalk-oa-mapping-target > span {
  color: var(--muted);
  font-size: var(--font-label);
}

.dingtalk-oa-mapping-source .portal-control-shell {
  min-height: 36px;
}

.dingtalk-oa-mapping-actions,
.dingtalk-oa-mapping-footer,
.dingtalk-oa-field-settings {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dingtalk-oa-field-settings-summary {
  color: var(--muted);
  font-size: var(--font-label);
  font-weight: 500;
}

.dingtalk-oa-mapping-actions .neutral-button,
.dingtalk-oa-mapping-actions .danger-button {
  min-height: 30px;
  padding: 4px 8px;
}

.dingtalk-oa-attachment-settings {
  border: 0;
  display: grid;
  gap: 6px;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.dingtalk-oa-attachment-settings legend {
  color: var(--muted);
  font-weight: 700;
  padding: 0;
}

.dingtalk-oa-attachment-options {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.dingtalk-oa-attachment-options label {
  align-items: center;
  display: flex;
  gap: 5px;
}

.dingtalk-oa-attachment-settings small {
  color: var(--muted);
}

.dingtalk-oa-mapping-footer {
  justify-content: space-between;
}

.dingtalk-oa-mapping-footer > div {
  display: flex;
  gap: 8px;
}

.dingtalk-oa-mapping-empty {
  color: var(--muted);
  margin: 0;
}

.pending-login-modal {
  background: transparent;
  inset: auto 24px 24px auto;
  padding: 0;
  place-items: initial;
}

.pending-login-dialog {
  background: var(--surface-solid);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: var(--shadow-raised);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px;
  position: relative;
  transform-origin: right bottom;
  width: min(410px, calc(100vw - 48px));
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.pending-login-modal.is-closing {
  pointer-events: none;
}

.pending-login-modal.is-closing:not([hidden]) .pending-login-dialog {
  animation: pending-login-dialog-close 220ms cubic-bezier(0.4, 0, 1, 1) forwards;
  will-change: opacity, transform;
}

@keyframes pending-login-dialog-close {
  from {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 0;
    transform: translate(12px, 12px) scale(0.94);
  }
}

.pending-login-close {
  position: absolute;
  right: 18px;
  top: 18px;
}

.pending-login-heading {
  align-items: flex-start;
  border-left: 3px solid #f0b84b;
  display: block;
  padding-left: 12px;
  padding-right: 76px;
}

.pending-login-eyebrow {
  color: #8a5700;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.pending-login-heading h2 {
  color: var(--text);
  font-size: 19px;
  margin: 0 0 6px;
}

.pending-login-heading p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.pending-login-list {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.pending-login-item {
  align-items: center;
  background: transparent;
  border-bottom: 0;
  border-radius: 0;
  border-right: 1px solid var(--line);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 78px;
  padding: 10px 5px;
  text-align: center;
  width: 100%;
}

.pending-login-item:nth-child(2n) {
  border-right: 0;
}

.pending-login-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.pending-login-item:nth-child(-n + 2) {
  border-bottom: 1px solid var(--line);
}

.pending-login-item:hover:not(:disabled),
.pending-login-item:focus-visible {
  background: rgba(10, 132, 255, 0.055);
  box-shadow: inset 0 -3px 0 rgba(10, 132, 255, 0.46);
  color: var(--primary-dark);
}

.pending-login-item:disabled {
  background: transparent;
  box-shadow: none;
  color: var(--text);
  cursor: default;
  opacity: 0.5;
  transform: none;
}

.shipping-records-table th:nth-child(2),
.shipping-records-table td:nth-child(2),
.shipping-records-table th:last-child,
.shipping-records-table td:last-child,
.shipping-records-table [data-order-detail] {
  white-space: nowrap;
}

.shipping-records-table th:last-child,
.shipping-records-table td:last-child {
  text-align: center;
  width: 72px;
}

.pending-login-item-name,
.pending-login-item-count {
  align-items: center;
  display: flex;
}

.pending-login-item-name {
  font-size: 13px;
  font-weight: 650;
  gap: 10px;
}

.pending-login-item-name i {
  background: #5ac8fa;
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.pending-login-item:nth-child(2) .pending-login-item-name i {
  background: #f0b84b;
}

.pending-login-item:nth-child(3) .pending-login-item-name i {
  background: var(--danger);
}

.pending-login-item:nth-child(4) .pending-login-item-name i {
  background: #ff7a45;
}

.pending-login-item.is-approval {
  border-right: 0;
  border-top: 1px solid var(--line);
  flex-direction: row;
  grid-column: 1 / -1;
  justify-content: space-between;
  min-height: 62px;
  padding-inline: 18px;
}

.pending-login-item.is-approval .pending-login-item-name i {
  background: var(--primary);
}

.pending-login-item.is-approval .pending-login-item-count {
  justify-content: flex-end;
}

.pending-login-item-count {
  flex-wrap: wrap;
  color: var(--muted);
  justify-content: center;
  gap: 5px;
}

.pending-login-item-count strong {
  color: #8a5700;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.pending-login-item-count small {
  font-size: 12px;
}

.pending-login-item-count b {
  display: none;
}

.pending-login-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.pending-login-actions button {
  min-height: 40px;
}

.detail-dialog {
  background: var(--surface-solid);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(36, 68, 92, 0.22);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px 24px 24px;
  width: min(1500px, 100%);
}

/* Data-heavy dialogs use solid surfaces so dense text never blends with the page below. */
#orderDetailModal .shipment-sheet,
#submittedOrderHistoryDetailModal .shipment-sheet,
.system-log-modal .system-log-dialog {
  background: var(--surface-solid);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.submitted-order-history-actions {
  align-items: center;
  background: var(--surface-solid);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
}

.submitted-order-history-actions > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.history-download-status {
  background: #f4f8fc;
  border: 1px solid #d5e4ef;
  border-left: 3px solid #7ca8c9;
  border-radius: 10px;
  color: #526b7b;
  display: inline-flex;
  flex: 1 1 360px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  min-height: 42px;
  padding: 10px 14px;
}

.history-download-status[data-tone="loading"] {
  background: #f1f7fd;
  border-color: #c7dff2;
  border-left-color: var(--primary);
  color: #246792;
}

.history-download-status[data-tone="success"] {
  background: #f1faf7;
  border-color: #cce8de;
  border-left-color: #28a77d;
  color: #167357;
}

.history-download-status[data-tone="danger"] {
  background: #fff6f5;
  border-color: #f0d1ce;
  border-left-color: #d9534f;
  color: #a73b37;
}

.history-download-status[hidden] {
  display: none;
}

.submitted-order-history-actions > div {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.detail-dialog-header {
  min-height: 78px;
  position: relative;
}

.shipment-sheet-title {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.shipment-logo-frame {
  height: 50px;
  overflow: hidden;
  position: relative;
  width: 230px;
}

.shipment-logo-frame img {
  display: block;
  left: 50%;
  max-width: none;
  position: absolute;
  top: -27px;
  transform: translateX(-50%);
  width: 260px;
}

.shipment-sheet-title h2 {
  color: #173d58;
  font-size: 25px;
  letter-spacing: 0;
  margin: 4px 0 1px;
}

.shipment-sheet-title p {
  color: #86a2b6;
  font-size: 10px;
  letter-spacing: 0;
  margin: 0;
}

.detail-dialog-header .dialog-close-button {
  position: absolute;
  right: 0;
  top: 0;
}

.hospital-development-editor-header .dialog-close-button,
.hospital-development-statistics-header .dialog-close-button {
  position: static;
}

.icon-button {
  align-items: center;
  background: #e7f1f8;
  color: var(--primary);
  display: inline-flex;
  font-size: 22px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 34px;
}

.order-detail-meta {
  border-left: 1px solid #b9d3e5;
  border-top: 1px solid #b9d3e5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 4px 0 16px;
}

.order-detail-meta > div {
  border-bottom: 1px solid #b9d3e5;
  border-right: 1px solid #b9d3e5;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  min-height: 44px;
}

.order-detail-meta dt,
.order-detail-meta dd {
  align-items: center;
  display: flex;
  margin: 0;
  min-width: 0;
  padding: 8px 10px;
}

.order-detail-meta dt {
  background: #e8f3fa;
  color: #486b83;
  font-size: 12px;
  font-weight: 700;
}

.order-detail-meta dd {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.order-detail-table-wrap {
  border: 1px solid #afcbdc;
  overflow-x: auto;
}

.shipment-detail-table {
  border-collapse: collapse;
  min-width: 1120px;
  table-layout: fixed;
  width: 100%;
}

.shipment-detail-table th,
.shipment-detail-table td {
  border-bottom: 1px solid #cbdde9;
  border-right: 1px solid #cbdde9;
  padding: 9px 7px;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
}

.shipment-detail-table th:last-child,
.shipment-detail-table td:last-child {
  border-right: 0;
}

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

.shipment-detail-table thead th {
  background: #dbeefa;
  color: #315d7b;
  font-size: 12px;
  font-weight: 700;
}

.shipment-detail-table tbody td {
  color: #28485e;
  font-size: 12px;
  line-height: 1.45;
}

.shipment-detail-table tbody tr:nth-child(even) td {
  background: #f7fbfe;
}

.shipment-detail-table tbody tr:hover td {
  background: #edf7fd;
}

.shipment-col-index {
  width: 46px;
}

.shipment-col-manufacturer {
  width: 180px;
}

.shipment-col-code {
  width: 118px;
}

.shipment-col-product {
  width: 170px;
}

.shipment-col-model {
  width: 82px;
}

.shipment-col-specification {
  width: 130px;
}

.shipment-col-specialty {
  width: 90px;
}

.shipment-col-money {
  width: 112px;
}

.shipment-col-quantity {
  width: 78px;
}

.order-detail-totals {
  align-items: center;
  background: #edf7fd;
  border: 1px solid #afcbdc;
  border-radius: 0 0 4px 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  justify-content: flex-end;
  margin-top: 16px;
  min-height: 46px;
  padding: 0 14px;
}

.order-detail-totals span {
  align-items: center;
  color: #55758b;
  display: flex;
  font-size: 12px;
  gap: 8px;
  min-height: 45px;
  padding: 0 16px;
}

.order-detail-totals strong {
  color: var(--primary-dark);
  font-size: 15px;
}

.order-detail-totals .order-detail-total-label {
  color: #315d7b;
  font-size: 14px;
  font-weight: 700;
  margin-right: auto;
  padding-left: 0;
}

.order-detail-totals .order-detail-grand-total {
  border-left: 1px solid #c4dce9;
}

.order-detail-totals .order-detail-grand-total strong {
  font-size: 17px;
}

.login-modal {
  background: #eef7fd;
  display: grid;
  inset: 0;
  overflow: auto;
  padding: 32px;
  place-items: center;
  position: fixed;
}

.login-modal.hidden {
  display: none;
}

.login-layout {
  align-items: center;
  display: grid;
  gap: 58px;
  grid-template-columns: minmax(0, 470px) 400px;
  justify-content: center;
  max-width: 940px;
  position: relative;
  width: 100%;
}

.login-brand-panel {
  align-items: center;
  display: flex;
  justify-content: center;
  width: 100%;
}

.login-logo-frame {
  height: 170px;
  max-width: 470px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.login-logo {
  display: block;
  left: 50%;
  max-width: none;
  mix-blend-mode: multiply;
  position: absolute;
  top: -31px;
  transform: translateX(-50%);
  width: 560px;
}

.login-form-area {
  min-width: 0;
  width: 100%;
}

.login-card {
  background: var(--surface-solid);
  border: 1px solid #d4e4ef;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(43, 91, 125, 0.12);
  display: grid;
  gap: 16px;
  padding: 30px;
  width: 100%;
}

.login-form-heading {
  border-bottom: 1px solid #e0ebf3;
  margin-bottom: 2px;
  padding-bottom: 18px;
}

.login-form-heading h2 {
  color: #183b54;
  font-size: 22px;
}

.login-form-heading p,
.role-gate p {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 0;
}

.login-card input {
  min-height: 46px;
}

.login-card label span {
  color: #425f74;
  font-weight: 700;
}

.form-error {
  color: var(--danger);
  min-height: 20px;
  margin-bottom: 0;
}

.form-error:empty {
  display: none;
}

@keyframes hospital-stat-reveal {
  to { transform: scaleX(1); }
}

@keyframes hospital-stat-grow {
  to { transform: scaleY(1); }
}

@keyframes hospital-stat-grow-x {
  to { transform: scaleX(1); }
}

@keyframes hospital-stat-donut-in {
  from { opacity: 0; transform: scale(0.9) rotate(-10deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

.login-submit {
  align-items: center;
  display: flex;
  gap: 9px;
  justify-content: center;
  min-height: 46px;
  width: 100%;
}

.login-card input:disabled {
  background: #f4f8fb;
  color: var(--text);
  opacity: 1;
}

@keyframes login-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1500px) {
  .line-fields {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
  }
}

@media (max-width: 1100px) {
  .hospital-directory-search {
    grid-template-columns: minmax(0, 1fr) minmax(100px, 130px) auto;
  }

  .hospital-directory-edit-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hospital-development-statistics-header {
    display: grid;
  }

  .hospital-development-statistics-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    width: 100%;
  }

  .login-layout {
    gap: 36px;
    grid-template-columns: minmax(0, 430px) 380px;
    max-width: 850px;
  }

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

  .submitted-order-history-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .submitted-order-history-actions > div {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .history-panel-header {
    align-items: stretch;
    display: grid;
  }

  .history-filters,
  .history-filters.without-customer-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .history-date-filter {
    grid-column: 1 / -1;
  }

  .metric-grid,
  .two-columns,
  .data-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hospital-directory-results {
    grid-template-columns: 1fr;
  }

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

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

  .hospital-development-month-editor {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hospital-development-system-info .admin-confirm-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hospital-development-statistics-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hospital-development-statistics-card-wide {
    grid-column: span 2;
  }

  .hospital-development-statistics-plan-card {
    grid-column: span 1;
  }

  .line-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .account-profile-nav {
    margin-top: 0;
  }

  .account-profile-readonly-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-profile-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .account-profile-actions .system-form-status {
    margin-right: 0;
  }

  .login-modal {
    align-items: start;
    padding: 28px 18px;
  }

  .login-layout {
    gap: 24px;
    grid-template-columns: 1fr;
    max-width: 440px;
  }

  .login-brand-panel {
    padding-top: 8px;
  }

  .login-logo-frame {
    height: 105px;
    max-width: 390px;
  }

  .login-logo {
    top: -28px;
    width: 430px;
  }

  .login-card {
    padding: 24px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    width: 100%;
  }


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

  .hospital-directory-query-field {
    grid-column: 1 / -1;
  }

  .hospital-directory-card header {
    flex-wrap: wrap;
  }

  .hospital-directory-card-actions {
    margin-left: 38px;
  }

  .hospital-directory-edit-fields {
    grid-template-columns: 1fr;
  }

  .hospital-directory-edit-span-2 {
    grid-column: auto;
  }

  .hospital-directory-edit-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .hospital-directory-edit-footer > div {
    justify-content: flex-end;
  }

  .sidebar {
    border-bottom: 1px solid #bdd5e5;
    border-right: 0;
    min-height: auto;
    padding: 14px;
  }

  .brand {
    justify-items: center;
    margin-bottom: 14px;
  }

  .brand-logo-frame {
    height: 58px;
    max-width: 190px;
  }

  .brand-logo {
    top: -10px;
    width: 210px;
  }

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

  .nav-item {
    justify-content: center;
    min-width: 0;
    padding: 8px 10px;
    text-align: center;
    white-space: normal;
  }

  .user-card {
    align-items: center;
    column-gap: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: 12px;
    padding: 10px 12px;
  }

  .user-card button {
    align-self: center;
    grid-column: 2;
    grid-row: 1;
    margin-top: 0;
    min-height: 34px;
    padding-inline: 12px;
    width: auto;
  }

  .main-content {
    max-width: 100%;
    min-width: 0;
    padding: 16px;
    width: 100%;
  }

  .topbar {
    align-items: stretch;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 16px;
  }

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

  .account-box {
    align-items: center;
    background: #fff;
    border: 1px solid #d3e3ee;
    border-radius: 7px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-width: 0;
    padding: 8px 9px 8px 12px;
  }

  .account-box span {
    font-size: 13px;
    line-height: 1.45;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .account-box button {
    flex: 0 0 auto;
    min-height: 34px;
    padding-inline: 12px;
    white-space: nowrap;
  }

  .panel-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
  }

  .history-panel-header,
  .document-panel-header {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .order-summary {
    align-items: stretch;
    display: grid;
  }

  .metric-grid,
  .two-columns,
  .contract-detail-grid,
  .form-grid,
  .data-board,
  .order-summary {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    gap: 10px;
  }

  .metric-card {
    padding: 14px 16px;
  }

  .metric-card strong {
    font-size: 24px;
    overflow-wrap: anywhere;
  }

  .content-grid,
  .content-grid > *,
  .view {
    max-width: 100%;
    min-width: 0;
  }

  .panel {
    padding: 14px;
  }

  .dashboard-customer-grid,
  .dashboard-scope-grid {
    grid-template-columns: minmax(0, 1fr);
    padding-right: 0;
  }

  #dashboard .table-wrap {
    width: 100%;
  }

  #dashboard table {
    min-width: 500px;
  }

  .wide {
    grid-column: span 1;
  }

  .document-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .document-tab {
    min-width: 0;
    padding-inline: 8px;
  }

  .history-filters,
  .history-filters.without-customer-filter {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .document-filters {
    grid-template-columns: 1fr;
  }

  .filter-reset-action,
  .document-filter-actions {
    padding-top: 0;
    width: 100%;
  }

  .filter-reset-button {
    width: 100%;
  }

  .date-range-fields {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .history-filter-summary {
    align-items: flex-start;
    display: grid;
    justify-content: stretch;
  }

  .detail-modal {
    padding: 10px;
  }

  .hospital-development-month-editor,
  .hospital-development-system-info .admin-confirm-details {
    grid-template-columns: 1fr;
  }

  .hospital-development-statistics-header,
  .hospital-development-statistics-controls {
    align-items: stretch;
    display: grid;
  }

  .hospital-development-statistics-controls {
    grid-template-columns: 1fr;
  }

  .hospital-development-statistics-card > header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .hospital-development-statistics-card-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-left: 0;
    width: 100%;
  }

  .hospital-development-statistics-card-controls .portal-control-shell {
    min-width: 0;
    width: 100%;
  }

  .hospital-development-statistics-kpis,
  .hospital-development-statistics-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hospital-development-statistics-card-wide {
    grid-column: auto;
  }

  .hospital-development-donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .order-result-content {
    padding: 24px 18px 18px;
  }

  .order-result-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .order-result-actions button {
    width: 100%;
  }

  .generated-result-file-actions {
    display: grid;
    gap: 10px;
    width: 100%;
  }

  .admin-confirm-content {
    padding: 24px 18px 18px;
  }

  .admin-confirm-details > div {
    gap: 5px;
    grid-template-columns: 1fr;
  }

  .admin-confirm-details dd {
    text-align: left;
  }

  .admin-confirm-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-confirm-actions button {
    min-width: 0;
    width: 100%;
  }

  .admin-confirm-actions > button:only-child {
    grid-column: 1 / -1;
  }

  .detail-dialog {
    max-height: calc(100vh - 20px);
    padding: 16px;
  }

  .order-detail-meta {
    grid-template-columns: 1fr;
  }

  .order-detail-totals {
    align-items: flex-start;
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    padding: 0;
  }

  .order-detail-totals span,
  .order-detail-totals .order-detail-total-label {
    border-bottom: 1px solid #c4dce9;
    justify-content: space-between;
    margin: 0;
    padding: 0 12px;
  }

  .order-detail-totals .order-detail-grand-total {
    border-bottom: 0;
    border-left: 0;
  }

  .line-item {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .line-fields {
    grid-template-columns: 1fr;
  }

  .line-item > .remove-line-button {
    grid-column: 2;
  }
}

@media (max-width: 420px) {
  .main-content {
    padding: 12px;
  }

  .sidebar {
    padding: 12px;
  }

  .nav-item {
    font-size: 13px;
    padding-inline: 6px;
  }

  .account-box {
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .metric-card strong {
    font-size: 22px;
  }

  .date-range-fields {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .date-range-fields > span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  button,
  input,
  select,
  textarea,
  .portal-dropdown-arrow,
  .combobox-option {
    transition: none;
  }

  .portal-loading-spinner,
  .portal-loading-overlay,
  .portal-loading-overlay.is-task-entering,
  .portal-loading-dialog,
  .portal-loading-overlay.is-task-entering .portal-loading-dialog,
  .portal-loading-logo,
  .portal-login-identity-mark,
  .portal-login-identity-copy > *,
  .portal-loading-overlay.is-login-identity .portal-loading-dialog,
  .portal-loading-progress > span,
  .pending-login-modal.is-closing .pending-login-dialog,
  button.is-operation-loading .operation-button-spinner,
  button.is-click-feedback {
    animation: none;
  }

  .portal-action-dialog[open] .portal-action-content {
    animation: none;
  }

  .portal-dropdown-open .portal-dropdown-menu,
  .portal-dropdown-closing .portal-dropdown-menu {
    animation: none;
  }

  .hospital-development-statistics-kpis article::after,
  .hospital-development-monthly-columns button i,
  .hospital-development-bar-row > i b,
  .hospital-development-donut {
    animation: none;
    transform: none;
  }
}
.approval-workflow-designer {
  align-items: center;
  background: #f5f7fa;
  border: 1px solid #e7edf4;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  margin-top: 14px;
  min-height: 260px;
  overflow: visible;
  padding: 14px 14px 18px;
}

.flow-approval-stage-card.approval-workflow-node {
  background: #fff;
  border: 1px solid #e1e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(28, 61, 99, 0.08);
  display: grid;
  grid-template-columns: minmax(128px, 1fr) minmax(128px, 1fr);
  gap: 6px 10px;
  align-items: end;
  max-width: 380px;
  padding: 0 12px 11px;
  position: relative;
  width: min(100%, 380px);
  z-index: 1;
}

.flow-approval-stage-card.approval-workflow-node:has(.portal-dropdown-open),
.flow-approval-stage-card.approval-workflow-node:has(.portal-dropdown-closing) {
  z-index: 10;
}

.flow-approval-stage-card.approval-workflow-node > label {
  align-items: stretch;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.approval-workflow-node-heading {
  background: #6b8fbd;
  border-radius: 9px 9px 0 0;
  color: #fff;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -12px 1px;
  min-height: 38px;
  padding: 5px 7px 5px 12px;
}

.approval-workflow-node.is-business .approval-workflow-node-heading {
  background: #6f9b87;
}

.approval-workflow-node.is-fixed .approval-workflow-node-heading {
  background: #ed9b42;
}

.approval-workflow-node-heading > strong {
  display: grid;
  font-size: 14px;
  gap: 1px;
}

.approval-workflow-node-heading > strong small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.approval-workflow-node-heading > div {
  display: flex;
  gap: 6px;
}

.approval-workflow-icon-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 7px;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  min-height: 24px;
  padding: 0;
  width: 24px;
}

.approval-workflow-icon-button:hover {
  background: rgba(255, 255, 255, 0.25);
}

.approval-workflow-icon-button:disabled {
  opacity: 0.35;
}

.approval-workflow-icon-button svg {
  height: 13px;
  width: 13px;
}

.approval-workflow-icon-button.is-danger:hover {
  background: rgba(176, 33, 45, 0.72);
}

.approval-workflow-node .flow-approval-approver-field {
  grid-column: 1 / -1;
}

.flow-approval-stage-card.approval-workflow-node .approval-authorization-code-choice {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  display: flex;
  gap: 7px;
  grid-column: 1 / -1;
  min-height: 0;
  padding: 2px 0;
}

.flow-approval-stage-card.approval-workflow-node .approval-authorization-code-choice > span {
  align-items: baseline;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 2px 9px;
  min-width: 0;
}

.flow-approval-stage-card.approval-workflow-node .approval-authorization-code-choice input {
  flex: 0 0 16px;
  height: 16px;
  margin: 0;
  width: 16px;
}

.flow-approval-stage-card.approval-workflow-node .approval-authorization-code-choice strong {
  font-size: 12px;
}

.flow-approval-stage-card.approval-workflow-node .approval-authorization-code-choice small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 0;
}

/* Keep the authorization-code switch and display-field mapping on one compact
   row for the DingTalk node.  Other approval nodes retain their full-width
   authorization-code switch. */
.flow-approval-stage-card.approval-workflow-node.is-dingtalk_oa .approval-authorization-code-choice {
  grid-column: 1;
  grid-row: 2;
}

.flow-approval-stage-card.approval-workflow-node.is-dingtalk_oa .dingtalk-oa-field-settings {
  grid-column: 2;
  grid-row: 2;
  justify-content: flex-start;
}

.approval-workflow-node select[multiple] {
  min-height: 104px;
}

.approval-workflow-endpoint {
  background: #fff;
  border: 1px solid #dfe7f0;
  border-radius: 9px;
  box-shadow: 0 5px 14px rgba(28, 61, 99, 0.06);
  display: grid;
  padding: 8px 12px;
  width: min(100%, 210px);
}

.approval-workflow-endpoint strong {
  color: #29496e;
  font-size: 13px;
}

.approval-workflow-endpoint small {
  color: var(--muted);
  font-size: 11px;
}

.approval-workflow-endpoint.is-start {
  border-top: 5px solid #5876a8;
}

.approval-workflow-endpoint.is-end {
  border-top: 5px solid #91a3b6;
}

.approval-workflow-insert {
  align-items: center;
  display: flex;
  flex-direction: column;
  min-height: 50px;
  position: relative;
  width: min(100%, 380px);
  z-index: 3;
}

.approval-workflow-insert::before,
.approval-workflow-insert::after {
  background: #d9e1ea;
  content: "";
  flex: 1;
  width: 1px;
}

.approval-workflow-plus {
  align-items: center;
  background: #fff;
  border: 1px solid #dbe5ef;
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(37, 83, 130, 0.13);
  display: flex;
  flex: 0 0 24px;
  height: 24px;
  justify-content: center;
  min-height: 24px;
  padding: 0;
  width: 24px;
}

.approval-workflow-plus:hover {
  background: #eef7ff;
  border-color: #8dc9ff;
}

.approval-workflow-plus svg {
  color: var(--primary);
  height: 14px;
  width: 14px;
}

.approval-workflow-node .portal-control-shell {
  border-radius: 6px;
  min-height: 30px;
}

.approval-workflow-node .portal-control-shell > .combobox-input {
  font-size: 11px;
  line-height: 1.2;
  min-height: 30px;
  padding: 3px 33px 3px 8px;
}

.approval-workflow-node .combobox-toggle {
  height: 20px;
  min-height: 20px;
  right: 2px;
  width: 20px;
}

.approval-workflow-node .portal-dropdown-arrow {
  height: 9px;
  width: 9px;
}

.approval-workflow-node .combobox-menu {
  border-radius: 6px;
  max-height: 180px;
  padding: 3px;
}

.approval-workflow-node .combobox-option {
  border-radius: 4px;
  font-size: 11px;
  min-height: 28px;
  padding: 5px 7px;
}

.approval-workflow-add-menu {
  display: grid;
  gap: 6px;
  left: calc(50% + 25px);
  padding: 8px;
  position: absolute;
  top: 16px;
  width: 230px;
  z-index: 20;
}

.approval-workflow-add-menu button {
  background: transparent;
  border-radius: 8px;
  color: var(--text);
  display: grid;
  justify-items: start;
  min-height: 54px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.approval-workflow-add-menu strong {
  color: #1e4f7c;
  font-size: 13px;
}

.approval-workflow-add-menu small {
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 760px) {
  .approval-detail-actions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .approval-detail-actions > .history-download-status {
    flex-basis: 100%;
    margin-right: 0;
    width: 100%;
  }

  .flow-approval-stage-card.approval-workflow-node {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow-approval-stage-card.approval-workflow-node.is-dingtalk_oa .approval-authorization-code-choice,
  .flow-approval-stage-card.approval-workflow-node.is-dingtalk_oa .dingtalk-oa-field-settings {
    grid-column: 1;
    grid-row: auto;
  }

  .approval-workflow-add-menu {
    left: 50%;
    top: 50px;
    transform: translateX(-50%);
    width: min(92vw, 260px);
  }
}
.approval-detail-table tr.is-changed td {
  background: rgba(255, 189, 46, 0.12);
}

.approval-exception-repair {
  align-items: end;
  display: grid;
  flex: 1 1 280px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
  min-width: 0;
  width: auto;
}

/* Current-node reassignment uses a complete row within the existing action area. */
.approval-detail-actions:has(#approvalReassignmentEntry:not([hidden])) {
  flex-wrap: wrap;
}
#approvalReassignmentEntry {
  flex-basis: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#approvalReassignmentStatus,
#approvalReassignmentEntry label:has(#approvalReassignmentNote) {
  grid-column: 1 / -1;
}
#approvalReassignmentStatus { margin: 0; }
#approvalReassignmentEntry label,
#approvalReassignmentEntry select,
#approvalReassignmentEntry input { min-width: 0; width: 100%; }
#approvalReassignmentEntry .approval-reassignment-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
#approvalReassignmentEntry button { white-space: nowrap; }

.approval-exception-repair[hidden] {
  display: none;
}

.approval-exception-repair label {
  align-self: stretch;
  display: grid;
  gap: 5px;
  grid-template-rows: auto minmax(42px, auto);
}

/* Keep each field within its action panel when several panels are visible. */
.approval-exception-repair label,
.approval-exception-repair input {
  min-width: 0;
  width: 100%;
}
#qualificationApprovalAssociationEntry {
  display: flex;
  flex: 1 1 420px;
  flex-wrap: wrap;
}
#qualificationApprovalAssociationEntry[hidden] { display: none; }
#qualificationApprovalAssociationEntry > label { flex: 1 1 220px; }
#qualificationApprovalAssociationEntry > button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.approval-exception-repair .portal-control-shell {
  align-self: end;
  min-height: 42px;
}
