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

body {
    font-family: 'Cairo', sans-serif;
    background-color: #f8f9fa;
}

/* Login Section */
#login-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card {
    border-radius: 15px;
    border: none;
}

.card-body {
    border-radius: 15px;
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Statistics Cards */
.stat-card {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-primary) 100%);
    border-radius: 15px;
    padding: 2rem;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: rotate(45deg);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.stat-content p {
    margin: 0;
    opacity: 0.9;
    text-align: center;
    font-size: 0.9rem;
}

/* Color variations for stat cards */
.stat-card.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card.bg-success {
    background: linear-gradient(135deg, #06ffa5 0%, #3d8bfd 100%);
}

.stat-card.bg-info {
    background: linear-gradient(135deg, #48cae4 0%, #023e8a 100%);
}

.stat-card.bg-warning {
    background: linear-gradient(135deg, #ffb700 0%, #ff6b35 100%);
}

/* Navigation Tabs */
.nav-tabs {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 2rem;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 600;
    padding: 1rem 1.5rem;
    border-radius: 10px 10px 0 0;
    transition: all 0.3s ease;
    margin-left: 5px;
}

.nav-tabs .nav-link:hover {
    border: none;
    background-color: #f8f9fa;
    color: #495057;
}

.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

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

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    border-radius: 15px 15px 0 0 !important;
    padding: 1.25rem 1.5rem;
}

.card-header h5 {
    margin: 0;
    color: #495057;
    font-weight: 600;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
    padding: 1rem;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-success {
    background: linear-gradient(135deg, #06ffa5 0%, #3d8bfd 100%);
    border: none;
}

.btn-info {
    background: linear-gradient(135deg, #48cae4 0%, #023e8a 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #ffb700 0%, #ff6b35 100%);
    border: none;
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ff006e 0%, #fb8500 100%);
    border: none;
}

/* Forms */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
}

.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item-admin {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.gallery-item-admin:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item-admin img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.gallery-item-info {
    padding: 1rem;
}

.gallery-item-info h6 {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: #495057;
}

.gallery-item-info small {
    color: #6c757d;
}

.gallery-actions {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item-admin:hover .gallery-actions {
    opacity: 1;
}

.gallery-actions .btn {
    padding: 5px 8px;
    font-size: 0.75rem;
}

/* Toast */
.toast {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Loading Spinner */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-border-lg {
    width: 3rem;
    height: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stat-card {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .stat-content h3 {
        font-size: 2rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .card-header h5 {
        font-size: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn {
        padding: 10px 16px;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
        min-height: 120px;
    }
    
    .stat-content h3 {
        font-size: 1.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        margin-left: 2px;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.5s ease;
}

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

/* File Upload Styling */
.form-control[type="file"] {
    border: 2px dashed #e9ecef;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.form-control[type="file"]:hover {
    border-color: #667eea;
    background-color: rgba(102, 126, 234, 0.05);
}

.form-control[type="file"]:focus {
    border-color: #667eea;
    border-style: solid;
    background-color: white;
}

/* Drag and Drop Styling */
.drag-over {
    border: 2px dashed #667eea !important;
    background-color: rgba(102, 126, 234, 0.1) !important;
}

.file-preview {
    margin-top: 1rem;
    text-align: center;
}

.file-preview img {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Upload Progress */
.upload-progress {
    margin-top: 1rem;
}

.upload-progress .progress {
    height: 25px;
    border-radius: 12px;
    background-color: #e9ecef;
}

.upload-progress .progress-bar {
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-weight: 600;
}

/* File Info Alert */
.alert-info {
    border-left: 4px solid #667eea;
    background-color: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

/* Enhanced File Input */
.form-control[type="file"] {
    position: relative;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-control[type="file"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-control[type="file"]:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.form-control[type="file"]::file-selector-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-control[type="file"]::file-selector-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(102, 126, 234, 0.3);
}

/* Badge Enhancements */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
}

.badge.bg-info {
    background: linear-gradient(135deg, #48cae4 0%, #023e8a 100%) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #06ffa5 0%, #3d8bfd 100%) !important;
}

/* Video File Indicator */
.video-file-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
}

/* Disabled Input Styling */
.form-control:disabled {
    background-color: #f8f9fa;
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success Animations */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success-animation {
    animation: successPulse 0.6s ease-in-out;
}

/* Error Styling */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}

.error-message i {
    margin-left: 0.5rem;
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Mobile Enhancements */
@media (max-width: 768px) {
    .form-control[type="file"] {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .file-preview img {
        max-width: 100%;
        height: auto;
    }
    
    .upload-progress {
        margin-top: 0.5rem;
    }
    
    .alert-info {
        font-size: 0.875rem;
        padding: 0.75rem;
    }
}

/* Accessibility Improvements */
.form-control[type="file"]:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.btn:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Smooth Transitions */
.card, .btn, .form-control, .alert {
    transition: all 0.3s ease;
}

/* Custom Scrollbar for File Lists */
.gallery-item-admin::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    width: 6px;
}

.gallery-item-admin::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.gallery-item-admin::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.gallery-item-admin::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
