/* ============================================
   APP-STYLE - SISTEMA DE DISEÑO PROFESIONAL
   Tipo: Aplicación Móvil Profesional
   Mobile First → Tablet → Desktop
   ============================================ */

/* === 1. RESET Y VARIABLES === */

:root {
    /* Espaciado base (sistema de 4px) */
    --spacing-xs: 0.25rem;    /* 4px */
    --spacing-sm: 0.5rem;     /* 8px */
    --spacing-md: 1rem;       /* 16px */
    --spacing-lg: 1.5rem;     /* 24px */
    --spacing-xl: 2rem;       /* 32px */
    --spacing-2xl: 3rem;      /* 48px */
    
    /* Bordes redondeados */
    --radius-sm: 0.5rem;      /* 8px */
    --radius-md: 0.75rem;     /* 12px */
    --radius-lg: 1rem;        /* 16px */
    --radius-xl: 1.5rem;      /* 24px */
    --radius-2xl: 2rem;       /* 32px */
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Z-index */
    --z-base: 0;
    --z-card: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-nav-bottom: 400;
    --z-modal-backdrop: 500;
    --z-modal: 600;
    --z-toast: 700;
    
    /* Transiciones */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* === 2. TIPOGRAFÍA FLUIDA === */

html {
    /* Base móvil: 14px */
    font-size: clamp(14px, 1.5vw, 16px);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings fluidos */
h1, .text-4xl, .text-5xl {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h2, .text-3xl {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
}

h3, .text-2xl {
    font-size: clamp(1.25rem, 3vw, 1.875rem);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
}

h4, .text-xl {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 600;
    line-height: 1.4;
}

p, .text-base {
    font-size: clamp(0.875rem, 2vw, 1rem);
    line-height: 1.6;
}

.text-sm {
    font-size: clamp(0.8125rem, 1.8vw, 0.875rem);
}

.text-xs {
    font-size: clamp(0.75rem, 1.5vw, 0.8125rem);
}

/* === 3. ICONOS ADAPTATIVOS === */

/* Iconos base */
i.fas,
i.far,
i.fab {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Iconos en botones */
button i,
a i {
    font-size: clamp(0.875rem, 2vw, 1rem);
}

/* Iconos grandes (decorativos) */
.icon-lg {
    font-size: clamp(2rem, 5vw, 3rem) !important;
}

.icon-xl {
    font-size: clamp(3rem, 7vw, 4rem) !important;
}

/* Iconos en navegación */
nav i {
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    width: clamp(1.5rem, 3vw, 2rem);
    height: clamp(1.5rem, 3vw, 2rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === 4. CARDS Y CONTENEDORES === */

/* Card base */
.card {
    background: rgb(var(--bg-elevated));
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Card compacta (móvil) */
.card-compact {
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
}

/* Card sin hover */
.card-static {
    background: rgb(var(--bg-elevated));
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

/* Card header */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .card-header {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

/* Card body */
.card-body {
    padding: var(--spacing-md) 0;
}

/* Card footer */
.card-footer {
    display: flex;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-md);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .card-footer {
    border-top-color: rgba(255, 255, 255, 0.05);
}

/* === 5. NAVEGACIÓN INFERIOR (BOTTOM NAV) === */

/* Contenedor principal */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgb(var(--bg-elevated));
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: var(--spacing-sm) var(--spacing-md) calc(var(--spacing-sm) + env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: var(--z-nav-bottom);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dark .bottom-nav {
    border-top-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

/* Botón de navegación */
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    color: rgb(var(--text-secondary));
    text-decoration: none;
    min-width: 60px;
    position: relative;
}

.bottom-nav-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.dark .bottom-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Botón activo */
.bottom-nav-item.active {
    color: var(--brand-primary);
    background: rgba(10, 77, 140, 0.1);
}

.dark .bottom-nav-item.active {
    color: var(--brand-primary);
    background: rgba(10, 77, 140, 0.2);
}

/* Icono de navegación */
.bottom-nav-item i {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    transition: all var(--transition-fast);
}

.bottom-nav-item.active i {
    transform: scale(1.1);
}

/* Label de navegación */
.bottom-nav-label {
    font-size: clamp(0.625rem, 1.5vw, 0.75rem);
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

/* Badge de notificación */
.bottom-nav-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    background: #EF4444;
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    min-width: 1rem;
    text-align: center;
}

/* Espaciado inferior para contenido (para evitar que quede detrás del nav) */
.content-with-bottom-nav {
    padding-bottom: calc(4rem + env(safe-area-inset-bottom));
}

/* === 6. LAYOUT PRINCIPAL === */

/* Contenedor app */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: rgb(var(--bg-base));
}

/* Header de la app */
.app-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: rgb(var(--bg-elevated));
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: var(--spacing-md);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dark .app-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Main content */
.app-content {
    flex: 1;
    padding: var(--spacing-md);
    max-width: 100%;
    margin: 0 auto;
}

/* === 7. GRID ADAPTATIVO === */

/* Grid base - 1 columna en móvil */
.grid-responsive {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

/* === 8. BOTONES === */

/* Botón base */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: clamp(0.625rem, 2vw, 0.875rem) clamp(1rem, 3vw, 1.5rem);
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 600;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.98);
}

/* Botón primario */
.btn-primary {
    background: var(--brand-primary);
    color: white;
}

.btn-primary:hover {
    background: #0d5aa7;
    box-shadow: var(--shadow-lg);
}

/* Botón secundario */
.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: rgb(var(--text-primary));
}

.dark .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
}

.dark .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Botón full-width móvil */
.btn-mobile-full {
    width: 100%;
}

/* === 9. TABLAS RESPONSIVAS === */

/* Contenedor de tabla */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Tabla base */
.table-responsive {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

.table-responsive thead {
    background: rgba(0, 0, 0, 0.02);
}

.dark .table-responsive thead {
    background: rgba(255, 255, 255, 0.02);
}

.table-responsive th,
.table-responsive td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .table-responsive th,
.dark .table-responsive td {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

/* === 10. FORMULARIOS === */

/* Input base */
.input {
    width: 100%;
    padding: clamp(0.625rem, 2vw, 0.875rem) var(--spacing-md);
    font-size: clamp(0.875rem, 2vw, 1rem);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    background: rgb(var(--bg-elevated));
    color: rgb(var(--text-primary));
    transition: all var(--transition-fast);
}

.dark .input {
    border-color: rgba(255, 255, 255, 0.1);
}

.input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(10, 77, 140, 0.1);
}

/* Label */
.label {
    display: block;
    font-size: clamp(0.8125rem, 1.8vw, 0.875rem);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: rgb(var(--text-primary));
}

/* === 11. LISTAS === */

/* Lista de items */
.list-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.list-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgb(var(--bg-elevated));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.list-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

/* === 12. BADGES === */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 10px;
    white-space: nowrap;
}

.badge-success {
    background: #10B981;
    color: white;
}

.badge-warning {
    background: #F59E0B;
    color: white;
}

.badge-danger {
    background: #EF4444;
    color: white;
}

.badge-info {
    background: #3B82F6;
    color: white;
}

/* === 13. ANIMACIONES === */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-slide-up {
    animation: slideUp var(--transition-base) ease-out;
}

.animate-fade-in {
    animation: fadeIn var(--transition-base) ease-out;
}

.animate-scale-in {
    animation: scaleIn var(--transition-base) ease-out;
}

/* === 14. UTILIDADES === */

/* Espaciado */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--spacing-xs) !important; }
.mb-2 { margin-bottom: var(--spacing-sm) !important; }
.mb-3 { margin-bottom: var(--spacing-md) !important; }
.mb-4 { margin-bottom: var(--spacing-lg) !important; }
.mb-5 { margin-bottom: var(--spacing-xl) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--spacing-xs) !important; }
.mt-2 { margin-top: var(--spacing-sm) !important; }
.mt-3 { margin-top: var(--spacing-md) !important; }
.mt-4 { margin-top: var(--spacing-lg) !important; }
.mt-5 { margin-top: var(--spacing-xl) !important; }

/* Padding */
.p-0 { padding: 0 !important; }
.p-1 { padding: var(--spacing-xs) !important; }
.p-2 { padding: var(--spacing-sm) !important; }
.p-3 { padding: var(--spacing-md) !important; }
.p-4 { padding: var(--spacing-lg) !important; }
.p-5 { padding: var(--spacing-xl) !important; }

/* Gap */
.gap-1 { gap: var(--spacing-xs) !important; }
.gap-2 { gap: var(--spacing-sm) !important; }
.gap-3 { gap: var(--spacing-md) !important; }
.gap-4 { gap: var(--spacing-lg) !important; }

/* Text align */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

/* Display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

/* Flex utilities */
.flex-column { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.align-center { align-items: center !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* === TABLET (768px+) === */
@media (min-width: 768px) {
    /* Contenedor más centrado */
    .app-content {
        max-width: 720px;
        padding: var(--spacing-lg);
    }
    
    /* Grid 2 columnas */
    .grid-responsive {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Botones inline */
    .btn-mobile-full {
        width: auto;
    }
    
    /* Navegación inferior oculta (sidebar visible) */
    .bottom-nav {
        display: none;
    }
    
    .content-with-bottom-nav {
        padding-bottom: 0;
    }
}

/* === DESKTOP (1024px+) === */
@media (min-width: 1024px) {
    html {
        font-size: 16px;
    }
    
    /* Contenedor más amplio */
    .app-content {
        max-width: 960px;
        padding: var(--spacing-xl);
    }
    
    /* Grid 3 columnas */
    .grid-responsive {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
    }
    
    /* Cards más espaciadas */
    .card {
        padding: var(--spacing-xl);
    }
}

/* === DESKTOP GRANDE (1280px+) === */
@media (min-width: 1280px) {
    .app-content {
        max-width: 1200px;
    }
    
    /* Grid 4 columnas */
    .grid-responsive.grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* === MOBILE (solo <768px) === */
@media (max-width: 767px) {
    /* Forzar navegación inferior en móvil */
    .bottom-nav {
        display: flex !important;
    }
    
    /* Tablas con scroll horizontal */
    .table-container {
        margin: 0 calc(var(--spacing-md) * -1);
        border-radius: 0;
    }
}

/* ============================================
   MODO OSCURO
   ============================================ */

.dark .card,
.dark .card-static {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

.dark .card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

/* ============================================
   ACCESIBILIDAD
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible para teclado */
*:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* ============================================
   DASHBOARD HORIZONTAL LAYOUT
   ============================================ */

/* Contenedor principal del dashboard */
.dashboard-container {
    width: 100%;
    max-width: 100%;
}

/* === TARJETAS DE ESTADÍSTICAS EN HORIZONTAL === */

.dashboard-stats-horizontal {
    display: flex;
    gap: clamp(0.75rem, 2vw, 1.25rem);
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.5rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Ocultar scrollbar pero mantener funcionalidad */
.dashboard-stats-horizontal::-webkit-scrollbar {
    height: 4px;
}

.dashboard-stats-horizontal::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-stats-horizontal::-webkit-scrollbar-thumb {
    background: rgba(var(--text-primary), 0.2);
    border-radius: 2px;
}

.dashboard-stats-horizontal::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--text-primary), 0.3);
}

/* Card individual de estadística */
.stat-card-horizontal {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1rem);
    background: rgb(var(--bg-card));
    border: 1px solid rgb(var(--border-card));
    border-radius: var(--radius-lg);
    padding: clamp(1rem, 3vw, 1.5rem);
    min-width: clamp(16rem, 30vw, 20rem);
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.stat-card-horizontal:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Icono de estadística */
.stat-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(2.5rem, 6vw, 3rem);
    height: clamp(2.5rem, 6vw, 3rem);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.stat-icon-wrapper i {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
}

/* Contenido de estadística */
.stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: clamp(0.625rem, 1.5vw, 0.75rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(var(--text-secondary));
}

.stat-number {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    line-height: 1;
    color: rgb(var(--text-primary));
}

.stat-description {
    font-size: clamp(0.75rem, 1.8vw, 0.875rem);
    color: rgb(var(--text-secondary));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* === SECCIONES DE CONTENIDO HORIZONTAL === */

.dashboard-sections-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 28rem), 1fr));
    gap: clamp(1rem, 2.5vw, 1.5rem);
}

/* Card de sección */
.dashboard-section-card {
    background: rgb(var(--bg-card));
    border: 1px solid rgb(var(--border-card));
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Header de sección */
.section-header-horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(1rem, 3vw, 1.5rem);
    border-bottom: 1px solid rgb(var(--border-card));
}

.section-title-wrapper {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1.5vw, 0.75rem);
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(2rem, 4vw, 2.5rem);
    height: clamp(2rem, 4vw, 2.5rem);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.section-icon i {
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.section-title {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 700;
    color: rgb(var(--text-primary));
}

.section-link {
    font-size: clamp(0.75rem, 1.8vw, 0.875rem);
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

.section-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Contenido de sección */
.section-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    overflow-y: auto;
    max-height: 24rem;
}

/* Item de contenido horizontal */
.content-item-horizontal {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1rem);
    padding: clamp(0.875rem, 2.5vw, 1.25rem);
    border-bottom: 1px solid rgb(var(--border-card));
    transition: background-color 0.2s;
}

.content-item-horizontal:last-child {
    border-bottom: none;
}

.content-item-horizontal:hover {
    background: rgba(var(--text-primary), 0.02);
}

/* Avatar de item */
.item-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(2.5rem, 5vw, 3rem);
    height: clamp(2.5rem, 5vw, 3rem);
    background: var(--brand-primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: clamp(0.875rem, 2vw, 1.125rem);
    flex-shrink: 0;
}

/* Icono de item */
.item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(2.5rem, 5vw, 3rem);
    height: clamp(2.5rem, 5vw, 3rem);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.item-icon i {
    font-size: clamp(0.875rem, 2vw, 1rem);
}

/* Información de item */
.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
    min-width: 0;
}

.item-title {
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 600;
    color: rgb(var(--text-primary));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-subtitle {
    font-size: clamp(0.75rem, 1.8vw, 0.875rem);
    color: rgb(var(--text-secondary));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Meta de item */
.item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    flex-shrink: 0;
}

.item-time {
    font-size: clamp(0.625rem, 1.5vw, 0.75rem);
    color: rgb(var(--text-secondary));
    white-space: nowrap;
}

.item-price {
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    font-weight: 700;
    color: rgb(var(--text-primary));
    white-space: nowrap;
}

.item-action {
    font-size: clamp(0.75rem, 1.8vw, 0.875rem);
    font-weight: 600;
    color: var(--brand-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

.item-action:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Estado vacío */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 3vw, 2rem);
    text-align: center;
}

.empty-icon {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    color: rgb(var(--text-secondary));
    opacity: 0.3;
    margin-bottom: 1rem;
}

.empty-text {
    font-size: clamp(0.875rem, 2vw, 1rem);
    color: rgb(var(--text-secondary));
}

/* Footer de sección */
.section-footer {
    padding: clamp(1rem, 3vw, 1.5rem);
    border-top: 1px solid rgb(var(--border-card));
}

.section-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: clamp(0.75rem, 2vw, 0.875rem) clamp(1rem, 3vw, 1.5rem);
    border-radius: var(--radius-lg);
    font-size: clamp(0.875rem, 2vw, 1rem);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.section-btn.btn-primary {
    background: var(--brand-primary);
    color: white;
}

.section-btn.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.section-btn.btn-secondary {
    background: var(--brand-secondary);
    color: white;
}

.section-btn.btn-secondary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.section-btn i {
    font-size: clamp(0.875rem, 2vw, 1rem);
}

/* === RESPONSIVE === */

/* Tablet y superior */
@media (min-width: 768px) {
    .dashboard-stats-horizontal {
        overflow-x: visible;
        padding-bottom: 0;
    }
    
    .stat-card-horizontal {
        flex: 1;
        min-width: 0;
    }
    
    .dashboard-sections-horizontal {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .stat-card-horizontal {
        flex-direction: row;
    }
    
    .section-content {
        max-height: 28rem;
    }
}

/* Mobile específico */
@media (max-width: 767px) {
    .dashboard-stats-horizontal {
        padding-right: 1rem;
    }
    
    .stat-card-horizontal {
        min-width: 14rem;
    }
    
    .dashboard-sections-horizontal {
        grid-template-columns: 1fr;
    }
}
