/* Custom Login Styles for Student & Staff Portal */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #0c0a21;
    --bg-card: rgba(23, 20, 60, 0.85);
    --primary-yellow: #ffcc00;
    --primary-yellow-hover: #ffd54f;
    --text-light: #f5f5f7;
    --text-muted: #a5a5cc;
    --border-color: rgba(99, 102, 241, 0.2);
    --border-focus: #ffcc00;
    --accent-indigo: #6366f1;
}

body {
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle at center, #1b164a 0%, var(--bg-dark) 100%);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    margin: 0;
}

/* Screen Loader */
.loader-display {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 204, 0, 0.1);
    border-top: 3px solid var(--primary-yellow);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin: 20px auto 0 auto;
}

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

/* 3D Rotating Logo */
.logo-container-3d {
    perspective: 1000px;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.logo-3d {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--primary-yellow);
    box-shadow: 0 0 25px rgba(255, 204, 0, 0.35);
    animation: spinY 7s infinite linear;
    transform-style: preserve-3d;
    backface-visibility: visible;
}

@keyframes spinY {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

/* Login Wrapper & Card */
.login-wrapper {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 40px rgba(99, 102, 241, 0.08);
    padding: 3rem 2.5rem;
    max-width: 440px;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.login-card:hover {
    border-color: rgba(255, 204, 0, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 50px rgba(255, 204, 0, 0.12);
    transform: translateY(-4px);
}

/* Typography */
h4.title-glow {
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    margin-bottom: 2rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* Custom Form Groups & Inputs */
.form-group-custom {
    position: relative;
    margin-bottom: 1.8rem;
}

.form-group-custom label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    display: block;
    transition: color 0.3s ease;
}

.form-control-custom {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: #fff;
    padding: 0.9rem 1.1rem;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-control-custom:focus {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.12);
    color: #fff;
    outline: none;
}

.form-control-custom::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

/* Specific Select Styling */
select.form-control-custom {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffcc00' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1.1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

select.form-control-custom option {
    background-color: #121026;
    color: #fff;
}

/* Buttons */
.btn-submit-yellow {
    background: var(--primary-yellow);
    color: #000;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    padding: 0.95rem 1.5rem;
    width: 100%;
    margin-top: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-submit-yellow:hover {
    background: var(--primary-yellow-hover);
    box-shadow: 0 0 25px rgba(255, 204, 0, 0.45);
    transform: translateY(-2px);
}

.btn-submit-yellow:active {
    transform: translateY(0);
}

/* Hide standard alert to replace with Swal */
#admin-alert {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .login-card {
        padding: 2.2rem 1.8rem;
        border-radius: 20px;
    }
    
    h4.title-glow {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
}
