/* ==========================================================================
   Pagina Intră / Cont nou (front.account)
   Negru + galbenul Chevron (#f9b100); un singur moment animat: comutatorul cu indicator glisant.
   ========================================================================== */
.auth-page {
    --ink: #000;
    --sun: #f9b100;
    --sun-deep: #e09f00;
    --paper: #fff;
    --stone: #f3f2ef;
    --line: #dedcd6;
    --muted: #6b6b6b;
    --bad: #c62828;
    --good: #1a7f37;
    background: var(--stone);
    padding: 48px 0 64px;
}

.auth {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    max-width: 1040px;
    margin: 0 auto;
    background: var(--paper);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .35);
}

/* ---------- partea neagra ---------- */
.auth__brand {
    position: relative;
    background: var(--ink);
    color: #fff;
    padding: 56px 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    overflow: hidden;
}
/* un chevron galben (semnul din numele magazinului) */
.auth__brand::after {
    content: "";
    position: absolute;
    right: 36px;
    bottom: 40px;
    width: 120px;
    height: 84px;
    background: var(--sun);
    clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 45%, 50% 100%, 0 45%);
}
.auth__headline {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #fff;
    font-size: 44px;
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -.02em;
    max-width: 9ch;
}
.auth__perks {
    position: relative;
    z-index: 1;
    list-style: none;
    margin: 0 0 90px;
    padding: 0;
    display: grid;
    gap: 18px;
    max-width: 30ch;
}
.auth__perks li { display: flex; gap: 14px; align-items: flex-start; font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, .86); }
.auth__perks i { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); display: inline-flex; align-items: center; justify-content: center; color: var(--sun); font-size: 16px; }

/* ---------- panoul alb ---------- */
.auth__panel { padding: 44px 48px 40px; min-width: 0; }

.auth-switch {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--stone);
    border-radius: 999px;
    padding: 5px;
    margin-bottom: 28px;
}
.auth-switch button {
    position: relative;
    z-index: 1;
    border: 0;
    background: none;
    height: 46px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    transition: color .25s ease;
}
.auth-switch button[aria-selected=true] { color: var(--ink); }
.auth-switch button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.auth-switch__thumb {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 5px;
    width: calc(50% - 5px);
    border-radius: 999px;
    background: var(--sun);
    box-shadow: 0 6px 16px -6px rgba(224, 159, 0, .8);
    transition: transform .45s cubic-bezier(.65, -0.2, .25, 1.25);
}
[data-active=register] .auth-switch__thumb { transform: translateX(100%); }

/* fara JS se vad ambele formulare, unul sub altul */
.auth.is-js .auth-pane { display: none; }
.auth.is-js .auth-pane.is-active { display: block; animation: authIn .35s ease both; }
[data-active=register] .auth-pane.is-active { animation-name: authInRight; }
@keyframes authIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes authInRight { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.auth:not(.is-js) .auth-pane + .auth-pane { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }

.auth-lead { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 20px; }

/* ---------- campuri ---------- */
.auth-field { margin-bottom: 16px; min-width: 0; }
.auth-field label,
.auth-captcha .math-captcha__label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.auth-field input,
.auth-captcha .math-captcha__input {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-size: 16px; /* 16px: iOS nu mai face zoom la focus */
    color: var(--ink);
    transition: border-color .2s, box-shadow .2s;
}
.auth-field input:focus,
.auth-captcha .math-captcha__input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(249, 177, 0, .35); }
.auth-field.has-error input { border-color: var(--bad); }
.auth-error, .auth-captcha .math-captcha__error { display: block; color: var(--bad); font-size: 13px; margin-top: 6px; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

.auth-pass { position: relative; }
.auth-pass input { padding-right: 52px; }
.auth-pass__toggle {
    position: absolute; right: 4px; top: 4px; bottom: 4px; width: 44px;
    border: 0; background: none; border-radius: 8px; color: var(--muted); font-size: 17px; cursor: pointer;
}
.auth-pass__toggle:hover, .auth-pass__toggle.is-on { color: var(--ink); }
.auth-pass__toggle.is-on::after { content: ""; position: absolute; left: 12px; right: 12px; top: 50%; height: 2px; background: currentColor; transform: rotate(-35deg); }
.auth-pass__toggle:focus-visible { outline: 2px solid var(--ink); }

/* puterea parolei */
.auth-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 8px; align-items: center; }
.auth-meter span { height: 4px; border-radius: 2px; background: var(--line); transition: background .25s; }
.auth-meter em { grid-column: 1 / -1; font-style: normal; font-size: 12px; color: var(--muted); }
.auth-meter[data-score="0"] span:nth-child(1) { background: var(--bad); }
.auth-meter[data-score="1"] span:nth-child(-n+1) { background: var(--bad); }
.auth-meter[data-score="2"] span:nth-child(-n+2) { background: var(--sun); }
.auth-meter[data-score="3"] span:nth-child(-n+3) { background: #7cb342; }
.auth-meter[data-score="4"] span { background: var(--good); }
.auth-hint { display: block; min-height: 18px; font-size: 12px; margin-top: 6px; }
.auth-hint.is-ok { color: var(--good); }
.auth-hint.is-bad { color: var(--bad); }

/* checkbox-uri */
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 18px; }
.auth-check { display: inline-flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 14px; color: #333; cursor: pointer; line-height: 1.4; }
.auth-check input { flex: 0 0 auto; width: 20px; height: 20px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.auth-check a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.auth-check--terms { margin: 4px 0 18px; }
.auth-link { border: 0; background: none; padding: 0; color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--sun); text-decoration-thickness: 2px; cursor: pointer; }
.auth-link:hover { color: var(--sun-deep); }

/* captcha in stilul paginii */
.auth-captcha { margin-bottom: 18px; }
.auth-captcha .math-captcha__question { display: inline-block; margin-left: 4px; padding: 1px 10px; border-radius: 6px; background: var(--ink); color: var(--sun); font-weight: 700; }
.auth-captcha .math-captcha__input { max-width: 140px; }

/* butoane */
.auth-submit {
    width: 100%; height: 54px; border: 0; border-radius: 10px;
    background: var(--ink); color: #fff; font-size: 16px; font-weight: 700; letter-spacing: .01em; cursor: pointer;
    transition: background .2s, color .2s, transform .1s;
}
.auth-submit:hover:not(:disabled) { background: var(--sun); color: var(--ink); }
.auth-submit:active:not(:disabled) { transform: scale(.99); }
.auth-submit:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.auth-submit:disabled { background: #bdbbb5; color: #fff; cursor: not-allowed; filter: none; opacity: 1; }

.auth-google {
    display: flex; align-items: center; justify-content: center; gap: 10px; height: 50px;
    border: 1.5px solid var(--line); border-radius: 10px; color: var(--ink); font-weight: 600; font-size: 15px; background: #fff;
    transition: border-color .2s;
}
.auth-google:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-alt { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 14px; }

/* mesaj dupa inregistrare / resetare */
.auth-notice {
    display: flex; gap: 14px; align-items: flex-start; margin-bottom: 24px; padding: 16px 18px;
    border-radius: 10px; background: #fff8e1; border: 1.5px solid var(--sun); color: var(--ink); font-size: 15px; line-height: 1.45;
}
.auth-notice i { flex: 0 0 auto; font-size: 22px; color: var(--sun-deep); margin-top: 1px; }
.auth-notice small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---------- tableta ---------- */
@media (max-width: 991px) {
    .auth { grid-template-columns: 1fr; max-width: 620px; }
    .auth__brand { padding: 28px 28px 26px; gap: 18px; }
    .auth__brand::after { width: 64px; height: 45px; right: 28px; bottom: auto; top: 32px; }
    .auth__headline { font-size: 32px; max-width: none; padding-right: 70px; }
    .auth__perks { grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: none; margin: 0; }
    .auth__perks li { flex-direction: column; gap: 8px; font-size: 13px; }
    .auth__panel { padding: 30px 28px 32px; }
}

/* ---------- telefon ---------- */
@media (max-width: 575px) {
    .auth-page { padding: 0 0 24px; background: var(--paper); }
    .auth-page > .container { padding: 0; }
    .auth { border-radius: 0; box-shadow: none; }
    .auth__brand { padding: 22px 18px 20px; }
    .auth__headline { font-size: 26px; }
    .auth__perks { grid-template-columns: 1fr; gap: 10px; }
    .auth__perks li { flex-direction: row; align-items: center; gap: 12px; font-size: 13px; }
    .auth__perks i { flex-basis: 30px; width: 30px; height: 30px; font-size: 14px; }
    .auth__brand::after { width: 44px; height: 31px; right: 18px; top: 22px; }
    .auth__panel { padding: 22px 16px 24px; }
    .auth-switch { margin-bottom: 22px; }
    .auth-switch button { height: 44px; font-size: 14px; }
    .auth-grid { grid-template-columns: 1fr; }
}
@media (max-width: 359px) {
    .auth__headline { font-size: 23px; padding-right: 60px; }
    .auth__brand::after { width: 40px; height: 28px; right: 14px; top: 22px; }
    .auth-row { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-switch__thumb, .auth.is-js .auth-pane.is-active { transition: none; animation: none; }
}

/* ---------- varianta cu un singur panou (forgot / reset password) ---------- */
.auth--single { grid-template-columns: 1fr; max-width: 520px; }
.auth-title { font-size: 28px; font-weight: 900; letter-spacing: -.01em; margin: 0 0 10px; color: var(--ink); }
@media (max-width: 575px) {
    .auth--single .auth__panel { padding: 26px 16px 28px; }
    .auth-title { font-size: 24px; }
}
