/* Modern ZaprosBot Interface Styles */

/* Import Inter font for better typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Dark Theme Colors */
:root {
    --dark-50: #18181b;
    --dark-100: #27272a;
    --dark-200: #3f3f46;
    --dark-300: #52525b;
    --dark-400: #71717a;
    --dark-500: #a1a1aa;
    --dark-600: #d4d4d8;
    --dark-700: #e4e4e7;
    --dark-800: #f4f4f5;
    --dark-900: #fafafa;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for dark theme */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-100);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-400);
}

/* Sidebar styles */
.sidebar-nav-item {
    transition: all 0.2s ease-in-out;
}

.sidebar-nav-item:hover {
    transform: translateX(4px);
}

.sidebar-nav-item.active {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Table animations and styles */
.table-row-enter {
    opacity: 0;
    transform: translateY(10px);
    animation: slideInDark 0.3s ease-out forwards;
}

@keyframes slideInDark {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Status badges for dark theme */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-new {
    background-color: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-in-progress {
    background-color: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-sent {
    background-color: rgba(34, 197, 94, 0.1);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Modern buttons for dark theme */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background-color: var(--dark-200);
    color: #d1d5db;
    border: 1px solid var(--dark-300);
}

.btn-secondary:hover {
    background-color: var(--dark-300);
    border-color: var(--dark-400);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
}

/* Card hover effects for dark theme */
.card-hover {
    transition: all 0.2s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Loading states for dark theme */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
    animation: loadingDark 1.5s infinite;
}

@keyframes loadingDark {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Form improvements for dark theme */
.form-input {
    transition: all 0.2s ease-in-out;
    background-color: var(--dark-200);
    border-color: var(--dark-300);
    color: white;
}

.form-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
    background-color: var(--dark-100);
}

.form-input::placeholder {
    color: #9ca3af;
}

/* Tooltip styles for dark theme */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dark-100);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 50;
    opacity: 0;
    animation: tooltipFadeDark 0.2s ease-out forwards;
    border: 1px solid var(--dark-300);
}

.tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(1px);
    border: 4px solid transparent;
    border-top-color: var(--dark-100);
    z-index: 50;
}

@keyframes tooltipFadeDark {
    to {
        opacity: 1;
    }
}

/* Glow effects for interactive elements */
.glow-blue {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.glow-green {
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.glow-red {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.glow-yellow {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

/* Animated gradient backgrounds */
.gradient-animated {
    background: linear-gradient(-45deg, #3b82f6, #1d4ed8, #7c3aed, #c026d3);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Mobile responsiveness improvements */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Enhanced focus styles for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* High contrast support for dark theme */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #0066ff;
        border: 2px solid #0066ff;
    }
    
    .btn-secondary {
        background: var(--dark-800);
        border: 2px solid var(--dark-600);
        color: var(--dark-50);
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .sidebar {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for better accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast support */
@media (prefers-contrast: high) {
    .btn-primary {
        background-color: #000;
        border: 2px solid #000;
    }
    
    .btn-secondary {
        background-color: #fff;
        border: 2px solid #000;
        color: #000;
    }
}