/**
 * Panel Admin PrestaShop + ARCA
 * Estilos principales
 */

/* Variables */
:root {
    --sidebar-width: 260px;
    --sidebar-bg: #1a1a2e;
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

/* Layout */
#wrapper {
    min-height: 100vh;
}

#sidebar-wrapper {
    width: var(--sidebar-width);
    min-height: 100vh;
    transition: margin 0.25s ease-out;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
}

#sidebar-wrapper .sidebar-heading {
    font-size: 1rem;
    font-weight: 600;
}

#sidebar-wrapper .list-group-item {
    border: none;
    padding: 0.75rem 1.25rem;
    transition: all 0.2s;
}

#sidebar-wrapper .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

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

#sidebar-wrapper .list-group-item i {
    width: 20px;
}

#sidebar-wrapper .sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
}

#page-content-wrapper {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Toggled state */
#wrapper.toggled #sidebar-wrapper {
    margin-left: calc(-1 * var(--sidebar-width));
}

#wrapper.toggled #page-content-wrapper {
    width: 100%;
    margin-left: 0;
}

/* Stat Cards */
.stat-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

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

.stat-card h2 {
    font-size: 2rem;
    font-weight: 700;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1rem 1.25rem;
}

.card-header h5, .card-header h6 {
    margin: 0;
}

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

.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

.table td {
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

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

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
}

.btn-group-sm > .btn, .btn-sm {
    border-radius: 6px;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border-color: #dee2e6;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: #495057;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 16px;
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* Pagination */
.pagination {
    gap: 4px;
}

.page-link {
    border-radius: 8px !important;
    border: none;
    color: #495057;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Utility Classes */
.bg-gradient-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #ffc107 0%, #d9a406 100%);
}

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

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Responsive */
@media (max-width: 991.98px) {
    #sidebar-wrapper {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    #page-content-wrapper {
        width: 100%;
        margin-left: 0;
    }
    
    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }
    
    #wrapper.toggled #page-content-wrapper {
        margin-left: var(--sidebar-width);
    }
}

/* Print Styles */
@media print {
    #sidebar-wrapper,
    .navbar,
    .btn,
    .alert {
        display: none !important;
    }
    
    #page-content-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

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

/* Code */
code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.875em;
}

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

/* Empty State */
.empty-state {
    padding: 3rem;
    text-align: center;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}
