/* Fereastra de înregistrare din login.html — refăcută 05.10.2026:
   doi pași (Firma → Contul tău), CUI cu căutare la ANAF, bife la câmpurile bune,
   ecran „Verifică-ți emailul”. Logica e în inregistrare.js. */

/* ── Antetul comun al ferestrelor (înregistrare, parolă uitată, 2FA) — ca la login (.lm-header) ── */
.au-cap { position: relative; display: flex; align-items: center; gap: 14px;
  margin: -28px -28px 20px; padding: 22px 64px 18px 28px;
  background: rgba(255,255,255,.04); border-bottom: 1px solid rgba(255,255,255,.10); }
.au-ico { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #b9bcff; background: linear-gradient(145deg, rgba(78,84,200,.30), rgba(78,84,200,.10));
  box-shadow: inset 0 0 0 1px rgba(139,143,240,.35), 0 6px 18px rgba(78,84,200,.25);
  animation: auIco .5s .08s cubic-bezier(.2, .9, .3, 1.6) both; }
@keyframes auIco { from { opacity: 0; transform: scale(.5) rotate(-12deg); } to { opacity: 1; transform: none; } }
.au-titlu { font-size: 20px; font-weight: 700; color: var(--text-primary); letter-spacing: -.4px; line-height: 1.2; }
.au-sub { font-size: 13px; color: var(--text-secondary); margin-top: 3px; line-height: 1.45; }
.au-sub strong { color: var(--text-primary); }
.au-sub-ico { color: var(--success); }
.au-cap .lm-close { top: 50%; right: 18px; transform: translateY(-50%); }

/* casetele de informare din ferestre: rotunjite, fără bara groasă din stânga */
:is(.modal-overlay, .au-fata-2fa, .au-fata-forgot) .modal-info { display: flex; gap: 10px; align-items: flex-start; border: 1px solid rgba(139,143,240,.22) !important;
  border-left-width: 1px !important; background: rgba(78,84,200,.08) !important; border-radius: 10px !important;
  padding: 11px 13px !important; color: var(--text-secondary); font-size: .84em; line-height: 1.5; margin-bottom: 18px; }
:is(.modal-overlay, .au-fata-2fa, .au-fata-forgot) .modal-info > i { color: #a5a9ff; font-size: 18px; margin-top: 1px; flex-shrink: 0; }
:is(.modal-overlay, .au-fata-2fa, .au-fata-forgot) .modal-label { font-weight: 600; }
:is(.modal-overlay, .au-fata-2fa, .au-fata-forgot) .modal-backup-toggle a { color: #a5a9ff; cursor: pointer; }

/* Intrarea ferestrelor: un mic zoom */
.modal-overlay.active .modal-box { animation: rgIntra .38s cubic-bezier(.2, .9, .3, 1.15) both; }
@keyframes rgIntra { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }

/* Butonul de WhatsApp nu stă peste formular */
body:has(.modal-overlay.active) .whatsapp-float,
body:has(.lm-back.open:not(.au-inline)) .whatsapp-float { opacity: 0; pointer-events: none; transform: scale(.6); }
.whatsapp-float { transition: opacity .2s, transform .2s; }

/* ── Bara de progres ── */
.rg-progres { display: flex; align-items: center; gap: 10px; margin: 2px 0 14px; }
.rg-progres-pas { display: flex; align-items: center; gap: 7px; font-size: .82em; font-weight: 600; color: var(--text-hint); transition: color .3s; white-space: nowrap; }
.rg-progres-nr { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: .9em; border: 1.5px solid var(--text-hint); transition: background .3s, border-color .3s, color .3s; }
.rg-progres-pas.activ { color: var(--text-primary); }
.rg-progres-pas.activ .rg-progres-nr { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.rg-progres-pas.gata { color: var(--success); }
.rg-progres-pas.gata .rg-progres-nr { background: var(--success); border-color: var(--success); color: #fff; font-size: 0; }
.rg-progres-pas.gata .rg-progres-nr::before { content: "✓"; font-size: 13px; font-weight: 800; }
.rg-progres-linie { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; }
.rg-progres-linie span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--success), var(--accent)); transition: width .45s ease; }
.rg-progres[data-pas="2"] .rg-progres-linie span { width: 100%; }

.rg-intro { color: var(--text-secondary); font-size: .86em; margin: 0 0 16px; }
.rg-intro i { color: var(--success); margin-right: 3px; }
.rg-intro strong { color: var(--text-primary); }

/* ── Pașii: doar cel activ se vede; intră glisând, câmpurile pe rând ── */
.rg-pas { display: none; }
.rg-pas.activ { display: block; animation: rgPasDr .32s ease both; }
.rg-pas.activ.din-stanga { animation-name: rgPasSt; }
@keyframes rgPasDr { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes rgPasSt { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.rg-pas.activ > * { animation: rgCamp .4s ease both; }
.rg-pas.activ > *:nth-child(1) { animation-delay: .04s; }
.rg-pas.activ > *:nth-child(2) { animation-delay: .09s; }
.rg-pas.activ > *:nth-child(3) { animation-delay: .14s; }
.rg-pas.activ > *:nth-child(4) { animation-delay: .19s; }
.rg-pas.activ > *:nth-child(5) { animation-delay: .24s; }
.rg-pas.activ > *:nth-child(6) { animation-delay: .29s; }
@keyframes rgCamp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Bife la câmpurile completate corect, roșu + scuturare la cele greșite ── */
.rg-camp { position: relative; }
.rg-camp input[type="text"], .rg-camp input[type="email"], .rg-camp input[type="tel"] { transition: border-color .2s, box-shadow .2s, padding .2s; }
.rg-camp.ok > input, .rg-camp.ok .rg-cui-rand input {
  border-color: rgba(34,197,94,.55) !important; padding-right: 36px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322c55e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 15px; }
.rg-camp.gresit input { border-color: rgba(239,68,68,.7) !important; box-shadow: 0 0 0 3px rgba(239,68,68,.12) !important; }
.rg-camp.gresit { animation: rgScutura .35s ease; }
/* bifa de acord n-are margine de colorat: textul ei se face roșu */
.rg-camp.gresit .rg-termeni { color: #fca5a5; }
@keyframes rgScutura { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* ── CUI + Caută la ANAF ── */
.rg-cui-rand { display: flex; gap: 8px; position: relative; }
.rg-cui-rand input { flex: 1; min-width: 0; }
.rg-anaf-btn { flex: 0 0 auto; border: 1px solid rgba(78,84,200,.55); background: var(--accent-soft); color: #c7c9ff;
  border-radius: var(--radius-sm); padding: 0 13px; font: inherit; font-size: .84em; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: background .2s, border-color .2s, transform .15s; }
.rg-anaf-btn:hover { background: rgba(78,84,200,.24); border-color: var(--accent); }
.rg-anaf-btn:active { transform: scale(.97); }
.rg-anaf-btn[disabled] { opacity: .7; cursor: progress; }
.rg-anaf-btn .ti-loader-2 { animation: rgRot .8s linear infinite; }
@keyframes rgRot { to { transform: rotate(360deg); } }
.rg-anaf-msg { font-size: .76em; color: var(--text-hint); margin-top: 6px; min-height: 1.2em; transition: color .2s; }
.rg-anaf-msg.ok { color: #86efac; }
.rg-anaf-msg.atentie { color: #fcd34d; }
.rg-anaf-msg.eroare { color: #fca5a5; }
.rg-completat { animation: rgCompletat 1.1s ease; }
@keyframes rgCompletat { 0% { background-color: rgba(34,197,94,.22); } 100% { background-color: var(--bg-input); } }

.rg-hint { font-size: .76em; color: var(--text-hint); margin-top: 5px; line-height: 1.45; }

.rg-termeni { display: flex !important; align-items: flex-start; gap: 9px; cursor: pointer; color: var(--text-secondary) !important; font-size: .84em !important; }
.rg-termeni input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.rg-termeni a { color: #a5a9ff; text-decoration: none; font-weight: 600; }
.rg-termeni a:hover { text-decoration: underline; }

/* ── Butoanele pașilor ── */
.rg-actiuni { margin-top: 6px; }
.rg-actiuni .modal-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.rg-actiuni-doua { display: flex; gap: 10px; }
.rg-actiuni-doua .modal-btn { flex: 1; margin: 0; }
.rg-btn-sec { border: 1px solid rgba(255,255,255,.14); background: transparent; color: var(--text-secondary); border-radius: var(--radius-sm);
  padding: 11px 16px; font: inherit; font-size: .9em; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; gap: 7px; transition: background .2s, color .2s; }
.rg-btn-sec:hover { background: rgba(255,255,255,.06); color: var(--text-primary); }
.rg-btn-sec[disabled] { opacity: .6; cursor: default; }
#registerSubmitBtn.lucreaza { pointer-events: none; opacity: .85; }
#registerSubmitBtn.lucreaza i { animation: rgRot .8s linear infinite; }

/* ── Ecranul „Verifică-ți emailul” ── */
.rg-gata { text-align: center; padding: 6px 4px 2px; }
.rg-plic { margin: 4px auto 10px; width: 120px; height: 96px; animation: rgPlicSus .6s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes rgPlicSus { from { opacity: 0; transform: translateY(18px) scale(.85); } to { opacity: 1; transform: none; } }
.rg-plic svg { overflow: visible; }
.rg-plic-corp { fill: rgba(78,84,200,.18); stroke: #8b8ff0; stroke-width: 3; }
.rg-plic-clapa { fill: none; stroke: #8b8ff0; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 140; stroke-dashoffset: 140; animation: rgDeseneaza .6s .35s ease forwards; }
.rg-plic-scrisoare { fill: none; stroke: #c7c9ff; stroke-width: 3; stroke-linejoin: round; opacity: 0; transform: translateY(12px);
  animation: rgScrisoare .5s .75s ease forwards; }
@keyframes rgScrisoare { to { opacity: 1; transform: translateY(0); } }
.rg-plic-bifa-cerc { fill: var(--success); transform-origin: 98px 78px; transform: scale(0); animation: rgPop .4s 1.05s cubic-bezier(.2, .9, .3, 1.6) forwards; }
.rg-plic-bifa { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 30; stroke-dashoffset: 30; animation: rgDeseneaza .35s 1.3s ease forwards; }
@keyframes rgDeseneaza { to { stroke-dashoffset: 0; } }
@keyframes rgPop { to { transform: scale(1); } }
.rg-gata-titlu { font-size: 1.3rem; font-weight: 800; color: var(--text-primary); margin: 4px 0 8px; }
.rg-gata-text { color: var(--text-secondary); font-size: .95em; line-height: 1.6; margin: 0 0 10px; word-break: break-word; }
.rg-gata-text strong { color: var(--text-primary); }
.rg-gata-mic { color: var(--text-hint); font-size: .82em; line-height: 1.55; margin: 0 0 16px; }
.rg-gata-mic strong { color: var(--text-secondary); }
.rg-gata-butoane { display: flex; flex-direction: column; gap: 10px; max-width: 320px; margin: 0 auto; }
.rg-gata-butoane .modal-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; margin: 0; }
.rg-gata-msg { font-size: .82em; min-height: 1.3em; margin: 10px 0 2px; color: #86efac; }
.rg-gata-msg.eroare { color: #fca5a5; }
.rg-gata-alt { margin-top: 10px; }
.rg-gata-alt a { color: #a5a9ff; }

/* ── Telefon: butoanele pașilor rămân jos, la îndemână ── */
@media (max-width: 768px) {
  .rg-actiuni { position: sticky; bottom: -24px; margin: 8px -28px -24px; padding: 12px 28px 18px;
    background: linear-gradient(180deg, rgba(26,29,36,0), rgba(26,29,36,.96) 28%); z-index: 2; }
  .rg-progres-pas { font-size: .78em; }
  .au-cap { margin: -28px -28px 18px; padding: 18px 58px 16px 22px; gap: 12px; }
  .au-ico { flex-basis: 40px; width: 40px; height: 40px; font-size: 20px; }
  .au-titlu { font-size: 18px; }
  .rg-cui-rand .rg-anaf-btn span { display: none; }
  .rg-cui-rand .rg-anaf-btn { padding: 0 14px; font-size: 1em; }
}

@media (prefers-reduced-motion: reduce) {
  .modal-overlay.active .modal-box, .au-ico, .rg-pas.activ, .rg-pas.activ > *, .rg-camp.gresit, .rg-plic, .rg-plic * { animation: none !important; }
  .rg-plic-clapa, .rg-plic-bifa { stroke-dashoffset: 0; }
  .rg-plic-scrisoare { opacity: 1; transform: none; }
  .rg-plic-bifa-cerc { transform: scale(1); }
}
