* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: -apple-system, PingFang SC, Microsoft YaHei, sans-serif; background: #f2f4f7; color: #222; font-size: 15px; line-height: 1.5; }
a { color: #1677ff; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 15px; width: 100%; padding: 10px 12px; border: 1px solid #d9d9d9; border-radius: 8px; background: #fff; }
textarea { resize: vertical; min-height: 90px; }
.hidden { display: none !important; }
#app { max-width: 560px; margin: 0 auto; min-height: 100vh; background: #f2f4f7; padding-bottom: 64px; }
.view { padding: 0 0 12px; }
.topbar { background: linear-gradient(135deg, #1677ff, #36a1ff); color: #fff; padding: 18px 16px 16px; }
.topbar h1 { margin: 0; font-size: 20px; }
.topbar .slogan { margin: 4px 0 0; font-size: 13px; opacity: .9; }
.topbar .userline { margin: 8px 0 0; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.topbar .userline button { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 999px; padding: 3px 12px; font-size: 12px; width: auto; }
.notice-bar { margin: 12px 16px 0; background: #fff7e6; border: 1px solid #ffe58f; border-radius: 10px; padding: 10px 12px; font-size: 14px; cursor: pointer; }
.notice-bar b { color: #d46b08; }
.card { background: #fff; border-radius: 12px; margin: 12px 16px 0; padding: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.card h2 { margin: 0 0 10px; font-size: 16px; }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.grid button { background: #f5f8ff; border: none; border-radius: 10px; padding: 12px 2px; font-size: 13px; color: #222; }
.grid button:active { background: #e6f0ff; }
.grid button .gi { display: block; font-size: 24px; margin-bottom: 6px; }
/* 桌面端顶部导航：移动端隐藏 */
.topnav { display: none; }
.info-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-cards button { background: #f6ffed; border: 1px solid #d9f7be; border-radius: 10px; padding: 16px 6px; font-size: 14px; }
.info-cards button:nth-child(2) { background: #e6f4ff; border-color: #bae0ff; }
.info-cards button:nth-child(3) { background: #fff1f0; border-color: #ffccc7; }
.info-cards button:nth-child(4) { background: #f9f0ff; border-color: #efdbff; }
.list-item { border-top: 1px solid #f0f0f0; padding: 10px 0; cursor: pointer; }
.list-item:first-child { border-top: none; }
.list-item .meta { color: #888; font-size: 12px; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: #e6f4ff; color: #1677ff; }
.tag.warn { background: #fff1f0; color: #cf1322; }
.tag.ok { background: #f6ffed; color: #389e0d; }
.tag.gray { background: #f5f5f5; color: #666; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.muted { color: #888; font-size: 13px; }
.money { color: #cf1322; font-weight: 700; }
.btn { display: block; width: 100%; background: #1677ff; color: #fff; border: none; border-radius: 10px; padding: 12px; font-size: 16px; margin-top: 12px; }
.btn.secondary { background: #f5f5f5; color: #222; border: 1px solid #d9d9d9; }
.btn.danger { background: #ff4d4f; }
.btn:disabled { opacity: .55; }
.field { margin-top: 12px; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; }
.seg { display: flex; gap: 8px; margin-top: 4px; }
.seg button { flex: 1; background: #f5f5f5; border: 1px solid #d9d9d9; border-radius: 8px; padding: 9px; font-size: 14px; }
.seg button.active { background: #1677ff; color: #fff; border-color: #1677ff; }
.detail { white-space: pre-wrap; word-break: break-word; }
.photo-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.photo-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
#sigCanvas { width: 100%; height: 160px; border: 1px dashed #999; border-radius: 8px; background: #fff; touch-action: none; }
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; display: flex; background: #fff; border-top: 1px solid #e8e8e8; z-index: 50; }
.tabbar button { flex: 1; background: none; border: none; padding: 10px 0 8px; font-size: 13px; color: #666; position: relative; }
.tabbar button.active { color: #1677ff; font-weight: 700; }
.badge { position: absolute; top: 4px; right: 28%; background: #ff4d4f; color: #fff; font-size: 10px; border-radius: 999px; padding: 0 5px; line-height: 16px; min-width: 16px; }
#toast { position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%); background: rgba(0,0,0,.8); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 999; max-width: 90%; text-align: center; }
.page-head { display: flex; align-items: center; gap: 8px; background: #fff; padding: 12px 16px; position: sticky; top: 0; z-index: 40; border-bottom: 1px solid #eee; }
.page-head button { width: auto; background: none; border: none; font-size: 16px; color: #1677ff; padding: 4px 8px; }
.page-head h2 { margin: 0; font-size: 17px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.summary-grid .num { font-size: 18px; font-weight: 700; }
.summary-grid .lbl { font-size: 12px; color: #888; }
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-tabs button { background: #f5f5f5; border: 1px solid #d9d9d9; border-radius: 999px; padding: 6px 14px; font-size: 13px; width: auto; }
.cat-tabs button.active { background: #1677ff; color: #fff; border-color: #1677ff; }
.auth-box { padding: 24px 16px; }
.auth-box h1 { text-align: center; font-size: 22px; }
.auth-box .slogan { text-align: center; color: #888; }

/* ---------- 桌面端（≥1024px）：宽屏高级版 ---------- */
@media (min-width: 1024px) {
  body { background: linear-gradient(180deg, #e3edfd 0%, #f2f4f7 460px); }
  #app { max-width: 1240px; padding: 0 24px 56px; background: transparent; }
  /* 顶部导航替代底部 tabbar */
  .tabbar { display: none; }
  .topnav { display: block; position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid #e8e8e8; }
  .topnav-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; height: 62px; display: flex; align-items: center; justify-content: space-between; }
  .topnav .brand { font-weight: 700; font-size: 17px; color: #1677ff; }
  .topnav-tabs { display: flex; gap: 6px; }
  .topnav-tabs button { position: relative; background: none; border: none; font-size: 15px; color: #555; padding: 9px 20px; border-radius: 999px; }
  .topnav-tabs button.active { color: #1677ff; background: #e6f0ff; font-weight: 700; }
  .topnav-tabs button:hover { background: #f0f5ff; }
  .topnav .badge { top: 2px; right: 8px; }
  /* 英雄区 */
  .topbar { border-radius: 0 0 22px 22px; padding: 44px 44px 36px; background: linear-gradient(135deg, #0f5fd6, #2f9bff 60%, #5ec8ff); position: relative; overflow: hidden; }
  .topbar::after { content: ''; position: absolute; right: -90px; top: -90px; width: 340px; height: 340px; background: radial-gradient(circle, rgba(255,255,255,.28), transparent 70%); border-radius: 50%; pointer-events: none; }
  .topbar h1 { font-size: 30px; }
  .topbar .slogan { font-size: 15px; }
  .topbar .userline { font-size: 14px; margin-top: 14px; }
  /* 卡片与网格 */
  .card { border-radius: 16px; padding: 26px; margin: 22px 0 0; box-shadow: 0 4px 18px rgba(22,119,255,.07); }
  .card h2 { font-size: 18px; margin-bottom: 16px; }
  .grid { grid-template-columns: repeat(5, 1fr); gap: 14px; }
  .grid button { padding: 22px 6px; font-size: 14px; border-radius: 14px; transition: transform .15s, box-shadow .15s, background .15s; }
  .grid button:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(22,119,255,.16); background: #fff; }
  .grid button .gi { font-size: 32px; margin-bottom: 8px; }
  .info-cards { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .info-cards button { padding: 26px 8px; font-size: 15px; border-radius: 14px; transition: transform .15s, box-shadow .15s; }
  .info-cards button:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,.09); }
  #faqList { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
  #faqList .list-item { border-top: 1px solid #f0f0f0; }
  /* 我的：双列 */
  #myView { display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; align-items: start; }
  #myView > .topbar, #myView > #adminEntryCard { grid-column: 1 / -1; }
  .summary-grid .num { font-size: 26px; }
  /* 登录卡片居中 */
  .auth-box { max-width: 440px; margin: 70px auto; background: #fff; border-radius: 20px; padding: 42px 38px; box-shadow: 0 14px 44px rgba(22,119,255,.13); }
  .notice-bar { margin: 22px 0 0; font-size: 15px; }
  .page-head { border-radius: 14px; margin-top: 22px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
  #toast { bottom: 48px; }
}
