/* ═══════════════════════════════════════════════════
   Email Flow Tester — Estilos
   ═══════════════════════════════════════════════════ */

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #242836;
  --border: #2e3345;
  --text: #e4e6f0;
  --text2: #8b90a5;
  --accent: #6366f1;
  --accent2: #818cf8;
  --green: #22c55e;
  --red: #ef4444;
  --orange: #f59e0b;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Header ──────────────────────────────────── */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { font-size: 28px; }
.brand h1 { font-size: 18px; font-weight: 700; }

nav { display: flex; gap: 4px; }

.tab {
  padding: 8px 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
}
.tab:hover { background: var(--surface2); color: var(--text); }
.tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.dot.online { background: var(--green); }

/* ── Layout ──────────────────────────────────── */

main { max-width: 1100px; margin: 0 auto; padding: 24px; }

.panel { display: none; }
.panel.active { display: block; }

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

/* ── Cards ───────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.card h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent2);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Forms ───────────────────────────────────── */

.api-form { display: flex; flex-direction: column; gap: 10px; }
.inline-form { flex-direction: row; flex-wrap: wrap; }

.api-form input,
.api-form select,
.api-form textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border .2s;
}
.api-form input:focus,
.api-form select:focus,
.api-form textarea:focus { border-color: var(--accent); }

.inline-form input { flex: 1; min-width: 160px; }

.api-form button,
button.secondary {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.api-form button[type="submit"] { background: var(--accent); color: #fff; }
.api-form button[type="submit"]:hover { background: var(--accent2); }

button.secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
button.secondary:hover { background: var(--border); }

button.danger { background: var(--red); color: #fff; }
button.danger:hover { background: #dc2626; }

button.full-width { width: 100%; }
button.small { padding: 6px 12px; font-size: 12px; }

.btn-group { display: flex; gap: 8px; }
.btn-group button { flex: 1; }
.btn-group-vert { display: flex; flex-direction: column; gap: 8px; }
.btn-group-vert button { width: 100%; }

hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

/* ── Response Panel ──────────────────────────── */

.response-panel {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.response-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.response-header h3 { font-size: 14px; flex: 1; }

#responseStatus {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--text2);
}
#responseStatus.ok { background: #064e3b33; color: var(--green); }
#responseStatus.err { background: #7f1d1d33; color: var(--red); }

#responseBody {
  padding: 16px 18px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 400px;
  overflow-y: auto;
  color: var(--text2);
}

/* ── Responsive ──────────────────────────────── */

@media (max-width: 720px) {
  header { flex-wrap: wrap; gap: 10px; }
  .brand h1 { font-size: 15px; }
  .grid-2col { grid-template-columns: 1fr; }
  .inline-form { flex-direction: column; }
}
