/* Michi Inventario - Tema Neumórfico Sofisticado */
:root {
    /* Colores principales */
    --primary-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-bg: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-bg: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    
    /* Colores de superficie */
    --surface-light: #ffffff;
    --surface-dark: #f8f9fa;
    --surface-elevated: #ffffff;
    
    /* Colores de texto */
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-white: #ffffff;
    
    /* Colores de acento */
    --accent-purple: #805ad5;
    --accent-green: #38a169;
    --accent-blue: #3182ce;
    --accent-pink: #e53e3e;
    
    /* Sombras neumórficas */
    --shadow-soft: 8px 8px 16px rgba(0, 0, 0, 0.1), -8px -8px 16px rgba(255, 255, 255, 0.8);
    --shadow-inset: inset 8px 8px 16px rgba(0, 0, 0, 0.1), inset -8px -8px 16px rgba(255, 255, 255, 0.8);
    --shadow-hover: 12px 12px 24px rgba(0, 0, 0, 0.15), -12px -12px 24px rgba(255, 255, 255, 0.9);
    
    /* Bordes */
    --border-radius: 20px;
    --border-radius-small: 12px;
    --border-radius-large: 24px;
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Contenedor principal */
.main-container {
    display: grid;
   
    min-height: 100vh;
    background: var(--primary-bg);
}

/* Sidebar neumórfico */
.sidebar {
    background: var(--surface-light);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    gap: 2rem;
    position: relative;
    z-index: 10;
}

.sidebar-item {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface-light);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
    color: var(--text-secondary);
}

.sidebar-item .tooltiptext {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 1rem;
    white-space: nowrap;
    z-index: 1000;
}

.sidebar-item .tooltiptext::after {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-color: transparent #2d3748 transparent transparent;
}

.sidebar-item:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.sidebar-item.active {
    background: var(--accent-purple);
    color: var(--text-white);
    box-shadow: var(--shadow-inset);
}

.sidebar-item .notification {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background: var(--accent-pink);
    border-radius: 50%;
    border: 2px solid var(--surface-light);
}

/* Contenido principal */
.main-content {
    padding: 2rem;
    background: var(--primary-bg);
    overflow-y: auto;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface-light);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.user-info .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.user-info .btn:hover {
    box-shadow: none;
    transform: none;
}

/* Tarjetas neumórficas */
.card {
    background: var(--surface-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-purple);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Métricas */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--surface-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-purple);
}

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--surface-light);
    color: var(--accent-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border: 2px solid var(--accent-purple);
}

.metric-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.metric-content p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.metric-change {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.metric-change.positive {
    color: var(--accent-green);
}

.metric-change.negative {
    color: var(--accent-pink);
}

/* Gráficos */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: var(--surface-light);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
}

.chart-control {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius-small);
    background: var(--surface-light);
    box-shadow: var(--shadow-inset);
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-control:hover {
    background: var(--accent-purple);
    color: var(--text-white);
}

.chart-control.active {
    background: var(--accent-purple);
    color: var(--text-white);
    box-shadow: var(--shadow-inset);
}

/* Botones neumórficos */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    background: var(--surface-light);
    box-shadow: var(--shadow-soft);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

/* Eliminar decoración de enlaces */
a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
    color: inherit;
}

.btn:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.btn:active {
    box-shadow: var(--shadow-inset);
    transform: translateY(0);
}

.btn-primary {
    background: var(--accent-purple);
    color: var(--text-white);
}

.btn-success {
    background: var(--accent-green);
    color: var(--text-white);
}

.btn-danger {
    background: var(--accent-pink);
    color: var(--text-white);
}

/* Botones principales con colores pasteles claros */
.btn-vender {
    background: linear-gradient(135deg, #a7f3d0 0%, #86efac 100%);
    color: #064e3b;
    border: none;
    box-shadow: 0 4px 8px rgba(167, 243, 208, 0.3);
}

.btn-vender:hover {
    background: linear-gradient(135deg, #86efac 0%, #6ee7b7 100%);
    color: #064e3b;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(167, 243, 208, 0.4);
}

.btn-agregar {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
    color: #1e3a8a;
    border: none;
    box-shadow: 0 4px 8px rgba(191, 219, 254, 0.3);
}

.btn-agregar:hover {
    background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);
    color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(191, 219, 254, 0.4);
}

.btn-inventario {
    background: linear-gradient(135deg, #e9d5ff 0%, #d8b4fe 100%);
    color: #581c87;
    border: none;
    box-shadow: 0 4px 8px rgba(233, 213, 255, 0.3);
}

.btn-inventario:hover {
    background: linear-gradient(135deg, #d8b4fe 0%, #c084fc 100%);
    color: #581c87;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(233, 213, 255, 0.4);
}

.btn-reportes {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    color: #991b1b;
    border: none;
    box-shadow: 0 4px 8px rgba(254, 202, 202, 0.3);
}

.btn-reportes:hover {
    background: linear-gradient(135deg, #fca5a5 0%, #f87171 100%);
    color: #991b1b;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(254, 202, 202, 0.4);
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #2d3748;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 8px 12px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #2d3748 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Formularios neumórficos */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--border-radius-small);
    background: var(--surface-light);
    box-shadow: var(--shadow-inset);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    box-shadow: var(--shadow-inset), 0 0 0 3px rgba(128, 90, 213, 0.1);
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--border-radius-small);
    background: var(--surface-light);
    box-shadow: var(--shadow-inset);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-select:focus {
    outline: none;
    box-shadow: var(--shadow-inset), 0 0 0 3px rgba(128, 90, 213, 0.1);
}

/* Tablas neumórficas */
.table-container {
    background: var(--surface-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: var(--surface-dark);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
}

.table tr:hover {
    background: rgba(128, 90, 213, 0.05);
}

/* Modales neumórficos */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal {
    background: var(--surface-light);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-hover);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--surface-light);
    box-shadow: var(--shadow-soft);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--accent-pink);
    color: var(--text-white);
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 1rem;
        max-width: 100%;
        margin: 0;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.5rem;
    }
    
    .dashboard-header {
        padding: 1rem;
    }
    
    .user-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Utilidades */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.z-1000 { z-index: 1000; }
