/* Admin Login - Premium Tech Dashboard Theme */

:root {
    --tech-dark: #0a0e27;
    --tech-darker: #050812;
    --tech-blue: #1e40af;
    --tech-cyan: #06b6d4;
    --tech-glow: #3b82f6;
    --tech-accent: #10b981;
    --tech-purple: #7c3aed;
}

/* Keyframe Animations */
@keyframes circuitPulse {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.45; }
}

@keyframes dataFlow {
    0% { transform: translateY(-20px); opacity: 0; }
    50% { opacity: 0.8; }
    100% { transform: translateY(100vh); opacity: 0; }
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-120px) translateX(40px);
        opacity: 0;
    }
}

@keyframes glowPulseIntense {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3)) drop-shadow(0 0 20px rgba(6, 182, 212, 0.15));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.6)) drop-shadow(0 0 40px rgba(6, 182, 212, 0.3));
    }
}

@keyframes floatIntense {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.01);
    }
}

@keyframes buttonHoverGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.3), inset 0 0 10px rgba(59, 130, 246, 0.08);
    }
    50% {
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.6), inset 0 0 20px rgba(59, 130, 246, 0.2);
    }
}

@keyframes dotPulse {
    0%, 100% {
        r: 2;
        opacity: 0.4;
    }
    50% {
        r: 3.5;
        opacity: 0.9;
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

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

@keyframes scanlineEffect {
    0% { transform: translateY(0); }
    100% { transform: translateY(20px); }
}

@keyframes glitchFlicker {
    0%, 100% { opacity: 1; }
    45% { opacity: 0.95; }
    48% { opacity: 1; }
    50% { opacity: 0.97; }
    55% { opacity: 1; }
}

@keyframes softGlow {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 8px rgba(6, 182, 212, 0.2));
    }
    50% {
        filter: brightness(1.05) drop-shadow(0 0 15px rgba(6, 182, 212, 0.4));
    }
}

/* Background Container */
.admin-auth-container {
    position: fixed;
    inset: 0;
    background: 
        linear-gradient(135deg, #0a0e27 0%, #0d1b2a 40%, #0c1425 70%, #050812 100%),
        radial-gradient(circle at 20% 30%, rgba(30, 64, 175, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.06) 0%, transparent 40%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
}

.admin-auth-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(6, 182, 212, 0.02) 0px,
            rgba(6, 182, 212, 0.02) 1px,
            transparent 1px,
            transparent 2px
        );
    pointer-events: none;
    animation: scanlineEffect 8s linear infinite;
    z-index: 1;
}

/* Circuit Board Background */
.circuit-board-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.circuit-board-bg svg {
    position: absolute;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 2px rgba(59, 130, 246, 0.4));
}

.circuit-line {
    stroke: rgba(59, 130, 246, 0.3);
    stroke-width: 2;
    fill: none;
    animation: circuitPulse 4s ease-in-out infinite;
}

.circuit-node {
    fill: rgba(59, 130, 246, 0.5);
    animation: circuitPulse 3s ease-in-out infinite;
}

.circuit-node-bright {
    fill: rgba(6, 182, 212, 0.9);
    animation: dotPulse 2s ease-in-out infinite;
}

/* Particle Effects */
.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(59, 130, 246, 0.8);
    border-radius: 50%;
    pointer-events: none;
}

.particle-1 { animation: particleFloat 3s linear infinite; left: 20%; top: 80%; }
.particle-2 { animation: particleFloat 4s linear infinite 0.5s; left: 30%; top: 70%; }
.particle-3 { animation: particleFloat 3.5s linear infinite 1s; left: 70%; top: 85%; }
.particle-4 { animation: particleFloat 4.5s linear infinite 1.5s; left: 80%; top: 75%; }
.particle-5 { animation: particleFloat 3.8s linear infinite 2s; left: 50%; top: 90%; }

/* Form Container */
.admin-auth-form-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    max-width: 450px;
    width: 90%;
}

/* Logo Badge */
.admin-logo-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
    border-radius: 50%;
    box-shadow: 
        0 0 25px rgba(59, 130, 246, 0.4),
        0 0 50px rgba(6, 182, 212, 0.2),
        inset 0 -2px 10px rgba(0, 0, 0, 0.08),
        inset 0 1px 2px rgba(255, 255, 255, 0.4);
    animation: floatIntense 4s ease-in-out infinite;
    flex-shrink: 0;
    position: relative;
    border: 1.5px solid rgba(59, 130, 246, 0.15);
}

.admin-logo-badge::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(59, 130, 246, 0.3), rgba(6, 182, 212, 0.2), transparent 50%);
    animation: spin 8s linear infinite;
    z-index: -1;
    opacity: 0.4;
}

.admin-logo-badge::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px solid rgba(59, 130, 246, 0.1);
    animation: softGlow 3s ease-in-out infinite;
}

.admin-logo-badge img {
    width: 85%;
    height: 85%;
    object-fit: cover;
    object-position: center;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
    position: relative;
    z-index: 2;
}

/* Auth Card */
.admin-auth-card {
    background: 
        linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(20, 30, 50, 0.92) 100%);
    backdrop-filter: blur(20px) brightness(1.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-top: 1px solid rgba(59, 130, 246, 0.35);
    border-left: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 16px;
    padding: 2.8rem 2.2rem;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    animation: glowPulseIntense 5s ease-in-out infinite;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.admin-auth-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, transparent 50%, rgba(6, 182, 212, 0.03) 100%);
    pointer-events: none;
    border-radius: 16px;
}

.admin-auth-card h2 {
    color: #ffffff;
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    letter-spacing: -0.8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.85) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-auth-card p {
    color: rgba(203, 213, 225, 0.75);
    font-size: 0.93rem;
    margin-bottom: 2rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 2;
}

/* Form Content */
.admin-form-content {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

/* Form Group */
.admin-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    position: relative;
    z-index: 2;
}

.admin-form-label {
    color: rgba(203, 213, 225, 0.9);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.admin-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-form-input {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.06) 0%, rgba(6, 182, 212, 0.04) 100%);
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 9px;
    padding: 0.9rem 0.95rem 0.9rem 2.8rem;
    color: #ffffff;
    font-size: 0.95rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    font-weight: 500;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(5px);
}

.admin-form-input::placeholder {
    color: rgba(203, 213, 225, 0.3);
}

.admin-form-input:focus {
    outline: none;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow: 
        0 0 0 2px rgba(59, 130, 246, 0.1),
        inset 0 0 12px rgba(59, 130, 246, 0.08);
}

.admin-form-input:-webkit-autofill {
    -webkit-box-shadow: inset 0 0 0 50px rgba(30, 64, 175, 0.08) !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: rgba(59, 130, 246, 0.8);
}

/* Input Icon */
.admin-input-icon {
    position: absolute;
    left: 0.9rem;
    color: rgba(59, 130, 246, 0.5);
    font-size: 1.1rem;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

.admin-form-input:focus ~ .admin-input-icon,
.admin-form-input:not(:placeholder-shown) ~ .admin-input-icon {
    color: rgba(6, 182, 212, 0.85);
}

/* Login Button */
.admin-btn-login {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #2563eb 100%);
    color: #ffffff;
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 9px;
    padding: 1rem 1.4rem;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    animation: buttonHoverGlow 4s ease-in-out infinite;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.25);
}

.admin-btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    animation: shimmer 2.5s ease-in-out infinite;
    z-index: 1;
}

.admin-btn-login span {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-btn-login:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(59, 130, 246, 0.5),
        inset 0 0 15px rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.6);
}

.admin-btn-login:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-auth-form-container {
        padding: 0 1rem;
        gap: 1.8rem;
    }

    .admin-auth-card {
        padding: 2rem 1.4rem;
    }

    .admin-logo-badge {
        width: 90px;
        height: 90px;
    }

    .admin-logo-badge img {
        width: 85%;
        height: 85%;
    }

    .admin-auth-card h2 {
        font-size: 1.4rem;
    }

    .admin-form-input {
        padding: 0.85rem 0.9rem 0.85rem 2.6rem;
        font-size: 0.93rem;
    }

    .admin-input-icon {
        left: 0.85rem;
        font-size: 1rem;
    }

    .admin-btn-login {
        padding: 0.95rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .admin-auth-form-container {
        gap: 1.5rem;
    }

    .admin-auth-card {
        padding: 1.6rem 1.2rem;
        border-radius: 14px;
    }

    .admin-logo-badge {
        width: 85px;
        height: 85px;
    }

    .admin-logo-badge img {
        width: 85%;
        height: 85%;
    }

    .admin-auth-card h2 {
        font-size: 1.25rem;
    }

    .admin-auth-card p {
        font-size: 0.85rem;
    }

    .admin-form-label {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .admin-form-input {
        padding: 0.8rem 0.85rem 0.8rem 2.5rem;
        font-size: 0.9rem;
    }

    .admin-input-icon {
        left: 0.8rem;
        font-size: 0.95rem;
    }

    .admin-btn-login {
        padding: 0.9rem 1.1rem;
        font-size: 0.85rem;
    }
}

/* Light Theme Support */
html[data-theme="light"] .admin-auth-container {
    background: 
        linear-gradient(135deg, #f5f7fa 0%, #eef2f7 40%, #f0f4f8 70%, #f8fafc 100%),
        radial-gradient(circle at 20% 30%, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(6, 182, 212, 0.06) 0%, transparent 40%);
}

html[data-theme="light"] .admin-auth-container::before {
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(6, 182, 212, 0.01) 0px,
            rgba(6, 182, 212, 0.01) 1px,
            transparent 1px,
            transparent 2px
        );
}

html[data-theme="light"] .admin-logo-badge {
    background: 
        radial-gradient(circle at 30% 30%, #ffffff 0%, #f9fafb 100%);
    box-shadow: 
        0 0 20px rgba(59, 130, 246, 0.25),
        0 0 40px rgba(6, 182, 212, 0.12),
        inset 0 -2px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 2px rgba(255, 255, 255, 0.6);
    border-color: rgba(59, 130, 246, 0.12);
}

html[data-theme="light"] .admin-auth-card {
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.95) 100%);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-top-color: rgba(37, 99, 235, 0.25);
    border-left-color: rgba(37, 99, 235, 0.2);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 0 30px rgba(37, 99, 235, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .admin-auth-card h2 {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

html[data-theme="light"] .admin-auth-card p {
    color: #6b7280;
}

html[data-theme="light"] .admin-form-label {
    color: #374151;
}

html[data-theme="light"] .admin-form-input {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, rgba(6, 182, 212, 0.02) 100%);
    border-color: rgba(37, 99, 235, 0.15);
    color: #1f2937;
}

html[data-theme="light"] .admin-form-input::placeholder {
    color: rgba(107, 114, 128, 0.35);
}

html[data-theme="light"] .admin-form-input:focus {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-color: rgba(37, 99, 235, 0.7);
    box-shadow: 
        0 0 0 2px rgba(37, 99, 235, 0.08),
        inset 0 0 12px rgba(37, 99, 235, 0.06);
}

html[data-theme="light"] .admin-input-icon {
    color: rgba(37, 99, 235, 0.5);
}

html[data-theme="light"] .admin-form-input:focus ~ .admin-input-icon,
html[data-theme="light"] .admin-form-input:not(:placeholder-shown) ~ .admin-input-icon {
    color: rgba(6, 182, 212, 0.8);
}

html[data-theme="light"] .admin-btn-login {
    box-shadow: 0 2px 12px rgba(30, 64, 175, 0.15);
}

html[data-theme="light"] .admin-btn-login:hover {
    box-shadow: 
        0 6px 20px rgba(37, 99, 235, 0.3),
        inset 0 0 15px rgba(255, 255, 255, 0.1);
}
