/* 全球任务众包平台 — 深蓝/白/浅灰 国际化 SaaS 视觉 */
:root {
  --navy: #0f2557; --primary: #1d4ed8; --primary-h: #1e40af;
  --bg: #f5f7fa; --card: #ffffff; --line: #e3e8f0;
  --text: #1a2233; --muted: #6b7a90; --green: #16a34a; --red: #dc2626;
  --amber: #d97706; --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, "Segoe UI", "Microsoft YaHei", Arial, sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; background: #e8edf5; color: var(--text); border-radius: 9px; padding: 9px 14px; }
button.primary { background: var(--primary); color: #fff; font-weight: 600; }
button.primary:hover { background: var(--primary-h); }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
button.danger { background: #fdecec; color: var(--red); }
button.sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
a { color: var(--primary); text-decoration: none; }

header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; }
.hd { max-width: 1200px; margin: auto; display: flex; align-items: center; gap: 18px; padding: 13px 4%; }
.logo { font-weight: 800; font-size: 18px; cursor: pointer; letter-spacing: 0.3px; }
.logo small { color: #9db2e0; font-weight: 400; margin-left: 6px; }
.hd nav { display: flex; gap: 4px; }
.hd nav button, .hd .ubtn { background: transparent; color: #cdd9f2; padding: 8px 12px; border-radius: 8px; }
.hd nav button:hover, .hd nav button.active, .hd .ubtn:hover { background: #1c3572; color: #fff; }
.spacer { flex: 1; }
.badge { background: var(--red); color: #fff; font-size: 10px; border-radius: 8px; padding: 1px 5px; margin-left: 4px; }
#langToggle { background: #1c3572; color: #fff; }

.wrap { max-width: 1200px; margin: auto; padding: 22px 4%; }
.page { display: none; }
.page.active { display: block; }

.hero { background: linear-gradient(120deg, var(--navy), #24418c 65%, #2f55b0); color: #fff; border-radius: 16px; padding: 44px 8%; margin-bottom: 24px; }
.hero h1 { font-size: clamp(24px, 3.4vw, 40px); margin: 0 0 10px; }
.hero p { color: #c9d6f5; line-height: 1.9; max-width: 640px; }
.hero button { background: #fff; color: var(--navy); font-weight: 700; padding: 12px 22px; border-radius: 10px; }
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0; }
.how .card { padding: 20px; }
.how b { display: block; margin: 8px 0 6px; }
.how .n { color: var(--primary); font-size: 22px; font-weight: 800; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.task-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; cursor: pointer; transition: box-shadow 0.15s; display: flex; flex-direction: column; gap: 8px; }
.task-card:hover { box-shadow: 0 6px 18px rgba(29, 78, 216, 0.12); }
.task-card .tt { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-card .meta { color: var(--muted); font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.reward { color: var(--red); font-weight: 800; font-size: 17px; }
.reward small { font-weight: 400; color: var(--muted); font-size: 11px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; background: #eef2fb; color: var(--primary); }
.tag.gray { background: #eef0f4; color: var(--muted); }
.tag.green { background: #e7f7ee; color: var(--green); }
.tag.red { background: #fdecec; color: var(--red); }
.tag.amber { background: #fdf3e3; color: var(--amber); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: var(--card); padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 14px; }
.filters input, .filters select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); outline: none; min-width: 0; }
.filters input:focus, .filters select:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); }

.field { margin-bottom: 13px; }
.field label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); outline: none; }
.field textarea { min-height: 90px; resize: vertical; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.checkline { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--muted); font-weight: normal; font-size: 12px; }
.tbl tr:hover td { background: #f6f8fc; }
.pos { color: var(--green); font-weight: 600; } .neg { color: var(--red); font-weight: 600; }

.console { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; }
.console nav button { display: block; width: 100%; text-align: left; margin-bottom: 5px; background: transparent; color: var(--muted); }
.console nav button.active, .console nav button:hover { background: var(--card); border: 1px solid var(--line); color: var(--primary); }
.subpage { display: none; } .subpage.active { display: block; }

.modal-bg { display: none; position: fixed; inset: 0; z-index: 30; background: #0b1530bb; align-items: center; justify-content: center; padding: 16px; }
.modal-bg.show { display: flex; }
.modal { width: 100%; max-width: 480px; background: #fff; border-radius: 14px; padding: 22px; max-height: 88vh; overflow-y: auto; }
.modal h2 { margin: 0 0 16px; font-size: 18px; }
.toast { display: none; position: fixed; z-index: 60; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px; max-width: 90%; }
.toast.show { display: block; }
.muted { color: var(--muted); font-size: 12px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.filelist { display: flex; flex-wrap: wrap; gap: 8px; }
.filelist .fitem { background: #eef2fb; border-radius: 8px; padding: 5px 10px; font-size: 12px; color: var(--primary); }
.progress { height: 8px; background: #e8edf5; border-radius: 5px; overflow: hidden; margin-top: 6px; }
.progress i { display: block; height: 100%; width: 0; background: var(--primary); transition: width 0.2s; }
.statgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat .k { color: var(--muted); font-size: 12px; } .stat .v { font-size: 22px; font-weight: 800; margin-top: 4px; }
.attach { display: inline-block; margin: 3px 6px 3px 0; background: #eef2fb; color: var(--primary); padding: 4px 10px; border-radius: 7px; font-size: 12px; cursor: pointer; }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs button { border: 1px solid var(--line); background: #fff; color: var(--muted); }
.tabs button.active { border-color: var(--primary); color: var(--primary); font-weight: 600; }
.stars { color: #f59e0b; letter-spacing: 2px; }
footer { border-top: 1px solid var(--line); padding: 20px; text-align: center; color: var(--muted); font-size: 12px; background: #fff; }

@media (max-width: 860px) {
  .grid, .how, .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .console { grid-template-columns: 1fr; }
  .console nav { display: flex; overflow-x: auto; gap: 4px; }
  .console nav button { white-space: nowrap; width: auto; }
  .hd { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
  .hd nav { overflow-x: auto; }
}
