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

:root {
    --ink: #111940;
    --muted: #596587;
    --line: #d9dfec;
    --violet: #3424dc;
    --violet2: #5b1ee8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background: #f7f8ff;
    font-family: "Poppins", Arial, sans-serif;
}

.login-layout {
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(470px, 42%) 1fr;
}

.brand-panel {
    position: relative;
    overflow: hidden;
    min-height: 700px;
    padding: clamp(34px, 4vw, 60px) clamp(34px, 6vw, 92px);
    color: #fff;
    background:
        radial-gradient(circle at 20% 10%, #4730e8 0, transparent 31%),
        linear-gradient(145deg, #181599 0%, #241bbc 48%, #14248d 100%);
}

.brand-panel:after {
    content: "";
    position: absolute;
    z-index: 0;
    right: -120px;
    bottom: -130px;
    width: 540px;
    height: 540px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 50%;
    box-shadow:
        0 0 0 48px rgba(255, 255, 255, .035),
        0 0 0 96px rgba(255, 255, 255, .02);
}

.dot-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 170px;
    height: 170px;
    opacity: .42;
    background-image: radial-gradient(#a9a5ff 2.5px, transparent 3px);
    background-size: 23px 20px;
    mask-image: linear-gradient(135deg, #000 20%, transparent 72%);
}

.relief-illustration {
    position: absolute;
    z-index: 0;
    right: -10px;
    bottom: -4px;
    width: min(70vw, 600px);
    max-width: 80%;
    pointer-events: none;
    opacity: .98;
    filter: brightness(.88) saturate(.94) contrast(1.06) drop-shadow(0 14px 20px rgba(8, 8, 79, .24));
}

.brand-content {
    position: relative;
    z-index: 1;
    max-width: 520px;
    margin: auto;
    padding-top: clamp(10px, 2.2vh, 26px);
}

.brand-lockup {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 17px;
    text-align: left;
}

.brand-logo {
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    padding: 6px;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 27px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}

.brand-lockup > div {
    transform: translateY(12px);
}

.brand-lockup h1 {
    margin: 0 0 7px;
    font-size: clamp(32px, 3vw, 44px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -2px;
}

.brand-lockup p {
    max-width: 305px;
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
    color: #f4f3ff;
}

.brand-rule {
    width: 81px;
    height: 4px;
    margin: 31px 0 20px;
    border-radius: 99px;
    background: #8a7dff;
}

.brand-intro {
    max-width: 430px;
    margin: 0 0 23px;
    font-size: 15px;
    line-height: 1.6;
    color: #f0efff;
}

.feature-list {
    display: grid;
    gap: 16px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.feature-list li {
    display: flex;
    gap: 15px;
    align-items: center;
}

.feature-list strong {
    display: block;
    margin-bottom: 3px;
    font-size: 14px;
    font-weight: 600;
}

.feature-list small {
    display: block;
    max-width: 318px;
    font-size: 12px;
    line-height: 1.45;
    color: #eeedff;
}

.feature-icon {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .18);
}

.feature-icon:before,
.feature-icon:after,
.input-icon:before,
.input-icon:after,
.eye-icon:before,
.button-lock:before {
    content: "";
    position: absolute;
}

.feature-icon svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-clipboard {
    color: #4c35e5;
}

.icon-cube {
    color: #19ae9b;
}

.icon-users {
    color: #f29b13;
}

.brand-organisation {
    position: absolute;
    z-index: 1;
    bottom: 14px;
    left: clamp(34px, 6vw, 92px);
    right: 35px;
    margin: 0;
    font-size: 11px;
    color: #dcd9ff;
}

.form-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    padding: 25px 28px 18px;
    background:
        radial-gradient(circle at 88% 10%, rgba(75, 61, 235, .08), transparent 23%),
        #fbfcff;
}

.form-card {
    width: min(100%, 590px);
    padding: clamp(28px, 3.2vw, 38px);
    border: 1px solid rgba(255, 255, 255, .88);
    border-radius: 24px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 22px 55px rgba(39, 42, 100, .13);
}

.login-logo-wrap {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    margin: 0 auto 11px;
    padding: 6px;
    border: 1px solid #e2e0fa;
    border-radius: 19px;
    background: linear-gradient(145deg, #fff, #f3f1ff);
    box-shadow: 0 8px 20px rgba(72, 47, 200, .12);
}

.login-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 13px;
}

.form-card h2 {
    margin: 0;
    text-align: center;
    font-size: clamp(24px, 2.5vw, 31px);
    letter-spacing: -1.1px;
    font-weight: 700;
}

.form-intro {
    max-width: 365px;
    margin: 9px auto 22px;
    text-align: center;
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted);
}

.alert {
    margin: 0 0 15px;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff5f5;
    color: #b42318;
    font-size: 13px;
}

.field {
    margin-bottom: 15px;
}

.field label {
    display: block;
    margin: 0 0 7px;
    font-size: 13px;
    font-weight: 600;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    height: 54px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.input-wrap:focus-within {
    border-color: #5c45ec;
    box-shadow: 0 0 0 4px rgba(76, 51, 225, .12);
}

.input-wrap input {
    width: 100%;
    height: 100%;
    padding: 0 48px 0 51px;
    border: 0;
    outline: 0;
    border-radius: 11px;
    color: var(--ink);
    font: 500 14px inherit;
}

.input-wrap input::placeholder {
    color: #7d87a4;
}

.input-icon {
    position: absolute;
    z-index: 1;
    left: 17px;
    width: 19px;
    height: 19px;
    color: #687493;
}

.icon-user:before {
    width: 7px;
    height: 7px;
    top: 1px;
    left: 6px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.icon-user:after {
    width: 13px;
    height: 7px;
    bottom: 1px;
    left: 3px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
}

.icon-lock:before {
    width: 13px;
    height: 11px;
    top: 7px;
    left: 3px;
    border: 2px solid currentColor;
    border-radius: 2px;
}

.icon-lock:after {
    width: 9px;
    height: 9px;
    top: 0;
    left: 5px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
}

.password-toggle {
    position: absolute;
    right: 9px;
    width: 37px;
    height: 37px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.password-toggle:hover {
    background: #f0f1f8;
}

.eye-icon {
    position: relative;
    display: block;
    width: 19px;
    height: 12px;
    margin: auto;
    border: 2px solid #667291;
    border-radius: 100%;
}

.eye-icon:before {
    width: 4px;
    height: 4px;
    top: 2px;
    left: 5px;
    border-radius: 50%;
    background: #667291;
}

.password-toggle[aria-pressed="true"] .eye-icon:after {
    content: "";
    position: absolute;
    width: 24px;
    height: 2px;
    top: 4px;
    left: -4px;
    background: #667291;
    transform: rotate(-40deg);
}

.remember {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 1px 0 18px;
    color: #38435e;
    font-size: 13px;
    cursor: pointer;
}

.remember input {
    width: 17px;
    height: 17px;
    accent-color: #4028e7;
}

.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(100deg, #3021dc, #6821df);
    box-shadow: 0 10px 22px rgba(65, 37, 223, .22);
    cursor: pointer;
    font: 600 15px inherit;
    transition: transform .2s, box-shadow .2s;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(65, 37, 223, .3);
}

.login-button:focus-visible,
.password-toggle:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(60, 41, 225, .3);
    outline-offset: 3px;
}

.button-lock {
    position: relative;
    width: 15px;
    height: 13px;
    border: 2px solid #fff;
    border-radius: 2px;
}

.button-lock:before {
    width: 8px;
    height: 8px;
    left: 1px;
    top: -9px;
    border: 2px solid #fff;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.demo-accounts {
    margin-top: 17px;
    border-top: 1px solid #e6e8f0;
    color: var(--muted);
    font-size: 12px;
}

.demo-accounts summary {
    padding-top: 14px;
    color: #3f2bd0;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.demo-accounts p {
    margin: 9px 0 0;
    text-align: left;
    line-height: 1.55;
}

.demo-accounts code {
    color: #252d5c;
    font: 600 11px ui-monospace, monospace;
}

footer {
    margin-top: 16px;
    color: #69738d;
    font-size: 11px;
}

@media (max-width: 900px) {
    .login-layout {
        display: block;
    }

    .brand-panel {
        display: none;
    }

    .form-panel {
        min-height: 100svh;
    }
}

@media (max-width: 480px) {
    .form-panel {
        padding: 18px 14px;
    }

    .form-card {
        padding: 32px 23px;
        border-radius: 19px;
    }

    .remember span {
        font-size: 12px;
    }

    footer {
        margin-top: 18px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .form-card {
        animation: card-in .45s ease-out;
    }

    @keyframes card-in {
        from {
            opacity: 0;
            transform: translateY(12px);
        }

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