/* ============================================
   CLEAN & MODERN DESIGN SYSTEM
   Estilo minimalista y elegante
   ============================================ */

/* =========================================
   PAGE TRANSITIONS
   ========================================= */

body {
    opacity: 0;
    transition: opacity 0.4s ease;
}

body.page-loaded {
    opacity: 1;
}

/* =========================================
   ELEGANT ANIMATIONS
   ========================================= */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes subtleGlow {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0);
    }
    50% { 
        box-shadow: 0 0 20px 0 rgba(var(--primary-rgb), 0.15);
    }
}

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =========================================
   ANIMATION CLASSES
   ========================================= */

.animate-fadeIn {
    animation: fadeIn 0.6s ease forwards;
}

.animate-slideUp {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slideDown {
    animation: slideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scaleUp {
    animation: scaleUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger delays */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }

/* =========================================
   MODERN CARD SYSTEM
   ========================================= */

.card-modern {
    background: linear-gradient(145deg, 
        rgba(30, 30, 35, 0.95) 0%, 
        rgba(20, 20, 25, 0.98) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%
    );
}

.card-modern:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--primary-rgb), 0.3);
    box-shadow: 
        0 20px 40px -15px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(var(--primary-rgb), 0.1);
}

/* =========================================
   STAT CARDS - MINIMAL STYLE
   ========================================= */

.stat-card-minimal {
    background: rgba(25, 25, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card-minimal:hover {
    background: rgba(30, 30, 35, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.stat-card-minimal .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    flex-shrink: 0;
}

.stat-card-minimal .stat-content {
    flex: 1;
}

.stat-card-minimal .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.stat-card-minimal .stat-label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-card-minimal .stat-trend {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
}

.stat-card-minimal .stat-trend.up {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.stat-card-minimal .stat-trend.down {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* =========================================
   PRODUCT CARDS - CLEAN DESIGN
   ========================================= */

.product-card-clean {
    background: rgba(22, 22, 28, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.product-card-clean:hover {
    transform: translateY(-6px);
    border-color: rgba(var(--primary-rgb), 0.4);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.6),
        0 0 40px -20px rgba(var(--primary-rgb), 0.3);
}

.product-card-clean .product-image-wrapper {
    position: relative;
    padding-top: 65%;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(30,30,35,1) 0%, rgba(20,20,25,1) 100%);
}

.product-card-clean .product-image-wrapper img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card-clean:hover .product-image-wrapper img {
    transform: scale(1.08);
}

.product-card-clean .product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.375rem 0.875rem;
    background: var(--primary);
    color: white;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.product-card-clean .product-badge.popular {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.product-card-clean .product-badge.new {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
}

.product-card-clean .product-content {
    padding: 1.5rem;
}

.product-card-clean .product-category {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.product-card-clean .product-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-card-clean .product-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.product-card-clean .product-price {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--primary);
}

.product-card-clean .product-price .currency {
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0.8;
}

/* =========================================
   BUTTONS - REFINED STYLE
   ========================================= */

.btn-refined {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn-refined.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px -3px rgba(var(--primary-rgb), 0.4);
}

.btn-refined.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(var(--primary-rgb), 0.5);
}

.btn-refined.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-refined.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-refined.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-refined.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

/* =========================================
   FORM INPUTS - MODERN STYLE
   ========================================= */

.input-modern {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
}

.input-modern::placeholder {
    color: var(--text-muted);
}

.input-modern:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.input-modern:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.input-group-modern {
    position: relative;
}

.input-group-modern .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-group-modern .input-modern {
    padding-left: 2.75rem;
}

.input-group-modern:focus-within .input-icon {
    color: var(--primary);
}

/* =========================================
   NAVIGATION - SLEEK STYLE
   ========================================= */

.nav-link-sleek {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link-sleek:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link-sleek.active {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.1);
}

.nav-link-sleek.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

/* =========================================
   BADGES & TAGS
   ========================================= */

.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

/* =========================================
   TABLES - CLEAN DESIGN
   ========================================= */

.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead {
    background: rgba(255, 255, 255, 0.02);
}

.table-modern th {
    padding: 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-modern td {
    padding: 1rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease;
}

.table-modern tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* =========================================
   MODAL - ELEGANT STYLE
   ========================================= */

.modal-elegant .modal-content {
    background: linear-gradient(180deg, 
        rgba(28, 28, 35, 0.98) 0%, 
        rgba(18, 18, 24, 0.99) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 
        0 25px 80px -20px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    animation: scaleUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================
   PROGRESS BARS
   ========================================= */

.progress-modern {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    overflow: hidden;
}

.progress-modern .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 100px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.progress-modern .progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
    animation: shimmerProgress 2s infinite;
}

@keyframes shimmerProgress {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* =========================================
   AVATAR SYSTEM
   ========================================= */

.avatar-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.2) 0%, rgba(var(--primary-rgb), 0.1) 100%);
    color: var(--primary);
    font-weight: 700;
    overflow: hidden;
}

.avatar-modern.sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-modern.md { width: 40px; height: 40px; font-size: 0.875rem; }
.avatar-modern.lg { width: 48px; height: 48px; font-size: 1rem; }
.avatar-modern.xl { width: 64px; height: 64px; font-size: 1.25rem; border-radius: 16px; }

.avatar-modern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   EMPTY STATES
   ========================================= */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 20px;
    font-size: 2rem;
    color: var(--primary);
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

/* =========================================
   LOADING STATES
   ========================================= */

.skeleton-modern {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.03) 0%, 
        rgba(255, 255, 255, 0.06) 50%, 
        rgba(255, 255, 255, 0.03) 100%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite ease-in-out;
    border-radius: 8px;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =========================================
   SCROLLBAR - MINIMAL
   ========================================= */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* =========================================
   UTILITY CLASSES
   ========================================= */

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blur-bg {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.glow-text {
    text-shadow: 0 0 30px rgba(var(--primary-rgb), 0.5);
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
}

/* =========================================
   RESPONSIVE ADJUSTMENTS
   ========================================= */

@media (max-width: 768px) {
    .card-modern {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .stat-card-minimal {
        padding: 1.25rem;
    }
    
    .stat-card-minimal .stat-value {
        font-size: 1.5rem;
    }
    
    .product-card-clean .product-content {
        padding: 1.25rem;
    }
}

/* =========================================
   PRINT STYLES
   ========================================= */

@media print {
    * {
        animation: none !important;
        transition: none !important;
    }
    
    body {
        opacity: 1 !important;
    }
}
