:root {
    --background: #0b1222;
    --accent: #5868ff;
    --accent-secondary: #7a5cff;
    --card-bg: rgba(20, 28, 48, 0.92);
    --border-soft: rgba(255, 255, 255, 0.07);
    --text-primary: #e6ecff;
    --text-secondary: rgba(230, 236, 255, 0.7);
    --warning: #ff6363;
}

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

.login-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: radial-gradient(circle at 12% -20%, rgba(92, 108, 255, 0.35), transparent 45%),
                radial-gradient(circle at 92% 0%, rgba(122, 92, 255, 0.22), transparent 50%),
                var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.login-layout {
    width: 100%;
    max-width: 880px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: 2rem;
    align-items: stretch;
}

.login-brand {
    background: linear-gradient(145deg, rgba(88, 104, 255, 0.18), rgba(12, 20, 40, 0.85));
    border-radius: 28px;
    padding: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 40px 70px -55px rgba(15, 23, 42, 1);
    display: grid;
    gap: 2rem;
    align-content: center;
}

.brand-mark {
    width: 76px;
    height: 76px;
    border-radius: 22px;
    display: block;
    object-fit: contain;
    padding: 0.4rem;
    background: rgba(92, 108, 255, 0.18);
    box-shadow: 0 25px 40px -30px rgba(92, 108, 255, 0.85);
}

.brand-copy h1 {
    font-size: 2.25rem;
    font-weight: 700;
}

.brand-copy p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 380px;
    line-height: 1.7;
}

.login-card {
    background: var(--card-bg);
    border-radius: 28px;
    border: 1px solid var(--border-soft);
    padding: 2.75rem;
    box-shadow: 0 35px 70px -60px rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    backdrop-filter: blur(16px);
}

.login-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.form-field label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.form-field input {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 0.9rem 1.1rem;
    font-size: 1rem;
    color: var(--text-primary);
    background: rgba(9, 15, 28, 0.65);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.form-field input::placeholder {
    color: rgba(230, 236, 255, 0.4);
}

.form-field input:focus {
    outline: none;
    border-color: rgba(92, 108, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(92, 108, 255, 0.16);
}

.login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.25s ease, opacity 0.3s ease;
    box-shadow: 0 25px 40px -30px rgba(92, 108, 255, 0.85);
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 50px -30px rgba(92, 108, 255, 0.95);
}

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

.login-button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

.spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    animation: spin 0.6s linear infinite;
}

.form-feedback {
    background: rgba(255, 99, 99, 0.12);
    border: 1px solid rgba(255, 99, 99, 0.32);
    color: #ffb9b9;
    border-radius: 14px;
    padding: 0.9rem 1.1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

    .login-brand {
        text-align: center;
        align-content: center;
    }

    .brand-copy p {
        margin: 0 auto;
    }
}

@media (max-width: 540px) {
    .login-body {
        padding: 2.5rem 1rem;
    }

    .login-card,
    .login-brand {
        padding: 2rem;
        border-radius: 22px;
    }

    .brand-copy h1 {
        font-size: 1.9rem;
    }

    .login-header h2 {
        font-size: 1.6rem;
    }
}
