/* WorkBuddy portal · self-contained, no external fonts or assets. */
:root {
  --bg: #f5f7f8;
  --surface: #fff;
  --ink: #1d2c35;
  --muted: #74828c;
  --line: #e7ecee;
  --accent: #087f72;
  --accent-dark: #066559;
  --accent-soft: #e9f6f1;
  --accent-rgb: 8, 127, 114;
  --sidebar: 240px;
  --danger: #c44747;
  --shadow: 0 8px 32px #233b4b08;
  --radius: 14px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
body.admin {
  --accent: #3c61a5;
  --accent-dark: #294c8b;
  --accent-soft: #edf2fc;
  --accent-rgb: 60, 97, 165;
  --ink: #263348;
  --bg: #f4f6fa;
  --line: #e6eaf1;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(var(--accent-rgb), 0.3);
  outline-offset: 3px;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: fixed;
  left: 15px;
  top: -80px;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
}
.skip-link:focus {
  top: 12px;
}
.boot {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
}
.loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.noscript {
  padding: 40px;
  text-align: center;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 30px 18px 20px;
  z-index: 40;
  transition: transform 0.2s;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.6px;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
}
.brand-mark svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.1;
}
.brand-sub {
  padding: 8px 12px 0 57px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--muted);
}
.nav-group {
  padding: 35px 12px 11px;
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #9ba5ad;
  font-weight: 650;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  color: #6a7783;
  font-weight: 500;
  text-align: left;
  min-height: 44px;
  width: 100%;
}
.nav-item:hover {
  background: #f6f8f9;
  color: var(--ink);
  text-decoration: none;
}
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
}
.nav-item.active:after {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: auto;
  background: var(--accent);
  border-radius: 50%;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 40px;
}
.sidebar-note {
  padding: 16px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0 8px 18px;
  font-size: 12px;
  color: var(--muted);
}
.sidebar-note strong {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  margin-bottom: 6px;
}
.status-dot {
  width: 6px;
  height: 6px;
  background: #28a680;
  border-radius: 50%;
  display: inline-block;
}
.sidebar-footer {
  font-size: 10px;
  color: #a3acb4;
  padding: 15px 12px 0;
  letter-spacing: 0.7px;
}
.workspace {
  margin-left: var(--sidebar);
  min-height: 100vh;
}
.topbar {
  height: 78px;
  background: #ffffffed;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  position: sticky;
  top: 0;
  z-index: 25;
  backdrop-filter: blur(12px);
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb b {
  font-weight: 500;
  color: var(--ink);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.environment {
  color: var(--muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.avatar {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.profile-name {
  font-size: 12px;
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-role {
  font-size: 10px;
  color: var(--muted);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--muted);
}
.icon-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.menu-toggle {
  display: none;
}
.mobile-overlay {
  display: none;
}
.content {
  padding: 34px 38px 24px;
  max-width: 1680px;
  margin: 0 auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 27px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 650;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}
h1 {
  font-size: 26px;
  line-height: 1.35;
  letter-spacing: -0.6px;
  margin: 0 0 8px;
  font-weight: 650;
}
h2 {
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.2px;
  font-weight: 650;
  margin: 0;
}
h3 {
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  font-weight: 650;
}
p {
  margin: 0;
}
.subtext {
  color: var(--muted);
  font-size: 12px;
}
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 15px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.5;
  background: #fff;
  border: 1px solid #dfe6e8;
  color: var(--ink);
  white-space: nowrap;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
.btn:hover {
  background: #f6f8f9;
  text-decoration: none;
}
.btn svg {
  width: 15px;
  height: 15px;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 3px 7px rgba(var(--accent-rgb), 0.12);
}
.btn.primary:hover {
  background: var(--accent-dark);
}
.btn.danger {
  color: var(--danger);
  border-color: #eedada;
  background: #fff;
}
.btn.danger:hover {
  background: #fff3f3;
}
.btn.small {
  font-size: 11px;
  min-height: 30px;
  padding: 5px 10px;
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--accent);
}
.btn.full {
  width: 100%;
}
.text-action {
  color: var(--accent);
  font-size: 12px;
  font-weight: 550;
  padding: 4px 0;
}
.text-action.danger {
  color: var(--danger);
}
.separator {
  height: 16px;
  width: 1px;
  background: var(--line);
  margin: 0 3px;
}
.section-gap {
  margin-top: 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 21px 24px;
  border-bottom: 1px solid var(--line);
}
.card-head .subtext {
  margin-top: 3px;
}
.card-body {
  padding: 23px 24px;
}
.card-foot {
  border-top: 1px solid var(--line);
  padding: 13px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  color: var(--muted);
  font-size: 11px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.stat-card {
  padding: 21px 22px;
  position: relative;
  overflow: hidden;
}
.stat-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  gap: 8px;
}
.stat-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  background: #f3f7f7;
  color: var(--accent);
  border-radius: 8px;
}
.stat-icon svg {
  width: 16px;
  height: 16px;
}
.stat-value {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.8px;
  line-height: 1.3;
  margin: 12px 0 7px;
  font-variant-numeric: tabular-nums;
}
.stat-note {
  font-size: 10px;
  color: var(--muted);
}
.stat-card.featured {
  background: linear-gradient(115deg, #087d70, #106c68);
  color: #fff;
  border-color: #087b70;
}
.featured .stat-label,
.featured .stat-note {
  color: #bfe3db;
}
.featured .stat-icon {
  background: #ffffff1c;
  color: #d5eee8;
}
.admin .stat-card.featured {
  background: linear-gradient(115deg, #314a70, #365b91);
  border-color: #365477;
}
.admin .featured .stat-label,
.admin .featured .stat-note {
  color: #cad9f2;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 23px;
}
.equal-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 23px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 5px;
  padding: 3px 7px;
  font-size: 10px;
  line-height: 1.6;
  white-space: nowrap;
  font-weight: 550;
  color: #688071;
  background: #edf6ef;
}
.badge.blue {
  color: #4a6eac;
  background: #edf3fc;
}
.badge.muted {
  color: #7b8793;
  background: #f0f3f6;
}
.badge.red {
  color: #b85c5c;
  background: #fceeee;
}
.badge.amber {
  color: #ab803a;
  background: #fbf5e8;
}
.table-wrap {
  overflow: auto;
  width: 100%;
  border-radius: 0 0 var(--radius) var(--radius);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
  text-align: left;
}
thead {
  background: #fbfcfd;
  color: #8a959f;
  font-size: 10px;
  letter-spacing: 0.3px;
}
th {
  font-weight: 550;
  padding: 12px 23px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 15px 23px;
  border-bottom: 1px solid #eff2f4;
  color: #5d6b77;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fbfcfd;
}
td.strong {
  color: var(--ink);
  font-weight: 550;
}
.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
}
.cell-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cell-stack small {
  font-size: 10px;
  color: var(--muted);
}
.cell-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.truncate {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-empty {
  padding: 48px 25px;
  text-align: center;
  white-space: normal;
  color: var(--muted);
}
.table-empty svg {
  width: 26px;
  height: 26px;
  margin: 0 auto 9px;
  display: block;
  color: #b7c6ca;
}
.state {
  padding: 65px 25px;
  text-align: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.state.error {
  color: var(--danger);
}
.state p {
  max-width: 440px;
  font-size: 12px;
}
.state h3 {
  color: var(--ink);
}
.page-loading {
  min-height: 360px;
}
.notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 16px;
  border: 1px solid #d5ebe3;
  background: #f0f9f5;
  border-radius: 9px;
  color: #508173;
  font-size: 12px;
  margin-bottom: 24px;
}
.notice svg {
  width: 17px;
  height: 17px;
  margin-top: 1px;
}
.notice strong {
  color: #376c60;
  font-weight: 600;
}
.notice.warning {
  background: #fffbef;
  border-color: #f0e3bf;
  color: #9a7a35;
}
.notice.warning strong {
  color: #8f6f2e;
}
.notice .btn {
  margin-left: auto;
}
.chart-body {
  padding: 20px 24px 12px;
}
.chart-summary {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 20px;
}
.chart-summary strong {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.5px;
}
.chart-summary span {
  font-size: 11px;
  color: var(--muted);
  margin-left: 7px;
}
.chart-legend {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
}
.chart-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}
.chart {
  height: 192px;
  position: relative;
  padding: 5px 0 27px 38px;
}
.chart-grid {
  position: absolute;
  inset: 5px 0 27px 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.chart-grid div {
  width: 100%;
  border-top: 1px dashed #e9eef0;
  position: relative;
}
.chart-grid span {
  position: absolute;
  right: calc(100% + 11px);
  top: -8px;
  font-size: 9px;
  color: #9aa5af;
}
.chart-bars {
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 7px;
  position: relative;
  z-index: 1;
}
.chart-col {
  flex: 1;
  max-width: 48px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
}
.chart-bar {
  background: linear-gradient(
    to top,
    rgba(var(--accent-rgb), 0.65),
    rgba(var(--accent-rgb), 0.9)
  );
  border-radius: 4px 4px 1px 1px;
  min-height: 2px;
  transition: height 0.3s;
  width: 100%;
}
.chart-col:hover .chart-bar {
  background: var(--accent);
}
.chart-label {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: #9aa5af;
  white-space: nowrap;
}
.chart-empty {
  height: 200px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}
.model-bars {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.model-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  margin-bottom: 7px;
}
.model-bar-head b {
  font-weight: 500;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.model-bar-head span {
  color: var(--muted);
  white-space: nowrap;
}
.progress {
  height: 5px;
  background: #f0f4f5;
  border-radius: 4px;
  overflow: hidden;
}
.progress span {
  height: 100%;
  display: block;
  background: var(--accent);
  border-radius: 4px;
}
.quickstart {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px;
  margin-bottom: 24px;
  background: linear-gradient(100deg, #f0f8f5, #fff);
  border: 1px solid #dfeee8;
  border-radius: var(--radius);
}
.quickstart-icon {
  color: var(--accent);
  width: 43px;
  height: 43px;
  background: #e0f1ea;
  display: grid;
  place-items: center;
  border-radius: 12px;
}
.quickstart h3 {
  font-size: 14px;
  margin-bottom: 5px;
}
.quickstart p {
  color: var(--muted);
  font-size: 12px;
}
.quickstart > .actions {
  margin-left: auto;
  flex-shrink: 0;
}
.api-url {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f6f8fa;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 13px;
  margin-top: 15px;
  overflow: hidden;
}
.api-url code {
  flex: 1;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: 12px;
  color: #5a6e7b;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.search {
  position: relative;
  flex: 1;
  min-width: 180px;
  max-width: 350px;
}
.search svg {
  position: absolute;
  left: 12px;
  top: 11px;
  width: 16px;
  height: 16px;
  color: #95a1ac;
}
.search input {
  padding-left: 37px;
}
.input,
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #dfe6e9;
  border-radius: 7px;
  background: #fff;
  min-height: 39px;
  padding: 8px 12px;
  color: var(--ink);
  font-size: 12px;
  transition: border-color 0.15s;
}
.input::placeholder,
textarea::placeholder {
  color: #a6afb8;
}
.input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(var(--accent-rgb), 0.08);
  outline-offset: 0;
}
select {
  width: auto;
  min-width: 130px;
}
textarea {
  resize: vertical;
  min-height: 80px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}
.field label {
  font-size: 12px;
  font-weight: 550;
}
.field small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
}
.field .required {
  color: var(--danger);
  margin-left: 3px;
}
.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin: 16px 0;
}
.check-field input {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.form-error {
  font-size: 12px;
  color: var(--danger);
  background: #fff3f3;
  border: 1px solid #f6dedc;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 17px;
}
.form-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 14px;
}
.model-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 19px;
  margin-top: 23px;
}
.model-card {
  padding: 23px;
  display: flex;
  flex-direction: column;
}
.model-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 19px;
}
.model-logo {
  height: 38px;
  width: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafcfc;
  color: var(--accent);
}
.model-card h3 {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.model-provider {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.model-description {
  font-size: 11px;
  color: var(--muted);
  margin: 12px 0 20px;
  flex: 1;
  min-height: 35px;
}
.model-specs {
  display: flex;
  gap: 20px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.model-specs div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.model-specs span {
  font-size: 9px;
  color: var(--muted);
}
.model-specs strong {
  font-size: 12px;
  font-weight: 550;
}
.model-card .btn {
  align-self: flex-start;
}
.model-card .model-id {
  font-size: 10px;
  color: #a1aab2;
  overflow-wrap: anywhere;
  margin-top: 8px;
}
.models-count {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}
.settings-card {
  max-width: 720px;
}
.settings-card form {
  max-width: 430px;
}
.account-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}
.account-info dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.account-info dd {
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.footer {
  display: flex;
  justify-content: space-between;
  padding: 30px 0 5px;
  font-size: 10px;
  color: #9ca7b1;
}
.footer span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  background: #eaf3ef;
  padding: 55px max(45px, 10%);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.login-story .brand {
  padding: 0;
}
.login-story-body {
  margin: auto 0;
  z-index: 1;
  padding: 70px 0;
}
.login-story h1 {
  font-size: 44px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -1.5px;
  color: #244e44;
  margin-bottom: 24px;
}
.login-story p {
  color: #6c8c80;
  max-width: 360px;
  font-size: 13px;
  line-height: 2;
}
.login-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#3a7a6010 1px, transparent 1px),
    linear-gradient(90deg, #3a7a6010 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(transparent, #000);
}
.login-orbit {
  margin-top: 40px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.login-orbit span {
  font-size: 11px;
  color: #517d6e;
  border: 1px solid #cee2d7;
  border-radius: 6px;
  padding: 7px 12px;
  background: #f9fcfa80;
}
.login-story-footer {
  font-size: 10px;
  color: #78958a;
  z-index: 1;
}
.admin .login-story {
  background: #edf1f8;
}
.admin .login-story h1 {
  color: #334e75;
}
.admin .login-story p,
.admin .login-story-footer {
  color: #788aa5;
}
.admin .login-grid {
  background-image:
    linear-gradient(#3a507a10 1px, transparent 1px),
    linear-gradient(90deg, #3a507a10 1px, transparent 1px);
}
.admin .login-orbit span {
  border-color: #d4dded;
  color: #5e769e;
  background: #f9faff80;
}
.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px;
  background: #fff;
}
.login-box {
  width: 100%;
  max-width: 355px;
}
.login-box .eyebrow {
  margin-bottom: 14px;
}
.login-box h2 {
  font-size: 27px;
  margin-bottom: 8px;
}
.login-box > .subtext {
  margin-bottom: 35px;
}
.login-box .btn {
  margin-top: 5px;
  min-height: 43px;
}
.login-switch {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 25px;
}
.login-tag {
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 10px;
  color: var(--muted);
  margin-bottom: 23px;
}
.login-box .brand {
  display: none;
}
.login-state {
  padding: 15px 0;
  color: var(--muted);
  font-size: 12px;
}
.dialog {
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 25px 100px #1d354533;
  padding: 0;
  max-width: min(480px, calc(100vw - 32px));
  width: 480px;
  color: var(--ink);
  background: #fff;
}
.dialog::backdrop {
  background: #152c3e55;
  backdrop-filter: blur(3px);
}
.dialog-head {
  padding: 23px 25px 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  font-size: 17px;
}
.dialog-head .subtext {
  margin-top: 4px;
}
.dialog-body {
  padding: 23px 25px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
}
.credential {
  background: #f5f8fa;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 15px;
  margin-top: 15px;
}
.credential label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 5px;
}
.credential code {
  font-size: 12px;
  word-break: break-all;
  user-select: all;
  display: block;
  color: var(--ink);
  white-space: pre-wrap;
}
.credential-note {
  font-size: 12px;
  color: #8c793d;
  background: #fff9e9;
  border: 1px solid #f2e8c8;
  border-radius: 8px;
  padding: 12px 14px;
}
.dialog-icon {
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.drawer {
  margin: 0 0 0 auto;
  height: 100%;
  max-height: 100%;
  width: min(1050px, 100vw);
  max-width: 100vw;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  box-shadow: -15px 0 70px #20364c22;
}
.drawer::backdrop {
  background: #152c3e55;
  backdrop-filter: blur(2px);
}
.drawer > .dialog-head {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}
.drawer-body {
  padding: 25px;
}
.drawer .stat-grid {
  gap: 12px;
}
.drawer .stat-card {
  padding: 16px;
}
.drawer .stat-value {
  font-size: 24px;
}
.drawer .equal-col {
  gap: 16px;
}
.drawer .card-head {
  padding: 16px 20px;
}
.drawer .card-body {
  padding: 19px 20px;
}
.drawer-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.drawer .chart {
  height: 175px;
}
.drawer .section-gap {
  margin-top: 18px;
}
.drawer .two-col {
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.drawer .model-bar-head b {
  max-width: 170px;
}
.drawer-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.drawer-user .avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-size: 15px;
}
.drawer-tabs {
  display: flex;
  gap: 6px;
  overflow: auto;
  margin: 22px 0 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}
.tab {
  padding: 10px 13px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab.active {
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}
.detail-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}
.inline-form {
  display: flex;
  gap: 9px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.inline-form .field {
  flex: 1;
  min-width: 140px;
  margin-bottom: 0;
}
.inline-form .btn {
  min-height: 39px;
}
.upstream-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.toast-stack {
  position: fixed;
  bottom: 25px;
  right: 26px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(420px, calc(100vw - 36px));
}
.toast {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid #d9e6df;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 35px #1b3b4f19;
  padding: 13px 16px;
  font-size: 12px;
  color: var(--ink);
  animation: toast-in 0.2s ease-out;
}
.toast svg {
  width: 17px;
  height: 17px;
  color: var(--accent);
}
.toast.error {
  border-color: #efdada;
}
.toast.error svg {
  color: var(--danger);
}
.toast .icon-btn {
  width: 22px;
  height: 22px;
  margin-left: 10px;
}
@keyframes toast-in {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.danger-zone {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 22px;
}
.key-info {
  padding: 0 24px 20px;
}
.key-info p {
  font-size: 11px;
  color: var(--muted);
}
.data-count {
  font-size: 10px;
  color: var(--muted);
}
.mobile-text {
  display: none;
}
@media (min-width: 1600px) {
  .content {
    padding-top: 40px;
  }
  .stat-card {
    padding: 25px;
  }
  .stat-value {
    font-size: 32px;
  }
  .chart {
    height: 225px;
  }
  .model-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1200px) {
  :root {
    --sidebar: 215px;
  }
  .content {
    padding: 28px 25px 20px;
  }
  .topbar {
    padding: 0 25px;
  }
  .stat-grid {
    gap: 12px;
  }
  .stat-card {
    padding: 18px;
  }
  .stat-value {
    font-size: 25px;
  }
  .two-col {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 18px;
  }
  .card-head,
  .card-body {
    padding: 18px 20px;
  }
  .model-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quickstart {
    gap: 15px;
    padding: 20px;
  }
  .quickstart > .actions {
    max-width: 150px;
  }
  .brand {
    font-size: 17px;
  }
  .brand-sub {
    letter-spacing: 1.1px;
    font-size: 9px;
  }
}
@media (max-width: 960px) {
  :root {
    --sidebar: 200px;
  }
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .two-col,
  .equal-col {
    grid-template-columns: 1fr;
  }
  .environment {
    display: none;
  }
  .topbar {
    height: 68px;
  }
  .card-head {
    padding: 17px 20px;
  }
  .quickstart {
    align-items: flex-start;
  }
  .quickstart-icon {
    display: none;
  }
  .quickstart > .actions {
    max-width: none;
    align-self: center;
  }
  .chart {
    height: 210px;
  }
  .login-story {
    padding: 40px;
  }
  .login-story h1 {
    font-size: 35px;
  }
  .login-main {
    padding: 40px;
  }
  .profile-name {
    max-width: 100px;
  }
  .drawer .two-col,
  .drawer .equal-col {
    grid-template-columns: 1fr;
  }
  .drawer .stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .drawer .stat-value {
    font-size: 22px;
  }
}
@media (max-width: 720px) {
  :root {
    --sidebar: 240px;
  }
  .sidebar {
    transform: translateX(-100%);
    padding-top: 23px;
    box-shadow: 10px 0 35px #17384a15;
  }
  .nav-open .sidebar {
    transform: translateX(0);
  }
  .nav-open .mobile-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: #20364a55;
    z-index: 35;
  }
  .workspace {
    margin-left: 0;
  }
  .menu-toggle {
    display: flex;
    margin-right: 7px;
  }
  .topbar {
    padding: 0 17px;
    height: 63px;
  }
  .breadcrumb {
    gap: 8px;
    font-size: 11px;
  }
  .breadcrumb > span {
    display: none;
  }
  .topbar-left {
    display: flex;
    align-items: center;
  }
  .topbar-right {
    gap: 8px;
  }
  .profile {
    padding-left: 10px;
    gap: 8px;
  }
  .profile-name {
    max-width: 90px;
    font-size: 11px;
  }
  .profile-role {
    font-size: 9px;
  }
  .avatar {
    width: 30px;
    height: 30px;
  }
  .content {
    padding: 24px 17px 15px;
  }
  .page-heading {
    margin-bottom: 21px;
    align-items: flex-start;
    gap: 12px;
  }
  h1 {
    font-size: 23px;
  }
  .page-heading > .actions .btn {
    padding: 8px 10px;
    font-size: 11px;
  }
  .page-heading > .actions {
    padding-top: 7px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .stat-grid {
    gap: 11px;
    margin-bottom: 18px;
  }
  .stat-card {
    padding: 16px;
  }
  .stat-label {
    font-size: 11px;
  }
  .stat-icon {
    height: 27px;
    width: 27px;
  }
  .stat-value {
    font-size: 25px;
    margin: 10px 0 6px;
  }
  .stat-note {
    font-size: 9px;
  }
  .two-col,
  .equal-col {
    gap: 18px;
  }
  .section-gap {
    margin-top: 18px;
  }
  .card-head {
    padding: 16px 17px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .card-body {
    padding: 19px 17px;
  }
  .card-head h2 {
    font-size: 14px;
  }
  .card-head .subtext {
    font-size: 11px;
  }
  .card-foot {
    padding: 13px 17px;
    font-size: 10px;
  }
  th,
  td {
    padding: 13px 17px;
  }
  .chart-body {
    padding: 18px 16px 10px;
  }
  .chart {
    height: 185px;
  }
  .chart-summary {
    gap: 12px;
  }
  .chart-summary strong {
    font-size: 21px;
  }
  .chart-summary span {
    font-size: 10px;
  }
  .quickstart {
    display: block;
    padding: 18px;
  }
  .quickstart > .actions {
    margin: 15px 0 0;
  }
  .quickstart .actions .btn {
    font-size: 11px;
  }
  .quickstart p {
    font-size: 11px;
  }
  .footer {
    padding-top: 24px;
    font-size: 9px;
    gap: 12px;
  }
  .footer > span:last-child {
    display: none;
  }
  .model-grid {
    gap: 13px;
    margin-top: 18px;
  }
  .model-card {
    padding: 17px;
  }
  .model-card h3 {
    font-size: 13px;
  }
  .model-specs {
    gap: 12px;
  }
  .model-specs strong {
    font-size: 11px;
  }
  .model-specs span {
    font-size: 9px;
  }
  .model-description {
    font-size: 10px;
  }
  .model-card-top {
    margin-bottom: 15px;
  }
  .model-logo {
    width: 33px;
    height: 33px;
  }
  .model-logo svg {
    width: 18px;
    height: 18px;
  }
  .toolbar {
    gap: 9px;
  }
  .search {
    min-width: 160px;
    max-width: none;
  }
  .models-count {
    display: none;
  }
  .notice {
    font-size: 11px;
    align-items: flex-start;
    gap: 9px;
  }
  .notice .btn {
    padding: 5px 8px;
    font-size: 10px;
    min-height: 30px;
  }
  .login-page {
    display: flex;
    flex-direction: column;
  }
  .login-story {
    padding: 28px 25px;
    min-height: 240px;
  }
  .login-story-body {
    padding: 35px 0 8px;
  }
  .login-story h1 {
    font-size: 27px;
    line-height: 1.5;
    margin-bottom: 10px;
    letter-spacing: -0.7px;
  }
  .login-story h1 br {
    display: none;
  }
  .login-story p {
    font-size: 11px;
    max-width: 100%;
  }
  .login-orbit,
  .login-story-footer {
    display: none;
  }
  .login-main {
    padding: 35px 25px 50px;
  }
  .login-box {
    max-width: 400px;
  }
  .login-box > .subtext {
    margin-bottom: 25px;
  }
  .login-box h2 {
    font-size: 23px;
  }
  .login-tag {
    display: none;
  }
  .dialog-head {
    padding: 19px 20px 16px;
  }
  .dialog-body {
    padding: 20px;
  }
  .drawer-body {
    padding: 18px;
  }
  .drawer .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .drawer .stat-value {
    font-size: 24px;
  }
  .drawer > .dialog-head {
    padding: 18px;
  }
  .drawer-controls {
    gap: 7px;
  }
  .drawer-controls .btn {
    font-size: 11px;
    padding: 7px 11px;
  }
  .drawer-tabs {
    margin-top: 19px;
  }
  .tab {
    padding: 10px;
  }
  .account-info {
    gap: 16px;
  }
  .card-head .toolbar {
    width: 100%;
  }
  .card-head .toolbar .search {
    max-width: none;
  }
  .toast-stack {
    bottom: 18px;
    right: 18px;
  }
  .toast {
    padding: 11px 13px;
  }
  .field-row {
    gap: 12px;
  }
  .inline-form {
    align-items: stretch;
  }
  .inline-form .btn {
    align-self: flex-end;
  }
  .toolbar select {
    min-width: 100px;
  }
  .mobile-text {
    display: inline;
  }
  .desktop-text {
    display: none;
  }
}
@media (max-width: 400px) {
  .model-grid {
    grid-template-columns: 1fr;
  }
  .stat-value {
    font-size: 22px;
  }
  .stat-card {
    padding: 13px;
  }
  .stat-icon {
    display: none;
  }
  .profile-name {
    max-width: 65px;
  }
  .profile-role {
    display: none;
  }
  .page-heading > .actions .btn {
    gap: 5px;
  }
  .page-heading > .actions .btn svg {
    display: none;
  }
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .chart-label {
    font-size: 8px;
  }
}
/* Additional portal controls. */
.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrap .input {
  padding-right: 44px;
}
.password-wrap .icon-btn {
  position: absolute;
  right: 3px;
  width: 34px;
  height: 34px;
}
.stack {
  display: grid;
  gap: 24px;
}
.strong {
  font-weight: 550;
  color: var(--ink);
}
.truncate {
  display: inline-block;
  vertical-align: middle;
}
.positive {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.negative {
  color: var(--danger);
  font-variant-numeric: tabular-nums;
}
.code-block {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f6f9fa;
  overflow: auto;
}
.code-block pre {
  margin: 0;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.85;
  color: #476071;
}
.notice.warning {
  border-color: #f1dfb9;
  background: #fff9ed;
  color: #8e713b;
}
.dialog {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.drawer {
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.drawer .chart-label {
  font-size: 8px;
}
.drawer .stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.toolbar > label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
}
.toolbar > label .input {
  width: auto;
  min-width: 130px;
}
.chart-legend {
  white-space: nowrap;
}
.model-specs {
  flex-wrap: wrap;
}
.stat-value {
  overflow-wrap: anywhere;
}
.sidebar {
  overflow-y: auto;
}
.brand {
  flex-shrink: 0;
}
.page-heading h1 {
  overflow-wrap: anywhere;
}
.login-story > .brand {
  position: relative;
  z-index: 1;
}
.content:focus {
  outline: none;
}
.nav-open {
  overflow: hidden;
}
@media (max-width: 720px) {
  .page-heading {
    flex-wrap: wrap;
  }
  .page-heading > .actions {
    padding-top: 0;
  }
  .model-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .model-specs {
    gap: 10px;
  }
  .model-specs > div:last-child {
    flex-basis: 100%;
  }
  .chart-col:nth-child(even) .chart-label {
    display: none;
  }
  .login-story .eyebrow {
    font-size: 8px;
  }
  .stack {
    gap: 18px;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
  .card-foot {
    flex-wrap: wrap;
  }
  .drawer-controls {
    flex-wrap: wrap;
  }
  .topbar .actions {
    flex-wrap: nowrap;
  }
  .stat-note {
    overflow-wrap: anywhere;
  }
  .footer {
    clear: both;
  }
}
@media (max-width: 400px) {
  .model-grid {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    gap: 9px;
  }
  .stat-value {
    font-size: 21px;
  }
  .chart-label {
    font-size: 8px;
  }
  .login-main {
    padding-inline: 22px;
  }
  .login-story {
    padding-inline: 22px;
  }
  .topbar-right {
    gap: 2px;
  }
  .breadcrumb svg {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
