:root {
    --bg-color: #F9F6FE;
    --white: #ffffff;
    --darker-white: hsl(0, 0%, 97%);
    --more-darker-white: hsl(0, 0%, 96%);
    --primary-color: #9042F1;
    --primary-darker: #190432;
    --primary-hover: #7b2fe0;
    --error-color: #c1271f;
    --border-color: rgba(0, 0, 0, 0.15);
}

html {
    font-size: 62.5%;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Instrument Sans", Arial, Helvetica, sans-serif;
}

body {
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Page animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-container {
    background-color: var(--white);
    width: 100%;
    max-width: 44rem;
    padding: 4rem 3.5rem;
    border-radius: 1.6rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1rem 3rem rgba(25, 4, 50, 0.04);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.auth-header img {
    width: 4.8rem;
    height: auto;
    margin-bottom: 1.5rem;
}

.auth-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary-darker);
    letter-spacing: -0.05rem;
    margin-bottom: 0.8rem;
}

.auth-header p {
    font-size: 1.4rem;
    color: rgba(25, 4, 50, 0.6);
    font-weight: 500;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 2.2rem;
}

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

.form-group label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-darker);
    letter-spacing: 0.05rem;
    text-transform: uppercase;
    opacity: 0.8;
}

.form-group input {
    width: 100%;
    padding: 1.2rem 1.6rem;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--primary-darker);
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0.8rem;
    outline: none;
    transition: all 0.2s ease-in-out;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(144, 66, 241, 0.12);
}

.form-group input::placeholder {
    color: rgba(25, 4, 50, 0.3);
}

.error-banner {
    background-color: rgba(193, 39, 31, 0.06);
    border: 1px solid rgba(193, 39, 31, 0.2);
    color: var(--error-color);
    padding: 1.2rem 1.6rem;
    border-radius: 0.8rem;
    font-size: 1.3rem;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 1rem;
    animation: fadeInUp 0.3s ease;
}

.auth-btn {
    width: 100%;
    padding: 1.4rem;
    background-color: var(--primary-darker);
    color: var(--white);
    border: none;
    border-radius: 0.8rem;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.auth-btn:hover {
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(144, 66, 241, 0.25);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-footer {
    text-align: center;
    margin-top: 3rem;
    font-size: 1.3rem;
    color: rgba(25, 4, 50, 0.6);
    font-weight: 500;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: var(--primary-darker);
    text-decoration: underline;
}

/* Spinner helper */
.btn-spinner {
    width: 1.8rem;
    height: 1.8rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
    display: none;
}

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