/* ============================================================
   AUTH 2.0 — login, cadastro, convite e recuperação
   Base: protótipo v2 (Inter + Space Grotesk, split escuro/claro)
   ============================================================ */

@font-face {
  font-family: "Inter Variable";
  src: url("/brand/fonts/inter-variable-latin.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk Variable";
  src: url("/brand/fonts/space-grotesk-variable-latin.woff2") format("woff2-variations");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "Inter Variable", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk Variable", "Space Grotesk", var(--font);
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, monospace;

  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f4f5f7;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #0d1726;
  --text-2: #344054;
  --muted: #667085;
  --faint: #98a2b3;
  --primary: #0f4c81;
  --primary-hover: #0c3f6b;
  --primary-soft: #e8f0f8;
  --primary-text: #0f4c81;
  --danger: #c4320a;
  --danger-soft: #fdeceb;
  --success: #12805c;
  --success-soft: #e7f6ef;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 0.05);
  --shadow-lg: 0 20px 40px -12px rgb(16 24 40 / 0.18), 0 4px 12px rgb(16 24 40 / 0.06);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
}

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

a { color: inherit; }

/* ---------- split ---------- */

.shell {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(460px, 1fr);
  min-height: 100vh;
}

/* ---------- painel da marca ---------- */

.brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 22px;
  padding: 56px 64px;
  overflow: hidden;
  color: #fff;
  text-align: left;
  isolation: isolate;
  background:
    radial-gradient(circle at 20% 10%, #2a6aa0 0, transparent 55%),
    radial-gradient(circle at 90% 90%, #0b2a4a 0, transparent 60%),
    linear-gradient(160deg, #1d5486 0%, #0b2440 70%, #081a30 100%);
}

.brand__net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.55;
}

.brand__net line {
  stroke: rgb(255 255 255 / 0.28);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.brand__net circle {
  fill: rgb(255 255 255 / 0.45);
}

.brand__logo {
  width: min(300px, 58%);
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 28px rgb(0 0 0 / 0.28));
}

.brand__rule {
  width: 44px;
  height: 2px;
  background: rgb(255 255 255 / 0.35);
}

.brand__tagline {
  max-width: 430px;
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgb(255 255 255 / 0.75);
}

.brand__foot {
  position: absolute;
  bottom: 28px;
  left: 64px;
  right: 64px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.5);
}

/* ---------- painel do formulário ---------- */

.pane {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--surface);
}

.form-card {
  width: 100%;
  max-width: 400px;
  animation: rise 0.3s var(--ease);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.form-card__logo {
  display: none;
  width: 180px;
  margin: 0 auto 28px;
}

.eyebrow {
  margin: 0 0 6px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-text);
}

h1 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hint {
  margin: 0 0 26px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- campos ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
}

.field > span {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
}

.field .hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap input,
.field > input,
.field > select,
.field > textarea {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 0 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-wrap input:focus,
.field > input:focus,
.field > select:focus,
.field > textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.input-wrap input::placeholder,
.field > input::placeholder { color: var(--faint); }

.input-wrap input:disabled {
  background: var(--surface-2);
  color: var(--muted);
}

.input-wrap .reveal {
  position: absolute;
  right: 6px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.input-wrap .reveal:hover { background: var(--surface-2); color: var(--text); }

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

/* ---------- botões ---------- */

.submit,
.google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 42px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  text-decoration: none;
}

.submit {
  margin-top: 22px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
}

.submit:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.submit:disabled { opacity: 0.7; cursor: default; }

.google {
  margin-top: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
}

.google:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.google svg { width: 18px; height: 18px; flex: none; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 4px;
  color: var(--faint);
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- mensagens ---------- */

.error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
}

.success,
.notice {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 13px;
}

.foot {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.foot a {
  color: var(--primary-text);
  font-weight: 500;
  text-decoration: none;
}

.foot a:hover { text-decoration: underline; }

.pw-meter {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.pw-meter i {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--surface-3, #eceef2);
}

.pw-meter i.on { background: var(--success); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .brand { display: none; }
  .pane { padding: 32px 20px; min-height: 100vh; }
  .form-card__logo { display: block; }
  .grid-2 { grid-template-columns: 1fr; }
}
