:root {
  --bg: #f6f2ea;
  --surface: rgba(255, 255, 255, 0.78);
  --line: rgba(26, 36, 38, 0.1);
  --ink: #171e1d;
  --muted: #65706d;
  --accent: #1d6b58;
  --accent-strong: #144b3e;
  --radius: 24px;
  --shadow: 0 24px 60px rgba(34, 61, 56, 0.12);
  --sans: "Space Grotesk", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(29, 107, 88, 0.16), transparent 34%),
    radial-gradient(circle at top right, rgba(28, 138, 118, 0.14), transparent 26%),
    linear-gradient(180deg, #f6f2ea 0%, #ece7dd 100%);
}

.shell {
  width: min(1340px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero,
.summary-grid,
.grid {
  display: grid;
  gap: 18px;
}

.hero {
  grid-template-columns: 1.4fr 0.8fr;
  align-items: start;
  margin-bottom: 18px;
}

.summary-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 18px;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding: 20px;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-strong);
}

h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-copy p:last-child,
.toolbar p,
.muted {
  color: var(--muted);
}

.auth,
.toolbar {
  display: grid;
  gap: 10px;
}

.auth-row,
.toolbar-actions,
.action-strip {
  display: flex;
  gap: 10px;
  align-items: center;
}

.toolbar {
  margin-bottom: 18px;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.stat strong {
  display: block;
  font-size: clamp(28px, 4vw, 40px);
  margin: 10px 0 6px;
}

.label,
.section-head h2 {
  font-weight: 700;
}

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

.form-grid,
.resource-grid,
.compact {
  display: grid;
  gap: 12px;
}

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

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

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

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(20, 75, 62, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 96px;
  font-family: var(--mono);
  font-size: 13px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
}

.accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #f4fff9;
}

.ghost {
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  border: 1px solid var(--line);
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.console,
.snippet {
  margin: 0;
  border-radius: 18px;
  padding: 18px;
  font-family: var(--mono);
  font-size: 13px;
  overflow: auto;
}

.console {
  min-height: 520px;
  max-height: 520px;
  background: #15211e;
  color: #ecf8f2;
}

.snippet {
  min-height: 220px;
  background: rgba(20, 75, 62, 0.08);
  color: var(--ink);
}

.deploy-progress {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(20, 75, 62, 0.12);
  border-radius: 18px;
  background: rgba(20, 75, 62, 0.06);
  padding: 14px;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
}

.progress-head strong {
  font-size: 28px;
  letter-spacing: -0.04em;
}

.progress-bar {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(20, 75, 62, 0.12);
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d6b58, #6faf7d);
  transition: width 0.4s ease;
}

.progress-bar span[data-status="failed"] {
  background: linear-gradient(90deg, #aa3324, #d56a3d);
}

.timeline {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  font-size: 13px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(20, 75, 62, 0.22);
}

.timeline li.done {
  color: var(--ink);
}

.timeline li.done::before {
  background: var(--accent);
}

.timeline li.failed {
  color: #8f2c20;
}

.timeline li.failed::before {
  background: #aa3324;
}

.runtime-log-panels {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.runtime-panel {
  overflow: hidden;
  border: 1px solid rgba(20, 75, 62, 0.14);
  border-radius: 18px;
  background: rgba(255, 252, 242, 0.78);
}

.runtime-panel.ready {
  border-color: rgba(29, 107, 88, 0.28);
}

.runtime-panel.failing {
  border-color: rgba(170, 51, 36, 0.34);
  background: rgba(255, 239, 230, 0.64);
}

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

.runtime-head {
  padding: 14px 16px;
  background: rgba(20, 75, 62, 0.08);
}

.runtime-head span {
  display: grid;
  gap: 4px;
}

.runtime-head small,
.runtime-container-head span {
  color: var(--muted);
  font-size: 12px;
}

.runtime-head b {
  white-space: nowrap;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.runtime-error {
  margin: 12px 16px;
  border: 1px solid rgba(170, 51, 36, 0.24);
  border-radius: 12px;
  background: rgba(170, 51, 36, 0.1);
  color: #7e271d;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}

.runtime-pod {
  border-top: 1px solid rgba(20, 75, 62, 0.1);
  padding: 12px 16px;
}

.runtime-pod summary {
  cursor: pointer;
  font-weight: 800;
}

.runtime-container {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.runtime-container h4 {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.runtime-container pre {
  max-height: 280px;
  overflow: auto;
  margin: 0;
  border-radius: 14px;
  background: #101915;
  color: #d6f5df;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
}

.derived-box {
  border: 1px solid rgba(20, 75, 62, 0.12);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(20, 75, 62, 0.06);
}

.derived-box strong {
  display: block;
  margin-bottom: 8px;
}

.derived-box p {
  margin: 6px 0 0;
  color: var(--muted);
}

.inline-check {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.inline-check input,
.service-options input,
.component-card input {
  width: auto;
}

.service-options,
.component-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.service-options label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(20, 75, 62, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  padding: 10px 12px;
}

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

.component-card {
  display: grid;
  gap: 12px;
  border-radius: 18px;
  border: 1px solid rgba(20, 75, 62, 0.12);
  background: rgba(255, 255, 255, 0.52);
  padding: 14px;
}

.component-main {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 8px;
}

.component-main span {
  display: grid;
  gap: 4px;
}

.component-main small {
  color: var(--muted);
  font-size: 12px;
}

.component-controls {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 10px;
}

.component-controls input,
.component-controls select {
  padding: 9px 10px;
  border-radius: 12px;
}

.component-controls small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

.component-env {
  border-top: 1px solid rgba(20, 75, 62, 0.1);
  padding-top: 10px;
}

.component-env summary {
  cursor: pointer;
  font-weight: 700;
}

.component-env small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin: 8px 0;
}

.component-env textarea {
  min-height: 132px;
}

.mini-snippet {
  margin: 14px 0 0;
  max-height: 260px;
  overflow: auto;
  border-radius: 14px;
  padding: 12px;
  background: rgba(20, 75, 62, 0.08);
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
}

@media (max-width: 1080px) {
  .hero,
  .summary-grid,
  .grid,
  .toolbar,
  .service-options,
  .component-options,
  .component-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1340px);
    padding-top: 16px;
  }

  .auth-row,
  .toolbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-grid,
  .resource-grid,
  .compact {
    grid-template-columns: 1fr;
  }
}
