:root {
  font-family: "Inter", "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-width: 320px;
  background: #f4f7fa;
  color: #182332;
  font-family: "Inter", "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(0, 184, 151, 0.38);
  outline-offset: 2px;
}

/* Sign-in and sign-up */
#auth-screen {
  min-height: 100vh;
  height: auto;
  padding: 0;
  background: #fff;
  color: #172331;
}

#auth-screen .auth-wrapper {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  gap: 0;
}

#auth-screen .auth-row {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
}

#auth-screen .auth-col-left {
  width: auto;
  min-width: 0;
  padding: clamp(40px, 7vw, 104px) clamp(36px, 8vw, 120px);
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse at 82% 18%, rgba(0, 204, 166, 0.17), transparent 34%),
    radial-gradient(ellipse at 12% 92%, rgba(29, 97, 116, 0.2), transparent 36%),
    #081520;
  color: #f3f8f8;
  overflow: hidden;
  position: relative;
}

#auth-screen .auth-col-left::after {
  content: "";
  position: absolute;
  width: min(42vw, 560px);
  aspect-ratio: 1;
  right: -20%;
  bottom: -37%;
  border: 1px solid rgba(128, 224, 203, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(128, 224, 203, 0.025), 0 0 0 84px rgba(128, 224, 203, 0.02);
  pointer-events: none;
}

#auth-screen .auth-col-left-inside {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 590px;
  margin: 0 auto;
}

#auth-screen .brand-logo {
  margin: 0 0 58px;
  text-align: left;
}

#auth-screen .brand-logo img {
  display: block;
  width: min(250px, 100%);
  max-width: 100%;
}

#auth-screen .brand-tagline {
  max-width: 580px;
  margin: 0;
  color: #f1f7f7;
  font-size: clamp(2.1rem, 4.5vw, 4.2rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.055em;
  text-wrap: pretty;
}

#auth-screen .hero-tags-section {
  margin-top: 44px;
}

#auth-screen .hero-tags-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

#auth-screen .hero-tags-box {
  min-height: 76px;
  gap: 13px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid rgba(190, 221, 224, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

#auth-screen .hero-tags-box:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 220, 180, 0.35);
  background: rgba(255, 255, 255, 0.07);
}

#auth-screen .hero-tags-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
}

#auth-screen .hero-tags-icon img {
  width: 27px;
  max-height: 30px;
  object-fit: contain;
}

#auth-screen .hero-tags-text {
  margin: 0;
  padding: 0;
  border: 0;
  color: #c1d1d5;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
}

#auth-screen .auth-col-right {
  width: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 6vw, 84px);
  background: #fff;
}

#auth-screen .auth-col-right-inside {
  width: 100%;
  max-width: 420px;
}

#auth-screen .auth-form {
  width: 100%;
  gap: 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  animation: fadeSlideUp 220ms ease-out;
}

#auth-screen .auth-form h4 {
  margin: 0 0 8px;
  color: #142532;
  font-family: inherit;
  font-size: clamp(1.8rem, 3vw, 2.15rem);
  font-style: normal;
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

#auth-screen .input-group {
  gap: 8px;
}

#auth-screen .input-group label {
  color: #384957;
  font-size: 0.83rem;
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
}

#auth-screen .input-group input {
  min-height: 50px;
  padding: 13px 15px;
  border: 1px solid #d8e0e5;
  border-radius: 9px;
  background: #fff;
  color: #182a36;
  font-size: 0.95rem;
  box-shadow: 0 1px 2px rgba(16, 37, 49, 0.035);
}

#auth-screen .input-group input::placeholder {
  color: #99a5ac;
}

#auth-screen .input-group input:focus {
  border-color: #00a98b;
  box-shadow: 0 0 0 3px rgba(0, 169, 139, 0.13);
}

#auth-screen .label-with-link {
  align-items: center;
}

#auth-screen .text-link,
#auth-screen .anchor-text-new {
  color: #008c75;
  border-color: currentColor;
  font-size: 0.84rem;
  font-weight: 550;
}

#auth-screen .input-password-wrapper input {
  padding-right: 48px;
}

#auth-screen .btn-eye-toggle {
  right: 11px;
  color: #70818a;
}

#auth-screen #login-btn,
#auth-screen #signup-btn {
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border: 1px solid #008e78;
  border-radius: 9px;
  background: #008e78;
  color: #fff;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  box-shadow: 0 5px 12px rgba(0, 142, 120, 0.17);
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

#auth-screen #login-btn:hover,
#auth-screen #signup-btn:hover {
  transform: translateY(-1px);
  background: #007a68;
  box-shadow: 0 8px 18px rgba(0, 142, 120, 0.2);
}

#auth-screen .form-btn-icon {
  margin-left: auto;
}

#auth-screen .new-existing-user {
  color: #61717b;
  font-size: 0.9rem;
  font-weight: 400;
}

#auth-screen .auth-divider {
  position: relative;
  margin: 2px 0;
  color: #89969d;
  font-size: 0.76rem;
  font-weight: 500;
}

#auth-screen .auth-divider::before,
#auth-screen .auth-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 25px);
  height: 1px;
  background: #e7ecee;
}

#auth-screen .auth-divider::before {
  left: 0;
}

#auth-screen .auth-divider::after {
  right: 0;
}

#auth-screen .new-existing-user > a.btn-ghost {
  width: 100%;
  min-height: 48px;
  margin-top: 10px;
  gap: 10px;
  border: 1px solid #d8e0e5;
  border-radius: 9px;
  background: #fff;
  color: #253743;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 550;
  text-decoration: none;
}

#auth-screen .new-existing-user > a.btn-ghost:hover {
  background: #f7faf9;
  border-color: #9dbbb4;
  box-shadow: 0 3px 10px rgba(16, 37, 49, 0.06);
}

#auth-screen .form-error {
  color: #b42318;
}

/* Playground and evaluation tools */
#dashboard-screen .playground-wrapper {
  max-width: 1500px;
  margin: 0 auto;
}

#dashboard-screen .header-playground {
  margin-bottom: 20px;
}

#dashboard-screen .main {
  gap: 16px;
}

#dashboard-screen .panel {
  border: 1px solid #e4e7ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(28, 31, 51, 0.035);
}

#dashboard-screen .panel-title {
  padding: 15px 18px;
  border-color: #e9eaf0;
  background: #fff;
  color: #28323d;
  font-family: inherit;
  font-size: 0.88rem;
  letter-spacing: 0;
  text-transform: none;
}

#dashboard-screen .query-panel .panel-body,
#dashboard-screen .response-panel .panel-body {
  background: #fff;
}

#dashboard-screen .query-panel textarea,
#dashboard-screen #page-evalneuro .eval-field-row input,
#dashboard-screen #page-evalneuro .eval-field-row select,
#dashboard-screen #page-evalneuro #evalJudgeSelect,
#dashboard-screen #page-evalneuro #evalSampleSize,
#dashboard-screen .query-controls select,
#dashboard-screen .btn-reset {
  border: 1px solid #e0e3eb;
  border-radius: 8px;
  background-color: #fff;
  color: #26313d;
  font-family: inherit;
  font-size: 0.88rem;
}

#dashboard-screen .query-panel textarea:focus,
#dashboard-screen #page-evalneuro .eval-field-row input:focus,
#dashboard-screen #page-evalneuro .eval-field-row select:focus {
  border-color: #7565ee;
  box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.1);
}

#dashboard-screen .query-panel textarea::placeholder,
#dashboard-screen .eval-field-row input::placeholder {
  color: #9098a6;
}

#dashboard-screen .query-controls select option {
  background: #fff;
  color: #26313d;
}

#dashboard-screen .file-upload-area {
  border-color: #d8d4f5;
  border-radius: 9px;
  background: #faf9ff;
}

#dashboard-screen .file-upload-area:hover {
  border-color: #7565ee;
  background: #f6f4ff;
}

#dashboard-screen .file-upload-label,
#dashboard-screen .file-upload-types {
  color: #737d8b;
}

#dashboard-screen .btn-reset:hover {
  background: #eef4ff;
}

#dashboard-screen .btn-send {
  border-radius: 8px;
  background: #0057ff;
  color: #fff;
  font-family: inherit;
}

#dashboard-screen .btn-send:hover {
  background: #0048df;
  box-shadow: 0 4px 14px rgba(0, 87, 255, 0.2);
}

#dashboard-screen .response-content,
#dashboard-screen .routing-details-header {
  color: #27313d;
}

#dashboard-screen .response-content.placeholder {
  color: #87909d;
}

#dashboard-screen .response-content strong,
#dashboard-screen .response-content h1,
#dashboard-screen .response-content h2,
#dashboard-screen .response-content h3 {
  color: #292454;
}

#dashboard-screen .response-content code,
#dashboard-screen .response-content pre {
  border-color: #e4e4ee;
  border-radius: 7px;
  background: #f7f7fb;
  color: #303747;
}

#dashboard-screen .rd-card {
  border-color: #e4e7ee;
  border-radius: 9px;
  background: #fff;
}

#dashboard-screen .rd-card.highlight {
  border-color: #cfdfff;
  background: #faf9ff;
}

#dashboard-screen .rd-card.saving {
  border-color: #aedccb;
  background: #f5fbf8;
}

#dashboard-screen .rd-label,
#dashboard-screen .rd-value {
  color: #52606d;
}

/* BYOK and model configuration */
#dashboard-screen .provider-settings-card,
#dashboard-screen .provider-key-card {
  border-color: #e4e7ee !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 3px 12px rgba(28, 31, 51, 0.035) !important;
}

#dashboard-screen .provider-settings-card h4,
#dashboard-screen .provider-card-badge {
  color: #27313d !important;
}

#dashboard-screen .provider-settings-card h4,
#dashboard-screen .provider-card-header {
  border-color: #ececf1 !important;
}

#dashboard-screen .multiselect-trigger {
  border-color: #e0e3eb;
  border-radius: 8px;
  background: #fff;
  color: #394554;
}

#dashboard-screen .multiselect-trigger:hover {
  border-color: #b7aff0;
  background: #fbfaff;
}

#dashboard-screen .multiselect-options {
  border-color: #e2e3eb;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(26, 25, 55, 0.13);
}

#dashboard-screen .multiselect-header {
  border-color: #e9e9ef;
  background: #f8f8fc;
}

#dashboard-screen .ms-search-input {
  border-color: #e0e3eb;
  border-radius: 6px;
  background: #fff;
  color: #26313d;
}

#dashboard-screen .ms-action-btn {
  color: #0057ff;
}

#dashboard-screen .multiselect-option:hover {
  background: #f2f0ff !important;
}

#dashboard-screen .multiselect-option:hover .ms-model-name,
#dashboard-screen .ms-model-name {
  color: #374151 !important;
}

#dashboard-screen .model-map-card {
  border-color: #e4e7ee !important;
  border-radius: 9px !important;
  background: #fff !important;
}

#dashboard-screen .model-map-card:hover {
  border-color: #c6bef6 !important;
  background: #faf9ff !important;
}

#dashboard-screen .model-map-card.active {
  border-color: #a9a0ed !important;
  background: #f7f5ff !important;
  box-shadow: 0 0 0 2px rgba(0, 87, 255, 0.08) !important;
}

#dashboard-screen .model-map-name {
  color: #27313d !important;
}

#dashboard-screen .model-map-provider {
  color: #75808e !important;
}

#dashboard-screen .model-map-card.active .model-map-switch {
  background: #0057ff !important;
}

/* CIO dashboard */
#dashboard-screen #page-cio {
  --surface-1: #fff;
  --surface-2: #fff;
  --text-primary: #202936;
  --text-secondary: #647181;
  --text-muted: #74808e;
  --border: #e4e7ee;
  --cyan: #0057ff;
  --bg: #f7f8fc;
  color: #303b48;
}

#dashboard-screen #page-cio .kpi,
#dashboard-screen #page-cio .card {
  border: 1px solid #e4e7ee;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(28, 31, 51, 0.035);
}

#dashboard-screen #page-cio .kpi-lbl,
#dashboard-screen #page-cio .card-title {
  color: #727d8b;
}

#dashboard-screen #page-cio .kpi-val,
#dashboard-screen #page-cio .gauge-pct,
#dashboard-screen #page-cio .thr-pct {
  color: #202936;
}

#dashboard-screen #page-cio .rn-header,
#dashboard-screen #page-cio .tab-nav {
  border-color: #e4e7ee;
}

#dashboard-screen #page-cio .tab-btn {
  border-radius: 0;
  color: #6b7583;
  font-family: inherit;
}

#dashboard-screen #page-cio .tab-btn.active {
  border-bottom-color: #0057ff;
  color: #0057ff;
}

#dashboard-screen #page-cio .form-grp label,
#dashboard-screen #page-cio .cio-disclaimer {
  color: #687482;
}

#dashboard-screen #page-cio .form-grp input,
#dashboard-screen #page-cio .form-grp select {
  border-color: #e0e3eb;
  border-radius: 8px;
  background: #fff;
  color: #27313d;
}

/* Documentation */

#dashboard-screen .doc-left-portion {
  border-right: 1px solid #e8eaf0;
  background: #fff;
}

#dashboard-screen .doc-left-portion .topbar-brand-logo img {
  filter: none;
}

#dashboard-screen .tabs .tab {
  border-radius: 7px;
  color: #667181;
}

#dashboard-screen .tabs .tab.active {
  border-color: #ddd8fb;
  background: #eef4ff;
  color: #0057ff;
}

#dashboard-screen .tabs .tab:hover:not(.active) {
  background: #f6f5ff;
  color: #0048df;
}

#dashboard-screen .doc-desc {
  color: #657181;
}

#create-key-modal {
  padding: 20px;
  background: rgba(26, 27, 44, 0.45);
  backdrop-filter: blur(5px);
}

#create-key-modal .api-key-modal-card {
  width: min(100%, 480px);
  max-width: 480px;
  padding: 28px;
  border: 1px solid #e5e7ef;
  border-radius: 16px;
  background: #fff;
  color: #1c2024;
  font-family: "Rethink Sans", system-ui, -apple-system, sans-serif;
  box-shadow: 0 24px 72px rgba(24, 27, 55, 0.2);
}

#create-key-modal .api-key-modal-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 20px;
}

#create-key-modal .api-key-modal-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 12px;
  background: #eef4ff;
  color: #0057ff;
}

#create-key-modal .api-key-modal-icon svg {
  width: 22px;
  height: 22px;
}

#create-key-modal .api-key-modal-heading h3 {
  margin: 0;
  color: #1c2024;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 25px;
}

#create-key-modal .api-key-modal-heading p {
  margin: 3px 0 0;
  color: #697181;
  font-size: 13px;
  line-height: 19px;
}

#create-key-modal .api-key-modal-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  margin-left: auto;
  border: 0;
  border-radius: 8px;
  background: #f5f6fa;
  color: #626b7b;
}

#create-key-modal .api-key-modal-close:hover {
  background: #eef4ff;
  color: #0047d1;
}

#create-key-modal .api-key-modal-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 22px;
  padding: 12px 13px;
  border: 1px solid #e4e0fb;
  border-radius: 9px;
  background: #f8f7ff;
  color: #545b70;
  font-size: 13px;
  line-height: 19px;
}

#create-key-modal .api-key-modal-note svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #5a45dd;
}

#create-key-modal .input-group {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

#create-key-modal .input-group label {
  color: #303448;
  font-size: 13px;
  font-weight: 550;
}

#create-key-modal .input-group input,
#create-key-modal .input-group select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #dfe1e9;
  border-radius: 8px;
  background: #fff;
  color: #292d3d;
  font-family: inherit;
  font-size: 14px;
}

#create-key-modal .input-group input:focus,
#create-key-modal .input-group select:focus {
  border-color: #3b7cff;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.12);
}

#create-key-modal .input-group select option {
  background: #fff;
  color: #292d3d;
}

#create-key-modal .api-key-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #ececf2;
}

#create-key-modal .api-key-modal-actions button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 8px;
}

#create-key-modal .api-key-modal-actions .btn-ghost {
  border: 1px solid #dfe1e9;
  background: #fff;
  color: #42495a;
}

#create-key-modal .api-key-modal-actions .btn-primary {
  border: 1px solid #0057ff;
  background: #0057ff;
  color: #fff;
}

#create-key-modal .api-key-modal-actions svg {
  width: 17px;
  height: 17px;
}

/* Full-page documentation layout: sidebar navigation with a focused reading column. */

@media (max-width: 900px) {
  #auth-screen .auth-row {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.95fr);
  }

  #auth-screen .auth-col-left {
    padding-right: 36px;
    padding-left: 36px;
  }
}

@media (max-width: 700px) {
  body {
    overflow: auto;
  }

  #auth-screen {
    display: block;
    min-height: 100dvh;
    overflow-y: auto;
  }

  #auth-screen .auth-wrapper,
  #auth-screen .auth-row {
    min-height: 100dvh;
  }

  #auth-screen .auth-row {
    display: flex;
    flex-direction: column;
  }

  #auth-screen .auth-col-left {
    min-height: auto;
    padding: 28px 24px 24px;
  }

  #auth-screen .brand-logo {
    margin-bottom: 24px;
  }

  #auth-screen .brand-logo img {
    width: 188px;
  }

  #auth-screen .brand-tagline {
    max-width: 480px;
    font-size: clamp(1.55rem, 7vw, 2.35rem);
  }

  #auth-screen .hero-tags-section {
    margin-top: 20px;
  }

  #auth-screen .hero-tags-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #auth-screen .hero-tags-box {
    min-height: 58px;
    padding: 9px 10px;
    gap: 8px;
  }

  #auth-screen .hero-tags-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  #auth-screen .hero-tags-icon img {
    width: 23px;
    max-height: 25px;
  }

  #auth-screen .hero-tags-text {
    font-size: 0.76rem;
  }

  #auth-screen .auth-col-right {
    flex: 1;
    padding: 34px 24px 48px;
  }

  #auth-screen .auth-col-right-inside {
    max-width: 440px;
  }

  #auth-screen .auth-form {
    gap: 17px;
  }

  #create-key-modal {
    padding: 14px;
  }

  #create-key-modal .api-key-modal-card {
    padding: 22px;
  }

  #dashboard-screen #page-cio .two-col,
  #dashboard-screen #page-evalneuro .main {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  #dashboard-screen #page-evalneuro .panel,
  #dashboard-screen #page-evalneuro .routing-details-section,
  #dashboard-screen #page-evalneuro .routing-details-header,
  #dashboard-screen #page-evalneuro .routing-details-grid {
    min-width: 0;
  }

  #dashboard-screen #page-evalneuro .routing-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #dashboard-screen #page-evalneuro .eval-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #dashboard-screen #page-evalneuro .query-controls > * {
    min-width: 0;
    max-width: 100%;
  }

  #dashboard-screen #page-cio .tab-nav {
    flex-wrap: wrap;
  }

  #dashboard-screen #page-cio .tab-btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 9px 8px;
    font-size: 0.8rem;
  }

  #dashboard-screen .doc-left-portion {
    width: 100%;
    height: auto;
    padding: 12px;
  }

  #dashboard-screen .doc-left-portion .back-to-dashboard-btn-box {
    display: none;
  }

  #dashboard-screen .doc-left-portion .tabs {
    flex-direction: row;
    max-height: none;
    margin: 12px 0 0;
    overflow-x: auto;
  }

  #dashboard-screen .doc-left-portion .tabs .tab {
    flex: 0 0 auto;
  }

}

@media (max-width: 420px) {
  #auth-screen .auth-col-left {
    padding: 24px 18px 20px;
  }

  #auth-screen .auth-col-right {
    padding: 28px 18px 40px;
  }

  #auth-screen .hero-tags-box {
    padding: 8px;
  }

  #auth-screen .hero-tags-text {
    font-size: 0.7rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Documentation portal layout, based on the reference docs navigation and article flow. */

