:root {
    --auth-ink: #1c1c28;
    --auth-surface: #fff;
    --auth-body-bg: #eef0f4;
    --auth-bg-tint: #6682aa24;
    --auth-text-muted: #555;
    --auth-primary: #f9c57e;
    --auth-primary-hover: #f5b763;
    --auth-primary-soft: #fffbf2;
    --auth-danger: #d9534f;
    --auth-input-border: #cdcdd3;
    --auth-border-muted: #b9b9c0;
    --auth-social-border: #d6d6dc;
    --auth-divider-line: #dcdce1;
    --auth-divider-text: #8b8b93;
    --auth-menu-hover: #f2f2f5;
    --auth-focus-field: #f3b868;
    --auth-accent: #2f9df4;
    --auth-shadow-rgb: 28, 28, 40;
    --auth-drop-shadow: rgba(0, 0, 0, 0.1);
    --auth-font-family: 'TamlilBold', Arial, sans-serif;
}

html[lang='es'] {
    --auth-font-family: sans-serif;
}

html[lang='es'] .auth-page {
    font-family: sans-serif;
}

body.auth-body {
    background: var(--auth-body-bg);
    color: var(--auth-ink) !important;
}

.auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 40px 16px;
    color: var(--auth-ink);
}

.auth-video {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
}

.auth-page[dir='ltr'] .auth-video {
    transform: scaleX(-1);
}

.auth-page::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background: url('../images/templates/big-logo.svg') no-repeat center / cover;
    filter: drop-shadow(3px 3px 15px var(--auth-drop-shadow));
    opacity: 0.5;
}

@media (max-width: 1024px) {
    .auth-video {
        display: none;
    }

    .auth-page::before {
        content: '';
        position: fixed;
        inset: -20px;
        z-index: 0;
        background: url('../images/templates/registration-bg-tablet.jpg') no-repeat top / cover;
        opacity: 0.5;
    }
}

@media (max-width: 640px) {
    .auth-page::before {
        background-image: url('../images/templates/registration-bg-mobile.jpg');
    }
}

#bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: var(--auth-bg-tint);
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 660px;
    margin: auto;
    background: var(--auth-surface);
    border-radius: 24px;
    box-shadow: 0 24px 64px rgba(var(--auth-shadow-rgb), 0.28);
    padding: 56px 60px;
    text-align: center;
}

.auth-title {
    margin: 0 0 10px;
    font-family: var(--auth-font-family);
    font-size: 38px;
    line-height: 1.2;
    color: var(--auth-ink);
}

.auth-subtitle {
    margin: 0 0 34px;
    font-size: 17px;
    color: var(--auth-text-muted) !important;
}

.auth-field {
    margin-bottom: 22px;
    text-align: start;
}

.auth-field > label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 400;
    color: var(--auth-ink);
}

.auth-field > label svg {
    width: 18px;
    height: 18px;
    flex: none;
}

input.auth-input {
    display: block;
    width: 100%;
    height: 52px;
    padding: 0 14px;
    font-size: 16px;
    color: var(--auth-ink);
    background: var(--auth-surface);
    border: 1px solid var(--auth-input-border);
    border-radius: 8px;
    outline: none;
    box-shadow: none;
    transition: border-color 0.15s ease;
}

input.auth-input:focus {
    border-color: var(--auth-focus-field);
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

.auth-field.has-error input.auth-input {
    border-color: var(--auth-danger);
}

.auth-field .auth-field-error,
.auth-field .auth-field-error li {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    font-size: 13px;
    color: var(--auth-danger);
}

.auth-checkbox-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 26px;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--auth-ink);
    cursor: pointer;

    span {
        padding-top: 2px;
    }
}

.auth-checkbox input[type='checkbox'] {
    appearance: none;
    -webkit-appearance: none;
    flex: none;
    width: 26px;
    height: 26px;
    margin: 0;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border-muted);
    border-radius: 7px;
    cursor: pointer;
    display: inline-grid;
    place-content: center;
}

.auth-checkbox input[type='checkbox']:checked::before {
    content: '';
    width: 13px;
    height: 13px;
    background: var(--auth-ink);
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

.auth-checkbox a,
.auth-link-strong {
    font-family: var(--auth-font-family);
    font-weight: 700;
    color: var(--auth-ink);
    text-decoration: none;
}

.auth-checkbox a:hover,
.auth-link-strong:hover {
    color: var(--auth-ink);
    text-decoration: underline;
}

.auth-card button.auth-submit,
.auth-card button.auth-submit[type='submit'] {
    display: block;
    width: 100%;
    min-width: 100%;
    height: 72px;
    padding: 0;
    font-family: var(--auth-font-family);
    font-size: 22px;
    color: var(--auth-ink);
    background: var(--auth-primary);
    border: none;
    border-radius: 12px !important;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-bottom: 20px;
}

.auth-card button.auth-submit:hover {
    background: var(--auth-primary-hover);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 34px 0 24px;
    font-size: 16px;
    color: var(--auth-divider-text);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-divider-line);
}

.auth-social {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
    max-width: 190px;
    height: 62px;
    font-size: 16px;
    font-weight: 700;
    color: var(--auth-ink);
    background: var(--auth-surface);
    border: 1px solid var(--auth-social-border);
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.auth-social-btn:hover {
    color: var(--auth-ink);
    text-decoration: none;
    border-color: var(--auth-border-muted);
    box-shadow: 0 4px 14px rgba(var(--auth-shadow-rgb), 0.12);
}

.auth-social-btn img,
.auth-social-btn svg {
    width: 22px;
    height: 22px;
}

.auth-social-text {
    padding-top: 3px;
}

.auth-switch-line {
    margin: 30px 0 10px;
    font-size: 17px;
    color: var(--auth-ink);
}

.auth-support-line {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 15px;
    color: var(--auth-ink);
}

.auth-support-line svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.auth-support-line a {
    color: var(--auth-ink);
    text-decoration: none;
}

.auth-support-line a:hover {
    text-decoration: underline;
}

.auth-support-sep {
    color: var(--auth-border-muted);
}

.auth-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 26px;
    font-size: 15px;
}

.auth-error-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 15px;
    color: var(--auth-danger);
}

.auth-lang {
    position: fixed;
    top: 20px;
    inset-inline-start: 20px;
    z-index: 10;
}

.auth-lang summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 15px;
    color: var(--auth-ink);
    background: var(--auth-surface);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(var(--auth-shadow-rgb), 0.14);
    cursor: pointer;
    list-style: none;
    border: 1px solid var(--auth-primary);

    &:hover {
        background: var(--auth-primary-soft);
    }
}

.auth-lang summary::-webkit-details-marker {
    display: none;
}

.auth-lang summary svg {
    width: 18px;
    height: 18px;
}

.auth-lang-caret {
    font-size: 10px;
}

.auth-lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-start: 0;
    min-width: 100%;
    padding: 6px 0;
    background: var(--auth-surface);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(var(--auth-shadow-rgb), 0.18);
}

.auth-lang-menu a {
    display: block;
    padding: 8px 16px;
    font-size: 15px;
    color: var(--auth-ink);
    text-decoration: none;
    white-space: nowrap;
}

.auth-lang-menu a:hover {
    background: var(--auth-menu-hover);
}

.auth-lang-menu a.active {
    font-family: var(--auth-font-family);
}

.auth-bee {
    position: fixed;
    bottom: 14px;
    inset-inline-end: 22px;
    z-index: 5;
    width: 90px;
    height: 62px;
    background: url('../images/icons/mainLogo-rtl-mark.png') no-repeat left center / auto 100%;
}

.auth-page .alert {
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .auth-page {
        padding: 28px 12px 80px;
        align-items: flex-start;
    }

    .auth-card {
        padding: 34px 22px 30px;
        border-radius: 20px;
    }

    .auth-title {
        font-size: 20px;
        text-align: start;
        padding-inline-end: 48px;
    }

    .auth-subtitle {
        margin-bottom: 26px;
        text-align: start;
    }

    .auth-card button.auth-submit {
        height: 60px;
        font-size: 19px;
    }

    .auth-social {
        gap: 12px;
    }

    .auth-social-btn {
        height: 54px;
        font-size: 15px;
    }

    .auth-checkbox-row,
    .auth-remember-row {
        flex-wrap: wrap;
    }

    .auth-bee {
        display: none;
    }

    .auth-support-text {
        display: block;
        width: 100%;
    }

    .auth-lang {
        position: absolute;
        top: 22px;
        inset-inline-start: auto;
        inset-inline-end: 18px;
    }

    .auth-lang summary {
        padding: 10px;
        box-shadow: none;
    }

    .auth-lang .auth-lang-label,
    .auth-lang .auth-lang-caret {
        display: none;
    }

    .auth-lang-menu {
        inset-inline-start: auto;
        inset-inline-end: 0;
    }

    .auth-card button.auth-submit, .auth-card button.auth-submit[type="submit"] {
        height: 62px;
        font-size: 18px;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .auth-card {
        max-width: 640px;
        padding: 48px 56px 40px;
    }
}

@media (min-width: 641px) and (max-height: 760px) {
    .auth-page {
        padding: 20px 16px;
    }

    .auth-card {
        padding: 30px 60px 26px;
    }

    .auth-title {
        font-size: 28px;
    }

    .auth-subtitle {
        margin-bottom: 20px;
        font-size: 15px;
    }

    .auth-field {
        margin-bottom: 14px;
    }

    .auth-field > label {
        margin-bottom: 5px;
        font-size: 15px;
    }

    .auth-field input.auth-input {
        height: 44px;
    }

    .auth-checkbox-row,
    .auth-remember-row {
        margin: 2px 0 18px;
    }

    .auth-card button.auth-submit {
        height: 54px;
        font-size: 19px;
    }

    .auth-divider {
        margin: 20px 0 16px;
    }

    .auth-social-btn {
        height: 50px;
    }

    .auth-switch-line {
        margin: 18px 0 8px;
        font-size: 16px;
    }
}

.auth-channel-toggle {
    display: flex;
    margin-bottom: 22px;
    background: #f3f4f6;
    border-radius: 12px;
}

.auth-channel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
    height: 60px;
    font-size: 17px;
    font-family: inherit;
    color: var(--auth-ink);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
}

.auth-channel-btn svg {
    width: 20px;
    height: 20px;
}

.auth-channel-btn.active {
    background: var(--auth-surface);
    border-color: var(--auth-accent);
    color: var(--auth-accent);
}

.auth-input-icon {
    position: relative;
    margin-bottom: 26px;
}

.auth-input-icon > svg {
    position: absolute;
    inset-inline-start: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--auth-ink);
    pointer-events: none;
}

.auth-input-icon .auth-input {
    height: 58px;
    padding-inline-start: 46px;
}

.auth-back-link {
    margin: 12px 0 30px;
    text-align: start;
    font-size: 16px;
}

.hidden-mode {
    display: none !important;
}

.auth-code-boxes {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin: 6px 0 26px;
}

.auth-code-box {
    width: 58px;
    height: 58px;
    text-align: center;
    font-size: 24px;
    font-family: inherit;
    color: var(--auth-ink);
    background: #eceef2;
    border: 1px solid transparent;
    border-radius: 14px;
    outline: none;
}

.auth-code-box:focus {
    background: var(--auth-surface);
    border-color: var(--auth-accent);
}

.auth-countdown {
    margin: 16px 0 0;
    font-size: 15px;
    color: var(--auth-ink);
    text-align: start;
}

.auth-countdown:has(button) {
    display: inline-block;
}

.auth-countdown button {
    font-family: 'TamlilBold', Arial, sans-serif;
    font-weight: 700;
    color: var(--auth-ink);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 14px;

    &:hover {
        text-decoration: underline;
    }
}

.auth-requirements {
    margin-bottom: 26px;
    padding: 18px 22px;
    background: #eef2fb;
    border-radius: 14px;
    text-align: start;
    font-size: 15px;
}

.auth-requirements-title {
    margin: 0 0 8px;
    font-family: 'TamlilBold', Arial, sans-serif;
    font-weight: 700;
    color: #000;
}

.auth-requirements ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-requirements li {
    display: flex;
    align-items: center;
    gap: 9px;
    line-height: 2;
}

.auth-requirements li svg {
    width: 17px;
    height: 17px;
    flex: none;
    color: #3a9b52;
}

.auth-title-icon {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.auth-title-icon svg {
    width: 26px;
    height: 26px;
    flex: none;
}

.auth-eye-field {
    position: relative;
}

.auth-eye-field .auth-input {
    padding-inline-end: 46px;
}

.auth-page[dir='rtl'] input[type="tel"] {
    direction: rtl;
}

.auth-eye-btn {
    position: absolute;
    inset-inline-end: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    padding: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: #8b8b93;
}

.auth-eye-btn svg {
    width: 20px;
    height: 20px;
}

.auth-strength {
    display: flex;
    gap: 10px;
    margin: 10px 2px 0;
}

.auth-strength span {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: #d9d9de;
}

.auth-strength span.lit-red {
    background: var(--auth-danger);
}

.auth-strength span.lit-orange {
    background: var(--auth-primary-hover);
}

.auth-strength span.lit-green {
    background: #3a9b52;
}

@media (max-width: 640px) {
    .auth-code-boxes {
        gap: 8px;
    }

    .auth-code-box {
        width: 46px;
        height: 50px;
        font-size: 20px;
    }
}

.auth-strength-error {
    justify-content: flex-start;
    margin: 8px 2px 0;
    font-size: 14px;
}
