/* ================================================
   ENHANCED LOGIN PAGE STYLES - Premium Design
   ================================================ */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --light: #f8fafc;
    --dark: #0f172a;
    --text: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --gradient-dark: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e3a5f 100%);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--gradient-dark);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ================================================
   ANIMATED BACKGROUND - Particles & Mesh
   ================================================ */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        var(--gradient-dark);
}

.animated-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.1));
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -100px;
    animation-delay: 0s;
}

.circle-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    left: 10%;
    animation-delay: 2s;
}

.circle-3 {
    width: 150px;
    height: 150px;
    top: 20%;
    right: 10%;
    animation-delay: 4s;
}

.circle-4 {
    width: 250px;
    height: 250px;
    bottom: -100px;
    right: -50px;
    animation-delay: 6s;
}

.circle-5 {
    width: 100px;
    height: 100px;
    top: 40%;
    left: 60%;
    animation-delay: 8s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0.5;
    }
    25% {
        transform: translate(30px, -30px) scale(1.05) rotate(5deg);
    }
    50% {
        transform: translate(50px, 50px) scale(1.1) rotate(-5deg);
        opacity: 0.8;
    }
    75% {
        transform: translate(-20px, 30px) scale(1.05) rotate(3deg);
    }
}

/* Floating particles */
.animated-bg::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 50px 160px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 90px 40px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255,255,255,0.2), transparent);
    background-size: 200px 200px;
    animation: sparkle 4s linear infinite;
}

@keyframes sparkle {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* ================================================
   LOGIN CONTAINER
   ================================================ */
.login-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 4rem;
}

/* ================================================
   LOGO SECTION - Left Side
   ================================================ */
.logo-section {
    flex: 1;
    max-width: 550px;
    color: white;
    position: relative;
}

.logo-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.logo-content > i#defaultIcon {
    font-size: 6rem;
    margin-bottom: 1.5rem;
    display: block;
    background: linear-gradient(135deg, #fff 0%, #c7d2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(99, 102, 241, 0.5));
    animation: iconFloat 3s ease-in-out infinite;
    width: 100%;
    text-align: center;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.logo-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 50%, #a5f3fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    position: relative;
    animation: titleGlow 3s ease-in-out infinite;
    width: 100%;
    text-align: center;
    word-wrap: break-word;
    padding: 0 10px;
}

@keyframes titleGlow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3)); }
    50% { filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.5)); }
}

.logo-content h1::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), transparent);
    border-radius: 2px;
}

.logo-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 1.5rem;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
    font-weight: 400;
    text-align: center;
    max-width: 100%;
    word-wrap: break-word;
}

/* Library Logo */
#libraryLogoDisplay {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

#libraryLogoImg {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(99, 102, 241, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.2);
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Website Button */
#websiteButtonContainer {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
}

.website-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    text-align: center;
}

.website-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2), 0 0 20px rgba(99, 102, 241, 0.3);
}

/* ================================================
   LOGIN CARD - Glassmorphism
   ================================================ */
.login-section {
    flex: 1;
    max-width: 480px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    animation: cardSlideIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ================================================
   USER TYPE TOGGLE
   ================================================ */
.user-type-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--light);
    padding: 6px;
    border-radius: 16px;
}

.toggle-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.toggle-btn:hover {
    background: white;
    color: var(--text);
}

.toggle-btn.active {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.toggle-btn i {
    font-size: 1.1rem;
}

/* ================================================
   LOGIN TABS
   ================================================ */
.login-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--light);
    padding-bottom: 0;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.tab-btn i {
    font-size: 1.4rem;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 3px 3px 0 0;
}

.tab-btn.active::after {
    transform: scaleX(1);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn:hover {
    color: var(--primary);
}

/* ================================================
   FORM STYLES
   ================================================ */
.login-forms {
    position: relative;
}

.login-form {
    display: none;
    animation: formFade 0.4s ease;
}

.login-form.active {
    display: block;
}

@keyframes formFade {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group label i {
    color: var(--primary);
    font-size: 1rem;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

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

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    cursor: pointer;
}

.remember-me input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

/* ================================================
   LOGIN BUTTON
   ================================================ */
.btn-login {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: var(--gradient);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}

.btn-login:active {
    transform: translateY(-1px);
}

/* ================================================
   QR SCANNER
   ================================================ */
.qr-scanner-container {
    text-align: center;
}

.scanner-info {
    margin-bottom: 1.5rem;
}

.scanner-info i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
    animation: qrPulse 2s ease-in-out infinite;
}

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

.scanner-info h3 {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.scanner-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.camera-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 1.5rem;
    border-radius: 16px;
    overflow: hidden;
    background: var(--dark);
    aspect-ratio: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#qrVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary);
    pointer-events: none;
}

.scanner-line {
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    box-shadow: 0 0 15px var(--accent);
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0%, 100% { top: 0; }
    50% { top: calc(100% - 3px); }
}

.scanner-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.btn-camera {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: var(--gradient);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-camera:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.btn-camera.secondary {
    background: linear-gradient(135deg, var(--danger), #dc2626);
}

.btn-camera.upload {
    background: linear-gradient(135deg, var(--success), #059669);
}

.flip-camera-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--primary);
    color: var(--primary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.flip-camera-btn:hover {
    background: var(--primary);
    color: white;
    transform: rotate(180deg);
}

/* ================================================
   QR ATTENDANCE SECTION
   ================================================ */
.qr-attendance-section {
    text-align: center;
    margin-top: 1.5rem;
    padding: 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
    border-radius: 16px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.btn-qr-attendance {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-qr-attendance::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-qr-attendance:hover::before {
    left: 100%;
}

.btn-qr-attendance:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
}

.btn-qr-attendance i {
    font-size: 1.2rem;
    animation: phonePulse 2s ease-in-out infinite;
}

@keyframes phonePulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(-10deg); }
}

.qr-attendance-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 12px;
    font-weight: 500;
}

/* ================================================
   LOGIN FOOTER
   ================================================ */
.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: var(--primary-dark);
}

#registerYourselfBtn {
    color: var(--success) !important;
}

/* ================================================
   WIFI TOGGLE & CARD
   ================================================ */
.wifi-toggle-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    z-index: 100;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: none;
    opacity: 0;
    visibility: hidden;
}

.wifi-toggle-btn.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.wifi-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.5);
}

.wifi-toggle-btn i {
    animation: wifiPulse 2s ease-in-out infinite;
}

@keyframes wifiPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.wifi-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.wifi-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.wifi-qr-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: var(--gradient);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    color: white;
    width: 420px;
    max-width: 90%;
    text-align: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wifi-qr-card.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.wifi-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    position: relative;
}

.wifi-card-header i {
    font-size: 2rem;
}

.wifi-card-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.wifi-close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.wifi-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.wifi-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.wifi-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wifi-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.wifi-info-item i {
    font-size: 1.3rem;
    opacity: 0.9;
    min-width: 24px;
}

.wifi-info-item > div {
    flex: 1;
    text-align: left;
}

.wifi-label {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
}

.wifi-network-name,
.wifi-password {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.wifi-qr-display {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wifi-qr-display > * {
    width: 250px !important;
    height: 250px !important;
}

.wifi-instructions {
    font-size: 0.95rem;
    margin: 0;
    opacity: 0.9;
}

/* ================================================
   QR POPUP
   ================================================ */
.qr-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}

.qr-popup.active {
    display: block;
}

.qr-popup-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.qr-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: popupSlide 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popupSlide {
    from {
        opacity: 0;
        transform: translate(-50%, -40%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.qr-popup-header {
    background: var(--gradient);
    color: white;
    padding: 24px;
    border-radius: 24px 24px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qr-popup-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.qr-popup-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.qr-popup-body {
    padding: 30px;
}

.qr-popup-qr {
    text-align: center;
    margin: 20px 0;
    background: var(--light);
    padding: 24px;
    border-radius: 16px;
    border: 2px dashed var(--border);
}

.qr-popup-qr #mobileAttendanceQR {
    display: inline-block !important;
    padding: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.qr-popup-info {
    margin-top: 24px;
    padding: 20px;
    background: var(--light);
    border-radius: 12px;
}

.qr-popup-info h4 {
    color: var(--dark);
    margin-bottom: 15px;
    font-size: 1rem;
}

.qr-popup-info ol {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
    line-height: 1.8;
}

/* ================================================
   SUCCESS MODAL
   ================================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 24px;
    text-align: center;
    max-width: 400px;
    animation: modalBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalBounce {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.modal-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    animation: iconPop 0.5s ease 0.2s both;
}

@keyframes iconPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.modal-icon.success {
    background: linear-gradient(135deg, var(--success), #059669);
}

.modal-icon.error {
    background: linear-gradient(135deg, var(--danger), #dc2626);
}

.modal-icon i {
    color: white;
}

.modal-content h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.modal-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.loader {
    width: 45px;
    height: 45px;
    margin: 0 auto;
    border: 4px solid var(--light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ================================================
   ADMIN CONTACT MODAL
   ================================================ */
.admin-contact-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    backdrop-filter: blur(8px);
}

.admin-contact-backdrop.show {
    display: block;
}

.admin-contact-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 9999;
    width: 90%;
    max-width: 450px;
}

.admin-contact-modal.show {
    display: block;
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalSlideIn {
    to { transform: translate(-50%, -50%) scale(1); }
}

.admin-contact-content {
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.admin-contact-header {
    background: var(--gradient);
    color: white;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.admin-contact-header i.fa-user-shield,
.admin-contact-header i.fa-qrcode {
    font-size: 32px;
}

.admin-contact-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    flex: 1;
}

.admin-contact-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.admin-contact-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.admin-contact-body {
    padding: 30px;
}

.admin-info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: var(--light);
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.admin-info-item:hover {
    background: #e9ecf5;
    transform: translateX(5px);
}

.admin-info-item > i {
    font-size: 22px;
    color: var(--primary);
    width: 28px;
    text-align: center;
}

.admin-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.admin-value {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
}

.admin-contact-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.admin-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-action-btn.call {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.admin-action-btn.email {
    background: var(--gradient);
    color: white;
}

.admin-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ================================================
   MARQUEE NOTIFICATION
   ================================================ */
.marquee-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
        width: 500px;
    height: 500px;
    z-index: 5;
    pointer-events: none;
    animation: rotateCircular 30s linear infinite;
}

.marquee-content {
    position: absolute;
    width: 100%;
    height: 100%;
    font-size: 16px;
    font-weight: 700;
    color: rgba(251, 191, 36, 1);
    text-shadow: 
        0 0 10px rgba(251, 191, 36, 0.8),
        0 2px 15px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(251, 191, 36, 0.4);
    letter-spacing: 8px;
    text-transform: uppercase;
}

.marquee-content span {
    position: absolute;
    display: inline-block;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 700;
    transform-origin: center center;
}

@keyframes rotateCircular {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
        gap: 2rem;
        padding: 1.5rem;
    }
    
    .logo-section {
        text-align: center;
        max-width: 100%;
    }
    
    .logo-content h1 {
        font-size: 2.2rem;
    }
    
    .logo-content h1::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
    }
    
    .marquee-container {
        width: 300px;
        height: 300px;
        top: 50%;
        left: 50%;
    }
    
    .marquee-content {
        font-size: 11px;
        letter-spacing: 3px;
    }
    
    .marquee-content span {
        font-size: 11px;
    }
    
    .login-card {
        padding: 1.5rem;
        border-radius: 20px;
    }
    
    .logo-content {
        padding: 10px;
    }
    
    .logo-content > i#defaultIcon {
        font-size: 4rem;
        margin-bottom: 1rem;
    }
    
    .logo-content h1 {
        font-size: 1.8rem;
        padding: 0 5px;
    }
    
    .logo-content p {
        font-size: 0.95rem;
        padding: 12px 20px;
    }
    
    #libraryLogoImg {
        max-width: 150px;
        max-height: 150px;
    }
}

    .wifi-qr-card {
        width: 95%;
        padding: 1.5rem;
    }
    
    .wifi-qr-display {
        width: 220px;
        height: 220px;
    }
    
    .wifi-qr-display > * {
        width: 190px !important;
        height: 190px !important;
    }
}

@media (max-width: 480px) {
    .login-header h2 {
        font-size: 1.5rem;
    }
    
    .toggle-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .form-group input {
        padding: 12px 14px;
    }
    
    .btn-login {
        padding: 14px;
    }
    
    .wifi-toggle-btn {
        width: 50px;
        height: 50px;
        bottom: 1rem;
        right: 1rem;
    }
    
    .btn-qr-attendance {
        padding: 14px 24px;
        font-size: 0.95rem;
    }
}

/* ================================================
   SCAN STATUS
   ================================================ */
.scan-status {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scan-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.scan-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
