/* Authentication Pages */
.auth-body {
    background-color: var(--bg-body);
    background-image: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 20%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.75rem 2.25rem;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    animation: slideUp 0.5s ease-out;
    max-height: 95vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.25rem;
}

.auth-brand .brand-icon {
    color: var(--primary);
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.auth-header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.auth-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1.1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: var(--transition);
}

.input-wrapper input {
    width: 100%;
    /* leave space on both sides for icons */
    padding: 0.7rem 2.75rem 0.7rem 2.75rem;
    background: var(--bg-input);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: 0.9rem;
    transition: var(--transition);
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-wrapper input:focus+.input-icon {
    color: var(--primary);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.1rem;
    font-size: 0.85rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    user-select: none;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    background: var(--bg-input);
    border-radius: 4px;
    position: relative;
    transition: var(--transition);
}

.checkbox-container input:checked+.checkmark {
    background: var(--primary);
}

.checkbox-container input:checked+.checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
    font-size: 0.95rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.25rem;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--primary-hover);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.1rem;
    font-size: 0.875rem;
    animation: slideDown 0.3s ease-out;
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.1rem;
    font-size: 0.875rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* toggle eye icon on the right of password fields */
.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
    outline: none;
}

.toggle-password:hover {
    color: var(--primary);
}

/* when input is focused, also highlight the toggle icon */
.input-wrapper input:focus ~ .toggle-password {
    color: var(--primary);
}