/* Rekord login — paleta Omnicraft, dark mode, Inter */
:root {
  --bg: #000000;
  --card: #09090b;
  --border: #27272a;
  --text: #f2f4f5;
  --muted: #a1a1aa;
  --muted-strong: #52525b;
  --danger: #ef4444;
  --success: #10b981;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  display: flex;
}

.auth {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 36px;
  width: 100%;
}

.auth__logo {
  height: 60px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.auth__card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 380px;
}

.auth__title {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text);
}

/* ---- Estados (mostra/esconde via data-show + data-state no body) ---- */
[data-show] { display: none; }
body[data-state="password"]   [data-show="password"],
body[data-state="biometric"]  [data-show="biometric"],
body[data-state="busy"]       [data-show="busy"] {
  display: block;
}
body[data-state="biometric"] [data-show="biometric"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Form / inputs */
.auth__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth__input {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 16px;          /* anti-zoom iOS */
  outline: none;
  letter-spacing: 0.02em;
  transition: border-color 160ms ease;
}

.auth__input::placeholder { color: var(--muted); }

.auth__input:focus { border-color: var(--text); }

.auth__input.is-error {
  border-color: var(--danger);
}

.auth__btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 160ms ease, background 160ms ease, border-color 160ms ease;
  width: 100%;
  min-height: 48px;
}

.auth__btn--primary {
  background: var(--text);
  color: var(--bg);
}
.auth__btn--primary:disabled,
.auth__btn--primary[aria-busy="true"] {
  opacity: 0.4;
  cursor: progress;
}

.auth__btn--secondary {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}
.auth__btn--secondary:active,
.auth__btn--secondary:hover {
  border-color: var(--text);
}

.auth__link {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  padding: 8px;
  text-decoration: underline;
  text-decoration-color: rgba(161, 163, 170, 0.4);
}
.auth__link:hover { color: var(--text); }

.auth__error {
  margin: 0;
  min-height: 1.2em;
  color: var(--danger);
  font-size: 13px;
  letter-spacing: 0.01em;
}

/* Bloco biometria */
.auth__biometric { gap: 12px; }
.auth__biometric-icon { color: var(--muted); }
.auth__biometric-label {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.auth__biometric .auth__btn { margin-top: 4px; }

/* busy */
.auth__busy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  letter-spacing: 0.04em;
}

/* footer */
.auth__footer {
  font-size: 11px;
  color: var(--muted-strong);
  letter-spacing: 0.08em;
  text-align: center;
  flex-shrink: 0;
}
