/* ============================================================
   auth.css  —  Authentication pages (login, register, etc.)
   Uses CSS variables injected by layouts/auth.php:
     --gold  --ink  --bg
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  background: var(--bg, #04060A);
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---- Layout ---- */
.auth-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  gap: 1.5rem;
}

.auth-box {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

/* ---- Brand ---- */
.auth-logo-link {
  display: block;
  text-decoration: none;
}

.auth-logo {
  max-height: 52px;
  max-width: 200px;
  object-fit: contain;
}

.auth-logo-text {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold, #C9A24B);
  letter-spacing: 0.03em;
}

.auth-product {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
  margin-top: -0.75rem;
}

/* ---- Card ---- */
.auth-card {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 2rem 1.75rem;
}

.auth-heading {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: #f1f5f9;
}

.auth-intro {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.auth-hint {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0.5rem 0 1rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.25rem 0;
  color: #64748b;
  font-size: 0.78rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.auth-divider span { padding: 0 0.75rem; }

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.7rem 1rem;
  background: #fff;
  color: #1f2937;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 7px;
  text-decoration: none;
  border: 1px solid #dadce0;
  transition: background 0.15s;
}
.btn-google:hover { background: #f5f5f5; }
.btn-google::before {
  content: "G";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: conic-gradient(from -45deg, #ea4335 110deg, #4285f4 90deg 180deg, #34a853 180deg 270deg, #fbbc05 270deg) ;
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
  font-size: 0.7rem;
}

/* ---- Form ---- */
label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 0.35rem;
  margin-top: 1rem;
}

label:first-of-type { margin-top: 0; }

input[type="text"],
input[type="email"],
input[type="password"] {
  display: block;
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 7px;
  color: #f1f5f9;
  font-size: 0.95rem;
  transition: border-color 0.15s, background 0.15s;
  outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: var(--gold, #C9A24B);
  background: rgba(255,255,255,0.09);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder {
  color: #475569;
}

small {
  display: block;
  font-size: 0.73rem;
  color: #64748b;
  margin-top: 0.3rem;
}

.opt { font-weight: 400; color: #64748b; }

/* ---- Auth extras (forgot link row) ---- */
.auth-extras {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.4rem;
  margin-bottom: 0.2rem;
}

.auth-extras a {
  font-size: 0.8rem;
  color: #64748b;
  text-decoration: none;
}

.auth-extras a:hover { color: var(--gold, #C9A24B); }

/* ---- Buttons ---- */
.btn-primary {
  display: block;
  width: 100%;
  margin-top: 1.4rem;
  padding: 0.7rem 1rem;
  background: var(--gold, #C9A24B);
  color: var(--ink, #0A0F16);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-primary:hover  { opacity: 0.88; }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.25rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 7px;
  color: #94a3b8;
  font-size: 0.9rem;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

.btn-secondary:hover {
  border-color: var(--gold, #C9A24B);
  color: var(--gold, #C9A24B);
}

/* ---- Switch / footer links ---- */
.auth-switch {
  font-size: 0.82rem;
  color: #64748b;
  text-align: center;
  margin-top: 1.1rem;
}

.auth-switch a {
  color: var(--gold, #C9A24B);
  text-decoration: none;
}

.auth-switch a:hover { text-decoration: underline; }

.auth-body {
  font-size: 0.9rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 0.6rem;
}

.auth-body.small { font-size: 0.8rem; }

.auth-body a {
  color: var(--gold, #C9A24B);
  text-decoration: none;
}

.auth-body a:hover { text-decoration: underline; }

/* ---- Registered icon ---- */
.registered-icon {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 0.25rem;
}

/* ---- Flash messages ---- */
.msg {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 7px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.msg.ok  { background: rgba(34,197,94,0.12);  color: #86efac; border: 1px solid rgba(34,197,94,0.25); }
.msg.err { background: rgba(239,68,68,0.12);  color: #fca5a5; border: 1px solid rgba(239,68,68,0.25); }
.msg a   { color: inherit; text-decoration: underline; }

/* ---- Footer ---- */
.auth-foot {
  font-size: 0.73rem;
  color: #334155;
  text-align: center;
}

/* ---- Mobile ---- */
@media (max-width: 480px) {
  .auth-card { padding: 1.5rem 1.25rem; }
}

/* ---- Language switcher ---- */
.auth-lang {
  display: flex;
  gap: .35rem;
  justify-content: center;
  margin-top: 1.25rem;
}
.auth-lang .lang-btn {
  font-size: .72rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.12);
  color: #64748b;
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.auth-lang .lang-btn:hover { color: var(--gold); border-color: var(--gold); }
.auth-lang .lang-btn--active {
  color: var(--gold);
  border-color: var(--gold);
  cursor: default;
}
