/* signup.php - tokens come from css/style.css, loaded before this file.
 *
 * ============================================================
 * DELIBERATE EXCEPTION - read before "fixing" this to var(--bg)
 * ============================================================
 * Every other page in the app shares one flat --bg per the site-wide
 * "one consistent background" rule. Login and signup are the ONE
 * explicit, requested exception: they keep their pre-redesign dark
 * gradient + blurred-photo "glass" background on purpose, restored
 * after the redesign because that's what the client actually wanted
 * for these two pages specifically. Do NOT change body/.signup-wrapper
 * back to var(--bg) in a future pass - that would silently undo an
 * intentional design decision, not fix a bug.
 *
 * This gradient/collage/glass treatment is DELIBERATELY IDENTICAL to
 * login.css (same hex values, same blur/opacity numbers) - login and
 * signup are meant to look like one matched flow, not two similar-but-
 * different ones. If you change one side, change the other the same way.
 * (Pre-redesign, the two pages actually used slightly different tones -
 * this was corrected on request so they now match exactly.)
 *
 * Everything below the background (card radius/shadow language via
 * tokens, inputs, buttons, Fraunces/Inter typography) still comes from
 * the shared design system - only the page background and the card's
 * glass treatment (plus a few text colors that need to stay light to
 * stay readable on that dark glass) are the exception.
 */

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1c2c 0%, #312e81 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
}

.signup-wrapper {
  min-height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Blurred product-photo backdrop + tint mask - same technique as before
   the redesign (uploads/preloader_bg.png, blurred/dimmed, then tinted
   navy so it reads as part of the same gradient). */
.signup-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('../uploads/preloader_bg.png') center/cover no-repeat;
  filter: blur(12px) brightness(0.4) saturate(1.3);
  opacity: 0.6;
  z-index: 1;
}

.signup-wrapper::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(30, 27, 75, 0.6);
  z-index: 2;
}

.signup-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(25px) saturate(200%);
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  padding: 3rem 2.5rem;
  max-width: 420px;
  width: 90%;
  position: relative;
  z-index: 10;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sits directly on the translucent glass, so it needs to stay light
   regardless of the --ink token used for headings everywhere else. */
.signup-title {
  text-align: center;
  margin-bottom: 2rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-group:last-of-type {
  margin-bottom: 0;
}

/* Label sits on the glass, not inside the (still-light) input box below
   it, so it needs the same light-text exception as .signup-title. */
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  font-size: 0.95rem;
}

.input-wrapper {
  position: relative;
}

.form-group input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-sans);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input::placeholder {
  color: var(--muted);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46, 185, 252, 0.15);
}

.form-group input:invalid.was-validated-field {
  border-color: #b8402a;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.05rem;
  transition: color 0.2s ease;
}

.form-group:focus-within .input-icon {
  color: var(--accent);
}

.signup-submit {
  width: 100%;
  background: var(--accent);
  color: #04283a;
  border: none;
  padding: 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 1.5rem;
  box-shadow: 0 10px 24px rgba(46, 185, 252, 0.3);
  letter-spacing: 0.02em;
}

.signup-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(46, 185, 252, 0.4);
}

.signup-submit:active {
  transform: translateY(0);
}

.signup-links {
  text-align: center;
  margin-top: 1.5rem;
}

.signup-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.signup-links a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Form alerts - shared look with login.css */
.form-alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  text-align: center;
  position: relative;
  z-index: 10;
}

.form-alert-error {
  background: rgba(245, 101, 101, 0.2);
  border: 1px solid rgba(245, 101, 101, 0.4);
  color: #ffd7d7;
}

.form-alert-success {
  background: rgba(72, 187, 120, 0.2);
  border: 1px solid rgba(72, 187, 120, 0.4);
  color: #d7ffe4;
}

@media (max-width: 480px) {
  .signup-card {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }
}

/* Signup is the larger companion to the approved Login, not a dashboard card.
   Login classes/stylesheet provide shared typography, focus and control styling.
   These page-scoped rules undo the account-security white-card overrides only. */
body.signup-wrapper { overflow-x: hidden; overflow-y: auto; }
.signup-wrapper .signup-card.login-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(25px) saturate(200%);
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  padding: 3rem 2.5rem;
  max-width: 480px;
  width: 90%;
  margin: 24px auto;
  color: #fff;
}
.signup-wrapper .signup-title.login-title {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.signup-wrapper .signup-card .form-group label { color: rgba(255, 255, 255, 0.9); }
.signup-wrapper .signup-links.login-links a { color: rgba(255, 255, 255, 0.8); }
.signup-wrapper .signup-links.login-links a:hover { color: #fff; }
.signup-wrapper .signup-submit.login-submit {
  background: var(--accent);
  color: #04283a;
  box-shadow: 0 10px 24px rgba(46, 185, 252, 0.3);
  letter-spacing: normal;
}
.signup-wrapper .signup-submit.login-submit:hover:not(:disabled) {
  box-shadow: 0 14px 30px rgba(46, 185, 252, 0.4);
}
.signup-wrapper .signup-submit.login-submit:disabled { opacity: 0.8; cursor: not-allowed; transform: none; }
.signup-wrapper .signup-card .password-requirements { color: rgba(255, 255, 255, 0.8); }
.signup-wrapper .signup-card .password-requirements li.met { color: #9de6c0; }
.signup-wrapper .signup-card [data-password-feedback] { color: #ffd7d7; }
.signup-wrapper .signup-card .form-alert-error {
  background: rgba(245, 101, 101, 0.2);
  border-color: rgba(245, 101, 101, 0.4);
  color: #ffd7d7;
}
.signup-wrapper .signup-card .form-alert-success {
  background: rgba(72, 187, 120, 0.2);
  border-color: rgba(72, 187, 120, 0.4);
  color: #d7ffe4;
}
.signup-wrapper .password-toggle { background: #e8edf5; color: #26385b; border-color: #c9d4e5; }
@media (max-width: 480px) {
  .signup-wrapper .signup-card.login-card { padding: 2rem 1.5rem; margin: 1rem auto; }
}
