/* ==========================================================================
   style.css — Tela de Login / Cadastro (estilo TikTok claro · España)
   ========================================================================== */
:root {
  --bg: #f5f5f5;
  --card: #ffffff;
  --card-border: #ececee;
  --input: #f1f1f3;
  --input-border: #e5e5e5;
  --text: #000000;
  --muted: #747378;
  --accent: #fe2b54;
  --accent-hover: #ea445a;
  --accent-soft: rgba(254, 43, 84, 0.10);
  --danger: #ef4444;
  --shadow: 0 1px 18.4px 0 rgba(0, 0, 0, 0.03);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Top bar with logo */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--input-border);
  padding: 16px 22px;
  display: flex;
  align-items: center;
}
.topbar-center { justify-content: center; }
.brand-logo { height: 34px; width: auto; display: block; }

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 44px 20px 72px;
  gap: 20px;
  width: 100%;
}

.intro {
  width: 100%;
  max-width: 540px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 38px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.intro::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #25f4ee, #fe2b54);
}
.intro h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); }
.intro p { color: var(--muted); margin-top: 10px; font-size: 15px; line-height: 1.55; max-width: 380px; margin-left: auto; margin-right: auto; }
.lock { position: absolute; top: 26px; right: 26px; opacity: 0.18; color: var(--accent); }

.card {
  width: 100%;
  max-width: 540px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 30px;
}
.field { margin-bottom: 18px; }
.field-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
label { font-size: 14px; font-weight: 600; color: var(--text); }
.link { color: var(--accent); font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer; background: none; border: none; }
.link:hover { text-decoration: underline; }
input {
  width: 100%;
  background: var(--input);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 14px 15px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input::placeholder { color: #a5a4a9; }
input:focus { outline: none; background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.error-message { display: block; color: var(--danger); font-size: 13px; margin-top: 7px; min-height: 16px; }
.btn {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 4px;
  transition: background .15s, transform .1s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .7; cursor: default; }
.btn .spinner {
  width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: none;
}
.btn.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.foot { text-align: center; color: var(--muted); font-size: 14.5px; margin-top: 18px; }
.hidden { display: none !important; }

/* Reset password extras */
.btn-dark { background: #1a1a1a; }
.btn-dark:hover { background: #303030; }
.link-back { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.arrow { font-size: 16px; }
.reset-done-text { text-align: center; color: var(--muted); font-size: 15px; line-height: 1.55; margin-bottom: 20px; }

/* Toast (canto inferior direito) */
.toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 300;
  background: #1a1a1a; border-radius: 12px;
  padding: 15px 18px; max-width: 340px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  transform: translateY(140%); opacity: 0; transition: transform .35s cubic-bezier(.2,1,.3,1), opacity .35s;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-title { color: #fff; font-weight: 700; font-size: 15px; }
.toast-text { color: #b9b9be; font-size: 13.5px; margin-top: 3px; line-height: 1.4; }
@media (max-width: 600px) { .toast { left: 16px; right: 16px; max-width: none; } }

@media (max-width: 600px) {
  .intro h1 { font-size: 26px; }
  .intro, .card { padding: 26px 20px; }
  .lock { top: 20px; right: 20px; }
}
