/* ================= 管理端后台样式 ================= */
body.admin-body { background: #f0f2f5; overflow-x: hidden; }

.a-layout { display: flex; min-height: 100vh; }

/* ---------------- 侧边栏 ---------------- */
.a-sidebar {
  width: 220px; background: linear-gradient(180deg, #1e2a3a, #16202e); color: #c7d0dc;
  flex-shrink: 0; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 200;
  transition: transform .28s;
}
.a-logo { height: 62px; display: flex; align-items: center; gap: 10px; padding: 0 20px; color: #fff; font-size: 17px; font-weight: 800; border-bottom: 1px solid rgba(255,255,255,.07); }
.a-logo .ico { font-size: 24px; }
.a-nav { flex: 1; overflow-y: auto; padding: 12px 0; }
.a-nav-group { padding: 12px 20px 6px; font-size: 11px; color: #64748b; letter-spacing: 1px; text-transform: uppercase; }
.a-nav-item { display: flex; align-items: center; gap: 11px; padding: 11px 20px; cursor: pointer; font-size: 14px; transition: all .18s; border-left: 3px solid transparent; }
.a-nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.a-nav-item.active { background: rgba(0,184,148,.14); color: #fff; border-left-color: var(--primary); font-weight: 600; }
.a-nav-item .ico { font-size: 17px; width: 20px; text-align: center; }
.a-nav-item .badge-dot { margin-left: auto; background: #e17055; color: #fff; font-size: 11px; padding: 0 7px; border-radius: 20px; font-weight: 600; }

/* ---------------- 主区 ---------------- */
.a-main { flex: 1; margin-left: 220px; display: flex; flex-direction: column; min-width: 0; }
.a-topbar { height: 62px; background: #fff; display: flex; align-items: center; padding: 0 24px; gap: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.05); position: sticky; top: 0; z-index: 150; }
.a-topbar .menu-btn { display: none; font-size: 22px; cursor: pointer; }
.a-topbar .page-name { font-size: 17px; font-weight: 700; }
.a-topbar .spacer { flex: 1; }
.a-topbar .admin-user { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text-sub); }
.a-topbar .admin-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,var(--primary),var(--primary-dark)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.a-content { padding: 22px 24px; flex: 1; }

/* ---------------- 统计卡 ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-card .sc-title { font-size: 13px; color: var(--text-sub); display: flex; align-items: center; gap: 6px; }
.stat-card .sc-main { font-size: 27px; font-weight: 800; margin: 8px 0 4px; }
.stat-card .sc-sub { display: flex; gap: 14px; font-size: 12px; color: var(--text-light); }
.stat-card .sc-sub b { color: var(--text-sub); font-weight: 600; }
.stat-card .sc-ico { position: absolute; right: 16px; top: 16px; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 21px; }
.sc-green .sc-ico { background: #e6f9f4; } .sc-green .sc-main { color: #00b894; }
.sc-blue .sc-ico { background: #e7f1fd; } .sc-blue .sc-main { color: #0984e3; }
.sc-orange .sc-ico { background: #fef2e6; } .sc-orange .sc-main { color: #f0932b; }
.sc-purple .sc-ico { background: #efeafd; } .sc-purple .sc-main { color: #6c5ce7; }

/* ---------------- 面板 ---------------- */
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-head .ph-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel-head .ph-title::before { content: ''; width: 4px; height: 15px; background: var(--primary); border-radius: 2px; }
.panel-head .ph-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.panel-body { padding: 18px 20px; }
.panel-body.no-pad { padding: 0; }

/* ---------------- 工具栏（搜索/筛选） ---------------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; padding: 9px 12px; }

/* ---------------- 表格 ---------------- */
.a-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.a-table th { background: #fafbfc; text-align: left; padding: 12px 14px; font-weight: 600; color: var(--text-sub); border-bottom: 1px solid var(--border); white-space: nowrap; font-size: 13px; }
.a-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.a-table tr:hover td { background: #fafcff; }
.a-table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
.a-table .cell-sub { font-size: 12px; color: var(--text-light); }

/* ---------------- 分页 ---------------- */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 20px; }
.pager .pg-btn { min-width: 34px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 13px; color: var(--text-sub); display: inline-flex; align-items: center; justify-content: center; }
.pager .pg-btn:disabled { opacity: .45; cursor: not-allowed; }
.pager .pg-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager .pg-info { font-size: 13px; color: var(--text-sub); margin-right: auto; }

/* ---------------- 图表 ---------------- */
.chart-box { display: flex; align-items: flex-end; gap: 6px; height: 200px; padding: 10px 4px 0; overflow-x: auto; }
.chart-col { flex: 1; min-width: 26px; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bar { width: 70%; max-width: 30px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg,#4aa3f0,#0984e3); transition: height .4s; position: relative; min-height: 2px; }
.chart-bar.green { background: linear-gradient(180deg,#26c6a2,#00b894); }
.chart-bar.orange { background: linear-gradient(180deg,#ffc048,#f0932b); }
.chart-bar .val { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--text-sub); white-space: nowrap; }
.chart-label { font-size: 10px; color: var(--text-light); white-space: nowrap; }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-sub); margin-bottom: 8px; }
.chart-legend .lg { display: flex; align-items: center; gap: 5px; }
.chart-legend .dot { width: 10px; height: 10px; border-radius: 3px; }

/* ---------------- 模态框 ---------------- */
.a-modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px; }
.a-modal { background: #fff; border-radius: 16px; width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: modalIn .22s; }
.a-modal.lg { max-width: 760px; }
@keyframes modalIn { from { transform: translateY(20px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.a-modal-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.a-modal-head .t { font-size: 16px; font-weight: 700; }
.a-modal-head .close { font-size: 24px; color: var(--text-light); cursor: pointer; line-height: 1; }
.a-modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.a-modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------------- 详情描述列表 ---------------- */
.desc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.desc-list .di { font-size: 14px; }
.desc-list .di .dk { color: var(--text-sub); font-size: 12px; margin-bottom: 2px; }
.desc-list .di .dv { word-break: break-all; }
.desc-list .full { grid-column: 1 / -1; }

/* ---------------- 登录 ---------------- */
.a-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#1e2a3a 0%,#2d4a5e 50%,#1a6b5a 100%); padding: 20px; position: relative; overflow: hidden; }
.a-login-wrap::before { content: '♻'; position: absolute; font-size: 400px; opacity: .04; color: #fff; right: -60px; bottom: -100px; }
.a-login-box { background: #fff; border-radius: 20px; box-shadow: 0 24px 70px rgba(0,0,0,.35); width: 100%; max-width: 400px; padding: 40px 34px; position: relative; z-index: 2; }
.a-login-logo { text-align: center; margin-bottom: 28px; }
.a-login-logo .ico { font-size: 46px; }
.a-login-logo .name { font-size: 22px; font-weight: 800; margin-top: 8px; }
.a-login-logo .sub { font-size: 13px; color: var(--text-sub); margin-top: 4px; }

/* ---------------- 移动端 ---------------- */
@media (max-width: 900px) {
  .a-sidebar { transform: translateX(-100%); }
  .a-sidebar.open { transform: translateX(0); }
  .a-main { margin-left: 0; }
  .a-topbar .menu-btn { display: block; }
  .form-grid, .desc-list { grid-template-columns: 1fr; }
  .a-content { padding: 16px 14px; }
}
.a-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 190; }
.a-mask.show { display: block; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 46px; height: 25px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #ccc; border-radius: 25px; transition: .3s; }
.switch .slider::before { content: ''; position: absolute; height: 19px; width: 19px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .3s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(21px); }

.thumb-sm { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }
