/* ============================================
   DASHBOARD STYLES
   Premium Business Dashboard Design System
   ============================================ */

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ============================================
   STATISTICS CARDS - Modern Professional Design
   ============================================ */

.stat-card-modern {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card-modern:hover {
    transform: translateY(-4px);
}

.stat-card-modern::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 1rem;
    padding: 2px;
    background: linear-gradient(135deg, transparent 0%, rgba(168, 85, 247, 0.3) 50%, transparent 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card-modern:hover::after {
    opacity: 1;
}

/* Chat AI Card Animations */
.chat-ai-card {
    background-size: 200% 200%;
    animation: gradient 6s ease infinite;
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 6s ease infinite;
}

/* Stat Card Number Animation */
.stat-card-modern p[class*="text-[32px]"] {
    transition: all 0.3s ease;
}

.stat-card-modern:hover p[class*="text-[32px]"] {
    transform: scale(1.05);
}

.animate-fade-in {
    animation: fadeInUp 0.5s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out forwards;
}

/* Stagger animation delays */
.delay-1 { animation-delay: 50ms; }
.delay-2 { animation-delay: 100ms; }
.delay-3 { animation-delay: 150ms; }
.delay-4 { animation-delay: 200ms; }
.delay-5 { animation-delay: 250ms; }

/* ============================================
   AI PRODUCT CARDS
   ============================================ */

.ai-product-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(118, 60, 212, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ai-product-card:hover::before {
    opacity: 1;
}

.ai-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
}

.ai-product-card:hover .ai-product-icon {
    transform: scale(1.1) rotate(5deg);
}

.ai-product-icon {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Card gradient borders on hover */
.ai-product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #763CD4, #E22861);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.ai-product-card:hover::after {
    transform: scaleX(1);
}

/* ============================================
   AI BANNER CARDS (Featured)
   ============================================ */

.ai-banner-card {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.15);
}

.ai-banner-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.25);
}

.ai-banner-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.ai-banner-icon {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ============================================
   AI COMPACT CARDS
   ============================================ */

.ai-compact-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-compact-card:hover {
    transform: translateY(-2px);
}

.ai-compact-icon {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   IMAGE BANNER SECTION - Aligned with Documents
   ============================================ */

.image-banner-featured {
    position: relative;
    cursor: pointer;
}

/* Action Buttons - Clean & Functional */
.image-action-btn {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.image-action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.image-action-btn:active {
    transform: scale(0.95);
}

.image-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Thumbnail Cards - Compact & Clean */
.image-thumbnail-card {
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-thumbnail-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(118, 60, 212, 0.12);
}

.dark .image-thumbnail-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Thumbnail Image Zoom Effect */
.image-thumbnail-card img {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-thumbnail-card:hover img {
    transform: scale(1.08);
}

/* Loading Animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Responsive Image Sizes */
@media (max-width: 768px) {
    .image-banner-featured {
        height: 160px !important;
    }
}

@media (max-width: 640px) {
    .image-banner-featured {
        height: 140px !important;
    }
    
    .image-action-btn {
        width: 36px;
        height: 36px;
    }
    
    .image-action-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* ============================================
   SUPPORT SECTION - Modern Professional Design
   ============================================ */

.support-help-banner {
    position: relative;
    box-shadow: 0 10px 40px -8px rgba(99, 102, 241, 0.35);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.support-help-banner:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px -12px rgba(99, 102, 241, 0.5);
}

.dark .support-help-banner {
    box-shadow: 0 10px 40px -8px rgba(0, 0, 0, 0.5);
}

.dark .support-help-banner:hover {
    box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.6);
}

.support-cta-btn {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
}

.support-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.support-cta-btn:hover::before {
    left: 100%;
}

.support-cta-btn:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

/* Ticket Item Animations */
.support-ticket-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.support-ticket-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, #6366f1, #a855f7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.support-ticket-item:hover::before {
    opacity: 1;
}

.support-ticket-item:hover {
    transform: translateX(2px);
}

/* Status Badge Pulse Animation */
@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

.animate-pulse {
    animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Priority Colors Enhancement */
.priority-high {
    color: #EF4444;
}

.priority-medium {
    color: #F59E0B;
}

.priority-low {
    color: #10B981;
}

/* Responsive Improvements */
@media (max-width: 1024px) {
    .support-help-banner {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .support-ticket-item {
        padding: 1rem;
    }
    
    .support-cta-btn {
        padding: 0.75rem 1.5rem;
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    .support-help-banner {
        padding: 1.5rem 1rem;
    }
    
    .support-ticket-item:hover {
        transform: translateX(0);
    }
}

.status-badge-closed {
    background-color: #6B7280;
}

.status-badge-resolved {
    background-color: #059669;
}

/* ============================================
   STAT CARDS
   ============================================ */

.stat-card-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.1);
}

.stat-card-enhanced::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #763CD4, #E22861);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.stat-card-enhanced:hover::after {
    transform: scaleX(1);
}

/* ============================================
   CHART STYLES
   ============================================ */

.chart-card {
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dark .chart-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Chart canvas wrapper */
.chart-canvas-wrapper {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .chart-canvas-wrapper {
    border-color: rgba(255, 255, 255, 0.05);
}

/* Quick stats row */
.chart-stat-item {
    transition: all 0.2s ease;
}

.chart-stat-item:hover {
    transform: translateY(-2px);
}

/* Range button group */
.chart-range-group {
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chart-range-btn {
    transition: all 0.2s ease;
    position: relative;
}

.chart-range-btn.active {
    background: linear-gradient(135deg, #763CD4, #E22861);
    color: white;
    box-shadow: 0 2px 8px rgba(118, 60, 212, 0.3);
}

.chart-range-btn:not(.active):hover {
    background-color: rgba(118, 60, 212, 0.08);
    color: #763CD4;
}

.dark .chart-range-btn:not(.active):hover {
    background-color: rgba(118, 60, 212, 0.15);
    color: #A78BFA;
}

/* Interactive legend buttons - Minimal Style */
.chart-legend-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    font-size: 12px;
    font-weight: 500;
    background: transparent;
    border: none;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.dark .chart-legend-btn {
    color: #9CA3AF;
}

.chart-legend-btn:hover {
    color: #374151;
}

.dark .chart-legend-btn:hover {
    color: #E5E7EB;
}

.chart-legend-btn.active {
    color: #374151;
}

.dark .chart-legend-btn.active {
    color: #E5E7EB;
}

.chart-legend-btn:not(.active) {
    opacity: 0.4;
}

.chart-legend-btn:not(.active) .legend-indicator {
    background-color: #9CA3AF !important;
}

.legend-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Legend color classes */
.legend-color-documents { background-color: #763CD4; }
.legend-color-images { background-color: #E22861; }
.legend-color-videos { background-color: #3B82F6; }
.legend-color-codes { background-color: #FF774B; }
.legend-color-chats { background-color: #10B981; }

/* Legacy legend dot colors (keeping for backwards compat) */
.legend-dot-documents { background-color: #763CD4; }
.legend-dot-images { background-color: #E22861; }
.legend-dot-videos { background-color: #3B82F6; }
.legend-dot-codes { background-color: #FF774B; }
.legend-dot-chats { background-color: #10B981; }

.chart-legend-item {
    cursor: pointer;
    transition: opacity 0.2s ease;
    user-select: none;
}

.chart-legend-item:hover {
    opacity: 0.8;
}

.chart-legend-item.disabled {
    opacity: 0.4;
}

.chart-legend-item.disabled .legend-dot {
    background-color: #9CA3AF !important;
}

/* ============================================
   RECENT ITEMS
   ============================================ */

/* Enhanced card shadows for depth */
.bg-white.rounded-2xl,
.dark .bg-color-3A.rounded-2xl {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dark .bg-color-3A.rounded-2xl {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.3);
}

.recent-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.recent-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #763CD4, #E22861);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
    border-radius: 0 2px 2px 0;
}

.recent-item:hover::before {
    transform: scaleY(1);
}

.recent-item:hover {
    background-color: rgba(118, 60, 212, 0.04);
}

.dark .recent-item:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.recent-item-icon {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.recent-item:hover .recent-item-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 12px rgba(118, 60, 212, 0.2);
}

/* Document type badges */
.doc-type-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ============================================
   IMAGE GALLERY GRID
   ============================================ */

.image-grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.image-grid-item:hover {
    transform: scale(1.02);
}

.image-grid-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.6) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.image-grid-item:hover::before {
    opacity: 1;
}

.image-grid-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 2;
}

.image-grid-item:hover .image-grid-overlay {
    transform: translateY(0);
}

/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ============================================
   LOADING SKELETON
   ============================================ */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.dark .skeleton {
    background: linear-gradient(90deg, #3a3a3a 25%, #4a4a4a 50%, #3a3a3a 75%);
    background-size: 200% 100%;
}

/* ============================================
   COUPON CARDS - Enhanced
   ============================================ */

.coupon-card-enhanced {
    position: relative;
    transition: all 0.3s ease;
}

.coupon-card-enhanced::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(135deg, #763CD4, #E22861);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.coupon-card-enhanced:hover::before {
    opacity: 1;
}

.coupon-card-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px rgba(118, 60, 212, 0.2);
}

.dark .coupon-card-enhanced:hover {
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.4);
}

.coupon-code-box {
    transition: all 0.2s ease;
}

.coupon-card-enhanced:hover .coupon-code-box {
    border-color: #763CD4;
}

.dark .coupon-card-enhanced:hover .coupon-code-box {
    border-color: #A78BFA;
}

.coupon-badge {
    transition: transform 0.3s ease;
}

.coupon-card-enhanced:hover .coupon-badge {
    transform: rotate(12deg) scale(1.1);
}

/* Coupon Copy Button - Visible in both modes */
.coupon-copy-btn {
    background: linear-gradient(135deg, #763CD4 0%, #E22861 100%);
    box-shadow: 0 2px 6px rgba(118, 60, 212, 0.3);
}

.coupon-copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(118, 60, 212, 0.4);
}

.coupon-copy-btn:active {
    transform: translateY(0);
}

.dark .coupon-copy-btn {
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    box-shadow: 0 2px 6px rgba(139, 92, 246, 0.3);
}

.dark .coupon-copy-btn:hover {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Copy success message animation */
.copy-success-msg {
    animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ============================================
   BADGES
   ============================================ */

.badge-new {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: white;
}

.badge-beta {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    color: white;
}

.badge-hot {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
}

.badge-pro {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
}

/* ============================================
   TOOLTIPS ENHANCEMENT
   ============================================ */

.tooltip-enhanced {
    position: relative;
}

.tooltip-enhanced::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: #1F2937;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 50;
}

.tooltip-enhanced:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* ============================================
   SCROLLBAR STYLES
   ============================================ */

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background: #4B5563;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #6B7280;
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.progress-fill {
    background: linear-gradient(90deg, #763CD4, #E22861);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 1024px) {
    .ai-product-card:hover {
        transform: translateY(-2px);
    }
}

@media (max-width: 640px) {
    .chart-legend-item {
        font-size: 11px;
    }
    
    .ai-product-card {
        padding: 1rem;
    }
}

/* ============================================
   DARK MODE ADJUSTMENTS
   ============================================ */

.dark .stat-card-enhanced:hover {
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.3);
}

.dark .ai-product-card:hover {
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.4);
}

/* ============================================
   FOCUS STATES (Accessibility)
   ============================================ */

.focus-ring:focus {
    outline: 2px solid #763CD4;
    outline-offset: 2px;
}

.focus-ring:focus:not(:focus-visible) {
    outline: none;
}

.focus-ring:focus-visible {
    outline: 2px solid #763CD4;
    outline-offset: 2px;
}
