/* 管理后台统一样式 - 深邃星空蓝 + 流光金主题 */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* 返回首页按钮 */
.home-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 36px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--bg-gradient-start);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 1px;
  box-shadow: 0 2px 12px rgba(180, 120, 20, 0.25);
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}
.home-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(180, 120, 20, 0.35);
}

/* 主内容区 - 侧边栏取消后占满宽度 */
.main-content {
  flex: 1;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 顶部栏 - 增强毛玻璃效果 */
.topbar {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 25px rgba(0,0,0,0.08);
}

.topbar-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2px;
  font-family: 'Noto Serif SC', 'STSong', serif;
}

/* 面包屑：首页时不亮（灰字 + 取消强调），子页时高亮（默认金色） */
.topbar-title.muted {
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 1.5px;
}
.topbar-title a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  transition: opacity .2s;
}
.topbar-title a:hover { opacity: .85; }

/* 面包屑：🏠 首页 / 当前页 （和课堂表现页布局配套：首页按钮在面包屑最左上角第一项） */
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Noto Serif SC', 'STSong', serif;
  letter-spacing: 1px;
}
.crumb-home {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-weight: 600;
  text-decoration: none;
  transition: opacity .2s;
}
.crumb-home:hover { color: var(--text-secondary); opacity: .8; }
.crumb-sep { color: var(--border); font-weight: 500; user-select: none; }
.crumb-current {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.admin-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.admin-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--bg-gradient-start);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: all var(--transition-normal);
}

.admin-avatar:hover {
  box-shadow: var(--shadow-md);
  transform: scale(1.08);
}

/* 内容容器 */
.content {
  flex: 1;
  padding: 28px;
  -webkit-overflow-scrolling: touch;
}

/* 页面标题 */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.page-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 3px;
  font-family: 'Noto Serif SC', 'STSong', serif;
}

.page-actions {
  display: flex;
  gap: 12px;
}

/* 卡片 - 增强毛玻璃效果 */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--transition-normal);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(212, 175, 55, 0.05),
    transparent
  );
  transition: left 0.6s ease;
  pointer-events: none;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(212, 175, 55, 0.25);
}

.card-body { padding: 28px; }

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 24px;
  border: 1px solid var(--border);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
}

/* 统计卡片流光效果 */
.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(212, 175, 55, 0.08),
    rgba(255, 255, 255, 0.03),
    transparent
  );
  transition: left 0.6s ease;
  pointer-events: none;
}

.stat-card:hover::after {
  left: 100%;
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(212, 175, 55, 0.4);
}

.stat-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.12);
  transition: all var(--transition-normal);
}

.stat-card:hover .stat-icon {
  box-shadow: var(--shadow);
  transform: scale(1.15);
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.25); }
.stat-icon.green { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.25); }
.stat-icon.orange { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.25); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.12); border-color: rgba(139, 92, 246, 0.25); }

.stat-info h3 {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.stat-info p {
  font-size: 14px;
  color: var(--text-muted);
}

/* 表格 */
.table-wrapper {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border);
}

.table-toolbar {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-box input {
  width: 260px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th, table td {
  padding: 16px 24px;
  text-align: left;
  font-size: 14px;
}

table th {
  background: rgba(212, 175, 55, 0.05);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  letter-spacing: 1px;
}

th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color var(--transition-fast);
}

th.sortable:hover {
  color: var(--accent);
}

th.sortable span {
  color: var(--accent);
  font-weight: bold;
}

table tr {
  border-bottom: 1px solid rgba(212, 175, 55, 0.06);
  transition: background var(--transition-fast);
}

table tr:last-child { border-bottom: none; }

table tr:hover { 
  background: rgba(212, 175, 55, 0.05); 
}

table td { color: var(--text); }

.table-empty {
  text-align: center;
  padding: 80px;
  color: var(--text-muted);
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(8px);
}

.tag-blue { background: rgba(59, 130, 246, 0.12); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.25); }
.tag-green { background: rgba(16, 185, 129, 0.12); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.25); }
.tag-orange { background: rgba(245, 158, 11, 0.12); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.25); }
.tag-red { background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.25); }
.tag-gray { background: rgba(107, 114, 128, 0.12); color: var(--text-muted); border: 1px solid rgba(107, 114, 128, 0.25); }

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}

.pagination button {
  padding: 10px 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.pagination button:hover:not(:disabled) {
  background: rgba(212, 175, 55, 0.1);
  color: var(--accent);
  border-color: rgba(212, 175, 55, 0.3);
}

.pagination button.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: var(--bg-gradient-start);
  border-color: var(--accent);
  font-weight: 600;
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination .page-info {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 14px;
}

/* 相册网格 */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.album-item {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  position: relative;
}

.album-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(212, 175, 55, 0.06),
    transparent
  );
  transition: left 0.6s ease;
  z-index: 1;
  pointer-events: none;
}

.album-item:hover::before {
  left: 100%;
}

.album-item:hover { 
  transform: translateY(-8px); 
  box-shadow: var(--shadow-glow);
  border-color: rgba(212, 175, 55, 0.4);
}

.album-item .album-img-wrap {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
  background: rgba(0, 0, 0, 0.2);
}

.album-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: transform var(--transition-slow);
}

.album-item:hover img { transform: scale(1.1); }

.album-item-info {
  padding: 16px 18px 8px;
  flex: 1;
}

.album-item-info h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.album-item-info p {
  font-size: 13px;
  color: var(--text-muted);
}

.album-item-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 0 18px 16px;
}

/* 课表 */
.schedule-grid {
  display: grid;
  grid-template-columns: 56px 80px repeat(7, 1fr);
  gap: 1px;
  background: #cbd5e1; /* 内部格线色 */
  border: 1px solid #cbd5e1; /* 外边框 */
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.schedule-cell {
  background: #ffffff; /* 不透明底色，格线清晰可见 */
  padding: 14px;
  min-height: 70px;
  font-size: 13px;
}

/* 左侧时段列（上午/下午/晚自习，跨行合并） */
.schedule-period {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff; /* 白色底，与其他格子一致 */
  border-right: 1px solid #cbd5e1; /* 与时间列的竖向分隔线 */
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 2px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  padding: 8px 4px;
}

.schedule-header {
  background: rgba(212, 175, 55, 0.1);
  font-weight: 600;
  text-align: center;
  color: var(--accent);
}

.schedule-time {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.course-block {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--accent);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  margin-top: 6px;
  cursor: grab;
  transition: all var(--transition-fast);
  position: relative;
  text-align: center;
}

.course-block:active {
  cursor: grabbing;
}

.course-block:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  background: rgba(212, 175, 55, 0.18);
}

.course-block .course-name { font-weight: 600; padding-right: 16px; }
.course-block .course-info { font-size: 11px; opacity: 0.8; }

.course-remove-btn {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 20px;
  height: 20px;
  line-height: 18px;
  text-align: center;
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border: none;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transition: all var(--transition-fast);
}

.course-block:hover .course-remove-btn {
  opacity: 1;
}

.course-remove-btn:hover {
  background: var(--danger);
  color: #fff;
}

.schedule-drop-zone {
  transition: background var(--transition-fast);
}

.schedule-drop-zone.drop-target {
  background: rgba(212, 175, 55, 0.2);
  border: 2px dashed var(--accent);
}

/* 课程模块栏 */
.course-modules {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.course-modules-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.course-modules-list {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.course-module {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--accent);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: copy;
  transition: all var(--transition-fast);
}

.course-module:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* 拖拽排序 */
.drag-handle {
  color: var(--text-muted);
  cursor: grab;
  user-select: none;
  font-size: 20px;
  letter-spacing: -2px;
  transition: color var(--transition-fast);
}

.drag-handle:active {
  cursor: grabbing;
}

.drag-handle:hover {
  color: var(--accent);
}

.course-row {
  transition: background var(--transition-fast);
}

.course-row.drag-over {
  border-top: 2px solid var(--accent);
}

.course-row.drag-over td {
  background: rgba(212, 175, 55, 0.08);
}

/* 通知列表 */
.notice-item {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  border-left: 4px solid var(--border);
  border: 1px solid var(--border);
  transition: all var(--transition-normal);
}

.notice-item:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(212, 175, 55, 0.3);
}

.notice-item.pinned { border-left-color: var(--accent); background: rgba(212, 175, 55, 0.05); }

.notice-item h4 {
  font-size: 17px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.notice-item .notice-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.notice-item .notice-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
}

.notice-actions {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* 上传区 */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 44px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.02);
}

.upload-area:hover {
  border-color: var(--accent);
  background: rgba(212, 175, 55, 0.05);
  box-shadow: var(--shadow-sm);
}

.upload-area .upload-icon {
  font-size: 48px;
  margin-bottom: 14px;
  color: var(--accent);
}

.upload-area p {
  color: var(--text-muted);
  font-size: 14px;
}

/* 余额展示 */
.balance-card {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.03) 100%);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}

.balance-card .balance-label {
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.balance-card .balance-amount {
  font-size: 42px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  text-shadow: none;
}

.balance-card .balance-details {
  text-align: right;
  font-size: 13px;
  opacity: 0.9;
  color: var(--text-secondary);
}

.balance-card .balance-details div {
  margin-bottom: 6px;
}

/* ============ 移动端菜单按钮 ============ */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #0f2942, #1a3a5c);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4), 0 0 8px rgba(212,175,55,0.3);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ============ 平板端适配（OPPO平板竖屏/横屏，触摸设备 769-1280px） ============ */
/* 平板端全局禁用 backdrop-filter，大幅降低 GPU 负载 */
html.tablet, html.tablet * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
/* 禁用 backdrop-filter 后需提供不透明背景 */
html.tablet .topbar { background: rgba(255, 255, 255, 0.97) !important; }
html.tablet .card,
html.tablet .stat-card,
html.tablet .table-wrapper,
html.tablet .modal {
  background: #ffffff !important;
}
/* 禁用星空动画和伪元素流光，降低 GPU 负载 */
html.tablet body::before,
html.tablet body::after { animation: none !important; }
html.tablet .card::before,
html.tablet .stat-card::before,
html.tablet .stat-card::after,
html.tablet .btn::before,
html.tablet .btn::after { display: none !important; }
html.tablet .topbar { padding-left: 28px; }
html.tablet .content { padding: 20px; }
html.tablet .stats-grid { grid-template-columns: repeat(3, 1fr); }
html.tablet .form-grid { grid-template-columns: repeat(2, 1fr); }
html.tablet .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
html.tablet .modal { width: 85%; }
html.tablet .btn { min-height: 44px; }
html.tablet .btn-sm { min-height: 40px; }
html.tablet .schedule-cell { backdrop-filter: none; }
html.tablet .schedule-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
html.tablet .schedule-grid { min-width: 660px; }

/* ============ 手机端响应式 ============ */
@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
  }

  .topbar {
    padding: 0 16px;
    height: 52px;
  }
  .topbar-title { font-size: 16px; letter-spacing: 1px; }
  .topbar-right { gap: 12px; }
  .admin-info { gap: 8px; font-size: 12px; }
  .admin-avatar { width: 34px; height: 34px; font-size: 14px; }
  .admin-info span { display: none; }
  .home-btn { padding: 0 10px; font-size: 13px; height: 32px; }

  .content { padding: 16px; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .stat-card { padding: 20px; gap: 16px; }
  .stat-icon { width: 52px; height: 52px; font-size: 24px; }
  .stat-info h3 { font-size: 26px; }
  .stat-info p { font-size: 12px; }

  .card { padding: 16px; }

  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 500px; }
  table th, table td { padding: 12px 16px; font-size: 13px; }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .search-box { flex-wrap: wrap; }
  .search-box input { width: 100%; }
  .page-actions { justify-content: flex-end; }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .album-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .album-item .album-img-wrap { height: 150px; }

  .schedule-grid {
    min-width: 600px;
    overflow-x: auto;
  }
  .schedule-wrapper { overflow-x: auto; }

  .balance-card {
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    text-align: center;
  }
  .balance-card .balance-amount { font-size: 34px; }
  .balance-card .balance-details { text-align: center; }

  .pagination { flex-wrap: wrap; gap: 10px; }
  .pagination .page-info { width: 100%; text-align: center; margin: 8px 0; }

  .modal { width: 92%; margin: 12px; }
  .modal-body { padding: 20px; }
  .modal-header { padding: 20px; }
  .modal-header h3 { font-size: 18px; }

  .upload-area { padding: 32px; }
  .upload-area .upload-icon { font-size: 36px; }

  .btn { padding: 10px 14px; font-size: 13px; min-height: 44px; }
  .btn-sm { padding: 8px 12px; font-size: 12px; min-height: 40px; }

  input, textarea, select { font-size: 14px; padding: 12px; min-height: 44px; }
}

/* ============ OPPO/自带浏览器触摸优化 ============ */
html.bad-webview .btn { min-height: 44px; }
html.bad-webview .stat-card { cursor: default; }
html.bad-webview .pagination button,
html.bad-webview .pagination a { min-height: 40px; min-width: 40px; }

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .album-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-title { font-size: 15px; }
}

/* ============ 概览页倒计时卡片 ============ */
.countdown-card { margin-top: 20px; }
.countdown-list { display: flex; flex-direction: column; gap: 16px; }

.countdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  transition: all var(--transition-normal);
  border: 1px solid var(--border);
}

.countdown-item:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow);
}

.countdown-item.urgent { border-left-color: var(--danger); background: rgba(239, 68, 68, 0.05); }
.countdown-item.warning { border-left-color: var(--warning); background: rgba(245, 158, 11, 0.05); }
.countdown-item.normal { border-left-color: var(--accent); }

.countdown-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.countdown-date {
  font-size: 13px;
  color: var(--text-muted);
}

.countdown-time {
  display: flex;
  gap: 12px;
}

.time-box {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.15);
  padding: 14px 18px;
  border-radius: 12px;
  text-align: center;
  min-width: 60px;
  backdrop-filter: blur(8px);
}

.time-box span:first-child {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.time-box .label {
  font-size: 11px;
  color: var(--text-muted);
}

.countdown-item.urgent .time-box { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.15); }
.countdown-item.urgent .time-box span:first-child { color: var(--danger); }
.countdown-item.warning .time-box { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.15); }
.countdown-item.warning .time-box span:first-child { color: var(--warning); }

/* ============ 概览页相册卡片 ============ */
.album-card { margin-top: 20px; }
.album-stats {
  display: flex;
  gap: 24px;
}

.album-stat-item {
  flex: 1;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  padding: 28px;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--border);
  transition: all var(--transition-normal);
}

.album-stat-item:hover {
  box-shadow: var(--shadow-glow);
  border-color: rgba(212, 175, 55, 0.3);
}

.album-stat-num {
  font-size: 46px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.album-stat-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 10px;
}

@media (max-width: 768px) {
  .countdown-item {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 18px 16px;
  }
  .countdown-name {
    font-size: 15px;
  }
  .countdown-time {
    margin-top: 12px;
    width: 100%;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .countdown-time .time-box {
    min-width: 0;
    flex: 1 1 calc(25% - 8px);
    padding: 10px 8px;
    min-height: 64px;
  }
  .countdown-time .time-box span:first-child {
    font-size: 20px;
  }
  .countdown-time .time-box .label {
    font-size: 10px;
  }

  .album-stats {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .countdown-item {
    padding: 16px 14px;
    gap: 12px;
  }
  .countdown-time {
    gap: 6px;
  }
  .countdown-time .time-box {
    padding: 8px 4px;
    border-radius: 8px;
    min-height: 58px;
  }
  .countdown-time .time-box span:first-child {
    font-size: 18px;
  }
  .countdown-time .time-box .label {
    font-size: 9px;
  }
}

/* ============ 主页功能卡片网格 ============ */
.function-section { margin-bottom: 28px; }

.function-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  display: flex;
  align-items: center;
  gap: 8px;
}

.function-section-title .section-icon {
  font-size: 20px;
}

.function-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.function-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 12px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  min-height: 110px;
  box-shadow: var(--shadow-sm);
}

.function-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.08), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
}

.function-card:hover::before { left: 100%; }

.function-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(212, 175, 55, 0.4);
}

.function-card .fc-icon {
  font-size: 34px;
  line-height: 1;
  transition: transform var(--transition-normal);
}

.function-card:hover .fc-icon {
  transform: scale(1.15);
}

.function-card .fc-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
}

/* 功能卡片彩色主题 */
.function-card.cat-students { border-top: 3px solid #3b82f6; }
.function-card.cat-students:hover { border-color: #3b82f6; }
.function-card.cat-academic { border-top: 3px solid #10b981; }
.function-card.cat-academic:hover { border-color: #10b981; }
.function-card.cat-finance { border-top: 3px solid #f59e0b; }
.function-card.cat-finance:hover { border-color: #f59e0b; }
.function-card.cat-activity { border-top: 3px solid #8b5cf6; }
.function-card.cat-activity:hover { border-color: #8b5cf6; }
.function-card.cat-duty { border-top: 3px solid #06b6d4; }
.function-card.cat-duty:hover { border-color: #06b6d4; }
.function-card.cat-tools { border-top: 3px solid #ec4899; }
.function-card.cat-tools:hover { border-color: #ec4899; }
.function-card.cat-work { border-top: 3px solid #84cc16; }
.function-card.cat-work:hover { border-color: #84cc16; }
.function-card.cat-system { border-top: 3px solid #64748b; }
.function-card.cat-system:hover { border-color: #64748b; }

/* 平板端功能卡片 */
html.tablet .function-grid {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

/* 手机端功能卡片 */
@media (max-width: 768px) {
  .function-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }
  .function-card {
    padding: 14px 8px;
    min-height: 90px;
    gap: 6px;
  }
  .function-card .fc-icon { font-size: 28px; }
  .function-card .fc-label { font-size: 12px; }
  .function-section-title { font-size: 14px; letter-spacing: 1px; }
}

@media (max-width: 480px) {
  .function-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
  .function-card {
    padding: 10px 4px;
    min-height: 78px;
    gap: 4px;
  }
  .function-card .fc-icon { font-size: 24px; }
  .function-card .fc-label { font-size: 11px; }
}

/* ============ 页面底部备案 Footer（蓝色背景） ============ */
.admin-footer {
  margin-top: auto;
  padding: 22px 28px 26px;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.8;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #16337a 0%, #1d4ed8 100%);
}
.admin-footer .sep {
  display: inline-block;
  margin: 0 10px;
  opacity: 0.45;
}
.admin-footer a {
  color: #ffd966;
  text-decoration: none;
  transition: color .2s;
}
.admin-footer a:hover { color: #ffffff; }
.admin-footer .icp-line { letter-spacing: .5px; }
.admin-footer .version-line {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: .5px;
}
@media (max-width: 768px) {
  .admin-footer { padding: 26px 16px 32px; font-size: 12px; }
  .admin-footer .sep { margin: 0 6px; }
}

/* ============ 统一：详情/列表页 顶部 返回按钮（左上角 + 橙色渐变） ============ */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.detail-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .5px;
}
.detail-title .back-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1a1a0f;
  border: none;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.32);
  flex-shrink: 0;
  transition: all .2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.detail-title .back-btn:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.42);
  color: #1a1a0f;
}