/* ChatWeb v3 — base styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-0: #0a0a0c;
  --bg-1: #111114;
  --bg-2: #15161a;
  --bg-3: #1c1d22;
  --bg-hover: #1f2025;
  --border: #26282e;
  --border-strong: #34363d;
  --text-0: #fafafa;
  --text-1: #d4d4d8;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --text-4: #52525b;

  --amber: #d4a574;
  --amber-hover: #e2b787;
  --amber-soft: #2a1f12;
  --amber-border: #4d3a23;

  --green: #65a30d;
  --red: #dc2626;
  --blue: #3b82f6;

  --radius: 6px;
  --font-ui: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }

body {
  background: var(--bg-0);
  color: var(--text-0);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); }

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; color-scheme: dark; }

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 6px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ── Botão padrão ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  border: none;
  transition: background .12s, border-color .12s, color .12s, opacity .12s;
  text-decoration: none;
}
.btn-primary {
  background: var(--amber);
  color: var(--bg-0);
}
.btn-primary:hover { background: var(--amber-hover); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--text-1);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-0); border-color: var(--border-strong); }

.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(220, 38, 38, .3);
}
.btn-danger:hover { background: rgba(220, 38, 38, .08); }

/* ── Input padrão ─────────────────────────────────────────── */
.input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-0);
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color .12s;
}
.input:focus { border-color: var(--amber); }
.input::placeholder { color: var(--text-4); }

label.field-label {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 500;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 8px;
  border-radius: 99px;
}
.badge-amber { background: var(--amber-soft); color: var(--amber); border: 1px solid var(--amber-border); }
.badge-muted { background: var(--bg-3); color: var(--text-2); }
.badge-danger { background: rgba(220,38,38,.1); color: var(--red); }
.badge-success { background: rgba(101,163,13,.15); color: #84cc16; }

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  border: 1px solid;
}
.alert-error {
  background: rgba(220, 38, 38, .06);
  color: var(--red);
  border-color: rgba(220, 38, 38, .25);
}
.alert-info {
  background: rgba(59, 130, 246, .05);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, .25);
}
.alert-success {
  background: rgba(101, 163, 13, .08);
  color: #84cc16;
  border-color: rgba(101, 163, 13, .25);
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}

/* ── Avatares com gradiente ───────────────────────────────── */
.av {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,.95);
  flex-shrink: 0;
}
.av-1 { background: linear-gradient(135deg, #d4a574 0%, #8b5a2b 100%); }
.av-2 { background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%); }
.av-3 { background: linear-gradient(135deg, #ec4899 0%, #9d174d 100%); }
.av-4 { background: linear-gradient(135deg, #10b981 0%, #047857 100%); }
.av-5 { background: linear-gradient(135deg, #8b5cf6 0%, #5b21b6 100%); }
.av-6 { background: linear-gradient(135deg, #f97316 0%, #c2410c 100%); }
.av-7 { background: linear-gradient(135deg, #06b6d4 0%, #0e7490 100%); }

/* ── Topbar admin ─────────────────────────────────────────── */
.topbar {
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-0);
}
.topbar .brand {
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 15px;
}
.topbar .brand .accent { color: var(--amber); }

/* ── Tabela ───────────────────────────────────────────────── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table th {
  text-align: left;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(38, 40, 46, .5);
}
.table tr:hover td { background: rgba(21, 22, 26, .5); }
.table tr.dimmed { opacity: .55; }
.table tr.dimmed td { font-style: italic; }

/* ── Modal simples ────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 100%;
  max-width: 440px;
  padding: 24px;
}
.modal-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px;
}

/* ── Utilitários ──────────────────────────────────────────── */
.muted { color: var(--text-3); }
.smaller { font-size: 12px; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-right { text-align: right; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
