/* Admin Panel Styles */

#wrapper {
    min-height: 100vh;
}

#sidebar-wrapper {
    min-width: 250px;
    max-width: 250px;
    transition: margin 0.25s ease-out;
}

#sidebar-wrapper .sidebar-heading {
    padding: 0.875rem 1.25rem;
    font-size: 1.2rem;
}

#sidebar-wrapper .list-group-item {
    border: none;
    border-radius: 0;
    padding: 1rem 1.5rem;
    transition: all 0.3s;
}

#sidebar-wrapper .list-group-item:hover {
    background-color: #f8f9fa;
    padding-left: 2rem;
}

#sidebar-wrapper .list-group-item.active {
    background-color: var(--primary-color);
    color: white;
}

#sidebar-wrapper .list-group-item.active i {
    color: white;
}

#page-content-wrapper {
    min-width: 0;
    width: 100%;
}

/* Sidebar Toggle */
#wrapper.toggled #sidebar-wrapper {
    margin-left: -250px;
}

/* Dashboard Cards */
.dashboard-card {
    border-left: 4px solid;
    transition: transform 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dashboard-card.sales {
    border-left-color: #28a745;
}

.dashboard-card.orders {
    border-left-color: #007bff;
}

.dashboard-card.products {
    border-left-color: #6a4c93;
}

.dashboard-card.customers {
    border-left-color: #ffc107;
}

.dashboard-card .card-icon {
    font-size: 2.5rem;
    opacity: 0.3;
    position: absolute;
    right: 20px;
    top: 20px;
}

/* Table Styles */
.admin-table {
    background: white;
}

.admin-table th {
    background-color: var(--background-light);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.admin-table td {
    vertical-align: middle;
}

.product-thumbnail-table {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

/* Action Buttons */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Form Styles */
.admin-form-section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.admin-form-section h4 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--background-light);
}

/* Image Upload Preview */
.image-upload-preview {
    max-width: 200px;
    max-height: 200px;
    margin-top: 1rem;
}

.image-gallery-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.image-gallery-item {
    position: relative;
    width: 100px;
    height: 100px;
}

.image-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.image-gallery-item .remove-image {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #dc3545;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Status Badges */
.badge-status {
    padding: 0.5rem 0.75rem;
    font-weight: 500;
}

/* Low Stock Warning */
.low-stock-warning {
    color: #dc3545;
    font-weight: 600;
}

.out-of-stock-warning {
    color: #721c24;
    font-weight: 700;
}

/* Search and Filter Bar */
.admin-search-bar {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Quick Stats */
.quick-stat {
    text-align: center;
    padding: 1rem;
}

.quick-stat .stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

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

/* Recent Activity */
.activity-item {
    padding: 1rem;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 1rem;
    background: #f8f9fa;
}

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

/* Responsive */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: -250px;
    }
    
    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }
    
    .admin-form-section {
        padding: 1rem;
    }
}

/* Loading State */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

/* Data Tables Enhancement */
.table-actions {
    white-space: nowrap;
}

.table-actions .btn {
    margin: 0 2px;
}

/* Drag and Drop Area */
.drag-drop-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s;
}

.drag-drop-area:hover {
    border-color: var(--primary-color);
    background: #e9ecef;
}

.drag-drop-area.dragover {
    border-color: var(--accent-color);
    background: #fff3cd;
}
