:root {
  font-family: Manrope, Arial, sans-serif;
  color: #18243c;
  background: #f4f7fc;
  font-synthesis: none;
  --blue: #2459ed;
  --ink: #18243c;
  --muted: #7b879e;
  --line: #e7ecf4;
  --green: #238667;
  --red: #d25a65;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  transition:
    background 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #aac3ff;
  outline-offset: 3px;
}
button svg,
a svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
svg {
  vertical-align: middle;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.7px;
}
.brand img {
  width: 45px;
  height: 45px;
  object-fit: contain;
}
.brand span {
  color: var(--blue);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 238px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.sidebar .brand {
  margin: 0 0 45px;
}
.nav-group {
  margin: 0 12px 12px;
}
.nav {
  display: grid;
  gap: 7px;
}
.nav a {
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #6f7b92;
  font-weight: 650;
  border-radius: 9px;
}
.nav a:hover {
  background: #f4f7fc;
}
.nav a.active {
  background: #edf2ff;
  color: var(--blue);
}
.nav .count {
  margin-left: auto;
  border-radius: 5px;
  background: #e1e9ff;
  font-size: 11px;
  padding: 2px 7px;
}
.sidebar-bottom {
  margin-top: auto;
}
.side-help {
  border: 1px solid var(--line);
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 12px;
  line-height: 1.7;
  color: #7e8aa0;
}
.side-help strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
  margin: 5px 0;
}
.side-help svg {
  color: var(--blue);
}
.profile {
  border-top: 1px solid var(--line);
  padding: 19px 4px 0;
  display: flex;
  align-items: center;
  gap: 11px;
}
.avatar {
  width: 37px;
  height: 37px;
  background: #edf2ff;
  border: 1px solid #e0e8fc;
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  border-radius: 50%;
}
.profile strong {
  font-size: 13px;
  display: block;
}
.profile small {
  font-size: 11px;
  color: var(--muted);
}
.icon-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px;
  border-radius: 7px;
}
.profile .icon-btn {
  margin-left: auto;
}
.icon-btn:hover {
  background: #edf2ff;
  color: var(--blue);
}
.main {
  margin-left: 238px;
  min-height: 100vh;
}
.topbar {
  height: 78px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 42px;
  gap: 15px;
}
.breadcrumb {
  font-size: 12px;
  color: #8a96aa;
  display: flex;
  gap: 12px;
  align-items: center;
}
.breadcrumb > svg {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}
.breadcrumb strong {
  color: #46546f;
  font-weight: 600;
}
.top-meta {
  display: flex;
  gap: 17px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.content {
  max-width: 1440px;
  margin: auto;
  padding: 36px 42px 20px;
}
.page-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 29px;
}
.page-title h1 {
  font-size: 28px;
  letter-spacing: -1.1px;
  margin: 0 0 8px;
  font-weight: 800;
}
.page-title p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}
.button {
  border: 1px solid var(--line);
  background: white;
  color: #54617a;
  padding: 11px 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.button:hover {
  background: #f5f8ff;
  border-color: #cbd8fa;
}
.button.primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
  box-shadow: 0 4px 9px #2459ed16;
}
.button.primary:hover {
  background: #1549db;
  transform: translateY(-1px);
}
.button.ghost {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.button.small {
  padding: 7px 10px;
  font-size: 11px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 750;
  background: #edf2ff;
  color: var(--blue);
  white-space: nowrap;
}
.badge.green {
  background: #eaf7f1;
  color: var(--green);
}
.badge.red {
  background: #fff0f0;
  color: var(--red);
}
.badge.gray {
  background: #f0f3f8;
  color: #8490a5;
}
.badge.amber {
  background: #fff6e5;
  color: #ac842d;
}
.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.study-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr);
  gap: 24px;
  align-items: start;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 3px 10px #23376403;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 25px;
  border-bottom: 1px solid var(--line);
}
.card-head h2 {
  font-size: 15px;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.card-head p {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0 0;
}
.head-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #eef3ff;
  color: var(--blue);
  display: grid;
  place-items: center;
}
.head-icon svg {
  width: 18px;
}
.card-head .badge {
  margin-left: auto;
}
.form-body {
  padding: 24px 26px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 23px;
}
.field label {
  font-size: 11px;
  font-weight: 750;
  display: block;
  margin-bottom: 9px;
  color: #536079;
}
.field label .required {
  color: #6689ed;
  margin-left: 2px;
}
.field input,
.filter input,
.filter select,
.login-form input {
  width: 100%;
  height: 43px;
  border: 1px solid #e0e6f0;
  background: #fbfcfe;
  color: var(--ink);
  border-radius: 7px;
  padding: 0 12px;
  font-size: 13px;
  min-width: 0;
}
.field input::placeholder {
  color: #b0b9c9;
}
.field input:focus,
.filter input:focus {
  border-color: #8aa9ff;
  background: white;
  outline: 3px solid #eef3ff;
}
.field .input-unit {
  position: relative;
}
.input-unit input {
  padding-right: 59px;
}
.input-unit span {
  position: absolute;
  right: 12px;
  top: 14px;
  font-size: 10px;
  color: #9ca6b8;
  pointer-events: none;
}
.field small {
  font-size: 10px;
  color: #9aa5b7;
  display: block;
  margin-top: 7px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 23px 0;
}
.form-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #8e9ab0;
  margin-bottom: 19px;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
}
.form-section span {
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.form-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}
.form-foot .primary {
  flex: 1;
  height: 44px;
}
.form-note {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  font-size: 10px;
  color: #9ba6b8;
  line-height: 1.6;
  margin: 14px 0 0;
}
.form-note svg {
  width: 13px;
  height: 13px;
  margin-top: 2px;
  flex-shrink: 0;
}
.result-card {
  overflow: hidden;
}
.result-card .card-head {
  border: 0;
  padding-bottom: 0;
}
.result-empty {
  text-align: center;
  padding: 36px 25px 27px;
}
.result-empty img {
  height: 120px;
  width: 120px;
  object-fit: contain;
}
.result-empty h3 {
  font-size: 16px;
  letter-spacing: -0.4px;
  margin: 18px 0 10px;
}
.result-empty p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  max-width: 240px;
  margin: 0 auto;
}
.result-footer {
  margin: 0 24px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #91a0b7;
}
.result-footer strong {
  color: #5c6e8e;
  font-weight: 650;
}
.model-mini {
  margin-top: 19px;
  padding: 19px 22px;
}
.model-mini-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 750;
}
.model-name {
  font-size: 13px;
  font-weight: 750;
  margin: 17px 0 6px;
}
.model-mini p {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
}
.model-metrics {
  display: flex;
  gap: 35px;
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.model-metrics span {
  font-size: 10px;
  color: var(--muted);
  display: block;
}
.model-metrics strong {
  font-size: 18px;
  display: block;
  margin-top: 3px;
  letter-spacing: -0.5px;
}
.info-box {
  display: flex;
  gap: 10px;
  padding: 18px 6px;
  color: #8f9ab0;
  font-size: 10px;
  line-height: 1.8;
}
.info-box svg {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin-top: 3px;
}
.info-box p {
  margin: 0;
}
.bottomline {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 18px 0;
  margin-top: 30px;
  font-size: 10px;
  color: #9aa7bb;
}
.bottomline span {
  display: flex;
  gap: 6px;
  align-items: center;
}
.bottomline .status-dot {
  color: #6ca995;
}
.progress-track {
  background: #edf1f8;
  height: 6px;
  border-radius: 10px;
  overflow: hidden;
}
.progress-track span {
  display: block;
  height: 100%;
  background: var(--blue);
  border-radius: 10px;
}
.result-value {
  padding: 30px 25px;
  text-align: center;
}
.ring {
  height: 144px;
  width: 144px;
  border-radius: 50%;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--blue) calc(var(--value) * 1%), #edf2fc 0);
  position: relative;
}
.ring:before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
}
.ring strong {
  position: relative;
  font-size: 33px;
  letter-spacing: -1.5px;
}
.ring strong small {
  font-size: 16px;
}
.result-value p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}
.result-value .button {
  margin-top: 10px;
}
.inline-error {
  font-size: 12px;
  line-height: 1.6;
  padding: 12px;
  background: #fff1f1;
  color: #ba4654;
  border-radius: 7px;
  margin-top: 14px;
}
.hidden {
  display: none !important;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.stat {
  padding: 21px 23px;
}
.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #8794a9;
}
.stat-top svg {
  width: 17px;
  height: 17px;
  color: #93a8d2;
}
.stat-number {
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 13px 0 6px;
}
.stat small {
  font-size: 10px;
  color: #95a1b4;
}
.stat small b {
  color: var(--green);
  font-weight: 600;
}
.table-card {
  overflow: hidden;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 23px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.filter input,
.filter select {
  height: 36px;
  font-size: 11px;
  background: #fff;
}
.filter.search {
  min-width: 215px;
}
.filter-label {
  font-size: 10px;
  color: #8c98ac;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 10px;
  font-weight: 650;
  color: #929cb0;
  padding: 14px 20px;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
}
td {
  font-size: 11px;
  padding: 18px 20px;
  border-bottom: 1px solid #edf1f7;
  color: #627088;
}
td strong {
  color: #3b4a64;
  font-weight: 750;
}
.patient-cell {
  display: flex;
  gap: 10px;
  align-items: center;
}
.patient-square {
  background: #edf2ff;
  color: #698de8;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
}
.patient-square svg {
  width: 15px;
}
tr:hover td {
  background: #fafcff;
}
.table-foot {
  padding: 16px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #929eb2;
  font-size: 11px;
}
.page-buttons {
  display: flex;
  gap: 5px;
}
.page-buttons button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  width: 29px;
  height: 29px;
  font-size: 11px;
  color: #7f8ba1;
}
.page-buttons .selected {
  background: #edf2ff;
  color: var(--blue);
  border-color: #d7e2ff;
}
.empty-state {
  text-align: center;
  padding: 55px 20px;
  color: var(--muted);
  font-size: 13px;
}
.section-caption {
  font-size: 11px;
  color: #95a1b5;
  margin: 12px 0 0;
}
.snapshot-bar {
  background: #edf3ff;
  border: 1px solid #dfe9ff;
  border-radius: 10px;
  padding: 19px 23px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 23px;
}
.snapshot-bar .head-icon {
  background: white;
}
.snapshot-bar h3 {
  font-size: 13px;
  margin: 0 0 5px;
}
.snapshot-bar p {
  font-size: 11px;
  margin: 0;
  color: #7e90b0;
}
.snapshot-bar .button {
  margin-left: auto;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: white;
}
.login-story {
  background: #edf3ff;
  position: relative;
  overflow: hidden;
  padding: 45px 55px;
  display: flex;
  flex-direction: column;
}
.login-story .brand {
  font-size: 22px;
}
.login-art {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 35px 0;
}
.login-art img {
  width: 270px;
  height: 270px;
  object-fit: contain;
}
.login-art h1 {
  font-size: 36px;
  line-height: 1.3;
  letter-spacing: -1.5px;
  max-width: 400px;
  margin: 18px 0 15px;
  text-align: center;
}
.login-art p {
  font-size: 14px;
  color: #7c8cab;
  line-height: 1.9;
  max-width: 310px;
  text-align: center;
}
.login-story footer {
  display: flex;
  justify-content: space-between;
  color: #8fa0be;
  font-size: 11px;
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
  position: relative;
}
.login-form {
  width: 340px;
  max-width: 100%;
}
.login-form h2 {
  font-size: 28px;
  letter-spacing: -1px;
  margin: 18px 0 10px;
}
.login-form > p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
  margin: 0 0 30px;
}
.login-form label {
  font-size: 12px;
  color: #5c6982;
  display: block;
  margin: 20px 0 9px;
}
.login-form input {
  height: 47px;
}
.login-form .primary {
  width: 100%;
  height: 46px;
  margin-top: 26px;
}
.login-form .login-note {
  font-size: 11px;
  background: #f6f8fc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 15px;
  line-height: 1.8;
  margin-top: 20px;
  color: #8390a7;
}
.login-note strong {
  color: #5f7090;
  font-weight: 650;
}
.password-wrap {
  position: relative;
}
.password-wrap input {
  padding-right: 45px;
}
.password-wrap button {
  position: absolute;
  right: 6px;
  top: 6px;
}
.login-panel footer {
  position: absolute;
  bottom: 30px;
  color: #a0aabd;
  font-size: 11px;
}
.mobile-menu {
  display: none;
}
.modal {
  border: 1px solid var(--line);
  border-radius: 15px;
  width: min(620px, calc(100% - 30px));
  max-height: 90vh;
  padding: 0;
  color: var(--ink);
  box-shadow: 0 20px 100px #14234130;
}
.modal::backdrop {
  background: #1a294d55;
  backdrop-filter: blur(3px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 20px 25px;
}
.modal-head h2 {
  font-size: 19px;
  margin: 0;
}
.modal-body {
  padding: 24px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 22px 0;
}
.detail-grid dt {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 4px;
}
.detail-grid dd {
  font-size: 13px;
  margin: 0;
  font-weight: 650;
}
.feedback-choice {
  display: flex;
  gap: 10px;
  margin: 18px 0;
}
.feedback-choice label {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  font-size: 12px;
  cursor: pointer;
}
.feedback-choice label:has(input:checked) {
  background: #edf3ff;
  border-color: #9bb8ff;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 23px;
}
.feedback-label {
  font-size: 13px;
  font-weight: 700;
  margin-top: 20px;
}
.modal-body > p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.loading-dot {
  animation: pulse 1s infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  padding: 14px 22px;
  background: #203153;
  color: white;
  border-radius: 10px;
  box-shadow: 0 10px 35px #15264730;
  font-size: 12px;
  z-index: 100;
  transition: 0.2s;
  max-width: 90%;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1550px) {
  .content {
    padding-top: 45px;
  }
  .study-layout {
    grid-template-columns: 1.5fr 1fr;
  }
  .form-body {
    padding: 30px;
  }
  .fields {
    gap: 25px;
  }
  .field input {
    height: 47px;
  }
  .result-empty {
    padding-top: 45px;
    padding-bottom: 40px;
  }
  .result-empty img {
    width: 145px;
    height: 145px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 205px;
    padding: 25px 14px;
  }
  .sidebar .brand {
    font-size: 16px;
    gap: 5px;
  }
  .main {
    margin-left: 205px;
  }
  .topbar {
    padding: 0 26px;
  }
  .content {
    padding: 29px 26px;
  }
  .study-layout {
    gap: 17px;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, 1fr);
  }
  .form-body {
    padding: 22px 20px;
  }
  .fields {
    gap: 19px 15px;
  }
  .card-head {
    padding: 20px;
  }
  .stat {
    padding: 17px;
  }
}
@media (max-width: 900px) {
  .study-layout {
    grid-template-columns: 1fr;
  }
  .result-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .model-mini {
    margin: 0;
  }
  .info-box {
    grid-column: 1/-1;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .login-story {
    padding: 35px;
  }
  .login-art h1 {
    font-size: 28px;
  }
  .login-art img {
    width: 210px;
    height: 210px;
  }
  .login-panel {
    padding: 30px;
  }
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 650px) {
  .sidebar {
    transform: translateX(-100%);
    width: 238px;
    box-shadow: 10px 0 50px #1b2f5515;
    transition: transform 0.2s;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main {
    margin-left: 0;
  }
  .mobile-menu {
    display: block;
  }
  .topbar {
    min-height: 65px;
    height: auto;
    flex-wrap: wrap;
    padding: 12px 17px;
  }
  .breadcrumb {
    margin-right: auto;
    font-size: 11px;
  }
  .breadcrumb > span {
    display: none;
  }
  .top-meta {
    gap: 0;
    margin-left: auto;
  }
  .content {
    padding: 25px 17px 10px;
  }
  .page-title {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
  }
  .page-title h1 {
    font-size: 23px;
  }
  .page-title p {
    font-size: 11px;
    line-height: 1.7;
  }
  .page-title .button {
    font-size: 0;
    padding: 11px;
  }
  .page-title .button svg {
    width: 17px;
  }
  .result-column {
    display: block;
  }
  .model-mini {
    margin-top: 16px;
  }
  .fields {
    gap: 20px 14px;
  }
  .field label {
    font-size: 10px;
  }
  .field input {
    font-size: 12px;
  }
  .form-body {
    padding: 20px 17px;
  }
  .card-head {
    padding: 18px;
  }
  .card-head h2 {
    font-size: 14px;
  }
  .card-head p {
    font-size: 10px;
  }
  .bottomline {
    font-size: 9px;
    gap: 10px;
  }
  .login {
    display: block;
  }
  .login-story {
    padding: 22px;
    background: white;
  }
  .login-story .brand {
    font-size: 19px;
  }
  .login-art,
  .login-story footer {
    display: none;
  }
  .login-panel {
    min-height: calc(100vh - 90px);
    padding: 20px 27px 75px;
    align-items: flex-start;
  }
  .login-form {
    margin-top: 35px;
    width: 100%;
    max-width: 370px;
  }
  .login-form h2 {
    font-size: 27px;
  }
  .login-panel footer {
    bottom: 25px;
  }
  .stats {
    gap: 12px;
  }
  .stat-number {
    font-size: 26px;
  }
  .snapshot-bar {
    padding: 17px;
    flex-wrap: wrap;
  }
  .snapshot-bar .button {
    margin-left: 0;
    width: 100%;
  }
  .filter.search {
    min-width: 0;
    width: 100%;
  }
  .filters {
    width: 100%;
    gap: 9px;
  }
  .filter {
    max-width: 100%;
  }
  .filter-label {
    width: 100%;
  }
  .page-buttons {
    gap: 3px;
  }
  .table-foot {
    font-size: 10px;
  }
}
/* Размеры текста рабочего интерфейса: основные подписи читаются без увеличения. */
.field label,
.field input,
.button,
.filter input,
.filter select,
.feedback-choice label,
.login-form label,
.login-form input,
.profile strong,
.card-head h2,
.model-mini-head,
.model-name,
.snapshot-bar h3 {
  font-size: 14px;
}
.eyebrow,
.card-head p,
.field small,
.input-unit span,
.form-note,
.info-box,
.result-footer,
.model-mini p,
.model-metrics span,
.badge,
.stat-top,
.stat small,
.table-foot,
.section-caption,
.snapshot-bar p,
.side-help,
.profile small,
.top-meta,
.breadcrumb,
.bottomline,
.filter-label,
.form-section,
.form-section span,
.login-form .login-note {
  font-size: 12px;
}
td {
  font-size: 13px;
}
th {
  font-size: 12px;
}
.result-empty p,
.result-value p,
.modal-body > p,
.login-form > p,
.page-title p {
  font-size: 14px;
}
.input-unit span {
  top: 13px;
}
.input-unit input {
  padding-right: 72px;
}
.model-mini .model-metrics {
  gap: 25px;
}
.sidebar .nav a {
  font-size: 13px;
}
.login-story .brand {
  font-size: 22px;
}
@media (max-width: 650px) {
  .page-title .button {
    font-size: 0;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .field input {
    height: 46px;
  }
  .field label {
    font-size: 14px;
  }
  .bottomline {
    flex-direction: column;
  }
  .form-section {
    gap: 12px;
  }
  .form-section span {
    max-width: 140px;
    text-align: right;
  }
  .feedback-choice {
    flex-direction: column;
  }
  .detail-grid {
    gap: 15px;
  }
  .modal-body {
    padding: 18px;
  }
  .modal td {
    padding: 14px 7px;
    font-size: 11px;
  }
  .modal .badge {
    font-size: 10px;
  }
  .stat-top {
    font-size: 11px;
  }
  .stat small {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
:root .study-detail-button {
  width: 100%;
  margin: 0 0 24px;
}
.feedback-fields {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.feedback-fields:disabled {
  opacity: 0.5;
}

.missing-measurements {
  max-width: 650px;
  line-height: 1.7;
}
#history-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.model-version {
  white-space: normal;
  overflow-wrap: anywhere;
}
.modal td:first-child {
  min-width: 130px;
}
.result-column {
  display: block;
}
@media (max-width: 650px) {
  #history-stats {
    grid-template-columns: 1fr;
  }
  .modal-actions {
    flex-wrap: wrap;
  }
}

.connection-status {
  white-space: nowrap;
  color: var(--green);
  font-size: 12px;
}
.connection-status.offline {
  color: var(--red);
}
.field small.field-error {
  color: var(--red);
}
.field-error:empty {
  display: none;
}
.field input[aria-invalid='true'] {
  border-color: var(--red);
}
.repeat-notice {
  margin: 0 24px 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.history-refresh {
  margin-bottom: 20px;
}
.form-foot {
  flex-wrap: wrap;
}

/* Контурные действия и состояния результата. */
.button.outline-yellow {
  border: 1px solid #d9a524;
  background: transparent;
  color: #8a6510;
  box-shadow: none;
}
.button.outline-yellow:hover {
  background: #fff8e6;
}
.button.outline-red {
  border: 1px solid var(--red);
  background: transparent;
  color: var(--red);
  box-shadow: none;
}
.button.outline-red:hover {
  background: #fff0f0;
}
.feedback-action {
  color: var(--blue);
}
.result-footer .status-ready {
  color: var(--green);
}
.result-footer .status-waiting {
  color: var(--red);
}
.repeat-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--red);
}
.repeat-mark {
  flex: 0 0 20px;
  height: 20px;
  border: 1px solid currentColor;
  border-radius: 50%;
  text-align: center;
  line-height: 18px;
  font-weight: 800;
}

.study-edit-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fbfcfe;
  font: inherit;
}
.detail-grid dd small {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 400;
}
.field-error {
  color: var(--red);
}
.study-edit-input[aria-invalid='true'] {
  border-color: var(--red);
}
.outcome-choice:has(input[value='1']) {
  color: var(--red);
}
.outcome-choice:has(input[value='0']) {
  color: var(--green);
}

.model-filter {
  position: relative;
  min-width: 180px;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
}
.model-filter summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e0e6f0;
  border-radius: 7px;
  max-width: 300px;
  background: white;
  list-style: none;
}
.model-filter summary::-webkit-details-marker {
  display: none;
}
.model-filter summary::after {
  content: '';
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
.model-options {
  position: absolute;
  z-index: 5;
  top: 100%;
  left: 0;
  width: max-content;
  min-width: 100%;
  padding: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 8px 24px #18243c15;
}
.model-options label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.model-options input[type='checkbox'] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: #2855ff;
}

.monitoring-dashboard {
  width: 100%;
  height: 1500px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.monitoring-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.monitoring-operations {
  height: 1200px;
}

.monitoring-grafana-link {
  margin-left: auto;
  width: 44px;
  height: 44px;
  padding: 8px;
  justify-content: center;
}
.monitoring-grafana-link img { display: block; width: 26px; height: 26px; }

.ml-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.ml-filters label { display: flex; flex: 1 1 150px; flex-direction: column; gap: 8px; font-size: 13px; }
.ml-filters select, .ml-filters input { width: 100%; min-width: 0; }
.ml-filters select, .ml-filters input, .ml-panel select {
  padding: 10px 12px; border: 1px solid #d7e0f0; border-radius: 7px; background: white; color: var(--ink); min-height: 42px;
}
.ml-panel select { max-width: 100%; }
#model-monitoring { font-size: 13px; }
.ml-panel > label { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13px; }
.ml-panel select, .ml-filters input, .ml-filters select { font-size: 13px; }
.ml-panel { margin: 20px 0; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.ml-panel h3 { margin: 0 0 16px; font-size: 16px; font-weight: 700; }
.ml-panel p { line-height: 1.7; }
.ml-summary-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ml-summary-bar h2 { font-size: 16px; }
.ml-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 24px 0; }
.ml-metrics > div { padding: 16px; background: #f5f8ff; border-radius: 8px; }
.ml-metrics > div > .ml-tip { font-size: 12px; color: #536886; }
.ml-metrics strong { display: block; margin-top: 8px; font-size: 24px; }
.ml-metrics small { display: block; margin-top: 6px; font-size: 11px; }
.ml-metrics > .ml-metric-bad { background: #fcebed; color: #a63e4b; }
.ml-metrics > .ml-metric-missing { color: #a63e4b; }
.ml-metrics > .ml-metric-bad > .ml-tip { color: #a63e4b; }
.ml-alert-text { color: #a63e4b; }
.ml-alert-cell { color: #a63e4b; background: #fcebed; }
.ml-tip { position: relative; display: inline-block; cursor: help; border-bottom: 1px dotted #b6c0d0; }
.ml-tooltip {
  display: none; position: absolute; top: calc(100% + 7px); left: 0; z-index: 20;
  width: 265px; max-width: calc(100vw - 64px); padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  color: #53627a; box-shadow: 0 6px 20px #18243c18;
  font-size: 11px; font-weight: 400; line-height: 1.6; text-align: left;
}
.ml-tip:hover > .ml-tooltip, .ml-tip:focus > .ml-tooltip { display: block; }
.ml-tip:focus-visible { outline: 2px solid #aac3ff; outline-offset: 3px; }
.ml-metrics > div:nth-child(4n) .ml-tooltip { left: auto; right: 0; }
.ml-chart { width: 100%; display: block; overflow: visible; }
.ml-chart text { font-family: inherit; font-size: 9px; fill: #61728a; }
.ml-chart circle { cursor: pointer; }
.ml-chart circle:focus { outline: 2px solid #152c59; outline-offset: 3px; }
.ml-grid { stroke: #e6ecf5; }
.ml-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; }
.ml-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; }
.ml-empty { padding: 35px 0; color: #a63e4b; }
.ml-notice { padding: 12px 16px; background: #fff6e9; border-radius: 8px; color: #79603d; }
.ml-table-wrap { overflow-x: auto; }
.ml-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 13px; }
.ml-table th, .ml-table td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.ml-table caption { text-align: left; padding: 16px 0; font-weight: 700; }
@media (max-width: 650px) {
  .ml-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ml-panel { padding: 16px; overflow-x: auto; }
  .ml-chart { min-width: 480px; }
  .ml-metrics > div:nth-child(2n) .ml-tooltip { left: auto; right: 0; }
}
