:root {
  --bg: #f3f0ea;
  --paper: #fdfcf8;
  --line: #111111;
  --muted: #6d6a65;
  --accent: #1d4138;
  --danger: #d63c2f;
  --success: #2a9c45;
  --shadow: 0 16px 40px rgba(17, 17, 17, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(29, 65, 56, 0.08), transparent 28%),
    linear-gradient(180deg, #efeae2 0%, #f7f5f0 100%);
  color: var(--line);
  font-family: "Space Mono", "Courier New", monospace;
}

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

button,
input,
textarea {
  font: inherit;
}

.top-accent {
  height: 14px;
  background: var(--accent);
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.15);
}

.page-shell {
  width: min(1520px, calc(100vw - 32px));
  margin: 24px auto 48px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(620px, 1.3fr);
  gap: 24px;
  align-items: start;
}

.dashboard-section {
  min-width: 0;
  margin-bottom: 0;
}

.dashboard-span-2 {
  grid-column: 1 / -1;
}

.panel {
  background: rgba(253, 252, 248, 0.94);
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.top-nav,
.footer-panel,
.overview-panel,
.approvals-panel,
.jobs-panel,
.terminal-panel,
.files-panel,
.editor-meta,
.editor-panel,
.flash-panel {
  padding: 24px;
}

.top-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid var(--line);
  font-size: 2rem;
  font-weight: 700;
}

.brand strong {
  display: block;
  font-size: 2rem;
  letter-spacing: 0.04em;
}

.brand small {
  color: var(--muted);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 26px;
}

.nav-links a {
  position: relative;
  font-size: 1.05rem;
}

.nav-links a.active {
  color: var(--danger);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: currentColor;
}

.nav-badge,
.ghost-button,
.run-form button,
.terminal-form button,
.editor-toolbar button,
.jobs-actions button,
.auth-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 2px solid var(--line);
  background: var(--line);
  color: #fff;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.nav-badge.link-badge,
.ghost-button {
  background: transparent;
  color: var(--line);
}

.nav-badge:hover,
.ghost-button:hover,
.run-form button:hover,
.terminal-form button:hover,
.editor-toolbar button:hover,
.jobs-actions button:hover,
.auth-form button:hover {
  transform: translateY(-1px);
  box-shadow: 6px 6px 0 rgba(17, 17, 17, 0.08);
}

.nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.section-head.compact {
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

h1,
h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3.2rem);
}

h2 {
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.search-box {
  display: grid;
  gap: 8px;
  width: min(360px, 100%);
}

.files-toolbar,
.sort-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.files-toolbar {
  justify-content: flex-end;
}

.files-search-box {
  width: min(320px, 100%);
}

.sort-box {
  display: grid;
  gap: 8px;
  width: 220px;
}

.search-box input,
.run-form input,
.editor-form textarea,
.auth-form input {
  width: 100%;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--line);
}

.search-box input,
.run-form input,
.auth-form input,
.sort-box select {
  min-height: 58px;
  padding: 0 18px;
}

.sort-box select {
  width: 100%;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--line);
}

.info-grid,
.action-grid,
.meta-grid {
  display: grid;
  gap: 16px;
}

.info-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
}

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

.info-card,
.action-box,
.meta-item,
.job-card {
  border: 2px solid var(--line);
  background: #fff;
  padding: 20px;
}

.info-card span,
.meta-item span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.info-card strong,
.meta-item strong {
  display: block;
  font-size: 1.1rem;
  word-break: break-word;
}

.action-box label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.jobs-list {
  display: grid;
  gap: 16px;
}

.approvals-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.job-card {
  display: grid;
  gap: 16px;
}

.approval-card {
  display: grid;
  gap: 16px;
  border: 2px solid var(--line);
  background:
    linear-gradient(180deg, rgba(29, 65, 56, 0.06) 0%, rgba(255, 255, 255, 0.96) 100%),
    #fff;
  padding: 20px;
}

.job-head,
.job-meta,
.terminal-meta,
.editor-toolbar,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.approval-head,
.approval-actions,
.approval-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.approval-head {
  align-items: flex-start;
  justify-content: space-between;
}

.approval-actions {
  align-items: center;
  justify-content: flex-end;
}

.approval-actions .ghost-button {
  min-height: 42px;
  padding: 0 14px;
}

.approval-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.approval-meta-grid span {
  display: block;
  padding: 12px 14px;
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
  word-break: break-word;
}

.approval-meta-grid strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.88rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.job-title {
  display: grid;
  gap: 6px;
}

.job-title strong {
  font-size: 1.1rem;
  word-break: break-word;
}

.job-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 2px solid var(--line);
  background: #f7f5f0;
  font-size: 0.9rem;
}

.status.running {
  color: var(--danger);
}

.status.finished,
.status.editable {
  color: var(--success);
}

.status.failed,
.status.stopped,
.status.ready {
  color: var(--line);
}

.status.muted {
  color: var(--muted);
}

.job-output {
  margin: 0;
  min-height: 120px;
  max-height: 320px;
  overflow: auto;
  border: 2px solid var(--line);
  background: #0c0c0c;
  color: #f6f6f6;
  padding: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-panel {
  padding: 24px;
}

.terminal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.terminal-meta {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.terminal-output {
  margin: 0;
  min-height: 340px;
  max-height: 520px;
  overflow: auto;
  border: 2px solid var(--line);
  background: #0c0c0c;
  color: #ecf7ef;
  padding: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 16px;
}

.terminal-form input {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--line);
}

.terminal-form button {
  min-width: 120px;
}

.empty-state,
.muted-text {
  color: var(--muted);
}

.filter-pill {
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.filter-pill.active {
  background: var(--line);
  color: #fff;
}

.table-wrap {
  overflow-x: auto;
  min-width: 0;
}

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

.file-card {
  display: grid;
  gap: 16px;
  border: 2px solid var(--line);
  background: #fff;
  padding: 18px;
}

.file-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.file-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.file-meta-grid span {
  display: block;
  padding: 12px;
  border: 2px solid var(--line);
  background: #faf8f4;
  color: var(--line);
  line-height: 1.5;
  word-break: break-word;
}

.file-meta-grid strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1024px;
  background: #fff;
}

.data-table th,
.data-table td {
  border: 2px solid var(--line);
  padding: 16px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: #faf8f4;
}

.file-name-cell {
  display: grid;
  gap: 6px;
}

.file-name-cell span {
  color: var(--muted);
  font-size: 0.92rem;
  word-break: break-all;
}

.action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.run-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.run-form input {
  width: 240px;
  min-width: 180px;
}

.editor-form {
  display: grid;
  gap: 16px;
}

.editor-meta .meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editor-toolbar-advanced {
  justify-content: space-between;
  gap: 16px;
}

.editor-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.editor-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.editor-pill.active {
  background: var(--line);
  color: #fff;
}

.editor-pill.dirty {
  color: var(--danger);
  border-color: var(--danger);
}

.editor-shell {
  border: 2px solid var(--line);
  background:
    linear-gradient(180deg, #1d2430 0%, #131821 100%);
  color: #e8eef8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.editor-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 12, 17, 0.56);
  overflow-x: auto;
}

.editor-tab {
  position: relative;
  min-width: min(100%, 560px);
  padding: 14px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
}

.editor-tab.active {
  background: rgba(255, 255, 255, 0.08);
}

.editor-tab strong,
.editor-tab small {
  padding-left: 18px;
}

.editor-tab strong {
  color: #f7fbff;
  font-size: 1rem;
  word-break: break-word;
}

.editor-tab small {
  color: #8d99ae;
  font-size: 0.8rem;
  word-break: break-all;
}

.editor-tab-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: #5d6b85;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.editor-tab-dot.dirty {
  background: #ffb04a;
}

.editor-workspace {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 72vh;
  max-height: 78vh;
}

.editor-gutter {
  margin: 0;
  padding: 20px 14px 20px 20px;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 6, 11, 0.44);
  color: #6f7b92;
  text-align: right;
  line-height: 1.7;
  font-size: 0.95rem;
  user-select: none;
}

#editor-textarea {
  width: 100%;
  min-height: 72vh;
  max-height: 78vh;
  padding: 20px 22px;
  border: 0;
  background: transparent;
  color: #f4f8ff;
  resize: none;
  line-height: 1.7;
  font-size: 0.95rem;
  caret-color: #7cf0b0;
  tab-size: 2;
  outline: none;
}

#editor-textarea::selection {
  background: rgba(92, 146, 255, 0.34);
}

#editor-textarea::placeholder {
  color: #6f7b92;
}

.editor-statusbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 11, 17, 0.76);
  color: #9eb0cb;
  font-size: 0.84rem;
}

.auth-panel {
  display: grid;
  gap: 24px;
  padding: 40px 24px;
}

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

.auth-stage {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 2px solid var(--line);
  background: #fff;
}

.auth-stage.active {
  background:
    linear-gradient(180deg, rgba(29, 65, 56, 0.08) 0%, rgba(29, 65, 56, 0.02) 100%),
    #fff;
  box-shadow: 8px 8px 0 rgba(17, 17, 17, 0.06);
}

.auth-stage strong {
  font-size: 1.05rem;
}

.auth-stage p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.auth-copy {
  max-width: 760px;
}

.auth-copy p:last-child {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.auth-form {
  display: grid;
  gap: 16px;
  width: min(560px, 100%);
}

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

.flash-message {
  border: 2px solid var(--line);
  padding: 16px;
  background: #fff;
}

.flash-message.success {
  color: var(--success);
}

.flash-message.error {
  color: var(--danger);
}

.footer-panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 1080px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-span-2 {
    grid-column: auto;
  }

  .top-nav,
  .section-head,
  .info-grid,
  .action-grid,
  .meta-grid,
  .approval-meta-grid,
  .file-meta-grid {
    grid-template-columns: 1fr;
  }

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

  .editor-meta .meta-grid {
    grid-template-columns: 1fr;
  }

  .auth-stage-grid {
    grid-template-columns: 1fr;
  }

  .top-nav {
    justify-items: start;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .files-toolbar {
    justify-content: flex-start;
  }

  .page-shell {
    width: min(100vw - 20px, 1520px);
    margin-top: 10px;
  }
}

@media (max-width: 760px) {
  .files-grid {
    grid-template-columns: 1fr;
  }

  .page-shell {
    width: min(100vw - 16px, 1520px);
  }

  .top-nav,
  .footer-panel,
  .overview-panel,
  .approvals-panel,
  .jobs-panel,
  .terminal-panel,
  .files-panel,
  .editor-meta,
  .editor-panel,
  .flash-panel,
  .auth-panel {
    padding: 16px;
  }

  .brand strong {
    font-size: 1.5rem;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
  }

  .nav-links {
    gap: 10px 16px;
    font-size: 0.95rem;
  }

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .data-table thead {
    display: none;
  }

  .data-table tr {
    margin-bottom: 14px;
    border: 2px solid var(--line);
    background: #fff;
  }

  .data-table td {
    border-width: 0 0 2px;
    padding: 12px 14px;
  }

  .data-table td:last-child {
    border-bottom: 0;
  }

  .data-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .run-form,
  .action-stack,
  .file-card-top,
  .approval-head,
  .approval-actions,
  .job-head,
  .job-meta,
  .terminal-meta,
  .terminal-actions,
  .editor-toolbar,
  .editor-toolbar-group,
  .filter-bar,
  .files-toolbar,
  .nav-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .run-form input {
    width: 100%;
  }

  .terminal-form {
    grid-template-columns: 1fr;
  }

  .footer-panel {
    flex-direction: column;
  }

  .editor-workspace {
    grid-template-columns: 56px minmax(0, 1fr);
    min-height: 62vh;
    max-height: none;
  }

  .editor-gutter,
  #editor-textarea {
    min-height: 62vh;
    max-height: none;
  }

  #editor-textarea {
    padding: 18px 16px;
    font-size: 0.92rem;
  }

  .editor-gutter {
    padding: 18px 10px 18px 12px;
    font-size: 0.82rem;
  }

  .editor-statusbar {
    justify-content: flex-start;
  }
}

/* Neon compact skin */
:root {
  --bg: #020704;
  --paper: rgba(5, 18, 11, 0.96);
  --line: #29ff87;
  --muted: #79a68c;
  --accent: #00ff66;
  --danger: #ff3f6e;
  --success: #48ff9a;
  --shadow: 0 0 0 1px rgba(41, 255, 135, 0.24), 0 16px 52px rgba(0, 255, 102, 0.08);
  --radius: 8px;
}

body {
  background:
    linear-gradient(rgba(41, 255, 135, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41, 255, 135, 0.018) 1px, transparent 1px),
    radial-gradient(circle at 50% -10%, rgba(0, 255, 102, 0.18), transparent 38%),
    #020704;
  background-size: 26px 26px, 26px 26px, auto, auto;
  color: #d8ffe6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, 0.025) 50%, rgba(0, 0, 0, 0.06) 50%);
  background-size: 100% 4px;
  mix-blend-mode: screen;
  opacity: 0.34;
}

.top-accent {
  height: 6px;
  background: linear-gradient(90deg, transparent, #00ff66 18%, #c9ff3f 50%, #00ff66 82%, transparent);
  box-shadow: 0 0 22px rgba(0, 255, 102, 0.64);
}

.page-shell {
  width: min(1220px, calc(100vw - 28px));
  margin: 18px auto 32px;
}

.dashboard-grid {
  grid-template-columns: minmax(280px, 0.82fr) minmax(520px, 1.18fr);
  gap: 14px;
}

.panel {
  border: 1px solid rgba(41, 255, 135, 0.44);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(13, 39, 23, 0.92), rgba(3, 13, 8, 0.96)),
    var(--paper);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
}

.top-nav,
.footer-panel,
.overview-panel,
.approvals-panel,
.jobs-panel,
.terminal-panel,
.files-panel,
.upload-panel,
.editor-meta,
.editor-panel,
.flash-panel,
.auth-panel {
  padding: 16px;
}

.top-nav {
  gap: 16px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(41, 255, 135, 0.72);
  border-radius: 6px;
  background: #04140a;
  color: #c9ff3f;
  font-size: 1.35rem;
  text-shadow: 0 0 14px rgba(201, 255, 63, 0.76);
  box-shadow: inset 0 0 18px rgba(0, 255, 102, 0.12);
}

.brand strong {
  color: #f1fff5;
  font-size: 1.28rem;
  letter-spacing: 0;
  text-shadow: 0 0 14px rgba(0, 255, 102, 0.42);
}

.brand small,
.muted-text,
.empty-state,
.job-meta,
.terminal-meta,
.file-name-cell span,
.auth-stage p,
.auth-copy p:last-child,
.eyebrow {
  color: var(--muted);
}

.nav-links {
  justify-content: flex-start;
  gap: 8px;
}

.nav-links a,
.filter-pill,
.status,
.editor-pill,
.nav-badge,
.ghost-button,
.run-form button,
.terminal-form button,
.editor-toolbar button,
.jobs-actions button,
.auth-form button,
.upload-controls button {
  border: 1px solid rgba(41, 255, 135, 0.52);
  border-radius: 6px;
  background: rgba(2, 12, 7, 0.88);
  color: #d8ffe6;
  box-shadow: inset 0 0 14px rgba(0, 255, 102, 0.055);
}

.nav-links a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  font-size: 0.86rem;
}

.nav-links a.active,
.nav-links a:hover,
.filter-pill.active,
.nav-badge {
  color: #071107;
  background: #48ff9a;
  text-shadow: none;
  box-shadow: 0 0 18px rgba(72, 255, 154, 0.28);
}

.nav-links a.active::after {
  display: none;
}

.nav-badge,
.ghost-button,
.run-form button,
.terminal-form button,
.editor-toolbar button,
.jobs-actions button,
.auth-form button,
.upload-controls button {
  min-height: 38px;
  padding: 0 12px;
}

.ghost-button:hover,
.run-form button:hover,
.terminal-form button:hover,
.editor-toolbar button:hover,
.jobs-actions button:hover,
.auth-form button:hover,
.upload-controls button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(72, 255, 154, 0.24);
}

.section-head {
  gap: 12px;
  margin-bottom: 14px;
}

.eyebrow {
  margin-bottom: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

h1,
h2 {
  color: #f1fff5;
  font-size: clamp(1.35rem, 2vw, 2.2rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.05rem, 1.4vw, 1.45rem);
}

.info-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.action-grid,
.meta-grid,
.jobs-list,
.approvals-list {
  gap: 10px;
}

.info-card,
.action-box,
.meta-item,
.job-card,
.approval-card,
.file-card,
.auth-stage,
.file-meta-grid span,
.approval-meta-grid span,
.flash-message {
  border: 1px solid rgba(41, 255, 135, 0.32);
  border-radius: 6px;
  background: rgba(2, 12, 7, 0.72);
  color: #d8ffe6;
  padding: 12px;
}

.info-card strong {
  color: #c9ff3f;
  font-size: 1rem;
}

.info-card span,
.meta-item span,
.file-meta-grid strong,
.approval-meta-grid strong {
  color: var(--muted);
  font-size: 0.74rem;
}

.search-box input,
.run-form input,
.auth-form input,
.sort-box select,
.terminal-form input,
.upload-controls input,
.editor-form textarea {
  border: 1px solid rgba(41, 255, 135, 0.44);
  border-radius: 6px;
  background: rgba(0, 7, 4, 0.92);
  color: #e8ffef;
  outline: none;
}

.search-box input,
.run-form input,
.auth-form input,
.sort-box select,
.terminal-form input,
.upload-controls input {
  min-height: 42px;
  padding: 0 12px;
}

.search-box input:focus,
.run-form input:focus,
.auth-form input:focus,
.sort-box select:focus,
.terminal-form input:focus,
.upload-controls input:focus,
#editor-textarea:focus {
  border-color: #c9ff3f;
  box-shadow: 0 0 0 3px rgba(201, 255, 63, 0.1);
}

.files-toolbar {
  gap: 10px;
}

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

.file-card {
  gap: 12px;
}

.file-meta-grid {
  gap: 8px;
}

.status {
  min-height: 28px;
  padding: 0 9px;
  font-size: 0.76rem;
}

.status.running,
.editor-pill.dirty,
.flash-message.error {
  color: var(--danger);
}

.status.finished,
.status.editable,
.status.ready,
.flash-message.success,
.upload-status.success {
  color: var(--success);
}

.upload-status.error {
  color: var(--danger);
}

.job-output,
.terminal-output,
.editor-shell {
  border: 1px solid rgba(41, 255, 135, 0.48);
  border-radius: 6px;
  background:
    linear-gradient(rgba(72, 255, 154, 0.035) 1px, transparent 1px),
    #010603;
  background-size: 100% 24px;
  color: #c7ffd9;
  box-shadow: inset 0 0 28px rgba(0, 255, 102, 0.08);
}

.job-output {
  min-height: 96px;
  max-height: 240px;
  padding: 12px;
}

.terminal-output {
  min-height: 260px;
  max-height: 420px;
  padding: 12px;
}

.terminal-form {
  margin-top: 10px;
}

.upload-form {
  display: grid;
  gap: 12px;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 168px;
  padding: 18px;
  border: 1px dashed rgba(72, 255, 154, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(72, 255, 154, 0.1), transparent 42%),
    rgba(0, 8, 4, 0.72);
  color: #e8ffef;
  text-align: center;
  cursor: pointer;
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-zone.dragging {
  border-color: #c9ff3f;
  box-shadow: inset 0 0 28px rgba(201, 255, 63, 0.12), 0 0 22px rgba(72, 255, 154, 0.22);
}

.drop-zone strong {
  font-size: 1rem;
}

.drop-zone small,
.upload-preview small {
  color: var(--muted);
}

.drop-kicker {
  color: #c9ff3f;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
}

.upload-controls {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.upload-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.check-row {
  min-height: 42px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(41, 255, 135, 0.32);
  border-radius: 6px;
  background: rgba(2, 12, 7, 0.72);
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: #48ff9a;
}

.upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.upload-preview span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid rgba(41, 255, 135, 0.32);
  border-radius: 999px;
  background: rgba(0, 8, 4, 0.78);
  color: #d8ffe6;
  font-size: 0.8rem;
}

.editor-workspace,
#editor-textarea {
  min-height: 68vh;
}

.editor-tabs,
.editor-statusbar {
  background: rgba(0, 7, 4, 0.92);
  border-color: rgba(41, 255, 135, 0.2);
}

.editor-tab.active {
  background: rgba(72, 255, 154, 0.08);
}

.footer-panel {
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 1080px) {
  .dashboard-grid,
  .info-grid,
  .upload-controls {
    grid-template-columns: 1fr;
  }

  .dashboard-span-2 {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100vw - 14px, 1220px);
    margin-top: 10px;
  }

  .top-nav,
  .section-head {
    grid-template-columns: 1fr;
  }

  .top-nav,
  .footer-panel,
  .overview-panel,
  .approvals-panel,
  .jobs-panel,
  .terminal-panel,
  .files-panel,
  .upload-panel,
  .editor-meta,
  .editor-panel,
  .flash-panel,
  .auth-panel {
    padding: 12px;
  }

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

/* Compact neutral operator skin */
:root {
  --bg: #0b0f14;
  --paper: #111820;
  --line: #2b3643;
  --muted: #8d99a6;
  --accent: #4f8cff;
  --danger: #ff5d73;
  --success: #72c48f;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  --radius: 8px;
}

html {
  scroll-padding-top: 10px;
}

body {
  background: #0b0f14;
  color: #e7edf5;
  font-family: "Space Mono", "Courier New", monospace;
  font-size: 14px;
}

body::before {
  display: none;
}

.top-accent {
  height: 0;
  background: transparent;
  box-shadow: none;
}

.page-shell {
  width: min(1360px, calc(100vw - 16px));
  margin: 8px auto 18px;
}

.dashboard-grid {
  grid-template-columns: minmax(310px, 0.72fr) minmax(460px, 1fr);
  gap: 10px;
}

.panel {
  margin-bottom: 10px;
  border: 1px solid #273342;
  border-radius: 8px;
  background: #111820;
  box-shadow: var(--shadow);
  overflow: clip;
}

.top-nav,
.footer-panel,
.overview-panel,
.approvals-panel,
.jobs-panel,
.terminal-panel,
.files-panel,
.upload-panel,
.editor-meta,
.editor-panel,
.flash-panel,
.auth-panel {
  padding: 10px;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  background: rgba(17, 24, 32, 0.96);
  backdrop-filter: blur(12px);
}

.brand {
  gap: 8px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border: 1px solid #3b4654;
  border-radius: 6px;
  background: #182232;
  color: #9dbdff;
  font-size: 1rem;
  text-shadow: none;
  box-shadow: none;
}

.brand strong {
  font-size: 1rem;
  color: #f3f7fb;
  text-shadow: none;
}

.brand small {
  display: none;
}

.nav-links {
  justify-content: flex-start;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #aeb9c7;
  font-size: 0.82rem;
  box-shadow: none;
}

.nav-links a.active,
.nav-links a:hover {
  border-color: #40516a;
  background: #192435;
  color: #f3f7fb;
  box-shadow: none;
}

.nav-badge,
.ghost-button,
.run-form button,
.terminal-form button,
.editor-toolbar button,
.jobs-actions button,
.auth-form button,
.upload-controls button,
.filter-pill {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #3a4656;
  border-radius: 6px;
  background: #182232;
  color: #e7edf5;
  box-shadow: none;
}

.nav-badge,
.filter-pill.active,
.run-form button,
.terminal-form button,
.upload-controls button {
  border-color: #4f8cff;
  background: #24446f;
  color: #f7fbff;
}

.ghost-button:hover,
.run-form button:hover,
.terminal-form button:hover,
.editor-toolbar button:hover,
.jobs-actions button:hover,
.auth-form button:hover,
.upload-controls button:hover,
.filter-pill:hover {
  transform: none;
  border-color: #5f789c;
  background: #223047;
  box-shadow: none;
}

.section-head {
  gap: 10px;
  margin-bottom: 8px;
}

.section-head.compact {
  align-items: center;
}

.eyebrow {
  margin: 0 0 2px;
  color: #7f8b99;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
}

h1,
h2 {
  color: #f3f7fb;
  font-size: 1.05rem;
  line-height: 1.15;
}

h2 {
  font-size: 1rem;
}

.compact-overview .section-head {
  grid-template-columns: auto 1fr;
  margin-bottom: 0;
}

.compact-overview .info-grid {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin: 0;
}

.compact-overview .info-card {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 8px;
}

.compact-overview .info-card span {
  margin: 0;
}

.compact-overview .info-card strong {
  font-size: 0.9rem;
}

.action-grid {
  display: none;
}

.info-grid,
.meta-grid,
.jobs-list,
.approvals-list {
  gap: 8px;
}

.info-card,
.action-box,
.meta-item,
.job-card,
.approval-card,
.file-card,
.auth-stage,
.file-meta-grid span,
.approval-meta-grid span,
.flash-message {
  border: 1px solid #273342;
  border-radius: 7px;
  background: #0e141c;
  color: #e7edf5;
  padding: 9px;
}

.info-card span,
.meta-item span,
.file-meta-grid strong,
.approval-meta-grid strong {
  color: #8d99a6;
  font-size: 0.68rem;
}

.info-card strong,
.meta-item strong {
  color: #f3f7fb;
}

.search-box input,
.run-form input,
.auth-form input,
.sort-box select,
.terminal-form input,
.upload-controls input,
.editor-form textarea {
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid #334154;
  border-radius: 6px;
  background: #0b1118;
  color: #e7edf5;
}

.search-box input:focus,
.run-form input:focus,
.auth-form input:focus,
.sort-box select:focus,
.terminal-form input:focus,
.upload-controls input:focus,
#editor-textarea:focus {
  border-color: #4f8cff;
  box-shadow: 0 0 0 2px rgba(79, 140, 255, 0.18);
}

.terminal-panel {
  padding-bottom: 10px;
}

.terminal-actions,
.jobs-actions,
.filter-bar,
.files-toolbar {
  gap: 6px;
}

.terminal-meta {
  display: flex;
  gap: 6px 12px;
  margin-bottom: 8px;
  overflow-x: auto;
  color: #8d99a6;
  font-size: 0.78rem;
  white-space: nowrap;
}

.terminal-output,
.job-output,
.editor-shell {
  border: 1px solid #2a3544;
  border-radius: 7px;
  background: #070b10;
  color: #dce5ef;
  box-shadow: none;
}

.terminal-output {
  min-height: 180px;
  max-height: 310px;
  padding: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
}

.terminal-form {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 8px;
}

.terminal-form button {
  min-width: 82px;
}

.files-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px auto;
  align-items: end;
}

.files-search-box,
.sort-box {
  width: auto;
}

.search-box,
.sort-box {
  gap: 4px;
}

.search-box span,
.sort-box span,
.upload-controls label {
  color: #8d99a6;
  font-size: 0.72rem;
}

.files-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
}

.file-card {
  gap: 8px;
  padding: 9px;
}

.file-card-top {
  gap: 8px;
}

.file-name-cell {
  gap: 3px;
}

.file-name-cell strong {
  font-size: 0.9rem;
}

.file-name-cell span {
  color: #8d99a6;
  font-size: 0.75rem;
}

.file-meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.file-meta-grid span {
  padding: 7px;
  line-height: 1.35;
}

.status {
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid #3a4656;
  border-radius: 999px;
  background: #182232;
  color: #aeb9c7;
  font-size: 0.68rem;
}

.status.running {
  color: #ffd37a;
}

.status.finished,
.status.editable,
.status.ready,
.flash-message.success,
.upload-status.success {
  color: #90d4a6;
}

.status.failed,
.status.stopped,
.editor-pill.dirty,
.flash-message.error,
.upload-status.error {
  color: #ff8796;
}

.action-stack,
.run-form {
  gap: 6px;
}

.run-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  flex: 1 1 100%;
}

.run-form input {
  width: 100%;
  min-width: 0;
}

.job-card {
  gap: 8px;
}

.job-output {
  min-height: 78px;
  max-height: 180px;
  padding: 9px;
  font-size: 0.78rem;
}

.approval-card {
  gap: 8px;
}

.approval-meta-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.approval-meta-grid span {
  padding: 7px;
}

.upload-form {
  gap: 8px;
}

.drop-zone {
  min-height: 92px;
  padding: 12px;
  border: 1px dashed #536177;
  border-radius: 7px;
  background: #0e141c;
  color: #e7edf5;
}

.drop-zone.dragging {
  border-color: #4f8cff;
  box-shadow: inset 0 0 0 1px rgba(79, 140, 255, 0.22);
}

.drop-kicker {
  color: #9dbdff;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.drop-zone strong {
  font-size: 0.9rem;
}

.drop-zone small,
.upload-preview small,
.muted-text,
.empty-state {
  color: #8d99a6;
}

.upload-controls {
  grid-template-columns: minmax(120px, 1fr) auto auto;
  gap: 6px;
}

.check-row {
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid #334154;
  border-radius: 6px;
  background: #0b1118;
}

.check-row input {
  accent-color: #4f8cff;
}

.upload-preview {
  gap: 6px;
  font-size: 0.78rem;
}

.upload-preview span {
  padding: 5px 7px;
  border: 1px solid #334154;
  background: #0b1118;
  color: #e7edf5;
}

.footer-panel {
  padding: 8px 10px;
  color: #8d99a6;
  font-size: 0.72rem;
}

.editor-workspace,
#editor-textarea {
  min-height: 66vh;
}

.editor-tabs,
.editor-statusbar {
  background: #0b1118;
  border-color: #273342;
}

.editor-tab.active {
  background: #182232;
}

@media (max-width: 900px) {
  body {
    font-size: 13px;
  }

  .page-shell {
    width: min(100vw - 10px, 1360px);
    margin-top: 5px;
  }

  .dashboard-grid,
  .compact-overview .section-head,
  .files-toolbar,
  .upload-controls,
  .terminal-form {
    grid-template-columns: 1fr;
  }

  .dashboard-span-2 {
    grid-column: auto;
  }

  .top-nav {
    grid-template-columns: 1fr auto;
  }

  .brand {
    min-width: 0;
  }

  .nav-links {
    grid-column: 1 / -1;
    order: 3;
  }

  .nav-actions {
    justify-content: flex-end;
  }

  .compact-overview .info-grid {
    justify-content: flex-start;
  }

  .terminal-output {
    min-height: 150px;
    max-height: 42vh;
  }

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

  .approval-meta-grid,
  .file-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .top-nav,
  .footer-panel,
  .overview-panel,
  .approvals-panel,
  .jobs-panel,
  .terminal-panel,
  .files-panel,
  .upload-panel,
  .editor-meta,
  .editor-panel,
  .flash-panel,
  .auth-panel {
    padding: 8px;
  }

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

  .brand strong {
    font-size: 0.92rem;
  }

  .nav-badge,
  .ghost-button,
  .run-form button,
  .terminal-form button,
  .editor-toolbar button,
  .jobs-actions button,
  .auth-form button,
  .upload-controls button,
  .filter-pill {
    min-height: 34px;
  }

  .compact-overview .info-grid,
  .terminal-actions,
  .jobs-actions,
  .filter-bar,
  .nav-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .nav-actions {
    grid-template-columns: 1fr auto;
  }

  .approval-meta-grid,
  .file-meta-grid {
    grid-template-columns: 1fr;
  }

  .drop-zone {
    min-height: 78px;
  }

  .terminal-output {
    min-height: 135px;
  }
}
