/* Noumena Eval · 清朗工程工作台
 * 浅色优先、中文优先、无构建依赖。语义色只用于状态，强调色只用于操作与导航。
 */

:root {
  --canvas: #F7F8FA;
  --surface: #FFFFFF;
  --surface-soft: #FBFCFD;
  --surface-tint: #F3F5F9;
  --line: #E5E7EB;
  --line-soft: #EEF0F4;
  --line-strong: #D6DAE2;
  --ink: #111827;
  --ink-2: #4B5563;
  --ink-3: #6B7280;
  --ink-4: #9CA3AF;
  --cobalt: #1D4ED8;
  --cobalt-deep: #1E40AF;
  --cobalt-tint: #EEF2FF;
  --cobalt-line: #C7D2FE;
  --emerald: #047857;
  --emerald-tint: #ECFDF5;
  --emerald-line: #A7F3D0;
  --amber: #B45309;
  --amber-tint: #FFFBEB;
  --amber-line: #FDE68A;
  --crimson: #BE123C;
  --crimson-tint: #FFF1F2;
  --crimson-line: #FECDD3;
  --slate: #475569;
  --slate-tint: #F1F5F9;
  --slate-line: #E2E8F0;
  --radius: 14px;
  --radius-small: 8px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.035);
  --shadow-pop: 0 18px 50px rgba(15, 23, 42, 0.16);
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Menlo,
    Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.has-drawer,
body.has-modal {
  overflow: hidden;
}

::selection {
  background: var(--cobalt-tint);
  color: var(--cobalt-deep);
}

a {
  color: var(--cobalt);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

code,
.mono {
  font-family: var(--mono);
}

code {
  font-size: 0.92em;
}

.page-wash {
  position: fixed;
  inset: 0 0 auto;
  z-index: 0;
  height: 420px;
  pointer-events: none;
  background:
    radial-gradient(900px 380px at 10% -12%, rgba(29, 78, 216, 0.06), transparent 62%),
    radial-gradient(700px 320px at 94% -6%, rgba(4, 120, 87, 0.035), transparent 58%);
}

.muted {
  color: var(--ink-3);
}

.danger-text {
  color: var(--crimson) !important;
}

.mono {
  font-variant-ligatures: none;
}

:focus-visible {
  outline: 2px solid rgba(29, 78, 216, 0.45);
  outline-offset: 2px;
}

/* -------------------------------------------------------------------- boot */
.boot-screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
}

.boot-mark {
  width: 44px;
  height: 44px;
}

.boot-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.boot-text {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 14px;
}

.boot-detail {
  max-width: 420px;
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ signin */
.signin {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
}

.signin::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17, 24, 39, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.026) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 38%, black, transparent 72%);
}

.signin-card {
  position: relative;
  width: min(452px, 100%);
  padding: 42px 40px 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 24px 70px rgba(16, 24, 40, 0.08);
  text-align: center;
}

.signin-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.signin-brand .brand-mark {
  width: 34px;
  height: 34px;
}

.signin h1 {
  margin: 28px 0 6px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

.signin-sub {
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
}

.auth-banner {
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
  font-size: 13px;
  line-height: 1.65;
}

.auth-banner p {
  margin: 0;
}

.auth-banner code {
  padding: 1px 5px;
  border: 1px solid var(--cobalt-line);
  border-radius: 4px;
  background: var(--cobalt-tint);
  color: var(--cobalt-deep);
  font-size: 12px;
}

.auth-banner.is-danger {
  border-color: var(--crimson-line);
  background: var(--crimson-tint);
  color: #881337;
}

.auth-banner.is-danger code {
  border-color: var(--crimson-line);
  background: #ffe4e6;
  color: #9f1239;
}

.auth-banner.is-warning {
  border-color: var(--amber-line);
  background: var(--amber-tint);
  color: #92400e;
}

.auth-banner.is-info {
  border-color: var(--cobalt-line);
  background: var(--cobalt-tint);
  color: var(--cobalt-deep);
}

.signin-actions {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.signin-note {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
}

.signin-foot {
  margin: 30px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-3);
  font-size: 12px;
}

.dev-token {
  display: grid;
  gap: 9px;
  text-align: left;
}

.dev-token label,
.field label {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
}

/* ------------------------------------------------------------------ shell */
.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 62px;
  padding: 0 max(28px, calc((100vw - 1240px) / 2 + 28px));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
}

.brand-name {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.tabs {
  display: flex;
  align-self: stretch;
  gap: 2px;
  margin: 0 auto;
}

.tabs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  color: var(--ink-3);
  font-size: 14px;
  white-space: nowrap;
}

.tabs a:hover {
  color: var(--ink);
  background: var(--surface-soft);
  text-decoration: none;
}

.tabs a.active {
  color: var(--ink);
  font-weight: 550;
}

.tabs a.active::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: -1px;
  left: 16px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--cobalt);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 190px;
  padding: 3px 10px 3px 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--cobalt-tint);
  color: var(--cobalt-deep);
  font-size: 13px;
  font-weight: 600;
}

.user-name {
  overflow: hidden;
  color: var(--ink-2);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner {
  width: calc(100% - 56px);
  max-width: 1184px;
  margin: 16px auto 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
}

.banner.is-danger {
  border-color: var(--crimson-line);
  background: var(--crimson-tint);
  color: #881337;
}

.banner.is-warning {
  border-color: var(--amber-line);
  background: var(--amber-tint);
  color: #92400e;
}

.banner.is-info {
  border-color: var(--cobalt-line);
  background: var(--cobalt-tint);
  color: var(--cobalt-deep);
}

.banner-msg {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.main {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 28px 56px;
  flex: 1;
}

/* ----------------------------------------------------------------- buttons */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease;
}

.btn:hover {
  border-color: #c4cbd6;
  background: var(--surface-tint);
  color: var(--ink);
  text-decoration: none;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.btn.small {
  min-height: 30px;
  padding: 0 11px;
  font-size: 12.5px;
}

.btn.primary {
  border-color: var(--cobalt);
  background: var(--cobalt);
  color: #fff;
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.18);
}

.btn.primary:hover {
  border-color: var(--cobalt-deep);
  background: var(--cobalt-deep);
  color: #fff;
}

.btn.subtle {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink-2);
}

.btn.subtle:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--ink);
}

.btn.danger {
  border-color: var(--crimson);
  background: var(--crimson);
  color: #fff;
}

.btn.danger:hover {
  border-color: #9f1239;
  background: #9f1239;
  color: #fff;
}

.btn.danger-outline {
  border-color: var(--crimson-line);
  background: var(--surface);
  color: var(--crimson);
}

.btn.danger-outline:hover {
  border-color: #fda4af;
  background: var(--crimson-tint);
  color: #9f1239;
}

.btn.warning {
  border-color: var(--amber);
  background: var(--amber);
  color: #fff;
}

.btn.warning:hover {
  border-color: #92400e;
  background: #92400e;
  color: #fff;
}

.btn.block {
  width: 100%;
  min-height: 44px;
  font-size: 14px;
}

.btn.copied {
  border-color: var(--emerald-line);
  background: var(--emerald-tint);
  color: var(--emerald);
}

.btn.danger-text {
  color: var(--ink-2);
}

.btn.danger-text:hover {
  border-color: var(--crimson-line);
  background: var(--crimson-tint);
  color: var(--crimson);
}

.btn-icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.text-link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: none;
  color: var(--cobalt);
  font-family: var(--sans);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.text-link:hover {
  color: var(--cobalt-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.back-link {
  margin-bottom: 10px;
  color: var(--ink-3);
  font-size: 12.5px;
}

.back-link:hover {
  color: var(--cobalt);
}

.copy-button {
  appearance: none;
  padding: 2px 5px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--cobalt);
  font-size: 11px;
  line-height: 1.4;
  cursor: pointer;
}

.copy-button:hover {
  border-color: var(--cobalt-line);
  background: var(--cobalt-tint);
}

.copy-button.copied {
  color: var(--emerald);
  border-color: var(--emerald-line);
  background: var(--emerald-tint);
}

.artifact-link {
  appearance: none;
  display: inline;
  margin-top: 4px;
  padding: 0;
  border: none;
  background: none;
  color: var(--cobalt);
  font-family: var(--mono);
  font-size: 11.5px;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: pointer;
}

.artifact-link:hover {
  color: var(--cobalt-deep);
  text-decoration: underline;
}

/* ------------------------------------------------------------------ inputs */
.input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  outline: none;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.input::placeholder {
  color: var(--ink-4);
}

.input:focus {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

select.input {
  appearance: auto;
  padding-right: 8px;
  cursor: pointer;
}

.hint {
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
}

/* ------------------------------------------------------------------- views */
.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.view-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}

.view-sub {
  margin: 5px 0 0;
  color: var(--ink-3);
  font-size: 13px;
}

.view-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stamp {
  color: var(--ink-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 72px 20px;
  color: var(--ink-3);
  font-size: 13px;
}

.spinner {
  width: 15px;
  height: 15px;
  flex: none;
  border: 2px solid var(--line);
  border-top-color: var(--cobalt);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ------------------------------------------------------------------ metrics */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.metric {
  min-width: 0;
  padding: 22px 24px 20px;
  border-left: 1px solid var(--line-soft);
}

.metric:first-child {
  border-left: none;
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
}

.metric-label::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 1.5px;
  background: var(--cobalt);
  opacity: 0.8;
}

.metric-value {
  margin: 8px 0 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 32px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.metric-sub {
  margin: 6px 0 0;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.55;
}

/* ------------------------------------------------------------------- panels */
.panel {
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}

.panel-title {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.panel-sub {
  margin: 3px 0 0;
  color: var(--ink-3);
  font-size: 12px;
}

.panel-body {
  padding: 20px 22px;
}

.panel-body.flush {
  padding: 0;
}

.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 22px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface-soft);
  color: var(--ink-3);
  font-size: 12px;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 20px;
  align-items: start;
}

.overview-grid .panel {
  margin-bottom: 0;
}

/* ------------------------------------------------------------------- badges */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 0 9px;
  border: 1px solid var(--slate-line);
  border-radius: 999px;
  background: var(--slate-tint);
  color: var(--slate);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.pill-dot {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}

.pill.is-success {
  border-color: var(--emerald-line);
  background: var(--emerald-tint);
  color: var(--emerald);
}

.pill.is-running {
  border-color: var(--cobalt-line);
  background: var(--cobalt-tint);
  color: var(--cobalt);
}

.pill.is-running .pill-dot {
  animation: pulse 1.6s ease-in-out infinite;
}

.pill.is-warning {
  border-color: var(--amber-line);
  background: var(--amber-tint);
  color: var(--amber);
}

.pill.is-danger {
  border-color: var(--crimson-line);
  background: var(--crimson-tint);
  color: var(--crimson);
}

.pill.is-neutral,
.pill.is-info {
  border-color: var(--slate-line);
  background: var(--slate-tint);
  color: var(--slate);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.kind-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--cobalt-line);
  border-radius: 6px;
  background: var(--cobalt-tint);
  color: var(--cobalt-deep);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.kind-verify {
  border-color: var(--slate-line);
  background: var(--slate-tint);
  color: var(--slate);
}

.kind-selfcheck {
  border-color: var(--amber-line);
  background: var(--amber-tint);
  color: var(--amber);
}

.kind-neutral {
  border-color: var(--line);
  background: var(--surface-tint);
  color: var(--ink-3);
}

.count-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-tint);
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.meta-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--ink-3);
  font-size: 12px;
  white-space: nowrap;
}

.meta-chip b {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------- meter */
.meter {
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f4;
}

.meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--cobalt);
  transition: width 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.meter.warm > span {
  background: #d97706;
}

.meter.success > span {
  background: var(--emerald);
}

.meter.muted > span {
  background: var(--slate);
}

.meter.hot > span {
  background: var(--crimson);
}

/* ---------------------------------------------------------------- channels */
.channel-list {
  display: grid;
}

.channel-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.85fr) minmax(210px, 1.15fr);
  align-items: center;
  gap: 20px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.channel-row:last-child {
  border-bottom: none;
}

.channel-name-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex-wrap: wrap;
}

.channel-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-load .meter {
  margin-bottom: 8px;
}

.channel-numbers {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--ink-3);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.channel-numbers b {
  color: var(--ink);
  font-weight: 600;
}

.recent-list {
  display: grid;
}

.recent-row {
  appearance: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 22px;
  border: none;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.recent-row:last-child {
  border-bottom: none;
}

.recent-row:hover {
  background: #fafbfd;
}

.recent-main {
  min-width: 0;
}

.recent-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.recent-id {
  color: var(--ink);
  font-size: 12.5px;
}

.recent-meta {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 11.5px;
}

.recent-meter {
  width: 84px;
}

.recent-row .pill {
  justify-self: end;
}

/* ------------------------------------------------------------------ tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

table.data thead th {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-align: left;
  white-space: nowrap;
}

table.data tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-2);
  vertical-align: top;
}

table.data tbody tr:last-child td {
  border-bottom: none;
}

table.data tbody tr:hover {
  background: #fafbfd;
}

table.data .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

table.data .nowrap {
  white-space: nowrap;
}

table.data th.num {
  text-align: right;
}

.job-table {
  min-width: 860px;
}

.job-row,
.clickable-row {
  cursor: pointer;
}

.job-row.is-expanded {
  background: #f8faff;
}

.job-row.is-expanded td:first-child {
  box-shadow: inset 3px 0 0 var(--cobalt);
}

.row-infra {
  background: #fff7f8;
}

.row-infra td:first-child {
  box-shadow: inset 3px 0 0 var(--crimson);
}

.id-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.id-text {
  color: var(--ink);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.id-link {
  appearance: none;
  display: inline;
  padding: 0;
  border: none;
  background: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: inherit;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.id-link:hover {
  color: var(--cobalt);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cell-sub {
  display: block;
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.progress-cell {
  min-width: 148px;
}

.progress-cell .meter {
  margin-bottom: 7px;
}

.time-cell {
  color: var(--ink-2);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cost-cell {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.env-name {
  color: var(--ink);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 22px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.pager > span {
  margin-right: auto;
}

/* ----------------------------------------------------------------- filters */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-soft);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}

.filter-label {
  margin-right: 4px;
  color: var(--ink-3);
  font-size: 12px;
  white-space: nowrap;
}

.filter-chip {
  appearance: none;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}

.filter-chip:hover {
  background: var(--surface);
  color: var(--ink);
}

.filter-chip.active {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--cobalt);
  font-weight: 550;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.filter-divider {
  width: 1px;
  height: 20px;
  background: var(--line);
}

.filter-count {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* --------------------------------------------------------------- job detail */
.job-detail {
  scroll-margin-top: 84px;
}

.job-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  padding: 22px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, #fcfdff, var(--surface));
}

.job-head-main {
  min-width: 0;
}

.job-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.job-title-row h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.job-meta {
  margin: 7px 0 0;
  color: var(--ink-3);
  font-size: 12px;
}

.job-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.job-facts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.action-hint {
  margin: 0;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-soft);
  color: var(--ink-3);
  font-size: 12px;
}

.notice {
  margin: 18px 22px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  font-size: 13px;
}

.notice.is-info {
  border-color: var(--cobalt-line);
  background: var(--cobalt-tint);
  color: var(--cobalt-deep);
}

.notice.is-warning {
  border-color: var(--amber-line);
  background: var(--amber-tint);
  color: #92400e;
}

.panel-body > .notice {
  margin: 0 0 16px;
}

.notice strong {
  display: block;
  margin-bottom: 3px;
  font-weight: 600;
}

.notice p {
  margin: 0;
  color: var(--ink-2);
}

.detail-section {
  padding: 20px 22px 8px;
}

.detail-section:last-child {
  padding-bottom: 22px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.section-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.section-head p {
  margin: 3px 0 0;
  color: var(--ink-3);
  font-size: 12px;
}

.score-legend {
  display: flex;
  align-items: center;
  gap: 8px 18px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink-3);
  font-size: 12px;
}

.score-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
}

.legend-dot.is-success {
  background: var(--emerald);
}

.legend-dot.is-neutral {
  background: var(--ink-4);
}

.legend-dot.is-danger {
  background: var(--crimson);
}

.reward-cell {
  min-width: 118px;
}

.reward-value {
  display: block;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.reward-value.is-success {
  color: var(--emerald);
}

.reward-value.is-zero {
  color: var(--ink);
}

.reward-value.is-danger {
  color: var(--crimson);
}

.reward-note {
  display: block;
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.45;
  white-space: nowrap;
}

.reward-note.is-danger {
  color: var(--crimson);
  font-weight: 500;
}

.error-line {
  min-width: 180px;
}

.error-label {
  color: var(--crimson);
  font-size: 12.5px;
  font-weight: 500;
}

.code-inline {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-tint);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10.5px;
  vertical-align: 1px;
}

.error-hint {
  margin: 4px 0 0;
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.5;
}

.error-detail {
  display: -webkit-box;
  max-width: 420px;
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.detail-prefix {
  color: var(--ink-3);
}

/* -------------------------------------------------------------- empty/error */
.empty {
  padding: 42px 20px;
  text-align: center;
}

.empty-title {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}

.empty-body {
  max-width: 440px;
  margin: 6px auto 0;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.6;
}

.error-panel {
  padding: 22px;
}

.error-panel h2,
.error-panel h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.error-panel p {
  margin: 0 0 8px;
  color: var(--ink-3);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.error-panel.compact {
  padding: 16px;
  border: 1px solid var(--crimson-line);
  border-radius: 10px;
  background: var(--crimson-tint);
}

.error-panel.compact h3 {
  font-size: 14px;
}

.tech-note {
  color: var(--ink-3);
  font-size: 11.5px;
  overflow-wrap: anywhere;
}

.tech-note .mono {
  color: var(--ink-2);
}

.inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* -------------------------------------------------------------- environment */
.env-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 20px;
  align-items: start;
}

.env-grid .panel {
  margin-bottom: 0;
}

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

.tool-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.tool-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tool-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.tool-head p {
  margin: 3px 0 0;
  color: var(--ink-3);
  font-size: 12px;
}

.fact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 15px 0 0;
}

.fact-list div {
  min-width: 0;
}

.fact-list dt {
  color: var(--ink-3);
  font-size: 11.5px;
}

.fact-list dd {
  margin: 1px 0 0;
  color: var(--ink-2);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.image-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
}

.strip-label {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-3);
  font-size: 11.5px;
}

.image-strip code,
.image-strip span {
  color: var(--ink-2);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.env-footnote {
  margin: 13px 0 0;
  color: var(--ink-3);
  font-size: 12px;
}

.harness-table {
  min-width: 560px;
}

/* ----------------------------------------------------------------- connect */
.connect-card {
  margin-bottom: 20px;
}

.pat-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.field {
  display: grid;
  gap: 6px;
}

.field-grow {
  flex: 1;
  min-width: 230px;
}

.form-hint {
  margin: 10px 0 0;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.6;
}

.token-table {
  min-width: 720px;
}

.token-name {
  color: var(--ink);
  font-weight: 500;
}

.token-reveal {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--cobalt-line);
  border-radius: 12px;
  background: linear-gradient(180deg, #f8faff, var(--surface));
}

.token-reveal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.token-reveal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.token-reveal-title strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.token-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.token-value {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}

.token-warning {
  margin: 11px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--amber-line);
  border-radius: 6px;
  background: var(--amber-tint);
  color: #92400e;
  font-size: 12.5px;
}

.token-reveal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
}

.check input {
  accent-color: var(--cobalt);
}

.setup-list {
  display: grid;
}

.setup-step {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
}

.setup-step:first-child {
  padding-top: 2px;
}

.setup-step:last-child {
  padding-bottom: 2px;
  border-bottom: none;
}

.step-number {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border: 1px solid var(--cobalt-line);
  border-radius: 50%;
  background: var(--cobalt-tint);
  color: var(--cobalt);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
}

.step-body {
  flex: 1;
  min-width: 0;
}

.step-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.step-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.step-head span {
  color: var(--ink-3);
  font-size: 12px;
}

.command-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 10px;
}

.command-block {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #1f2937;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre;
}

.command-row .btn {
  align-self: center;
}

.mcp-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.mcp-tab {
  appearance: none;
  padding: 9px 14px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.mcp-tab:hover {
  color: var(--ink);
}

.mcp-tab.active {
  border-bottom-color: var(--cobalt);
  color: var(--cobalt);
  font-weight: 550;
}

.config-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.config-file {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-tint);
  color: var(--ink-2);
  font-size: 11.5px;
  white-space: nowrap;
}

.config-block {
  max-height: 460px;
  margin: 0;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  color: #1f2937;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  tab-size: 2;
  white-space: pre;
}

.config-block code {
  font: inherit;
}

/* ------------------------------------------------------------------ drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(2px);
  animation: fade-in 140ms ease;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  width: min(760px, 96vw);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -20px 0 60px rgba(15, 23, 42, 0.12);
  animation: slide-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slide-in {
  from {
    transform: translateX(28px);
    opacity: 0.5;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcfe, var(--surface));
}

.drawer-head-main {
  min-width: 0;
}

.drawer-kicker {
  margin: 0 0 4px;
  color: var(--cobalt);
  font-size: 12px;
}

.drawer-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}

.drawer-entity {
  margin: 4px 0 0;
  color: var(--ink-3);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.drawer-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.drawer-close {
  appearance: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-3);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.drawer-close:hover {
  background: var(--surface-tint);
  color: var(--ink);
}

.drawer-body {
  flex: 1;
  padding: 18px 24px 32px;
  overflow: auto;
}

.drawer-foot {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink-3);
  font-size: 11.5px;
}

.drawer-foot .mono {
  max-width: 80%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-foot-hint {
  margin-left: auto;
  white-space: nowrap;
}

.file-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.file-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 11.5px;
  cursor: pointer;
}

.file-pill span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-pill span:last-child {
  color: var(--ink-3);
  font-size: 11px;
}

.file-pill:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.file-pill.active {
  border-color: var(--cobalt-line);
  background: var(--cobalt-tint);
  color: var(--cobalt-deep);
}

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

.log-toolbar .log-meta {
  margin-right: auto;
}

.log-meta {
  color: var(--ink-3);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.segmented {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.segmented button {
  appearance: none;
  padding: 6px 10px;
  border: none;
  border-right: 1px solid var(--line-soft);
  background: transparent;
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.segmented button:last-child {
  border-right: none;
}

.segmented button:hover {
  background: var(--surface);
  color: var(--ink);
}

.segmented button.active {
  background: var(--surface);
  color: var(--cobalt);
  box-shadow: inset 0 -2px 0 var(--cobalt);
}

.log-viewer {
  max-height: calc(100vh - 340px);
  min-height: 220px;
  padding: 10px 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfd;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
}

.log-line {
  display: flex;
  gap: 14px;
  padding: 0 14px;
}

.log-line:hover {
  background: #f1f5f9;
}

.log-ln {
  width: 44px;
  flex: none;
  color: var(--ink-4);
  text-align: right;
  user-select: none;
}

.log-text {
  min-width: 0;
  color: #334155;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.log-line.is-error .log-text {
  color: var(--crimson);
}

.log-line.is-warn .log-text {
  color: var(--amber);
}

/* ------------------------------------------------------------------- modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(2px);
  animation: fade-in 120ms ease;
}

.modal {
  width: min(480px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-pop);
}

.modal-title {
  margin: 0;
  padding: 20px 22px 10px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.modal-body {
  padding: 0 22px 20px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.modal-body code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-tint);
  color: var(--ink);
  font-size: 12px;
}

.modal-body strong {
  color: var(--ink);
  font-weight: 600;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface-soft);
}

/* ------------------------------------------------------------------- toast */
.toast-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: grid;
  gap: 10px;
  width: min(370px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--cobalt);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.14);
  animation: toast-in 160ms ease;
  pointer-events: auto;
}

.toast.is-success {
  border-left-color: var(--emerald);
}

.toast.is-danger {
  border-left-color: var(--crimson);
}

.toast.is-warning {
  border-left-color: var(--amber);
}

.toast.is-info {
  border-left-color: var(--cobalt);
}

.toast-title {
  margin: 0;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
}

.toast-body {
  margin: 2px 0 0;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

@keyframes toast-in {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ------------------------------------------------------------------ footer */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 28px 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12px;
}

.footer-note {
  color: var(--ink-4);
}

/* --------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric:nth-child(3) {
    border-top: 1px solid var(--line-soft);
    border-left: none;
  }

  .metric:nth-child(4) {
    border-top: 1px solid var(--line-soft);
  }

  .overview-grid,
  .env-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px 20px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .tabs {
    order: 3;
    width: 100%;
    height: 44px;
    margin: 0;
  }

  .tabs a {
    flex: 1;
    justify-content: center;
    padding: 0 8px;
  }

  .tabs a.active::after {
    right: 18%;
    left: 18%;
  }

  .topbar-right {
    margin-left: auto;
  }

  .job-detail {
    scroll-margin-top: 122px;
  }
}

@media (max-width: 820px) {
  .main {
    padding: 24px 18px 42px;
  }

  .topbar {
    padding-right: 18px;
    padding-left: 18px;
  }

  .brand-name {
    font-size: 14px;
  }

  .user-chip {
    max-width: 150px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .image-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .channel-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .recent-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .recent-meter {
    display: none;
  }

  .job-detail-head {
    flex-direction: column;
  }

  .job-actions {
    width: 100%;
  }

  .filter-divider {
    display: none;
  }

  .filter-count {
    margin-left: 0;
  }

  .signin-card {
    padding: 34px 24px 24px;
  }
}

@media (max-width: 620px) {
  .topbar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .topbar-right {
    gap: 6px;
  }

  .user-chip {
    max-width: 96px;
    padding-right: 7px;
  }

  .user-name {
    font-size: 12px;
  }

  .topbar-right .btn {
    padding: 0 10px;
  }

  .metric-strip {
    grid-template-columns: 1fr;
  }

  .metric,
  .metric:nth-child(4) {
    border-top: 1px solid var(--line-soft);
    border-left: none;
  }

  .metric:first-child {
    border-top: none;
  }

  .metric-value {
    font-size: 29px;
  }

  .view-head {
    align-items: flex-start;
  }

  .view-actions {
    width: 100%;
  }

  .panel-head,
  .panel-body,
  .filter-bar,
  .job-detail-head,
  .job-facts,
  .action-hint,
  .detail-section {
    padding-right: 16px;
    padding-left: 16px;
  }

  .panel-foot,
  .pager {
    padding-right: 16px;
    padding-left: 16px;
  }

  .channel-row,
  .recent-row {
    padding-right: 16px;
    padding-left: 16px;
  }

  .section-head {
    align-items: flex-start;
  }

  .token-line {
    flex-direction: column;
    align-items: stretch;
  }

  .token-value {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .command-row {
    flex-direction: column;
  }

  .command-row .btn {
    align-self: flex-start;
  }

  .drawer {
    width: 100vw;
    border-left: none;
  }

  .drawer-head,
  .drawer-body,
  .drawer-foot {
    padding-right: 16px;
    padding-left: 16px;
  }

  .segmented {
    flex-wrap: wrap;
  }

  .log-viewer {
    max-height: calc(100vh - 390px);
  }

  .toast-root {
    right: 16px;
    bottom: 16px;
  }

  .banner {
    width: calc(100% - 36px);
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 18px 24px;
  }

  .signin-card {
    padding: 30px 20px 22px;
  }

  .signin h1 {
    font-size: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
