:root {
  --bg: #f3efe7;
  --fg: #1f1b17;
  --muted: #6d645b;
  --card: #fffaf2;
  --line: #d7ccbc;
  --accent: #0f6b52;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at top left, rgba(15, 107, 82, 0.10), transparent 28rem),
    linear-gradient(180deg, #f7f1e6 0%, var(--bg) 100%);
  color: var(--fg);
}

.shell-header,
.shell-main {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.shell-header {
  padding: 2rem 0 1rem;
}

.shell-main {
  padding: 1rem 0 3rem;
}

.shell-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.shell-sidebar {
  position: sticky;
  top: 1rem;
}

.shell-content {
  min-width: 0;
}

.nav-card {
  background: rgba(255, 250, 242, 0.75);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(31, 27, 23, 0.05);
}

.shell-nav {
  display: grid;
  gap: 0.45rem;
}

.shell-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px solid transparent;
  color: var(--fg);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.65);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.shell-nav-link:hover {
  border-color: var(--line);
  background: #fff;
  transform: translateY(-1px);
}

.shell-nav-link.is-active {
  background: linear-gradient(135deg, rgba(15, 107, 82, 0.12), rgba(15, 107, 82, 0.04));
  border-color: rgba(15, 107, 82, 0.35);
}

.shell-nav-label {
  font-weight: 600;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

p {
  margin: 0;
  line-height: 1.55;
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.summary-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.1rem;
  box-shadow: 0 10px 30px rgba(31, 27, 23, 0.05);
}

.summary-value {
  color: var(--fg);
  font-size: 1.55rem;
  font-weight: 700;
  margin-top: 0.35rem;
}

.summary-footnote {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.panel-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(31, 27, 23, 0.05);
}

.panel-stack {
  margin-bottom: 1rem;
}

.workflow-layout {
  display: grid;
  gap: 1rem;
}

.workflow-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  align-items: start;
}

.workflow-stack {
  display: grid;
  gap: 1rem;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.tight-head {
  margin-bottom: 0.75rem;
}

.panel-card h2 {
  color: var(--accent);
}

.panel-card h3 {
  margin: 0 0 0.75rem;
  color: var(--fg);
}

.two-up {
  align-items: start;
}

.control-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.control-form label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.control-form span {
  color: var(--muted);
  font-size: 0.9rem;
}

.control-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--fg);
  padding: 0.75rem 0.85rem;
  font: inherit;
}

.control-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--fg);
  padding: 0.75rem 0.85rem;
  font: inherit;
}

.compact-form {
  margin-bottom: 1rem;
}

.checkbox-field {
  display: flex;
  flex-direction: row !important;
  align-items: center;
  gap: 0.6rem !important;
  align-self: end;
}

.checkbox-field input[type="checkbox"] {
  width: auto;
  margin: 0;
  padding: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

.action-button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 0.85rem 1.2rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  align-self: end;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

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

.data-table th {
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mono-cell,
.mono-inline {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

.compact th,
.compact td {
  padding: 0.5rem 0.35rem;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-queued,
.status-pending {
  background: #f3e4b9;
  color: #654f00;
}

.status-running {
  background: #d7e8ff;
  color: #12418c;
}

.status-succeeded {
  background: #d8f0e4;
  color: #14573c;
}

.status-pass {
  background: #d8f0e4;
  color: #14573c;
}

.status-failed,
.status-cancelled {
  background: #f7d9d4;
  color: #84291d;
}

.status-fail {
  background: #f7d9d4;
  color: #84291d;
}

.status-blocked {
  background: #eadcf8;
  color: #5d2e8c;
}

.status-info {
  background: #eef4ff;
  color: #143b7a;
}

.section-intro {
  margin-bottom: 0.9rem;
}

.source-table td,
.source-table th {
  word-break: break-word;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.meta-label {
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.meta-value {
  color: var(--fg);
  line-height: 1.45;
}

.meta-line {
  margin-top: 0.35rem;
}

.subsection {
  margin-top: 1rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.inline-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.inline-link:hover {
  text-decoration: underline;
}

.notice {
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
}

.notice-warning {
  background: #fff4dd;
  color: #6f4c00;
}

.notice-info {
  background: #eef4ff;
  color: #143b7a;
}

.notice-error {
  background: #fde8e4;
  color: #7c1d12;
}

.auth-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.auth-chip {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 107, 82, 0.08);
  border: 1px solid rgba(15, 107, 82, 0.15);
  color: var(--fg);
  font-size: 0.85rem;
}

.log-box {
  overflow: auto;
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  color: var(--fg);
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  line-height: 1.4;
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .shell-sidebar {
    position: static;
  }

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

  .shell-hero {
    flex-direction: column;
  }
}

.status-warning {
  background: #fff5d8;
  color: #6d5200;
}

.status-error {
  background: #f9dfda;
  color: #7d261a;
}

.inline-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.mono-inline {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9rem;
}

.meta-line,
.mono-cell {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9rem;
}

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

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.meta-label {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.meta-value {
  margin: 0;
  color: var(--fg);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92rem;
  line-height: 1.5;
  word-break: break-word;
}

.subsection {
  margin-top: 1rem;
}

.single-action-form {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 1rem;
}

.notice {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-size: 0.92rem;
  line-height: 1.45;
}

.notice-info {
  background: #eef4ff;
  color: #143b7a;
}

.notice-warning {
  background: #fff5d8;
  color: #6d5200;
}

.notice-error {
  background: #f9dfda;
  color: #7d261a;
}

.danger {
  background: #912f23;
}

.active-run-list {
  display: grid;
  gap: 0.9rem;
}

.active-run-card {
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
}

.action-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.auth-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f4ede1;
  color: var(--fg);
  font-size: 0.82rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.simple-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.simple-list li + li {
  margin-top: 0.35rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f4ede1;
  color: var(--fg);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.log-box {
  max-height: 32rem;
  overflow: auto;
  margin: 0;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #161310;
  color: #efe6d8;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.87rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.small-log {
  max-height: 18rem;
}
