/* ============================================================
   校际行动 管理后台 — 共享样式
   所有 admin 页面通过 <link rel="stylesheet" href="/admin/admin.css"> 引入
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #F5F7FA;
  font-size: 14px;
  color: #333;
  -webkit-font-smoothing: antialiased;
}

/* ===== Layout ===== */
.layout { display: flex; min-height: 100vh; }

/* ===== Sidebar ===== */
.sidebar {
  width: 240px;
  background: #1E293B;
  padding: 0 0 24px;
  position: fixed;
  height: 100vh;
  z-index: 100;
  box-shadow: 2px 0 6px rgba(0,0,0,0.08);
  border-right: 1px solid #0F172A;
  overflow-y: auto;
}
.sidebar .logo {
  padding: 28px 24px 24px;
  border-bottom: 1px solid #334155;
  margin-bottom: 16px;
}
.sidebar .logo h1 {
  font-size: 22px;
  color: #FFFFFF;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar .logo h1 .dot {
  width: 8px; height: 8px;
  background: #0EA5E9;
  border-radius: 50%;
}
.sidebar .logo p {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  margin-top: 6px;
}
.sidebar .menu { list-style: none; padding: 0 12px; }
.sidebar .menu li { margin-bottom: 2px; }
.sidebar .menu li a {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.sidebar .menu li a:hover {
  background: rgba(255,255,255,0.06);
  color: #FFFFFF;
}
.sidebar .menu li a.active {
  background: rgba(56,189,248,0.15);
  color: #38BDF8;
  font-weight: 600;
}
.sidebar .menu li a i {
  margin-right: 12px;
  font-size: 18px;
  width: 22px;
  text-align: center;
}

/* ===== Main content ===== */
.main { flex: 1; margin-left: 240px; padding: 28px 32px; min-width: 0; }

/* ===== Header ===== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.header h2 {
  font-size: 24px;
  color: #0F172A;
  font-weight: 700;
}
.header .user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header .user span {
  font-size: 14px;
  color: #64748B;
}
.header .user .logout-btn {
  padding: 8px 20px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 13px;
  color: #EF4444;
  cursor: pointer;
  transition: all 0.2s;
}
.header .user .logout-btn:hover {
  background: #FEF2F2;
  border-color: #FCA5A5;
}
.header .add-btn {
  padding: 10px 24px;
  background: #0EA5E9;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.header .add-btn:hover {
  background: #0284C7;
  box-shadow: 0 2px 8px rgba(14,165,233,0.3);
}

/* ===== Cards / Containers ===== */
.card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid #F1F5F9;
}
.card + .card { margin-top: 20px; }
.card h3 {
  font-size: 16px;
  color: #0F172A;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F1F5F9;
}

/* ===== Section title (dashboard recent orders etc.) ===== */
.recent-section { margin-top: 8px; }
.recent-section h3 {
  font-size: 16px;
  color: #0F172A;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ===== Search box ===== */
.search-box {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid #F1F5F9;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.search-box input {
  flex: 1;
  max-width: 320px;
  padding: 10px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.search-box input:focus { border-color: #0EA5E9; }
.search-box select {
  padding: 10px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background: #FFFFFF;
  cursor: pointer;
}
.search-box select:focus { border-color: #0EA5E9; }
.search-box .search-btn {
  padding: 10px 28px;
  background: #0EA5E9;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.search-box .search-btn:hover { background: #0284C7; }
.search-box .reset-btn {
  padding: 10px 20px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s;
}
.search-box .reset-btn:hover { background: #F8FAFC; border-color: #CBD5E1; }

/* ===== Filter bar ===== */
.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.filter-bar select {
  padding: 9px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background: #FFFFFF;
  cursor: pointer;
}

/* ===== Table ===== */
.table-container {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid #F1F5F9;
  overflow: hidden;
}
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
  padding: 14px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #F1F5F9;
}
.data-table th {
  color: #64748B;
  font-weight: 600;
  background: #F8FAFC;
  font-size: 13px;
  white-space: nowrap;
}
.data-table td { color: #334155; }
.data-table tr:hover { background: #F8FAFC; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .img-cell { width: 72px; }
.data-table .img-cell img {
  width: 48px; height: 48px;
  object-fit: cover;
  border-radius: 6px;
}

/* ===== Badges ===== */
.badge {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
  white-space: nowrap;
}
.badge.online    { background: #DCFCE7; color: #16A34A; }
.badge.offline   { background: #FEE2E2; color: #DC2626; }
.badge.ended     { background: #F1F5F9; color: #64748B; }
.badge.pending   { background: #FEF3C7; color: #D97706; }
.badge.approved  { background: #DCFCE7; color: #16A34A; }
.badge.rejected  { background: #FEE2E2; color: #DC2626; }
.badge.verified  { background: #DCFCE7; color: #16A34A; }
.badge.unverified{ background: #FEF3C7; color: #D97706; }
.badge.admin     { background: #DBEAFE; color: #2563EB; }
.badge.user      { background: #F1F5F9; color: #64748B; }
.badge.top-badge { background: #FEF3C7; color: #D97706; margin-left: 4px; }

/* ===== Action buttons ===== */
.action-btn {
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  border: none;
  margin-right: 4px;
  margin-bottom: 4px;
  transition: all 0.2s;
  display: inline-block;
  white-space: nowrap;
}
.action-btn.edit    { background: #EFF6FF; color: #2563EB; border: 1px solid #BFDBFE; }
.action-btn.edit:hover { background: #DBEAFE; }
.action-btn.delete  { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }
.action-btn.delete:hover { background: #FEE2E2; }
.action-btn.toggle  { background: #FFF7ED; color: #EA580C; border: 1px solid #FED7AA; }
.action-btn.toggle:hover { background: #FFEDD5; }
.action-btn.review  { background: #F5F3FF; color: #7C3AED; border: 1px solid #DDD6FE; }
.action-btn.review:hover { background: #EDE9FE; }
.action-btn.approve { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }
.action-btn.approve:hover { background: #DCFCE7; }
.action-btn.reject  { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }
.action-btn.reject:hover { background: #FEE2E2; }
.action-btn.verify  { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }
.action-btn.verify:hover { background: #DCFCE7; }
.action-btn.unverify{ background: #FFF7ED; color: #EA580C; border: 1px solid #FED7AA; }
.action-btn.unverify:hover { background: #FFEDD5; }
.action-btn.top     { background: #FFFBEB; color: #D97706; border: 1px solid #FDE68A; }
.action-btn.top:hover { background: #FEF3C7; }
.action-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Status select ===== */
.status-select {
  padding: 6px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  background: #FFFFFF;
  color: #334155;
  margin-right: 4px;
  outline: none;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 24px;
  padding: 0 16px 16px;
  gap: 6px;
}
.pagination button {
  padding: 8px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  background: #FFFFFF;
  cursor: pointer;
  font-size: 13px;
  color: #475569;
  transition: all 0.2s;
}
.pagination button.active {
  background: #0EA5E9;
  color: #FFFFFF;
  border-color: #0EA5E9;
}
.pagination button:hover:not(.active):not(:disabled) {
  border-color: #0EA5E9;
  color: #0EA5E9;
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== Modal / Dialog ===== */
.modal-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15,23,42,0.55);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-mask.show { display: flex; }
.modal-box {
  background: #FFFFFF;
  border-radius: 12px;
  width: 960px;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border: 1px solid #E2E8F0;
}
.modal-header {
  padding: 20px 28px;
  border-bottom: 1px solid #F1F5F9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 { font-size: 18px; color: #0F172A; font-weight: 700; }
.modal-header .close-btn {
  width: 32px; height: 32px;
  border: none;
  background: #F8FAFC;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  color: #64748B;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-header .close-btn:hover { background: #FEF2F2; color: #EF4444; }
.modal-body { padding: 24px 28px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 16px 28px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.modal-footer .cancel-btn {
  padding: 9px 24px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  color: #475569;
  transition: all 0.2s;
}
.modal-footer .cancel-btn:hover { border-color: #CBD5E1; background: #F8FAFC; }
.modal-footer .confirm-btn {
  padding: 9px 24px;
  background: #0EA5E9;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  color: #FFFFFF;
  transition: all 0.2s;
}
.modal-footer .confirm-btn:hover { background: #0284C7; }
.modal-footer .confirm-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.modal-footer .btn-danger {
  padding: 9px 24px;
  background: #EF4444;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  color: #FFFFFF;
  transition: all 0.2s;
}
.modal-footer .btn-danger:hover { background: #DC2626; }

/* ===== Simple modal (for verify info etc.) ===== */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15,23,42,0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-content {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 32px;
  max-width: 560px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border: 1px solid #E2E8F0;
}
.modal-close {
  float: right;
  font-size: 24px;
  cursor: pointer;
  color: #94A3B8;
  line-height: 1;
  transition: color 0.2s;
}
.modal-close:hover { color: #0F172A; }

/* ===== Sub modal (reject reason) ===== */
.sub-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15,23,42,0.4);
  z-index: 1001;
  display: none;
  align-items: center;
  justify-content: center;
}
.sub-mask.show { display: flex; }
.sub-box {
  background: #FFFFFF;
  border-radius: 12px;
  width: 440px;
  max-width: 92vw;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border: 1px solid #E2E8F0;
}
.sub-box h4 { font-size: 16px; color: #0F172A; margin-bottom: 16px; font-weight: 700; }
.sub-box textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}
.sub-box textarea:focus { border-color: #0EA5E9; }
.sub-box .sub-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.sub-box .btn-cancel {
  padding: 8px 20px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  cursor: pointer;
  color: #475569;
  font-size: 13px;
  transition: all 0.2s;
}
.sub-box .btn-cancel:hover { background: #F8FAFC; }
.sub-box .btn-confirm {
  padding: 8px 20px;
  background: #EF4444;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #FFFFFF;
  font-size: 13px;
  transition: all 0.2s;
}
.sub-box .btn-confirm:hover { background: #DC2626; }

/* ===== Stat cards (for dashboard & review dialog) ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.stat-card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid #F1F5F9;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.stat-card .stat-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}
.stat-card .stat-value { font-size: 32px; font-weight: 800; color: #0F172A; line-height: 1; }
.stat-card .stat-label { font-size: 13px; color: #94A3B8; margin-top: 6px; }

/* review dialog stat row */
.stat-row { display: flex; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-row .stat-card {
  flex: 1; min-width: 120px;
  padding: 14px 18px;
  background: #F8FAFC;
  border: 1px solid #F1F5F9;
  border-radius: 10px;
  box-shadow: none;
}
.stat-row .stat-card .stat-label { font-size: 12px; color: #94A3B8; margin-bottom: 4px; }
.stat-row .stat-card .stat-value { font-size: 22px; font-weight: 700; color: #0F172A; }
.stat-row .stat-card.pending .stat-value { color: #D97706; }
.stat-row .stat-card.approved .stat-value { color: #16A34A; }
.stat-row .stat-card.rejected .stat-value { color: #DC2626; }

/* ===== Filter tabs (review dialog) ===== */
.filter-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  border-bottom: 1px solid #F1F5F9;
  padding-bottom: 12px;
}
.filter-tab {
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  color: #64748B;
  background: #F8FAFC;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.filter-tab:hover { color: #0EA5E9; }
.filter-tab.active {
  background: #0EA5E9;
  color: #FFFFFF;
  border-color: transparent;
}

/* ===== Application table (review dialog) ===== */
.application-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.application-table th, .application-table td {
  padding: 12px 14px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid #F1F5F9;
}
.application-table th { color: #64748B; font-weight: 600; background: #F8FAFC; }
.application-table tr:hover { background: #F8FAFC; }
.application-table .user-info { display: flex; align-items: center; gap: 10px; }
.application-table .user-info .avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #0EA5E9;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  overflow: hidden;
  flex-shrink: 0;
}
.application-table .user-info .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.application-table .user-info .u-name { font-weight: 600; color: #0F172A; }
.application-table .reject-reason {
  color: #DC2626;
  background: #FEF2F2;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  max-width: 200px;
  line-height: 1.5;
}

/* ===== Empty state ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #94A3B8;
}
.empty-state .icon { font-size: 56px; margin-bottom: 12px; }
.empty-state .tip { font-size: 15px; }

/* ===== Form ===== */
.form-container {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid #F1F5F9;
}
.form-group { margin-bottom: 22px; }
.form-group label {
  display: block;
  font-size: 14px;
  color: #334155;
  font-weight: 600;
  margin-bottom: 8px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  background: #FFFFFF;
}
.form-group textarea { height: 100px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: #0EA5E9;
  box-shadow: 0 0 0 3px rgba(14,165,233,0.1);
}
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #F1F5F9;
}
.btn {
  padding: 10px 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn-primary { background: #0EA5E9; color: #FFFFFF; border: none; }
.btn-primary:hover { background: #0284C7; box-shadow: 0 2px 8px rgba(14,165,233,0.3); }
.btn-secondary { background: #FFFFFF; color: #475569; border: 1px solid #E2E8F0; }
.btn-secondary:hover { background: #F8FAFC; }
.btn-danger { background: #EF4444; color: #FFFFFF; border: none; }
.btn-danger:hover { background: #DC2626; }
.btn-add {
  padding: 9px 20px;
  background: #F0F9FF;
  color: #0284C7;
  border: 1px solid #BAE6FD;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.2s;
}
.btn-add:hover { background: #E0F2FE; }

/* ===== Upload area ===== */
.upload-area {
  border: 2px dashed #E2E8F0;
  border-radius: 10px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-area:hover { border-color: #0EA5E9; background: rgba(14,165,233,0.04); }
.upload-area.has-image { border-style: solid; padding: 10px; }
.upload-area img {
  max-width: 200px; max-height: 140px;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
  object-fit: cover;
}
.upload-area .upload-hint { color: #94A3B8; font-size: 14px; }
.upload-area .upload-icon { font-size: 36px; margin-bottom: 8px; }

/* ===== Tab container (home-config) ===== */
.tab-container {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid #F1F5F9;
}
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 2px solid #F1F5F9;
  padding-bottom: 0;
}
.tab {
  padding: 10px 24px;
  border-radius: 8px 8px 0 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: none;
  border: none;
  color: #94A3B8;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.tab.active { color: #0EA5E9; border-bottom-color: #0EA5E9; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.item-card {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
  position: relative;
}
.item-card:hover { border-color: #BAE6FD; }
.item-card .delete-btn {
  position: absolute;
  top: 10px; right: 10px;
  padding: 5px 14px;
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.item-card .delete-btn:hover { background: #FEE2E2; }
.save-bar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #F1F5F9;
}

/* ===== Image grid (member page) ===== */
.image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.image-card {
  background: #FFFFFF;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #F1F5F9;
}
.image-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.image-card .card-body {
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.image-card .card-body .time { font-size: 12px; color: #94A3B8; }

/* ===== Toast notification ===== */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #0F172A;
  color: #FFFFFF;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: #16A34A; }
.toast.error { background: #DC2626; }
.toast.warning { background: #D97706; }

/* ===== Loading spinner ===== */
.global-loading {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.6);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(1px);
}
.global-loading.show { display: flex; }
.global-loading .spinner {
  width: 36px; height: 36px;
  border: 3px solid #E2E8F0;
  border-top-color: #0EA5E9;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Login page ===== */
.login-body {
  background: #0F172A;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 44px;
  width: 400px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  border: 1px solid #1E293B;
  animation: scaleIn 0.4s ease-out;
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.login-box .logo { text-align: center; margin-bottom: 32px; }
.login-box .logo h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #0F172A;
}
.login-box .logo p { font-size: 13px; color: #94A3B8; margin-top: 8px; }
.login-box .error {
  color: #DC2626;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  min-height: 18px;
  text-align: center;
  display: none;
}
.login-box .error:not(:empty) { display: block; }
.login-box .tips {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #94A3B8;
  padding: 12px;
  background: #F8FAFC;
  border-radius: 8px;
}

/* ===== Home Config - Overview Bar ===== */
.overview-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}
.overview-bar .stat-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
}
.overview-bar .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 0;
  flex-shrink: 0;
}
.overview-bar .stat-info .stat-value { font-size: 28px; }
.overview-bar .stat-info .stat-label { margin-top: 4px; }

/* ===== Home Config - Section Header ===== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title .count-badge {
  display: inline-block;
  min-width: 24px;
  height: 24px;
  line-height: 24px;
  padding: 0 8px;
  background: #EFF6FF;
  color: #2563EB;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.section-actions { display: flex; gap: 10px; }

/* ===== Home Config - Item Grid ===== */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 18px;
}
.item-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  position: relative;
}
.item-card:hover {
  border-color: #BAE6FD;
  box-shadow: 0 4px 16px rgba(14,165,233,0.12);
}
.item-card .card-thumb {
  width: 100%;
  height: 160px;
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.item-card .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.item-card .card-thumb .thumb-placeholder {
  color: #CBD5E1;
  font-size: 36px;
}
.item-card .card-body {
  padding: 16px 18px;
}
.item-card .card-body .card-title {
  font-size: 15px;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-card .card-body .card-subtitle {
  font-size: 13px;
  color: #64748B;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-card .card-body .card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.item-card .card-body .card-meta .meta-tag {
  padding: 3px 10px;
  background: #F1F5F9;
  color: #64748B;
  border-radius: 4px;
  font-size: 12px;
}
.item-card .card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid #F1F5F9;
  background: #FAFBFC;
}
.item-card .card-actions .action-left { display: flex; gap: 6px; }
.item-card .delete-btn {
  position: static;
  padding: 6px 14px;
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.item-card .delete-btn:hover { background: #FEE2E2; }

/* ===== Home Config - Empty State ===== */
.config-empty {
  text-align: center;
  padding: 60px 20px;
  background: #FFFFFF;
  border: 2px dashed #E2E8F0;
  border-radius: 12px;
}
.config-empty .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.6;
}
.config-empty .empty-title {
  font-size: 16px;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 6px;
}
.config-empty .empty-desc {
  font-size: 13px;
  color: #94A3B8;
  margin-bottom: 20px;
}

/* ===== Home Config - Edit Modal ===== */
.edit-modal .modal-box { width: 640px; max-width: 92vw; }
.edit-modal .form-group { margin-bottom: 18px; }
.edit-modal .upload-area {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.edit-modal .upload-area img { max-height: 180px; }

/* ===== Home Config - Tab Footer ===== */
.tab-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding: 16px 20px;
  background: #F8FAFC;
  border-radius: 10px;
  border: 1px solid #F1F5F9;
}
.tab-footer .footer-tip {
  font-size: 13px;
  color: #64748B;
}
.tab-footer .footer-tip strong { color: #0F172A; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .image-grid { grid-template-columns: repeat(2, 1fr); }
  .item-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .overview-bar { flex-direction: column; }
}
@media (max-width: 768px) {
  .sidebar { width: 100%; height: auto; position: relative; }
  .sidebar .menu { display: flex; flex-wrap: wrap; padding: 0 12px 16px; }
  .sidebar .menu li { margin-right: 4px; }
  .sidebar .logo { padding: 20px; margin-bottom: 12px; }
  .main { margin-left: 0; padding: 20px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .image-grid { grid-template-columns: 1fr; }
  .item-grid { grid-template-columns: 1fr; }
}
