/*
 * The public pages (login, register, verify, passwords) of layouts/auth (DESIGN_SYSTEM.md 4.14, 2026-11-05):
 * a white form side and a brand-coloured picture side. Values are the design tokens of style.min.css
 * (primary #5D87FF, headings #2A3547, text #5A6A85, borders #dfe5ef / #ebf1f6, light #F6F9FC) and the
 * identity colour of the header (#194f86). Only these pages load this file.
 */

.auth-page {
    min-height: 100vh;
    background: #ffffff;
}

.auth-form-side {
    background: #ffffff;
}

.auth-aside {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #194f86;
    background-image: linear-gradient(160deg, #1f5f9f 0%, #194f86 45%, #0f3560 100%);
}

.auth-aside::before,
.auth-aside::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: #ffffff;
    opacity: 0.05;
    pointer-events: none;
}

.auth-aside::before {
    width: 520px;
    height: 520px;
    top: -180px;
    inset-inline-end: -160px;
}

.auth-aside::after {
    width: 380px;
    height: 380px;
    bottom: -160px;
    inset-inline-start: -120px;
}

.auth-aside-inner {
    position: relative;
    z-index: 1;
    max-width: 560px;
}

.auth-aside-art {
    width: 100%;
    max-width: 500px;
    height: auto;
}

.auth-aside-title {
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.35;
}

.auth-aside-text {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1rem;
}

.auth-aside-list li {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1rem;
}

.auth-aside-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

/* the form column: one card-wide block, centred */
.auth-card {
    width: 100%;
    max-width: 460px;
}

.auth-form .form-label {
    font-weight: 500;
    color: #2A3547;
    margin-bottom: 0.4rem;
}

.auth-form .form-control,
.auth-form .form-select {
    padding: 0.72rem 1rem;
    font-size: 1rem;
    border-radius: 0.6rem;
    border-color: #dfe5ef;
}

.auth-form .form-control:focus,
.auth-form .form-select:focus {
    border-color: #5D87FF;
    box-shadow: 0 0 0 0.2rem rgba(93, 135, 255, 0.18);
}

.auth-form .btn-auth {
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.6rem;
}

.auth-form .btn-primary.btn-auth {
    box-shadow: 0 8px 18px rgba(93, 135, 255, 0.28);
}

.auth-form .btn-primary.btn-auth:hover {
    box-shadow: 0 4px 10px rgba(93, 135, 255, 0.28);
}

.auth-form .btn-google {
    background: #ffffff;
    color: #2A3547;
    border: 1px solid #dfe5ef;
}

.auth-form .btn-google:hover,
.auth-form .btn-google:focus {
    background: #F6F9FC;
    border-color: #c9d3e0;
    color: #2A3547;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #5A6A85;
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #ebf1f6;
}

/* the account type switch of the register page */
.auth-tabs {
    background: #F6F9FC;
    border-radius: 0.75rem;
    padding: 0.3rem;
    gap: 0.3rem;
}

.auth-tabs .nav-link {
    border-radius: 0.55rem;
    color: #5A6A85;
    font-weight: 500;
    padding: 0.6rem 0.75rem;
}

.auth-tabs .nav-link:hover {
    color: #2A3547;
}

.auth-tabs .nav-link.active {
    background: #ffffff;
    color: #194f86;
    box-shadow: 0 1px 2px rgba(9, 30, 66, 0.12);
}

.auth-form .form-check-input:checked {
    background-color: #5D87FF;
    border-color: #5D87FF;
}

.auth-footer a:hover {
    color: #5D87FF !important;
}

/* ---------------------------------------------------------------------------------------------
 * Sign-up, "confirm your email" and the account steps (2026-11-13, DESIGN_SYSTEM.md 4.14): one
 * journey in three stages on the same form side, built for a phone first.
 * ------------------------------------------------------------------------------------------- */

/* the form column of the account steps (onboarding/step) is wider than a sign-in card */
.auth-card-wide {
    max-width: 620px;
}

/* the account type switch stays one row on a phone */
.auth-tabs .nav-link {
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .auth-tabs .nav-link {
        padding: 0.55rem 0.25rem;
        font-size: 0.875rem;
    }
}

/* the three stages of a new account (components/onboarding/journey) */
.auth-journey {
    display: flex;
    align-items: flex-start;
    padding: 0;
    margin: 0 0 1.5rem;
    list-style: none;
}

.auth-journey-step {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
}

/* the line from the stage before to this one */
.auth-journey-step + .auth-journey-step::before {
    content: "";
    position: absolute;
    top: 15px;
    inset-inline-start: -50%;
    width: 100%;
    height: 2px;
    background: #ebf1f6;
}

.auth-journey-step.is-done + .auth-journey-step::before {
    background: #13DEB9;
}

.auth-journey-dot {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #5A6A85;
    background: #F6F9FC;
    border: 2px solid #dfe5ef;
    box-shadow: 0 0 0 4px #ffffff;
}

.auth-journey-label {
    display: block;
    margin-top: 0.4rem;
    padding: 0 0.25rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: #5A6A85;
}

.auth-journey-step.is-current .auth-journey-dot {
    color: #ffffff;
    background: #5D87FF;
    border-color: #5D87FF;
}

.auth-journey-step.is-current .auth-journey-label {
    color: #2A3547;
    font-weight: 600;
}

.auth-journey-step.is-done .auth-journey-dot {
    color: #0aa58a;
    background: #E6FFFA;
    border-color: #13DEB9;
}

/* a choice shown as a field-sized button: the gender (components/forms/gender-field) */
.auth-form .auth-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.72rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: #2A3547;
    background: #ffffff;
    border: 1px solid #dfe5ef;
    border-radius: 0.6rem;
}

.auth-form .auth-choice:hover {
    color: #2A3547;
    background: #F6F9FC;
    border-color: #c9d3e0;
}

.auth-form .btn-check:checked + .auth-choice {
    color: #194f86;
    background: #ECF2FF;
    border-color: #5D87FF;
}

.auth-form .btn-check:focus-visible + .auth-choice {
    box-shadow: 0 0 0 0.2rem rgba(93, 135, 255, 0.18);
}

/* the dial code box of the phone field, sized like the field beside it */
.auth-form .input-group-text {
    padding: 0.72rem 0.9rem;
    font-size: 1rem;
    color: #2A3547;
    background: #F6F9FC;
    border-color: #dfe5ef;
}

.auth-form .input-group > .input-group-text:first-child {
    border-radius: 0.6rem 0 0 0.6rem;
}

/* the group is written left to right on every page, and the template squares every corner of a field that
   follows a box in a right-to-left page (with !important): the outer corners are rounded again here, by a
   selector that outweighs the template's */
.auth-page .auth-form .input-group > .form-control:last-child {
    border-radius: 0 0.6rem 0.6rem 0 !important;
}

/* a select is as tall as the fields around it (the template's own rule for a select wins the shorter padding) */
.auth-page .auth-form .form-select {
    padding-top: 0.72rem;
    padding-bottom: 0.72rem;
}

/* a placeholder says what goes in the field, quieter than what was typed */
.auth-form .form-control::placeholder {
    color: #98a4b8;
    opacity: 1;
}

/* the picture of the "confirm your email" page */
.auth-verify-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #5D87FF;
    background: #ECF2FF;
}

.auth-verify-email {
    display: inline-block;
    max-width: 100%;
    padding: 0.35rem 0.85rem;
    font-weight: 600;
    color: #2A3547;
    background: #F6F9FC;
    border-radius: 0.6rem;
    overflow-wrap: anywhere;
}

/* the six-digit code of the "confirm your email" page: centred, and spaced out once digits are in it
   (a spaced placeholder would break the Arabic letters apart) */
.auth-form .auth-code-input {
    text-align: center;
}

.auth-form .auth-code-input:not(:placeholder-shown) {
    font-size: 1.375rem;
    font-weight: 600;
    line-height: 1.5rem;
    letter-spacing: 0.4em;
    text-indent: 0.4em;
    color: #2A3547;
}

/* ---------------------------------------------------------------------------------------------
 * The country list (components/forms/country-select, 2026-11-14): Select2 with the flag of each
 * country and a search box, sized like the fields around it. The open list is attached to the
 * body, outside the form, so its rules hang on the class the script gives it.
 * ------------------------------------------------------------------------------------------- */

.auth-form .select2-container--default .auth-country-selection {
    display: flex;
    align-items: center;
    height: auto;
    min-height: calc(1.5em + 1.44rem + (var(--bs-border-width) * 2));
    padding: 0.72rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    background: #ffffff;
    border: var(--bs-border-width) solid #dfe5ef;
    border-radius: 0.6rem;
    outline: 0;
}

.auth-form .select2-container--default .auth-country-selection .select2-selection__rendered {
    flex: 1 1 auto;
    min-width: 0;
    height: auto;
    padding: 0;
    line-height: 1.5;
}

.auth-form .select2-container--default .auth-country-selection .select2-selection__arrow {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    flex: 0 0 20px;
    width: 20px;
    height: 1.5em;
    line-height: 1.5;
}

.auth-form .select2-container--default.select2-container--focus .auth-country-selection,
.auth-form .select2-container--default.select2-container--open .auth-country-selection {
    border-color: #5D87FF;
    border-radius: 0.6rem;
    box-shadow: 0 0 0 0.2rem rgba(93, 135, 255, 0.18);
}

.auth-form select.is-invalid + .select2-container--default .auth-country-selection {
    border-color: #FA896B;
}

/* a country: its flag, its name, and in the open list its dial code at the far end */
.auth-country {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 100%;
    vertical-align: middle;
}

.auth-country-flag {
    flex: 0 0 auto;
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(42, 53, 71, 0.12);
}

.auth-country-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* the dial code is written left to right, so the gap before it is the end margin of the name */
.auth-country-dropdown .auth-country-name {
    margin-inline-end: auto;
}

.auth-country-code {
    flex: 0 0 auto;
    font-size: 0.875rem;
    color: #98a4b8;
}

.auth-country-dropdown.select2-dropdown {
    margin-top: 4px;
    border: 1px solid #dfe5ef;
    border-radius: 0.6rem;
    box-shadow: 0 12px 28px rgba(9, 30, 66, 0.14);
    overflow: hidden;
}

.auth-country-dropdown.select2-dropdown--above {
    margin-top: -4px;
}

.auth-country-dropdown .select2-search--dropdown {
    padding: 0.6rem;
}

.auth-country-dropdown .select2-search--dropdown .select2-search__field {
    padding: 0.55rem 0.8rem;
    font-size: 1rem;
    color: #2A3547;
    border: 1px solid #dfe5ef;
    border-radius: 0.5rem;
    outline: 0;
}

.auth-country-dropdown .select2-search--dropdown .select2-search__field:focus {
    border-color: #5D87FF;
    box-shadow: 0 0 0 0.2rem rgba(93, 135, 255, 0.18);
}

.auth-country-dropdown .select2-search--dropdown .select2-search__field::placeholder {
    color: #98a4b8;
    opacity: 1;
}

/* six countries at a time */
.auth-country-dropdown .select2-results > .select2-results__options {
    max-height: 276px;
}

.auth-country-dropdown .select2-results__option {
    padding: 0.65rem 0.9rem;
    font-size: 1rem;
    color: #2A3547;
}

.auth-country-dropdown .select2-results__option .auth-country {
    display: flex;
    width: 100%;
}

.auth-country-dropdown .select2-results__option--selected {
    font-weight: 600;
    background: #F6F9FC;
}

.auth-country-dropdown .select2-results__option--highlighted.select2-results__option--selectable {
    color: #194f86;
    background: #ECF2FF;
}
