/* Modern LMS Theme Styles */

/* Custom CSS Variables */
:root {
    --primary-blue: #2563eb;
    --primary-blue-dark: #1d4ed8;
    --primary-blue-light: #3b82f6;
    --sidebar-bg: #2563eb;
    --sidebar-bg-dark: #1e40af;
    --navbar-bg: #ffffff;
    --navbar-bg-dark: #1f2937;
}

/* Dark mode variables */
.dark {
    --sidebar-bg: #1e40af;
    --sidebar-bg-dark: #1e3a8a;
    --navbar-bg: #1f2937;
    --navbar-bg-dark: #111827;
}

/* Global styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Navigation styling */
nav {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.dark nav {
    background-color: rgba(31, 41, 55, 0.95);
}

/* Sidebar custom scrollbar */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Card styles */
.card {
    @apply bg-white dark:bg-gray-800 rounded-xl shadow-sm border border-gray-200 dark:border-gray-700;
}

.card-header {
    @apply p-6 border-b border-gray-200 dark:border-gray-700;
}

.card-body {
    @apply p-6;
}

/* Button styles */
.btn-primary {
    @apply bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg font-medium transition-colors;
}

.btn-secondary {
    @apply bg-gray-200 hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-900 dark:text-gray-100 px-4 py-2 rounded-lg font-medium transition-colors;
}

.btn-danger {
    @apply bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded-lg font-medium transition-colors;
}

/* Form styles */
.form-input {
    @apply w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent;
}

.form-label {
    @apply block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2;
}

/* Table styles */
.table {
    @apply w-full divide-y divide-gray-200 dark:divide-gray-700;
}

.table th {
    @apply px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider bg-gray-50 dark:bg-gray-800;
}

.table td {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900 dark:text-gray-100;
}

/* Badge styles */
.badge {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.badge-primary {
    @apply bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400;
}

.badge-success {
    @apply bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400;
}

.badge-warning {
    @apply bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400;
}

.badge-danger {
    @apply bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400;
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

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

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

/* Loading spinner */
.spinner {
    border: 2px solid rgba(59, 130, 246, 0.1);
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none !important;
    }
    
    .mobile-full {
        width: 100% !important;
    }
}

/* Focus styles for accessibility */
.focus-outline {
    @apply focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800;
}

/* Toast notifications */
.toast {
    @apply fixed top-4 right-4 z-50 max-w-sm w-full bg-white dark:bg-gray-800 shadow-lg rounded-lg border border-gray-200 dark:border-gray-700 fade-in;
}

.toast-success {
    @apply border-l-4 border-green-500;
}

.toast-error {
    @apply border-l-4 border-red-500;
}

.toast-warning {
    @apply border-l-4 border-yellow-500;
}

.toast-info {
    @apply border-l-4 border-blue-500;
}

/* Course card styles */
.course-card {
    @apply bg-white dark:bg-gray-800 rounded-xl shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden hover:shadow-md transition-shadow;
}

.course-card:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease-in-out;
}

/* Progress bar */
.progress-bar {
    @apply w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2;
}

.progress-fill {
    @apply bg-blue-600 h-2 rounded-full transition-all duration-300;
}

/* Dropdown styles */
.dropdown {
    @apply relative inline-block;
}

.dropdown-content {
    @apply absolute right-0 mt-2 w-56 bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 py-1 z-50;
}

.dropdown-item {
    @apply block px-4 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors;
}

/* Search styles */
.search-container {
    @apply relative;
}

.search-input {
    @apply w-full pl-10 pr-4 py-2 bg-gray-100 dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent;
}

.search-icon {
    @apply absolute left-3 top-2.5 w-4 h-4 text-gray-400;
}

/* Sidebar active state */
.sidebar-link-active {
    @apply bg-blue-500 dark:bg-blue-700 text-white;
}

/* Modern glassmorphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hover effects */
.hover-lift {
    transition: transform 0.2s ease-in-out;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

/* Content area styles */
.content-area {
    @apply min-h-screen bg-gray-50 dark:bg-gray-900;
}

/* Page header */
.page-header {
    @apply bg-white dark:bg-gray-800 shadow-sm border-b border-gray-200 dark:border-gray-700 p-6;
}

.page-title {
    @apply text-2xl font-bold text-gray-900 dark:text-white;
}

.page-subtitle {
    @apply text-sm text-gray-600 dark:text-gray-400 mt-1;
}

/* Status indicators */
.status-online {
    @apply w-3 h-3 bg-green-500 rounded-full;
}

.status-offline {
    @apply w-3 h-3 bg-gray-400 rounded-full;
}

.status-busy {
    @apply w-3 h-3 bg-red-500 rounded-full;
}

.status-away {
    @apply w-3 h-3 bg-yellow-500 rounded-full;
}
