/* Admin Panel Custom Styles */

/* Base Admin Styles */
.admin-navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    min-height: 70px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-text {
    font-weight: 600;
    font-size: 1.2rem;
    color: #fff;
}

.admin-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    background: linear-gradient(135deg, #f8f9fc 0%, #eef1f7 100%);
    padding: 20px 0;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.admin-title {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 0;
}

.admin-breadcrumb {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Quick Action Cards */
.quick-action-card {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100%;
}

.quick-action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.quick-action-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
}

.quick-action-content h6 {
    color: #2c3e50;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.quick-action-content p {
    color: #6c757d;
    font-size: 0.85rem;
    margin: 0;
}

/* Admin Cards */
.admin-card {
    background: #fff;
    border-radius: 15px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    overflow: hidden;
}

.admin-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 15px 20px;
}

.admin-card .card-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.admin-card .card-body {
    padding: 20px;
}

/* Statistics Cards */
.admin-stat-card {
    background: #fff;
    border-radius: 15px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.admin-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2rem;
    color: #2c3e50;
    font-weight: 700;
    margin-top: 5px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
}

/* Action Buttons */
.admin-actions {
    display: flex;
    gap: 10px;
}

.admin-actions .btn {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
}

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

.admin-table thead th {
    background: #f8f9fc;
    color: #2c3e50;
    font-weight: 600;
    border: none;
    padding: 15px 12px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table tbody td {
    padding: 15px 12px;
    border-top: 1px solid #eee;
    vertical-align: middle;
}

.admin-table tbody tr:hover {
    background: #f8f9fc;
}

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-draft {
    background: #fff3cd;
    color: #856404;
}

.status-archived {
    background: #f8d7da;
    color: #721c24;
}

/* Action Buttons in Tables */
.action-btn {
    padding: 4px 8px;
    margin: 0 2px;
    border-radius: 4px;
    border: none;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.action-btn.edit {
    background: #007bff;
    color: #fff;
}

.action-btn.delete {
    background: #dc3545;
    color: #fff;
}

.action-btn.view {
    background: #28a745;
    color: #fff;
}

/* Media Grid */
.media-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.media-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.media-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 15px;
}

.media-item:hover .media-overlay {
    opacity: 1;
}

.media-info {
    color: #fff;
}

.media-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.media-size {
    font-size: 0.8rem;
    opacity: 0.8;
}

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

.media-item:hover .media-actions {
    opacity: 1;
}

.media-actions .btn {
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    background: #f8f9fc;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-area:hover {
    border-color: #007bff;
    background: #e3f2fd;
    color: #007bff;
}

.upload-area.dragover {
    border-color: #28a745;
    background: #d4edda;
    color: #28a745;
}

.upload-area i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.6;
}

.upload-area h5 {
    margin-bottom: 10px;
    font-weight: 600;
}

/* Activity List */
.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.activity-time {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Login Modal Styles */
.login-content .alert {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: none;
    color: #1976d2;
}

/* Form Styles */
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Button Animations */
.btn {
    transition: all 0.3s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border: none;
}

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

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    border: none;
    color: #212529;
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
}

/* Navigation Active State */
.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
}

/* Fix Modal Z-index Issues */
.modal {
    z-index: 1055;
}

.modal-backdrop {
    z-index: 1050;
}

/* Fix Image Upload Area */
.image-preview-container {
    min-height: 60px;
    padding: 10px;
    border: 1px solid #e3e6f0;
    border-radius: 8px;
    background: #f8f9fc;
}

.image-preview-container:empty::before {
    content: "No images selected";
    color: #6c757d;
    font-style: italic;
    display: block;
    text-align: center;
    padding: 20px;
}

/* Fix Upload Button Spacing */
.multi-upload-area .btn {
    margin: 5px;
}

/* Fix Progress Bar */
.progress {
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .admin-content {
        margin-top: 70px;
        padding: 15px 0;
    }
    
    .admin-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .admin-actions .btn {
        width: 100%;
    }
    
    .quick-action-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .media-item img {
        height: 150px;
    }
    
    .image-preview-container {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .multi-upload-area {
        padding: 20px 15px;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .admin-title {
        font-size: 1.5rem;
    }
    
    .admin-breadcrumb {
        font-size: 0.8rem;
    }
    
    .admin-card .card-body {
        padding: 15px;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
}

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

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

/* Notification Styles */
.notification {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 1055;
    min-width: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    transition: all 0.3s ease;
}

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

.notification-content {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-icon {
    font-size: 1.2rem;
}

.notification-text {
    flex: 1;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
}

.notification-close:hover {
    opacity: 1;
}

/* Image Preview Styles */
.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: #f8f9fc;
}

.image-preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.image-preview-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.image-preview-item:hover img {
    transform: scale(1.05);
}

.image-preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(220, 53, 69, 0.95);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.image-preview-item:hover .image-preview-remove {
    opacity: 1;
}

.image-preview-remove:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

.image-preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
    padding: 8px;
    font-size: 0.8rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.image-preview-item:hover .image-preview-overlay {
    opacity: 1;
}

.image-preview-name {
    font-weight: 500;
    margin-bottom: 2px;
}

.image-preview-size {
    font-size: 0.7rem;
    opacity: 0.9;
}

/* Multiple Image Upload Area */
.multi-upload-area {
    border: 3px dashed #dee2e6;
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fc 0%, #eef1f7 100%);
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.multi-upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.multi-upload-area:hover::before {
    left: 100%;
}

.multi-upload-area:hover {
    border-color: #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #007bff;
    transform: translateY(-2px);
}

.multi-upload-area.dragover {
    border-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #28a745;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.multi-upload-area:hover .upload-icon {
    transform: scale(1.1);
    opacity: 1;
}

.upload-text {
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 1.1rem;
}

.upload-subtext {
    font-size: 0.9rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

.upload-formats {
    font-size: 0.8rem;
    color: #999;
    margin-top: 10px;
}

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

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: all 0.3s ease;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.gallery-actions .btn {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    opacity: 0.9;
}

.gallery-actions .btn:hover {
    opacity: 1;
    transform: scale(1.05);
}

.gallery-info {
    color: #fff;
    align-self: flex-end;
}

.gallery-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.gallery-meta {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Chart Container */
#servicesChart {
    max-height: 300px;
}

/* Custom Scrollbar */
.activity-list::-webkit-scrollbar {
    width: 6px;
}

.activity-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.activity-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.activity-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.user-select-none {
    user-select: none;
}

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

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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