:root {
    --primary: #00B34F;
    --primary-dark: #008c3f;
    --primary-light: #d0f0dd;
    --secondary: #00512E;
    --dark: #1e1e2d;
    --light: #f8f9fa;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --danger: #f72585;
    --success: #4cc9a0;
    --warning: #f8961e;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --box-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    line-height: 1.6;
    position: relative;
}

/* Auth Container */
.auth-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    z-index: 20;
    /* Increased z-index */
}

/* Auth Card */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    padding: 2.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 20;
    /* Increased z-index */
}

/* Logo */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Auth Header */
.auth-header {
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--gray);
    font-size: 0.95rem;
}

/* Form Styles */
.auth-form {
    text-align: left;
    position: relative;
    z-index: 20;
    /* Ensure form is above background */
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 20;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label i {
    color: var(--primary);
    width: 16px;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
    outline: none;
    cursor: text;
    position: relative;
    z-index: 20;
    /* Ensure input is above background */
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 179, 79, 0.1);
    transform: translateY(-1px);
}

/* Password Input Container */
.password-input-container {
    position: relative;
    z-index: 20;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 0.25rem;
    transition: var(--transition);
    outline: none;
    z-index: 25;
    /* Higher z-index for button */
}

.password-toggle:hover {
    color: var(--primary);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: relative;
    z-index: 20;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    outline: none;
    cursor: pointer;
}

.remember-me label {
    font-size: 0.9rem;
    color: var(--gray);
    cursor: pointer;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Buttons */
.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    outline: none;
    position: relative;
    z-index: 20;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 179, 79, 0.3);
}

.btn-auth {
    padding: 1rem 1.5rem;
    font-size: 1.05rem;
}

/* Auth Links */
.auth-links {
    margin-top: 1.5rem;
    text-align: center;
    position: relative;
    z-index: 20;
}

.auth-links p {
    color: var(--gray);
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

/* Alert Styles */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1.5rem;
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: left;
    position: relative;
    z-index: 20;
}

.alert-success {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

.alert-danger {
    background: rgba(247, 37, 133, 0.1);
    color: var(--danger);
    border-left-color: var(--danger);
}

.alert i {
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

/* Error Messages */
.error-message {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message i {
    font-size: 0.8rem;
}

/* Background Animation - FIXED */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    /* Lower z-index - behind everything */
    pointer-events: none;
    /* IMPORTANT: This prevents clicks on background */
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
    /* Prevent clicks on shapes */
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 100px;
    height: 100px;
    bottom: 10%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-container {
        max-width: 100%;
        padding: 0 1rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }

    .auth-logo {
        flex-direction: column;
        gap: 0.5rem;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .auth-title {
        font-size: 1.25rem;
    }
}

/* Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}