/* Team Hub - Main Styles */

/* Base Styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Focus Styles for Accessibility */
:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Navigation Item Active State */
.nav-item.active {
    background-color: #eff6ff;
    color: #2563eb;
    border-left: 3px solid #2563eb;
    margin-left: -3px;
}

.dark .nav-item.active {
    background-color: rgba(37, 99, 235, 0.1);
    color: #60a5fa;
    border-left-color: #60a5fa;
}

/* View Transitions */
.view {
    animation: fadeIn 0.3s ease-out;
}

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

/* Card Hover Effects */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Button Styles */
.btn-primary {
    background-color: #2563eb;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s;
}

.dark .btn-secondary {
    background-color: #1f2937;
    color: #d1d5db;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.dark .btn-secondary:hover {
    background-color: #374151;
}

/* DataTables Dark Mode Override */
.dark table.dataTable {
    color: #f3f4f6;
}

.dark table.dataTable thead th {
    background-color: #111827;
    color: #9ca3af;
    border-bottom-color: #374151;
}

.dark table.dataTable tbody tr {
    background-color: #111827;
}

.dark table.dataTable tbody tr:hover {
    background-color: #1f2937;
}

.dark table.dataTable tbody td {
    border-bottom-color: #1f2937;
}

.dark .dataTables_wrapper .dataTables_length,
.dark .dataTables_wrapper .dataTables_filter,
.dark .dataTables_wrapper .dataTables_info,
.dark .dataTables_wrapper .dataTables_paginate {
    color: #9ca3af;
}

.dark .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #d1d5db !important;
}

.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: white !important;
}

.dark .dataTables_wrapper .dataTables_filter input {
    background-color: #1f2937;
    border-color: #374151;
    color: #f3f4f6;
}

/* ApexCharts Dark Mode */
.dark .apexcharts-text {
    fill: #9ca3af;
}

.dark .apexcharts-gridline {
    stroke: #374151;
}

.dark .apexcharts-tooltip {
    background: #1f2937 !important;
    border-color: #374151 !important;
    color: #f3f4f6 !important;
}

.dark .apexcharts-tooltip-title {
    background: #111827 !important;
    border-color: #374151 !important;
}

.dark .apexcharts-xaxistooltip {
    background: #1f2937;
    border-color: #374151;
    color: #f3f4f6;
}

.dark .apexcharts-legend-text {
    color: #d1d5db !important;
}

/* Prose Dark Mode */
.dark .prose {
    color: #d1d5db;
}

.dark .prose p,
.dark .prose li {
    color: #d1d5db;
}

.dark .prose strong {
    color: #f3f4f6;
}

/* Checkbox Styles */
input[type="checkbox"] {
    accent-color: #2563eb;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 100;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    background-color: #10b981;
    color: white;
}

.toast-error {
    background-color: #ef4444;
    color: white;
}

.toast-info {
    background-color: #3b82f6;
    color: white;
}

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    max-width: 32rem;
    width: 100%;
    margin: 1rem;
    transform: scale(0.95);
    transition: transform 0.3s;
}

.dark .modal-content {
    background-color: #111827;
}

.modal-backdrop.active .modal-content {
    transform: scale(1);
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Selection Color */
::selection {
    background-color: #bfdbfe;
    color: #1e40af;
}

.dark ::selection {
    background-color: #1e40af;
    color: #bfdbfe;
}

/* Modern Glassmorphism Effects */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern Shadows */
.shadow-glow {
    box-shadow: 0 0 40px rgba(14, 165, 233, 0.15);
}

.dark .shadow-glow {
    box-shadow: 0 0 40px rgba(14, 165, 233, 0.1);
}

/* Smooth Hover Transitions */
.hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* Animated Gradient Background */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background: linear-gradient(-45deg, #0ea5e9, #06b6d4, #8b5cf6, #ec4899);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Navigation Active State - Modern */
.nav-item.active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    color: #0ea5e9;
    border-left: none;
    margin-left: 0;
    position: relative;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: linear-gradient(180deg, #0ea5e9 0%, #06b6d4 100%);
    border-radius: 0 3px 3px 0;
}

.dark .nav-item.active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
    color: #38bdf8;
}

/* Modern Input Focus */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Pulse Animation for Notifications */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    animation: pulse-ring 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
}

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

/* Custom Checkbox Modern */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    border-color: transparent;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 0.75rem;
}

.dark input[type="checkbox"] {
    border-color: #4b5563;
}

/* Delay Animation Classes */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-500 { animation-delay: 500ms; }
.delay-1000 { animation-delay: 1000ms; }

/* Email Folder Active State */
.email-folder.active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    color: #0ea5e9;
    font-weight: 500;
}

.dark .email-folder.active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
    color: #38bdf8;
}

/* Email Item Active State */
.email-item.active {
    background-color: #eff6ff;
    border-left: 3px solid #0ea5e9;
    margin-left: -3px;
    padding-left: calc(0.75rem + 3px);
}

.dark .email-item.active {
    background-color: rgba(14, 165, 233, 0.1);
    border-left-color: #38bdf8;
}

