/* ============================================================
   css/auth.css — Login + Register (design Soft Tech, 2026-06)
   Folosit de: login.php, register.php, register_client.php
   Tokens identice cu css/index.css (sursa de adevăr) — dacă
   modifici o culoare acolo, modific-o și aici.
   Tema se comută prin [data-theme] pe <html> (light implicit).
   ============================================================ */

:root {
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;

  /* Light theme */
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-2: #eef3f0;
  --surface-3: #e6ece8;
  --border: #e2e8e4;
  --border-strong: #d3dbd6;
  --text: #0e1714;
  --text-2: #47544e;
  --text-3: #6c7872;

  --green: #08a05f;
  --green-hover: #068250;
  --green-soft: rgba(8,160,95,0.10);
  --on-green: #ffffff;

  --indigo: #5b50e8;
  --indigo-hover: #4a40d4;
  --indigo-soft: rgba(91,80,232,0.10);
  --on-indigo: #ffffff;

  --sos: #e5334b;
  --sos-soft: rgba(229,51,75,0.10);

  --shadow-sm: 0 1px 2px rgba(14,23,20,0.05);
  --shadow-md: 0 1px 2px rgba(14,23,20,0.04), 0 12px 28px -10px rgba(14,23,20,0.12);
  --glow-green: none;
  --glow-indigo: none;

  --side-grad:
    radial-gradient(700px 500px at 15% 10%, var(--green-soft), transparent 65%),
    radial-gradient(700px 500px at 90% 95%, var(--indigo-soft), transparent 65%);
}

[data-theme="dark"] {
  --bg: #0b100e;
  --surface: #141a18;
  --surface-2: #1a221f;
  --surface-3: #212b27;
  --border: #28332e;
  --border-strong: #36433c;
  --text: #eaf2ee;
  --text-2: #9eb0a8;
  --text-3: #73857d;

  --green: #2bef9a;
  --green-hover: #45f5a6;
  --green-soft: rgba(43,239,154,0.13);
  --on-green: #04150d;

  --indigo: #9d8cff;
  --indigo-hover: #b1a4ff;
  --indigo-soft: rgba(157,140,255,0.15);
  --on-indigo: #0c0a1e;

  --sos: #ff5168;
  --sos-soft: rgba(255,81,104,0.15);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 1px 2px rgba(0,0,0,0.4), 0 16px 36px -12px rgba(0,0,0,0.6);
  --glow-green: 0 0 28px -6px rgba(43,239,154,0.55);
  --glow-indigo: 0 0 28px -6px rgba(157,140,255,0.5);
}

/* Suprascriu baza din header.css (încărcat înainte) */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease, color .4s ease;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ── Logo (identic cu homepage) ──────────────────────────────── */
.logo { display: inline-flex; align-items: center; gap: 11px; }
.logo__mark { width: 40px; height: 40px; flex-shrink: 0; }
.logo__word {
  font-family: var(--font-display);
  font-weight: 700; font-size: 21px; letter-spacing: -0.02em;
  color: var(--text); line-height: 1;
}
.logo__word .dot { color: var(--green); }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2); transition: all .25s ease; flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--border-strong); color: var(--text); }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

/* ── Layout split-screen ─────────────────────────────────────── */
.auth {
  display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr);
  min-height: 100vh; min-height: 100dvh;
}

/* Panoul de brand (stânga) */
.auth-side {
  position: relative; overflow: hidden;
  background: var(--surface-2);
  background-image: var(--side-grad);
  border-right: 1px solid var(--border);
  padding: 34px 40px 30px;
  display: flex; flex-direction: column;
  transition: background-color .4s ease, border-color .4s ease;
}
.auth-side__body { margin: auto 0; padding: 40px 0; }
.auth-side__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 18px;
}
.auth-side__eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--green); }
.auth--indigo .auth-side__eyebrow::before { background: var(--indigo); }
.auth-side h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 2.6vw, 34px); line-height: 1.12; letter-spacing: -0.025em;
  color: var(--text); max-width: 360px; text-wrap: balance;
}
.auth-side h2 .accent { color: var(--green); }
.auth--indigo .auth-side h2 .accent { color: var(--indigo); }
.auth-side__sub { font-size: 14.5px; color: var(--text-2); margin-top: 14px; max-width: 340px; line-height: 1.6; }

.auth-side__list { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.auth-side__list li { display: flex; align-items: flex-start; gap: 11px; font-size: 14.5px; color: var(--text-2); }
.auth-side__list svg { width: 19px; height: 19px; flex-shrink: 0; margin-top: 1px; color: var(--green); }
.auth--indigo .auth-side__list svg { color: var(--indigo); }

.auth-side__foot { font-size: 13px; color: var(--text-3); }
.auth-side__foot a { color: var(--green); font-weight: 600; }
.auth-side__foot a:hover { color: var(--green-hover); }

/* Roată dințată decorativă, foarte discretă, în colțul panoului */
.auth-side::after {
  content: ""; position: absolute; right: -90px; bottom: -90px;
  width: 280px; height: 280px; border-radius: 50%;
  border: 36px dashed var(--border);
  opacity: .55; pointer-events: none;
}

/* Coloana formularului (dreapta) */
.auth-main {
  display: flex; flex-direction: column;
  padding: 22px clamp(20px, 5vw, 60px) 26px;
}
.auth-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.auth-topbar__right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
/* Pe desktop logo-ul stă în panoul lateral; în topbar apare doar când panoul dispare */
.auth-topbar .logo { display: none; }
.auth-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--text-3);
  padding: 9px 13px; border-radius: 10px; transition: all .2s ease;
}
.auth-back:hover { color: var(--text); background: var(--surface-2); }
.auth-back svg { width: 15px; height: 15px; }

.auth-box { width: 100%; max-width: 440px; margin: auto; padding: 36px 0; }
.auth-box__icon {
  width: 52px; height: 52px; border-radius: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--green-soft); color: var(--green); font-size: 21px;
  margin-bottom: 18px;
}
.auth--indigo .auth-box__icon { background: var(--indigo-soft); color: var(--indigo); }
.auth-box h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(26px, 3vw, 32px); letter-spacing: -0.025em; line-height: 1.1;
  color: var(--text);
}
.auth-box__sub { font-size: 14.5px; color: var(--text-2); margin-top: 9px; }
.auth-box__sub a { color: var(--green); font-weight: 600; }
.auth-box__sub a:hover { color: var(--green-hover); }
.auth--indigo .auth-box__sub a { color: var(--indigo); }
.auth--indigo .auth-box__sub a:hover { color: var(--indigo-hover); }

/* ── Alerte ──────────────────────────────────────────────────── */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 20px; padding: 13px 15px; border-radius: 13px;
  font-size: 14px; font-weight: 500; line-height: 1.45;
}
.alert i { margin-top: 2px; }
.alert ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.alert-error { background: var(--sos-soft); color: var(--sos); border: 1px solid color-mix(in srgb, var(--sos) 25%, transparent); }
.alert-success { background: var(--green-soft); color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 25%, transparent); }

/* ── Formular ────────────────────────────────────────────────── */
.auth-form { margin-top: 26px; display: flex; flex-direction: column; gap: 18px; }
.auth-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.field label {
  display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 7px;
}
.field input, .field select {
  width: 100%; padding: 13px 15px; font-family: var(--font-body);
  font-size: 15.5px; font-weight: 500; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 13px; outline: none; transition: all .2s ease;
  box-shadow: var(--shadow-sm);
}
.field input::placeholder { color: var(--text-3); font-weight: 400; }
.field input:focus, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.auth--indigo .field input:focus, .auth--indigo .field select:focus { border-color: var(--indigo); box-shadow: 0 0 0 4px var(--indigo-soft); }
.field__hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.field__hint--ok { color: var(--green); font-weight: 600; }
.field__hint--bad { color: var(--sos); font-weight: 600; }

/* Parolă cu buton vezi/ascunde */
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 48px; }
.pwd-eye {
  position: absolute; top: 50%; right: 7px; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-3); transition: all .2s ease;
}
.pwd-eye:hover { color: var(--text); background: var(--surface-2); }
.pwd-eye .eye-off { display: none; }
.pwd-eye.is-on .eye { display: none; }
.pwd-eye.is-on .eye-off { display: block; }

/* Checkbox custom */
.check { display: flex; align-items: flex-start; gap: 11px; cursor: pointer; font-size: 14px; color: var(--text-2); line-height: 1.45; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box {
  flex-shrink: 0; width: 21px; height: 21px; border-radius: 7px; margin-top: 1px;
  border: 1.5px solid var(--border-strong); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .18s ease; color: transparent;
}
.check__box svg { width: 13px; height: 13px; }
.check input:checked + .check__box { background: var(--green); border-color: var(--green); color: var(--on-green); }
.auth--indigo .check input:checked + .check__box { background: var(--indigo); border-color: var(--indigo); color: var(--on-indigo); }
.check input:focus-visible + .check__box { box-shadow: 0 0 0 4px var(--green-soft); }
.check a { color: var(--green); font-weight: 600; }
.check a:hover { color: var(--green-hover); }
.auth--indigo .check a { color: var(--indigo); }
.auth--indigo .check a:hover { color: var(--indigo-hover); }

/* Rândul "ține-mă minte / ai uitat parola" */
.auth-form__between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.link-quiet { font-size: 13.5px; font-weight: 600; color: var(--text-3); transition: color .2s ease; }
.link-quiet:hover { color: var(--text); }

/* ── Butoane ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 15.5px;
  border-radius: 13px; padding: 15px 26px; transition: all .22s ease; white-space: nowrap;
  border: 1px solid transparent; width: 100%;
}
.btn--green { background: var(--green); color: var(--on-green); box-shadow: var(--glow-green); }
.btn--green:hover { background: var(--green-hover); transform: translateY(-1px); color: var(--on-green); }
.btn--indigo { background: var(--indigo); color: var(--on-indigo); box-shadow: var(--glow-indigo); }
.btn--indigo:hover { background: var(--indigo-hover); transform: translateY(-1px); color: var(--on-indigo); }

/* Separator + switch login/register */
.auth-alt { margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--border-strong); font-size: 14px; color: var(--text-2); text-align: center; }
.auth-alt a { color: var(--green); font-weight: 600; }
.auth-alt a:hover { color: var(--green-hover); }
.auth-alt--split { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; }

/* Footer mic, pe coloana formularului */
.auth-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); }
.auth-foot a { color: var(--text-3); transition: color .2s ease; }
.auth-foot a:hover { color: var(--green); }

/* Animație de intrare, discretă */
@media (prefers-reduced-motion: no-preference) {
  .auth-box { animation: rise .45s ease both; }
  .auth-side__body { animation: rise .55s ease both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 920px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-box { padding: 28px 0 36px; }
  .auth-topbar .logo { display: inline-flex; }
  .auth-topbar .logo__mark { width: 34px; height: 34px; }
  .auth-topbar .logo__word { font-size: 18px; }
}
@media (max-width: 480px) {
  .auth-form__row { grid-template-columns: 1fr; }
  .auth-back span { display: none; }
}
