:root {
  --bg: #071116;
  --bg-soft: #0d171d;
  --bg-elevated: #101b22;
  --panel: rgba(15, 24, 31, 0.82);
  --panel-strong: rgba(18, 30, 38, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.05);
  --panel-muted: rgba(255, 255, 255, 0.03);
  --text: #edf4ea;
  --text-strong: #ffffff;
  --muted: rgba(225, 235, 229, 0.72);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --signal: #d9ff63;
  --signal-strong: #efff9f;
  --signal-soft: rgba(217, 255, 99, 0.14);
  --danger: #ff7a68;
  --danger-soft: rgba(255, 122, 104, 0.14);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 16px 42px rgba(0, 0, 0, 0.22);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --container: min(1240px, calc(100vw - 48px));
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(217, 255, 99, 0.15), transparent 20%),
    radial-gradient(circle at right 15%, rgba(126, 214, 140, 0.08), transparent 22%),
    linear-gradient(180deg, #081116 0%, #0b141b 48%, #101b22 100%);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(217, 255, 99, 0.11), transparent 26%),
    radial-gradient(circle at 80% 24%, rgba(58, 110, 86, 0.12), transparent 24%),
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.02) 100%);
  z-index: -1;
}

.shell-frame {
  width: var(--container);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 16px;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 35%),
    linear-gradient(135deg, #d9ff63, #9ebf39);
  color: #0a1216;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 12px 32px rgba(0, 0, 0, 0.18);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong,
.site-nav a,
.nav-button,
h1,
h2,
h3,
.status-pill,
.primary-button,
.ghost-button {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
}

.brand-copy strong {
  color: var(--text-strong);
}

.brand-copy span {
  color: var(--muted);
  font-size: 14px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(8, 17, 22, 0.6);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.site-nav a,
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  transition:
    transform var(--transition),
    color var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.site-nav a:hover,
.nav-button:hover {
  transform: translateY(-1px);
  color: var(--text-strong);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.page {
  padding: 12px 0 64px;
}

.console-shell,
.workspace-shell,
.landing-stage,
.tool-layout,
.job-layout,
.invite-layout,
.admin-layout {
  display: grid;
  gap: 26px;
}

.landing-stage,
.invite-layout {
  grid-template-columns: minmax(0, 1.28fr) minmax(360px, 0.72fr);
  align-items: stretch;
  min-height: calc(100svh - 122px);
}

.page-hero,
.brand-command,
.auth-panel,
.tool-form-panel,
.side-panel,
.job-block,
.narrow-panel,
.tool-card,
.table-shell,
.status-banner,
.job-meta-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.page-hero,
.brand-command,
.auth-panel,
.tool-form-panel,
.side-panel,
.job-block,
.narrow-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.page-hero::before,
.brand-command::before,
.auth-panel::before,
.tool-form-panel::before,
.side-panel::before,
.job-block::before,
.narrow-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 20%),
    radial-gradient(circle at top left, rgba(217, 255, 99, 0.08), transparent 30%);
}

.brand-command,
.auth-panel,
.tool-form-panel,
.side-panel,
.job-block,
.narrow-panel,
.page-hero {
  padding: 28px;
}

.brand-command {
  display: grid;
  align-content: end;
  gap: 18px;
  min-height: 100%;
  background:
    radial-gradient(circle at 18% 16%, rgba(217, 255, 99, 0.14), transparent 28%),
    linear-gradient(145deg, rgba(11, 20, 25, 0.98), rgba(17, 29, 36, 0.92));
}

.landing-intro {
  align-content: start;
}

.auth-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  background:
    radial-gradient(circle at top right, rgba(217, 255, 99, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(14, 23, 29, 0.95), rgba(15, 23, 29, 0.92));
}

.workspace-section,
.section-block,
.service-directory,
.tool-registry {
  display: grid;
  gap: 18px;
}

.service-directory {
  padding-top: 4px;
}

.section-header {
  display: grid;
  gap: 10px;
}

.section-copy {
  display: grid;
  gap: 8px;
}

.eyebrow {
  margin: 0;
  color: rgba(217, 255, 99, 0.82);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 0.98;
  color: var(--text-strong);
}

h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.06;
  color: var(--text-strong);
}

h3 {
  font-size: 18px;
  line-height: 1.15;
  color: var(--text-strong);
}

.hero-lead,
.section-copy p,
.tool-main p,
.muted,
.kpi-card p,
.job-meta-card p,
.plain-list,
.event-item span,
.export-link span {
  color: var(--muted);
  line-height: 1.7;
}

.hero-signal-list,
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.hero-signal-list span,
.hero-points li {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(340px, 0.78fr);
  gap: 22px;
  background:
    radial-gradient(circle at 18% 12%, rgba(217, 255, 99, 0.16), transparent 20%),
    linear-gradient(180deg, rgba(12, 21, 27, 0.98), rgba(16, 29, 36, 0.94));
}

.page-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.page-hero-copy h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 14ch;
}

.hero-icon {
  font-size: 0.82em;
}

.kpi-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.kpi-card,
.job-meta-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.kpi-card span,
.job-meta-card span,
.stack-form label span,
.invite-box span,
.tool-meta,
.status-banner p {
  color: var(--muted);
  font-size: 13px;
}

.kpi-card strong,
.job-meta-card strong {
  display: block;
  margin: 6px 0 8px;
  font-size: clamp(20px, 2.2vw, 28px);
  color: var(--text-strong);
}

.login-facts,
.auth-tips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.login-fact,
.auth-tips > div {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-fact span,
.auth-tips span,
.meta-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-fact strong,
.directory-cell strong {
  display: block;
  color: var(--text-strong);
}

.login-steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: login-step;
}

.login-steps li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
}

.login-steps li::before {
  counter-increment: login-step;
  content: counter(login-step);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #081116;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-weight: 700;
  background: linear-gradient(135deg, var(--signal), #a7ca35);
}

.dashboard-command .page-hero-copy h1,
.job-command .page-hero-copy h1,
.admin-command .page-hero-copy h1 {
  max-width: 16ch;
}

.stack-form,
.invite-box {
  display: grid;
  gap: 14px;
}

.stack-form label {
  display: grid;
  gap: 8px;
}

.auth-secondary {
  width: 100%;
}

input,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

input::placeholder,
textarea::placeholder {
  color: rgba(225, 235, 229, 0.42);
}

input:focus,
textarea:focus {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(217, 255, 99, 0.44);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(217, 255, 99, 0.12);
}

textarea {
  resize: vertical;
  min-height: 132px;
}

.primary-button,
.ghost-button,
.inline-button,
.nav-button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    border-color var(--transition),
    color var(--transition);
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-button {
  border: 1px solid transparent;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.2), transparent 32%),
    linear-gradient(135deg, var(--signal), #a7ca35);
  color: #081116;
  font-weight: 700;
  box-shadow: 0 18px 40px rgba(126, 159, 47, 0.24);
}

.ghost-button,
.inline-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.primary-button:hover,
.ghost-button:hover,
.inline-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

.danger-button {
  border-color: rgba(255, 122, 104, 0.22);
  color: #ff9b8d;
}

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

.tool-directory {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(8, 14, 18, 0.72);
  box-shadow: var(--shadow-soft);
}

.directory-head,
.directory-row {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) 130px minmax(250px, 1fr) 132px;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
}

.directory-head {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(225, 235, 229, 0.62);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.directory-row + .directory-row,
.directory-empty {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.directory-row {
  background: rgba(255, 255, 255, 0.02);
}

.directory-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.directory-primary {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.directory-copy {
  display: grid;
  gap: 6px;
}

.directory-copy p,
.directory-empty {
  color: var(--muted);
}

.directory-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 24px;
}

.directory-cell {
  min-width: 0;
}

.directory-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
}

.directory-actions {
  display: flex;
  justify-content: flex-end;
}

.directory-button {
  width: 100%;
}

.directory-empty {
  padding: 18px 22px;
}

.tool-card {
  position: relative;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 16px;
  padding: 20px;
  transition:
    transform var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.tool-card:hover,
.job-link:hover,
.export-link:hover,
.event-item:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 255, 99, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

.tool-icon {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 28px;
  background:
    linear-gradient(180deg, rgba(217, 255, 99, 0.22), rgba(217, 255, 99, 0.08)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(217, 255, 99, 0.18);
}

.tool-main {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.tool-line,
.result-toolbar,
.inline-actions {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-running,
.status-active {
  background: var(--signal-soft);
  color: #d9ff63;
  border-color: rgba(217, 255, 99, 0.18);
}

.status-succeeded {
  background: rgba(88, 217, 164, 0.14);
  color: #7bffcd;
  border-color: rgba(123, 255, 205, 0.16);
}

.status-failed,
.status-disabled {
  background: var(--danger-soft);
  color: #ff9b8d;
  border-color: rgba(255, 122, 104, 0.18);
}

.status-queued,
.status-pending {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
}

.tool-layout,
.job-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: start;
}

.job-layout {
  gap: 22px;
}

.job-main,
.job-side {
  display: grid;
  gap: 20px;
}

.job-overview-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 14px;
}

.status-banner {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top left, rgba(217, 255, 99, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
}

.job-results-panel,
.job-activity-panel {
  align-content: start;
}

.result-panel,
.job-list,
.exports-list,
.event-log {
  display: grid;
  gap: 12px;
}

.text-result {
  min-height: 280px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(5, 10, 13, 0.92);
  color: #f1f8dd;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.75;
}

.table-shell {
  overflow: auto;
  border-radius: var(--radius-lg);
}

.data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: rgba(225, 235, 229, 0.62);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.job-link,
.export-link,
.event-item {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.job-link strong,
.export-link strong,
.event-item strong {
  display: block;
  margin-top: 6px;
  color: var(--text-strong);
}

.event-log {
  max-height: 620px;
  overflow: auto;
}

.notice {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217, 255, 99, 0.16);
  background: rgba(217, 255, 99, 0.08);
}

.notice.error {
  border-color: rgba(255, 122, 104, 0.18);
  background: var(--danger-soft);
}

.plain-list {
  margin: 0;
  padding-left: 18px;
}

.centered-panel {
  max-width: 760px;
  margin: 10vh auto 0;
}

.narrow-panel h1 {
  max-width: 16ch;
  margin-bottom: 14px;
}

.invite-box textarea {
  min-height: 92px;
}

code {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

[hidden] {
  display: none !important;
}

.nav-category {
  margin: 4px 0 0;
  color: rgba(225, 235, 229, 0.64);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-card {
  min-height: 100%;
}

.nav-card.current {
  background:
    linear-gradient(180deg, rgba(217, 255, 99, 0.1), rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.04);
}

.external-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.landing-stage > *,
.workspace-shell > *,
.tool-layout > *,
.job-layout > *,
.invite-layout > * {
  animation: rise-in 340ms ease both;
}

@media (max-width: 1120px) {
  :root {
    --container: min(100vw - 32px, 100%);
  }

  .landing-stage,
  .invite-layout,
  .page-hero,
  .tool-layout,
  .job-layout,
  .job-overview-grid {
    grid-template-columns: 1fr;
  }

  .page-hero-copy h1,
  .brand-command h1 {
    max-width: 18ch;
  }

  .kpi-strip,
  .tool-registry-grid,
  .login-facts,
  .auth-tips {
    grid-template-columns: 1fr 1fr;
  }

  .directory-head,
  .directory-row {
    grid-template-columns: minmax(0, 1.3fr) 110px minmax(220px, 1fr) 120px;
    padding: 18px;
  }
}

@media (max-width: 820px) {
  .shell-frame {
    width: min(100vw - 24px, 100%);
  }

  .site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .kpi-strip,
  .tool-registry-grid,
  .login-facts,
  .auth-tips {
    grid-template-columns: 1fr;
  }

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

  .tool-line,
  .result-toolbar,
  .inline-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .data-table {
    min-width: 620px;
  }

  .directory-head {
    display: none;
  }

  .directory-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  .directory-primary {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .directory-actions {
    justify-content: stretch;
  }
}

@media (max-width: 640px) {
  .page {
    padding-bottom: 48px;
  }

  .brand-command,
  .auth-panel,
  .tool-form-panel,
  .side-panel,
  .job-block,
  .narrow-panel,
  .page-hero {
    padding: 22px;
    border-radius: 24px;
  }

  .brand {
    align-items: flex-start;
  }

  .site-nav a,
  .nav-button,
  .primary-button,
  .ghost-button,
  .inline-button {
    width: 100%;
  }

  .tool-icon {
    width: 60px;
    height: 60px;
  }

  .page-hero-copy h1,
  .brand-command h1 {
    font-size: clamp(30px, 10vw, 42px);
  }
}
