/* Mezura Funding Portal - auth (sign in) styles. Uses tokens from brand.css.
 * Dark institutional theme matching the EPC portal operational pages. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
}

a { color: var(--green); }
a:hover { text-decoration: underline; }

.hidden { display: none !important; }

/* ───────── Auth shell ───────── */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse at top, rgba(30, 230, 0, 0.07), transparent 60%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem 2rem 2rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.auth-brand {
  margin: 0 0 0.2rem;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--white);
}

.auth-brand-accent { color: var(--green); }

.auth-tagline {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-title {
  margin: 0 0 1.5rem;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--white);
}

.auth-subtitle {
  margin: -1rem 0 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.auth-field {
  display: block;
  text-align: left;
  margin-bottom: 1rem;
}

.auth-field > span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}

.auth-field input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.auth-field input::placeholder { color: rgba(255, 255, 255, 0.3); }

.auth-field input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(30, 230, 0, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.auth-field-password {
  position: relative;
  display: block;
}

.auth-field-password input { padding-right: 2.5rem; }

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 120ms ease, background-color 120ms ease;
}

.password-toggle:hover {
  color: var(--green);
  background: rgba(255, 255, 255, 0.06);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--green-border);
  outline-offset: 1px;
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-family: inherit;
  color: #06200a;
  background: var(--green);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 120ms ease, transform 60ms ease;
}

.btn-primary:hover { background: var(--green-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:focus { outline: 3px solid var(--green-border); outline-offset: 2px; }

.auth-error {
  margin: 0.75rem 0 0;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  color: #ffb4b4;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  text-align: left;
}

.auth-foot {
  margin: 1.25rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.auth-foot-muted { opacity: 0.7; }
