/* 综合素质评价管理系统 - 现代化样式 */

:root {
  /* 主色调 */
  --primary-color: #667eea;
  --primary-dark: #5a67d8;
  --primary-light: #7c3aed;
  --secondary-color: #764ba2;
  
  /* 渐变色 */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-success: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  --gradient-warning: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  --gradient-danger: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  --gradient-info: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  
  /* 中性色 */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* 圆角 */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* 过渡动画 */
  --transition-fast: all 0.15s ease-in-out;
  --transition-normal: all 0.3s ease-in-out;
  --transition-slow: all 0.5s ease-in-out;
}

/* 导航分组标题 */
.nav-section-title {
  padding: 0.375rem 1.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
  margin: 0.25rem 0;
  line-height: 1.2;
}

/* 侧边栏分隔线 */
.sidebar-nav hr {
  border-color: rgba(255, 255, 255, 0.15) !important;
  margin: 0.5rem 1.5rem !important;
  opacity: 1 !important;
}

/* 全局样式重置 */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: var(--gray-700);
  line-height: 1.6;
}

/* 登录页面样式 */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="rgba(255,255,255,0.1)"/><stop offset="100%" stop-color="rgba(255,255,255,0)"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="300" cy="700" r="120" fill="url(%23a)"/><circle cx="700" cy="800" r="80" fill="url(%23a)"/></svg>');
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.login-header {
  background: var(--gradient-primary);
  color: white;
  padding: 2rem;
  text-align: center;
  position: relative;
}

.login-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: white;
  border-radius: 20px 20px 0 0;
}

.login-header h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.login-header p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.9rem;
}

.login-body {
  padding: 2rem;
}

/* 侧边栏样式 - 强制滚动修复 */
.sidebar {
  background: var(--gradient-primary);
  height: 100vh !important;
  max-height: 100vh !important;
  position: fixed !important;
  top: 0;
  left: 0;
  width: 200px;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex: 0 0 auto !important;
  min-height: 60px;
}

.sidebar-title {
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.2;
}

.sidebar-nav {
  padding: 0.5rem 0 !important;
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  min-height: 0 !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

/* 侧边栏滚动条样式 - Webkit浏览器 */
.sidebar-nav::-webkit-scrollbar {
  width: 6px !important;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05) !important;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25) !important;
  border-radius: 3px !important;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4) !important;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition-fast);
  margin: 0.125rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.8rem;
  line-height: 1.3;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  transform: translateX(4px);
}

.nav-link i {
  font-size: 1rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.15);
  flex: 0 0 auto !important;
  min-height: 60px;
}

.sidebar-footer .small {
  font-size: 0.75rem;
  line-height: 1.4;
}

.sidebar-footer .text-white-50 {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

/* 主内容区域 */
.main-content {
  margin-left: 200px;
  padding: 0.75rem;
  min-height: 100vh;
  transition: var(--transition-normal);
  width: calc(100% - 200px);
  overflow-x: auto;
  box-sizing: border-box;
}

/* 页面头部 */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gray-100);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-title i {
  color: var(--primary-color);
}

.page-meta {
  color: var(--gray-500);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 卡片样式 */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  transition: var(--transition-normal);
  margin-bottom: 1.5rem;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
  padding: 1.25rem 1.5rem;
}

.card-header h5 {
  margin: 0;
  font-weight: 600;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* 统计卡片 */
.stat-card {
  background: var(--gradient-primary);
  color: white;
  text-align: center;
  padding: 1rem 0.75rem;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(20px, -20px);
}

.stat-card i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.9;
}

.stat-card h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0.25rem 0;
  line-height: 1.2;
}

.stat-card p {
  margin: 0;
  opacity: 0.9;
  font-weight: 500;
  font-size: 0.875rem;
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}

.btn-success {
  background: var(--gradient-success);
  color: white;
}

.btn-warning {
  background: var(--gradient-warning);
  color: white;
}

.btn-danger {
  background: var(--gradient-danger);
  color: white;
}

.btn-info {
  background: var(--gradient-info);
  color: white;
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* 表单样式 */
.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid #e0e6ed;
  transition: all 0.3s ease;
  font-size: 14px;
  padding: 0.5rem 0.75rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

input[type="date"] {
  position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  background: transparent;
  bottom: 0;
  color: transparent;
  cursor: pointer;
  height: auto;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: auto;
}

.form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #374151;
  font-size: 14px;
}

.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* 表格样式 */
.table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table th {
  background: var(--gray-50);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 2px solid var(--gray-100);
}

.table td {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: top;
}

.table tbody tr:hover {
  background: var(--gray-50);
}

/* 徽章样式 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge.bg-success {
  background: var(--gradient-success);
  color: white;
}

.badge.bg-danger {
  background: var(--gradient-danger);
  color: white;
}

.badge.bg-warning {
  background: var(--gradient-warning);
  color: white;
}

.badge.bg-info {
  background: var(--gradient-info);
  color: white;
}

.badge.bg-secondary {
  background: var(--gray-500);
  color: white;
}

/* 警告框样式 */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.2);
  color: #166534;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #991b1b;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
  color: #92400e;
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
  color: #1e40af;
}

/* 模态框样式 */
.modal-content {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.modal-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1.5rem;
}

.modal-title {
  font-weight: 600;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 1.5rem;
}

/* 进度条样式 */
.progress {
  background: var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 1.25rem;
}

.progress-bar {
  background: var(--gradient-primary);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  transition: width 0.6s ease;
}

/* 响应式设计 */
@media (max-width: 1400px) {
  .main-content {
    padding: 0.5rem;
  }
  
  .stat-card {
    padding: 0.75rem 0.5rem;
    min-height: 85px;
  }
  
  .stat-card i {
    font-size: 1.5rem;
    margin-bottom: 0.375rem;
  }
  
  .stat-card h3 {
    font-size: 1.375rem;
    margin: 0.125rem 0;
  }
  
  .stat-card p {
    font-size: 0.75rem;
  }
}

@media (max-width: 1200px) {
  .sidebar {
    width: 180px;
  }
  
  .main-content {
    margin-left: 180px;
    width: calc(100% - 180px);
    padding: 0.5rem;
  }
  
  .stat-card {
    padding: 0.625rem 0.375rem;
    min-height: 80px;
  }
  
  .stat-card i {
    font-size: 1.375rem;
    margin-bottom: 0.25rem;
  }
  
  .stat-card h3 {
    font-size: 1.25rem;
    margin: 0.125rem 0;
  }
  
  .stat-card p {
    font-size: 0.7rem;
  }
}

/* 移动端遮罩层 */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

.sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    z-index: 1050;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 1rem;
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
  
  .login-container {
    padding: 1rem;
  }
  
  .stat-card {
    margin-bottom: 1rem;
    padding: 1rem;
    min-height: 100px;
  }
  
  .stat-card h3 {
    font-size: 1.75rem;
  }
  
  .stat-card i {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 0.75rem;
  }
  
  .page-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
  }
  
  .stat-card {
    padding: 0.75rem;
    min-height: 90px;
  }
  
  .stat-card h3 {
    font-size: 1.5rem;
    margin: 0.25rem 0;
  }
  
  .stat-card i {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }
  
  .stat-card p {
    font-size: 0.875rem;
    margin: 0;
  }
}

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

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

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

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

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-500); }
.text-primary { color: var(--primary-color); }
.text-success { color: #22c55e; }
.text-warning { color: #f59e0b; }
.text-danger { color: #ef4444; }
.text-info { color: #3b82f6; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

/* 模态框样式优化 */
.modal-dialog {
    max-width: 800px;
}

.modal-body .row {
    margin-bottom: 0;
}

.modal-body .col-md-4,
.modal-body .col-md-6,
.modal-body .col-12 {
    margin-bottom: 1rem;
}

/* 表单标签统一样式 */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 14px;
}

/* 日期选择器优化 */
input[type="date"] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}
