@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  --page-bg: #f7f7f7;
  --card-bg: #ffffff;
  --text: #171717;
  --muted: #6b6f76;
  --border: #ededed;
  --accent: #06b6d4;        /* marca */
  --accent-strong: #0891b2; /* botoes: melhor contraste com texto branco */
  --accent-hover: #0e7490;
  --error: #e2445c;
  --success: #2e9e5b;
  --input-bg: #ffffff;
}

:root[data-theme="dark"] {
  --page-bg: #0f1115;
  --card-bg: #171a21;
  --text: #e6e8eb;
  --muted: #9198a3;
  --border: #2a2e37;
  --accent: #22d3ee;
  --accent-strong: #0891b2;
  --accent-hover: #06b6d4;
  --error: #f87171;
  --success: #4ade80;
  --input-bg: #10131a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  background: var(--page-bg);
  color: var(--text);
}
.auth-card {
  width: 400px;
  max-width: calc(100vw - 32px);
  background: var(--card-bg);
  border-radius: 10px;
  padding: 24px 24px 20px;
}
.auth-card h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 20px;
  color: var(--text);
}
.site-brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--text);
  user-select: none;
}
.site-brand span { color: var(--accent); }
.brand-logo {
  display: block;
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.25);
}
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.field .input-wrapper {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 2px 0 0 rgba(29, 41, 61, 0.04);
}
.field input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  border-radius: 10px;
}
button.btn-primary {
  width: 100%;
  background: var(--accent-strong);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  margin-top: 4px;
}
button.btn-primary:hover { background: var(--accent-hover); }
.auth-links {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
}
.auth-links a {
  color: var(--text);
  text-decoration: underline;
}
.msg { margin-top: 12px; font-size: 13px; text-align: center; }
.msg.ok { color: var(--success); }
.msg.err { color: var(--error); }

.theme-toggle {
  position: fixed; bottom: 20px; right: 20px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%; padding: 0; margin: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-bg); color: var(--text); border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15); cursor: pointer;
}
.theme-toggle:hover { opacity: 0.85; }

/* Em ecras curtos (ex: telemovel em paisagem), garante que os links por
   baixo do cartao (Esqueceu a senha? / Registar) nao ficam atras dos botoes. */
@media (max-width: 640px) {
  body { padding-bottom: 90px; }
}

.lang-toggle {
  position: fixed; bottom: 20px; right: 76px; z-index: 40;
  height: 44px; min-width: 44px; padding: 0 14px; margin: 0; border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card-bg); color: var(--text); border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15); cursor: pointer;
  font-size: 13px; font-weight: 600;
}
.lang-toggle:hover { opacity: 0.85; }
