/* ========== 阿里云风格全局样式 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #0064D6;
  --primary-hover: #0052B8;
  --primary-light: #E8F3FF;
  --success: #00B42A;
  --warning: #FF7D00;
  --danger: #F53F3F;
  --info: #86909C;
  --text-1: #1D2129;
  --text-2: #4E5969;
  --text-3: #86909C;
  --text-4: #C9CDD4;
  --border: #E5E6EB;
  --border-light: #F2F3F5;
  --bg-page: #F5F7FA;
  --bg-card: #FFFFFF;
  --bg-hover: #F7F8FA;
  --sidebar-bg: #FFFFFF;
  --sidebar-width: 220px;
  --header-height: 56px;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--text-1);
  background: var(--bg-page);
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

/* ========== 登录页 ========== */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0064D6 0%, #00A6FF 100%);
  position: relative;
  overflow: hidden;
}
.login-body::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  top: -200px; right: -150px;
}
.login-body::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  bottom: -100px; left: -100px;
}
.login-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  padding: 48px 40px;
  width: 400px;
  position: relative;
  z-index: 1;
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo h1 {
  font-size: 24px;
  color: var(--text-1);
  font-weight: 600;
  margin-top: 12px;
}
.login-logo p {
  color: var(--text-3);
  font-size: 13px;
  margin-top: 6px;
}
.login-logo .logo-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, #0064D6, #00A6FF);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  font-weight: bold;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-control {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-1);
  transition: all 0.2s;
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,100,214,0.1);
}
textarea.form-control {
  height: auto;
  padding: 8px 12px;
  resize: vertical;
  min-height: 80px;
}
select.form-control {
  cursor: pointer;
  background: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  gap: 6px;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-default {
  background: #fff;
  color: var(--text-1);
  border-color: var(--border);
}
.btn-default:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #D93636; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-block { width: 100%; height: 42px; font-size: 15px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.login-tip {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-3);
}

/* ========== 主布局 ========== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}
.sidebar-logo {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-light);
  gap: 10px;
}
.sidebar-logo .logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #0064D6, #00A6FF);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
}
.sidebar-logo span {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
  gap: 10px;
  font-size: 14px;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: var(--bg-hover); color: var(--primary); }
.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 500;
}
.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; }

.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.header {
  height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.header-user:hover { background: var(--bg-hover); }
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0064D6, #00A6FF);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.user-name { font-size: 13px; color: var(--text-2); }
.user-dropdown {
  position: absolute;
  top: 48px;
  right: 24px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  padding: 6px 0;
  display: none;
  z-index: 200;
}
.user-dropdown.show { display: block; }
.user-dropdown-item {
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
}
.user-dropdown-item:hover { background: var(--bg-hover); color: var(--primary); }
.user-dropdown-item.danger { color: var(--danger); }

.content {
  flex: 1;
  padding: 20px 24px;
}

/* ========== 卡片 ========== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
}

/* ========== 统计卡片 ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.stat-icon.blue { background: #E8F3FF; color: #0064D6; }
.stat-icon.green { background: #E8FFEA; color: #00B42A; }
.stat-icon.orange { background: #FFF7E8; color: #FF7D00; }
.stat-icon.red { background: #FFECE8; color: #F53F3F; }
.stat-icon.purple { background: #F5E8FF; color: #722ED1; }
.stat-info .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.2;
}
.stat-info .stat-label {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 2px;
}

/* ========== 表格 ========== */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead th {
  background: #F7F8FA;
  color: var(--text-2);
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-1);
}
tbody tr:hover { background: var(--bg-hover); }
tbody tr:last-child td { border-bottom: none; }

/* ========== 标签 ========== */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.tag-blue { background: #E8F3FF; color: #0064D6; }
.tag-green { background: #E8FFEA; color: #00B42A; }
.tag-orange { background: #FFF7E8; color: #FF7D00; }
.tag-red { background: #FFECE8; color: #F53F3F; }
.tag-gray { background: #F2F3F5; color: #86909C; }
.tag-purple { background: #F5E8FF; color: #722ED1; }
.tag-cyan { background: #E8FFFB; color: #0FC6C2; }

/* ========== 进度条 ========== */
.progress-bar {
  width: 100%;
  height: 6px;
  background: #F2F3F5;
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar .fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}
.progress-bar .fill.blue { background: #0064D6; }
.progress-bar .fill.green { background: #00B42A; }
.progress-bar .fill.orange { background: #FF7D00; }
.progress-bar .fill.red { background: #F53F3F; }

/* ========== 工具栏 ========== */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 10px; }
.search-input {
  width: 240px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,100,214,0.1); }

/* ========== 模态框 ========== */
.modal-mask {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  width: 560px;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close {
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-3);
  border-radius: 4px;
  font-size: 18px;
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-1); }
.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.form-row.full { grid-template-columns: 1fr; }

/* ========== 提醒列表 ========== */
.reminder-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border-left: 3px solid;
}
.reminder-item.danger { background: #FFECE8; border-color: var(--danger); }
.reminder-item.warning { background: #FFF7E8; border-color: var(--warning); }
.reminder-item.info { background: #E8F3FF; border-color: var(--primary); }
.reminder-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}
.reminder-item.danger .reminder-dot { background: var(--danger); }
.reminder-item.warning .reminder-dot { background: var(--warning); }
.reminder-item.info .reminder-dot { background: var(--primary); }
.reminder-content .reminder-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}
.reminder-content .reminder-detail {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}

/* ========== 空状态 ========== */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }

/* ========== Toast ========== */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #fff;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.3s ease;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== 分页 ========== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}
.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-2);
  transition: all 0.15s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ========== 项目详情页签 ========== */
.detail-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  gap: 4px;
}
.detail-tab {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.detail-tab:hover { color: var(--primary); }
.detail-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 500;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-3); cursor: pointer; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .current { color: var(--text-1); font-weight: 500; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #C9CDD4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #86909C; }
::-webkit-scrollbar-track { background: transparent; }
