/* BioStudio AI — Tox Studio styles */

.tox-studio-root {
  position: relative;
  height: 100%;
}

.tox-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  height: calc(100% - 0px);
  min-height: 0;
}

/* Graph Studio-inspired ribbon treatment, scoped to Tox Studio. */
.tox-ribbon-app {
  --tox-blue: #1557b0;
  --tox-blue-deep: #0d438d;
  --tox-teal: #087f8c;
  --st-accent: var(--tox-blue);
  --st-ai: var(--tox-teal);
}

.tox-ribbon-app .ss-titlebar {
  min-height: 42px;
  padding: 6px 12px;
  color: #fff;
  border-bottom: 0;
  background: linear-gradient(105deg, #0b3f83 0%, #1263ba 62%, #087d91 130%);
}

.tox-ribbon-app .ss-brand { min-width: 205px; }
.tox-ribbon-app .ss-brand-copy small,
.tox-ribbon-app .ss-title-label,
.tox-ribbon-app .ss-project-context-label { color: rgba(255, 255, 255, .72); }
.tox-ribbon-app .ss-titlebtn {
  border-color: rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .1);
  color: #fff;
}
.tox-ribbon-app .ss-titlebtn:hover,
.tox-ribbon-app .ss-titlebtn.on { background: rgba(255, 255, 255, .2); color: #fff; }
.tox-ribbon-app .ss-titlebtn.primary { border-color: rgba(131, 238, 226, .65); color: #fff; }
.tox-ribbon-app .ss-ribbon-tabs {
  gap: 0;
  padding: 0 10px;
  border-bottom: 0;
  background: var(--tox-blue-deep);
}
.tox-ribbon-app .ss-tab {
  padding: 8px 14px 7px;
  color: rgba(255, 255, 255, .78);
  border: 0;
  border-radius: 5px 5px 0 0;
}
.tox-ribbon-app .ss-tab:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.tox-ribbon-app .ss-tab.active {
  color: var(--tox-blue-deep);
  background: var(--st-panel);
}
.tox-ribbon-app .ss-ribbon-panel {
  min-height: 88px;
  padding: 7px 10px 5px;
  background: linear-gradient(#fff, #f8fafc);
}
.tox-ribbon-app .ss-rgroup-label { text-transform: none; letter-spacing: .01em; }
.tox-ribbon-app .ss-rbtn { border-radius: 5px; }
.tox-ribbon-app .ss-rbtn.big {
  min-width: 82px;
  min-height: 58px;
  background: #fff;
  border-color: #e1e6ed;
}
.tox-ribbon-app .ss-rbtn.big .ss-rbtn-ico { font-size: 21px; color: var(--tox-blue); }
.tox-ribbon-app .ss-rbtn.compact { min-height: 23px; }
.tox-ribbon-app .ss-rbtn.primary {
  border-color: #94b9e5;
  background: #eaf3fe;
}
.tox-ribbon-app .ss-rbtn.ai { border-color: #8dd3d1; background: #effcfb; }
.tox-ribbon-app .ss-main { padding: 0; overflow: hidden; }
.tox-ribbon-app .ss-dock { padding: 14px; }

.tox-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
  padding: 18px 20px;
  border: 1px solid #d5e2f1;
  border-radius: 12px;
  background:
    radial-gradient(circle at 90% 15%, rgba(25, 143, 160, .15), transparent 28%),
    linear-gradient(120deg, #f4f8fe, #fff 58%);
}
.tox-hero h2 { margin: 3px 0 5px; font-size: 21px; color: #18314f; }
.tox-hero p { margin: 0; color: #5b6b7e; font-size: 12.5px; }
.tox-eyebrow { color: var(--tox-blue, #1557b0); font-size: 10px; font-weight: 800; letter-spacing: .09em; }
.tox-section-heading { display: flex; justify-content: space-between; margin: 4px 0 9px; }
.tox-section-heading h3 { margin: 0; color: #24384e; font-size: 14px; }
.tox-section-heading p { margin: 3px 0 0; color: #6b7785; font-size: 11.5px; }
.tox-study-areas { margin: 4px 0 14px; }
.tox-study-area-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 9px;
}
.tox-study-area {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  min-height: 116px;
  padding: 13px;
  overflow: hidden;
  text-align: left;
  color: #263a50;
  border: 1px solid #dfe5ec;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.tox-study-area:hover { transform: translateY(-2px); border-color: #93b6df; box-shadow: 0 7px 18px rgba(25, 55, 90, .1); }
.tox-study-area-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff;
  border-radius: 8px;
  background: var(--tox-blue, #1557b0);
  font-size: 18px;
}
.tox-study-area.cyan .tox-study-area-icon { background: #138ca0; }
.tox-study-area.violet .tox-study-area-icon { background: #6b5bb5; }
.tox-study-area.teal .tox-study-area-icon { background: #16836f; }
.tox-study-area.amber .tox-study-area-icon { background: #b97816; }
.tox-study-area.rose .tox-study-area-icon { background: #b9556f; }
.tox-study-area-copy { display: grid; align-content: start; gap: 5px; }
.tox-study-area-copy strong { font-size: 12.5px; }
.tox-study-area-copy small { color: #697787; font-size: 10.8px; line-height: 1.4; }
.tox-study-area-action {
  position: absolute;
  right: 12px;
  bottom: 9px;
  color: var(--tox-blue, #1557b0);
  font-size: 10.5px;
  font-weight: 700;
}
.tox-data-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.tox-data-head h2 { margin: 3px 0 0; font-size: 19px; }
.tox-data-head .tox-form-actions { margin-top: 0; }

.tox-inspector-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--st-line, #e5e8ef);
}
.tox-insp { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; font-size: 11.5px; }
.tox-insp dt { color: #748092; }
.tox-insp dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.tox-governance { display: grid; gap: 12px; }
.tox-lifecycle-current { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tox-lifecycle-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}
.tox-lifecycle-steps li {
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #5b6b7e;
  font-size: 10.5px;
  text-transform: capitalize;
}
.tox-lifecycle-steps li.active {
  background: #e8f0fe;
  color: #1557b0;
  font-weight: 700;
}
}

.tox-nav {
  border-right: 1px solid var(--border, #e5e8ef);
  padding: 8px;
  overflow-y: auto;
  background: linear-gradient(180deg, #f8fafc, #f2f6fa);
}

.tox-nav-section { margin-bottom: 12px; }
.tox-nav-section strong { display: block; font-size: 11px; text-transform: uppercase; color: #6b7280; margin-bottom: 4px; }

.tox-nav-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tox-nav-item:hover { background: #eef0f4; }
.tox-nav-item.active { background: #e8f0fe; color: #1a56db; font-weight: 600; }

.tox-main {
  overflow-y: auto;
  padding: 14px 18px 26px;
  min-height: 0;
}

.tox-inspector {
  border-left: 1px solid var(--border, #e5e8ef);
  padding: 10px;
  overflow-y: auto;
  background: #fafbfc;
}

.tox-notice {
  font-size: 12px;
  color: #6b7280;
  margin: 0 0 8px;
  line-height: 1.4;
}

.tox-subtitle {
  font-size: 13px;
  color: #374151;
  margin: 0 0 6px;
  font-weight: 500;
}

.tox-empty-hint {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

.tox-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.tox-badge.ok { background: #ecfdf5; color: #047857; }
.tox-badge.warn { background: #fef3c7; color: #b45309; }
.tox-badge.info { background: #e8f0fe; color: #1a56db; }
.tox-badge.muted { background: #f3f4f6; color: #6b7280; }

.tox-dash-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.tox-dash-card {
  padding: 10px;
  border-radius: 8px;
  background: #f3f4f6;
  text-align: center;
}

.tox-dash-card.primary { background: #e8f0fe; }
.tox-dash-card.warn { background: #fef3c7; }
.tox-dash-card.ok { background: #ecfdf5; }

.tox-dash-val { font-size: 20px; font-weight: 700; }
.tox-dash-lbl { font-size: 11px; color: #6b7280; }

.tox-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.tox-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tox-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 10px;
  padding-bottom: 1px;
  border-bottom: 1px solid #dfe5ec;
}

.tox-subtab {
  padding: 7px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 5px 5px 0 0;
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.tox-subtab:hover { background: #eef4fa; }
.tox-subtab.active { background: #eaf3fe; color: #1557b0; border-bottom-color: #1557b0; font-weight: 700; }

@media (max-width: 1050px) {
  .tox-study-area-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .tox-layout { grid-template-columns: 190px minmax(0, 1fr); }
}

.tox-viz-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tox-viz-btn {
  padding: 4px 10px;
  border: 1px solid #e5e8ef;
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  cursor: pointer;
}

.tox-viz-btn.active { background: #e8f0fe; border-color: #1a56db; }

.tox-viz-canvas {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e8ef;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.tox-risk-score {
  font-size: 32px;
  font-weight: 700;
  text-transform: capitalize;
}

.tox-send-score {
  font-size: 28px;
  font-weight: 700;
  color: #1a56db;
  margin: 8px 0;
}

.tox-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
}

/* Floating AI assistant */
.tox-ai-fab {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #1a56db, #7c3aed);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(26, 86, 219, 0.35);
  z-index: 100;
  transition: transform 0.15s;
}

.tox-ai-fab:hover { transform: translateY(-2px) scale(1.05); }

.tox-ai-panel {
  position: absolute;
  right: 16px;
  bottom: 16px;
  top: 16px;
  width: 360px;
  max-width: calc(100% - 32px);
  background: #fff;
  border: 1px solid #e5e8ef;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  z-index: 101;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tox-ai-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e8ef;
  font-weight: 600;
}

.tox-ai-close {
  margin-left: auto;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}

.tox-ai-disclaimer {
  font-size: 10px;
  color: #9ca3af;
  padding: 6px 12px;
  background: #fef3c7;
}

.tox-ai-enc {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 11px;
}

.tox-ai-scope {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 11px;
}

.tox-ai-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 12px;
  max-height: 80px;
  overflow-y: auto;
}

.tox-ai-quickbtn {
  padding: 3px 8px;
  border: 1px solid #e5e8ef;
  border-radius: 12px;
  background: #f9fafb;
  font-size: 10px;
  cursor: pointer;
}

.tox-ai-log {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  min-height: 120px;
}

.tox-ai-msg {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.tox-ai-msg.user { background: #e8f0fe; margin-left: 20px; }
.tox-ai-msg.ai { background: #f3f4f6; margin-right: 20px; }

.tox-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 12px;
  border-top: 1px solid #e5e8ef;
}

.tox-ai-actions button {
  font-size: 10px;
  padding: 4px 8px;
  border: 1px solid #e5e8ef;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.tox-ai-input {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid #e5e8ef;
}

.tox-ai-prompt {
  flex: 1;
  resize: none;
  border: 1px solid #e5e8ef;
  border-radius: 6px;
  padding: 6px;
  font-size: 12px;
}

.tox-ai-send {
  padding: 6px 12px;
  background: #1a56db;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* Guided setup, import/QC, and operational workspace */
.tox-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 18, 28, 0.62);
  backdrop-filter: blur(8px);
}

.tox-wizard,
.tox-import-dialog {
  width: min(1180px, 96vw);
  height: min(820px, 92vh);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  color: #17233a;
  background: #f7f9fc;
  border: 1px solid rgba(139, 157, 186, 0.48);
  border-radius: 20px;
  box-shadow: 0 28px 90px rgba(4, 12, 26, 0.35);
}

.tox-wizard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px 18px;
  color: #f7fbff;
  background:
    radial-gradient(circle at 88% 10%, rgba(88, 183, 255, 0.28), transparent 32%),
    linear-gradient(125deg, #14223d, #203a64);
}

.tox-wizard-header h2 {
  margin: 3px 0 2px;
  font-size: 25px;
}

.tox-wizard-header p {
  margin: 0;
  color: #b9c9df;
}

.tox-wizard-close {
  width: 34px;
  height: 34px;
  color: #d9e7f7;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  cursor: pointer;
}

.tox-wizard-steps {
  display: grid;
  grid-template-columns: repeat(10, minmax(72px, 1fr));
  gap: 2px;
  padding: 10px 18px;
  overflow-x: auto;
  background: #eaf0f7;
  border-bottom: 1px solid #d6dfeb;
}

.tox-import-steps {
  grid-template-columns: repeat(8, minmax(86px, 1fr));
}

.tox-wizard-steps button {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  padding: 7px 5px;
  color: #68778d;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
}

.tox-wizard-steps button span {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  background: #d5deea;
  border-radius: 50%;
}

.tox-wizard-steps button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tox-wizard-steps button.active {
  color: #1657a8;
  background: #fff;
}

.tox-wizard-steps button.active span,
.tox-wizard-steps button.complete span {
  color: #fff;
  background: #2675cf;
}

.tox-wizard-body {
  padding: 24px 28px;
  overflow: auto;
}

.tox-wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: #fff;
  border-top: 1px solid #dbe3ed;
}

.tox-wizard-footer > div {
  display: flex;
  gap: 10px;
}

.tox-wizard-saved {
  color: #718097;
  font-size: 12px;
}

.tox-wizard-primary,
.tox-wizard-secondary,
.tox-wizard-small {
  padding: 9px 15px;
  color: #24344d;
  font-weight: 650;
  background: #fff;
  border: 1px solid #c8d3e2;
  border-radius: 8px;
  cursor: pointer;
}

.tox-wizard-primary {
  min-width: 116px;
  color: #fff;
  background: #1767be;
  border-color: #1767be;
}

.tox-wizard-primary:disabled,
.tox-wizard-secondary:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.tox-wizard-small {
  padding: 6px 10px;
  font-size: 12px;
}

.tox-wizard-small.danger {
  color: #a63442;
}

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

.tox-wizard-field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  color: #43526a;
  font-size: 12px;
  font-weight: 650;
}

.tox-wizard-field .st-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 38px;
}

.tox-field-error,
.tox-import-error {
  color: #a12c3c;
}

.tox-import-error {
  margin-bottom: 16px;
  padding: 11px 13px;
  background: #fff0f1;
  border: 1px solid #f0b8bf;
  border-radius: 8px;
}

.tox-wizard-help {
  grid-column: 1 / -1;
  margin: 4px 0;
  color: #6c7b91;
  line-height: 1.5;
}

.tox-template-picker,
.tox-endpoint-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tox-template-option,
.tox-endpoint-option,
.tox-import-mode {
  display: grid;
  gap: 6px;
  padding: 15px;
  color: #25354e;
  text-align: left;
  background: #fff;
  border: 1px solid #d4deea;
  border-radius: 11px;
  cursor: pointer;
}

.tox-template-option span,
.tox-import-mode span {
  color: #65748b;
  font-size: 12px;
  line-height: 1.45;
}

.tox-template-option small,
.tox-endpoint-option small {
  color: #7f8ca0;
}

.tox-template-option.selected,
.tox-endpoint-option.selected,
.tox-import-mode.selected {
  background: #edf6ff;
  border-color: #4287d4;
  box-shadow: 0 0 0 2px rgba(42, 117, 201, 0.12);
}

.tox-group-editor {
  display: grid;
  gap: 12px;
}

.tox-group-edit-row {
  padding: 15px;
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 11px;
}

.tox-group-edit-grid {
  grid-template-columns: 1.4fr repeat(5, minmax(90px, 1fr));
}

.tox-group-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  grid-column: 5 / -1;
}

.tox-check {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4e5e74;
  font-size: 12px;
}

.tox-wizard-table-head,
.tox-group-animal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tox-group-animal-row {
  display: grid;
  grid-template-columns: 1fr 160px 190px 1fr;
}

.tox-group-animal-row > div {
  display: grid;
  gap: 4px;
}

.tox-group-animal-row small,
.tox-animal-preview {
  color: #77859a;
  font-size: 12px;
}

.tox-schedule-preview,
.tox-review-callout {
  display: grid;
  gap: 7px;
  align-content: center;
  padding: 18px;
  background: #edf6ff;
  border: 1px solid #bed9f4;
  border-radius: 11px;
}

.tox-review-sheet {
  display: grid;
  gap: 18px;
}

.tox-review-sheet dl,
.tox-import-summary dl {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d8e1ec;
  border-radius: 11px;
}

.tox-review-sheet dt,
.tox-review-sheet dd,
.tox-import-summary dt,
.tox-import-summary dd {
  margin: 0;
  padding: 10px 13px;
  border-bottom: 1px solid #e5ebf2;
}

.tox-review-sheet dt,
.tox-import-summary dt {
  color: #617086;
  background: #f4f7fb;
  font-weight: 700;
}

.tox-file-drop {
  display: grid;
  min-height: 130px;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: #315270;
  background: #edf6ff;
  border: 1px dashed #75a4d1;
  border-radius: 13px;
  cursor: pointer;
}

.tox-file-drop input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tox-file-drop span {
  color: #6a7d91;
  font-size: 12px;
}

.tox-import-or {
  margin: 12px;
  color: #7a8798;
  text-align: center;
}

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

.tox-mapping-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #d9e2ed;
  border-radius: 8px;
}

.tox-mapping-row > span:first-child {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tox-import-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}

.tox-import-metrics > div {
  display: grid;
  gap: 3px;
  padding: 12px;
  background: #fff;
  border: 1px solid #d9e2ed;
  border-radius: 9px;
}

.tox-import-metrics strong {
  font-size: 21px;
}

.tox-import-metrics span {
  color: #6d7b90;
  font-size: 11px;
  text-transform: uppercase;
}

.tox-import-metrics .rejected strong {
  color: #b13849;
}

.tox-import-metrics .warning strong,
.tox-import-metrics .duplicate strong {
  color: #a26811;
}

.tox-import-table-wrap {
  max-height: 390px;
  overflow: auto;
  background: #fff;
  border: 1px solid #d9e2ed;
  border-radius: 9px;
}

.tox-import-table {
  width: 100%;
  font-size: 11px;
  border-collapse: collapse;
}

.tox-import-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #4c5e75;
  text-align: left;
  background: #edf2f8;
}

.tox-import-table th,
.tox-import-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5ebf1;
}

.tox-import-table tr.rejected {
  background: #fff2f3;
}

.tox-import-table tr.warning,
.tox-import-table tr.duplicate {
  background: #fff9ed;
}

.tox-import-modes {
  display: grid;
  gap: 12px;
}

.tox-import-progress {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 420px;
  text-align: center;
}

.tox-progress-ring {
  --progress: 0;
  position: relative;
  display: grid;
  width: 110px;
  height: 110px;
  place-items: center;
  background: conic-gradient(#2675cf calc(var(--progress) * 1%), #dce5ef 0);
  border-radius: 50%;
}

.tox-progress-ring::before {
  position: absolute;
  width: 84px;
  height: 84px;
  content: "";
  background: #f7f9fc;
  border-radius: 50%;
}

.tox-progress-ring strong {
  position: relative;
  z-index: 1;
  font-size: 21px;
}

@media (max-width: 900px) {
  .tox-modal-backdrop {
    padding: 0;
  }

  .tox-wizard,
  .tox-import-dialog {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .tox-wizard-grid,
  .tox-group-edit-grid,
  .tox-template-picker,
  .tox-endpoint-picker,
  .tox-mapping-grid {
    grid-template-columns: 1fr;
  }

  .tox-group-animal-row {
    grid-template-columns: 1fr;
  }
}

.tox-operational-grid {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.tox-grid-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.tox-grid-toolbar .st-input {
  width: auto;
  min-width: 130px;
}

.tox-grid-toolbar .tox-grid-search {
  width: min(320px, 34vw);
}

.tox-grid-count {
  margin-left: auto;
  color: #728096;
  font-size: 11px;
  white-space: nowrap;
}

.tox-grid-scroll {
  max-height: 520px;
  overflow: auto;
  border: 1px solid #d9e2ed;
  border-radius: 9px;
}

.tox-grid-table {
  width: 100%;
  min-width: 850px;
  font-size: 11px;
  border-collapse: collapse;
}

.tox-grid-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 9px;
  color: #4c5d73;
  text-align: left;
  background: #edf2f8;
  border-bottom: 1px solid #d3deea;
}

.tox-grid-table td {
  max-width: 280px;
  padding: 8px 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-bottom: 1px solid #e7ecf2;
}

.tox-grid-table tr:hover td {
  background: #f7fbff;
}

.tox-grid-table tr.editing td {
  background: #edf6ff;
}

.tox-grid-table .st-input {
  width: 100%;
  min-width: 80px;
  padding: 5px 6px;
  font-size: 11px;
}

.tox-grid-action {
  padding: 4px 7px;
  color: #405169;
  background: #fff;
  border: 1px solid #cad5e2;
  border-radius: 5px;
  cursor: pointer;
}

.tox-grid-action.primary {
  color: #fff;
  background: #1767be;
  border-color: #1767be;
}

.tox-grid-action.danger {
  color: #a12d3d;
}

.tox-qc-state {
  display: inline-flex;
  padding: 3px 6px;
  color: #5f6d80;
  background: #e9eef4;
  border-radius: 999px;
}

.tox-qc-state.reviewed,
.tox-qc-state.approved {
  color: #17623a;
  background: #e4f5e9;
}

.tox-qc-state.rejected,
.tox-qc-state.void {
  color: #9a2f3f;
  background: #fdebee;
}

.tox-grid-empty,
.tox-grid-limit {
  padding: 22px !important;
  color: #728096;
  text-align: center;
}

.tox-member-role-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 240px);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #dce3ea;
}

.tox-member-role-row > span {
  display: grid;
  gap: 2px;
}

.tox-member-role-row small { color: #687789; }

.tox-analysis-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
}

.tox-analysis-filters .st-field { min-width: 145px; }

.tox-analysis-result {
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  font-size: 12px;
  white-space: pre-wrap;
  background: #f6f8fa;
  border: 1px solid #dce3ea;
  border-radius: 8px;
}

.tox-report-section-editor {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid #dce3ea;
}

.tox-report-section-editor > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tox-grid-table tr.new-record td { background: #f1f7fd; }

.tox-dirty-state {
  align-self: center;
  padding: 5px 8px;
  font-size: 11px;
  border-radius: 999px;
}

.tox-dirty-state.saved {
  color: #17623a;
  background: #e4f5e9;
}

.tox-dirty-state.dirty {
  color: #8a5a00;
  background: #fff3cf;
}

@media (max-width: 760px) {
  .tox-member-role-row { grid-template-columns: 1fr; }
  .tox-analysis-filters > * { flex: 1 1 160px; }
}

/* Investigative Tox */
.itx-nav-section {
  margin: -2px -2px 14px;
  padding: 8px 6px;
  border: 1px solid #cfe0f3;
  border-radius: 9px;
  background: #eef6ff;
}

.itx-new-nav {
  margin-top: 4px;
  color: #1557b0;
  font-weight: 700;
}

.itx-dashboard,
.itx-workspace {
  display: grid;
  gap: 12px;
}

.itx-hero .st-btn {
  min-width: 150px;
  min-height: 38px;
}

.itx-toolbar,
.itx-detail-actions,
.itx-report-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.itx-toolbar {
  margin-bottom: 10px;
}

.itx-toolbar .st-field {
  min-width: 150px;
}

.itx-search {
  width: min(360px, 40vw);
}

.itx-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #dce4ed;
  border-radius: 8px;
}

.itx-table,
.itx-matrix {
  width: 100%;
  min-width: 1080px;
  font-size: 11px;
  border-collapse: collapse;
}

.itx-table th,
.itx-table td,
.itx-matrix th,
.itx-matrix td {
  padding: 8px 9px;
  text-align: left;
  border-bottom: 1px solid #e5ebf1;
  vertical-align: top;
}

.itx-table th,
.itx-matrix th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #4b5d74;
  background: #eef3f8;
}

.itx-table tbody tr {
  cursor: pointer;
}

.itx-table tbody tr:hover td {
  background: #f5f9fd;
}

.itx-sort {
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.itx-empty-cell {
  padding: 28px !important;
  color: #6f7d90;
  text-align: center !important;
}

.itx-detail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 2px;
}

.itx-detail-head h2 {
  margin: 3px 0 4px;
  color: #1c3550;
  font-size: 22px;
}

.itx-detail-head p {
  margin: 0;
  color: #68778a;
  font-size: 12px;
}

.itx-back {
  display: block;
  margin-bottom: 9px;
  padding: 0;
  color: #1557b0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.itx-section-nav {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  padding: 5px;
  background: #eef2f7;
  border-radius: 9px;
}

.itx-section-nav button {
  padding: 7px 11px;
  color: #526176;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.itx-section-nav button.active {
  color: #1557b0;
  font-weight: 700;
  background: #fff;
  box-shadow: 0 1px 4px rgba(25, 55, 90, .12);
}

.itx-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 8px;
}

.itx-summary-card {
  display: grid;
  gap: 5px;
  min-height: 64px;
  align-content: center;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #dbe4ee;
  border-radius: 9px;
}

.itx-summary-card small {
  color: #728096;
  font-size: 10px;
  text-transform: uppercase;
}

.itx-summary-card strong {
  color: #203850;
  font-size: 13px;
}

.itx-process {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  overflow-x: auto;
}

.itx-process-step {
  display: grid;
  min-width: 96px;
  justify-items: center;
  gap: 5px;
  color: #738095;
  font-size: 10px;
  text-align: center;
}

.itx-process-step span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  background: #e2e8ef;
  border-radius: 50%;
}

.itx-process-step.complete {
  color: #17623a;
}

.itx-process-step.complete span {
  color: #fff;
  background: #25905b;
}

.itx-process-line {
  width: min(70px, 5vw);
  height: 2px;
  margin-top: -18px;
  background: #d5dde7;
}

.itx-ai-draft {
  margin-bottom: 10px;
  padding: 8px 10px;
  color: #735314;
  font-size: 11px;
  background: #fff6dc;
  border: 1px solid #eed79e;
  border-radius: 7px;
}

.itx-add-panel > summary {
  padding: 9px 11px;
  color: #1557b0;
  font-weight: 700;
  background: #eef6ff;
  border: 1px solid #cbdff4;
  border-radius: 7px;
  cursor: pointer;
}

.itx-form {
  margin-top: 12px;
}

.itx-inline {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(70px, .7fr);
  gap: 6px;
}

.itx-chart {
  min-height: 330px;
  display: grid;
  place-items: center;
  padding: 10px;
  overflow: auto;
  background: #fff;
  border: 1px solid #dfe6ee;
  border-radius: 8px;
}

.itx-small-chart {
  min-height: 260px;
  display: grid;
  place-items: center;
  overflow: auto;
}

.itx-two-col,
.itx-three-col {
  display: grid;
  gap: 12px;
}

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

.itx-three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.itx-three-col > div {
  padding: 10px;
  background: #f6f8fb;
  border-radius: 7px;
}

.itx-three-col p {
  margin-bottom: 0;
  color: #647286;
  font-size: 11px;
}

.itx-hypothesis-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid #dce4ed;
  border-radius: 9px;
}

.itx-hypothesis-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  cursor: pointer;
}

.itx-hypothesis-card > summary > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.itx-hypothesis-card > summary small,
.itx-confidence {
  color: #718096;
  font-size: 10px;
}

.itx-hypothesis-body {
  padding: 0 14px 14px;
  border-top: 1px solid #e6ebf1;
}

.itx-evidence-cell {
  min-width: 110px;
  font-size: 10px;
}

.itx-evidence-cell.support {
  color: #17623a;
  background: #e7f6ec;
}

.itx-evidence-cell.against {
  color: #9a3040;
  background: #fdecef;
}

.itx-evidence-cell.neutral {
  color: #677489;
  background: #f3f5f8;
}

.itx-mechanism {
  margin-top: 12px;
  padding: 12px;
  background: #f7f9fc;
  border: 1px solid #dce4ed;
  border-radius: 8px;
}

.itx-mechanism-flow {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.itx-mechanism-node {
  display: grid;
  min-width: 160px;
  gap: 5px;
  padding: 10px;
  background: #fff;
  border: 1px solid #bfd4ea;
  border-radius: 8px;
}

.itx-mechanism-node small {
  min-height: 28px;
  color: #6b788a;
  font-size: 10px;
}

.itx-arrow {
  color: #4880ba;
  font-size: 19px;
}

.itx-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #55657a;
  font-size: 11px;
}

.itx-report-options {
  margin-bottom: 10px;
  padding: 9px;
  background: #f5f8fb;
  border-radius: 7px;
}

.itx-upload-box {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #dce4ed;
}

.itx-upload-box p {
  margin: 3px 0 0;
  color: #718096;
  font-size: 12px;
}

.itx-file-drop {
  min-height: 105px;
}

.itx-attachment-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.itx-attachment-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  background: #fff;
  border: 1px solid #dce4ed;
  border-radius: 6px;
}

.itx-attachment-list button {
  color: #a12d3d;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.itx-wizard-steps {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.itx-wizard {
  width: min(980px, 96vw);
}

@media (max-width: 1050px) {
  .itx-summary-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .itx-two-col { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .itx-detail-head { align-items: stretch; flex-direction: column; }
  .itx-summary-grid,
  .itx-three-col { grid-template-columns: 1fr; }
  .itx-search { width: 100%; }
}
