/* ===== 光合公会 Photo Guild · 现代工作界面 ===== */
:root {
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --surface-soft: #FAFBFC;
  --line: #E6E8EC;
  --line-strong: #D6D9DF;
  --ink: #1B1F27;
  --ink-2: #4A5260;
  --muted: #8A919E;
  --brand: #E8A33D;       /* 琥珀：保留阳光感，仅作点缀 */
  --brand-deep: #C9862A;
  --brand-soft: #FEF4E4;
  --teal: #2E9C8E;        /* 辅助成功色 */
  --teal-soft: #E9F6F3;
  --blue: #4A76C4;
  --blue-soft: #EDF3FC;
  --red: #D9534F;
  --red-soft: #FCEDEC;
  --shadow-sm: 0 1px 2px rgba(20, 26, 38, .04);
  --shadow: 0 2px 8px rgba(20, 26, 38, .05), 0 12px 32px rgba(20, 26, 38, .04);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.6;
}
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
.hidden { display: none !important; }
.muted { color: var(--muted); font-weight: 400; font-size: 13px; }

/* ---------- 通用按钮 ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--ink); color: #fff; border: 1px solid var(--ink);
  padding: 9px 18px; border-radius: 9px; font-weight: 600; font-size: 13.5px;
  transition: background .15s, transform .1s;
}
.btn-primary:hover { background: #303743; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-strong);
  padding: 8px 15px; border-radius: 9px; font-weight: 600; font-size: 13px;
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent; color: var(--ink-2); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 9px; font-size: 13px;
}
.btn-ghost:hover { background: var(--surface-soft); border-color: var(--line-strong); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-accent { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-accent:hover { background: var(--brand-deep); }
.link-btn { background: none; border: none; color: var(--blue); font-size: 13px; font-weight: 600; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-size: 16px; line-height: 1;
}
.icon-btn:hover { color: var(--red); border-color: var(--red); background: var(--red-soft); }

/* ---------- 登录 / 注册 ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.auth-card {
  width: 100%; max-width: 420px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px; padding: 38px 34px 30px;
  box-shadow: var(--shadow);
}
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.auth-logo-mark {
  width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-deep); font-size: 21px;
}
.auth-logo-text { font-size: 19px; font-weight: 700; letter-spacing: .2px; }
.auth-logo-text small { display: block; font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: 1.6px; text-transform: uppercase; }
.auth-h1 { font-size: 22px; font-weight: 700; margin: 0 0 6px; letter-spacing: -.3px; }
.auth-sub { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.brand-en { font-size: 11px; font-weight: 700; letter-spacing: .5px; opacity: .65; margin-left: 6px; }
.side-brand .brand-en { display: block; margin-left: 0; margin-top: 2px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 20px; }
.tab { flex: 1; padding: 8px; border: none; background: transparent; color: var(--muted); border-radius: 7px; font-weight: 600; font-size: 13.5px; }
.tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; display: block; }
.auth-form input { padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 9px; font-size: 14px; outline: none; color: var(--ink); background: var(--surface); }
.auth-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232, 163, 61, .14); }
.auth-form .btn-primary { margin-top: 4px; padding: 11px; }
.hint { font-size: 12px; min-height: 14px; }
.secure-warn {
  background: #FFF8E9; border: 1px solid #F3D69B; color: #8A5B12;
  padding: 10px 12px; border-radius: 9px; font-size: 12.5px; line-height: 1.6; margin-bottom: 16px;
}
.local-note {
  margin-top: 20px; font-size: 12px; color: var(--muted);
  background: var(--surface-soft); border: 1px solid var(--line);
  padding: 10px 12px; border-radius: 9px; line-height: 1.6;
}

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 238px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--line); padding: 24px 14px 18px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.side-brand {
  display: flex; align-items: center; gap: 10px; padding: 0 10px 22px;
  font-size: 17px; font-weight: 700; color: var(--ink); letter-spacing: -.2px;
}
.side-mark {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand-deep); font-size: 18px;
}
.side-section { font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: 1.2px; padding: 0 12px; margin: 6px 0 10px; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 11px; text-align: left;
  padding: 9px 12px; border: 1px solid transparent; background: transparent;
  border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); transition: all .14s;
  position: relative;
}
.nav-item .nav-ic { width: 18px; text-align: center; font-size: 15px; color: var(--muted); flex-shrink: 0; }
.nav-item:hover { background: var(--surface-soft); color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-deep); font-weight: 700; }
.nav-item.active .nav-ic { color: var(--brand-deep); }
.nav-item.active::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.side-foot {
  border-top: 1px solid var(--line); padding-top: 14px; margin-top: 10px;
  display: flex; align-items: center; gap: 10px;
}
.side-foot .sf-avatar { width: 32px; height: 32px; border-radius: 9px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.side-foot .sf-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.side-foot .sf-role { font-size: 11px; color: var(--muted); }
.side-foot .logout { margin-left: auto; background: none; border: none; color: var(--muted); font-size: 16px; padding: 4px; }
.side-foot .logout:hover { color: var(--red); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 32px; border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 5;
}
.topbar-left { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.topbar-title { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.topbar-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.bell { position: relative; background: none; border: 1px solid var(--line); border-radius: 9px; width: 34px; height: 34px; font-size: 15px; color: var(--ink-2); }
.bell:hover { background: var(--surface-soft); }
.bell-dot { position: absolute; top: -5px; right: -5px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid #fff; }
.top-user { display: flex; align-items: center; gap: 9px; }
.avatar {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.avatar.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; background: var(--surface-soft); color: var(--ink-2); border: 1px solid var(--line); }
.uname { font-weight: 600; font-size: 13px; line-height: 1.3; }
.urole { font-size: 11.5px; color: var(--muted); }

.content { padding: 28px 32px 70px; max-width: 1000px; width: 100%; margin: 0 auto; }
.page-head { margin-bottom: 22px; }
.page-title { font-size: 23px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.5px; }
.page-desc { color: var(--muted); font-size: 13px; margin: 0; }
.sec { font-size: 14px; font-weight: 700; margin: 26px 0 12px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.sec:first-child { margin-top: 0; }
.sec-line { flex: 1; height: 1px; background: var(--line); }

/* ---------- 卡片 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 12px; }
.card-pad-lg { padding: 22px; }
.empty { color: var(--muted); text-align: center; padding: 34px 16px; font-size: 13.5px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-soft); }
.empty .empty-ic { font-size: 26px; display: block; margin-bottom: 8px; opacity: .5; }

/* ---------- 晨报 ---------- */
.summary-card {
  background: linear-gradient(112deg, #FFF9EE 0%, #FFFDF9 62%, #FFFFFF 100%);
  border: 1px solid #F2E3C8; border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px;
  position: relative; overflow: hidden;
}
.summary-card::after { content: ''; position: absolute; right: -30px; top: -40px; width: 150px; height: 150px; border-radius: 50%; background: rgba(232, 163, 61, .07); }
.summary-head { font-weight: 700; margin-bottom: 10px; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.summary-head .badge-new { font-size: 11px; font-weight: 600; background: var(--brand-soft); color: var(--brand-deep); border-radius: 6px; padding: 2px 7px; }
.summary-body { white-space: pre-wrap; font-size: 13.5px; line-height: 1.85; margin: 0 0 14px; color: var(--ink-2); font-family: inherit; position: relative; z-index: 1; }

/* ---------- 表单 / 输入（重点修复） ---------- */
.composer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.composer-title { font-size: 14px; font-weight: 700; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.composer textarea, .composer input[type="text"], .composer input[type="date"], .composer select, .form-control {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 9px;
  font-size: 14px; outline: none; font-family: inherit; color: var(--ink);
  background: var(--surface); line-height: 1.6; min-height: 42px;
}
.composer textarea { min-height: 84px; resize: vertical; display: block; }
.composer textarea:focus, .composer input:focus, .composer select:focus, .form-control:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232, 163, 61, .14);
}
.composer ::placeholder, .form-control::placeholder { color: #A6ADB9; }
.composer-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 12px; }
.composer-hint { font-size: 12px; color: var(--muted); margin-right: auto; }

/* 工作进度：明确网格，杜绝 flex 挤压导致输入框变竖缝、打字不可见 */
.progress-form { display: grid; grid-template-columns: 152px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.progress-form input[type="date"] { min-width: 0; color: var(--ink); }
.progress-form input[type="text"] { min-width: 0; height: 42px; font-size: 14px; }
.progress-form .btn-primary { height: 42px; white-space: nowrap; padding: 0 22px; }
@media (max-width: 640px) { .progress-form { grid-template-columns: 1fr; } }

/* 输入行（任务拆解编辑器） */
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field .field-label { margin-bottom: 6px; }
.subtask-editor { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.subtask-edit-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 170px 30px; gap: 8px; align-items: center; }
.subtask-edit-row .row-num { font-size: 12px; color: var(--muted); text-align: center; font-weight: 600; }
.subtask-edit-row input, .subtask-edit-row select { width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 9px; font-size: 13.5px; outline: none; color: var(--ink); background: var(--surface); height: 38px; }
.subtask-edit-row input:focus, .subtask-edit-row select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232, 163, 61, .14); }
.subtask-edit-row select { color: var(--brand-deep); background: var(--brand-soft); border-color: #F0DCB8; font-weight: 600; cursor: pointer; }
@media (max-width: 720px) {
  .subtask-edit-row { grid-template-columns: 22px minmax(0, 1fr) 30px; }
  .subtask-edit-row select { grid-column: 2 / 3; }
  .subtask-edit-row .icon-btn { grid-column: 3; grid-row: 1 / span 2; }
}
.add-row-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px dashed var(--line-strong); color: var(--ink-2); padding: 8px 13px; border-radius: 9px; font-size: 13px; font-weight: 600; }
.add-row-btn:hover { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg-btn { padding: 7px 14px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg-btn.active { border-color: var(--brand); color: var(--brand-deep); background: var(--brand-soft); }

/* ---------- 想法流 ---------- */
.feed-item .feed-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.feed-head b { font-size: 13.5px; }
.feed-text { font-size: 14px; line-height: 1.75; white-space: pre-wrap; color: var(--ink-2); word-break: break-word; }
.feed-actions { margin-top: 12px; }
.comments { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.comment { font-size: 13px; line-height: 1.6; padding: 5px 0; color: var(--ink-2); }
.comment-input { display: flex; gap: 8px; margin-top: 10px; }
.comment-input input { flex: 1; min-width: 0; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 9px; font-size: 13px; outline: none; color: var(--ink); }
.comment-input input:focus { border-color: var(--brand); }
.comment-send { background: var(--ink); color: #fff; border: none; border-radius: 9px; padding: 8px 15px; font-size: 13px; font-weight: 600; white-space: nowrap; }

/* ---------- 进度 / 通用 chip ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-soft); color: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.chip-normal { background: var(--blue-soft); color: var(--blue); border-color: #DCE8F8; }
.chip-urgent { background: var(--red-soft); color: var(--red); border-color: #F6D9D7; }
.chip-longterm { background: var(--teal-soft); color: var(--teal); border-color: #D5EDE8; }
.chip-brand { background: var(--brand-soft); color: var(--brand-deep); border-color: #F2E1C2; }
.prog-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.prog-item .prog-main { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); word-break: break-word; }
.prog-item .prog-main b { color: var(--ink); }
.prog-item .prog-time { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---------- 任务墙 ---------- */
.diff-item { padding: 0; overflow: hidden; }
.diff-body { padding: 18px 20px; }
.diff-item .feed-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 10px; }
.diff-title { font-size: 15px; font-weight: 600; line-height: 1.6; color: var(--ink); word-break: break-word; }
.diff-meta { font-size: 12px; color: var(--muted); }
.subtasks { margin: 14px 0 0; display: flex; flex-direction: column; gap: 7px; }
.subtask {
  display: flex; align-items: center; gap: 11px; background: var(--surface-soft);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; min-width: 0;
}
.subtask.is-assigned { background: #FFFDF8; border-color: #F0E4CC; }
.subtask.is-done { opacity: .72; }
.sub-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex-shrink: 0; }
.sub-dot.on { background: var(--teal); }
.sub-dot.assigned { background: var(--brand); }
.sub-main { flex: 1; min-width: 0; }
.sub-title { font-size: 13.5px; line-height: 1.5; word-break: break-word; }
.sub-title.done { text-decoration: line-through; color: var(--muted); }
.sub-assignee { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.sub-assignee .who { color: var(--brand-deep); font-weight: 600; }
.sub-right { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.done-tag { font-size: 12px; color: var(--teal); font-weight: 600; white-space: nowrap; }
.claimed-tag { font-size: 12px; color: var(--muted); white-space: nowrap; }
.clap-btn { background: var(--brand-soft); border: 1px solid #F0DCB8; color: var(--brand-deep); border-radius: 8px; padding: 5px 11px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.clap-btn:hover { background: #FBEBCF; }
@media (max-width: 640px) {
  .subtask { flex-wrap: wrap; }
  .sub-right { width: 100%; justify-content: flex-end; padding-left: 19px; }
}
.diff-foot { border-top: 1px solid var(--line); background: var(--surface-soft); padding: 10px 18px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.diff-foot .foot-label { font-size: 12px; color: var(--muted); margin-right: auto; }
.add-sub-inline { display: flex; gap: 8px; width: 100%; margin-top: 8px; }
.add-sub-inline input, .add-sub-inline select { min-width: 0; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 13px; outline: none; color: var(--ink); background: var(--surface); }
.add-sub-inline input { flex: 1; }
.add-sub-inline select { width: 160px; color: var(--brand-deep); background: var(--brand-soft); border-color: #F0DCB8; font-weight: 600; }

/* ---------- 我的任务 ---------- */
.task-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; }
.task-row .task-main { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.6; word-break: break-word; }
.task-row .task-main.done { text-decoration: line-through; color: var(--muted); }
.task-row .task-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.task-row .task-sub .from { color: var(--brand-deep); font-weight: 600; }
.task-badge-new { background: var(--red-soft); color: var(--red); border: 1px solid #F6D9D7; border-radius: 6px; padding: 1px 7px; font-size: 11px; font-weight: 700; }

/* ---------- 个人中心 ---------- */
.profile-head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.big-avatar { width: 62px; height: 62px; border-radius: 16px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 25px; font-weight: 700; flex-shrink: 0; }
.big-name { font-size: 19px; font-weight: 700; letter-spacing: -.3px; display: flex; align-items: center; gap: 9px; }
.big-stars { color: var(--muted); font-size: 13px; margin-top: 4px; }
.big-stars b { color: var(--brand-deep); font-size: 17px; }
.post-item .feed-text { margin-top: 8px; }
.download-btn { margin-top: 10px; }

/* ---------- 管理后台 ---------- */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.admin-grid .card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.admin-grid h3 { margin: 0; font-size: 14px; font-weight: 700; }
.admin-grid p { margin: 0; }
.admin-grid select, .admin-grid input { padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 9px; font-size: 13.5px; outline: none; color: var(--ink); background: var(--surface); }
.admin-grid input:focus, .admin-grid select:focus { border-color: var(--brand); }
.admin-grid .btn-primary { align-self: flex-start; }
.user-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.user-row:last-child { border-bottom: none; }
.user-info { line-height: 1.6; }
.user-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.lock-tag { color: #B45309; background: #FFF7ED; border: 1px solid #FED7AA; border-radius: 6px; padding: 1px 7px; font-size: 11.5px; margin-left: 5px; white-space: nowrap; }
.yr-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.yr-table th, .yr-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
.yr-table th { color: var(--muted); font-weight: 600; font-size: 12px; }

/* ---------- Toast ---------- */
#toast-wrap { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 1200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 9px; font-size: 13.5px; opacity: 0; transform: translateY(-10px); transition: all .28s; box-shadow: 0 8px 24px rgba(0,0,0,.16); }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-err { background: var(--red); }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(22, 27, 36, .45); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: 100%; max-width: 440px; box-shadow: 0 24px 64px rgba(20,26,38,.22); max-height: 86vh; overflow-y: auto; }
.modal h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.modal .modal-desc { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.modal label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-top: 4px; display: block; }
.modal select, .modal input { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 9px; font-size: 13.5px; outline: none; color: var(--ink); background: var(--surface); }
.modal select:focus, .modal input:focus { border-color: var(--brand); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
/* 新任务提醒弹窗 */
.notice-modal { max-width: 470px; }
.notice-hero { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.notice-hero .nh-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-deep); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.notice-hero h3 { margin: 0; font-size: 17px; }
.notice-hero p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.notice-list { display: flex; flex-direction: column; gap: 9px; max-height: 46vh; overflow-y: auto; }
.notice-item { border: 1px solid var(--line); background: var(--surface-soft); border-radius: 10px; padding: 11px 13px; }
.notice-item .ni-parent { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.notice-item .ni-title { font-size: 13.5px; font-weight: 600; line-height: 1.5; word-break: break-word; }
.notice-item .ni-from { font-size: 11.5px; color: var(--brand-deep); margin-top: 5px; font-weight: 600; }
.notice-tag { display: inline-block; margin-left: 6px; background: var(--red-soft); color: var(--red); border-radius: 5px; padding: 1px 6px; font-size: 10.5px; font-weight: 700; }

/* ---------- 页脚备案 ---------- */
#site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 16px 20px; margin-top: 20px; text-align: center; }
.foot-inner { font-size: 12px; color: var(--muted); line-height: 1.8; }
.foot-inner a { color: var(--muted); text-decoration: none; }
.foot-inner a:hover { color: var(--brand-deep); }
.foot-sep { margin: 0 8px; opacity: .5; }

/* ---------- 头像 ---------- */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.avatar.xs { width: 20px; height: 20px; border-radius: 6px; font-size: 10px; background: var(--surface-soft); color: var(--ink-2); border: 1px solid var(--line); }
.avatar.set-avatar { width: 58px; height: 58px; border-radius: 15px; font-size: 23px; }
.prog-item .prog-main { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.sub-assignee { align-items: center; }

/* ---------- 登录页：忘记密码 ---------- */
.auth-foot { margin-top: 12px; font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.auth-foot code { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 11px; word-break: break-all; }

/* ---------- 任务撤回 ---------- */
.sub-del, .diff-del { background: transparent; border: 1px solid transparent; color: var(--muted); font-size: 12px; border-radius: 7px; padding: 4px 8px; white-space: nowrap; }
.sub-del:hover, .diff-del:hover { color: var(--red); border-color: #F3C9C7; background: var(--red-soft); }
.diff-del { margin-left: auto; }

/* ---------- 账号设置 ---------- */
.settings-card { margin-bottom: 18px; padding: 20px 22px; }
.settings-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.settings-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 26px; }
.set-block:last-child { grid-column: 1 / -1; }
.set-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 9px; }
.set-avatar-row { display: flex; align-items: center; gap: 14px; }
.set-avatar-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.set-hint { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.6; width: 100%; }
.set-inline { display: flex; gap: 8px; }
.set-pw { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px; }
.settings-card input[type="text"], .settings-card input[type="password"] {
  width: 100%; min-width: 0; padding: 9px 12px; border: 1px solid var(--line-strong);
  border-radius: 9px; font-size: 13.5px; outline: none; color: var(--ink); background: var(--surface); height: 38px;
}
.settings-card input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232, 163, 61, .14); }
.settings-card ::placeholder { color: #A6ADB9; }
.dup-warn { background: #FFF8E9; border: 1px solid #F3D69B; color: #8A5B12; padding: 9px 12px; border-radius: 9px; font-size: 12.5px; margin-bottom: 16px; line-height: 1.6; }
.dup-tag { color: #B45309; background: #FFF7ED; border: 1px solid #FED7AA; border-radius: 6px; padding: 1px 7px; font-size: 11.5px; margin-left: 5px; white-space: nowrap; }
.user-info { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.modal label { margin-top: 10px; }
@media (max-width: 720px) {
  .settings-grid { grid-template-columns: 1fr; }
  .set-block:last-child { grid-column: auto; }
  .set-pw { grid-template-columns: 1fr; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .sidebar { width: 200px; }
  .content { padding: 24px 22px 60px; }
  .topbar { padding: 13px 22px; }
}
@media (max-width: 720px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--line); padding: 12px 14px; }
  .side-brand { padding-bottom: 10px; }
  .side-section, .side-foot { display: none; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 2px; }
  .nav-item { white-space: nowrap; padding: 7px 11px; }
  .nav-item.active::before { display: none; }
  .nav-item .nav-ic { display: none; }
  .admin-grid { grid-template-columns: 1fr; }
  .content { padding: 20px 15px 50px; }
  .topbar { padding: 11px 15px; }
  .topbar-sub, .top-user .uname, .top-user .urole { display: none; }
  .page-title { font-size: 20px; }
  .composer, .card { padding: 15px; }
}

/* ===== 公会版新增组件 ===== */
/* 可点击的成员名 / 头像 */
.user-link { background: none; border: none; padding: 0; color: var(--ink); font-size: inherit; font-weight: 600; cursor: pointer; }
.user-link:hover { color: var(--brand-deep); text-decoration: underline; }
.user-link.tiny { font-size: 11.5px; font-weight: 600; }
.avatar.clickable { cursor: pointer; }
.avatar.clickable:hover { outline: 2px solid var(--brand); outline-offset: 2px; }
.big-name .user-link { font-size: inherit; }
.feed-name, .diff-name, .prog-name { font-size: 13.5px; }

/* 岗位标签 + 皇冠 */
.pos-chip { display: inline-flex; align-items: center; background: var(--surface-soft); color: var(--ink-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 7px; font-size: 11px; font-weight: 500; white-space: nowrap; vertical-align: middle; }
.crown { display: inline-flex; align-items: center; color: #E0A020; vertical-align: middle; margin-left: 3px; }
.avatar { position: relative; }
.avatar > .crown { position: absolute; top: -7px; right: -6px; font-size: 0; background: #FFF6DC; border: 1px solid #F2D79A; border-radius: 50%; width: 17px; height: 17px; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.avatar > .crown svg { width: 11px; height: 11px; }

/* 今日战报：紧凑、逐条、不占篇幅 */
.today-bar { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; background: linear-gradient(100deg, #FFFBEF, #FFFDF8); border: 1px solid #F1E3C5; border-radius: 10px; padding: 8px 13px; margin-bottom: 12px; font-size: 12.5px; }
.tb-label { font-weight: 700; color: var(--brand-deep); white-space: nowrap; padding-top: 1px; }
.tb-list, .tb-all { display: flex; flex-wrap: wrap; gap: 4px 16px; flex: 1; min-width: 0; }
.tb-all { flex-basis: 100%; margin-top: 6px; border-top: 1px dashed #EEDDBA; padding-top: 6px; flex-direction: column; gap: 3px; }
.tb-item { color: var(--ink-2); }
.tb-item b { color: var(--brand-deep); font-weight: 700; }
.tb-empty { color: var(--muted); }
.tb-more { background: none; border: none; color: var(--blue); font-size: 12px; padding: 0; }

/* 超时提醒 */
.overdue-bar { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; background: #FFF3F2; border: 1px solid #F3C9C7; border-radius: 10px; padding: 9px 13px; margin-bottom: 14px; font-size: 12.5px; }
.ob-label { font-weight: 700; color: var(--red); white-space: nowrap; }
.ob-list { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.ob-item { color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ob-item .btn-sm { padding: 3px 10px; font-size: 11.5px; }
.ob-hint { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.over-tag { display: inline-flex; align-items: center; background: var(--red-soft); color: var(--red); border: 1px solid #F3C9C7; border-radius: 5px; padding: 1px 7px; font-size: 11px; font-weight: 700; margin-left: 6px; vertical-align: middle; }
.nudge-tag { display: inline-flex; align-items: center; background: var(--brand-soft); color: var(--brand-deep); border: 1px solid #F0DCB8; border-radius: 5px; padding: 1px 7px; font-size: 11px; font-weight: 700; margin-left: 6px; }

/* 任务状态标签 */
.st-chip { display: inline-flex; align-items: center; border-radius: 5px; padding: 1px 7px; font-size: 10.5px; font-weight: 700; margin-left: 6px; vertical-align: middle; white-space: nowrap; }
.st-open { background: var(--surface-soft); color: var(--muted); border: 1px solid var(--line); }
.st-pending { background: #FFF7ED; color: #B45309; border: 1px solid #FED7AA; }
.st-peer { background: var(--blue-soft); color: var(--blue); border: 1px solid #DCE8F8; }
.st-chair { background: var(--brand-soft); color: var(--brand-deep); border: 1px solid #F0DCB8; }
.st-orphan { background: var(--red-soft); color: var(--red); border: 1px solid #F3C9C7; }
.st-done { background: var(--teal-soft); color: var(--teal); border: 1px solid #D5EDE8; }
.subtask.is-nudged, .task-row.row-nudged { background: #FFF7E8; border-color: #F0D49A; box-shadow: 0 0 0 2px rgba(232,163,61,.12); }
.subtask.is-overdue, .task-row.row-overdue { border-color: #EEB7B4; }
.ack-btn { padding: 2px 9px; font-size: 11.5px; border-radius: 6px; margin-left: 6px; vertical-align: middle; }
.sub-right, .task-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
.nudge-btn:disabled { opacity: .5; cursor: not-allowed; }
.empty.slim { padding: 14px 12px; font-size: 12.5px; }

/* 朋友圈式评论 / 回复 */
.idea-del { margin-left: auto; background: transparent; border: 1px solid transparent; color: var(--muted); font-size: 12px; border-radius: 7px; padding: 4px 8px; }
.idea-del:hover { color: var(--red); border-color: #F3C9C7; background: var(--red-soft); }
.cmt-row { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.cmt-row:last-of-type { border-bottom: none; }
.cmt-body { flex: 1; min-width: 0; }
.cmt-line { font-size: 13px; line-height: 1.65; color: var(--ink-2); word-break: break-word; }
.cmt-line .user-link { color: var(--blue); font-size: 13px; }
.cmt-line b { color: var(--ink); }
.cmt-reply-word { color: var(--muted); margin: 0 4px; font-size: 12px; }
.cmt-colon { color: var(--muted); }
.cmt-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.cmt-reply-btn { background: none; border: none; color: var(--blue); font-size: 11.5px; padding: 0 0 0 8px; }
.cmt-reply-btn:hover { text-decoration: underline; }
.cmt-empty { padding: 6px 0 10px; }
.comment-input-wrap { margin-top: 10px; }
.reply-tip { font-size: 12px; color: var(--brand-deep); background: var(--brand-soft); border-radius: 7px; padding: 5px 10px; margin-bottom: 8px; display: inline-flex; gap: 8px; align-items: center; }
.reply-cancel { background: none; border: none; color: var(--muted); font-size: 11.5px; text-decoration: underline; }

/* 紧凑个人中心 */
.back-link { display: inline-block; margin-bottom: 12px; }
.profile-meta { min-width: 0; }
.big-name { flex-wrap: wrap; }
.name-edit { background: none; border: 1px solid transparent; border-radius: 7px; padding: 1px 6px; font-size: 19px; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; letter-spacing: -.3px; }
.name-edit:hover { border-color: var(--line-strong); background: var(--surface-soft); }
.name-edit svg { color: var(--muted); }
.name-edit-inline { display: inline-flex; gap: 7px; align-items: center; }
.name-edit-inline input { padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 15px; outline: none; width: 190px; }
.name-edit-inline input:focus { border-color: var(--brand); }
.big-avatar.editable { position: relative; cursor: pointer; overflow: hidden; }
.big-avatar.editable:hover { outline: 2px solid var(--brand); outline-offset: 2px; }
.big-avatar.editable img { width: 100%; height: 100%; object-fit: cover; }
.avatar-edit-hint { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(20,26,38,.72); color: #fff; font-size: 10.5px; text-align: center; padding: 2px 0; letter-spacing: .5px; }
.profile-quick { margin-top: 6px; font-size: 12.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.q-sep { color: var(--line-strong); }
.contact-line { color: var(--ink-2); }
.contact-card { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 16px; font-size: 13px; padding: 13px 18px; }
.contact-k { color: var(--muted); font-size: 12px; margin-right: 7px; }

/* 包裹池 */
.orphan-card { grid-column: 1 / -1; }
.orphan-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.orphan-row:last-child { border-bottom: none; }
.or-title { flex: 1; min-width: 160px; font-size: 13.5px; font-weight: 600; }
.or-meta { font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.or-user { padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 13px; background: var(--surface); color: var(--ink); max-width: 190px; }
.orphan-hint { background: #FFF8E9; border: 1px solid #F3D69B; color: #8A5B12; border-radius: 10px; padding: 12px 15px; font-size: 13px; }

/* ===== 完成验收：提交 → 会长验收通过 → 才加星 ===== */
.st-review { background: var(--blue-soft); color: var(--blue); border: 1px solid #CFDFF7; }
.review-tag { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--blue); background: var(--blue-soft); border: 1px solid #CFDFF7; border-radius: 6px; padding: 3px 8px; margin-right: 6px; white-space: nowrap; }
.task-row.row-review { border-left: 3px solid var(--blue); }
.review-card { margin-bottom: 16px; }
.review-card.is-empty { padding-bottom: 10px; }
.review-card h3 { display: flex; align-items: center; gap: 8px; }
.review-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.review-row:last-child { border-bottom: none; }
.rv-main { flex: 1; min-width: 200px; }
.rv-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.rv-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.rv-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== 撤回：想法 / 心得 / 工作进度 / 任务完成 ===== */
.prog-del, .post-del { background: none; border: none; color: var(--muted); font-size: 12px; padding: 2px 6px; margin-left: 8px; }
.prog-del:hover, .post-del:hover { color: var(--red); }
.prog-time { display: flex; align-items: center; gap: 4px; }
.post-item > div:first-child { display: flex; align-items: center; gap: 6px; }
.post-item .post-del { margin-left: auto; }
.undo-done-btn { color: var(--muted) !important; border-color: var(--line-strong) !important; }
.undo-done-btn:hover { color: var(--red) !important; border-color: #E9B7B5 !important; background: var(--red-soft) !important; }

/* ===== 注册实时查重提示 ===== */
.name-check { margin: -6px 0 2px; font-size: 12px; line-height: 1.4; }
.name-check:empty { display: none; }
.name-check.ok { color: var(--teal); }
.name-check.bad { color: var(--red); font-weight: 600; }
.auth-form button:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 720px) {
  .today-bar, .overdue-bar { flex-direction: column; gap: 6px; }
  .ob-hint { white-space: normal; }
  .contact-card { flex-direction: column; gap: 8px; }
  .or-user { max-width: 100%; }
  .review-row { flex-direction: column; align-items: flex-start; }
  .rv-actions { width: 100%; }
}
