/* Enhanced Admin UI Styles with Modern Animations */

/* ===== Base Styles ===== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(17, 24, 39, 0.5);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2742F7 0%, #10b981 100%);
    border-radius: 6px;
    border: 2px solid rgba(17, 24, 39, 0.5);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #059669 100%);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(39, 66, 247, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(39, 66, 247, 0.8), 0 0 30px rgba(39, 66, 247, 0.4);
    }
}

/* ===== Animation Classes ===== */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

.animate-pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* ===== Hover Effects ===== */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(39, 66, 247, 0.5);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ===== Admin Cards ===== */
.admin-card {
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.admin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #2742F7, #10b981, #E0B23F);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-card:hover::before {
    opacity: 1;
}

.admin-card:hover {
    border-color: rgba(39, 66, 247, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* ===== Stat Cards ===== */
.stat-card {
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.stat-card:hover::after {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(39, 66, 247, 0.5);
    box-shadow: 0 10px 25px rgba(39, 66, 247, 0.2);
}

.stat-label {
    font-size: 0.875rem;
    color: #9ca3af;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

/* ===== Buttons ===== */
.btn-primary {
    background: linear-gradient(135deg, #2742F7 0%, #1e3a8a 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(39, 66, 247, 0.4);
}

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

.btn-action {
    background: rgba(39, 66, 247, 0.2);
    color: #60a5fa;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    border: 1px solid rgba(39, 66, 247, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-action:hover {
    background: rgba(39, 66, 247, 0.3);
    border-color: rgba(39, 66, 247, 0.5);
    transform: translateY(-2px);
}

.btn-action-view {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}

.btn-action-view:hover {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.5);
}

/* ===== Form Inputs ===== */
.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #2742F7;
    box-shadow: 0 0 0 3px rgba(39, 66, 247, 0.1);
    background: rgba(17, 24, 39, 0.8);
}

.form-input::placeholder {
    color: #6b7280;
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-primary {
    background: rgba(39, 66, 247, 0.2);
    color: #818cf8;
    border: 1px solid rgba(39, 66, 247, 0.3);
}

/* ===== Navigation Tabs ===== */
.nav-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
    overflow-x: visible;
    flex-wrap: wrap;
}

.nav-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #9ca3af;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: fit-content;
}

.nav-tab:hover {
    color: #ffffff;
    background: rgba(39, 66, 247, 0.1);
}

.nav-tab.active {
    color: #2742F7;
    border-bottom-color: #2742F7;
    background: rgba(39, 66, 247, 0.1);
}

/* ===== Loading States ===== */
.loading-skeleton {
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.6) 25%, rgba(31, 41, 55, 0.6) 50%, rgba(17, 24, 39, 0.6) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.spinner {
    border: 3px solid rgba(39, 66, 247, 0.2);
    border-top-color: #2742F7;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* ===== Toast Notifications ===== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

/* ===== Tables ===== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: rgba(39, 66, 247, 0.1);
}

.admin-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #ffffff;
    border-bottom: 2px solid rgba(39, 66, 247, 0.3);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.admin-table td {
    padding: 12px 16px;
    color: #d1d5db;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-table tbody tr {
    transition: all 0.2s ease;
}

.admin-table tbody tr:hover {
    background: rgba(39, 66, 247, 0.05);
    transform: scale(1.01);
}

/* ===== Empty States ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 4rem;
    color: #6b7280;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.empty-state-description {
    color: #9ca3af;
    margin-bottom: 24px;
}

/* ===== Modals ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInUp 0.3s ease-out;
}

.modal-content {
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .admin-card {
        padding: 16px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .nav-tabs {
        flex-direction: column;
        gap: 4px;
        border-bottom: none;
        border-left: 2px solid rgba(255, 255, 255, 0.1);
        padding-left: 12px;
    }
    
    .nav-tab {
        padding: 10px 16px;
        border-bottom: none;
        border-left: 2px solid transparent;
        margin-bottom: 0;
        margin-left: -2px;
        width: 100%;
        justify-content: flex-start;
    }
    
    .nav-tab.active {
        border-left-color: #2742F7;
        border-bottom-color: transparent;
    }
}

/* ===== Utility Classes ===== */
.glass-effect {
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gradient-text {
    background: linear-gradient(135deg, #2742F7 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ===== Intersection Observer Animations ===== */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left-on-scroll {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-left-on-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right-on-scroll {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-right-on-scroll.visible {
    opacity: 1;
    transform: translateX(0);
}
