/* ---------- login / register / password pages ---------- */
.auth-body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--f-body);
}
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.auth-art {
    position: relative;
    background: #13241b url("https://images.unsplash.com/photo-1486262715619-67b85e0b08d3?auto=format&fit=crop&w=1400&q=70") center / cover no-repeat;
    color: #fff;
}
.auth-art::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(10, 24, 15, 0.9) 0%, rgba(20, 60, 30, 0.72) 55%, rgba(10, 24, 15, 0.55) 100%);
}
.auth-art-in {
    position: relative;
    height: 100%;
    box-sizing: border-box;
    padding: 40px clamp(28px, 4vw, 64px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
}
.auth-art-logo img {
    height: 44px;
    width: auto;
    background: #fff;
    padding: 6px 10px;
    border-radius: 10px;
}
.auth-art h2 {
    color: #fff;
    font-size: clamp(2rem, 3.2vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 24px;
}
.auth-perks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 15.5px;
}
.auth-perks i {
    color: #9be3a2;
    margin-inline-end: 8px;
}
.auth-art small {
    opacity: 0.7;
}
.auth-main {
    display: flex;
    flex-direction: column;
    padding: 24px clamp(16px, 4vw, 56px);
    box-sizing: border-box;
}
.auth-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.auth-top a {
    color: var(--ink-2);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
.auth-top a:hover {
    color: var(--accent);
}
[dir="rtl"] .auth-back i {
    display: inline-block;
    transform: scaleX(-1);
}
.auth-card {
    width: 100%;
    max-width: 440px;
    margin: auto;
    padding: 32px 0;
}
.auth-card-logo {
    display: none;
}
.auth-card-logo img {
    height: 40px;
    width: auto;
}
.auth-title {
    font-size: 1.9rem;
    font-weight: 800;
    margin: 0 0 6px;
}
.auth-sub {
    color: var(--ink-2);
    margin: 0 0 26px;
}
.auth-alert {
    background: var(--surface-2);
    border-inline-start: 3px solid var(--accent);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
}
.auth-card .form-label {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--ink);
}
.auth-field {
    position: relative;
}
.auth-field > i {
    position: absolute;
    top: 50%;
    inset-inline-start: 14px;
    transform: translateY(-50%);
    color: var(--ink-2);
    pointer-events: none;
}
.auth-card .form-control {
    height: 50px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    font-size: 15px;
    box-shadow: none;
}
.auth-field .form-control {
    padding-inline-start: 42px;
}
.auth-field.has-eye .form-control {
    padding-inline-end: 46px;
}
.auth-card .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(52, 122, 34, 0.15);
}
.auth-card .form-control.is-invalid {
    border-color: var(--danger);
    background-image: none;
}
.auth-card .invalid-feedback {
    display: block;
    color: var(--danger);
    font-size: 13px;
}
.auth-eye {
    position: absolute;
    top: 50%;
    inset-inline-end: 8px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-2);
    display: grid;
    place-items: center;
}
.auth-eye:hover {
    color: var(--accent);
}
.auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 14px;
}
.auth-row .form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}
.auth-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.auth-link:hover {
    text-decoration: underline;
}
.auth-submit {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    transition: filter 0.2s ease;
}
.auth-submit:hover {
    filter: brightness(1.08);
}
.auth-switch {
    text-align: center;
    margin: 22px 0 0;
    color: var(--ink-2);
    font-size: 14.5px;
}
/* older pages (forgot / reset password) still use Bootstrap buttons */
.auth-card .btn-brand {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 700;
}
.auth-card .card-title {
    font-size: 1.6rem;
    font-weight: 800;
}
.auth-card a:not(.auth-card-logo):not(.btn) {
    color: var(--accent);
}
@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1fr);
    }
    .auth-art {
        display: none;
    }
    .auth-card-logo {
        display: inline-block;
        margin-bottom: 22px;
    }
    .auth-card {
        padding-top: 24px;
    }
}

/* login / register top bar: back, about and language as buttons */
.auth-top-end {
    display: flex;
    gap: 8px;
}
.auth-top a.auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    font-size: 14px;
    white-space: nowrap;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.auth-top a.auth-btn:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-ink);
}
@media (max-width: 480px) {
    .auth-top a.auth-btn {
        padding: 0 10px;
        font-size: 13px;
    }
    .auth-top-end .auth-btn:not(.auth-lang) {
        width: 40px;
        padding: 0;
        justify-content: center;
        font-size: 0;
    }
    .auth-top-end .auth-btn:not(.auth-lang) i {
        font-size: 16px;
    }
}

/* same look as the Log in button */
.auth-top a.auth-btn,
.auth-top a.auth-btn:hover {
    border: 0;
    background: var(--accent);
    color: #fff;
}
.auth-top a.auth-btn:hover {
    filter: brightness(1.08);
}

/* the site's global "main" rule centers and shrinks this column; let it fill so the top buttons reach the corners */
.auth-main {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* ---------- sign-up steps ---------- */
.reg-steps {
    display: flex;
    gap: 6px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}
.reg-steps li {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 4px solid var(--line);
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
}
.reg-steps li span {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-2);
    font-size: 12px;
    font-weight: 700;
}
.reg-steps li.now,
.reg-steps li.done {
    border-color: var(--accent);
    color: var(--ink);
}
.reg-steps li.now span,
.reg-steps li.done span {
    background: var(--accent);
    color: #fff;
}

/* phone / email switch */
.reg-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-2);
}
.reg-switch label {
    margin: 0;
    cursor: pointer;
}
.reg-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.reg-switch span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 42px;
    border-radius: 10px;
    color: var(--ink-2);
    font-weight: 700;
    font-size: 15px;
    transition: background 0.15s ease, color 0.15s ease;
}
.reg-switch input:checked + span {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.reg-switch input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.reg-hint {
    display: block;
    margin-top: 6px;
    color: var(--ink-2);
    font-size: 12.5px;
}
.reg-sent,
.reg-verified {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--surface-2);
    font-size: 14px;
}
.reg-sent i,
.reg-verified i {
    font-size: 20px;
    color: var(--accent);
}
.reg-verified {
    background: var(--accent-soft);
}
.reg-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: var(--ink-2);
}
.auth-link-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}
.auth-link-btn:hover {
    text-decoration: underline;
}

/* password strength */
.pw-meter {
    height: 6px;
    border-radius: 99px;
    background: var(--surface-2);
    overflow: hidden;
    margin-top: 10px;
}
.pw-meter span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: #d93025;
    transition: width 0.25s ease, background 0.25s ease;
}
.pw-meter span[data-level="3"] { background: #f29900; }
.pw-meter span[data-level="4"] { background: #7cb342; }
.pw-meter span[data-level="5"] { background: #1e8e3e; }
.pw-level {
    margin: 6px 0 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-2);
}
.pw-level[data-level="1"], .pw-level[data-level="2"] { color: #d93025; }
.pw-level[data-level="3"] { color: #f29900; }
.pw-level[data-level="4"], .pw-level[data-level="5"] { color: #1e8e3e; }
.pw-rules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--ink-2);
}
.pw-rules li {
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s ease;
}
.pw-rules li i::before {
    content: "\F28A"; /* bi-circle */
}
.pw-rules li.bad {
    color: #d93025;
}
.pw-rules li.bad i::before {
    content: "\F622"; /* bi-x-circle-fill */
}
.pw-rules li.ok {
    color: #1e8e3e;
    font-weight: 600;
}
.pw-rules li.ok i::before {
    content: "\F26A"; /* bi-check-circle-fill */
}
.pw-rules.mt-2 {
    grid-template-columns: 1fr;
    margin-bottom: 0;
}
.auth-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: none;
}
@media (max-width: 420px) {
    .pw-rules {
        grid-template-columns: 1fr;
    }
}
.pw-rules li[hidden] {
    display: none;
}
