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

/*
    primary: #7c3aed
    primary-dark: #6d28d9
    text-dark: #1e293b
    text-muted: #64748b
    bg-page: #f8fafc
    bg-input: #f1f5f9
    bg-white: #ffffff
    border: #e2e8f0
    error: #dc2626
    error-bg: #fef2f2
*/

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    line-height: 1.5;
}

.login-wrapper {
    width: 100%;
    max-width: 460px;
}

.login-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.05);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.375rem;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.9375rem;
    color: #64748b;
    font-weight: 400;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    border: 1.5px solid transparent;
    border-radius: 8px;
    font-size: 0.9375rem;
    color: #1e293b;
    font-family: inherit;
    transition: all 0.2s ease;
    outline: none;
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-input:hover {
    background: #e2e8f0;
}

.form-input:focus {
    background: #ffffff;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
}

.errorlist {
    list-style: none;
    padding: 0;
    margin: 0.375rem 0 0 0;
}

.errorlist li {
    font-size: 0.8125rem;
    color: #dc2626;
    background: #fef2f2;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border-left: 2px solid #dc2626;
}

.btn-login {
    width: 100%;
    padding: 0.875rem;
    background: #7c3aed;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
    letter-spacing: -0.01em;
}

.btn-login:hover {
    background: #6d28d9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

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

.form-footer {
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-back {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
    justify-content: center;
}

.link-back:hover {
    color: #7c3aed;
}

.link-register {
    text-align: center;
    font-size: 0.875rem;
}

.text-muted {
    color: #64748b;
}

.link-primary {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.25rem;
    transition: all 0.2s ease;
}

.link-primary:hover {
    color: #6d28d9;
    text-decoration: underline;
}

.btn-login.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    right: 1rem;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

@media (max-width: 480px) {
    body {
        padding: 1rem;
    }
    
    .login-container {
        padding: 2rem 1.5rem;
    }
    
    .login-title {
        font-size: 1.375rem;
    }
    
    .login-subtitle {
        font-size: 0.875rem;
    }
    
    .form-input {
        font-size: 0.875rem;
        padding: 0.6875rem 0.875rem;
    }
}

.form-input:focus-visible,
.btn-login:focus-visible,
.link-back:focus-visible,
.link-primary:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}