/* Custom Styles for ChainSight Admin Dashboard */
.bg-night-gradient {
    background: radial-gradient(1200px 600px at -10% -10%, rgba(0, 255, 194, 0.15), transparent 40%),
                radial-gradient(900px 500px at 110% 10%, rgba(99, 102, 241, 0.18), transparent 40%),
                radial-gradient(700px 500px at 100% 100%, rgba(236, 72, 153, 0.15), transparent 40%),
                linear-gradient(180deg, #0b1220 0%, #0e1430 100%);
}

.glass {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
}

.glass-strong {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.16);
}

.hover-float {
    transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}

.hover-float:hover {
    transform: translateY(-3px);
}

.nav-active {
    background: rgba(255,255,255,0.12);
    border-left: 3px solid #60a5fa;
}

.tag {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
}

.scroll-smooth::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.scroll-smooth::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.14);
    border-radius: 9999px;
}

.btn {
    transition: transform .2s ease, opacity .2s ease;
}

.btn:active {
    transform: translateY(1px) scale(0.99);
}

.modal-enter {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
}

.modal-enter-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: all .2s ease;
}

.table-wrap {
    overflow: auto;
}

.table-responsive {
    min-width: 720px;
}

.badge {
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

/* Color utilities */
.bg-emerald-500/20 { background-color: rgba(16, 185, 129, 0.2); }
.bg-rose-500/20 { background-color: rgba(244, 63, 94, 0.2); }
.bg-amber-500/20 { background-color: rgba(245, 158, 11, 0.2); }
.bg-orange-500/20 { background-color: rgba(249, 115, 22, 0.2); }
.bg-violet-500/20 { background-color: rgba(139, 92, 246, 0.2); }
.bg-cyan-500/20 { background-color: rgba(6, 182, 212, 0.2); }

.text-emerald-300 { color: rgb(110, 231, 183); }
.text-rose-300 { color: rgb(253, 164, 175); }
.text-amber-300 { color: rgb(252, 211, 77); }
.text-orange-300 { color: rgb(253, 186, 116); }
.text-violet-300 { color: rgb(196, 181, 253); }
.text-cyan-300 { color: rgb(103, 232, 249); }

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* User info card animations */
#userInfoCard {
    transition: all 0.3s ease;
}

#userInfoCard:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Status indicators */
.status-online { color: #10b981; }
.status-away { color: #f59e0b; }
.status-offline { color: #6b7280; }

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-dot.online { background-color: #10b981; }
.status-dot.away { background-color: #f59e0b; }
.status-dot.offline { background-color: #6b7280; }

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.1) 20%,
        rgba(255, 255, 255, 0.3) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Form enhancements */
.form-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-select:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Notification badges */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border-radius: 9999px;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .table-responsive {
        min-width: 100%;
    }
    
    .glass-strong {
        margin: 0.5rem;
        border-radius: 1rem;
    }
}

/* Print styles */
@media print {
    .glass, .glass-strong {
        background: white;
        border: 1px solid #e5e7eb;
        backdrop-filter: none;
    }
    
    .bg-night-gradient {
        background: white;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .hover-float, .btn, .modal-enter-active, #userInfoCard {
        transition: none;
    }
    
    .loading::after {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .glass {
        background: rgba(255,255,255,0.9);
        border: 2px solid rgba(255,255,255,0.95);
    }
    
    .tag {
        background: rgba(255,255,255,0.95);
        border: 2px solid rgba(255,255,255,1);
    }
}

/* Dark mode adjustments (if needed) */
@media (prefers-color-scheme: dark) {
    /* Additional dark mode specific styles */
}

/* Custom scrollbar for webkit browsers */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Focus styles for better accessibility */
.focus-visible:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Utility classes */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-balance {
    text-wrap: balance;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.gradient-text {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* styles.css - Add mobile logout fixes */
/* Mobile-specific styles */
@media (max-width: 768px) {
    #logoutConfirmationModal {
        padding: 1rem;
        align-items: flex-end;
    }
    
    #logoutConfirmationModal .glass-strong {
        width: 100%;
        max-width: none;
        border-radius: 1rem 1rem 0 0;
        margin-bottom: 0;
    }
    
    /* Improve touch targets for mobile */
    .btn, .tag {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Prevent zoom on input focus */
    input, select, textarea {
        font-size: 16px;
    }
}

/* Enhanced modal styles for mobile */
.modal-mobile-full {
    align-items: flex-end;
}

.modal-mobile-full .glass-strong {
    width: 100%;
    max-width: none;
    border-radius: 1rem 1rem 0 0;
    margin-bottom: 0;
    max-height: 80vh;
    overflow-y: auto;
}

/* Safe area insets for notch devices */
@supports(padding: max(0px)) {
    .modal-mobile-full .glass-strong {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Improved overlay for mobile */
.fixed.inset-0 {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Prevent body scroll when modal is open */
.body-no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Enhanced button styles for mobile */
.btn-mobile {
    min-height: 44px;
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 12px;
}

/* Mobile drawer improvements */
#drawer {
    z-index: 60;
}

#overlay {
    z-index: 50;
}

/* Ensure modals appear above drawer */
[id^="modal"] {
    z-index: 70;
}

#logoutConfirmationModal {
    z-index: 80;
}

#logoutLoading {
    z-index: 90;
}