* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:-apple-system,"Microsoft YaHei",sans-serif; background:#f0f2f5; color:#333; }

/* 登录页 */
.login-body { display:flex; align-items:center; justify-content:center; min-height:100vh; background:linear-gradient(135deg,#6c5ce7,#a29bfe); }
.login-box { background:#fff; border-radius:16px; padding:40px; width:100%; max-width:380px; box-shadow:0 10px 40px rgba(0,0,0,.15); }
.login-box h1 { font-size:20px; text-align:center; margin-bottom:24px; }
.login-box .form-group { margin-bottom:16px; }
.login-box label { display:block; font-size:13px; color:#666; margin-bottom:6px; }
.login-box input { width:100%; padding:10px 12px; border:1px solid #ddd; border-radius:8px; font-size:14px; outline:none; }
.login-box input:focus { border-color:#6c5ce7; }
.btn-block { width:100%; padding:12px; background:#6c5ce7; color:#fff; border:none; border-radius:8px; font-size:15px; cursor:pointer; margin-top:8px; }
.btn-block:hover { background:#5a4bd1; }
.alert { padding:10px 14px; border-radius:8px; font-size:13px; margin-bottom:16px; }
.alert.error { background:#fff5f5; color:#e74c3c; }
.alert.success { background:#f0fff4; color:#27ae60; }

/* 后台布局 */
.admin-layout { display:flex; min-height:100vh; }
.sidebar { width:220px; background:#2d3436; color:#fff; flex-shrink:0; }
.sidebar-logo { padding:20px; font-size:16px; font-weight:700; border-bottom:1px solid rgba(255,255,255,.1); }
.sidebar-nav { padding:10px 0; }
.sidebar-nav a { display:block; padding:12px 20px; color:#b2bec3; text-decoration:none; font-size:14px; transition:all .2s; }
.sidebar-nav a:hover, .sidebar-nav a.active { background:rgba(255,255,255,.08); color:#fff; border-left:3px solid #6c5ce7; }
.admin-main { flex:1; padding:30px; overflow:auto; }
.admin-content h1 { font-size:22px; margin-bottom:20px; }

/* 统计卡片 */
.stat-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:16px; margin-bottom:24px; }
.stat-card { background:#fff; border-radius:12px; padding:20px; box-shadow:0 1px 4px rgba(0,0,0,.04); }
.stat-num { font-size:22px; font-weight:700; color:#6c5ce7; margin-bottom:4px; }
.stat-label { font-size:13px; color:#999; }

/* 提示 */
.admin-tips { background:#fff; border-radius:12px; padding:24px; box-shadow:0 1px 4px rgba(0,0,0,.04); }
.admin-tips h3 { font-size:15px; margin-bottom:12px; }
.admin-tips ol { padding-left:20px; color:#666; font-size:14px; line-height:2; }

/* 设置表单 */
.settings-form { background:#fff; border-radius:12px; padding:28px; max-width:600px; box-shadow:0 1px 4px rgba(0,0,0,.04); }
.settings-form .form-group { margin-bottom:20px; }
.settings-form label { display:block; font-size:14px; font-weight:600; margin-bottom:6px; color:#444; }
.settings-form input, .settings-form textarea { width:100%; padding:10px 12px; border:1px solid #ddd; border-radius:8px; font-size:14px; outline:none; font-family:inherit; }
.settings-form input:focus, .settings-form textarea:focus { border-color:#6c5ce7; }
.form-hint { font-size:12px; color:#999; margin-top:4px; }
.form-hint code { background:#f4f4f8; padding:2px 6px; border-radius:4px; font-size:11px; }
.btn-primary { padding:10px 28px; background:#6c5ce7; color:#fff; border:none; border-radius:8px; font-size:14px; cursor:pointer; }
.btn-primary:hover { background:#5a4bd1; }

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
  .admin-layout { flex-direction: column; }
  .sidebar { width:100%; flex-shrink:0; }
  .sidebar-logo { padding:14px 16px; font-size:15px; }
  .sidebar-nav { display:flex; overflow-x:auto; padding:0; -webkit-overflow-scrolling:touch; }
  .sidebar-nav a { white-space:nowrap; padding:12px 16px; border-left:none; border-bottom:3px solid transparent; font-size:13px; }
  .sidebar-nav a:hover, .sidebar-nav a.active { border-left:none; border-bottom-color:#6c5ce7; }
  .admin-main { padding:16px; }
  .admin-content h1 { font-size:18px; margin-bottom:14px; }
  .stat-cards { grid-template-columns:repeat(2,1fr); gap:10px; }
  .stat-card { padding:14px; }
  .stat-num { font-size:18px; }
  .settings-form { padding:16px; }
  .settings-form input, .settings-form textarea { font-size:16px; padding:12px; /* iOS 防止自动缩放 */ }
  .btn-primary { width:100%; padding:14px; font-size:15px; }
  .admin-tips { padding:16px; }
  .admin-tips ol { font-size:13px; line-height:1.8; }
}
