/* ReaDx Authentication UI */

.readx-auth-shell {
    --readx-auth-cyan: #20b9ef;
    --readx-auth-blue: #118fd6;
    --readx-auth-purple: #6e62e8;
    --readx-auth-ink: #172033;
    --readx-auth-copy: #58657a;
    --readx-auth-muted: #8390a4;

    min-height: 100vh;
    overflow: hidden;

    background:
        radial-gradient(
            circle at 82% 8%,
            rgba(32, 185, 239, 0.12),
            transparent 25%
        ),
        linear-gradient(
            145deg,
            #f7fbfe 0%,
            #f5f3ff 100%
        ) !important;
}

.readx-auth-shell .authentication-inner {
    min-height: 100vh;
    margin: 0 !important;
}

/* Story panel */

.readx-auth-story {
    position: relative;
    min-height: 100vh;
    overflow: hidden;

    background:
        url("../img/customer-dashboard/readx-library-bg.jpg")
            center / cover no-repeat;
}

.readx-auth-story::before {
    content: "";
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            135deg,
            rgba(3, 24, 47, 0.94) 0%,
            rgba(4, 48, 82, 0.88) 47%,
            rgba(37, 29, 91, 0.88) 100%
        );
}

.readx-auth-story::after {
    content: "";
    position: absolute;
    width: 460px;
    height: 460px;
    right: -130px;
    bottom: -150px;

    background:
        radial-gradient(
            circle,
            rgba(32, 185, 239, 0.26),
            rgba(110, 98, 232, 0.08) 48%,
            transparent 70%
        );

    border-radius: 50%;
}

.readx-auth-story__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;

    background:
        radial-gradient(
            circle at 15% 12%,
            rgba(32, 185, 239, 0.22),
            transparent 28%
        ),
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.04),
            transparent 35%
        );
}

.readx-auth-story__content {
    position: relative;
    z-index: 2;

    width: 100%;
    min-height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: clamp(2rem, 5vw, 5rem);
}

.readx-auth-story__brand {
    width: fit-content;
    min-width: 210px;

    display: inline-flex;
    align-items: center;

    padding: 0.65rem 1rem;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.9),
            rgba(230, 247, 255, 0.82)
        );

    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 18px;

    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);

    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.readx-auth-story__brand img {
    width: 190px;
    max-width: 100%;
    height: 72px;
    display: block;
    object-fit: contain;
    object-position: left center;
}

.readx-auth-story__message {
    max-width: 690px;
    padding-bottom: clamp(2rem, 6vh, 5.5rem);
}

.readx-auth-eyebrow {
    display: inline-flex;
    align-items: center;

    color: #39caff;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.14em;
    line-height: 1.3;
}

.readx-auth-story__message h1 {
    margin: 0.9rem 0 1rem;

    color: #ffffff;
    font-size: clamp(3rem, 5.3vw, 5.7rem);
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.readx-auth-story__message h1 span {
    display: block;

    background:
        linear-gradient(
            90deg,
            #5ed8ff,
            #8c7cff
        );

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.readx-auth-story__message > p {
    max-width: 610px;
    margin: 0;

    color: rgba(255, 255, 255, 0.73);
    font-size: clamp(1rem, 1.25vw, 1.18rem);
    line-height: 1.75;
}

.readx-auth-story__features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;

    margin-top: 2rem;
}

.readx-auth-story__features span {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;

    padding: 0.66rem 0.82rem;

    color: rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.09);

    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 11px;

    font-size: 0.76rem;
    font-weight: 650;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.readx-auth-story__features i {
    color: #50d2ff;
    font-size: 1rem;
}

/* Form panel */

.readx-auth-panel {
    position: relative;
    min-height: 100vh;
    align-items: center;
    justify-content: center;

    padding: clamp(1.25rem, 4vw, 4.5rem);

    background:
        radial-gradient(
            circle at 90% 5%,
            rgba(110, 98, 232, 0.1),
            transparent 28%
        ),
        rgba(249, 252, 255, 0.9);
}

.readx-auth-panel__inner {
    width: min(100%, 500px);
    margin: auto;
}

.readx-auth-mobile-brand {
    width: fit-content;
    display: flex;
    align-items: center;

    margin: 0 auto 1rem;
    padding: 0.48rem 0.85rem;

    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(188, 221, 238, 0.7);
    border-radius: 15px;

    box-shadow: 0 10px 28px rgba(16, 74, 109, 0.1);
}

.readx-auth-mobile-brand img {
    width: 165px;
    height: 64px;
    display: block;
    object-fit: contain;
}

.readx-auth-card {
    padding: clamp(1.5rem, 3.1vw, 2.35rem);

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.94),
            rgba(246, 251, 255, 0.88)
        );

    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 24px;

    box-shadow:
        0 28px 68px rgba(31, 55, 87, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 1);

    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.readx-auth-card__icon {
    width: 48px;
    height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;

    background:
        linear-gradient(
            145deg,
            var(--readx-auth-cyan),
            var(--readx-auth-blue) 55%,
            var(--readx-auth-purple)
        );

    border-radius: 15px;

    font-size: 1.35rem;

    box-shadow:
        0 12px 26px rgba(17, 143, 214, 0.23),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.readx-auth-card__heading {
    margin: 1.25rem 0 1.45rem;
}

.readx-auth-card__heading h2 {
    margin: 0.36rem 0 0.58rem;

    color: var(--readx-auth-ink);
    font-size: clamp(1.65rem, 2.4vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.readx-auth-card__heading p {
    margin: 0;

    color: var(--readx-auth-copy);
    font-size: 0.88rem;
    line-height: 1.65;
}

.readx-auth-card__heading strong {
    color: #087db6;
    font-weight: 750;
}

/* Alerts */

.readx-auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.62rem;

    margin-bottom: 1rem;
    padding: 0.78rem 0.85rem;

    border: 1px solid;
    border-radius: 12px;

    font-size: 0.78rem;
    line-height: 1.5;
}

.readx-auth-alert i {
    flex: 0 0 auto;
    margin-top: 0.08rem;
    font-size: 1rem;
}

.readx-auth-alert--error {
    color: #b42318;
    background: #fff2f1;
    border-color: #ffd1cc;
}

.readx-auth-alert--success {
    color: #087443;
    background: #effcf5;
    border-color: #bdebd2;
}

/* Form */

.readx-auth-form {
    display: grid;
    gap: 1rem;
}

.readx-auth-field {
    min-width: 0;
}

.readx-auth-field .form-label,
.readx-auth-label-row .form-label {
    margin-bottom: 0.42rem;

    color: #39465a;
    font-size: 0.75rem;
    font-weight: 700;
}

.readx-auth-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.readx-auth-link {
    color: #0c8bcb;
    font-size: 0.72rem;
    font-weight: 700;
}

.readx-auth-link:hover {
    color: #665adf;
}

.readx-auth-input {
    position: relative;
    min-height: 48px;
    overflow: hidden;

    display: flex;
    align-items: center;

    background: rgba(248, 251, 254, 0.92);

    border: 1px solid #dbe5ed;
    border-radius: 12px;

    box-shadow:
        inset 0 1px 2px rgba(19, 52, 77, 0.025);

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.readx-auth-input:focus-within {
    background: #ffffff;
    border-color: #58c1ed;

    box-shadow:
        0 0 0 4px rgba(32, 185, 239, 0.11),
        0 7px 18px rgba(15, 133, 190, 0.06);
}

.readx-auth-input > i {
    width: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;

    color: #7690a4;
    font-size: 1.05rem;
}

.readx-auth-input .form-control {
    min-height: 46px;
    padding: 0.7rem 0.75rem 0.7rem 0 !important;

    color: #263448 !important;
    background: transparent !important;

    border: 0 !important;
    border-radius: 0 !important;

    font-size: 0.82rem;

    box-shadow: none !important;
}

.readx-auth-input .form-control::placeholder {
    color: #9ca9b8;
}

.readx-auth-input .input-group-text {
    min-height: 46px;
    padding: 0 0.8rem;

    color: #718397 !important;
    background: transparent !important;

    border: 0 !important;
}

.readx-auth-input .form-control.is-invalid {
    background-image: none !important;
}

.readx-auth-field:has(.is-invalid) .readx-auth-input,
.readx-auth-input:has(.is-invalid) {
    border-color: #e75d5d;
}

.readx-auth-field .invalid-feedback {
    margin-top: 0.35rem;
    color: #c23939;
    font-size: 0.7rem;
}

.readx-auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.readx-auth-options .form-check {
    min-height: auto;
    margin: 0;
}

.readx-auth-options .form-check-label {
    color: #5f6c7f;
    font-size: 0.76rem;
}

.readx-auth-options .form-check-input {
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.08rem;

    border-color: #b9c7d3;
    border-radius: 5px;
}

.readx-auth-options .form-check-input:checked {
    background-color: var(--readx-auth-blue);
    border-color: var(--readx-auth-blue);
}

.readx-auth-primary-btn {
    min-height: 49px;
    width: 100%;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;

    margin-top: 0.1rem;

    color: #ffffff !important;

    background:
        linear-gradient(
            135deg,
            var(--readx-auth-cyan) 0%,
            var(--readx-auth-blue) 50%,
            var(--readx-auth-purple) 100%
        ) !important;

    border: 0 !important;
    border-radius: 12px !important;

    font-size: 0.82rem !important;
    font-weight: 750 !important;

    box-shadow:
        0 13px 27px rgba(19, 137, 207, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease !important;
}

.readx-auth-primary-btn:hover,
.readx-auth-primary-btn:focus {
    color: #ffffff !important;

    box-shadow:
        0 17px 33px rgba(19, 137, 207, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.34) !important;

    transform: translateY(-1px);
}

.readx-auth-primary-btn i {
    font-size: 1rem;
}

.readx-auth-back-link {
    width: fit-content;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.42rem;

    margin: 1rem auto 0;

    color: #0b84c1;
    font-size: 0.75rem;
    font-weight: 700;
}

.readx-auth-back-link:hover {
    color: #665adf;
}

.readx-auth-managed-note {
    display: flex;
    align-items: flex-start;
    gap: 0.58rem;

    margin-top: 1.2rem;
    padding: 0.78rem 0.82rem;

    color: #68778a;
    background:
        linear-gradient(
            135deg,
            rgba(229, 247, 255, 0.78),
            rgba(240, 237, 255, 0.72)
        );

    border: 1px solid rgba(174, 218, 239, 0.65);
    border-radius: 12px;
}

.readx-auth-managed-note i {
    flex: 0 0 auto;
    margin-top: 0.06rem;

    color: #0d94d2;
    font-size: 1rem;
}

.readx-auth-managed-note p {
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.55;
}

.readx-auth-footer {
    margin: 1rem 0 0;

    color: #8995a5;
    font-size: 0.66rem;
    text-align: center;
}

/* Responsive */

@media (max-width: 1199.98px) {
    .readx-auth-panel {
        padding: 2rem;
    }
}

@media (max-width: 991.98px) {
    .readx-auth-shell,
    .readx-auth-shell .authentication-inner,
    .readx-auth-panel {
        min-height: 100vh;
    }

    .readx-auth-panel {
        background:
            linear-gradient(
                rgba(247, 252, 255, 0.92),
                rgba(246, 244, 255, 0.94)
            ),
            url("../img/customer-dashboard/readx-library-bg.jpg")
                center / cover no-repeat;
    }

    .readx-auth-panel__inner {
        width: min(100%, 520px);
    }
}

@media (max-width: 575.98px) {
    .readx-auth-panel {
        align-items: flex-start;
        padding: 1.1rem 0.85rem;
    }

    .readx-auth-card {
        padding: 1.35rem 1.05rem;
        border-radius: 19px;
    }

    .readx-auth-mobile-brand img {
        width: 145px;
        height: 56px;
    }

    .readx-auth-card__heading {
        margin-top: 1rem;
    }

    .readx-auth-card__heading h2 {
        font-size: 1.55rem;
    }

    .readx-auth-label-row {
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .readx-auth-primary-btn,
    .readx-auth-input {
        transition: none !important;
    }
}
