* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4f6f8;
  color: #1a1a1a;
  padding-bottom: 24px;
}
a { text-decoration: none; color: inherit; }

.g-navbar {
  position: sticky; top: 0; z-index: 50;
  background: #1565c0; color: #fff;
  padding: 14px 16px; font-size: 17px; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
}
.g-navbar .back { font-size: 20px; cursor: pointer; }

.g-page { padding: 12px 14px; }

.g-card {
  background: #fff; border-radius: 10px; padding: 14px;
  margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.g-card-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: #333; }

.g-btn {
  display: inline-block; background: #1565c0; color: #fff;
  border: none; border-radius: 8px; padding: 10px 18px;
  font-size: 14px; cursor: pointer;
}
.g-btn.ghost { background: #fff; color: #1565c0; border: 1px solid #1565c0; }
.g-btn.danger { background: #d93025; }
.g-btn.small { padding: 6px 12px; font-size: 12px; }
.g-btn.block { display: block; width: 100%; text-align: center; }
.g-btn:disabled { opacity: .5; }

.g-input, .g-select, .g-textarea {
  width: 100%; border: 1px solid #ddd; border-radius: 8px;
  padding: 10px 12px; font-size: 14px; background: #fff; color: #1a1a1a;
}
.g-textarea { resize: vertical; min-height: 70px; }
.g-form-item { margin-bottom: 12px; }
.g-form-item label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }

.g-empty { text-align: center; color: #999; font-size: 13px; padding: 30px 0; }

.g-tag {
  display: inline-block; font-size: 11px; padding: 2px 8px;
  border-radius: 10px; background: #eee; color: #666;
}
.g-tag.pending { background: #fff3cd; color: #8a6d00; }
.g-tag.in_progress { background: #d6ebff; color: #0b5cad; }
.g-tag.paused { background: #f1d6d6; color: #a33; }
.g-tag.completed, .g-tag.done { background: #d9f2e3; color: #178a4c; }

.g-progress-bar {
  height: 8px; background: #eee; border-radius: 4px; overflow: hidden; margin-top: 6px;
}
.g-progress-bar .fill { height: 100%; background: #1565c0; }

.g-site-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid #f0f0f0;
}
.g-site-item:last-child { border-bottom: none; }
.g-site-item .name { font-size: 15px; font-weight: 600; }
.g-site-item .meta { font-size: 12px; color: #999; margin-top: 4px; }

.g-tabs { display: flex; background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 52px; z-index: 40; }
.g-tab { flex: 1; text-align: center; padding: 12px 0; font-size: 14px; color: #666; cursor: pointer; }
.g-tab.active { color: #1565c0; font-weight: 600; border-bottom: 2px solid #1565c0; }

.g-fab {
  position: fixed; right: 20px; bottom: 24px;
  background: #1565c0; color: #fff; border-radius: 50%;
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; box-shadow: 0 3px 10px rgba(0,0,0,.25); cursor: pointer; border: none;
}

.g-record-row {
  display: flex; justify-content: space-between; font-size: 13px;
  padding: 8px 0; border-bottom: 1px solid #f5f5f5;
}
.g-record-row:last-child { border-bottom: none; }
.g-record-row .d { color: #999; min-width: 78px; }

.g-modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 100;
}
.g-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: #fff; border-radius: 12px; width: 88%; max-width: 380px;
  max-height: 82vh; overflow-y: auto; z-index: 101; padding: 18px;
}
.g-modal h3 { font-size: 16px; margin-bottom: 14px; }
.g-modal .actions { display: flex; gap: 10px; margin-top: 16px; }
.g-modal .actions .g-btn { flex: 1; }

.g-toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,.78); color: #fff; padding: 10px 18px; border-radius: 20px;
  font-size: 13px; z-index: 200; opacity: 0; transition: all .25s; pointer-events: none;
}
.g-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.g-loading-mask {
  position: fixed; inset: 0; background: rgba(255,255,255,.4);
  display: none; align-items: center; justify-content: center; z-index: 300;
}
.g-loading-mask.show { display: flex; }
.g-spinner {
  width: 32px; height: 32px; border: 3px solid #ddd; border-top-color: #1565c0;
  border-radius: 50%; animation: g-spin .7s linear infinite;
}
@keyframes g-spin { to { transform: rotate(360deg); } }

.g-center-page {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px; text-align: center;
}
.g-center-page h1 { font-size: 20px; margin-bottom: 8px; }
.g-center-page p { font-size: 13px; color: #888; margin-bottom: 20px; }
