@charset "UTF-8";
:root {
  --blue: #3265db;
  --blue-dark: #1d4ebe;
  --blue-soft: #edf3ff;
  --ink: #20304a;
  --muted: #7b879b;
  --line: #e5eaf1;
  --surface: #fff;
  --bg: #f4f6fa;
  --green: #218871;
  --orange: #b87824;
  --red: #c74c51;
  --radius: 12px;
  font:
    16px/1.55 "Segoe UI",
    "Microsoft YaHei",
    system-ui,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button,
a,
input,
select,
textarea {
  outline-offset: 3px;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--blue);
}
button {
  border: 0;
  background: none;
}
svg {
  display: inline-block;
  vertical-align: middle;
  flex: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button svg {
  pointer-events: none;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #dce3ed;
  background: #fff;
  border-radius: 6px;
  min-height: 38px;
  padding: 7px 11px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  font-size: 0.875rem;
}
input:hover,
select:hover,
textarea:hover {
  border-color: #b2c4de;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #3265db13;
}
input[readonly] {
  background: #f5f7fa;
  color: #7c889b;
  cursor: default;
}
textarea {
  resize: vertical;
  line-height: 1.7;
  min-height: 86px;
}
input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--blue);
  flex-shrink: 0;
}
input[type="file"] {
  padding: 10px;
  background: #f8faff;
}
select {
  padding-right: 26px;
}
input::placeholder,
textarea::placeholder {
  color: #a7b0bf;
}
a {
  color: var(--blue);
}
.num {
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.8125rem;
}
.strong {
  font-weight: 600;
}
.required {
  color: var(--red);
  margin-left: 4px;
}
.hidden {
  display: none !important;
}
.no-wrap {
  white-space: nowrap;
}
.icon {
  width: 19px;
  height: 19px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid #dce3ed;
  border-radius: 6px;
  padding: 7px 14px;
  background: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: 0.15s;
}
.btn:hover {
  border-color: #a9bedc;
  background: #f8faff;
}
.btn.primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  box-shadow: 0 3px 6px #3265db17;
}
.btn.primary:hover {
  background: var(--blue-dark);
}
.btn.soft {
  background: var(--blue-soft);
  border-color: #dce7ff;
  color: var(--blue);
}
.btn.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.btn.danger {
  color: var(--red);
  border-color: #f0d5d6;
}
.btn.sm {
  min-height: 30px;
  padding: 3px 9px;
  font-size: 0.8125rem;
}
.icon-btn {
  width: 34px;
  height: 34px;
  padding: 6px;
  border-radius: 6px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:hover {
  background: var(--blue-soft);
  color: var(--blue);
}
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.push {
  margin-left: auto;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  line-height: 1.5;
  padding: 3px 8px;
  border-radius: 4px;
  background: #eef2f7;
  color: #718097;
  white-space: nowrap;
}
.badge.blue {
  background: #edf3ff;
  color: var(--blue);
}
.badge.green {
  background: #eaf6f1;
  color: var(--green);
}
.badge.orange {
  background: #fff4e7;
  color: var(--orange);
}
.badge.red {
  background: #fff0f0;
  color: var(--red);
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.tag {
  display: inline-flex;
  padding: 2px 8px;
  border: 1px solid #e4eaf2;
  border-radius: 4px;
  color: #718097;
  font-size: 0.75rem;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}
.eyebrow {
  font-size: 0.75rem;
  color: #8a98ae;
  letter-spacing: 0.09em;
}
.mono {
  font-family: "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
.topbar {
  height: 74px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-mark {
  width: 39px;
  height: 39px;
  border-radius: 11px;
  background: var(--blue);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 4px 10px #3265db20;
}
.brand-mark .icon {
  width: 25px;
  height: 25px;
}
.brand h1 {
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: 0.025em;
  white-space: nowrap;
}
.brand .eyebrow {
  font-size: 0.65rem;
  margin-top: 1px;
  letter-spacing: 0.1em;
}
.top-divider {
  height: 24px;
  width: 1px;
  background: var(--line);
}
.workspace-label {
  font-size: 0.875rem;
  color: #7c879a;
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.8125rem;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
}
.user-avatar {
  width: 31px;
  height: 31px;
  background: #edf2fa;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #647797;
  font-size: 0.75rem;
}
.shell {
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  min-height: calc(100vh - 74px);
}
.sidebar {
  border-right: 1px solid var(--line);
  background: #fff;
  padding: 24px 16px 0;
  position: sticky;
  top: 74px;
  height: calc(100vh - 74px);
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  margin-bottom: 18px;
}
.sidebar-title h2 {
  font-size: 1rem;
}
.count {
  background: #eef2f8;
  min-width: 22px;
  text-align: center;
  font-size: 0.75rem;
  padding: 1px 6px;
  border-radius: 4px;
  color: #7e8a9e;
}
.search-wrap {
  position: relative;
}
.search-wrap > .icon {
  position: absolute;
  top: 10px;
  left: 11px;
  color: #97a3b5;
  width: 17px;
  height: 17px;
}
.search-wrap input {
  padding-left: 35px;
  background: #f7f9fc;
  border-color: #ebeff5;
  font-size: 0.8125rem;
}
.patient-filters {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f5f7fb;
  border-radius: 7px;
  margin: 13px 0 14px;
}
.patient-filter {
  flex: 1;
  font-size: 0.8125rem;
  color: #8a94a5;
  padding: 5px 3px;
  border-radius: 4px;
}
.patient-filter.active {
  background: #fff;
  color: #335ca4;
  box-shadow: 0 1px 4px #233e6810;
}
.patient-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.patient-item {
  border: 1px solid transparent;
  width: 100%;
  padding: 13px 12px;
  display: flex;
  gap: 11px;
  text-align: left;
  border-radius: 9px;
  position: relative;
}
.patient-item:hover {
  background: #f7f9fd;
}
.patient-item.active {
  background: #edf3ff;
  border-color: #dce7ff;
}
.patient-item.active:before {
  content: "";
  position: absolute;
  left: -17px;
  top: 15px;
  bottom: 15px;
  width: 3px;
  background: var(--blue);
  border-radius: 2px;
}
.avatar {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  background: #f0f3f8;
  color: #7c8da6;
  border-radius: 9px;
  font-size: 0.9375rem;
  flex-shrink: 0;
}
.patient-item.active .avatar {
  background: #dce8ff;
  color: #3664b8;
}
.patient-name-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-size: 0.875rem;
  font-weight: 600;
}
.patient-id {
  font-size: 0.75rem;
  color: #93a0b3;
  font-weight: 400;
  margin-left: auto;
}
.patient-meta {
  font-size: 0.75rem;
  color: #8a96a9;
}
.new-patient {
  width: 100%;
  margin-top: 20px;
  border-style: dashed;
  color: var(--blue);
  padding: 10px;
  min-height: 42px;
}
.sidebar-footer {
  margin-top: auto;
  padding: 26px 8px 0;
  color: #98a3b3;
  font-size: 0.75rem;
}
.sidebar-footer .icon {
  width: 14px;
  height: 14px;
  margin-right: 4px;
}
.sidebar-footer .version {
  margin-top: 9px;
  padding-top: 13px;
  border-top: 1px solid #edf0f5;
  font-size: 0.6875rem;
  letter-spacing: 0.035em;
}
.main {
  padding: 22px 28px 0;
  min-width: 0;
  max-width: 1680px;
  width: 100%;
  margin: auto;
  align-self: start;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #8c98aa;
  font-size: 0.8125rem;
  margin-bottom: 19px;
}
.breadcrumb .icon {
  width: 14px;
  height: 14px;
}
.breadcrumb .current {
  color: #55657e;
}
.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 15px;
}
.workspace-heading h2 {
  font-size: 1.4rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.patient-banner {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 23px;
  display: flex;
  align-items: center;
  gap: 17px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px #25354e02;
}
.patient-banner .avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #edf3ff;
  color: var(--blue);
  font-size: 1.375rem;
}
.patient-banner-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 6px;
}
.patient-banner-title h3 {
  font-size: 1.25rem;
  font-weight: 600;
}
.patient-banner-meta {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 0.8125rem;
  color: #7f8a9d;
  flex-wrap: wrap;
}
.patient-banner-meta span + span {
  border-left: 1px solid #e3e8ef;
  padding-left: 13px;
}
.banner-field {
  margin-left: 38px;
  font-size: 0.8125rem;
}
.banner-field > div:first-child {
  color: #96a0af;
  font-size: 0.75rem;
  margin-bottom: 6px;
}
.banner-field > div:last-child {
  font-weight: 550;
  color: #54637a;
}
.banner-actions {
  margin-left: auto;
}
.tabs {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 23px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.tab {
  padding: 13px 14px 15px;
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
  font-size: 0.875rem;
  color: #7f8ba0;
  position: relative;
}
.tab.active {
  color: var(--blue);
  font-weight: 600;
}
.tab.active:after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 3px;
  background: var(--blue);
  left: 13px;
  right: 13px;
  border-radius: 2px;
}
.tab .icon {
  width: 17px;
  height: 17px;
}
.tab:hover {
  color: var(--blue);
}
.content {
  padding-bottom: 24px;
  min-height: 410px;
}
.page-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 15px;
}
.page-intro h3 {
  font-size: 1rem;
  font-weight: 600;
}
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 20px;
  align-items: start;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 6px #25354e02;
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: space-between;
  padding: 17px 21px;
  border-bottom: 1px solid #edf0f5;
  min-height: 57px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9375rem;
  font-weight: 600;
}
.card-title .icon {
  width: 17px;
  height: 17px;
  color: #7287a7;
}
.card-index {
  font-size: 0.6875rem;
  color: #96abc9;
  font-weight: 500;
  letter-spacing: 0.06em;
  min-width: 18px;
}
.card-body {
  padding: 20px 22px 23px;
}
.card-body.compact {
  padding: 16px 18px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 20px;
}
.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
}
.field {
  min-width: 0;
}
.field > label {
  font-size: 0.8125rem;
  display: block;
  margin-bottom: 7px;
  color: #6a7890;
}
.field > label .unit {
  font-size: 0.75rem;
  color: #97a2b2;
  font-weight: 400;
}
.span-2 {
  grid-column: span 2;
}
.span-full {
  grid-column: 1/-1;
}
.input-group {
  display: flex;
  align-items: center;
  border: 1px solid #dce3ed;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  min-height: 38px;
}
.input-group input {
  border: 0;
  border-radius: 0;
  min-width: 0;
  box-shadow: none;
}
.input-group > .suffix {
  font-size: 0.8125rem;
  color: #95a0b2;
  padding: 0 10px;
  white-space: nowrap;
}
.input-group:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #3265db13;
}
.input-group .icon-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-left: 1px solid #edf0f5;
  border-radius: 0;
}
.choice-row {
  display: flex;
  gap: 22px;
  align-items: center;
  min-height: 38px;
  flex-wrap: wrap;
}
.choice-row label,
.check-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
}
.details-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-size: 0.8125rem;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.detail-row > span:first-child {
  color: #8995a8;
}
.detail-row > span:last-child {
  color: #58687f;
  text-align: right;
}
.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  margin-bottom: 10px;
}
.progress-track {
  height: 5px;
  background: #edf1f7;
  border-radius: 10px;
  overflow: hidden;
}
.progress-track > span {
  display: block;
  height: 100%;
  background: var(--blue);
  border-radius: 10px;
  transition: width 0.2s;
}
.completion-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 21px;
}
.completion-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: #7d8a9f;
}
.completion-item .icon {
  width: 15px;
  height: 15px;
  color: #4a9a84;
}
.completion-item .pending {
  width: 13px;
  height: 13px;
  border: 1.5px solid #d9e0eb;
  border-radius: 50%;
  margin-right: 1px;
}
.side-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-top: 1px solid #edf0f5;
  color: var(--blue);
  font-size: 0.8125rem;
  width: 100%;
  background: #fbfcff;
}
.side-card-footer:hover {
  background: #f1f5ff;
}
.spouse-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.spouse-info .avatar {
  background: #f5eff9;
  color: #9a82ad;
}
.spouse-info .name {
  font-size: 0.875rem;
  font-weight: 550;
}
.spouse-info .meta {
  font-size: 0.75rem;
  color: #96a1b1;
  margin-top: 3px;
}
.audit-line {
  margin-top: 19px;
  padding-top: 17px;
  border-top: 1px solid #edf0f5;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: #94a0b2;
}
.bottom-bar {
  position: sticky;
  bottom: 0;
  z-index: 15;
  margin: 0 -28px;
  padding: 13px 28px;
  background: #ffffffed;
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 70px;
  box-shadow: 0 -3px 12px #25354e03;
}
.save-state {
  font-size: 0.8125rem;
  color: #8a97aa;
  display: flex;
  align-items: center;
  gap: 7px;
}
.save-state .icon {
  width: 16px;
  height: 16px;
  color: #5f9d8d;
}
.save-state.dirty {
  color: var(--orange);
}
.save-state.dirty .icon {
  color: var(--orange);
}
.save-time {
  font-size: 0.75rem;
  color: #a0aabb;
}
.bottom-bar .actions {
  margin-left: auto;
}
.shortcut {
  font-size: 0.6875rem;
  opacity: 0.65;
  margin-left: 7px;
}
.mobile-switch {
  display: none;
}
.table-scroll {
  overflow: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  text-align: left;
}
.data-table th {
  font-weight: 500;
  color: #8d99ac;
  background: #f8fafd;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  white-space: nowrap;
  font-size: 0.75rem;
}
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf0f5;
  vertical-align: middle;
  color: #596a82;
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover {
  background: #fbfcff;
}
.data-table .selected {
  background: #f0f5ff;
}
.data-table td input,
.data-table td select {
  min-width: 70px;
  font-size: 0.8125rem;
  min-height: 34px;
  padding: 5px 8px;
}
.data-table.editable th,
.data-table.editable td {
  padding: 10px;
}
.table-foot {
  padding: 12px 18px;
  border-top: 1px solid #edf0f5;
  display: flex;
  align-items: center;
  gap: 10px;
}
.empty {
  text-align: center;
  color: #9ba7b7;
  padding: 34px 16px;
  font-size: 0.8125rem;
}
.empty .icon {
  width: 30px;
  height: 30px;
  color: #c7d3e4;
  display: block;
  margin: 0 auto 10px;
}
.subtabs {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  padding: 0 17px;
}
.subtab {
  padding: 11px 9px;
  font-size: 0.8125rem;
  color: #8a95a8;
  border-bottom: 2px solid transparent;
}
.subtab.active {
  color: var(--blue);
  border-color: var(--blue);
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 17px;
  flex-wrap: wrap;
}
.toolbar input,
.toolbar select {
  width: auto;
  max-width: 180px;
  min-height: 35px;
}
.toolbar .range {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8125rem;
  color: #9aa4b4;
}
.toolbar .range input {
  max-width: 146px;
}
.records-layout {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.record-item {
  padding: 15px 16px;
  border-bottom: 1px solid #edf0f5;
  display: block;
  width: 100%;
  text-align: left;
  position: relative;
}
.record-item:hover {
  background: #f7faff;
}
.record-item.active {
  background: #edf3ff;
}
.record-item.active:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--blue);
}
.record-item .record-title {
  font-size: 0.875rem;
  font-weight: 550;
  margin: 8px 0 5px;
  line-height: 1.5;
}
.record-item .record-meta {
  font-size: 0.75rem;
  color: #93a0b2;
  display: flex;
  justify-content: space-between;
  gap: 5px;
}
.record-item .record-result {
  font-size: 0.8125rem;
  color: #6983ac;
  margin-top: 9px;
}
.record-item.active .record-title {
  color: #315caa;
}
.record-controls {
  padding: 12px;
  display: flex;
  gap: 8px;
}
.record-controls .btn {
  flex: 1;
}
.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}
.metric {
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}
.metric:last-child {
  border-right: 0;
}
.metric .label {
  font-size: 0.75rem;
  color: #8c98a9;
  margin-bottom: 6px;
}
.metric .value {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.metric .unit {
  font-size: 0.8125rem;
  color: #99a4b4;
  margin-left: 5px;
  font-weight: 400;
}
.result-panel {
  background: #f6f9ff;
  border: 1px solid #e6edfa;
  border-radius: 8px;
  padding: 15px 17px;
  margin-top: 17px;
}
.result-panel h4 {
  font-size: 0.8125rem;
  margin: 0 0 6px;
  color: #5374a5;
}
.result-panel p {
  font-size: 0.875rem;
  line-height: 1.75;
  color: #6a80a2;
}
.library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.library-option {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  font-size: 0.8125rem;
}
.library-option:has(input:checked) {
  background: var(--blue-soft);
  border-color: #afc6f5;
}
.timeline-item {
  padding: 17px 20px;
  display: flex;
  gap: 13px;
  border-bottom: 1px solid #edf0f5;
}
.timeline-item input {
  margin-top: 4px;
}
.timeline-item:last-child {
  border-bottom: 0;
}
.timeline-date {
  font-size: 0.75rem;
  color: #91a0b6;
  margin-bottom: 6px;
}
.timeline-text {
  font-size: 0.8125rem;
  line-height: 1.8;
  color: #66778f;
}
.timeline-item.selected {
  background: #f5f8ff;
}
.warning-text {
  font-size: 0.75rem;
  color: #a68755;
}
.import-drop {
  padding: 25px;
  background: #f8faff;
  border: 1px dashed #bed0ec;
  border-radius: 9px;
  text-align: center;
  margin: 14px 0;
}
.import-drop > label {
  display: block;
  font-size: 0.8125rem;
  color: #7d8da6;
  margin-bottom: 15px;
}
.import-drop input {
  background: #fff;
  max-width: 400px;
}
.text-link {
  font-size: 0.8125rem;
  color: var(--blue);
  padding: 0;
}
.kbd {
  font-size: 0.6875rem;
  padding: 2px 4px;
  background: #f4f6fa;
  border: 1px solid #e4e9f1;
  border-radius: 3px;
  color: #8b98aa;
}
.summary-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 12px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  width: 580px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 60px);
  color: var(--ink);
  box-shadow: 0 18px 90px #15335a30;
  overflow: auto;
}
dialog::backdrop {
  background: #172f5247;
  backdrop-filter: blur(3px);
}
dialog.wide {
  width: 840px;
}
dialog.report {
  width: 940px;
}
.dialog-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.dialog-head h3 {
  font-size: 1.0625rem;
  font-weight: 600;
}
.dialog-body {
  padding: 23px 25px;
}
.dialog-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  background: #fafbfd;
  border-top: 1px solid var(--line);
  position: sticky;
  bottom: 0;
}
.dialog-description {
  font-size: 0.875rem;
  color: #7d8ba1;
  margin-bottom: 18px;
  line-height: 1.8;
}
.dialog-error {
  font-size: 0.8125rem;
  color: var(--red);
  margin-top: 13px;
  min-height: 0;
}
.dialog-body .form-grid {
  gap: 18px;
}
.confirm-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #b1813e;
  background: #fff5e6;
  border-radius: 11px;
  margin-bottom: 14px;
}
.toast {
  padding: 12px 19px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #dbe7e2;
  background: #fff;
  box-shadow: 0 7px 25px #142f4f17;
  border-radius: 9px;
  font-size: 0.875rem;
  animation: toast-in 0.2s ease;
  max-width: min(500px, 90vw);
}
.toast .icon {
  color: #32917c;
}
.toast.error {
  border-color: #efd6d6;
}
.toast.error .icon {
  color: var(--red);
}
#toasts {
  position: fixed;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
#print-root {
  display: none;
}
.paper {
  font-size: 13px;
  line-height: 1.8;
  background: #fff;
  padding: 25px;
  color: #263449;
}
.paper h2 {
  font-size: 22px;
  text-align: center;
  margin-bottom: 4px;
}
.paper h3 {
  font-size: 15px;
  border-bottom: 1px solid #d8e0ea;
  padding-bottom: 7px;
  margin: 24px 0 12px;
}
.paper table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  margin: 10px 0;
}
.paper th,
.paper td {
  border: 1px solid #dfe5ed;
  padding: 7px 9px;
  text-align: left;
}
.paper th {
  background: #f5f7fa;
}
.paper dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 18px;
}
.paper dl div {
  display: flex;
  gap: 8px;
}
.paper dt {
  color: #8b97a8;
}
.paper dd {
  margin: 0;
}
.paper p {
  white-space: pre-wrap;
}
@media (min-width: 1600px) {
  .main {
    padding-left: 36px;
    padding-right: 36px;
  }
  .bottom-bar {
    margin: 0 -36px;
    padding-left: 36px;
    padding-right: 36px;
  }
  .columns {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
  .form-grid {
    gap: 21px 24px;
  }
  .card-body {
    padding: 23px 25px;
  }
  .banner-field {
    margin-left: 60px;
  }
}
@media (max-width: 1250px) {
  .shell {
    grid-template-columns: 214px minmax(0, 1fr);
  }
  .main {
    padding: 20px 22px 0;
  }
  .bottom-bar {
    margin: 0 -22px;
    padding: 12px 22px;
  }
  .columns {
    grid-template-columns: minmax(0, 1fr) 235px;
    gap: 16px;
  }
  .card-body {
    padding: 18px;
  }
  .form-grid {
    gap: 16px;
  }
  .banner-field {
    margin-left: 13px;
  }
  .tab {
    padding-left: 9px;
    padding-right: 9px;
  }
  .tabs {
    gap: 4px;
  }
  .topbar {
    padding: 0 22px;
  }
  .workspace-label,
  .top-divider {
    display: none;
  }
  .records-layout {
    grid-template-columns: 221px minmax(0, 1fr);
  }
  .form-grid.four {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1050px) {
  .columns {
    grid-template-columns: 1fr;
  }
  .columns > .side-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .columns > .side-stack > .banner-field {
    display: none;
  }
  .form-grid.four {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .split {
    grid-template-columns: 1fr;
  }
  .tab {
    font-size: 0.8125rem;
    padding-left: 10px;
    padding-right: 10px;
    gap: 6px;
  }
  .tab .icon {
    display: none;
  }
  .topbar-right {
    gap: 12px;
  }
  .top-date {
    display: none;
  }
  .records-layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .records-layout .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .save-time {
    display: none;
  }
  .patient-banner {
    padding: 18px;
  }
  .card-head {
    padding-left: 18px;
    padding-right: 18px;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 64px;
    padding: 0 15px;
    gap: 8px;
  }
  .brand {
    gap: 9px;
  }
  .brand h1 {
    font-size: 0.875rem;
  }
  .brand .eyebrow {
    font-size: 0.53rem;
    letter-spacing: 0.06em;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }
  .brand-mark .icon {
    width: 22px;
    height: 22px;
  }
  .topbar-right > .badge,
  .user-chip .user-name {
    display: none;
  }
  .topbar-right {
    gap: 5px;
  }
  .shell {
    display: block;
    min-height: calc(100vh - 64px);
  }
  .sidebar {
    display: none;
    position: fixed;
    top: 64px;
    bottom: 0;
    left: 0;
    z-index: 40;
    width: 260px;
    height: calc(100vh - 64px);
    box-shadow: 15px 0 40px #203b5328;
  }
  .sidebar.open {
    display: flex;
  }
  .mobile-switch {
    display: inline-flex;
  }
  .main {
    padding: 16px 15px 0;
  }
  .breadcrumb {
    margin-bottom: 13px;
    font-size: 0.75rem;
  }
  .workspace-heading {
    margin-bottom: 15px;
  }
  .workspace-heading h2 {
    font-size: 1.2rem;
  }
  .workspace-heading > .actions > .btn {
    font-size: 0.75rem;
    padding: 5px 9px;
    min-height: 34px;
  }
  .workspace-heading .btn .icon {
    display: none;
  }
  .patient-banner {
    padding: 15px;
    gap: 12px;
    margin-bottom: 11px;
  }
  .patient-banner .avatar {
    width: 44px;
    height: 44px;
    font-size: 1.15rem;
  }
  .patient-banner-title h3 {
    font-size: 1.1rem;
  }
  .patient-banner-meta {
    gap: 8px;
    font-size: 0.75rem;
  }
  .patient-banner-meta span + span {
    padding-left: 8px;
  }
  .banner-actions {
    display: none;
  }
  .tabs {
    margin-bottom: 17px;
    gap: 1px;
  }
  .tab {
    padding: 12px 11px 13px;
    font-size: 0.8125rem;
  }
  .card {
    border-radius: 10px;
  }
  .card-head {
    padding: 14px 16px;
  }
  .card-title {
    font-size: 0.875rem;
  }
  .card-body {
    padding: 17px 16px;
  }
  .form-grid,
  .form-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 13px;
  }
  .span-2 {
    grid-column: span 2;
  }
  .columns > .side-stack {
    grid-template-columns: 1fr;
  }
  .page-intro > .actions > .btn {
    font-size: 0.75rem;
  }
  .bottom-bar {
    margin: 0 -15px;
    padding: 11px 15px;
    gap: 8px;
    min-height: 64px;
  }
  .bottom-bar > .save-state {
    font-size: 0.75rem;
  }
  .bottom-bar > .actions {
    gap: 7px;
  }
  .bottom-bar .btn {
    font-size: 0.8125rem;
    padding: 7px 10px;
  }
  .bottom-bar .shortcut {
    display: none;
  }
  .bottom-bar .next-btn {
    display: none;
  }
  .records-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .record-list {
    display: flex;
    overflow-x: auto;
  }
  .record-item {
    min-width: 205px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    max-width: 240px;
  }
  .record-item.active:before {
    top: auto;
    left: 0;
    right: 0;
    height: 3px;
    width: auto;
  }
  .records-sidebar .card-head {
    padding: 13px 16px;
  }
  .record-controls {
    padding: 10px 13px;
  }
  .table-foot {
    flex-wrap: wrap;
  }
  .metric {
    padding: 15px 16px;
  }
  .metric .value {
    font-size: 1.2rem;
  }
  .library-grid {
    grid-template-columns: 1fr;
  }
  .subtabs {
    overflow: auto;
  }
  .toolbar .range input {
    max-width: 132px;
  }
  .toolbar {
    gap: 7px;
  }
  .dialog-head {
    padding: 16px 19px;
  }
  .dialog-body {
    padding: 20px;
  }
  .dialog-foot {
    padding: 14px 18px;
    flex-wrap: wrap;
  }
  .dialog-foot .btn {
    font-size: 0.8125rem;
  }
  .paper {
    padding: 8px;
  }
  .paper dl {
    grid-template-columns: 1fr 1fr;
  }
  .audit-line {
    font-size: 0.75rem;
  }
  .user-avatar {
    width: 28px;
    height: 28px;
  }
  .save-state .icon {
    display: none;
  }
}
.field > label,
.data-table,
.timeline-text,
.completion-item {
  font-size: 0.875rem;
}
.records-sidebar {
  min-width: 0;
}
@media (max-width: 760px) {
  .records-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .records-layout .form-grid,
  .records-layout .form-grid.two {
    grid-template-columns: minmax(0, 1fr);
  }
  .records-layout .span-2,
  .field:has(input[type="date"]),
  .field:has(input[type="datetime-local"]) {
    grid-column: 1/-1;
  }
  .toolbar .range input {
    min-width: 0;
  }
  .record-list:has(.record-item:only-child) .record-item {
    width: 100%;
    max-width: none;
  }
  .bottom-bar .btn {
    flex-shrink: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
.sidebar {
  overflow: hidden;
}
.sidebar-title,
.patient-filters,
.new-patient {
  flex-shrink: 0;
}
.patient-list {
  overflow-y: auto;
  min-height: 0;
}
.sidebar > .search-wrap {
  flex-shrink: 0;
}
.sidebar-settings {
  margin: auto -16px 0;
  padding-top: 18px;
  flex-shrink: 0;
}
.settings-entry {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 16px 24px;
  width: 100%;
  min-height: 70px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
  background: #fafbfe;
  color: #596c88;
  transition: 0.15s;
}
.settings-entry:focus-visible {
  outline-offset: -3px;
}
.settings-entry:hover {
  border-color: #c6d6f5;
  background: #edf3ff;
  color: var(--blue);
}
.settings-entry-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #eef2f9;
}
.settings-entry-text {
  flex: 1;
  min-width: 0;
}
.settings-entry-text strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
}
.settings-entry > .icon {
  width: 16px;
  height: 16px;
  color: #9baabd;
}
.workspace-context {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 248px;
  text-align: left;
  color: #778ba8;
  padding: 5px 8px;
  border-radius: 7px;
}
.workspace-context:hover {
  background: #f4f7fc;
}
.workspace-context > span {
  min-width: 0;
}
.workspace-context strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #5d7190;
}
.workspace-context small {
  display: block;
  font-size: 0.75rem;
  color: #91a0b7;
  margin-top: 2px;
}
.workspace-context > .icon:last-child {
  width: 13px;
  height: 13px;
}
.user-chip {
  padding: 4px 6px;
  border-radius: 8px;
  text-align: left;
}
.user-chip:hover {
  background: #f5f8fc;
}
.user-role {
  display: block;
  color: #8e9db3;
  font-size: 0.6875rem;
  margin-top: 2px;
}
.user-name {
  white-space: nowrap;
}
.empty-workspace {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px;
}
.empty-workspace-icon {
  width: 65px;
  height: 65px;
  border-radius: 18px;
  background: #edf3ff;
  color: #6086c4;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.empty-workspace-icon > .icon {
  width: 30px;
  height: 30px;
}
.empty-workspace h3 {
  font-size: 1.1rem;
  font-weight: 600;
}
.empty-workspace > .actions {
  margin-top: 24px;
}
.paper-context {
  text-align: center;
  color: #78899f;
  font-size: 12px;
  margin-bottom: 18px;
}
.settings-dialog[open] {
  display: flex;
  flex-direction: column;
  width: 980px;
  height: min(760px, calc(100dvh - 56px));
  max-height: calc(100dvh - 56px);
  overflow: hidden;
}
.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.settings-heading {
  display: flex;
  gap: 13px;
  align-items: center;
}
.settings-header-icon {
  height: 43px;
  width: 43px;
  border-radius: 11px;
  background: #edf3ff;
  color: var(--blue);
  display: grid;
  place-items: center;
}
.settings-header-icon > .icon {
  width: 23px;
  height: 23px;
}
.settings-heading h2 {
  font-size: 1.2rem;
  font-weight: 600;
}
.settings-layout {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.settings-nav {
  padding: 22px 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: #fafbfd;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 7px;
  text-align: left;
  font-size: 0.875rem;
  color: #7c8ba2;
}
.settings-nav-item > .icon {
  width: 18px;
  height: 18px;
}
.settings-nav-item:hover {
  background: #f0f4fb;
}
.settings-nav-item.active {
  background: #eaf1ff;
  color: var(--blue);
  font-weight: 600;
}
.settings-nav-note {
  display: flex;
  gap: 7px;
  margin-top: auto;
  padding: 18px 9px 0;
  border-top: 1px solid #e6ebf3;
  font-size: 0.75rem;
  color: #96a3b5;
  min-width: 0;
}
.settings-nav-note > .icon {
  width: 15px;
  height: 15px;
  margin-top: 3px;
}
.settings-nav-note span {
  min-width: 0;
}
.settings-nav-note em {
  display: block;
  font-style: normal;
  font-size: 0.75rem;
  color: #8394af;
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.settings-panel {
  padding: 27px 28px;
  overflow: auto;
  min-width: 0;
  min-height: 0;
}
.settings-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}
.settings-section-head > div {
  min-width: 0;
}
.settings-section-head h3 {
  font-size: 1rem;
  font-weight: 600;
}
.settings-section-head .btn {
  flex-shrink: 0;
}
.section-gap {
  margin-top: 28px;
  padding-top: 23px;
  border-top: 1px solid #edf0f5;
}
.organization-options {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.organization-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  padding: 17px 16px;
  border: 1px solid #e2e8f2;
  border-radius: 10px;
  background: #fff;
}
.organization-option:hover {
  background: #f8faff;
  border-color: #bfd0ef;
}
.organization-option.selected {
  background: #f1f6ff;
  border-color: #a6c0f3;
  box-shadow: 0 0 0 1px #3265db08;
}
.organization-symbol {
  height: 41px;
  width: 41px;
  background: #f2f5fa;
  border-radius: 10px;
  color: #8497b5;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.selected .organization-symbol {
  background: #e2ecff;
  color: #5080d4;
}
.organization-description {
  flex: 1;
  min-width: 0;
}
.organization-description strong {
  display: block;
  font-size: 0.9375rem;
  color: #526580;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.organization-description small {
  display: block;
  font-size: 0.75rem;
  color: #96a3b7;
  margin-top: 5px;
}
.organization-check {
  width: 20px;
  height: 20px;
  color: var(--blue);
  flex-shrink: 0;
}
.organization-option:not(.selected) .organization-check {
  border: 1px solid #d9e1ee;
  border-radius: 50%;
  width: 17px;
  height: 17px;
  margin-right: 1px;
}
.settings-current-summary {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  border-top: 1px solid #edf0f5;
  margin-top: 22px;
  padding-top: 20px;
  font-size: 0.8125rem;
  color: #91a0b5;
}
.settings-current-summary strong {
  font-weight: 500;
  color: #536a8d;
}
.settings-table-wrap {
  border: 1px solid #e4eaf3;
  border-radius: 9px;
  overflow: auto;
}
.settings-table {
  min-width: 500px;
}
.settings-table td {
  padding: 15px 13px;
  vertical-align: middle;
}
.settings-table th {
  font-size: 0.8125rem;
}
.settings-table select {
  font-size: 0.875rem;
  min-width: 137px;
  min-height: 37px;
  background: #fff;
}
.settings-table td:first-child {
  min-width: 132px;
}
.settings-member-name {
  display: block;
  white-space: nowrap;
  font-weight: 550;
  font-size: 0.875rem;
}
.current-member-badge {
  font-size: 0.6875rem;
  margin-top: 6px;
}
.role-descriptions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.role-description {
  display: flex;
  align-items: center;
  gap: 12px;
}
.role-symbol {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #f3f6fa;
  color: #8ca0bd;
  display: grid;
  place-items: center;
}
.role-symbol.admin {
  background: #edf3ff;
  color: #5e86cd;
}
.role-symbol > .icon {
  width: 18px;
  height: 18px;
}
.role-description strong {
  font-size: 0.875rem;
  font-weight: 550;
  color: #596d8c;
}
.role-description p {
  font-size: 0.8125rem;
  color: #94a2b6;
  margin-top: 3px;
}
.departments-table td:first-child {
  min-width: 176px;
}
.departments-table td:nth-child(2) {
  min-width: 116px;
}
.departments-table input {
  font-size: 0.875rem;
  min-height: 37px;
}
.settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
  padding: 17px 26px;
  background: #fcfdff;
  flex-shrink: 0;
}
.settings-footer-status {
  min-width: 0;
  font-size: 0.8125rem;
  color: #96a3b5;
}
.settings-footer-status p {
  color: var(--red);
  font-size: 0.8125rem;
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.settings-footer-status p:empty {
  display: none;
}
.settings-footer > .actions {
  flex-shrink: 0;
}
@media (max-width: 1100px) {
  .workspace-context {
    max-width: 180px;
  }
  .topbar {
    gap: 16px;
  }
  .topbar-right {
    gap: 10px;
  }
  .settings-dialog[open] {
    width: 900px;
  }
  .settings-layout {
    grid-template-columns: 172px minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .workspace-context {
    display: none;
  }
  .topbar {
    gap: 8px;
  }
  .user-chip {
    padding: 0;
  }
  .settings-dialog[open] {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    border-radius: 12px;
  }
  .settings-header {
    padding: 15px;
  }
  .settings-heading {
    gap: 10px;
  }
  .settings-header-icon {
    height: 36px;
    width: 36px;
  }
  .settings-heading h2 {
    font-size: 1.05rem;
  }
  .settings-header .badge {
    display: none;
  }
  .settings-layout {
    display: flex;
    flex-direction: column;
  }
  .settings-nav {
    display: flex;
    flex-direction: row;
    padding: 9px 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 3px;
    flex-shrink: 0;
    overflow: auto;
  }
  .settings-nav-item {
    white-space: nowrap;
    padding: 10px 8px;
    gap: 6px;
    justify-content: center;
    flex: 1;
    font-size: 0.8125rem;
  }
  .settings-nav-item > .icon {
    width: 16px;
    height: 16px;
  }
  .settings-nav-note {
    display: none;
  }
  .settings-panel {
    padding: 20px 16px;
    flex: 1;
  }
  .settings-section-head {
    gap: 8px;
    margin-bottom: 16px;
  }
  .settings-section-head h3 {
    font-size: 0.9375rem;
  }
  .settings-section-head .btn {
    padding: 4px 8px;
    font-size: 0.75rem;
  }
  .organization-option {
    gap: 10px;
    padding: 15px 12px;
  }
  .organization-description strong {
    font-size: 0.875rem;
  }
  .organization-symbol {
    width: 35px;
    height: 35px;
    border-radius: 8px;
  }
  .organization-description small {
    font-size: 0.75rem;
  }
  .settings-panel .form-grid.two {
    grid-template-columns: minmax(0, 1fr);
  }
  .settings-current-summary {
    gap: 8px;
    font-size: 0.8125rem;
  }
  .settings-footer {
    padding: 14px 15px;
    flex-wrap: wrap;
    gap: 9px;
  }
  .settings-footer > .actions {
    margin-left: auto;
  }
  .settings-footer-status {
    font-size: 0.75rem;
    max-width: 100%;
  }
  .settings-footer-status:has(p:not(:empty)) {
    width: 100%;
    flex-basis: 100%;
  }
  .settings-footer .btn {
    padding: 7px 12px;
    font-size: 0.8125rem;
  }
  .empty-workspace {
    padding: 30px 20px;
    min-height: 370px;
  }
}
@media print {
  #settings-dialog {
    display: none !important;
  }
}
.account-username {
  display: block;
  font-size: 0.75rem;
  color: #94a2b8;
  margin-top: 4px;
  max-width: 185px;
  overflow-wrap: anywhere;
}
.accounts-table {
  min-width: 610px;
}
.accounts-table td:first-child {
  min-width: 150px;
}
.accounts-table select {
  min-width: 130px;
}
.account-settings-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  font-size: 0.75rem;
  color: #91a0b6;
  flex-wrap: wrap;
}
.role-editor {
  display: grid;
  grid-template-columns: 175px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.role-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.role-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 11px;
  border: 1px solid #e5ebf4;
  border-radius: 8px;
  text-align: left;
  color: #8496b1;
  min-width: 0;
  width: 100%;
}
.role-choice:hover {
  background: #f7faff;
}
.role-choice.active {
  background: #edf3ff;
  border-color: #bed1f6;
  color: var(--blue);
}
.role-choice > span {
  min-width: 0;
  flex: 1;
}
.role-choice strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.role-choice small {
  display: block;
  font-size: 0.75rem;
  color: #95a4b9;
  margin-top: 5px;
}
.role-choice > .icon {
  width: 17px;
  height: 17px;
}
.role-choice > .icon:last-child {
  width: 13px;
  height: 13px;
}
.role-editor-panel {
  border: 1px solid #e4eaf3;
  border-radius: 10px;
  padding: 20px;
  min-width: 0;
}
.role-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  min-height: 32px;
  flex-wrap: wrap;
}
.role-description-field {
  margin-top: 17px;
}
.role-description-field textarea {
  min-height: 76px;
}
.permission-heading {
  font-size: 0.875rem;
  font-weight: 550;
  margin: 22px 0 12px;
  color: #657b9b;
}
.permission-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.permission-option {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5ebf4;
  border-radius: 7px;
  padding: 12px 10px;
  cursor: pointer;
  min-width: 0;
}
.permission-option:has(input:checked) {
  background: #f5f8ff;
  border-color: #d1def5;
}
.permission-option input {
  margin: 0;
}
.permission-option > span {
  min-width: 0;
}
.permission-option strong {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #627a9c;
}
@media (max-width: 1000px) {
  .role-editor {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
  }
  .permission-options {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .settings-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
  }
  .settings-nav-item {
    flex-direction: column;
    gap: 5px;
    padding: 9px 3px;
    font-size: 0.8125rem;
    min-width: 0;
  }
  .role-editor {
    grid-template-columns: minmax(0, 1fr);
    gap: 15px;
  }
  .role-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .role-choice {
    gap: 7px;
    padding: 10px 9px;
  }
  .role-editor-panel {
    padding: 17px 15px;
  }
  .role-choice strong {
    font-size: 0.8125rem;
  }
  .permission-options {
    grid-template-columns: minmax(0, 1fr);
  }
}
.accounts-table {
  min-width: 700px;
}
.account-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.password-action {
  font-size: 0.75rem;
  padding: 4px 8px;
  gap: 5px;
  min-height: 32px;
}
.password-action > .icon {
  width: 14px;
  height: 14px;
}
.account-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
}
.account-meta .current-member-badge {
  margin-top: 0;
}
.password-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
}
.password-state > .icon {
  width: 12px;
  height: 12px;
}
.password-state.configured {
  color: #649180;
}
.password-state.unconfigured {
  color: #b08b51;
}
.password-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  background: #f6f9fe;
  border: 1px solid #e7eef8;
  border-radius: 9px;
  margin-bottom: 19px;
}
.password-account-icon {
  height: 37px;
  width: 37px;
  border-radius: 9px;
  background: #eaf1ff;
  color: var(--blue);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.password-account > div {
  min-width: 0;
}
.password-account strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 550;
}
.password-account > div > span {
  display: block;
  color: #91a1b8;
  font-size: 0.8125rem;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.password-form {
  display: grid;
  gap: 18px;
}
.password-field .input-group {
  min-height: 40px;
}
.password-field input {
  min-width: 0;
}
.password-field .password-toggle {
  width: 39px;
  height: 38px;
  flex-shrink: 0;
  background: transparent;
  border-left: 0;
}
.password-toggle > .icon {
  width: 17px;
  height: 17px;
}
@media (max-width: 760px) {
  .password-field {
    grid-column: 1/-1;
  }
  .password-account {
    padding: 12px;
  }
  .password-form {
    gap: 15px;
  }
}
.account-security-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #e3ebf8;
  border-radius: 9px;
  background: #f8faff;
  margin-bottom: 20px;
}
.account-security-icon {
  width: 35px;
  height: 35px;
  border-radius: 9px;
  background: #eaf1ff;
  color: var(--blue);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.account-security-summary > div {
  min-width: 0;
  flex: 1;
}
.account-security-summary strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 550;
}
.account-security-summary small {
  display: block;
  font-size: 0.75rem;
  color: #92a2b9;
  margin-top: 4px;
}
.account-security-summary .btn {
  flex-shrink: 0;
}
@media (max-width: 760px) {
  .account-security-summary {
    padding: 12px;
    gap: 9px;
  }
  .account-security-summary small {
    line-height: 1.7;
  }
}
.accounts-table {
  min-width: 830px;
}
.accounts-table td,
.accounts-table th {
  padding: 13px 10px;
}
.accounts-table select {
  min-width: 115px;
}
.accounts-table td:first-child {
  min-width: 135px;
}
.account-institutions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  text-align: left;
  min-width: 145px;
  max-width: 190px;
  padding: 0;
  width: 100%;
}
.institution-chip {
  display: block;
  max-width: 190px;
  border: 1px solid #e3e9f2;
  border-radius: 5px;
  padding: 3px 7px;
  background: #f7f9fc;
  font-size: 0.75rem;
  line-height: 1.6;
  color: #7d8ea8;
  white-space: normal;
  overflow-wrap: anywhere;
}
.institution-chip.current {
  color: #4a73b8;
  background: #f0f5ff;
  border-color: #dce7fa;
}
.account-institutions small {
  font-size: 0.6875rem;
  color: #91a4c0;
  margin-top: 2px;
}
.account-institutions:hover .institution-chip {
  border-color: #a7c1f0;
}
.account-settings-notice {
  margin-bottom: 16px;
  padding: 10px 13px;
  border: 1px solid #dce8fa;
  background: #f3f7ff;
  border-radius: 7px;
  color: #6f89af;
  font-size: 0.8125rem;
  line-height: 1.7;
}
.account-membership-section {
  margin: 23px 0;
}
.account-membership-picker {
  border: 0;
  padding: 0;
  min-width: 0;
}
.account-membership-picker legend {
  font-size: 0.875rem;
  color: #637896;
  padding: 0;
  margin-bottom: 12px;
}
.account-membership-picker legend .badge {
  margin-left: 7px;
}
.account-organization-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-height: 240px;
  overflow: auto;
}
.account-organization-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid #e1e8f3;
  border-radius: 8px;
  padding: 13px;
  cursor: pointer;
  min-width: 0;
}
.account-organization-option:has(input:checked) {
  background: #f1f6ff;
  border-color: #b9cff4;
}
.account-organization-option input {
  margin-top: 4px;
}
.account-organization-option > span {
  min-width: 0;
  flex: 1;
}
.account-organization-option strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #5c7396;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.account-organization-option small {
  display: block;
  font-size: 0.75rem;
  color: #93a3b8;
  margin-top: 5px;
}
.account-membership-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
}
.account-membership-heading h4 {
  font-size: 0.875rem;
  font-weight: 500;
  color: #687d9b;
  margin: 0;
}
.account-assignment-table {
  width: 100%;
  min-width: 560px;
  table-layout: fixed;
}
.account-assignment-table th:first-child {
  width: 38%;
}
.account-assignment-table td {
  padding: 12px;
}
.account-assignment-table select {
  min-height: 37px;
  font-size: 0.875rem;
  min-width: 0;
}
.assignment-institution {
  font-size: 0.875rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.account-assignment-empty {
  border: 1px dashed #dce5f3;
  background: #fafcff;
  padding: 22px 15px;
  text-align: center;
  font-size: 0.8125rem;
  color: #96a6bc;
  border-radius: 8px;
}
#account-membership-count {
  margin-top: 9px;
}
.organization-option:disabled {
  opacity: 0.65;
  background: #fafbfd;
}
@media (min-width: 1101px) {
  .settings-dialog[open]:has(.accounts-table) {
    width: 1100px;
  }
}
@media (max-width: 760px) {
  .account-organization-options {
    grid-template-columns: minmax(0, 1fr);
  }
  .account-organization-option {
    padding: 11px 12px;
  }
  .account-membership-section {
    margin: 20px 0;
  }
  .account-assignment-table {
    min-width: 520px;
  }
  .account-assignment-table td {
    padding: 10px;
  }
}
.paper .paper-sub {
  text-align: center;
  color: #8090a3;
  font-size: 12px;
  margin-bottom: 24px;
}
.attachment-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 0.75rem;
  color: #7d8ba1;
  line-height: 1.7;
}
.attachment-row > .icon {
  width: 14px;
  height: 14px;
}
@media print {
  body {
    background: #fff;
  }
  #app,
  #dialog,
  #toasts {
    display: none !important;
  }
  #print-root {
    display: block;
  }
  .paper {
    padding: 0;
    font-size: 11px;
  }
  .paper h2 {
    font-size: 20px;
  }
  .paper h3 {
    break-after: avoid;
  }
  .paper tr {
    break-inside: avoid;
  }
  .paper table {
    font-size: 10px;
  }
  .paper dl {
    font-size: 11px;
  }
  @page {
    size: A4;
    margin: 15mm;
  }
}
