:root {
  --bg: #edf4f8;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: #d5e2ea;
  --primary: #0e7490;
  --primary-2: #155e75;
  --copy: #0b6ea8;
  --copy-2: #095888;
  --danger: #b91c1c;
  --ok: #166534;
  --mono-bg: #0b1220;
  --mono-text: #d9e2f2;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #dff0f7 0%, var(--bg) 280px);
  min-height: 100vh;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(14,116,144,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(14,116,144,.05) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

.shell {
  width: min(980px, 92vw);
  margin: 26px auto 40px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  letter-spacing: -.02em;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--primary-2);
  text-transform: uppercase;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.lead { margin: 10px 0 0; color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  margin-top: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
}

.note h2 { margin: 0 0 8px; font-size: 1rem; }
.note p { margin: 0 0 8px; }
.note code {
  background: #f2f7fb;
  border: 1px solid var(--line);
  padding: 6px 8px;
  border-radius: 8px;
  display: inline-block;
  word-break: break-all;
}

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

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

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .9rem;
  font-weight: 600;
}

input, textarea {
  border: 1px solid #c9d8e3;
  border-radius: 11px;
  background: #f8fbfd;
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14,116,144,.16);
}

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

.actions-inline { display: flex; justify-content: flex-end; }
.actions-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s ease, opacity .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}

.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, .15);
}

.btn.primary {
  background: linear-gradient(135deg, #0e7490, #155e75);
  color: #fff;
  box-shadow: 0 10px 18px rgba(14,116,144,.24);
}
.btn.primary:hover {
  background: linear-gradient(135deg, #0f809f, #0f5f78);
  box-shadow: 0 12px 22px rgba(14,116,144,.3);
}

.btn.secondary {
  background: linear-gradient(135deg, #e8f4ff, #d9efff);
  border-color: #7fc1e6;
  color: var(--copy-2);
  box-shadow: 0 6px 14px rgba(11, 110, 168, .15);
}
.btn.secondary:hover {
  background: linear-gradient(135deg, #d5ecff, #c2e5ff);
  border-color: var(--copy);
  color: #07466f;
  box-shadow: 0 10px 18px rgba(11, 110, 168, .24);
}

.btn.ghost {
  background: #f7fbff;
  border-color: #b9cfde;
  color: #1c4058;
}
.btn.ghost:hover {
  background: #edf6fc;
  border-color: #97bed5;
  color: #12354c;
  box-shadow: 0 4px 10px rgba(10, 79, 99, .12);
}

#copyConsole {
  min-width: 290px;
  font-size: .95rem;
}

.status-top { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.badge {
  border: 1px solid var(--line);
  background: #f7fafc;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: .86rem;
  font-weight: 600;
}

#log {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--mono-bg);
  color: var(--mono-text);
  border-radius: 12px;
  border: 1px solid #1e293b;
  padding: 12px;
  min-height: 130px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .78rem;
}

.muted { color: var(--muted); font-size: .9rem; }

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .actions-row .btn { width: 100%; }
  .actions-inline { justify-content: stretch; }
  .actions-inline .btn { width: 100%; min-width: 0; }
}
