.card-backdrop {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.card-backdrop:hover {
    background: var(--bg-card-hover);
    border-color: rgba(14, 165, 233, 0.2);
}

/* === Toasts Mejorados === */
#toast-container>div {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === Scrollbar Personalizada === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(14, 165, 233, 0.8);
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .stat-card {
        padding: 1rem !important;
    }

    .stat-card h3 {
        font-size: 0.75rem !important;
    }

    .stat-card p {
        font-size: 1.5rem !important;
    }

    /* Mobile sidebar */
    #sidebar-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 50;
        width: 280px;
    }

    #sidebar-nav.mobile-open {
        transform: translateX(0);
    }

    /* Mobile menu overlay */
    .mobile-menu-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        z-index: 40;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Mobile menu button */
    #mobile-menu-btn {
        display: block !important;
    }

    /* Horizontal scroll for charts on mobile */
    .h-96 {
        overflow-x: auto;
        overflow-y: hidden;
    }

    /* Stack cards vertically */
    .grid-cols-1 {
        grid-template-columns: 1fr !important;
    }

    /* Improve table responsiveness */
    .overflow-x-auto table {
        min-width: 100%;
    }

    .overflow-x-auto th,
    .overflow-x-auto td {
        min-width: 100px;
        font-size: 0.875rem;
    }
}

/* === Enhanced Table Styles === */
.order-main-row {
    cursor: pointer;
    transition: all 0.2s ease;
}

.order-main-row:hover {
    background: rgba(51, 65, 85, 0.5) !important;
    transform: scale(1.01);
}

.order-details-row {
    transition: all 0.3s ease;
}

.order-details-content {
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.5);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.paid {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.shipped {
    background: rgba(79, 70, 229, 0.2);
    /* Indigo - color secundario de marca */
    color: #6366f1;
    border: 1px solid rgba(79, 70, 229, 0.3);
}

.status-badge.delivered {
    background: rgba(99, 102, 241, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Table Action Buttons */
.action-btn {
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn:hover {
    background: rgba(14, 165, 233, 0.2);
    border-color: rgba(14, 165, 233, 0.5);
    transform: translateY(-2px);
}

/* Filter Inputs */
.filter-input {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    padding: 0.5rem;
    color: #e5e7eb;
    font-size: 0.875rem;
    width: 100%;
    transition: all 0.2s ease;
}

.filter-input:focus {
    outline: none;
    border-color: #0ea5e9;
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.filter-input::placeholder {
    color: #6b7280;
}

/* Loading Skeletons */
.skeleton {
    background: linear-gradient(90deg,
            rgba(51, 65, 85, 0.4) 0%,
            rgba(71, 85, 105, 0.5) 50%,
            rgba(51, 65, 85, 0.4) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.375rem;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-row {
    height: 60px;
    margin-bottom: 0.5rem;
}

/* Improved Scrollbar for Tables */
.overflow-x-auto::-webkit-scrollbar {
    height: 8px;
}

.overflow-x-auto::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.5);
    border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background: rgba(14, 165, 233, 0.8);
}

/* Details Arrow Animation */
.details-arrow {
    transition: transform 0.3s ease;
}

.details-arrow.rotate {
    transform: rotate(180deg);
}

/* Sortable Headers */
.sortable-header {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.sortable-header:hover {
    background: rgba(14, 165, 233, 0.1);
}

.sort-icon {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.5rem;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    opacity: 0.3;
}

.sortable-header.asc .sort-icon {
    border-bottom: 6px solid #0ea5e9;
    opacity: 1;
}

.sortable-header.desc .sort-icon {
    border-top: 6px solid #0ea5e9;
    opacity: 1;
}