/* ==================== AUTHENTICATION MODAL STYLES ==================== */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal.active {
    opacity: 1;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.auth-modal-content {
    position: relative;
    background: white;
    border-radius: 24px;
    padding: 40px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.4s ease;
    z-index: 1001;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.auth-close-btn:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
    color: #333;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    color: #4a1a7d;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: #666;
    font-size: 0.95rem;
}

/* ==================== FORM INPUTS ==================== */
.auth-input-group {
    margin-bottom: 20px;
    position: relative;
}

.auth-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.auth-input-group input,
.auth-input-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.auth-input-group input:focus,
.auth-input-group select:focus {
    outline: none;
    border-color: #00d4ff;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.1);
}

.auth-input-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23666' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 42px;
    cursor: pointer;
    font-size: 1.2rem;
    user-select: none;
    transition: transform 0.2s ease;
}

.password-toggle:hover {
    transform: scale(1.2);
}

/* ==================== REMEMBER ME & TERMS ==================== */
.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.auth-remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #00d4ff;
}

.auth-remember label {
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
    user-select: none;
}

/* ==================== BUTTONS ==================== */
.auth-btn {
    width: 100%;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.auth-btn:hover::before {
    width: 400px;
    height: 400px;
}

.auth-btn-primary {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
}

.auth-btn-primary:active {
    transform: translateY(0);
}

.auth-btn-secondary {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    color: #666;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 12px;
}

.auth-btn-secondary:hover {
    background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    color: #333;
    transform: translateY(-2px);
}

/* ==================== DIVIDER ==================== */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
}

.auth-divider span {
    position: relative;
    background: white;
    padding: 0 16px;
    color: #999;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ==================== ERROR MESSAGE ==================== */
.auth-error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 0.9rem;
    font-weight: 600;
    border-left: 4px solid #f44336;
    animation: errorShake 0.5s ease;
}

.auth-error.hidden {
    display: none;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ==================== WELCOME MESSAGE ==================== */
.welcome-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 2000;
    background: linear-gradient(135deg, #667eea 0%, #4338ca 100%);
    padding: 40px 60px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.welcome-message.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.welcome-content {
    animation: welcomeBounce 1s ease;
}

@keyframes welcomeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ==================== USER INFO DISPLAY ==================== */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.user-type {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.logout-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ==================== PARENT DASHBOARD ==================== */
#parentDashboard {
    animation: fadeInUp 0.6s ease;
}

/* ==================== SCROLLBAR FOR MODAL ==================== */
.auth-modal-content::-webkit-scrollbar {
    width: 8px;
}

.auth-modal-content::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
}

.auth-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border-radius: 10px;
}

.auth-modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0099cc, #00d4ff);
}

/* ==================== RESPONSIVE STYLES ==================== */
@media (max-width: 600px) {
    .auth-modal-content {
        padding: 30px 24px;
        border-radius: 20px;
    }

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

    .auth-subtitle {
        font-size: 0.9rem;
    }

    .auth-input-group input,
    .auth-input-group select {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .password-toggle {
        top: 40px;
    }

    .auth-btn {
        padding: 14px 20px;
        font-size: 1rem;
    }

    .welcome-message {
        padding: 30px 40px;
        width: 90%;
    }

    .user-info {
        padding: 10px 12px;
    }

    .user-avatar {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .user-name {
        font-size: 1rem;
    }

    .logout-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .auth-modal-content {
        padding: 24px 20px;
        width: 95%;
    }

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

    .auth-close-btn {
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .auth-input-group {
        margin-bottom: 16px;
    }

    .auth-input-group label {
        font-size: 0.85rem;
    }

    .welcome-message {
        padding: 24px 30px;
    }

    .welcome-message .text-6xl {
        font-size: 3rem;
    }

    .welcome-message .text-2xl {
        font-size: 1.5rem;
    }
}

/* ==================== LOADING STATE ==================== */
.auth-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* ==================== FOCUS VISIBLE FOR ACCESSIBILITY ==================== */
.auth-btn:focus-visible,
.auth-input-group input:focus-visible,
.auth-input-group select:focus-visible {
    outline: 3px solid #00d4ff;
    outline-offset: 3px;
}

/* ==================== FORM VALIDATION STYLES ==================== */
.auth-input-group input:invalid:not(:placeholder-shown) {
    border-color: #f44336;
}

.auth-input-group input:valid:not(:placeholder-shown) {
    border-color: #4caf50;
}

/* ==================== SMOOTH TRANSITIONS ==================== */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
