/* ==============================================
   GALORINA VENDORS - NATIVE APP STYLE
   Versión: 3.0 - Diseño tipo aplicación nativa
   ============================================== */

/* ----- Fuentes y variables ----- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Colores principales */
    --primary: #045CB4;
    --primary-dark: #034a91;
    --primary-light: #e6f0ff;
    --primary-soft: rgba(4, 92, 180, 0.05);
    
    --secondary: #61CE70;
    --secondary-dark: #4fb85e;
    --secondary-light: #e8f5e9;
    
    /* Fondos y superficies */
    --bg-dark: #0a0f1c;
    --bg-card: #ffffff;
    --bg-sidebar: #f8fafd;
    --bg-hover: #f1f5f9;
    
    /* Textos */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --text-light: #ffffff;
    
    /* Bordes y sombras */
    --border-light: rgba(0, 0, 0, 0.05);
    --border-medium: rgba(0, 0, 0, 0.08);
    
    /* Sombras profesionales */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    
    /* Radios */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Espaciados */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 24px;
    --space-3xl: 32px;
    
    /* Transiciones */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- Reset y base ----- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==============================================
   DASHBOARD PRINCIPAL - ESTRUCTURA DE APP
   ============================================== */

.galorina-dashboard {
    display: flex;
    min-height: 100vh;
    background: var(--bg-dark);
    position: relative;
}

/* ----- SIDEBAR - Barra lateral tipo app nativa ----- */
.dashboard-sidebar {
    width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 50;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    transition: transform var(--transition-smooth);
}

.sidebar-header {
    padding: var(--space-2xl) var(--space-xl);
    border-bottom: 1px solid var(--border-light);
}

.sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.sidebar-header p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: var(--space-xs);
}

/* Perfil del vendedor en sidebar */
.vendor-profile-sidebar {
    padding: var(--space-xl);
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.vendor-avatar-lg {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-md);
    position: relative;
}

.vendor-avatar-lg img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--primary-light);
    box-shadow: var(--shadow-md);
}

.vendor-status {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    background: var(--secondary);
    border: 2px solid var(--white);
    border-radius: var(--radius-full);
}

.vendor-profile-sidebar h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.vendor-profile-sidebar .vendor-plan-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    letter-spacing: 0.3px;
}

/* Navegación tipo app */
.sidebar-nav {
    flex: 1;
    padding: var(--space-xl) var(--space-md);
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: var(--space-xs);
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.sidebar-nav a i {
    width: 20px;
    font-size: 1.1rem;
    color: var(--text-tertiary);
    transition: color var(--transition-base);
}

.sidebar-nav a:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.sidebar-nav a:hover i {
    color: var(--primary);
}

.sidebar-nav a.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-nav a.active i {
    color: var(--primary);
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

/* Contador en navegación */
.nav-count {
    margin-left: auto;
    background: var(--bg-hover);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}

.sidebar-nav a.active .nav-count {
    background: var(--primary);
    color: var(--white);
}

/* Sidebar footer */
.sidebar-footer {
    padding: var(--space-xl);
    border-top: 1px solid var(--border-light);
}

.vendor-stats-mini {
    display: flex;
    justify-content: space-around;
    margin-bottom: var(--space-lg);
}

.stat-mini-item {
    text-align: center;
}

.stat-mini-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-mini-label {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-hover);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-base);
}

.logout-btn:hover {
    background: #fee9e7;
    color: #ef4444;
}

.logout-btn:hover i {
    color: #ef4444;
}

/* ----- MAIN CONTENT - Área principal ----- */
.dashboard-main {
    flex: 1;
    margin-left: 280px;
    padding: var(--space-2xl);
    background: var(--bg-dark);
    min-height: 100vh;
}

/* Header del contenido */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2xl);
}

.header-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--white);
    margin: 0;
}

.header-title p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: var(--space-xs);
}

.header-actions {
    display: flex;
    gap: var(--space-md);
}

/* Botones de acción tipo app */
.header-action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--white);
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
}

.header-action-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background: var(--secondary);
    color: var(--white);
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-dark);
}

/* ==============================================
   TARJETAS DE ESTADÍSTICAS - MODERNAS
   ============================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-3xl);
}

.stat-card-modern {
    background: var(--bg-card);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.stat-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.stat-card-modern:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-soft);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.75rem;
    transition: all var(--transition-base);
}

.stat-card-modern:hover .stat-icon {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.05);
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    margin-bottom: var(--space-xs);
    font-weight: 600;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: var(--space-xs);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.trend-up {
    color: var(--secondary);
}

.trend-down {
    color: #ef4444;
}

/* ==============================================
   SECCIONES DEL DASHBOARD
   ============================================== */

.dashboard-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    margin-bottom: var(--space-2xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.section-header h2 i {
    color: var(--primary);
    font-size: 1.3rem;
}

.view-all-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    transition: gap var(--transition-base);
}

.view-all-link:hover {
    gap: var(--space-md);
}

/* ==============================================
   TABLA DE PRODUCTOS - ESTILO APP
   ============================================== */

.products-table-app {
    width: 100%;
    border-collapse: collapse;
}

.products-table-app th {
    text-align: left;
    padding: var(--space-md) var(--space-lg);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--border-light);
}

.products-table-app td {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.products-table-app tr:hover td {
    background: var(--bg-hover);
}

.product-info-cell {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.product-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-hover);
}

.product-name {
    font-weight: 600;
    color: var(--text-primary);
}

.product-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* Badges de estado */
.status-badge-app {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.status-badge-app.published {
    background: var(--secondary-light);
    color: var(--secondary-dark);
}

.status-badge-app.draft {
    background: #fff7e6;
    color: #b45309;
}

/* Botones de acción tipo app */
.action-buttons-app {
    display: flex;
    gap: var(--space-xs);
}

.action-btn-app {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.action-btn-app:hover {
    background: var(--bg-hover);
    color: var(--primary);
    transform: translateY(-1px);
}

.action-btn-app.edit:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.action-btn-app.delete:hover {
    background: #fee9e7;
    color: #ef4444;
}

.action-btn-app.view:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ==============================================
   FORMULARIO DE PRODUCTO - ESTILO APP
   ============================================== */

.form-container-app {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
}

.form-group-app {
    margin-bottom: var(--space-xl);
}

.form-group-app.full-width {
    grid-column: span 2;
}

.form-group-app label {
    display: block;
    margin-bottom: var(--space-sm);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-secondary);
}

.form-group-app label i {
    margin-right: var(--space-xs);
    color: var(--primary);
    font-size: 0.9rem;
}

.form-control-app {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-hover);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all var(--transition-base);
    font-family: 'Inter', sans-serif;
}

.form-control-app:focus {
    outline: none;
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control-app:hover {
    background: var(--white);
}

/* Select personalizado */
.select-app {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-md) center;
    padding-right: var(--space-3xl);
}

/* File input personalizado */
.file-input-app {
    position: relative;
    border: 2px dashed var(--border-medium);
    background: var(--bg-hover);
    padding: var(--space-xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    border-radius: var(--radius-md);
}

.file-input-app:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-input-app input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-input-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.file-input-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Image preview */
.image-preview-app {
    margin-top: var(--space-md);
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--border-light);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.preview-remove:hover {
    background: #ef4444;
}

/* ==============================================
   TARJETAS DE PLANES - TIPO APP
   ============================================== */

.plans-grid-app {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-2xl);
    padding: var(--space-xl);
}

.plan-card-app {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    position: relative;
    transition: all var(--transition-smooth);
    overflow: hidden;
}

.plan-card-app:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.plan-card-app.recommended {
    border: 2px solid var(--primary);
    background: linear-gradient(135deg, var(--white) 0%, var(--primary-light) 100%);
}

.recommended-tag {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    background: var(--primary);
    color: var(--white);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-sm);
}

.plan-header-app {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.plan-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-soft);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    color: var(--primary);
    font-size: 2rem;
    transition: all var(--transition-base);
}

.plan-card-app:hover .plan-icon {
    background: var(--primary);
    color: var(--white);
    transform: rotate(5deg) scale(1.1);
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

.plan-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-tertiary);
}

.plan-features-app {
    list-style: none;
    margin: var(--space-xl) 0;
}

.plan-features-app li {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.plan-features-app li i {
    color: var(--secondary);
    font-size: 1rem;
    width: 20px;
}

.plan-button-app {
    display: block;
    width: 100%;
    padding: var(--space-md);
    background: var(--primary-soft);
    color: var(--primary);
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    cursor: pointer;
}

.plan-button-app:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==============================================
   MODAL DE CONTACTO - TIPO APP
   ============================================== */

.modal-app {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content-app {
    background: var(--bg-card);
    width: 90%;
    max-width: 480px;
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-xl);
    transform: translateY(0);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header-app {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.modal-header-app h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.modal-close {
    width: 32px;
    height: 32px;
    background: var(--bg-hover);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: #fee9e7;
    color: #ef4444;
    transform: rotate(90deg);
}

/* ==============================================
   RESPONSIVE - MÓVIL (MENÚ HAMBURGUESA)
   ============================================== */

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: var(--space-lg);
    left: var(--space-lg);
    z-index: 100;
    width: 44px;
    height: 44px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    align-items: center;
    justify-content: center;
}

@media (max-width: 1024px) {
    .dashboard-sidebar {
        transform: translateX(-100%);
    }
    
    .dashboard-sidebar.active {
        transform: translateX(0);
    }
    
    .dashboard-main {
        margin-left: 0;
        padding: var(--space-xl);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group-app.full-width {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .products-table-app {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .dashboard-main {
        padding: var(--space-lg);
    }
    
    .header-title h1 {
        font-size: 1.5rem;
    }
    
    .form-container-app {
        padding: var(--space-xl);
    }
    
    .plans-grid-app {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stat-card-modern {
        padding: var(--space-lg);
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
    
    .action-buttons-app {
        flex-wrap: wrap;
    }
}

/* ==============================================
   UTILIDADES Y ANIMACIONES
   ============================================== */

/* Loading spinner */
.spinner-app {
    width: 40px;
    height: 40px;
    border: 3px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-hover) 25%,
        var(--border-light) 50%,
        var(--bg-hover) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

/* Tooltips modernos */
.tooltip-app {
    position: relative;
}

.tooltip-app:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-xs) var(--space-sm);
    background: var(--text-primary);
    color: var(--white);
    font-size: 0.7rem;
    border-radius: var(--radius-xs);
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: var(--space-xs);
    box-shadow: var(--shadow-md);
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-hover);
}

::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}