/* 满天欣·合规卫士 - 自定义样式 */

/* 全局动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* 渐入动画 */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-in {
  animation: slideIn 0.5s ease-out;
}

.pulse-hover:hover {
  animation: pulse 0.3s ease-in-out;
}

/* 自定义背景渐变 */
.bg-gradient-custom {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

.bg-gradient-warning {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.bg-gradient-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* 卡片悬停效果 */
.card-hover {
  transition: all 0.3s ease;
}

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

/* 按钮效果 */
.btn-primary {
  @apply bg-indigo-600 hover:bg-indigo-700 text-white px-6 py-3 rounded-lg font-semibold transition-all duration-200;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  @apply border-2 border-indigo-600 text-indigo-600 hover:bg-indigo-600 hover:text-white px-6 py-3 rounded-lg font-semibold transition-all duration-200;
}

.btn-success {
  @apply bg-green-600 hover:bg-green-700 text-white px-6 py-3 rounded-lg font-semibold transition-all duration-200;
}

.btn-warning {
  @apply bg-yellow-500 hover:bg-yellow-600 text-white px-6 py-3 rounded-lg font-semibold transition-all duration-200;
}

.btn-danger {
  @apply bg-red-600 hover:bg-red-700 text-white px-6 py-3 rounded-lg font-semibold transition-all duration-200;
}

/* 输入框样式 */
.input-primary {
  @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition-all duration-200;
}

.input-primary:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 风险等级颜色 */
.risk-high {
  @apply text-red-600 bg-red-50 border-red-200;
}

.risk-medium {
  @apply text-yellow-600 bg-yellow-50 border-yellow-200;
}

.risk-low {
  @apply text-green-600 bg-green-50 border-green-200;
}

.risk-safe {
  @apply text-gray-600 bg-gray-50 border-gray-200;
}

/* 风险指示器 */
.risk-indicator {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.risk-indicator.high {
  @apply bg-red-100 text-red-800;
}

.risk-indicator.medium {
  @apply bg-yellow-100 text-yellow-800;
}

.risk-indicator.low {
  @apply bg-green-100 text-green-800;
}

.risk-indicator.safe {
  @apply bg-gray-100 text-gray-800;
}

/* 模态框样式 */
.modal-overlay {
  @apply fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50;
}

.modal-content {
  @apply bg-white rounded-xl shadow-2xl max-w-md w-full mx-4 p-6;
  animation: fadeIn 0.3s ease-out;
}

/* 加载动画 */
.loading-spinner {
  border: 3px solid #f3f4f6;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 通知样式 */
.notification {
  @apply fixed top-4 right-4 max-w-sm w-full bg-white rounded-lg shadow-lg border z-50 p-4;
  animation: slideIn 0.3s ease-out;
}

.notification.success {
  @apply border-green-500 bg-green-50;
}

.notification.warning {
  @apply border-yellow-500 bg-yellow-50;
}

.notification.error {
  @apply border-red-500 bg-red-50;
}

.notification.info {
  @apply border-blue-500 bg-blue-50;
}

/* 进度条 */
.progress-bar {
  @apply w-full bg-gray-200 rounded-full h-2;
}

.progress-fill {
  @apply bg-indigo-600 h-2 rounded-full transition-all duration-300;
}

/* 标签样式 */
.tag {
  @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.tag.blue {
  @apply bg-blue-100 text-blue-800;
}

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

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

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

.tag.gray {
  @apply bg-gray-100 text-gray-800;
}

/* 导航栏固定效果 */
.navbar-fixed {
  @apply fixed top-0 left-0 right-0 z-40 transition-all duration-200;
}

.navbar-scrolled {
  @apply bg-white bg-opacity-95 backdrop-blur-sm shadow-lg;
}

/* 响应式文字大小 */
.text-responsive-xl {
  @apply text-2xl md:text-3xl lg:text-4xl;
}

.text-responsive-lg {
  @apply text-lg md:text-xl lg:text-2xl;
}

.text-responsive-md {
  @apply text-base md:text-lg lg:text-xl;
}

/* 自定义滚动条 */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

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

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

/* 表格样式 */
.table-responsive {
  @apply min-w-full divide-y divide-gray-200;
}

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

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

/* 统计卡片 */
.stat-card {
  @apply bg-white rounded-lg shadow p-6 border-l-4;
}

.stat-card.blue {
  @apply border-blue-500;
}

.stat-card.green {
  @apply border-green-500;
}

.stat-card.yellow {
  @apply border-yellow-500;
}

.stat-card.red {
  @apply border-red-500;
}

/* 时间轴样式 */
.timeline {
  @apply relative;
}

.timeline::before {
  content: '';
  @apply absolute left-4 top-0 bottom-0 w-0.5 bg-gray-200;
}

.timeline-item {
  @apply relative flex items-start space-x-4 pb-8;
}

.timeline-marker {
  @apply relative z-10 flex items-center justify-center w-8 h-8 bg-white border-2 border-gray-300 rounded-full;
}

.timeline-marker.active {
  @apply border-indigo-500 bg-indigo-500;
}

/* 工具提示 */
.tooltip {
  @apply relative;
}

.tooltip .tooltip-text {
  @apply invisible absolute z-10 py-2 px-3 text-xs text-white bg-gray-900 rounded-lg opacity-0 transition-opacity duration-300;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
}

.tooltip .tooltip-text::after {
  content: "";
  @apply absolute top-full left-1/2 ml-[-5px] border-4 border-solid border-gray-900;
  border-color: #1f2937 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  @apply visible opacity-100;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .dark-mode {
    @apply bg-gray-900 text-white;
  }
  
  .dark-mode .bg-white {
    @apply bg-gray-800;
  }
  
  .dark-mode .text-gray-900 {
    @apply text-gray-100;
  }
  
  .dark-mode .border-gray-200 {
    @apply border-gray-700;
  }
}

/* 打印样式 */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-break {
    page-break-before: always;
  }
}

/* 可访问性增强 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 焦点样式 */
.focus-visible {
  @apply focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2;
}