/* =============================================================
   auth.css — suprafata dark a paginilor de autentificare (login).
   Tokenii vin din :root din app.css. Selectoarele sunt scope-uite
   la .auth-body / .auth-page, deci nu afecteaza restul aplicatiei.
   ============================================================= */

body.auth-body {
  min-height: 100vh;
  margin: 0;
  background: var(--em-navy);
  color: var(--em-cream);
  font-family: var(--font-ui);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 26px 28px 32px;
}

/* atmosphere */
.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.auth-blob-spark {
  width: 540px;
  height: 540px;
  background: var(--em-coral-mid);
  top: -200px;
  right: -160px;
  opacity: 0.42;
}
.auth-blob-mint {
  width: 520px;
  height: 520px;
  background: var(--em-mint);
  bottom: -240px;
  left: -160px;
  opacity: 0.28;
}
.auth-grid {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  background-image:
    linear-gradient(var(--em-cream) 1px, transparent 1px),
    linear-gradient(90deg, var(--em-cream) 1px, transparent 1px);
  background-size: 64px 64px;
}
.auth-floaters {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.auth-floaters svg {
  position: absolute;
  animation: auth-float 7s ease-in-out infinite;
}
.auth-floaters .f1 { top: 14%; right: 11%; animation-delay: 0s; }
.auth-floaters .f2 { top: 70%; right: 22%; animation-delay: 1.6s; }
.auth-floaters .f3 { top: 30%; left: 8%; animation-delay: 2.4s; }
.auth-floaters .f4 { bottom: 14%; left: 18%; animation-delay: 3.2s; }
@keyframes auth-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-18px) rotate(8deg); }
}

/* top bar */
.auth-topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}
.auth-brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--em-cream);
  text-decoration: none;
}
.auth-brand-link .wm {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.auth-brand-link .wm .sp {
  color: var(--em-coral-mid);
}
.auth-help-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--em-ink-line);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  color: var(--em-slate-300);
  background: rgba(255, 252, 246, 0.03);
  text-decoration: none;
  transition: border-color 0.25s, color 0.25s;
}
.auth-help-pill:hover {
  border-color: var(--em-ink-line-strong);
  color: var(--em-cream);
}

/* stage */
.auth-stage {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  padding: 48px 0;
}

/* card */
.auth-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  min-width: 0;
  background: rgba(255, 252, 246, 0.04);
  border: 1px solid var(--em-ink-line);
  border-radius: var(--r-card-lg);
  padding: 42px 38px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 252, 246, 0.04) inset;
}
.auth-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--em-mint);
  font-weight: 500;
}
.auth-card h1 {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: 42px;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 10px 0 8px;
  color: var(--em-cream);
}
.auth-card h1 .dot {
  color: var(--em-coral-mid);
}
.auth-sub {
  color: var(--em-slate-300);
  font-size: 15px;
  margin: 0 0 30px;
}
.auth-sub b {
  color: var(--em-coral-mid);
  font-weight: 700;
}

/* alert */
.auth-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 106, 61, 0.35);
  background: rgba(255, 106, 61, 0.12);
  color: var(--em-cream);
  font-size: 14px;
}

/* form */
.auth-form {
  display: block;
}
.auth-field {
  margin-bottom: 16px;
}
.auth-field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--em-slate-400);
  margin: 0 0 8px 4px;
}
.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-wrap svg.lead {
  position: absolute;
  left: 18px;
  color: var(--em-slate-400);
  pointer-events: none;
}
.auth-input-wrap input {
  width: 100%;
  background: rgba(255, 252, 246, 0.05);
  border: 1px solid var(--em-ink-line);
  border-radius: var(--r-pill);
  padding: 15px 22px 15px 50px;
  color: var(--em-cream);
  font-family: var(--font-ui);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.auth-input-wrap input::placeholder {
  color: var(--em-slate-500);
}
.auth-input-wrap input:focus {
  border-color: var(--em-mint);
  background: rgba(255, 252, 246, 0.08);
  box-shadow: 0 0 0 4px rgba(25, 200, 160, 0.12);
}
.auth-toggle {
  position: absolute;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--em-slate-400);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.auth-toggle:hover {
  color: var(--em-cream);
  background: rgba(255, 252, 246, 0.06);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 4px 22px;
}
.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--em-slate-300);
  cursor: pointer;
  user-select: none;
}
.auth-check input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid var(--em-ink-line-strong);
  background: rgba(255, 252, 246, 0.04);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.auth-check input:checked {
  background: var(--em-mint);
  border-color: var(--em-mint);
}
.auth-check input:checked::after {
  content: "";
  width: 10px;
  height: 10px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d1321' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/contain no-repeat;
}
.auth-forgot {
  font-size: 14px;
  color: var(--em-mint);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.auth-forgot:hover {
  color: var(--em-cream);
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: var(--r-pill);
  padding: 16px 26px;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s, border-color 0.25s;
}
.auth-btn-primary {
  background: var(--em-coral-mid);
  color: #fff;
  box-shadow: 0 14px 30px -12px rgba(255, 106, 61, 0.55);
}
.auth-btn-primary:hover {
  background: var(--em-spark-deep);
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -12px rgba(255, 106, 61, 0.7);
}
.auth-btn-primary:active {
  transform: translateY(0);
}
.auth-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  background: transparent;
  color: var(--em-cream);
  border: 1px solid var(--em-ink-line);
  border-radius: var(--r-pill);
  padding: 14px 22px;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
}
.auth-btn-ghost:hover {
  border-color: var(--em-cream);
  background: rgba(255, 252, 246, 0.04);
  transform: translateY(-2px);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 20px;
  color: var(--em-slate-500);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--em-ink-line);
}

.auth-card-foot {
  margin-top: 26px;
  font-size: 14px;
  color: var(--em-slate-400);
  text-align: center;
}
.auth-card-foot a {
  color: var(--em-mint);
  font-weight: 700;
  text-decoration: none;
}
.auth-card-foot a:hover {
  color: var(--em-cream);
}

/* footer */
.auth-foot {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding-top: 18px;
}
.auth-foot .mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--em-slate-500);
}
.auth-foot nav {
  display: flex;
  gap: 22px;
  font-size: 13px;
  color: var(--em-slate-400);
}
.auth-foot nav a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.auth-foot nav a:hover {
  color: var(--em-cream);
}

/* intro fade */
.auth-fade {
  opacity: 0;
  transform: translateY(20px);
  animation: auth-fade 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
@keyframes auth-fade {
  to {
    opacity: 1;
    transform: none;
  }
}
.auth-d1 { animation-delay: 0.05s; }
.auth-d2 { animation-delay: 0.18s; }
.auth-d3 { animation-delay: 0.32s; }

@media (max-width: 540px) {
  .auth-page {
    padding: 20px 16px 24px;
  }
  .auth-stage {
    padding: 32px 0;
  }
  .auth-card {
    padding: 28px 20px;
    border-radius: var(--r-card);
  }
  .auth-card h1 {
    font-size: 32px;
  }
  .auth-sub {
    font-size: 14.5px;
    margin-bottom: 24px;
  }
  .auth-input-wrap input {
    padding: 14px 18px 14px 46px;
    font-size: 14.5px;
  }
  .auth-input-wrap svg.lead {
    left: 16px;
  }
  .auth-toggle {
    right: 10px;
  }
  .auth-row {
    margin: 4px 2px 18px;
  }
  .auth-help-pill span:not(.dot) {
    display: none;
  }
  .auth-help-pill {
    padding: 8px 10px;
  }
  .auth-floaters {
    display: none;
  }
  .auth-foot {
    justify-content: center;
    text-align: center;
  }
  .auth-foot .mono {
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  .auth-page {
    padding: 16px 12px 20px;
  }
  .auth-card {
    padding: 24px 16px;
  }
  .auth-card h1 {
    font-size: 28px;
  }
  .auth-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
