/* Amilma auth pages: login, register and password flows. */
#page-auth {
    background: #edf4fb;
}

#page-auth .auth-page {
    --auth-blue: #0865df;
    --auth-blue-dark: #034cae;
    --auth-navy: #0b1a33;
    --auth-ink: #10213d;
    --auth-muted: #526681;
    --auth-line: #dfe7f1;
    --auth-soft: #f5f8fc;
    --auth-red: #c7223b;
    position: relative;
    padding: clamp(28px, 4vw, 64px) 0 clamp(40px, 5vw, 80px);
    overflow-x: clip;
    color: var(--auth-ink);
    font-family: var(--primary-font, "Manrope", sans-serif);
    background:
        radial-gradient(1000px 520px at 4% 0%, rgba(8, 101, 223, .11), transparent 62%),
        radial-gradient(760px 480px at 100% 14%, rgba(199, 34, 59, .07), transparent 62%),
        linear-gradient(180deg, #f8fbff 0%, #edf4fb 100%);
}

#page-auth .auth-page *,
#page-auth .auth-page *::before,
#page-auth .auth-page *::after {
    box-sizing: border-box;
}

#page-auth .auth-page__shell {
    display: grid;
    grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr);
    width: min(1180px, calc(100% - 48px));
    min-height: 640px;
    margin-inline: auto;
    overflow: hidden;
    border: 1px solid rgba(16, 33, 61, .08);
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(16, 33, 61, .13), 0 1px 0 rgba(255, 255, 255, .9) inset;
    animation: auth-rise .65s cubic-bezier(.2, .8, .2, 1) both;
}

/* Visual side */
#page-auth .auth-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    padding: clamp(28px, 3.4vw, 46px);
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    background:
        radial-gradient(560px 380px at 14% 0%, rgba(8, 101, 223, .55), transparent 66%),
        linear-gradient(148deg, #0b1a33 0%, #102d55 50%, #083d82 100%);
}

#page-auth .auth-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: .38;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 18%, #000 20%, transparent 74%);
    mask-image: radial-gradient(ellipse at 50% 18%, #000 20%, transparent 74%);
}

#page-auth .auth-visual > :not(.auth-visual__glow) {
    position: relative;
    z-index: 1;
}

#page-auth .auth-visual__glow {
    position: absolute;
    z-index: 0;
    display: block;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(30px);
}

#page-auth .auth-visual__glow--one {
    top: -130px;
    right: -110px;
    width: 330px;
    height: 330px;
    background: rgba(8, 101, 223, .55);
    animation: auth-pulse 9s ease-in-out infinite;
}

#page-auth .auth-visual__glow--two {
    bottom: -140px;
    left: -120px;
    width: 300px;
    height: 300px;
    background: rgba(199, 34, 59, .28);
    animation: auth-pulse 11s ease-in-out infinite reverse;
}

#page-auth .auth-visual__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#page-auth .auth-visual__brand {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 12px;
    background: rgba(255, 255, 255, .1);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

#page-auth .auth-visual__logo {
    display: block;
    width: 105px;
    height: auto;
}

#page-auth .auth-visual__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .09);
    color: #dce9ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

#page-auth .auth-visual__badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #6ee7b7;
    box-shadow: 0 0 0 4px rgba(110, 231, 183, .16);
}

#page-auth .auth-visual__copy {
    max-width: 480px;
    margin-top: clamp(4px, 1.4vw, 18px);
}

#page-auth .auth-visual__eyebrow {
    margin: 0 0 14px;
    color: #9cc4ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
    line-height: 1.3;
    text-transform: uppercase;
}

#page-auth .auth-visual__copy h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(34px, 3.4vw, 50px);
    font-weight: 800;
    letter-spacing: -.045em;
    line-height: 1.04;
}

#page-auth .auth-visual__copy h2 span {
    color: #8fc0ff;
}

#page-auth .auth-visual__copy > p:last-child {
    max-width: 430px;
    margin: 18px 0 0;
    color: #c8d8ef;
    font-size: 16px;
    line-height: 1.65;
}

#page-auth .auth-visual__art {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    align-self: stretch;
    min-height: 150px;
    max-height: 270px;
    margin: auto 0 0;
    padding: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .04));
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: auth-float 8s ease-in-out infinite;
}

#page-auth .auth-visual__art img,
#page-auth .auth-visual__image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

#page-auth .auth-visual__points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: #d7e5f8;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

#page-auth .auth-visual__points li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#page-auth .auth-visual__points li span {
    position: relative;
    flex: none;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}

#page-auth .auth-visual__points li span::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 3px;
    width: 4px;
    height: 8px;
    border: solid #8fc0ff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

/* Form side */
#page-auth .auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: clamp(26px, 4vw, 52px);
    background:
        radial-gradient(560px 360px at 100% 0%, rgba(8, 101, 223, .05), transparent 66%),
        #fff;
}

#page-auth .auth-card {
    width: 100%;
    max-width: 460px;
    margin: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#page-auth .auth-card__header {
    padding: 0 0 8px !important;
    border: 0 !important;
}

#page-auth .auth-card__heading-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

#page-auth .auth-card__heading-row:not(.has-icon) {
    display: block;
}

#page-auth .auth-card__header-icon {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 1px solid #dbe9ff;
    border-radius: 16px;
    background: #eef5ff !important;
    color: var(--auth-blue);
}

#page-auth .auth-card__header-icon svg {
    width: 24px;
    height: 24px;
}

#page-auth .auth-card__heading-copy {
    min-width: 0;
}

#page-auth .auth-card__header-title {
    margin: 0;
    color: var(--auth-ink);
    font-size: clamp(28px, 2.4vw, 34px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.08;
}

#page-auth .auth-card__header-description {
    margin: 10px 0 0;
    color: var(--auth-muted);
    font-size: 14.5px;
    line-height: 1.6;
}

#page-auth .auth-card__body {
    padding: 22px 0 0 !important;
}

#page-auth .auth-card__body form {
    margin: 0;
}

#page-auth .auth-card__body .mb-3 {
    margin-bottom: 16px !important;
}

#page-auth .auth-card__body .form-label {
    margin-bottom: 7px;
    color: #243b5a;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .01em;
}

#page-auth .auth-card .form-control {
    min-height: 52px;
    padding: 13px 16px;
    border: 1.5px solid var(--auth-line);
    border-radius: 12px;
    background: #fff;
    color: var(--auth-ink);
    font-size: 15px;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

#page-auth .auth-card .form-control:focus {
    border-color: var(--auth-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(8, 101, 223, .12);
}

#page-auth .auth-card .form-control::placeholder {
    color: #94a3b8;
}

#page-auth .auth-card .form-control.ps-5 {
    padding-inline-start: 46px !important;
}

#page-auth .auth-card input[type="password"].form-control {
    padding-inline-end: 48px;
}

#page-auth .auth-card form .auth-input-icon {
    top: 50% !important;
    inset-inline-start: 15px !important;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #7f93ad;
    transform: translateY(-50%);
}

#page-auth .auth-card form .auth-input-icon svg {
    width: 20px;
    height: 20px;
}

#page-auth .auth-card .input-password-toggle {
    right: 14px !important;
    z-index: 3;
    width: 24px;
    padding: 0 !important;
    color: #7f93ad;
}

#page-auth .auth-card .input-password-toggle svg {
    width: 20px;
    height: 20px;
}

body[dir="rtl"] #page-auth .auth-card .input-password-toggle {
    right: auto !important;
    left: 14px !important;
}

#page-auth .auth-card .row.g-0 {
    align-items: center;
    margin-bottom: 18px !important;
}

#page-auth .auth-card .cb-container {
    min-height: 22px;
    margin: 0;
    padding-left: 30px;
    line-height: 22px;
}

#page-auth .auth-card .cb-container .text-small {
    color: var(--auth-muted);
    font-size: 13.5px;
    font-weight: 600;
}

#page-auth .auth-card .cb-container .checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    width: 20px;
    height: 20px;
    border: 1.5px solid #c9d7e8;
    border-radius: 6px;
    background: #fff;
    transform: translateY(-50%);
    transition: border-color .2s ease, background-color .2s ease;
}

#page-auth .auth-card .cb-container input:checked ~ .checkmark {
    border-color: var(--auth-blue);
    background: var(--auth-blue);
}

#page-auth .auth-card .cb-container .checkmark:after {
    content: "";
    display: none;
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    border-radius: 0;
    background: none;
    transform: rotate(45deg);
}

#page-auth .auth-card .cb-container input:checked ~ .checkmark:after {
    display: block;
}

#page-auth .auth-card .row.g-0 .text-end a {
    color: var(--auth-blue);
    font-size: 13.5px;
    font-weight: 600;
}

#page-auth .auth-card .form-check {
    min-height: 22px;
    padding-left: 1.7em;
}

#page-auth .auth-card .form-check .form-check-input {
    width: 18px;
    height: 18px;
    margin-left: -1.7em;
    border: 1.5px solid #c9d7e8;
    border-radius: 5px;
    box-shadow: none;
}

#page-auth .auth-card .form-check .form-check-input:checked {
    border-color: var(--auth-blue);
    background-color: var(--auth-blue);
}

#page-auth .auth-card .form-check .form-check-label {
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.55;
}

#page-auth .auth-card a {
    color: var(--auth-blue);
    font-weight: 600;
    text-decoration: none;
}

#page-auth .auth-card a:hover {
    text-decoration: underline;
}

#page-auth .auth-card form button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #0865df, #034cae);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .01em;
    box-shadow: 0 14px 28px rgba(8, 101, 223, .26);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

#page-auth .auth-card form button[type="submit"]:hover {
    color: #fff;
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(8, 101, 223, .34);
}

#page-auth .auth-card form button[type="submit"]:active {
    transform: translateY(0);
}

#page-auth .auth-card form button[type="submit"] svg {
    width: 18px;
    height: 18px;
}

#page-auth .auth-card__body .mt-3.text-center {
    margin-top: 20px !important;
    padding-top: 18px;
    border-top: 1px solid var(--auth-line);
    color: var(--auth-muted);
    font-size: 14px;
}

#page-auth .auth-card__body .mt-3.text-center a {
    margin-left: 4px;
}

#page-auth .auth-card .alert {
    padding: 14px 16px;
    border: 0;
    border-radius: 12px;
    font-size: 14px;
}

#page-auth .auth-card .invalid-feedback,
#page-auth .auth-card .form-text {
    font-size: 12.5px;
}

#page-auth .auth-card .input-group > .form-control,
#page-auth .auth-card .input-group > .form-select {
    min-height: 52px;
}

#page-auth .auth-card .input-group .form-select {
    border: 1.5px solid var(--auth-line);
    border-radius: 12px 0 0 12px;
    background-color: #fff;
    font-size: 14px;
}

#page-auth .auth-card .input-group .form-control {
    border-radius: 0 12px 12px 0;
}

body[dir="rtl"] #page-auth .auth-card .input-group .form-select {
    border-radius: 0 12px 12px 0;
}

body[dir="rtl"] #page-auth .auth-card .input-group .form-control {
    border-radius: 12px 0 0 12px;
}

/* Motion */
@keyframes auth-rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes auth-float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

@keyframes auth-pulse {
    0%,
    100% {
        opacity: .7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.12);
    }
}

@media (prefers-reduced-motion: reduce) {
    #page-auth .auth-page__shell,
    #page-auth .auth-visual__art,
    #page-auth .auth-visual__glow {
        animation: none !important;
    }
}

/* Responsive */
@media (max-width: 1199.98px) {
    #page-auth .auth-page__shell {
        min-height: 600px;
    }

    #page-auth .auth-visual {
        padding: 32px;
    }

    #page-auth .auth-panel {
        padding: 38px;
    }
}

@media (max-width: 991.98px) {
    #page-auth .auth-page__shell {
        grid-template-columns: 1fr;
        width: min(720px, calc(100% - 32px));
        min-height: 0;
        border-radius: 24px;
    }

    #page-auth .auth-visual {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 220px;
        gap: 18px 24px;
        align-items: center;
        padding: 28px;
    }

    #page-auth .auth-visual__top {
        grid-column: 1 / -1;
    }

    #page-auth .auth-visual__copy {
        margin: 0;
    }

    #page-auth .auth-visual__copy h2 {
        font-size: 32px;
    }

    #page-auth .auth-visual__copy > p:last-child {
        margin-top: 10px;
        font-size: 14px;
    }

    #page-auth .auth-visual__art {
        grid-column: 2;
        grid-row: 2 / span 2;
        align-self: stretch;
        min-height: 120px;
        max-height: 180px;
        margin: 0;
    }

    #page-auth .auth-visual__points {
        grid-column: 1 / -1;
    }

    #page-auth .auth-panel {
        padding: 32px;
    }

    #page-auth .auth-card {
        max-width: 560px;
    }
}

@media (max-width: 575.98px) {
    #page-auth .auth-page {
        padding: 16px 0 30px;
    }

    #page-auth .auth-page__shell {
        width: calc(100% - 20px);
        border-radius: 20px;
    }

    #page-auth .auth-visual {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 22px 20px;
    }

    #page-auth .auth-visual__top {
        gap: 10px;
    }

    #page-auth .auth-visual__badge {
        padding: 7px 10px;
        font-size: 10px;
    }

    #page-auth .auth-visual__copy h2 {
        font-size: 28px;
    }

    #page-auth .auth-visual__copy > p:last-child {
        font-size: 13.5px;
    }

    #page-auth .auth-visual__art {
        grid-column: auto;
        grid-row: auto;
        width: 100%;
        min-height: 110px;
        max-height: 160px;
    }

    #page-auth .auth-visual__points {
        display: none;
    }

    #page-auth .auth-panel {
        padding: 24px 18px 28px;
    }

    #page-auth .auth-card {
        max-width: none;
    }

    #page-auth .auth-card__header-title {
        font-size: 26px;
    }

    #page-auth .auth-card__header-icon {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    #page-auth .auth-card__body {
        padding-top: 18px !important;
    }

    #page-auth .auth-card .row.g-0 > .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    #page-auth .auth-card .row.g-0 .text-end {
        margin-top: 6px;
        text-align: left !important;
    }
}
