/* 管理后台 */
body { background: #f1f5f9; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  width: 100%; max-width: 380px; background: #fff; border-radius: 16px; padding: 36px 28px;
  box-shadow: 0 12px 40px rgba(15,23,42,.08); text-align: center;
}
.login-card h1 { font-size: 22px; color: #111827; margin-bottom: 6px; }
.login-card p { font-size: 13px; color: #6b7280; margin-bottom: 24px; }
.login-card input {
  width: 100%; height: 46px; border: 1px solid #d1d5db; border-radius: 10px; padding: 0 14px;
  font-size: 15px; margin-bottom: 14px;
}
.login-card input:focus { border-color: #0891b2; box-shadow: 0 0 0 3px rgba(8,145,178,.12); }
.login-tip { font-size: 12px; color: #9ca3af; margin-top: 16px; }

.admin-wrap { min-height: 100vh; }
.topbar {
  height: 60px; background: #fff; border-bottom: 1px solid #e5e7eb;
  display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
  position: sticky; top: 0; z-index: 10;
}
.brand {
  font-size: 18px; font-weight: 800; letter-spacing: 1px;
  background: linear-gradient(135deg, #0891b2, #0e7490);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand::before { content: '✚ '; -webkit-text-fill-color: #0891b2; }
.topbar-right { display: flex; gap: 8px; align-items: center; }
.link-btn {
  font-size: 13px; color: #4b5563; background: #f3f4f6; padding: 8px 14px; border-radius: 8px;
  border: none; text-decoration: none;
}
.link-btn:hover { background: #e5e7eb; }

.main-content { max-width: 1180px; margin: 0 auto; padding: 24px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 12px; padding: 18px 20px; border: 1px solid #e5e7eb; }
.stat-value { font-size: 30px; font-weight: 700; color: #0891b2; line-height: 1; }
.stat-name { font-size: 13px; color: #6b7280; margin-top: 8px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid #e5e7eb; margin-bottom: 20px; overflow-x: auto; }
.tab { padding: 12px 18px; font-size: 14px; color: #6b7280; background: transparent; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab.active { color: #0891b2; border-bottom-color: #0891b2; font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.section-card { background: #fff; border-radius: 12px; padding: 22px 24px; border: 1px solid #e5e7eb; margin-bottom: 16px; }
.section-card h2 { font-size: 16px; color: #111827; margin-bottom: 18px; font-weight: 600; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-head h2 { margin: 0; }
.card-head > div { display: flex; gap: 8px; align-items: center; }

.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; color: #4b5563; margin-bottom: 6px; }
.form-row input[type=text], .form-row input[type=number], .form-row select {
  width: 100%; max-width: 420px; height: 42px; border: 1px solid #d1d5db; border-radius: 8px; padding: 0 12px; background: #fff;
}
.form-row.inline { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.form-row.inline label { margin-bottom: 10px; }
.form-row.inline input, .form-row.inline select { max-width: none; }

.field-hint { font-size: 12px; color: #9ca3af; margin-top: 6px; line-height: 1.6; }
.btn-primary { padding: 0 20px; height: 42px; width: auto; background: #0891b2; color: #fff; border-radius: 8px; font-size: 14px; font-weight: 500; }
.btn-primary:hover { background: #0e7490; }
.btn-primary:disabled { opacity: .6; }
.btn-small { background: #ecfeff; color: #0891b2; padding: 8px 14px; border-radius: 8px; font-size: 13px; }
.btn-small:hover { background: #cffafe; }
.btn-ghost { background: #f3f4f6; color: #4b5563; padding: 0 16px; height: 42px; border-radius: 8px; font-size: 14px; }
.btn-danger { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; padding: 10px 16px; border-radius: 8px; font-size: 13px; }
.btn-danger:hover { background: #fee2e2; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; padding: 10px 12px; background: #f9fafb; color: #6b7280; font-weight: 500; border-bottom: 1px solid #e5e7eb; }
.data-table td { padding: 12px; border-bottom: 1px solid #f3f4f6; color: #374151; }
.data-table tr:hover td { background: #fafafa; }
.data-table .action-btn { color: #0891b2; background: none; font-size: 12px; padding: 4px 8px; margin-right: 6px; }
.data-table .action-btn.danger { color: #dc2626; }
.data-table .empty-row { text-align: center; color: #9ca3af; padding: 30px; }
.badge-won { background: #fef3c7; color: #92400e; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.badge-normal { background: #f3f4f6; color: #6b7280; padding: 2px 8px; border-radius: 10px; font-size: 11px; }

.search-input { height: 36px; border: 1px solid #d1d5db; border-radius: 8px; padding: 0 10px; font-size: 13px; width: 200px; }

.muted-text { font-size: 13px; color: #6b7280; line-height: 1.7; margin-bottom: 16px; }
.help-list { padding-left: 20px; font-size: 13px; color: #4b5563; line-height: 1.9; }
.help-list strong { color: #0e7490; }
.draw-result { margin-top: 20px; padding: 18px; background: #fef3c7; border-radius: 10px; text-align: center; }
.draw-result .dr-prize { font-size: 20px; font-weight: 700; color: #92400e; margin-bottom: 10px; }
.draw-result .dr-names { font-size: 16px; color: #78350f; }

.danger-zone { border-color: #fecaca; }
.danger-actions { display: flex; gap: 12px; }

@media (max-width: 768px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .main-content { padding: 14px; }
  .topbar { padding: 0 14px; }
}
