/* Identidade visual do REmeet: fundo azul-noite, violeta como cor principal e turquesa de destaque. */
:root {
  color-scheme: dark;
  --bg: #0c0e15;
  --bg-2: #10131c;
  --surface: #151823;
  --surface-2: #1d2130;
  --surface-3: #2a2f43;
  --border: #242939;
  --border-strong: #343a52;
  --text: #eceef7;
  --muted: #97a0b8;
  --primary: #8f83ff;
  --primary-strong: #6d5efc;
  --primary-text: #ffffff;
  --accent: #2dd4bf;
  --grad: linear-gradient(135deg, #a397ff 0%, #5b8dff 50%, #2dd4bf 100%);
  --grad-btn: linear-gradient(135deg, #7465fd 0%, #4a63e8 100%);
  --danger: #f4515f;
  --danger-soft: rgba(244, 81, 95, 0.16);
  --success: #34d399;
  --warn: #fbbf24;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --ring: 0 0 0 3px rgba(143, 131, 255, 0.35);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* fundo com brilhos suaves, usado nas telas de entrada (início, login, nome, espera) */
.backdrop {
  background:
    radial-gradient(900px 520px at 8% -12%, rgba(124, 108, 255, 0.30), transparent 62%),
    radial-gradient(760px 520px at 104% 112%, rgba(45, 212, 191, 0.18), transparent 60%),
    radial-gradient(520px 380px at 92% -8%, rgba(91, 141, 255, 0.16), transparent 60%),
    var(--bg);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 8px; font-weight: 650; letter-spacing: -0.015em; }
h1 { font-size: 24px; text-wrap: balance; }
h2 { font-size: 17px; }
h3 { font-size: 14px; }
p { margin: 0 0 10px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: #ff8a93; }
.success { color: #6ee7b7; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
code.mono, span.mono { background: var(--bg-2); border: 1px solid var(--border); border-radius: 6px; padding: 0 5px; font-size: .92em; }

input, select, textarea, button { font: inherit; color: inherit; }
input[type="text"], input[type="password"], input[type="number"], input[type="datetime-local"], input[type="search"], input[type="email"], input:not([type]), select, textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder, textarea::placeholder { color: #69728c; }
input:hover, select:hover, textarea:hover { border-color: #444b68; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: var(--ring); background: #0e111a; }
input:disabled, textarea:disabled, select:disabled { opacity: .55; cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary-strong); }
textarea { resize: vertical; min-height: 60px; }
select option { background: var(--surface-2); }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.field { margin-bottom: 12px; }
.row { display: flex; gap: 10px; align-items: flex-end; }
.row > * { flex: 1; min-width: 0; }
.row.tight { gap: 6px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; font-weight: 400; }
.check input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, transform .06s, box-shadow .15s, filter .15s;
  white-space: nowrap; font-weight: 600; font-size: 14px; line-height: 1.2;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:focus-visible, .link:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.primary { background: var(--grad-btn); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(93, 84, 240, 0.35); }
.btn.primary:hover { background: var(--grad-btn); filter: brightness(1.12); }
.btn.danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn.danger:hover { background: #ff6571; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.full { width: 100%; }
.link { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; font-size: inherit; border-radius: 4px; }
.link:hover { text-decoration: underline; }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.badge {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text); margin-left: 6px; vertical-align: middle;
}
.badge.admin { background: var(--primary-strong); color: #fff; }
.badge.count { background: var(--danger); color: #fff; margin-left: 4px; min-width: 18px; text-align: center; }

/* marca: símbolo (public/icon.svg) + nome, com "RE" em degradê */
.brand {
  display: inline-flex; align-items: center; font-weight: 700; font-size: 20px; letter-spacing: -0.02em;
  color: var(--text); line-height: 1; white-space: nowrap;
}
.brand::before {
  content: ""; width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; margin-right: 10px;
  background: url("/icon.svg") center / contain no-repeat;
  box-shadow: 0 4px 14px rgba(109, 94, 252, 0.35);
}
.brand b { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand.small { font-size: 16px; }
.brand.small::before { width: 24px; height: 24px; border-radius: 6px; margin-right: 8px; }
.brand.big { font-size: 28px; }
.brand.big::before { width: 44px; height: 44px; border-radius: 12px; margin-right: 12px; }

.toasts { position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 1000; pointer-events: none; }
.toast {
  background: rgba(21, 24, 35, 0.94); color: var(--text); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow);
  border: 1px solid var(--border-strong); border-left: 3px solid var(--primary);
  font-size: 13px; max-width: 420px; animation: toast-in .2s ease-out; backdrop-filter: blur(10px);
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.avatar {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff;
  font-weight: 650; user-select: none; flex-shrink: 0; text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14), inset 0 -12px 18px rgba(0, 0, 0, 0.18);
}
.avatar.sm { width: 34px; height: 34px; font-size: 13px; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3a4060; }
::-webkit-scrollbar-track { background: transparent; }
::selection { background: rgba(143, 131, 255, 0.35); }
