/* Estilos para el panel de administración */

/* Sidebar */
.sidebar {
    min-height: calc(100vh - 56px);
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 0;
}

.sidebar-sticky {
    position: sticky;
    top: 0;
    height: calc(100vh - 56px);
    overflow-y: auto;
}

.sidebar .nav-link {
    color: #bdc3c7;
    padding: 0.75rem 1.5rem;
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.1);
    border-left-color: var(--primary-color);
}

.sidebar .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
    border-left-color: var(--primary-color);
    font-weight: 500;
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

/* Stats cards */
.stat-card {
    border-radius: 10px;
    border: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

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

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

/* Tables */
.admin-table th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: var(--dark-color);
}

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

.table-actions {
    white-space: nowrap;
}

/* Forms */
.admin-form .form-label {
    font-weight: 500;
    color: var(--dark-color);
}

.admin-form .form-control,
.admin-form .form-select {
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 0.5rem 0.75rem;
}

.admin-form .form-control:focus,
.admin-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(71, 138, 201, 0.25);
}

/* Image preview */
.image-preview-container {
    border: 2px dashed #dee2e6;
    border-radius: 5px;
    padding: 1rem;
    text-align: center;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 5px;
}

/* Badges */
.badge-admin {
    padding: 0.4rem 0.8rem;
    font-weight: 500;
    border-radius: 20px;
}

/* Modal */
.admin-modal .modal-header {
    background: var(--primary-color);
    color: white;
    border-bottom: none;
}

.admin-modal .modal-title {
    font-weight: 500;
}

/* Buttons */
.btn-admin {
    border-radius: 5px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    border: none;
    transition: all 0.3s ease;
}

.btn-admin-primary {
    background: var(--primary-color);
    color: white;
}

.btn-admin-primary:hover {
    background: #3a74a9;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(71, 138, 201, 0.3);
}

.btn-admin-secondary {
    background: #6c757d;
    color: white;
}

.btn-admin-secondary:hover {
    background: #5a6268;
    color: white;
}

/* Alerts */
.alert-admin {
    border-radius: 5px;
    border: none;
    padding: 1rem 1.5rem;
}

/* Dashboard widgets */
.widget {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border-left: 4px solid var(--primary-color);
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.widget-title {
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

/* Quick actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.quick-action-btn:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
    transform: translateY(-3px);
    color: var(--primary-color);
    text-decoration: none;
}

.quick-action-btn i {
    font-size: 1.5rem;
    margin-right: 0.75rem;
}

/* Responsive admin */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        margin-bottom: 1rem;
    }
    
    .sidebar-sticky {
        height: auto;
        position: static;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

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

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

/* File upload */
.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.file-upload-area i {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Sortable table */
.sortable-handle {
    cursor: move;
    color: #6c757d;
}

.sortable-handle:hover {
    color: var(--primary-color);
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Tooltips */
.tooltip-inner {
    max-width: 200px;
    padding: 0.5rem 0.75rem;
    background: var(--dark-color);
    border-radius: 5px;
    font-size: 0.875rem;
}