:root {
  --bg: #eaf3fb;
  --bg-soft: #f4f9fe;
  --surface: #ffffff;
  --surface-2: #e3eef9;
  --border: #cfe0f0;
  --text: #0f2740;
  --text-muted: #5b7794;
  --primary: #1a73e8;
  --primary-hover: #1765cc;
  --primary-soft: #d8e9fd;
  --bubble-me: #1a73e8;
  --bubble-me-text: #ffffff;
  --bubble-them: #ffffff;
  --bubble-them-text: #0f2740;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(26, 115, 232, 0.10);
  --shadow-sm: 0 2px 8px rgba(26, 115, 232, 0.08);
  --error: #c0392b;
  --success: #1e8e4a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}

h1, h2 { margin: 0; font-weight: 700; }

.btn {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, transform .05s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-hover); }

.btn-ghost { background: var(--primary-soft); color: var(--primary); }
.btn-ghost:hover { background: #c9e0fb; }

.btn-sm { padding: 7px 12px; font-size: 13px; }

input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder { color: var(--text-muted); }
input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.15);
}
.brand h1 { font-size: 22px; letter-spacing: -0.3px; }

/* Mensagens de aviso */
.msg {
  min-height: 20px;
  font-size: 13px;
  margin: 4px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  line-height: 1.35;
}
.msg.hidden { display: none; }
.msg.error {
  color: var(--error);
  background: #fdecea;
  border: 1px solid #f5c6c1;
}
.msg.success {
  color: var(--success);
  background: #e6f4ec;
  border: 1px solid #b9dfc8;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 13px; font-weight: 600; color: var(--text-muted); }

/* ===== Tema escuro ===== */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b141f;
  --bg-soft: #0f1b29;
  --surface: #14212f;
  --surface-2: #1b2c3f;
  --border: #24384d;
  --text: #e6eef7;
  --text-muted: #8ba3bb;
  --primary: #4c9bff;
  --primary-hover: #3a87eb;
  --primary-soft: #1c3453;
  --bubble-me: #1a73e8;
  --bubble-me-text: #ffffff;
  --bubble-them: #1b2c3f;
  --bubble-them-text: #e6eef7;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --error: #ff8a8a;
  --success: #6fdc98;
}
