/* ============================================================
 * 管理后台样式 admin.html —— 竖向侧边栏 + 账户中心
 * ============================================================ */
.admin-page { min-height: 100vh; background: #eef2f7; }

/* —— 竖向侧边栏 —— */
.admin-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 232px; z-index: 120;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  display: flex; flex-direction: column;
  box-shadow: 2px 0 24px rgba(15, 23, 42, .18);
}
.side-brand {
  display: flex; gap: 10px; align-items: center;
  padding: 18px 18px; border-bottom: 1px solid rgba(148, 163, 184, .14);
}
.side-logo {
  width: 38px; height: 38px; border-radius: 11px; font-size: 19px; flex: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .35);
}
.side-brand b { color: #fff; font-size: 15px; display: block; line-height: 1.25; }
.side-brand small { color: #94a3b8; font-size: 12px; }

.side-nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.side-item {
  display: block; color: #cbd5e1; font-size: 14px; font-weight: 500;
  padding: 10px 14px; border-radius: 10px; cursor: pointer;
  transition: all .18s;
}
.side-item:hover { color: #fff; background: rgba(148, 163, 184, .12); }
.side-item.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 6px 18px rgba(37, 99, 235, .35);
}
.side-item .side-ico { margin-right: 8px; }
.side-group { margin-top: 6px; }
.side-group-head {
  display: flex; align-items: center; gap: 6px; width: 100%;
  background: none; border: 0; cursor: pointer; text-align: left;
  color: #8aa0b8; font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  padding: 10px 14px; font-family: inherit;
}
.side-group-head .side-ico { font-size: 15px; }
.side-group-head:hover { color: #cbd5e1; }
.side-arrow { margin-left: auto; transition: transform .2s; font-size: 11px; color: #64748b; }
.side-group.open .side-arrow { transform: rotate(180deg); }
.side-sub { display: none; padding: 2px 0 6px 24px; }
.side-group.open .side-sub { display: block; }
.side-sub .side-item { padding: 8px 14px; font-size: 13.5px; }
.side-sub .side-item::before { content: "·"; margin-right: 6px; color: #64748b; }
.side-foot { padding: 14px 18px; color: #64748b; font-size: 12px; border-top: 1px solid rgba(148, 163, 184, .14); }

.side-mask { display: none; }

/* —— 主体区域 —— */
.admin-body { margin-left: 232px; min-height: 100vh; display: flex; flex-direction: column; }
.admin-top {
  position: sticky; top: 0; z-index: 110;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.admin-top-inner {
  display: flex; align-items: center; gap: 16px; height: 62px;
  max-width: 1440px; margin: 0 auto; padding: 0 26px;
}
.side-toggle {
  display: none; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  font-size: 16px; cursor: pointer; align-items: center; justify-content: center;
}
.admin-crumb { font-size: 13.5px; color: var(--text-sub); }
.admin-crumb b { color: var(--text); font-size: 16px; margin-left: 2px; }
.admin-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.admin-account {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  background: #f1f5f9; border: 1px solid transparent; border-radius: 12px;
  padding: 4px 12px 4px 4px; font-family: inherit; transition: all .18s;
}
.admin-account:hover { background: #e8eef7; border-color: #dbe4f0; }
.admin-avatar {
  width: 34px; height: 34px; border-radius: 10px; font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
}
.admin-account-info { text-align: left; line-height: 1.2; }
.admin-account-info b {
  display: block; font-size: 13.5px; color: var(--text);
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-account-info small { font-size: 11.5px; color: var(--text-sub); }
.admin-caret { color: #94a3b8; font-size: 11px; }
.admin-exit { background: #fee2e2; color: #b91c1c; white-space: nowrap; }
.admin-exit:hover { background: #fecaca; }

.admin-main { flex: 1; padding: 28px 26px 70px; max-width: 1440px; }
.admin-tab { display: none; }
.admin-tab.show { display: block; animation: fadeUp .25s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* —— 统计卡 —— */
.stat-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px; margin-bottom: 26px;
}
.s-card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 24px; box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; gap: 2px; transition: all .2s;
}
.s-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.s-card::after {
  content: ""; position: absolute; right: -24px; top: -24px; width: 90px; height: 90px;
  border-radius: 50%; background: linear-gradient(135deg, rgba(37, 99, 235, .10), rgba(59, 130, 246, 0));
}
.s-card .s-ico { font-size: 22px; margin-bottom: 6px; }
.s-card b { font-size: 28px; color: var(--primary); line-height: 1.2; }
.s-card span:last-child { font-size: 13px; color: var(--text-sub); }

/* —— 上传表单 —— */
.upload-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.upload-form input[type="file"] {
  width: 100%; padding: 9px 12px; border: 1.5px dashed var(--line);
  border-radius: 10px; background: #f8fafc; font-size: 13.5px; font-family: inherit;
}
.upload-form input[type="file"]:hover, .upload-form input[type="file"]:focus {
  border-color: var(--primary); outline: none;
}
.upload-form select {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 14.5px; font-family: inherit; outline: none; background: #fff;
}
.upload-form select:focus { border-color: var(--primary); }

/* —— Logo 上传 —— */
.logo-upload-box { background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.logo-upload-box label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 12px; }
.logo-preview {
  width: 100%; height: 150px; border-radius: 12px;
  border: 2px dashed #cbd5e1; background: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px; overflow: hidden;
}
.logo-preview img { max-width: 90%; max-height: 90%; object-fit: contain; }
.logo-ph { color: #94a3b8; font-size: 13.5px; text-align: center; line-height: 1.8; }
.logo-ph small { color: #cbd5e1; }
.logo-btns { display: flex; gap: 10px; margin-bottom: 10px; }

/* —— 空状态 / 表格 —— */
.admin-main .table td { vertical-align: middle; }
.admin-main .empty-tip { padding: 26px 0; }

/* —— 账户中心弹窗 —— */
.admin-modal-mask {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-start; justify-content: center;
  background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .2s; padding: 48px 16px; overflow-y: auto;
}
.admin-modal-mask.show { opacity: 1; pointer-events: auto; }
.admin-modal {
  width: 100%; max-width: 430px; background: #fff; border-radius: 18px;
  box-shadow: var(--shadow-lg); transform: translateY(-12px) scale(.98);
  transition: transform .22s; overflow: hidden;
}
.admin-modal-mask.show .admin-modal { transform: none; }
.am-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.am-title { font-weight: 700; font-size: 16.5px; display: flex; align-items: center; gap: 8px; }
.am-close {
  border: 0; background: #f1f5f9; width: 32px; height: 32px; border-radius: 9px;
  cursor: pointer; color: var(--text-sub); font-size: 14px;
}
.am-close:hover { background: #e2e8f0; color: var(--text); }
.am-body { padding: 20px 22px 26px; }
.am-info {
  display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 18px; font-size: 13.5px; color: var(--text);
}
.am-info .am-label { color: var(--text-sub); font-size: 12.5px; }
.am-section { padding-top: 18px; }
.am-section + .am-section { border-top: 1px dashed var(--line); margin-top: 20px; }
.am-section h4 { font-size: 14.5px; margin-bottom: 12px; }
.am-section .field { margin-bottom: 10px; }
.am-section .field label {
  font-size: 12.5px; font-weight: 600; color: var(--text-sub);
  display: block; margin-bottom: 5px;
}
.am-section input {
  width: 100%; padding: 10px 13px; border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 14px; outline: none; font-family: inherit; box-sizing: border-box;
}
.am-section input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

/* —— 响应式 —— */
@media (max-width: 960px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform .24s; }
  .admin-sidebar.show { transform: none; }
  .side-mask {
    display: none; position: fixed; inset: 0; z-index: 115;
    background: rgba(15, 23, 42, .45);
  }
  .side-mask.show { display: block; }
  .admin-body { margin-left: 0; }
  .side-toggle { display: flex; }
  .admin-top-inner { padding: 0 16px; }
  .admin-main { padding: 20px 14px 60px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .upload-row { grid-template-columns: 1fr; }
  .admin-account-info small { display: none; }
}
@media (max-width: 640px) {
  .stat-cards { grid-template-columns: 1fr; }
  .admin-account-info { display: none; }
  .admin-crumb { font-size: 12.5px; }
  .admin-crumb b { font-size: 14px; }
}
