@font-face{font-family:'Manrope';font-style:normal;font-weight:400;font-display:optional;src:url(/fonts/manrope-400.woff2) format('woff2')}
@font-face{font-family:'Manrope';font-style:normal;font-weight:700;font-display:optional;src:url(/fonts/manrope-700.woff2) format('woff2')}
@font-face{font-family:'Space Grotesk';font-style:normal;font-weight:700;font-display:optional;src:url(/fonts/spacegrotesk-700.woff2) format('woff2')}

:root {
  --text: #111111;
  --muted: #5f5f5f;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-line: rgba(17, 17, 17, 0.1);
  --accent-soft: rgba(17, 17, 17, 0.06);
  --shadow: 0 20px 48px rgba(17, 17, 17, 0.08);
  --radius-lg: 28px;
  --radius-md: 16px;
  --font-heading: "Space Grotesk", "Segoe UI Semibold", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --error: #c0392b;
  --focus-ring: 0 0 0 3px rgba(17,17,17,0.15);
}

* { box-sizing: border-box; }

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

body {
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at top left, rgba(0,0,0,0.05), transparent 24%),
    radial-gradient(circle at 82% 18%, rgba(0,0,0,0.04), transparent 18%),
    linear-gradient(180deg, #ffffff 0%, #f4f4f4 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 24px 16px;
}

/* --- Cabeçalho --- */
.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}

.auth-brand a {
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.auth-brand a span {
  opacity: 0.45;
}

/* --- Card --- */
.auth-card {
  width: min(420px, 100%);
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 36px 32px 32px;
}

/* --- Abas --- */
.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 28px;
}

.auth-tab {
  flex: 1;
  padding: 9px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.auth-tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 4px rgba(17,17,17,0.1);
}

/* --- Formulários --- */
.auth-form { display: none; flex-direction: column; gap: 14px; }
.auth-form.active { display: flex; }

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.auth-field label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.auth-field input {
  padding: 11px 14px;
  border: 1.5px solid var(--panel-line);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-field input:focus {
  border-color: rgba(17,17,17,0.4);
  box-shadow: var(--focus-ring);
}

.auth-error {
  font-size: 0.875rem;
  color: var(--error);
  min-height: 1.2em;
  display: none;
}

.auth-error.visible { display: block; }

/* --- Botão principal --- */
.auth-submit {
  margin-top: 4px;
  padding: 13px 18px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--text);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.auth-submit:hover { opacity: 0.85; }
.auth-submit:disabled { opacity: 0.5; cursor: default; }

/* --- Divisor --- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.8125rem;
}

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

/* --- Wrapper do botão GIS (centraliza o botão renderizado pelo Google) --- */
.gis-btn-wrapper {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

/* --- Rodapé do card --- */
.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
}

.auth-footer a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

/* --- Toggle de senha --- */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 44px;
  width: 100%;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  outline: none;
  box-shadow: none;
  cursor: pointer;
  padding: 4px;
  line-height: 0;
  opacity: 0.7;
  transition: opacity 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.password-toggle:hover { opacity: 1; }
.password-toggle:focus { outline: none; }

/* --- Spinner de loading --- */
.auth-submit.loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 440px) {
  .auth-card { padding: 28px 20px 24px; }
}
