:root {
  --bg: #f5f2ec;
  --panel: rgba(255, 252, 248, 0.82);
  --panel-solid: #fffcf7;
  --text: #2d2216;
  --muted: #8a7d6e;
  --line: rgba(45, 34, 22, 0.08);
  --green: #2d6a4f;
  --green-soft: rgba(45, 106, 79, 0.08);
  --green-strong: #1b4332;
  --earth: #b08968;
  --danger: #c0392b;
  --shadow: 0 8px 30px rgba(45, 34, 22, 0.08);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  background: var(--bg);
}

button, input, select {
  font: inherit;
}

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

.hero {
  padding: 24px 0 16px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  color: var(--green-strong);
}

h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.summary {
  max-width: 600px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.status-card,
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.status-card {
  border-radius: 16px;
  padding: 18px;
  margin-top: 16px;
}

.status-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--green);
}

.panel {
  margin-top: 14px;
  border-radius: 18px;
  padding: 20px;
}

.page-hidden {
  display: none !important;
}

.login-panel {
  max-width: 640px;
}

summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 600;
  font-size: 14px;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 999px;
  font-size: 13px;
  color: white;
  background: var(--green);
}

details[open] summary::before {
  content: "−";
}

.advanced-panel .panel-head {
  margin-top: 16px;
}

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

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.panel-head.compact {
  margin-bottom: 8px;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.grid {
  display: grid;
  gap: 12px;
}

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

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

.span-two {
  grid-column: span 2;
}

label > span {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.form-note {
  align-self: end;
  min-height: 40px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(45, 106, 79, 0.14);
  border-radius: 12px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 13px;
  line-height: 1.4;
}

input,
select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--text);
  background: var(--panel-solid);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.toggle {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 8px;
  padding-top: 20px;
}

.toggle input {
  width: 16px;
  height: 16px;
}

.toggle span {
  margin: 0;
}

button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 14px;
}

.primary {
  min-height: 46px;
  padding: 0 24px;
  color: white;
  background: var(--green);
  font-weight: 600;
}

.primary:hover {
  background: var(--green-strong);
}

.secondary {
  color: var(--green);
  background: var(--green-soft);
  font-weight: 600;
}

.secondary:hover {
  background: rgba(45, 106, 79, 0.15);
}

.small {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.action-row {
  margin: 16px 0 0;
}

.quick-action {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 16px;
}

.result {
  flex: 1;
  min-height: 46px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--muted);
  background: var(--panel-solid);
  font-size: 14px;
}

.result.success {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(45, 106, 79, 0.2);
}

.result.error {
  color: var(--danger);
  background: rgba(192, 57, 43, 0.06);
  border-color: rgba(192, 57, 43, 0.15);
}

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

pre {
  min-height: 180px;
  max-height: 360px;
  overflow: auto;
  margin: 0;
  border: 1px solid rgba(45, 34, 22, 0.08);
  border-radius: 14px;
  padding: 14px;
  color: #e8e0d5;
  background: #1a1510;
  font: 12px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  white-space: pre-wrap;
}

@media (max-width: 720px) {
  .two,
  .three {
    grid-template-columns: 1fr;
  }

  .span-two {
    grid-column: auto;
  }

  .panel-head,
  .action-row,
  .quick-action {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .button-group {
    flex-direction: column;
  }

  .primary,
  .secondary,
  .button-group button {
    width: 100%;
  }
}
