/* ============================================================
   工作待办清单 · 样式（浅色主题 / 卡片式 / 响应式）
   ============================================================ */

:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #1f2937;
  --ink-soft: #6b7280;
  --line: #e5e9f2;
  --primary: #4f6ef7;
  --primary-ink: #ffffff;

  --high: #ef4444;      --high-bg: #fee2e2;
  --mid: #f59e0b;       --mid-bg: #fef3c7;
  --low: #0ea5e9;       --low-bg: #e0f2fe;

  --st-todo: #9ca3af;   --st-todo-bg: #f3f4f6;
  --st-doing: #3b82f6;  --st-doing-bg: #dbeafe;
  --st-done: #16a34a;   --st-done-bg: #dcfce7;
  --st-block: #f4511e;  --st-block-bg: #ffe4d6;

  --radius: 14px;
  --shadow: 0 2px 10px rgba(31, 41, 55, .06), 0 1px 2px rgba(31, 41, 55, .04);
  --shadow-lg: 0 12px 40px rgba(31, 41, 55, .18);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: 12.5px; }

/* ---------- 按钮 / 输入 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px;
  padding: 9px 16px; font-size: 14px; font-family: inherit;
  cursor: pointer; transition: all .16s ease; white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--high); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 13px 28px; font-size: 16px; border-radius: 12px; }

.input {
  width: 100%; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; font-size: 14px; font-family: inherit;
  background: #fff; color: var(--ink); outline: none; transition: border .15s;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,110,247,.14); }
.input-select { appearance: auto; }

.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px;
}

/* ---------- 启动 Loading ---------- */
.boot-loading {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; background: var(--bg); color: var(--ink-soft);
}
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 登录 ---------- */
.login-view {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, #eef2ff 0%, #f4f6fb 45%, #ecfeff 100%);
}
.login-card {
  background: var(--card); border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 44px 40px; max-width: 400px; width: 100%; text-align: center;
}
.login-logo {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 20px;
  background: linear-gradient(135deg, #4f6ef7, #22d3ee);
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.login-card h1 { font-size: 22px; margin-bottom: 8px; }
.login-sub { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 26px; }
.login-error {
  margin-top: 14px; color: var(--high); font-size: 13px;
  background: var(--high-bg); border-radius: 8px; padding: 8px 12px;
}
.login-note { margin-top: 18px; color: var(--ink-soft); font-size: 12px; }
/* 登录按钮下方常驻提示：授权未完成回到登录页时的说明 */
.login-hint {
  margin-top: 12px; margin-bottom: 0; line-height: 1.6;
  color: var(--ink-soft); font-size: 12px;
}

/* 手机验证码登录 */
.otp-toggle-wrap { margin-top: 14px; }
.otp-toggle {
  background: none; border: none; padding: 4px 8px; font-family: inherit;
  color: var(--ink-soft); font-size: 13px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; border-radius: 6px;
}
.otp-toggle:hover { color: var(--primary); }
.otp-form {
  display: flex; flex-direction: column; gap: 10px;
  text-align: left; margin-top: 6px;
}
.otp-form .otp-toggle { align-self: center; }
.otp-row { display: flex; gap: 8px; }
.otp-row .input { flex: 1; min-width: 0; }
.otp-row .otp-send { white-space: nowrap; flex: none; }
.otp-form .login-error { margin-top: 0; }

/* 预览/iframe 环境整页接管提示 */
.env-overlay {
  position: fixed; inset: 0; z-index: 40;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.env-card {
  background: var(--card); border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 40px 32px; max-width: 420px; width: 100%; text-align: center;
}
.env-icon {
  width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 20px;
  background: linear-gradient(135deg, #4f6ef7, #22d3ee);
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.env-title { font-size: 21px; margin-bottom: 10px; }
.env-desc { color: var(--ink-soft); font-size: 14px; margin-bottom: 16px; text-align: left; }
.env-url {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px; color: var(--ink);
  background: #f3f5fb; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 20px;
  word-break: break-all; user-select: all;
}
.env-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 980px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--primary); }
.nav-tabs { display: flex; gap: 4px; flex: 1; }
.nav-tab {
  position: relative; border: none; background: transparent; font-family: inherit;
  font-size: 14px; color: var(--ink-soft); padding: 8px 14px; border-radius: 10px;
  cursor: pointer; transition: all .15s;
}
.nav-tab:hover { color: var(--primary); background: #eef2ff; }
.nav-tab.active { color: var(--primary); background: #eef2ff; font-weight: 600; }
.nav-dot {
  position: absolute; top: 5px; right: 4px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--high);
}
.user-area { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 8px; min-width: 0; }
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #4f6ef7, #22d3ee);
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.user-name { font-size: 13.5px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 主区域 ---------- */
.main { max-width: 980px; margin: 0 auto; padding: 22px 20px 70px; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.view h2 { font-size: 18px; }

/* 今日头部 */
.today-head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.today-date { font-size: 24px; letter-spacing: .5px; }
.today-weekday { color: var(--ink-soft); font-size: 13.5px; margin-top: 2px; }
.progress-wrap { min-width: 220px; flex: 1; max-width: 340px; }
.progress-text { font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; display: flex; justify-content: space-between; }
.progress-pct { font-size: 13px; color: var(--primary); font-weight: 700; text-align: right; margin-top: 4px; }
.progress-bar { height: 10px; border-radius: 999px; background: #eef1f8; overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 999px; width: 0%;
  background: linear-gradient(90deg, #4f6ef7, #22d3ee);
  transition: width .4s ease;
}
.quick-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.stat-chip {
  font-size: 12.5px; padding: 5px 12px; border-radius: 999px;
  background: #f3f5fb; color: var(--ink-soft); border: 1px solid var(--line);
}

/* 新增表单 */
.add-form { margin-top: 16px; }
.add-row-main { display: flex; gap: 10px; }
.add-row-main .input { flex: 1; }
.add-row-opts {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-top: 12px;
}
.field { display: flex; flex-direction: column; gap: 4px; min-width: 160px; flex: 1; }
.field-label { font-size: 12px; color: var(--ink-soft); }

/* 列表 */
.list-head { display: flex; align-items: baseline; gap: 10px; margin: 22px 2px 10px; }
.list-head h3 { font-size: 15.5px; }
.todo-list { display: flex; flex-direction: column; gap: 12px; }
.empty-state {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  text-align: center; padding: 44px 20px; color: var(--ink-soft);
}
.empty-state .big { font-size: 34px; margin-bottom: 8px; }

/* 条目卡片 */
.todo-card {
  position: relative; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px 14px 20px;
  border-left: 5px solid var(--st-todo);
  transition: box-shadow .15s, transform .15s;
}
.todo-card:hover { box-shadow: 0 6px 20px rgba(31,41,55,.10); }
.todo-card.prio-高 { border-left-color: var(--high); }
.todo-card.prio-中 { border-left-color: var(--mid); }
.todo-card.prio-低 { border-left-color: var(--low); }
.todo-card.st-完成 { opacity: .78; }
.todo-card.st-完成 .todo-title { text-decoration: line-through; color: var(--ink-soft); }

.todo-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.todo-title { font-size: 15.5px; font-weight: 600; word-break: break-all; flex: 1; min-width: 120px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 700; padding: 2px 9px;
  border-radius: 999px; white-space: nowrap; flex: none;
}
.badge-prio-高 { background: var(--high-bg); color: var(--high); }
.badge-prio-中 { background: var(--mid-bg); color: #b45309; }
.badge-prio-低 { background: var(--low-bg); color: #0369a1; }
.badge-st-未完成 { background: var(--st-todo-bg); color: #6b7280; }
.badge-st-进行中 { background: var(--st-doing-bg); color: #1d4ed8; }
.badge-st-完成   { background: var(--st-done-bg); color: #15803d; }
.badge-st-受阻   { background: #ffedd5; color: #c2410c; }
.badge-blocked   { background: #ffedd5; color: #c2410c; border: 1px solid #fdba74; }
.badge-carried   { background: #fdf2f8; color: #be185d; border: 1px solid #f9a8d4; }

.todo-meta {
  display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px;
  font-size: 12.5px; color: var(--ink-soft);
}
.todo-meta .meta-item { display: inline-flex; align-items: center; gap: 4px; }
.todo-note {
  margin-top: 8px; font-size: 12.5px; color: #7c2d12;
  background: #fff7ed; border-radius: 8px; padding: 6px 10px;
  word-break: break-all;
}
.todo-note.done-note { color: #14532d; background: #f0fdf4; }

.todo-actions {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px;
  padding-top: 10px; border-top: 1px dashed var(--line);
}
.act-btn {
  border: 1px solid var(--line); background: #fff; font-family: inherit;
  font-size: 12.5px; padding: 5px 12px; border-radius: 8px; cursor: pointer;
  transition: all .14s; color: var(--ink);
}
.act-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.act-btn.act-done:hover:not(:disabled) { border-color: var(--st-done); color: var(--st-done); }
.act-btn.act-block:hover:not(:disabled) { border-color: var(--st-block); color: var(--st-block); }
.act-btn.act-del { margin-left: auto; }
.act-btn.act-del:hover:not(:disabled) { border-color: var(--high); color: var(--high); }
.act-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- 复盘 ---------- */
.review-card textarea.review-textarea {
  width: 100%; margin-top: 10px; padding: 14px;
  border: 1px solid var(--line); border-radius: 12px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, var(--font);
  font-size: 13px; line-height: 1.7; color: var(--ink);
  resize: vertical; outline: none; background: #fbfcfe;
}
.review-card textarea.review-textarea:focus { border-color: var(--primary); }
.review-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }

/* ---------- 知识库 ---------- */
.archive-toolbar { margin-bottom: 16px; }
.archive-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.archive-filters .input-select { max-width: 160px; }
.archive-filters .input[type="search"] { max-width: 280px; flex: 1; }
.archive-day { margin-bottom: 16px; }
.archive-day-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 2px 8px; gap: 10px; flex-wrap: wrap;
}
.archive-day-head h3 { font-size: 15px; }
.archive-item {
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  padding: 10px 14px; border-left: 4px solid var(--st-todo);
  display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap;
}
.archive-item + .archive-item { margin-top: 8px; }
.archive-item.prio-高 { border-left-color: var(--high); }
.archive-item.prio-中 { border-left-color: var(--mid); }
.archive-item.prio-低 { border-left-color: var(--low); }
.archive-item .todo-title { font-size: 14px; }
.archive-note-line { width: 100%; font-size: 12.5px; color: var(--ink-soft); word-break: break-all; }
.review-block {
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  padding: 12px 16px; margin-bottom: 14px;
}
.review-block pre {
  margin: 8px 0 0; white-space: pre-wrap; word-break: break-all;
  font-family: inherit; font-size: 13px; color: var(--ink); line-height: 1.7;
}

/* ---------- 团队总览 ---------- */
.team-toolbar { margin-bottom: 4px; }
.team-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.team-stat-card {
  background: #f8f9fd; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 12px; text-align: center;
}
.team-stat-num { font-size: 26px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.team-stat-num.team-num-done { color: var(--st-done); }
.team-stat-label { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
.team-stat-loading { padding: 20px 0; }

.team-table-wrap { padding: 0; overflow-x: auto; }
.team-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.team-table th, .team-table td {
  padding: 10px 14px; text-align: left; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.team-table th { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); background: #f8f9fd; }
.team-table tr:last-child td { border-bottom: none; }
.team-member-name { font-weight: 600; }
.team-blocked-num { color: var(--st-block); font-weight: 700; }
.team-progress-cell { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.team-progress {
  flex: 1; height: 8px; border-radius: 999px; background: #eef1f8; overflow: hidden;
}
.team-progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #4f6ef7, #22d3ee);
}
.team-progress-pct { font-size: 12px; color: var(--ink-soft); min-width: 36px; text-align: right; }

.team-blocked-item {
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  border-left: 4px solid var(--st-block);
  padding: 10px 14px; margin-bottom: 8px;
  display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline;
}
.team-blocked-member {
  flex: none; font-size: 12.5px; font-weight: 700; color: #c2410c;
  background: #ffedd5; border-radius: 999px; padding: 2px 10px;
}
.team-blocked-item .todo-title { font-size: 14px; flex: 1; min-width: 140px; }
.team-blocked-reason { font-size: 12.5px; color: var(--ink-soft); word-break: break-all; }

.team-trend-card { overflow-x: auto; }
.team-trend { display: flex; gap: 8px; align-items: flex-end; min-width: 420px; }
.trend-col {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  align-items: center; gap: 6px;
}
.trend-nums { font-size: 11.5px; color: var(--ink); }
.trend-bars { height: 110px; width: 70%; max-width: 46px; display: flex; align-items: flex-end; }
.trend-bar {
  width: 100%; background: #e5e9f2; border-radius: 6px 6px 0 0;
  position: relative; min-height: 2px;
}
.trend-done {
  position: absolute; bottom: 0; left: 0; width: 100%;
  background: linear-gradient(90deg, #4f6ef7, #22d3ee);
  border-radius: 6px 6px 0 0; min-height: 0;
}
.trend-label { font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; }
.trend-label.trend-today { color: var(--primary); font-weight: 700; }
.trend-legend { margin-top: 10px; }

/* ---------- 企业协作 ---------- */
.org-guide-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.org-guide-card h3 { margin-bottom: 6px; }
.org-guide-card .input { margin-top: 10px; }
.org-guide-card .btn { margin-top: 12px; }
#org-admin-panel > .card + .card,
#org-member-panel > .card + .card { margin-top: 14px; }
.org-info-line {
  margin: 6px 0; display: flex; align-items: center;
  gap: 8px; flex-wrap: wrap;
}
.org-code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px; letter-spacing: 2px;
  background: #f3f5fb; border: 1px solid var(--line);
  border-radius: 8px; padding: 3px 10px; user-select: all;
}
.org-collab { margin-top: 12px; }
.org-collab-opts { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.org-collab-opt {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; cursor: pointer;
}
.org-inline-row { display: flex; gap: 10px; margin-top: 12px; }
.org-inline-row .input { flex: 1; min-width: 0; }
.org-assign-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.org-assign-grid .field { min-width: 180px; }
.org-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 8px; background: #fbfcfe;
}
.org-row-name { font-weight: 600; min-width: 90px; word-break: break-all; }
.org-row-actions { display: flex; gap: 6px; margin-left: auto; }
.org-dept-select { max-width: 180px; margin-left: auto; }
.badge-org { background: #eef2ff; color: #4f6ef7; border: 1px solid #c7d2fe; }
.badge-org-out { background: #ecfeff; color: #0e7490; border: 1px solid #a5f3fc; }
.badge-org-admin { background: #eef2ff; color: #4f6ef7; }
.org-peer-item {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 8px; background: #fbfcfe;
}
.org-peer-name {
  flex: none; font-size: 12.5px; font-weight: 700;
  color: var(--primary); background: #eef2ff;
  border-radius: 999px; padding: 2px 10px;
}
.org-peer-item .todo-title { flex: 1; min-width: 120px; font-weight: 500; }

/* ---------- 管理端（admin.html） ---------- */
.nav-tab-admin { text-decoration: none; }
.admin-badge {
  font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #4f6ef7, #22d3ee);
  border-radius: 999px; padding: 2px 10px; margin-left: 4px;
  letter-spacing: 1px;
}
.admin-main { max-width: 1080px; }
.admin-gate-card { max-width: 420px; }
.admin-perm-icon { font-size: 40px; margin-bottom: 10px; }
.admin-readonly-tip {
  background: var(--mid-bg); color: #b45309;
  border: 1px solid #fde68a; border-radius: 10px;
  padding: 10px 14px; font-size: 13px; margin-bottom: 14px;
}
.admin-org-item {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 18px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.admin-org-main {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; flex: 1; min-width: 0;
}
.admin-org-name { font-size: 15.5px; word-break: break-all; }
.admin-org-item .btn { flex: none; }
.admin-org-item .btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- 弹窗 ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(17, 24, 39, .45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 440px; padding: 22px 24px;
  animation: pop .18s ease;
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h3 { font-size: 16.5px; margin-bottom: 6px; }
.modal .modal-text { color: var(--ink); font-size: 14px; word-break: break-all; }
.modal .modal-sub { color: var(--ink-soft); font-size: 12.5px; margin-top: 4px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.modal textarea, .modal input.input { margin-top: 12px; }
.modal .remind-icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--mid-bg); color: #b45309; font-size: 22px;
}
.modal.remind-urgent .remind-icon { background: var(--high-bg); color: var(--high); }

/* ---------- Toast ---------- */
.toast-box {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 70; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: 92vw;
}
.toast {
  background: #111827; color: #fff; font-size: 13.5px;
  border-radius: 10px; padding: 10px 18px; box-shadow: var(--shadow-lg);
  animation: toastIn .22s ease; max-width: 92vw; word-break: break-all;
}
.toast.success { background: #15803d; }
.toast.error { background: #dc2626; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; padding: 8px 14px; gap: 8px; }
  .nav-tabs { order: 3; width: 100%; justify-content: space-between; }
  .brand span { display: none; }
  .user-name { display: none; }
  .main { padding: 14px 12px 60px; }
  .add-row-main { flex-direction: column; }
  .field { min-width: 100%; }
  .today-date { font-size: 20px; }
  .todo-actions .act-btn { flex: 1; text-align: center; }
  .env-card { padding: 32px 20px; }
  .env-actions .btn { flex: 1; }
}

/* ---------- 桌面通知状态行 ---------- */
.notify-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 12px; padding-top: 12px;
  border-top: 1px dashed var(--border, #e5e7eb);
}
.notify-row .muted { line-height: 1.5; }

/* ---------- 企业信息卡（成员视角） ---------- */
.org-info-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 20px; margin-bottom: 10px;
}
.org-info-line { font-size: 14px; color: var(--text, #111827); margin: 4px 0; }
.org-info-line strong { font-weight: 600; }
.org-inline-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }

/* ---------- 管理端：企业重命名 ---------- */
.org-rename-input { max-width: 240px; margin-left: 6px; }

/* ---------- 管理端：企业任务列表 ---------- */
.org-task-list { display: flex; flex-direction: column; gap: 8px; }
.org-task-item {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; border: 1px solid var(--border, #e5e7eb); border-radius: 10px;
  background: var(--card, #fff); font-size: 13.5px;
}
.org-task-item .todo-title { font-weight: 500; }
.org-task-reason { color: #b45309; font-size: 12.5px; }

/* ---------- 编辑弹窗 ---------- */
.edit-opts { margin-top: 10px; }

/* ---------- 登录入口：个人版 / 企业版 ---------- */
.login-mode-tabs {
  display: flex; width: fit-content; margin: 14px auto 16px;
  border: 1px solid var(--border, #e5e7eb); border-radius: 999px; overflow: hidden;
  background: var(--bg, #f9fafb);
}
.mode-tab {
  border: none; background: transparent; cursor: pointer;
  padding: 7px 24px; font-size: 14px; color: var(--muted, #6b7280);
  transition: background .15s, color .15s;
}
.mode-tab.active { background: var(--primary, #2563eb); color: #fff; font-weight: 500; }
.otp-org-fields {
  padding: 10px 12px; margin-bottom: 4px;
  border: 1px dashed var(--border, #e5e7eb); border-radius: 10px;
  background: var(--bg, #f9fafb);
}
.otp-org-fields .otp-row { margin-bottom: 8px; }
.otp-org-fields .otp-row:last-child { margin-bottom: 0; }
.otp-org-fields .input { width: 100%; }

/* ---------- 页脚：版权与备案 ---------- */
.site-footer {
  text-align: center; padding: 20px 12px 28px;
  font-size: 12.5px; color: var(--muted, #6b7280);
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .sep { margin: 0 8px; opacity: .5; }
