/* Custom styles for ICorNet application */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: #374151;
}

/* Loading animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Custom button styles */
.btn-primary {
    @apply bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-colors duration-200;
}

.btn-secondary {
    @apply bg-gray-200 text-gray-800 px-4 py-2 rounded-lg hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 transition-colors duration-200;
}

.btn-danger {
    @apply bg-red-600 text-white px-4 py-2 rounded-lg hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 transition-colors duration-200;
}

/* Card styles */
.card {
    @apply bg-white rounded-lg shadow-sm border border-gray-200;
}

.card-header {
    @apply px-6 py-4 border-b border-gray-200;
}

.card-body {
    @apply p-6;
}

/* Form styles */
.form-input {
    @apply w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200;
}

.form-label {
    @apply block text-sm font-medium text-gray-700 mb-2;
}

/* Table styles */
.table {
    @apply min-w-full divide-y divide-gray-200;
}

.table-header {
    @apply bg-gray-50;
}

.table-header th {
    @apply px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider;
}

.table-body {
    @apply bg-white divide-y divide-gray-200;
}

.table-row {
    @apply hover:bg-gray-50 transition-colors duration-150;
}

.table-cell {
    @apply px-6 py-4 whitespace-nowrap text-sm text-gray-900;
}

/* Status badges */
.status-badge {
    @apply inline-flex px-2 py-1 text-xs font-semibold rounded-full;
}

.status-pending {
    @apply bg-yellow-100 text-yellow-800;
}

.status-completed {
    @apply bg-green-100 text-green-800;
}

.status-failed {
    @apply bg-red-100 text-red-800;
}

/* Dropdown styles */
.dropdown {
    @apply relative;
}

.dropdown-menu {
    @apply absolute z-10 w-full mt-1 bg-white border border-gray-300 rounded-lg shadow-lg max-h-60 overflow-y-auto;
}

.dropdown-item {
    @apply w-full px-4 py-3 text-left hover:bg-gray-50 border-b border-gray-100 last:border-b-0 transition-colors duration-150;
}

/* Chart container styles */
.chart-container {
    @apply relative h-64 w-full;
}

/* Sidebar styles */
.sidebar {
    @apply bg-white shadow-lg h-screen w-64 fixed left-0 top-0 z-40;
}

.sidebar-header {
    @apply p-6 border-b border-gray-200;
}

.sidebar-nav {
    @apply mt-6;
}

.sidebar-item {
    @apply w-full flex items-center px-6 py-3 text-left hover:bg-gray-50 transition-colors duration-150;
}

.sidebar-item.active {
    @apply bg-blue-50 text-blue-600 border-r-2 border-blue-600;
}

.sidebar-footer {
    @apply absolute bottom-0 left-0 right-0 p-6 border-t border-gray-200;
}

/* Main content area */
.main-content {
    @apply ml-64 min-h-screen;
}

/* Toast notification styles */
.toast {
    @apply fixed top-4 right-4 px-6 py-3 rounded-lg shadow-lg z-50 transform transition-all duration-300;
}

.toast-success {
    @apply bg-green-500 text-white;
}

.toast-error {
    @apply bg-red-500 text-white;
}

.toast-info {
    @apply bg-blue-500 text-white;
}

.toast-warning {
    @apply bg-yellow-500 text-white;
}

/* Responsive styles */
@media (max-width: 768px) {
    .sidebar {
        @apply transform -translate-x-full;
    }
    
    .main-content {
        @apply ml-0;
    }
    
    .sidebar.mobile-open {
        @apply transform translate-x-0;
    }
}

/* Custom utilities */
.text-truncate {
    @apply overflow-hidden whitespace-nowrap;
    text-overflow: ellipsis;
}

.shadow-soft {
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}

.border-dashed {
    border-style: dashed;
}

/* Focus styles for accessibility */
.focus-visible {
    @apply outline-none ring-2 ring-blue-500 ring-offset-2;
}

/* Custom scrollbar for webkit browsers */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .sidebar {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}
