
:root {
    --primary: #5856d6;
    --primary-dark: #4543b5;
    --background: #f6f7fb;
    --text: #202136;
    --muted: #85889b;
    --border: #e6e7ef;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: var(--background);
    color: var(--text);
}

.page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
}

/* BRAND PANEL */

.brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 7%;
    margin: 18px;
    overflow: hidden;
    border-radius: 28px;
    color: white;
    background:
        radial-gradient(
            circle at 85% 15%,
            rgba(174, 151, 255, 0.65),
            transparent 35%
        ),
        linear-gradient(
            145deg,
            #272653,
            #5149b9 65%,
            #7970e8
        );
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    position: relative;
    z-index: 1;
}

.brand-logo {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: white;
    color: #5149b9;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -2px;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
}

.brand-description {
    margin-top: 4px;
    color: #d7d5ff;
    font-size: 12px;
    letter-spacing: 1.5px;
}

.hero {
    position: relative;
    z-index: 1;
    max-width: 530px;
    padding: 50px 0;
}

.hero-label {
    display: inline-block;
    padding: 9px 14px;
    margin-bottom: 26px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.09);
    color: #eeedff;
    font-size: 12px;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: clamp(38px, 4.2vw, 64px);
    line-height: 1.12;
    letter-spacing: -2px;
    font-weight: 750;
}

.hero h1 span {
    color: #c8c1ff;
}

.hero p {
    max-width: 390px;
    margin-top: 24px;
    color: #e0dfff;
    font-size: 15px;
    line-height: 1.9;
}

/* DECORATIVE SHAPES */

.artwork {
    position: absolute;
    right: -65px;
    bottom: 100px;
    width: 260px;
    height: 260px;
    opacity: 0.55;
    transform: rotate(-15deg);
    pointer-events: none;
}

.shape {
    position: absolute;
    width: 170px;
    height: 170px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 38px;
}

.shape-one {
    top: 0;
    left: 0;
    transform: rotate(25deg);
}

.shape-two {
    top: 40px;
    left: 40px;
    background: rgba(255, 255, 255, 0.12);
    transform: rotate(25deg);
}

.shape-three {
    top: 80px;
    left: 80px;
    border-radius: 50%;
    background: rgba(211, 204, 255, 0.22);
}

.brand-footer {
    position: relative;
    z-index: 1;
    color: #d6d4ff;
    font-size: 12px;
}

/* LOGIN PANEL */

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 10%;
}

.login-content {
    width: 100%;
    max-width: 410px;
}

.mobile-brand {
    display: none;
}

.welcome h2 {
    font-size: 34px;
    letter-spacing: -1.2px;
    font-weight: 750;
}

.welcome p {
    margin-top: 12px;
    margin-bottom: 36px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

/* LOGIN FORM */

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 650;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    background: var(--white);
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper input::placeholder {
    color: #b0b2c0;
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(88, 86, 214, 0.10);
}

.password-input {
    padding-right: 70px !important;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
}

.login-button {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(88, 86, 214, 0.20);
    transition: background 0.2s, transform 0.2s;
}

.login-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.login-button:focus-visible,
.toggle-password:focus-visible {
    outline: 3px solid #aaa8ff;
    outline-offset: 3px;
}

.button-arrow {
    font-size: 19px;
    font-weight: 400;
}

/* SECURITY AND ERRORS */

.security-note {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.security-icon {
    color: #438f74;
}

.error-message {
    margin-bottom: 22px;
    padding: 13px 15px;
    border: 1px solid #f3caca;
    border-radius: 10px;
    background: #fff1f1;
    color: #b42318;
    font-size: 13px;
    line-height: 1.5;
}

.error-message[hidden] {
    display: none;
}

.page-bottom {
    margin-top: 50px;
    color: #a0a2b1;
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
}

/* RESPONSIVE DESIGN */

@media (max-width: 1000px) {
    .page {
        grid-template-columns: 0.9fr 1.1fr;
    }

    .brand-panel {
        padding: 35px 8%;
    }

    .login-panel {
        padding: 40px 8%;
    }

    .hero h1 {
        font-size: 43px;
    }

    .artwork {
        right: -120px;
    }
}

@media (max-width: 650px) {
    .page {
        display: block;
        padding: 22px;
    }

    .brand-panel {
        display: none;
    }

    .login-panel {
        min-height: calc(100vh - 44px);
        padding: 25px 0;
    }

    .login-content {
        max-width: 420px;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 50px;
    }

    .mobile-brand .brand-logo {
        background: var(--primary);
        color: white;
    }

    .mobile-brand .brand-name {
        color: var(--text);
        font-size: 18px;
    }

    .mobile-brand .brand-description {
        color: var(--muted);
        font-size: 10px;
        letter-spacing: 1px;
    }

    .welcome h2 {
        font-size: 30px;
    }

    .welcome p {
        margin-bottom: 30px;
    }

    .page-bottom {
        margin-top: 40px;
    }
}

@media (max-width: 360px) {
    .page {
        padding: 16px;
    }

    .mobile-brand {
        margin-bottom: 36px;
    }

    .brand-name {
        letter-spacing: 1px;
    }

    .welcome h2 {
        font-size: 27px;
    }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

.signup-prompt {
    margin-top: 20px;
    text-align: center;
    color: #667085;
    font-size: 14px;
}

.signup-prompt a {
    display: inline-block;
    margin-left: 4px;
    color: #5856d6;
    font-weight: 700;
    text-decoration: none;
}

.signup-prompt a:hover {
    text-decoration: underline;
}
