:root {
  --bg: #0f1419;
  --card: #1a2332;
  --text: #e7edf4;
  --muted: #8b9cb3;
  --accent: #3b82f6;
  --accent2: #22c55e;
  --danger: #ef4444;
  --border: #2d3a4d;
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: linear-gradient(160deg, #0b0f14 0%, #121a24 40%, #0f1419 100%);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

body.embed {
  background: transparent;
}

.wrap-embed {
  max-width: 1100px;
  padding: 0.75rem 0.75rem 1.25rem;
}

.embed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0;
  margin-bottom: 0.75rem;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

nav.top a {
  margin-right: 0.85rem;
  color: var(--muted);
  font-size: 0.95rem;
}

nav.top a:hover {
  color: var(--text);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.15rem;
  margin: 1.25rem 0 0.5rem;
}

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

.btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
}

.btn:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.btn.secondary {
  background: #334155;
}

.btn.danger {
  background: var(--danger);
}

.grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
select,
textarea {
  width: 100%;
  max-width: 420px;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0f172a;
  color: var(--text);
}

textarea {
  max-width: 100%;
  min-height: 80px;
}

.error {
  color: #fca5a5;
  margin-top: 0.35rem;
}

.ok {
  color: var(--accent2);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

pre.log {
  background: #0b1020;
  padding: 1rem;
  border-radius: 8px;
  overflow: auto;
  max-height: 420px;
  font-size: 0.82rem;
  border: 1px solid var(--border);
}
