:root {
    --primary: #4361ee;
    --primary-dark: #3a0ca3;
    --primary-light: #4895ef;
    --secondary: #7209b7;
    --success: #4cc9f0;
    --warning: #f8961e;
    --danger: #f72585;
    --dark: #212529;
    --light: #f8f9fa;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --gray-dark: #495057;
    
    --sidebar-width: 260px;
    --sidebar-collapsed: 80px;
    --header-height: 70px;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fb;
    color: var(--dark);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--dark), #1a1a2e);
    color: white;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.store-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.store-logo {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.store-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.store-status {
    font-size: 0.8rem;
    opacity: 0.8;
}

.store-status.active {
    color: var(--success);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
}

.nav-item {
    margin: 0.25rem 1rem;
}

.nav-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-item a:hover,
.nav-item.active a {
    background: rgba(67, 97, 238, 0.2);
    color: white;
}

.nav-item i {
    font-size: 1.2rem;
    width: 24px;
    margin-right: 1rem;
}

.badge {
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    position: absolute;
    right: 1rem;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info span:first-child {
    font-weight: 600;
}

.user-info span:last-child {
    font-size: 0.8rem;
    opacity: 0.8;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

.main-header {
    height: var(--header-height);
    background: white;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left h1 {
    font-size: 1.8rem;
    color: var(--dark);
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--gray);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-notification {
    position: relative;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-notification:hover {
    background: var(--gray-light);
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-add:hover {
    background: var(--primary-dark);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

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

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-icon.sales {
    background: linear-gradient(135deg, #4cc9f0, #4895ef);
    color: white;
}

.stat-icon.orders {
    background: linear-gradient(135deg, #7209b7, #b5179e);
    color: white;
}

.stat-icon.products {
    background: linear-gradient(135deg, #f8961e, #f3722c);
    color: white;
}

.stat-icon.customers {
    background: linear-gradient(135deg, #43aa8b, #90be6d);
    color: white;
}

.stat-info h3 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

.stat-trend {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    margin-left: auto;
}

.stat-trend.positive {
    background: rgba(76, 201, 240, 0.2);
    color: var(--success);
}

.stat-trend.negative {
    background: rgba(247, 37, 133, 0.2);
    color: var(--danger);
}

.stat-trend.neutral {
    background: rgba(108, 117, 125, 0.2);
    color: var(--gray);
}

/* Charts Row */
.charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    padding: 0 2rem 2rem;
}

.chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

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

.chart-header h3 {
    font-size: 1.2rem;
}

.chart-header select {
    padding: 0.5rem;
    border: 1px solid var(--gray-light);
    border-radius: 5px;
    background: white;
    color: var(--dark);
}

/* Content Row */
.content-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    padding: 0 2rem 2rem;
}

.content-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

.card-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 1.2rem;
}

.btn-view-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

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

.orders-table thead {
    background: var(--gray-light);
}

.orders-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-dark);
    font-size: 0.9rem;
}

.orders-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-light);
}

.order-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending {
    background: rgba(248, 150, 30, 0.2);
    color: var(--warning);
}

.status-processing {
    background: rgba(67, 97, 238, 0.2);
    color: var(--primary);
}

.status-shipped {
    background: rgba(67, 170, 139, 0.2);
    color: #43aa8b;
}

.status-delivered {
    background: rgba(144, 190, 109, 0.2);
    color: #90be6d;
}

.status-cancelled {
    background: rgba(247, 37, 133, 0.2);
    color: var(--danger);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-action {
    background: var(--light);
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.quick-action:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.quick-action i {
    font-size: 1.5rem;
}

.quick-action span {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Activity Feed */
.activity-feed h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--light);
    border-radius: 8px;
}

.activity-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.activity-content p {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Performance Metrics */
.performance-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.metric-label {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Notifications Panel */
.notifications-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.notifications-panel.open {
    right: 0;
}

.notifications-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h3 {
    font-size: 1.2rem;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: var(--transition);
}

.btn-close:hover {
    background: var(--gray-light);
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.notification-item {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    background: var(--light);
    cursor: pointer;
    transition: var(--transition);
}

.notification-item.unread {
    background: rgba(67, 97, 238, 0.1);
    border-left: 3px solid var(--primary);
}

.notification-item:hover {
    background: var(--gray-light);
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.notification-time {
    font-size: 0.8rem;
    color: var(--gray);
}

.notifications-footer {
    padding: 1rem;
    border-top: 1px solid var(--gray-light);
    text-align: center;
}

.btn-mark-read {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.btn-mark-read:hover {
    background: var(--primary-dark);
}

/* Top Products */
.top-products {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.top-product-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--light);
    border-radius: 8px;
}

.product-rank {
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.product-sales {
    font-size: 0.9rem;
    color: var(--gray);
}



.nav-item.nodisponible a {
    pointer-events: none;     /* bloquea el click */
    opacity: 0.5;             /* efecto deshabilitado */
    cursor: not-allowed;
    color: #999;
}

.nav-item.nodisponible i {
    color: #999;
}





















/* Responsive Design */
@media (max-width: 1200px) {
    .charts-row,
    .content-row {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        width: var(--sidebar-collapsed);
    }
    
    .main-content {
        margin-left: var(--sidebar-collapsed);
    }
    
    .store-details,
    .nav-item span,
    .user-info {
        display: none;
    }
    
    .nav-item a {
        justify-content: center;
        padding: 1rem;
    }
    
    .nav-item i {
        margin-right: 0;
    }
    
    .badge {
        right: 0.5rem;
        top: 0.5rem;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-header {
        padding: 0 1rem;
    }
    
    .charts-row,
    .content-row,
    .stats-grid {
        padding: 1rem;
    }
    
    .notifications-panel {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    .performance-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}