/* ========================================
   Admin Styles
   ======================================== */

.admin-header {
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--secondary-color) 100%);
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-main {
    padding: 2rem 0;
    min-height: calc(100vh - 100px);
    background: #f5f5f5;
}

/* Stats Cards */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.2);
}

.stat-card i {
    font-size: 3rem;
    color: var(--primary-color);
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

.stat-card p {
    margin: 0;
    color: #666;
    font-size: 1rem;
}

/* Actions */
.admin-actions {
    margin-bottom: 2rem;
}

/* Admin Section */
.admin-section {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.admin-section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-section-title i {
    color: var(--primary-color);
}

/* Table */
.table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: var(--dark-color);
    color: var(--primary-color);
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    font-weight: 600;
    white-space: nowrap;
}

.admin-table tbody tr {
    transition: var(--transition);
}

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

.admin-table .loading-row {
    text-align: center;
    padding: 3rem;
    color: var(--secondary-color);
}

.admin-table .empty-row {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.product-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.category-fille {
    background: #ffc0cb;
    color: #8b0000;
}

.category-garcon {
    background: #add8e6;
    color: #00008b;
}

.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.stock-good {
    background: #d4edda;
    color: #155724;
}

.stock-low {
    background: #fff3cd;
    color: #856404;
}

.stock-out {
    background: #f8d7da;
    color: #721c24;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.action-btns {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
    border-radius: 8px;
}

.icon-btn:hover {
    background: #f0f0f0;
}

.icon-btn.edit {
    color: #007bff;
}

.icon-btn.delete {
    color: #dc3545;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-content.large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--dark-color);
    color: var(--primary-color);
}

.modal-header h2 {
    font-family: var(--font-heading);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group.checkbox-group {
    flex-direction: row;
    align-items: center;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: var(--primary-color);
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

.form-group small {
    color: #666;
    font-size: 0.85rem;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-group span {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
}

/* Notifications */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 4000;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 500;
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #dc3545;
}

.notification.info {
    background: #17a2b8;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group {
        grid-column: 1 / -1 !important;
    }
    
    .table-container {
        overflow-x: scroll;
    }
    
    .admin-table {
        min-width: 800px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .action-btns {
        flex-direction: column;
    }
}
