/* Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300;400;500;700&family=Fredoka:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #3B82F6;
    --secondary-color: #8B5CF6;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 64px;
}

/* Custom Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse-slow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

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

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

.animate-fade-in-up {
    animation: fadeIn 0.8s ease-out 0.3s forwards;
    opacity: 0;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    transition: all 0.3s ease-in-out;
    position: relative;
    z-index: 40;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-text {
    opacity: 0;
    visibility: hidden;
}

.sidebar.mobile-hidden {
    transform: translateX(-100%);
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        height: 100vh;
        z-index: 50;
    }
    
    .sidebar.mobile-hidden {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-visible {
        transform: translateX(0);
    }
}

/* Navigation Items */
.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 4px 0;
    color: #6B7280;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
}

.nav-item:hover {
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    color: #374151;
    transform: translateX(4px);
}

.dark .nav-item:hover {
    background: linear-gradient(135deg, #374151 0%, #4B5563 100%);
    color: #F9FAFB;
}

.nav-item.active {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.nav-icon {
    width: 20px;
    text-align: center;
    margin-right: 12px;
    transition: transform 0.2s ease-in-out;
}

.nav-item:hover .nav-icon {
    transform: scale(1.1);
}

/* Sidebar Text */
.sidebar-text {
    transition: all 0.3s ease-in-out;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-text {
    opacity: 0;
    visibility: hidden;
    width: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    transition: all 0.3s ease-in-out;
}

/* Stats Cards */
.stat-card {
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: rotate(45deg);
    transition: all 0.3s ease-in-out;
    opacity: 0;
}

.stat-card:hover::before {
    opacity: 1;
    transform: rotate(45deg) translate(10px, 10px);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.2);
}

/* Quick Action Buttons */
.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    min-height: 100px;
}

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

/* Form Styles */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 12px;
    background: #F9FAFB;
    transition: all 0.2s ease-in-out;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: #3B82F6;
    ring: 2px;
    ring-color: rgba(59, 130, 246, 0.2);
    background: white;
}

.dark .form-input {
    background: #374151;
    border-color: #4B5563;
    color: white;
}

.dark .form-input:focus {
    background: #4B5563;
    border-color: #3B82F6;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark .data-table {
    background: #1F2937;
}

.data-table th {
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    padding: 16px;
    font-weight: 600;
    text-align: left;
    color: #374151;
}

.dark .data-table th {
    background: linear-gradient(135deg, #374151 0%, #4B5563 100%);
    color: #F9FAFB;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid #F3F4F6;
}

.dark .data-table td {
    border-bottom-color: #374151;
}

.data-table tr:hover {
    background: #F9FAFB;
}

.dark .data-table tr:hover {
    background: #374151;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #F3F4F6;
    transition: all 0.3s ease-in-out;
}

.dark .card {
    background: #1F2937;
    border-color: #374151;
}

.card:hover {
    box-shadow: 0 8px 25px -8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s ease-in-out;
}

.dark .modal {
    background: #1F2937;
}

.modal-overlay.show .modal {
    transform: scale(1) translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-visible {
        transform: translateX(0);
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .quick-action-btn {
        min-height: 80px;
        padding: 16px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3B82F6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    box-shadow: 0 8px 25px -8px rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    transition: all 0.3s ease-in-out;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.notification.error {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
}

.notification.warning {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.notification.info {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 3px;
}

.dark ::-webkit-scrollbar-track {
    background: #374151;
}

::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #6B7280;
}

::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Theme Transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* DataTables Custom Styles */
/* .dataTables_wrapper {
    font-family: 'Ubuntu', sans-serif;
} */

/* .dataTables_filter input {
    border-radius: 8px;
    border: 1px solid #D1D5DB;
    padding: 8px 12px;
}

.dataTables_length select {
    border-radius: 8px;
    border: 1px solid #D1D5DB;
    padding: 6px 12px;
}

.dataTables_paginate .paginate_button {
    border-radius: 6px;
    margin: 0 2px;
} */

/* .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%) !important;
    color: white !important;
} */

/* Print Styles */
@media print {
    .sidebar,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}