/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f4f7fa;
    color: #333;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-25px); }
    60% { transform: translateY(-12px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes gradientShift {
    0% { background: linear-gradient(135deg, #2c7a7b 0%, #1e3a8a 100%); }
    50% { background: linear-gradient(135deg, #1e3a8a 0%, #2c7a7b 100%); }
    100% { background: linear-gradient(135deg, #2c7a7b 0%, #1e3a8a 100%); }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.animate-slide-in {
    animation: slideIn 0.6s ease-out forwards;
}

.animate-bounce {
    animation: bounce 1.2s ease-in-out;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* Modern Login Page Styles */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #2c7a7b 0%, #1e3a8a 100%);
    position: relative;
    overflow: hidden;
    animation: gradientShift 15s ease infinite;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"%3E%3Cpath fill="rgba(255,255,255,0.05)" fill-opacity="1" d="M0,224L48,213.3C96,203,192,181,288,186.7C384,192,480,224,576,224C672,224,768,192,864,181.3C960,171,1056,181,1152,197.3C1248,213,1344,235,1392,245.3L1440,256L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"%3E%3C/path%3E%3C/svg%3E') no-repeat bottom;
    z-index: 1;
}

.auth-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 450px;
    padding: 1.5rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    opacity: 0;
}

.auth-card .logo {
    display: block;
    margin: 0 auto 1.5rem;
    max-width: 90px;
    height: auto;
    transition: transform 0.3s ease;
}

.auth-card .logo:hover {
    transform: scale(1.1);
}

.auth-card h2 {
    text-align: center;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.auth-card .subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.auth-card .error {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.auth-card .success {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.1);
    border: 1px solid rgba(22, 163, 74, 0.3);
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.1);
}

.auth-card .message {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.auth-form {
    width: 100%;
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 1.5rem;
    opacity: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    color: #2d3748;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.9rem 1.2rem;
    color: #2d3748;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.form-group textarea {
    resize: vertical;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #1e3a8a;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.1);
}

.form-group input::placeholder,
.form-group select,
.form-group textarea::placeholder {
    color: #a0a0a0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e3a8a;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.15);
}

.form-group select {
    appearance: none;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%232d3748" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpolyline points="6 9 12 15 18 9"%3E%3C/polyline%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 1.2rem center;
    background-size: 14px;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper .toggle-password {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.password-wrapper .toggle-password:hover {
    color: #1e3a8a;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    opacity: 0;
}

.form-options.animate-slide-in {
    animation: slideIn 0.6s ease-out forwards;
}

.forgot-password {
    color: #1e3a8a;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #2c7a7b;
    text-decoration: underline;
}

.auth-btn {
    width: 100%;
    background: linear-gradient(90deg, #1e3a8a 0%, #2c7a7b 100%);
    color: #ffffff;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.6s ease-out forwards;
    text-decoration: none;
    display: block;
    text-align: center;
}

.auth-btn:hover {
    background: linear-gradient(90deg, #2c7a7b 0%, #1e3a8a 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.auth-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.auth-btn.loading {
    filter: blur(2px);
    cursor: not-allowed;
}

.auth-btn .loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.auth-btn.loading .loader {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        max-width: 90%;
        padding: 1rem;
    }

    .auth-card {
        padding: 2rem;
    }

    .auth-card .logo {
        max-width: 70px;
    }

    .auth-card h2 {
        font-size: 1.75rem;
    }

    .auth-card .subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
    }

    .auth-card h2 {
        font-size: 1.5rem;
    }

    .auth-card .subtitle {
        font-size: 1rem;
    }

    .auth-btn {
        font-size: 1rem;
        padding: 0.85rem;
    }
}