
:root {
    --primary: #6658d3;
    --primary-dark: #5546c0;
    --primary-light: #f0edff;

    --background: #f6f7fb;
    --surface: #ffffff;

    --text: #252a3a;
    --muted: #858b9d;
    --border: #e9ebf2;

    --danger: #dc5868;
    --danger-bg: #fff1f2;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.login-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* Branding section */

.login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 65px 9%;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(
            circle at 15% 85%,
            rgba(169, 156, 255, 0.25),
            transparent 35%
        ),
        linear-gradient(145deg, #171b2b 0%, #292442 55%, #5145a0 100%);
}
.brand-logo {
    display: block;
    width: 190px;
    height: auto;
    max-height: 75px;
    object-fit: contain;
    object-position: left center;
    margin-bottom: 65px;
}

.mobile-brand .brand-logo {
    width: 145px;
    max-height: 55px;
    margin: 0;
}

.login-brand::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
    right: -180px;
    top: 15%;
}

.login-brand::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    right: -120px;
    top: 22%;
}

.brand-content,
.brand-footer {
    position: relative;
    z-index: 1;
}

.brand-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    font-size: 25px;
    font-weight: 800;
    margin-bottom: 65px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.brand-eyebrow {
    color: #b8adff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    margin-bottom: 22px;
}

.brand-content h1 {
    font-size: clamp(34px, 4vw, 53px);
    line-height: 1.15;
    letter-spacing: -1.8px;
    font-weight: 750;
    margin-bottom: 24px;
}

.brand-description {
    max-width: 410px;
    color: #c2c3d2;
    font-size: 15px;
    line-height: 1.9;
}

.brand-footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #a5a6b8;
    font-size: 12px;
}

.brand-footer span:first-child {
    color: #fff;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Login panel */

.login-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px 35px 25px;
    position: relative;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.mobile-brand {
    display: none;
}

.login-heading {
    margin-bottom: 35px;
}

.welcome-label {
    display: inline-block;
    color: var(--primary);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 1.8px;
    margin-bottom: 13px;
}

.login-heading h2 {
    font-size: 30px;
    font-weight: 750;
    letter-spacing: -1px;
    margin-bottom: 10px;
}

.login-heading p {
    color: var(--muted);
    font-size: 14px;
}

/* Error message */

.alert-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    margin-bottom: 25px;
    border: 1px solid #ffdadd;
    border-radius: 9px;
    background: var(--danger-bg);
    color: #bd4353;
    font-size: 13px;
    line-height: 1.5;
}

.alert-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #ffe0e3;
    font-weight: 800;
}

/* Form */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 23px;
}

.form-group label {
    font-size: 13px;
    font-weight: 650;
    color: var(--text);
}

.form-group input {
    width: 100%;
    height: 49px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    background: #fff;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    transition: 0.2s ease;
}

.form-group input::placeholder {
    color: #b2b6c3;
}

.form-group input:hover {
    border-color: #c8c1f2;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 88, 211, 0.1);
}

/* Button */

.login-button {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: none;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
    transition: 0.2s ease;
    margin-top: 10px;
}

.login-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(102, 88, 211, 0.2);
}

.login-button:active {
    transform: translateY(0);
}

.login-button span:last-child {
    font-size: 19px;
}

/* Security note */

.login-security {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 11px;
    margin-top: 28px;
}

.login-security span {
    color: var(--success, #159c69);
    font-size: 9px;
}

/* Footer */

.panel-footer {
    position: absolute;
    bottom: 24px;
    color: #a2a6b3;
    font-size: 11px;
}

/* Responsive */

@media (max-width: 850px) {
    .login-layout {
        grid-template-columns: 1fr;
    }

    .login-brand {
        display: none;
    }

    .login-panel {
        padding: 35px 25px;
    }

    .login-card {
        max-width: 400px;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 55px;
        font-size: 18px;
        font-weight: 750;
    }

    .mobile-brand .brand-icon {
        width: 42px;
        height: 42px;
        margin: 0;
        font-size: 22px;
    }

    .panel-footer {
        position: static;
        margin-top: 55px;
    }
}

@media (max-width: 480px) {
    .login-panel {
        padding: 25px 22px;
    }

    .mobile-brand {
        margin-bottom: 45px;
    }

    .login-heading h2 {
        font-size: 26px;
    }
}
