* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #f2f3f7; color: #1a1a1a;
  font-size: 16px; line-height: 1.5;
  padding-bottom: env(safe-area-inset-bottom);
}
.hidden { display: none !important; }
.view { min-height: 100vh; }

/* 登录 */
.auth-box { max-width: 380px; margin: 0 auto; padding: 80px 24px; text-align: center; }
.auth-box h1 { font-size: 24px; margin: 0 0 6px; }
.sub { color: #888; font-size: 14px; margin: 4px 0 24px; }
.auth-box input { width: 100%; padding: 14px 16px; font-size: 18px; border: 1px solid #d0d3dc; border-radius: 10px; margin-bottom: 16px; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: #fff; padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top));
  border-bottom: 1px solid #e8e9ef; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px;
}
.counts { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 13px; padding: 3px 8px; border-radius: 12px; background: #eef0f5; color: #555; }
.badge b { color: #1a1a1a; }
.badge.pending { background: #e7f0ff; color: #2b6cb0; }
.badge.doing { background: #fff4e0; color: #b7791f; }
.badge.done { background: #e3f7e9; color: #2f855a; }
.badge.skip { background: #fde8e8; color: #c53030; }
.me { font-size: 13px; color: #666; display: flex; align-items: center; gap: 6px; }

/* 按钮 */
.btn {
  border: 1px solid #d0d3dc; background: #fff; color: #333;
  padding: 10px 16px; border-radius: 10px; font-size: 15px; cursor: pointer;
  min-height: 40px;
}
.btn:active { opacity: 0.7; }
.btn.primary { background: #2f6df6; border-color: #2f6df6; color: #fff; }
.btn.big { width: 100%; padding: 15px; font-size: 18px; min-height: 54px; font-weight: 600; }
.btn.small { padding: 7px 12px; font-size: 13px; min-height: 34px; }
.btn.link { border: none; background: none; color: #2f6df6; padding: 4px 8px; min-height: auto; font-size: 13px; }
.btn.green { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.btn.orange { background: #e67e22; border-color: #e67e22; color: #fff; }
.btn.gray { background: #888; border-color: #888; color: #fff; }

/* 卡片 */
.card-area { padding: 14px; padding-bottom: 80px; max-width: 560px; margin: 0 auto; }
.card {
  background: #fff; border-radius: 16px; padding: 18px; box-shadow: 0 2px 10px rgba(0,0,0,.05);
  margin-bottom: 14px;
}
.card .row-label { font-size: 13px; color: #999; margin-bottom: 4px; }
.field {
  background: #f6f7fb; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.field .val { flex: 1; word-break: break-all; font-size: 19px; font-weight: 600; color: #1a1a1a; }
.field .val.summary { font-size: 15px; font-weight: 500; }
.field .val.small { font-size: 13px; color: #666; font-weight: 400; }
.copybtn {
  flex-shrink: 0; background: #2f6df6; color: #fff; border: none; border-radius: 8px;
  padding: 10px 16px; font-size: 15px; font-weight: 600; min-height: 42px; cursor: pointer;
}
.copybtn:active { opacity: 0.7; }
.meta { font-size: 13px; color: #888; margin-bottom: 14px; }
.meta div { margin: 2px 0; }
.card-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.card-actions .row2 { display: flex; gap: 10px; }
.card-actions .row2 .btn { flex: 1; }

.empty { text-align: center; color: #999; padding: 60px 20px; font-size: 15px; }
.empty .big { font-size: 40px; margin-bottom: 10px; }

/* 底部 tab */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; display: flex;
  background: #fff; border-top: 1px solid #e8e9ef; z-index: 20;
  padding-bottom: env(safe-area-inset-bottom);
}
.navbtn { flex: 1; border: none; background: none; padding: 12px 0; font-size: 15px; color: #888; cursor: pointer; }
.navbtn.active { color: #2f6df6; font-weight: 600; }
.tab { display: none; padding-bottom: 70px; }
.tab.active { display: block; }

/* 列表 */
.filters { display: flex; gap: 8px; padding: 12px; align-items: center; flex-wrap: wrap; }
.filters select, .filters input { padding: 8px 10px; font-size: 14px; border: 1px solid #d0d3dc; border-radius: 8px; }
.actions { display: flex; gap: 8px; padding: 0 12px 12px; flex-wrap: wrap; }
.list { padding: 0 12px 80px; max-width: 720px; margin: 0 auto; }
.item { background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.item .t1 { font-size: 14px; font-weight: 600; word-break: break-all; }
.item .t2 { font-size: 13px; color: #555; word-break: break-all; margin-top: 3px; }
.item .t3 { font-size: 12px; color: #999; margin-top: 5px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-block; background: #e7f0ff; color: #2b6cb0; padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.tag.skip { background: #fde8e8; color: #c53030; }
.restore { font-size: 12px; color: #2f6df6; background: none; border: none; cursor: pointer; }

/* 统计 */
#statsArea { padding: 14px; padding-bottom: 80px; max-width: 560px; margin: 0 auto; }
.stat-card { background: #fff; border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.stat-card h3 { margin: 0 0 12px; font-size: 16px; }
.bar-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 14px; }
.bar-row .name { width: 60px; color: #555; }
.bar-row .bar { flex: 1; height: 18px; background: #eef0f5; border-radius: 9px; overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; background: #2f6df6; }
.bar-row .num { width: 44px; text-align: right; color: #333; font-weight: 600; }

/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-box { background: #fff; border-radius: 16px; padding: 22px; width: 100%; max-width: 340px; }
.modal-box h3 { margin: 0 0 6px; }
.modal-box input { width: 100%; padding: 12px 14px; font-size: 17px; border: 1px solid #d0d3dc; border-radius: 10px; margin: 12px 0; }
.modal-box .row { display: flex; gap: 10px; }
.modal-box .row .btn { flex: 1; }

/* toast */
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,.78); color: #fff; padding: 12px 22px; border-radius: 10px; font-size: 15px; z-index: 99; }
