/* ==========================================================================
   CLOUDALLS ACADEMY - AUTHENTICATION PORTALS CSS
   ========================================================================== */

/* --- Global Auth Animations --- */
@keyframes fadeScaleUp {
    0% { opacity: 0; transform: scale(0.95) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes formFadeIn { 
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); } 
}


/* ==========================================================================
   1. STUDENT PORTAL
   ========================================================================== */
.auth-wrapper {
    min-height: 80vh;
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeScaleUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-card {
    max-width: 480px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.02);
    border-radius: 2rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 40px 70px -15px rgba(37, 99, 235, 0.15), 0 0 0 1px rgba(37, 99, 235, 0.05);
}

.auth-icon-container {
    width: 70px;
    height: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.2rem;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #2563EB, #0ea5e9);
    color: white;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
    transform: rotate(-5deg);
    transition: transform 0.3s ease;
}

.auth-card:hover .auth-icon-container {
    transform: rotate(0deg) scale(1.05);
}

/* Toggle Switch */
.auth-toggle-box {
    background: #f8fafc;
    padding: 0.4rem;
    border-radius: 50rem;
    display: flex;
    margin-bottom: 2.5rem;
    position: relative;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.auth-toggle-btn {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #64748b;
    cursor: pointer;
    z-index: 2;
    transition: color 0.3s ease;
}

.auth-toggle-btn.active { color: #0f172a; }

.auth-toggle-slider {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    width: calc(50% - 0.4rem);
    height: calc(100% - 0.8rem);
    background: #ffffff;
    border-radius: 50rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.04);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.slide-right { transform: translateX(100%); }

/* Student Forms */
.auth-form-container { position: relative; min-height: 320px; }
.auth-form { display: none; opacity: 0; transform: translateY(15px); }
.auth-form.active { display: block; animation: formFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

.auth-wrapper .custom-input-group {
    border-radius: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    overflow: hidden;
}

.auth-wrapper .custom-input-group:focus-within {
    background: #ffffff;
    border-color: #2563EB;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.auth-wrapper .custom-input-group .input-group-text { background: transparent; border: none; color: #94a3b8; }
.auth-wrapper .custom-input-group .form-control { background: transparent; border: none; padding: 0.85rem 1rem; font-weight: 500; }
.auth-wrapper .custom-input-group .form-control:focus { box-shadow: none; }

.btn-premium {
    background: linear-gradient(135deg, #2563EB, #1d4ed8);
    border: none;
    border-radius: 1rem;
    padding: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
    transition: all 0.3s ease;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.35);
}


/* ==========================================================================
   2. OFFICIAL / STAFF PORTAL
   ========================================================================== */
.official-wrapper {
    min-height: 80vh;
    padding: 60px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeScaleUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.official-card {
    max-width: 450px;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.1);
    border-radius: 1.5rem;
    position: relative;
}

.official-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 6px;
    background: linear-gradient(90deg, #64748b, #94a3b8);
    border-radius: 1.5rem 1.5rem 0 0;
}

.official-wrapper .custom-input-group {
    border-radius: 0.75rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    transition: all 0.2s ease;
}

.official-wrapper .custom-input-group:focus-within {
    background: #ffffff;
    border-color: #64748b;
    box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.1);
}

.official-wrapper .custom-input-group .input-group-text, 
.official-wrapper .custom-input-group .form-control {
    background: transparent; border: none; padding: 0.85rem 1rem;
}
.official-wrapper .custom-input-group .form-control:focus { box-shadow: none; }


/* ==========================================================================
   3. SYSTEM MASTER (ADMIN) PORTAL
   ========================================================================== */
.admin-wrapper {
    min-height: 80vh;
    padding: 60px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
    margin: -60px 0; /* Negate padding from the main wrapper to stretch edge to edge */
}

.admin-card {
    max-width: 420px;
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(220, 38, 38, 0.2);
    box-shadow: 0 0 40px rgba(220, 38, 38, 0.05), inset 0 0 20px rgba(220, 38, 38, 0.05);
    border-radius: 1rem;
    animation: fadeScaleUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.admin-input-group {
    border-radius: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.admin-input-group:focus-within {
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.admin-input-group .input-group-text, 
.admin-input-group .form-control {
    background: transparent; border: none; padding: 0.8rem 1rem; color: #f8fafc;
}

.admin-input-group .form-control::placeholder { color: rgba(255,255,255,0.3); }
.admin-input-group .form-control:focus { box-shadow: none; }

.btn-admin {
    background: #dc2626;
    border: 1px solid #f87171;
    color: white;
    border-radius: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-admin:hover {
    background: #b91c1c;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
    color: white;
}