/* Built-in student login: page and Login Gate popup. Same look as LogixFast Auth. */

.ielts-auth,
.ielts-auth-card,
.ielts-auth-modal,
.ielts-auth-countries {
    --ielts-auth-primary: #d6336c;
    --ielts-auth-primary-dark: #af2a59;
    --ielts-auth-primary-50: #fceff3;
    --ielts-auth-text: #1e293b;
    --ielts-auth-muted: #6b7280;
    --ielts-auth-border: #e5e7eb;
    --ielts-auth-border-strong: #d1d5db;
    --ielts-auth-placeholder: #9ca3af;
    --ielts-auth-error: #ef4444;
    --ielts-auth-focus: 0 0 0 3px rgba(214, 51, 108, 0.18);
    --ielts-auth-shadow-primary: 0 8px 20px rgba(214, 51, 108, 0.32);
    --ielts-auth-font: "Urbanist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --ielts-auth-transition: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    font-family: var(--ielts-auth-font);
    color: var(--ielts-auth-text);
    -webkit-font-smoothing: antialiased;
}

.ielts-auth *,
.ielts-auth *::before,
.ielts-auth *::after,
.ielts-auth-card *,
.ielts-auth-countries * {
    box-sizing: border-box;
}

.ielts-auth svg,
.ielts-auth-modal svg,
.ielts-auth-countries svg {
    display: block;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Page ── */

body.ielts-auth-page {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 16px;
    background-color: #eef1f5;
}

body.ielts-auth-page:not([style]) {
    background-image:
        radial-gradient(circle at 20% 20%, rgba(214, 51, 108, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(15, 23, 42, 0.04) 0%, transparent 40%),
        linear-gradient(160deg, #f8f9fb 0%, #eef1f5 50%, #e8ecf1 100%);
}

body.ielts-auth-page.has-bg-overlay {
    box-shadow: inset 0 0 0 100vmax rgba(15, 23, 42, 0.45);
}

.ielts-auth-card__brand {
    margin-bottom: 20px;
    text-align: center;
}

.ielts-auth-card__logo {
    display: block;
    max-width: 180px;
    max-height: 64px;
    margin: 0 auto;
}

.ielts-auth-card__name {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--ielts-auth-muted);
}

.ielts-auth-card__tagline {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--ielts-auth-muted);
}

/* ── Card, shared by page and popup ── */

.ielts-auth-card,
.ielts-auth-modal .ielts-auth-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: min(440px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    padding: 2rem 1.75rem 1.75rem;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 32px 64px -12px rgba(15, 23, 42, 0.18), 0 8px 24px rgba(15, 23, 42, 0.06), inset 0 1px rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    line-height: normal;
    animation: ielts-auth-pop 0.36s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.ielts-auth [hidden],
.ielts-auth-countries [hidden] {
    display: none !important;
}

.ielts-auth .ielts-auth__title {
    margin: 0 0 6px;
    padding: 0;
    font-family: inherit;
    font-size: clamp(1.35rem, 4vw, 1.625rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: normal;
    text-transform: none;
    color: var(--ielts-auth-text);
}

.ielts-auth .ielts-auth__subtitle {
    margin: 0 0 1.25rem;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--ielts-auth-muted);
}

/* ── Tabs ── */

.ielts-auth .ielts-auth__tabs {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 1.25rem;
    padding: 4px;
    border: 1px solid var(--ielts-auth-border);
    border-radius: 12px;
    background: #f3f4f6;
}

.ielts-auth .ielts-auth__tabs-indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    z-index: 0;
    width: calc(50% - 4px);
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.34s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.ielts-auth .ielts-auth__tabs-indicator[data-active="register"] {
    transform: translateX(100%);
}

.ielts-auth .ielts-auth__tab {
    position: relative;
    z-index: 1;
    display: block;
    width: auto;
    min-height: 40px;
    margin: 0;
    padding: 8px 14px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: normal;
    text-transform: none;
    color: var(--ielts-auth-muted);
    cursor: pointer;
    transition: color 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.ielts-auth .ielts-auth__tab:hover {
    background: transparent;
    color: var(--ielts-auth-text);
}

.ielts-auth .ielts-auth__tab.is-active {
    background: transparent;
    color: var(--ielts-auth-primary);
}

.ielts-auth .ielts-auth__tab:focus-visible {
    outline: 0;
    box-shadow: var(--ielts-auth-focus);
}

.ielts-auth .ielts-auth__panel {
    animation: ielts-auth-slide-in 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Fields ── */

.ielts-auth .ielts-auth__field {
    margin-bottom: 0.9rem;
}

.ielts-auth .ielts-auth__label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin: 0 0 8px;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ielts-auth-text);
}

.ielts-auth .ielts-auth__required {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    color: var(--ielts-auth-primary);
}

.ielts-auth .ielts-auth__field:has([aria-invalid="true"]) .ielts-auth__label,
.ielts-auth .ielts-auth__field:has([aria-invalid="true"]) .ielts-auth__required {
    color: var(--ielts-auth-error);
}

.ielts-auth .ielts-auth__input-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
}

.ielts-auth .ielts-auth__input-icon {
    position: absolute;
    top: 50%;
    left: 13px;
    z-index: 1;
    display: flex;
    align-items: center;
    color: var(--ielts-auth-placeholder);
    transform: translateY(-50%);
    transition: color var(--ielts-auth-transition);
    pointer-events: none;
}

.ielts-auth .ielts-auth__input-wrap:focus-within .ielts-auth__input-icon {
    color: var(--ielts-auth-muted);
}

.ielts-auth .ielts-auth__input {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 46px;
    margin: 0;
    padding: 11px 14px 11px 42px;
    border: 1px solid var(--ielts-auth-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: none;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: normal;
    color: var(--ielts-auth-text);
    transition: border-color var(--ielts-auth-transition), box-shadow var(--ielts-auth-transition), background var(--ielts-auth-transition);
}

.ielts-auth .ielts-auth__input::placeholder {
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: normal;
    color: var(--ielts-auth-placeholder);
    opacity: 1;
}

.ielts-auth .ielts-auth__input:hover:not(:focus) {
    border-color: var(--ielts-auth-border-strong);
    background: #fff;
}

.ielts-auth .ielts-auth__input:focus {
    border-color: var(--ielts-auth-primary);
    outline: 0;
    background: #fff;
    box-shadow: var(--ielts-auth-focus);
}

.ielts-auth .ielts-auth__input[type="password"] {
    padding-right: 44px;
    font-size: 1.125rem;
    letter-spacing: 0.05em;
}

.ielts-auth .ielts-auth__input[type="password"]::placeholder {
    font-size: 0.875rem;
    letter-spacing: normal;
}

/* A shown password keeps the room for its eye button. */
.ielts-auth .ielts-auth__input-wrap:has(.ielts-auth__input-action) .ielts-auth__input {
    padding-right: 44px;
}

.ielts-auth .ielts-auth__input[aria-invalid="true"],
.ielts-auth .ielts-auth__phone-row:has([aria-invalid="true"]) .ielts-auth__country {
    border-color: var(--ielts-auth-error);
    background: rgba(239, 68, 68, 0.04);
}

.ielts-auth .ielts-auth__input[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16);
}

.ielts-auth .ielts-auth__field:has([aria-invalid="true"]) .ielts-auth__input-icon {
    color: var(--ielts-auth-error);
}

.ielts-auth .ielts-auth__input-action {
    position: absolute;
    top: 50%;
    right: 4px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    color: var(--ielts-auth-muted);
    cursor: pointer;
    transform: translateY(-50%);
    transition: color var(--ielts-auth-transition), background var(--ielts-auth-transition);
}

.ielts-auth .ielts-auth__input-action:hover {
    background: var(--ielts-auth-primary-50);
    color: var(--ielts-auth-primary);
}

.ielts-auth .ielts-auth__input-action:focus-visible {
    outline: 0;
    box-shadow: var(--ielts-auth-focus);
}

.ielts-auth .ielts-auth__eye-off,
.ielts-auth .ielts-auth__input-action[aria-pressed="true"] .ielts-auth__eye {
    display: none;
}

.ielts-auth .ielts-auth__input-action[aria-pressed="true"] .ielts-auth__eye-off {
    display: block;
}

/* ── Phone ── */

.ielts-auth .ielts-auth__phone-row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.ielts-auth .ielts-auth__phone-wrap {
    flex: 1;
    min-width: 0;
}

.ielts-auth .ielts-auth__country {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
    width: auto;
    min-height: 46px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid var(--ielts-auth-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: none;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    color: var(--ielts-auth-text);
    cursor: pointer;
    transition: border-color var(--ielts-auth-transition), box-shadow var(--ielts-auth-transition), background var(--ielts-auth-transition);
}

.ielts-auth .ielts-auth__country:hover {
    border-color: var(--ielts-auth-border-strong);
    background: #fff;
    color: var(--ielts-auth-text);
}

.ielts-auth .ielts-auth__country[aria-expanded="true"],
.ielts-auth .ielts-auth__country:focus-visible {
    border-color: var(--ielts-auth-primary);
    outline: 0;
    box-shadow: var(--ielts-auth-focus);
}

.ielts-auth__flag {
    display: inline-block;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin: 0;
    border-radius: 0;
    object-fit: contain;
}

.ielts-auth .ielts-auth__dial {
    font-size: 0.9375rem;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    color: var(--ielts-auth-muted);
}

.ielts-auth .ielts-auth__chevron {
    color: var(--ielts-auth-muted);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.ielts-auth .ielts-auth__country[aria-expanded="true"] .ielts-auth__chevron {
    transform: rotate(180deg);
}

/* Sits on body so the card's scrolling can't clip it. */
.ielts-auth-countries {
    position: fixed;
    z-index: 1000000;
    overflow: hidden;
    border: 1px solid var(--ielts-auth-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14), 0 8px 16px rgba(15, 23, 42, 0.06);
    animation: ielts-auth-dropdown-in 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.ielts-auth-countries__search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--ielts-auth-border);
    color: var(--ielts-auth-muted);
}

.ielts-auth-countries .ielts-auth-countries__input {
    flex: 1;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    outline: 0;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--ielts-auth-text);
    -webkit-appearance: none;
    appearance: none;
}

.ielts-auth-countries .ielts-auth-countries__input::placeholder {
    color: var(--ielts-auth-placeholder);
}

.ielts-auth-countries .ielts-auth-countries__list {
    max-height: 240px;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    list-style: none;
}

.ielts-auth-countries .ielts-auth-countries__list li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ielts-auth-countries .ielts-auth-countries__list button {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: normal;
    text-align: left;
    text-transform: none;
    color: var(--ielts-auth-text);
    cursor: pointer;
}

.ielts-auth-countries .ielts-auth-countries__list button:hover,
.ielts-auth-countries .ielts-auth-countries__list button:focus-visible,
.ielts-auth-countries .ielts-auth-countries__list button.is-active {
    outline: 0;
    background: var(--ielts-auth-primary-50);
    color: var(--ielts-auth-text);
}

.ielts-auth-countries .ielts-auth-countries__list button.is-active {
    font-weight: 600;
    color: var(--ielts-auth-primary);
}

.ielts-auth-countries__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ielts-auth-countries__code {
    font-size: 0.8125rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--ielts-auth-muted);
}

/* ── Remember me and forgot password ── */

.ielts-auth .ielts-auth__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1rem;
}

.ielts-auth .ielts-auth__check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--ielts-auth-muted);
    cursor: pointer;
}

.ielts-auth .ielts-auth__check input {
    width: auto;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    -webkit-appearance: checkbox;
    appearance: auto;
    accent-color: var(--ielts-auth-primary);
    cursor: pointer;
}

.ielts-auth .ielts-auth__link {
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    color: var(--ielts-auth-primary);
    cursor: pointer;
}

.ielts-auth .ielts-auth__link:hover {
    background: transparent;
    color: var(--ielts-auth-primary);
    text-decoration: underline;
}

.ielts-auth__captcha:not(:empty) {
    margin-bottom: 1rem;
}

/* ── Buttons ── */

.ielts-auth .ielts-auth__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: auto;
    min-height: 46px;
    margin: 0;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 8px;
    box-shadow: none;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: normal;
    text-decoration: none;
    text-transform: none;
    cursor: pointer;
    transition: all var(--ielts-auth-transition);
}

.ielts-auth .ielts-auth__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ielts-auth .ielts-auth__btn:focus-visible {
    outline: 0;
    box-shadow: var(--ielts-auth-focus);
}

.ielts-auth .ielts-auth__btn--primary {
    border-color: var(--ielts-auth-primary);
    background: var(--ielts-auth-primary);
    color: #fff;
}

.ielts-auth .ielts-auth__btn--primary:hover:not(:disabled) {
    border-color: var(--ielts-auth-primary-dark);
    background: var(--ielts-auth-primary-dark);
    box-shadow: var(--ielts-auth-shadow-primary);
    color: #fff;
    transform: translateY(-2px);
}

.ielts-auth .ielts-auth__btn--primary:active:not(:disabled) {
    transform: translateY(0);
}

.ielts-auth .ielts-auth__btn-arrow {
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.ielts-auth .ielts-auth__btn--primary:hover:not(:disabled) .ielts-auth__btn-arrow {
    transform: translateX(4px);
}

.ielts-auth .ielts-auth__btn--ghost {
    margin-top: 10px;
    border-color: var(--ielts-auth-primary);
    background: transparent;
    color: var(--ielts-auth-text);
}

.ielts-auth .ielts-auth__btn--ghost:hover:not(:disabled) {
    border-color: var(--ielts-auth-primary);
    background: var(--ielts-auth-primary-50);
    color: var(--ielts-auth-primary);
}

.ielts-auth .ielts-auth__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ielts-auth .ielts-auth__actions .ielts-auth__btn {
    margin-top: 0;
}

.ielts-auth .ielts-auth__actions .ielts-auth__btn--wide {
    grid-column: 1 / -1;
}

/* ── Code boxes ── */

.ielts-auth .ielts-auth__otp {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0.5rem 0 1rem;
}

.ielts-auth .ielts-auth__otp input {
    width: 48px;
    max-width: none;
    height: 56px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 1.5px solid var(--ielts-auth-border);
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--ielts-auth-text);
    transition: all var(--ielts-auth-transition);
}

.ielts-auth .ielts-auth__otp input:focus {
    border-color: var(--ielts-auth-primary);
    outline: 0;
    box-shadow: var(--ielts-auth-focus);
    transform: translateY(-1px);
}

.ielts-auth .ielts-auth__otp input:not(:placeholder-shown) {
    border-color: var(--ielts-auth-primary);
    background: var(--ielts-auth-primary-50);
}

.ielts-auth [name="code"][aria-invalid="true"] + .ielts-auth__otp input {
    border-color: var(--ielts-auth-error);
    background: rgba(239, 68, 68, 0.04);
}

/* ── Messages ── */

.ielts-auth .ielts-auth__toast {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1000001;
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
    padding: 12px 14px;
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 12px;
    background: #f0fdf9;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
    animation: ielts-auth-toast-in 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.ielts-auth .ielts-auth__toast.is-error {
    border-color: rgba(239, 68, 68, 0.35);
    background: #fff5f5;
}

.ielts-auth .ielts-auth__toast-message {
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--ielts-auth-text);
}

.ielts-auth .ielts-auth__toast-close {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    color: var(--ielts-auth-muted);
    cursor: pointer;
}

.ielts-auth .ielts-auth__toast-close:hover {
    background: rgba(15, 23, 42, 0.06);
    color: var(--ielts-auth-text);
}

/* Off-screen rather than display:none, which many bots look for. */
.ielts-auth__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ── Popup ── */

.ielts-auth-modal,
.ielts-auth-modal__dialog,
.ielts-auth-modal__close {
    box-sizing: border-box;
}

.ielts-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: ielts-auth-fade-in 0.28s ease;
}

.ielts-auth-modal[hidden] {
    display: none;
}

.ielts-auth-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    backdrop-filter: blur(24px) saturate(140%);
}

.ielts-auth-modal .ielts-auth-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: none;
    line-height: 1;
    color: var(--ielts-auth-muted);
    cursor: pointer;
    transition: background var(--ielts-auth-transition), color var(--ielts-auth-transition), border-color var(--ielts-auth-transition), transform var(--ielts-auth-transition);
}

.ielts-auth-modal .ielts-auth-modal__close:hover {
    border-color: rgba(214, 51, 108, 0.15);
    background: var(--ielts-auth-primary-50);
    color: var(--ielts-auth-primary);
    transform: rotate(90deg);
}

.ielts-auth-modal .ielts-auth-modal__close:focus-visible {
    outline: 0;
    box-shadow: var(--ielts-auth-focus);
}

body.ielts-auth-modal-open {
    overflow: hidden;
}

@keyframes ielts-auth-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ielts-auth-pop {
    from { opacity: 0; transform: scale(0.94) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes ielts-auth-slide-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ielts-auth-dropdown-in {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ielts-auth-toast-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .ielts-auth *,
    .ielts-auth-card,
    .ielts-auth-modal,
    .ielts-auth-modal__dialog,
    .ielts-auth-countries {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 480px) {
    .ielts-auth-modal {
        padding: 12px;
    }

    .ielts-auth-card,
    .ielts-auth-modal .ielts-auth-modal__dialog {
        max-width: 100%;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        padding: 1.5rem 1.25rem 1.25rem;
        border-radius: 16px;
        animation: ielts-auth-fade-in 0.22s ease;
    }

    .ielts-auth .ielts-auth__title {
        padding-right: 2.25rem;
        font-size: 1.35rem;
    }

    .ielts-auth-modal .ielts-auth-modal__close {
        top: 10px;
        right: 10px;
    }

    /* 16px stops iOS Safari zooming in when a field gets focus. */
    .ielts-auth .ielts-auth__input,
    .ielts-auth-countries .ielts-auth-countries__input {
        font-size: 16px;
    }

    .ielts-auth .ielts-auth__phone-row {
        gap: 6px;
    }

    .ielts-auth .ielts-auth__country {
        gap: 4px;
        padding: 0 8px;
    }

    .ielts-auth .ielts-auth__otp {
        gap: 6px;
    }

    .ielts-auth .ielts-auth__otp input {
        width: 42px;
        height: 50px;
        font-size: 1.25rem;
    }

    .ielts-auth .ielts-auth__toast {
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
    }
}

@media (max-width: 360px) {
    .ielts-auth .ielts-auth__phone-row {
        flex-direction: column;
    }

    .ielts-auth .ielts-auth__country {
        justify-content: flex-start;
        width: 100%;
    }

    .ielts-auth .ielts-auth__otp input {
        width: 38px;
        height: 46px;
        font-size: 1.125rem;
    }
}

/* ── Split-screen login page ── */

body.ielts-auth-page--split {
    display: block;
    padding: 0;
    background: #fff;
}

.ielts-auth-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "Urbanist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ielts-auth-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: clamp(28px, 4vw, 56px);
    overflow: hidden;
    color: #fff;
    background-color: #4b1528;
    background-image:
        radial-gradient(circle at 85% 10%, rgba(214, 51, 108, 0.45) 0%, transparent 45%),
        radial-gradient(circle at 10% 95%, rgba(214, 51, 108, 0.25) 0%, transparent 40%);
}

/* A photo is always darkened so the white text stays readable. */
.ielts-auth-panel.has-image::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.7) 0%, rgba(15, 23, 42, 0.62) 50%, rgba(15, 23, 42, 0.85) 100%);
    content: "";
}

.ielts-auth-panel > * {
    position: relative;
}

.ielts-auth-panel.is-light {
    color: #1e293b;
    background-image: none;
}

.ielts-auth-panel__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
}

.ielts-auth-panel__logo {
    display: block;
    max-width: 200px;
    max-height: 56px;
}

/* The main logo sits on white, so any logo reads on any panel colour. */
.ielts-auth-panel__badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.ielts-auth-panel__badge img {
    display: block;
    max-width: 170px;
    max-height: 40px;
}

.ielts-auth-panel__initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #fff;
    color: #d6336c;
    font-size: 15px;
    font-weight: 800;
}

.ielts-auth-panel__name {
    font-size: 17px;
    font-weight: 700;
}

.ielts-auth-panel__body {
    max-width: 440px;
}

.ielts-auth-panel__headline {
    margin: 0;
    font-size: clamp(1.9rem, 3.2vw, 2.75rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.01em;
    color: inherit;
}

.ielts-auth-panel__tagline {
    margin: 14px 0 0;
    font-size: 1.05rem;
    line-height: 1.5;
    opacity: 0.85;
}

.ielts-auth-panel__points {
    display: grid;
    gap: 12px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.ielts-auth-panel__points li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    line-height: 1.4;
}

.ielts-auth-panel__points svg {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    padding: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ielts-auth-panel.is-light .ielts-auth-panel__points svg {
    background: rgba(15, 23, 42, 0.08);
}

.ielts-auth-panel__foot {
    margin: 0;
    font-size: 13px;
    opacity: 0.7;
}

.ielts-auth-split__main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vw, 56px) 16px;
    background: #fff;
}

/* The form sits on the page itself: no glass card. */
.ielts-auth-card.ielts-auth-card--flat {
    max-width: 420px;
    max-height: none;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

/* Tablets and phones: the panel becomes a short header above the form. */
@media (max-width: 900px) {
    .ielts-auth-split {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr;
    }

    .ielts-auth-panel {
        gap: 14px;
        padding: 20px 16px 22px;
    }

    .ielts-auth-panel__headline {
        font-size: 1.4rem;
    }

    .ielts-auth-panel__tagline {
        margin-top: 6px;
        font-size: 0.95rem;
    }

    .ielts-auth-panel__points,
    .ielts-auth-panel__foot {
        display: none;
    }

    .ielts-auth-split__main {
        align-items: flex-start;
        padding: 28px 16px 40px;
    }
}

@media (max-width: 480px) {
    .ielts-auth-card.ielts-auth-card--flat {
        padding: 0;
        border-radius: 0;
    }
}
