:root {
    --auth-primary: #4f46e5;
    --auth-secondary: #7c3aed;
    --auth-accent: #10b981;
    --auth-text: #1e293b;
    --auth-text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 10px 32px 0 rgba(31, 38, 135, 0.15);
}

/* Animated Background */
.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #065aad;
    padding: 2rem 1rem;
    z-index: 1000;
}

.auth-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.shape {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.4;
    animation: pulse 10s infinite alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--auth-primary);
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--auth-secondary);
    bottom: -50px;
    left: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: var(--auth-accent);
    top: 40%;
    left: 10%;
    animation-delay: -2s;
}

@keyframes pulse {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.2) translate(30px, -20px);
    }
}

/* Glassmorphism Card */
.glass-auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    width: 100%;
    max-width: 500px;
    padding: 3rem;
    position: relative;
    z-index: 1;
    animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.glass-auth-card.wide {
    max-width: 800px;
}

@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Styling */
.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--auth-text);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--auth-text-muted);
}

.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label {
    color: var(--auth-primary);
    opacity: 0.8;
}

.auth-input-group {
    margin-bottom: 1.5rem;
    position: relative;
    animation: fadeInStagger 0.5s ease forwards;
    opacity: 0;
}

.auth-input-group:nth-child(1) {
    animation-delay: 0.2s;
}

.auth-input-group:nth-child(2) {
    animation-delay: 0.3s;
}

.auth-input-group:nth-child(3) {
    animation-delay: 0.4s;
}

.auth-input-group:nth-child(4) {
    animation-delay: 0.5s;
}

.auth-input-group:nth-child(5) {
    animation-delay: 0.6s;
}

@keyframes fadeInStagger {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form-control {
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    width: 100%;
    font-weight: 500;
}

.auth-form-control:focus {
    background: white;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: none;
}

.auth-btn {
    background: linear-gradient(135deg, var(--auth-primary), var(--auth-secondary));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-weight: 700;
    width: 100%;
    margin-top: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    filter: brightness(1.1);
}

.auth-link {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.auth-link:hover {
    color: var(--auth-secondary);
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--auth-text-muted);
    font-size: 0.9375rem;
}

/* Password Toggle Wrapper */
.password-toggle-wrapper {
    position: relative;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--auth-text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 10;
}

/* RTL Support */
[dir="rtl"] .password-toggle-btn {
    right: auto;
    left: 12px;
}

/* Logo in header */
.auth-logo {
    display: block;
    max-height: 80px;
    width: auto;
    margin: 0 auto 1.5rem;
}