* {
    box-sizing: border-box;
}

:root {
    --primary: #5b5ce2;
    --primary-dark: #494ac7;

    --text: #171923;
    --muted: #73798c;

    --border: #e4e6ed;

    --surface: #ffffff;
    --background: #f7f8fc;
}


/* =====================================================
   BASE
   ===================================================== */

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

body {
    min-height: 100vh;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    color: var(--text);

    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(91, 92, 226, 0.08),
            transparent 28%
        ),
        radial-gradient(
            circle at 85% 85%,
            rgba(91, 92, 226, 0.06),
            transparent 30%
        ),
        var(--background);
}

button,
input {
    font: inherit;
}

button {
    border: 0;
}

a {
    color: inherit;
}


/* =====================================================
   LOGIN PAGE
   ===================================================== */

.login-page {
    min-height: 100vh;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 32px 20px;
}


/* =====================================================
   LOGIN CARD
   ===================================================== */

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

    padding: 42px 42px 34px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 24px;

    box-shadow:
        0 18px 55px
        rgba(20, 24, 45, 0.08);
}


/* =====================================================
   BRAND
   ===================================================== */

.brand {
    display: inline-flex;

    align-items: center;

    gap: 9px;

    text-decoration: none;

    margin-bottom: 34px;
}

.brand-logo {
    display: block;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    object-fit: contain;
}

.brand-name {
    font-size: 23px;

    font-weight: 800;

    letter-spacing: -0.5px;
}


/* =====================================================
   LOGIN HEADER
   ===================================================== */

.login-header {
    margin-bottom: 26px;
}

.login-header h1 {
    margin: 0 0 8px;

    font-size: 30px;

    line-height: 1.15;

    letter-spacing: -0.7px;
}

.login-header p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;

    line-height: 1.5;
}


/* =====================================================
   GOOGLE LOGIN
   ===================================================== */

.google-button {
    width: 100%;

    min-height: 48px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 12px 18px;

    background: #ffffff;

    color: #3c4043;

    border:
        1px solid
        #dadce0;

    border-radius: 6px;

    font-size: 14px;

    font-weight: 500;

    cursor: pointer;

    text-decoration: none;

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

.google-button:hover {
    background: #fafbff;

    border-color: #d3d6e1;

    box-shadow:
        0 4px 14px
        rgba(20, 24, 45, 0.06);
}

.google-icon {
    width: 18px;
    height: 18px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    flex: 0 0 18px;
}


/* =====================================================
   DIVIDER
   ===================================================== */

.divider {
    width: 100%;

    display: flex;

    align-items: center;

    gap: 14px;

    margin: 25px 0;

    color: var(--muted);

    font-size: 13px;
}

.divider::before,
.divider::after {
    content: "";

    height: 1px;

    flex: 1;

    background: var(--border);
}

.divider span {
    flex-shrink: 0;
}


/* =====================================================
   LOGIN FORM
   ===================================================== */

.login-form {
    display: flex;

    flex-direction: column;

    gap: 19px;
}

.form-group {
    display: flex;

    flex-direction: column;

    gap: 8px;
}

.form-group label {
    font-size: 13px;

    font-weight: 700;
}


/* =====================================================
   PASSWORD LABEL
   ===================================================== */

.password-label {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;
}

.forgot-link {
    color: var(--primary);

    font-size: 12px;

    font-weight: 600;

    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}


/* =====================================================
   INPUTS
   ===================================================== */

.form-group input {
    width: 100%;

    height: 48px;

    padding: 0 14px;

    border:
        1px solid
        var(--border);

    border-radius: 11px;

    outline: none;

    background: #ffffff;

    color: var(--text);

    font-size: 14px;

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

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

.form-group input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(91, 92, 226, 0.10);
}


/* =====================================================
   PASSWORD
   ===================================================== */

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;

    top: 50%;
    right: 10px;

    width: 32px;
    height: 32px;

    transform:
        translateY(-50%);

    display: flex;

    align-items: center;
    justify-content: center;

    background: transparent;

    color: #8a90a2;

    border-radius: 8px;

    cursor: pointer;
}

.password-toggle:hover {
    background: #f3f4f8;

    color: var(--text);
}


/* =====================================================
   SIGN IN BUTTON
   ===================================================== */

.login-button {
    width: 100%;

    min-height: 48px;

    margin-top: 4px;

    border-radius: 12px;

    background: var(--primary);

    color: #ffffff;

    font-size: 14px;

    font-weight: 800;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
}

.login-button:hover {
    background: var(--primary-dark);

    box-shadow:
        0 8px 20px
        rgba(91, 92, 226, 0.22);
}

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


/* =====================================================
   SIGN UP
   ===================================================== */

.signup-text {
    margin: 24px 0 0;

    text-align: center;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.5;
}

.signup-text a {
    color: var(--primary);

    font-weight: 700;

    text-decoration: none;
}

.signup-text a:hover {
    text-decoration: underline;
}


/* =====================================================
   BACK TO HOME
   ===================================================== */

.back-home {
    display: block;

    margin-top: 24px;

    text-align: center;

    color: var(--muted);

    font-size: 12px;

    text-decoration: none;
}

.back-home:hover {
    color: var(--text);
}


/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 520px) {

    .login-page {
        padding: 20px 16px;
    }

    .login-card {
        max-width: 100%;

        padding: 32px 24px 28px;

        border-radius: 20px;
    }

    .brand {
        margin-bottom: 28px;
    }

    .login-header h1 {
        font-size: 27px;
    }

    .login-header p {
        font-size: 13px;
    }
}


/* =====================================================
   SMALL PHONES
   ===================================================== */

@media (max-width: 360px) {

    .login-card {
        padding:
            28px 20px 24px;
    }

    .login-header h1 {
        font-size: 25px;
    }
}

.login-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.auth-message {
    min-height: 20px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.auth-message.is-error {
    color: #b42318;
}

.auth-message.is-success {
    color: #18794e;
}