/* ============================================================
   深大附中·智慧拍摄管理系统 · 全局样式 v2
   设计语言：深大附中校徽配色 —— 深蓝主色 #3245B4 + 红色点缀 #D93A3A
   浅色底 / 蓝紫渐变侧边栏 / 统一圆角阴影 / Element Plus 变量级主题
   ============================================================ */

/* ---- Element Plus 主题变量覆盖（校徽深蓝） ---- */
:root {
  --el-color-primary: #3245b4;
  --el-color-primary-light-3: #5b6bc6;
  --el-color-primary-light-5: #8893d6;
  --el-color-primary-light-7: #b5bce6;
  --el-color-primary-light-8: #ccd1ee;
  --el-color-primary-light-9: #e8eaf7;
  --el-color-primary-dark-2: #28378f;
  --el-border-radius-base: 6px;
  --el-font-family: 'Segoe UI', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body, #app {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--el-font-family);
  background: #f3f5fb;
  color: #1e2438;
}

/* ---- 滚动条 ---- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c3cade; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a5b0cc; }
::-webkit-scrollbar-track { background: transparent; }

/* ---- 加载态 ---- */
.app-loading {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6b7690;
  gap: 14px;
}
.loading-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #dde2f0;
  border-top-color: #3245b4;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 布局 ---- */
.layout { height: 100vh; display: flex; }

.sidebar {
  width: 224px;
  background: linear-gradient(180deg, #1c2464 0%, #2a3595 60%, #3245b4 100%);
  color: #c9d1f2;
  display: flex;
  flex-direction: column;
  transition: width 0.2s;
  flex-shrink: 0;
  box-shadow: 2px 0 12px rgba(28, 36, 100, 0.18);
  position: relative;
  z-index: 5;
}
.sidebar.collapsed { width: 64px; }
.sidebar .logo {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  overflow: hidden;
}
.sidebar .logo img { box-shadow: 0 0 12px rgba(255, 255, 255, 0.35); flex-shrink: 0; }
.sidebar .menu { flex: 1; padding: 14px 10px; overflow-y: auto; }
.sidebar .menu-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 4px;
  cursor: pointer;
  color: #c9d1f2;
  text-decoration: none;
  white-space: nowrap;
  gap: 10px;
  border-radius: 8px;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.sidebar .menu-item:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.sidebar .menu-item.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 600;
}
.sidebar .menu-item.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 2px;
  background: #e05a5a;
  box-shadow: 0 0 8px rgba(224, 90, 90, 0.8);
}
.sidebar.collapsed .menu-item { justify-content: center; padding: 12px 0; }
.sidebar.collapsed .menu-item span.menu-text { display: none; }

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.header {
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid #e6e9f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 1px 6px rgba(30, 36, 80, 0.05);
  position: relative;
  z-index: 4;
}
.header .header-title { font-size: 16px; font-weight: 700; color: #1e2438; }
.content {
  flex: 1;
  padding: 20px 22px;
  overflow: auto;
}

/* ---- Element Plus 细节精修 ---- */
.el-card {
  border-radius: 12px !important;
  border: 1px solid #e9ecf6 !important;
  box-shadow: 0 2px 10px rgba(30, 36, 80, 0.05) !important;
}
.el-card__header { border-bottom: 1px solid #eef0f8 !important; }
.el-table { --el-table-header-bg-color: #eef1fa; --el-table-header-text-color: #3a4364; }
.el-table th.el-table__cell { font-weight: 600; }
.el-dialog { border-radius: 14px !important; }
.el-message { border-radius: 8px !important; }
.el-button { font-weight: 500; }
.el-tag { border-radius: 6px; }

/* ---- 页面通用 ---- */
.page-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
  color: #1e2438;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.toolbar .spacer { flex: 1; }

/* ---- 统计卡片 ---- */
.stat-card {
  background: linear-gradient(160deg, #ffffff 0%, #f6f7ff 100%);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e6e9f6;
  box-shadow: 0 2px 10px rgba(30, 36, 80, 0.05);
  transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(50, 69, 180, 0.12); }
.stat-card .stat-value { font-size: 30px; font-weight: 700; color: #3245b4; }
.stat-card .stat-label { color: #7b84a0; font-size: 13px; margin-top: 4px; }

/* ---- 看板 ---- */
.board {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  overflow-x: auto;
}
.board-column {
  flex: 1;
  min-width: 220px;
  background: #edf0f9;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #e2e6f3;
}
.board-column .column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 12px;
  padding: 0 4px;
  color: #3a4364;
}
.board-card {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  border: 1px solid #e9ecf6;
  box-shadow: 0 1px 3px rgba(30, 36, 80, 0.05);
  transition: box-shadow 0.15s, transform 0.15s;
}
.board-card:hover { box-shadow: 0 5px 16px rgba(50, 69, 180, 0.12); transform: translateY(-1px); }
.board-card .card-title { font-weight: 600; margin-bottom: 6px; color: #232a45; }
.board-card .card-meta { font-size: 12px; color: #7b84a0; display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- 日历 ---- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.calendar-weekday {
  text-align: center;
  font-weight: 600;
  padding: 8px 0;
  color: #5b64a8;
  font-size: 13px;
}
.calendar-cell {
  min-height: 90px;
  background: #fff;
  border: 1px solid #e9ecf6;
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  overflow: hidden;
}
.calendar-cell:hover { background: #f5f7ff; border-color: #b5bce6; }
.calendar-cell.other-month { opacity: 0.38; }
.calendar-cell.today { border-color: #3245b4; box-shadow: 0 0 0 2px rgba(50, 69, 180, 0.15); }
.calendar-cell .cell-date { font-weight: 600; margin-bottom: 4px; font-size: 13px; color: #3a4364; }
.calendar-event {
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 4px;
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- 登录页 ---- */
.login-page {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% 15%, rgba(224, 90, 90, 0.25) 0%, transparent 55%),
    radial-gradient(1100px 650px at 10% 90%, rgba(85, 104, 214, 0.35) 0%, transparent 60%),
    linear-gradient(140deg, #171d52 0%, #2a3595 55%, #3245b4 100%);
}
.login-page::before, .login-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.login-page::before { width: 520px; height: 520px; top: -180px; right: -120px; }
.login-page::after { width: 380px; height: 380px; bottom: -140px; left: -80px; }
.login-card {
  width: 400px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 16px;
  padding: 36px 40px 32px;
  box-shadow: 0 20px 60px rgba(10, 14, 60, 0.45);
  position: relative;
  z-index: 1;
}
.login-card .login-logo {
  text-align: center;
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 6px;
  color: #1e2438;
  letter-spacing: 1px;
}
.login-card .login-sub {
  text-align: center;
  color: #7b84a0;
  font-size: 13px;
  margin-bottom: 24px;
}

/* ---- 详情对话框标签 ---- */
.detail-item { margin-bottom: 10px; }
.detail-item .detail-label {
  color: #7b84a0;
  font-size: 13px;
  margin-bottom: 2px;
}

/* ---- 空状态 ---- */
.empty-tip {
  text-align: center;
  color: #9aa3bd;
  padding: 40px 0;
}

/* ---- 顶栏时钟 ---- */
.header-clock {
  margin-left: 18px;
  color: #5a6485;
  font-variant-numeric: tabular-nums;
  user-select: none;
  display: inline-flex;
  align-items: center;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
  .sidebar { width: 64px; }
  .sidebar .menu-item span.menu-text { display: none; }
  .content { padding: 14px; }
}

/* ============================================================
   v2.1 炫酷增强层：光感渐变 + 毛玻璃 + 微动效（保持简洁不喧宾夺主）
   ============================================================ */

/* ---- 内容区：极淡光感背景 ---- */
.content {
  background:
    radial-gradient(720px 340px at 88% -5%, rgba(50, 69, 180, 0.07) 0%, transparent 60%),
    radial-gradient(600px 320px at -5% 100%, rgba(224, 90, 90, 0.05) 0%, transparent 55%),
    linear-gradient(180deg, #f6f8fe 0%, #f1f3fb 100%);
}

/* ---- 顶栏：毛玻璃 + 渐变底边 ---- */
.header {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: none;
}
.header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #3245b4, #7b8ae0 40%, rgba(224, 90, 90, 0.75) 100%);
  opacity: 0.55;
}

/* ---- 主按钮：渐变 + 悬浮光 ---- */
.el-button--primary {
  background: linear-gradient(135deg, #3245b4 0%, #4a5fd0 100%) !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(50, 69, 180, 0.28);
  transition: transform 0.15s, box-shadow 0.15s;
}
.el-button--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(50, 69, 180, 0.4);
}
.el-button--primary:active { transform: translateY(0); }

/* ---- 菜单微动效 ---- */
.sidebar .menu-item .el-icon { transition: transform 0.18s; }
.sidebar .menu-item:hover .el-icon { transform: translateX(2px) scale(1.08); }
.sidebar .logo img { animation: logoGlow 3.2s ease-in-out infinite; }
@keyframes logoGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(255, 255, 255, 0.3); }
  50% { box-shadow: 0 0 20px rgba(255, 255, 255, 0.55); }
}

/* ---- 页面切换动画 ---- */
.page-enter-active, .page-leave-active { transition: opacity 0.18s ease, transform 0.18s ease; }
.page-enter-from { opacity: 0; transform: translateY(8px); }
.page-leave-to { opacity: 0; transform: translateY(-6px); }

/* ---- 卡片 hover 光晕 ---- */
.el-card { transition: box-shadow 0.2s, border-color 0.2s; }
.el-card:hover { border-color: #b5bce6 !important; box-shadow: 0 6px 22px rgba(50, 69, 180, 0.12) !important; }

/* ---- 看板列与折叠态 ---- */
.board-column { transition: background 0.2s, border-color 0.2s; }
.board-column:hover { border-color: #b5bce6; }
.board-column .column-header:hover span { color: #3245b4; }
.board-column.collapsed { background: #f4f6fd; }
.board-column.collapsed .column-header { margin-bottom: 0; }
.board-card { border-left: 3px solid transparent; }
.board-card:hover { border-left-color: #3245b4; }

/* ---- 表格行 hover ---- */
.el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
  background: #f2f5ff !important;
}

/* ---- 页面标题渐变装饰 ---- */
.page-title {
  position: relative;
  padding-left: 12px;
}
.page-title::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, #3245b4 0%, #e05a5a 100%);
}
