@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&display=swap');

:root {
    --login-bg-0: #06101a;
    --login-bg-1: #0a1424;
    --login-bg-2: #111f34;
    --login-panel: rgba(10, 16, 28, 0.92);
    --login-panel-soft: rgba(15, 24, 40, 0.76);
    --login-border: rgba(255, 255, 255, 0.12);
    --login-text: #f7fbff;
    --login-muted: rgba(223, 234, 247, 0.72);
    --login-accent: #ff7a1a;
    --login-accent-soft: #ffc56d;
    --login-orange-wash: rgba(255, 122, 26, 0.28);
    --login-cyan: #4cc9f0;
    --login-teal: #22d4c6;
    --login-shadow: rgba(3, 8, 16, 0.52);
}

html,
body {
    min-height: 100%;
}

body.login-page {
    margin: 0;
    font-family: "Sora", "Segoe UI", sans-serif;
    color: var(--login-text);
    background:
        radial-gradient(circle at 18% 18%, rgba(76, 201, 240, 0.18), transparent 28%),
        radial-gradient(circle at 82% 20%, rgba(255, 122, 26, 0.2), transparent 25%),
        radial-gradient(circle at 50% 88%, rgba(255, 197, 109, 0.12), transparent 30%),
        linear-gradient(135deg, var(--login-bg-0) 0%, var(--login-bg-1) 48%, var(--login-bg-2) 100%);
    overflow-x: hidden;
    min-height: 100dvh;
    position: relative;
}

body.login-page::before,
body.login-page::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
}

body.login-page::before {
    background-image:
        radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.04), transparent 42%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 88px);
    opacity: 0.9;
}

body.login-page::after {
    background: radial-gradient(circle at 52% 52%, rgba(5, 10, 18, 0.1), rgba(5, 10, 18, 0.76) 72%);
}

.login-shell {
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(0.55rem, 1.3vh, 0.9rem) clamp(0.9rem, 2vw, 1.45rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.login-shell__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 32%, rgba(76, 201, 240, 0.15), transparent 26%),
        radial-gradient(circle at 78% 26%, rgba(255, 122, 26, 0.2), transparent 24%),
        radial-gradient(circle at 50% 76%, rgba(255, 197, 109, 0.08), transparent 30%);
}

.login-shell__content {
    width: min(100%, 680px);
    display: grid;
    gap: 0.48rem;
    position: relative;
    z-index: 1;
    justify-items: center;
}

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    padding: 0.12rem 0.6rem 0.04rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    width: min(100%, 520px);
    text-align: center;
    position: relative;
    overflow: visible;
    isolation: isolate;
}

.login-brand::before,
.login-brand::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: -1;
}

.login-brand::before {
    width: min(78vw, 400px);
    height: 112px;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background:
        radial-gradient(ellipse at 50% 50%, rgba(255, 122, 26, 0.3), rgba(255, 122, 26, 0.12) 44%, transparent 72%),
        radial-gradient(ellipse at 72% 58%, rgba(76, 201, 240, 0.12), transparent 56%);
    filter: blur(18px);
    opacity: 0.9;
}

.login-brand::after {
    width: min(58vw, 300px);
    height: 62px;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at 50% 50%, rgba(255, 197, 109, 0.13), transparent 68%);
    filter: blur(14px);
    opacity: 0.72;
}

.login-brand__logo {
    width: min(380px, 76vw);
    max-height: 78px;
    height: auto;
    object-fit: contain;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    filter:
        drop-shadow(0 16px 28px rgba(255, 122, 26, 0.2))
        drop-shadow(0 5px 14px rgba(4, 10, 18, 0.4))
        saturate(1.08);
}

.login-brand__mark {
    width: min(410px, 78vw);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.35rem;
    position: relative;
    isolation: isolate;
}

.login-brand__mark--mixed {
    margin-inline: auto;
}

.login-brand__mark::before,
.login-brand__mark::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: -1;
}

.login-brand__mark::before {
    inset: -16px -22px;
    background:
        radial-gradient(ellipse at 45% 52%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.44) 46%, rgba(255, 255, 255, 0.1) 68%, transparent 82%),
        radial-gradient(ellipse at 74% 62%, rgba(255, 122, 26, 0.18), transparent 58%),
        radial-gradient(ellipse at 18% 42%, rgba(76, 201, 240, 0.14), transparent 54%);
    filter: blur(10px);
    opacity: 0.96;
}

.login-brand__mark::after {
    width: min(330px, 62vw);
    height: 1px;
    left: 50%;
    bottom: -0.1rem;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(113, 167, 84, 0.54), rgba(255, 122, 26, 0.72), transparent);
    opacity: 0.78;
}

.login-brand__copy {
    min-width: 0;
}

.login-brand__eyebrow {
    display: block;
    margin-bottom: 0.12rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.31em;
    color: rgba(255, 197, 109, 0.92);
    text-align: center;
}

.login-brand__copy h1 {
    margin: 0;
    font-size: 1.76rem;
    line-height: 1.02;
    color: #ffffff;
    text-align: center;
}

.login-shell__subtitle {
    margin: 0;
    padding: 0 0.75rem;
    text-align: center;
    color: var(--login-muted);
    font-size: 0.96rem;
    line-height: 1.28;
    max-width: 600px;
}

.login-panel {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
}

.login-panel::before {
    content: "";
    position: absolute;
    bottom: 2px;
    width: min(82%, 360px);
    height: 36px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(3, 8, 16, 0.96), rgba(3, 8, 16, 0) 72%);
    filter: blur(10px);
    opacity: 0.55;
    z-index: -1;
}

.login-card {
    width: 100%;
    max-width: 560px;
    padding: 1.18rem 1.7rem;
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 0%, rgba(76, 201, 240, 0.08), transparent 34%),
        linear-gradient(165deg, rgba(9, 16, 28, 0.9), rgba(4, 9, 17, 0.96));
    border: 1px solid rgba(188, 202, 220, 0.18);
    box-shadow:
        0 34px 74px rgba(0, 0, 0, 0.44),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.login-card::before,
.login-card::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.login-card::before {
    width: 220px;
    height: 220px;
    top: -130px;
    right: -86px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 122, 26, 0.16), transparent 70%);
}

.login-card::after {
    width: 150px;
    height: 150px;
    bottom: -82px;
    left: -60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(76, 201, 240, 0.12), transparent 70%);
}

.login-card__head {
    text-align: center;
    margin-bottom: 0.78rem;
    display: grid;
    justify-items: center;
    gap: 0.22rem;
}

.login-card__icon {
    width: 52px;
    height: 52px;
    margin-bottom: 0.18rem;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: rgba(229, 238, 250, 0.94);
    font-size: 2rem;
    background:
        linear-gradient(#07111f, #07111f) padding-box,
        conic-gradient(from 18deg, #ff7a1a, #ffd979, #22d4c6, #4cc9f0, #ff7a1a) border-box;
    border: 2px solid transparent;
    box-shadow:
        0 18px 36px rgba(0, 0, 0, 0.34),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.login-card__icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-card__head h2 {
    margin: 0 0 0.12rem;
    font-size: 1.44rem;
    color: #ffffff;
}

.login-card__head p {
    margin: 0;
    color: var(--login-muted);
    line-height: 1.28;
    font-size: 0.88rem;
}

.login-label {
    display: block;
    margin-bottom: 0.28rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-weight: 700;
    color: rgba(235, 244, 251, 0.84);
}

.login-hint {
    display: inline-block;
    margin-top: 0.32rem;
    font-size: 0.8rem;
    color: rgba(208, 222, 235, 0.8);
    line-height: 1.26;
}

.login-hint--security {
    margin-top: -0.34rem;
    margin-bottom: 0.72rem;
}

.login-form .input-group {
    border-radius: 11px;
    overflow: hidden;
    background: rgba(9, 16, 28, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.login-form .input-group:focus-within {
    border-color: rgba(247, 180, 50, 0.96);
    box-shadow: 0 0 0 3px rgba(247, 180, 50, 0.16);
    transform: translateY(-1px);
}

.login-form .input-group-text {
    background: transparent;
    border: 0;
    color: rgba(235, 244, 251, 0.86);
    min-width: 52px;
    justify-content: center;
    padding: 0.7rem 0.8rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.045);
}

.login-field-icon,
.login-eye-icon,
.login-btn-arrow {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-field-icon {
    width: 20px;
    height: 20px;
}

.login-eye-icon {
    width: 20px;
    height: 20px;
}

.login-eye-icon--closed,
.password-toggle-btn.is-visible .login-eye-icon--open {
    display: none;
}

.password-toggle-btn.is-visible .login-eye-icon--closed {
    display: block;
}

.login-form .form-control,
.login-form .form-select {
    background: transparent;
    border: 0;
    color: #ffffff;
    padding: 0.7rem 0.78rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.login-form .form-control::placeholder {
    color: rgba(203, 216, 231, 0.56);
}

.login-form .form-control:focus,
.login-form .form-select:focus {
    box-shadow: none;
}

.login-form .form-select {
    cursor: pointer;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(255, 224, 138, 0.96) 50%),
        linear-gradient(135deg, rgba(255, 224, 138, 0.96) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2.35rem;
}

.login-form .form-select option {
    color: #07111f;
    background: #ffffff;
}

.password-toggle-btn {
    border: 0;
    border-radius: 0;
    background: rgba(15, 24, 40, 0.95);
    color: rgba(235, 244, 251, 0.86);
    min-width: 52px;
    padding-inline: 0.78rem;
}

.password-toggle-btn:hover,
.password-toggle-btn:focus {
    color: #08111d;
    background: rgba(255, 214, 90, 0.94);
}

.login-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
    margin: 0.68rem 0 0.78rem;
    flex-wrap: wrap;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.34rem;
    margin: 0;
}

.form-check-input {
    background-color: rgba(235, 244, 251, 0.16);
    border-color: rgba(180, 206, 225, 0.72);
    width: 0.92rem;
    height: 0.92rem;
}

.form-check-input:checked {
    background-color: var(--login-cyan);
    border-color: var(--login-cyan);
}

.form-check-label {
    color: rgba(230, 239, 248, 0.92);
    font-size: 0.84rem;
    font-weight: 700;
}

.login-recovery-link {
    border: 0;
    margin-left: auto;
    padding: 0.08rem 0;
    background: transparent;
    color: rgba(142, 224, 225, 0.72);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    opacity: 0.92;
    transition: color 0.16s ease, opacity 0.16s ease;
}

.login-recovery-link:hover,
.login-recovery-link:focus {
    color: rgba(112, 255, 244, 0.94);
    opacity: 1;
    text-decoration: none;
    outline: 2px solid rgba(34, 212, 198, 0.24);
    outline-offset: 3px;
}

.login-page .login_btn {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(255, 241, 207, 0.5);
    border-radius: 10px;
    background: linear-gradient(120deg, #ffe08a 0%, var(--login-accent) 58%, #31d2c7 100%) !important;
    color: #07111f !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.78rem;
    font-size: 0.96rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    box-shadow:
        0 16px 28px rgba(247, 180, 50, 0.24),
        0 8px 18px rgba(76, 201, 240, 0.16);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.login-page .login_btn .login-btn-arrow {
    width: 21px;
    height: 21px;
    stroke-width: 2.25;
}

.login-page .login_btn:hover,
.login-page .login_btn:focus {
    transform: translateY(-1px);
    filter: saturate(1.04);
    background: linear-gradient(120deg, #fff0b6 0%, #ff8a2a 58%, #4ce6db 100%) !important;
    box-shadow:
        0 20px 30px rgba(247, 180, 50, 0.3),
        0 10px 22px rgba(76, 201, 240, 0.22);
    color: #07111f !important;
}

.login-page .login_btn:active {
    transform: translateY(1px);
}

.login-page .login_btn:disabled,
.login-page .login_btn[aria-busy="true"] {
    cursor: wait;
    filter: grayscale(0.18) saturate(0.92);
    opacity: 0.88;
}

.login-footer {
    margin-top: 0.82rem;
    padding-top: 0.68rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    display: grid;
    gap: 0.34rem;
    justify-items: center;
}

.login-link {
    color: rgba(220, 231, 243, 0.84);
    text-decoration: none;
    font-size: 0.82rem;
}

.login-link:hover,
.login-link:focus {
    color: #ffffff;
}

.login-alert {
    width: 100%;
}

.login-alert .alert {
    margin-bottom: 0;
    border-radius: 12px;
    font-size: 0.82rem;
}

.login-footer-bar {
    margin-top: 0.5rem;
    text-align: center;
    color: rgba(219, 230, 242, 0.72);
    font-size: 0.76rem;
    position: relative;
    z-index: 1;
}

@keyframes login-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-shell__content,
.login-footer-bar {
    animation: login-fade-in 0.6s ease both;
}

@media (max-width: 640px) {
    .login-shell {
        padding: 0.42rem 0.7rem;
        justify-content: center;
    }

    .login-shell__content {
        gap: 0.32rem;
    }

    .login-brand {
        width: 100%;
        gap: 0.24rem;
        padding: 0.05rem 0.3rem 0;
    }

    .login-brand__logo {
        width: min(336px, 92vw);
        max-height: 72px;
    }

    .login-brand__mark {
        width: min(346px, 94vw);
        padding: 0.04rem 0.16rem;
    }

    .login-brand__mark::before {
        inset: -18px -18px;
        filter: blur(9px);
    }

    .login-brand__mark::after {
        width: min(310px, 78vw);
    }

    .login-brand__eyebrow {
        font-size: 0.58rem;
        letter-spacing: 0.24em;
    }

    .login-brand__copy h1 {
        font-size: 1.32rem;
    }

    .login-shell__subtitle {
        font-size: 0.78rem;
        line-height: 1.18;
    }

    .login-card {
        padding: 0.68rem 0.82rem;
        border-radius: 16px;
    }

    .login-card__head {
        margin-bottom: 0.46rem;
    }

    .login-card__icon {
        width: 38px;
        height: 38px;
        margin-bottom: 0.1rem;
    }

    .login-card__icon svg {
        width: 18px;
        height: 18px;
    }

    .login-card__head h2 {
        font-size: 1.08rem;
    }

    .login-card__head p {
        font-size: 0.76rem;
    }

    .login-form .input-group-text {
        min-width: 44px;
        padding: 0.52rem 0.58rem;
    }

    .login-form .form-control,
    .login-form .form-select {
        padding: 0.52rem 0.56rem;
        font-size: 0.88rem;
    }

    .login-label {
        margin-bottom: 0.22rem;
        font-size: 0.68rem;
    }

    .login-hint {
        margin-top: 0.22rem;
        font-size: 0.72rem;
    }

    .login-row {
        margin: 0.38rem 0 0.48rem;
        align-items: flex-start;
    }

    .login-recovery-link {
        width: 100%;
        margin-left: 1.3rem;
        font-size: 0.7rem;
        color: rgba(178, 224, 229, 0.68);
        text-align: left;
    }

    .login-hint--security {
        margin-top: -0.24rem;
        margin-bottom: 0.44rem;
    }

    .login-page .login_btn {
        min-height: 40px;
        font-size: 0.82rem;
        letter-spacing: 0.06em;
    }

    .login-footer {
        margin-top: 0.42rem;
        padding-top: 0.42rem;
    }

    .login-footer-bar {
        margin-top: 0.36rem;
        font-size: 0.66rem;
    }
}

@media (max-width: 380px), (max-height: 700px) {
    .login-shell {
        padding: 0.3rem 0.58rem;
    }

    .login-shell__content {
        gap: 0.24rem;
    }

    .login-brand__logo {
        width: min(306px, 92vw);
        max-height: 66px;
    }

    .login-brand__mark {
        width: min(318px, 94vw);
    }

    .login-brand__copy h1 {
        font-size: 1.2rem;
    }

    .login-shell__subtitle {
        font-size: 0.72rem;
        line-height: 1.14;
    }

    .login-card {
        padding: 0.58rem 0.68rem;
    }

    .login-card__head {
        margin-bottom: 0.32rem;
    }

    .login-card__icon {
        width: 34px;
        height: 34px;
    }

    .login-card__icon svg {
        width: 16px;
        height: 16px;
    }

    .login-card__head p {
        font-size: 0.72rem;
    }

    .login-form .input-group-text,
    .login-form .form-control,
    .login-form .form-select {
        padding-block: 0.46rem;
    }

    .login-hint--security {
        margin-bottom: 0.32rem;
    }

    .login-footer {
        margin-top: 0.34rem;
        padding-top: 0.34rem;
    }

    .login-footer-bar {
        display: none;
    }
}

@media (min-width: 700px) and (max-height: 760px) {
    .login-shell {
        justify-content: center;
        padding-block: 0.42rem;
    }

    .login-shell__content {
        gap: 0.32rem;
    }

    .login-brand {
        gap: 0.16rem;
        padding: 0;
    }

    .login-brand::before {
        height: 88px;
        top: -14px;
    }

    .login-brand::after {
        height: 52px;
        top: 6px;
    }

    .login-brand__logo {
        width: min(340px, 54vw);
        max-height: 70px;
    }

    .login-brand__mark {
        width: min(370px, 58vw);
        padding-block: 0;
    }

    .login-brand__mark::before {
        inset: -18px -24px;
    }

    .login-brand__eyebrow {
        margin-bottom: 0.08rem;
        font-size: 0.55rem;
    }

    .login-brand__copy h1 {
        font-size: 1.34rem;
    }

    .login-shell__subtitle {
        font-size: 0.78rem;
        line-height: 1.18;
    }

    .login-card {
        max-width: 500px;
        padding: 0.82rem 1.16rem;
    }

    .login-card__head {
        margin-bottom: 0.42rem;
    }

    .login-card__head h2 {
        font-size: 1.12rem;
    }

    .login-card__head p,
    .login-hint,
    .form-check-label {
        font-size: 0.72rem;
    }

    .login-label {
        margin-bottom: 0.18rem;
        font-size: 0.66rem;
    }

    .login-form .input-group-text,
    .login-form .form-control,
    .login-form .form-select {
        padding-block: 0.48rem;
    }

    .login-row {
        margin: 0.34rem 0 0.48rem;
    }

    .login-page .login_btn {
        min-height: 40px;
        font-size: 0.82rem;
    }

    .login-footer {
        margin-top: 0.36rem;
        padding-top: 0.36rem;
        gap: 0.22rem;
    }

    .login-footer-bar {
        margin-top: 0.34rem;
        font-size: 0.64rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
