/* ============================================
   ADMIN-ENHANCEMENTS.CSS - Admin & Helper Panel UI Improvements
   ============================================ */

/* === Enhanced Glass Morphism === */
.glass-card-enhanced {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.6));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.glass-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.glass-card-enhanced:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(139, 92, 246, 0.1);
}

.glass-card-enhanced:hover::before {
    opacity: 1;
}

/* === Stat Cards with Counters Animation === */
.stat-card-animated {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card-animated:hover {
    transform: translateY(-8px) scale(1.02);
}

.stat-card-animated:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-card-animated .stat-value {
    transition: all 0.3s ease;
}

.stat-card-animated:hover .stat-value {
    transform: scale(1.05);
    text-shadow: 0 0 20px currentColor;
}

/* Counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.count-animated {
    animation: countUp 0.5s ease-out forwards;
}

/* === Navigation Items === */
.nav-item-animated {
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.nav-item-animated::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 60%;
    background: linear-gradient(180deg, var(--accent, #8b5cf6), var(--accent2, #06b6d4));
    border-radius: 0 4px 4px 0;
    transition: width 0.3s ease;
}

.nav-item-animated:hover::before,
.nav-item-animated.active::before {
    width: 4px;
}

.nav-item-animated:hover {
    background: rgba(139, 92, 246, 0.1);
    padding-left: 20px;
}

.nav-item-animated.active {
    background: rgba(139, 92, 246, 0.15);
}

.nav-item-animated i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.nav-item-animated:hover i {
    transform: scale(1.2);
    color: var(--accent, #8b5cf6);
}

/* === Tab Content Transitions === */
.tab-content-animated {
    animation: tabFadeIn 0.4s ease-out;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Table Row Animations === */
.table-row-animated {
    transition: all 0.3s ease;
}

.table-row-animated:hover {
    background: rgba(139, 92, 246, 0.05);
    transform: translateX(5px);
}

.table-row-animated td:first-child {
    position: relative;
}

.table-row-animated:hover td:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent, #8b5cf6), var(--accent2, #06b6d4));
}

/* === Badge Animations === */
.badge-pulse {
    position: relative;
}

.badge-pulse::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: currentColor;
    opacity: 0;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.3;
    }
}

/* === Button Enhancements === */
.btn-glow {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.btn-glow:hover::before {
    width: 300px;
    height: 300px;
}

.btn-glow:hover {
    box-shadow: 0 5px 25px rgba(139, 92, 246, 0.4);
}

/* === Input Focus Glow === */
.input-glow {
    transition: all 0.3s ease;
}

.input-glow:focus {
    border-color: var(--accent, #8b5cf6);
    box-shadow:
        0 0 0 4px rgba(139, 92, 246, 0.1),
        0 0 20px rgba(139, 92, 246, 0.15);
}

/* === Chat Bubble Animations === */
.chat-bubble {
    animation: bubbleIn 0.3s ease-out;
}

@keyframes bubbleIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === Portfolio Card Hover === */
.portfolio-card-hover {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card-hover:hover {
    transform: translateY(-10px);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(139, 92, 246, 0.15);
}

.portfolio-card-hover:hover img {
    transform: scale(1.05);
}

.portfolio-card-hover img {
    transition: transform 0.5s ease;
}

/* === Action Buttons Row === */
.action-btn-group .btn {
    transition: all 0.3s ease;
}

.action-btn-group .btn:hover {
    transform: translateY(-3px);
    z-index: 1;
}

/* === Section Header Animation === */
.section-header-animated {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === Loading Skeleton Shimmer === */
.skeleton-shimmer {
    background: linear-gradient(90deg,
            rgba(139, 92, 246, 0.05) 0%,
            rgba(139, 92, 246, 0.15) 50%,
            rgba(139, 92, 246, 0.05) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* === Real-time Indicator === */
.realtime-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    position: relative;
}

.realtime-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: #22c55e;
    animation: realtimePulse 2s ease-in-out infinite;
}

@keyframes realtimePulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* === Sidebar Profile Card === */
.profile-card-glow {
    position: relative;
}

.profile-card-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-card-glow:hover::after {
    opacity: 1;
}

/* === Modal Backdrop Blur === */
.modal-backdrop-enhanced {
    backdrop-filter: blur(10px);
    background: rgba(2, 6, 23, 0.8);
    animation: backdropFadeIn 0.3s ease;
}

@keyframes backdropFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
    }

    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

/* === Modal Content Slide === */
.modal-content-slide {
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === Icon Hover Effects === */
.icon-hover-rotate:hover i {
    transform: rotate(15deg);
    transition: transform 0.3s ease;
}

.icon-hover-bounce:hover i {
    animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-5px);
    }

    50% {
        transform: translateY(0);
    }

    75% {
        transform: translateY(-3px);
    }
}

/* === Status Indicator === */
.status-online {
    color: #22c55e;
}

.status-online::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    margin-right: 6px;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* === Scrollbar Styling === */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(139, 92, 246, 0.05);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent, #8b5cf6), var(--accent2, #06b6d4));
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--accent, #8b5cf6);
}

/* === Grid Stagger Animation === */
.grid-stagger>* {
    opacity: 0;
    animation: gridItemIn 0.5s ease-out forwards;
}

.grid-stagger>*:nth-child(1) {
    animation-delay: 0.05s;
}

.grid-stagger>*:nth-child(2) {
    animation-delay: 0.1s;
}

.grid-stagger>*:nth-child(3) {
    animation-delay: 0.15s;
}

.grid-stagger>*:nth-child(4) {
    animation-delay: 0.2s;
}

.grid-stagger>*:nth-child(5) {
    animation-delay: 0.25s;
}

.grid-stagger>*:nth-child(6) {
    animation-delay: 0.3s;
}

.grid-stagger>*:nth-child(7) {
    animation-delay: 0.35s;
}

.grid-stagger>*:nth-child(8) {
    animation-delay: 0.4s;
}

@keyframes gridItemIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === Responsive Enhancements === */
@media (max-width: 768px) {
    .glass-card-enhanced:hover {
        transform: none;
    }

    .stat-card-animated:hover {
        transform: translateY(-4px);
    }

    .portfolio-card-hover:hover {
        transform: translateY(-5px);
    }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}