:root {
  --bg: #f5f6f2;
  --surface: #ffffff;
  --surface-soft: #fafaf7;
  --ink: #1e2220;
  --muted: #727872;
  --line: #e6e8e2;
  --line-strong: #d9ddd5;
  --brand: #315f49;
  --brand-dark: #234b39;
  --brand-soft: #e8f0eb;
  --amber: #d99532;
  --amber-soft: #fff1d8;
  --red: #d55a4a;
  --red-soft: #fde9e5;
  --blue: #4c71bf;
  --blue-soft: #eaf0fb;
  --purple: #7357d9;
  --status-todo: #8a929d;
  --status-doing: #4c71bf;
  --status-blocked: #b34968;
  --status-done: #33805c;
  --status-cancelled: #b96a61;
  --status-archived: #8d918b;
  --shadow: 0 18px 45px rgba(33, 46, 38, .08);
  --radius: 16px;
  --sidebar: 246px;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, [role="button"]:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(49, 95, 73, .22);
  outline-offset: 2px;
}

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 16px;
  background: #fbfcf9;
  border-right: 1px solid var(--line);
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 26px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  color: white; background: var(--brand);
  font-weight: 800; letter-spacing: -.05em;
  box-shadow: 0 7px 16px rgba(49, 95, 73, .2);
}
.brand strong { display: block; font-size: 18px; letter-spacing: -.04em; }
.brand span { display: block; margin-top: 2px; color: #92978f; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }

.quick-add-sidebar {
  width: 100%; border: 0; border-radius: 11px; padding: 11px 10px;
  display: flex; align-items: center; gap: 8px;
  background: var(--brand); color: white; cursor: pointer;
  box-shadow: 0 7px 16px rgba(49, 95, 73, .15);
}
.quick-add-sidebar:hover { background: var(--brand-dark); }
.quick-add-sidebar .plus-icon { font-size: 19px; line-height: 1; }
.quick-add-sidebar kbd { margin-left: auto; color: rgba(255,255,255,.65); background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); border-radius: 5px; padding: 2px 5px; font-size: 10px; }

.thought-quick-capture {
  margin-top: 10px;
  padding: 10px;
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f9f5;
}
.thought-quick-capture label {
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 750;
}
.thought-quick-capture textarea {
  width: 100%;
  min-height: 62px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px;
  outline: 0;
  background: white;
  font-size: 12px;
  line-height: 1.45;
  max-height: 96px;
}
.thought-quick-capture textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(49, 95, 73, .08);
}
.thought-quick-capture button {
  border: 0;
  border-radius: 9px;
  padding: 8px 10px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.thought-quick-capture button:hover { background: #dce9e1; }

.primary-nav { display: grid; gap: 3px; margin-top: 18px; }
.nav-item {
  border: 0; background: transparent; cursor: pointer; border-radius: 9px;
  padding: 10px 11px; display: flex; align-items: center; gap: 11px;
  color: #5d635d; text-align: left; transition: color .15s ease, background-color .15s ease;
}
.nav-item span { width: 18px; color: #858b84; font-size: 16px; text-align: center; }
.nav-item:hover { background: #f0f2ed; color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 650; }
.nav-item.active span { color: var(--brand); }

.sidebar-section { margin-top: 25px; min-height: 0; flex: 1; overflow-y: auto; }
.sidebar-label { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 8px; color: #9a9f98; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-label button { border: 0; background: transparent; color: #8d938d; font-size: 18px; cursor: pointer; }
.project-shortcuts { display: grid; gap: 2px; }
.project-shortcut {
  border: 0; background: transparent; border-radius: 8px; padding: 8px 10px;
  display: flex; align-items: center; width: 100%; gap: 9px; cursor: pointer;
  color: #646a64; text-align: left;
}
.project-shortcut:hover { background: #f0f2ed; color: var(--ink); }
.project-shortcut i { width: 8px; height: 8px; border-radius: 3px; flex: 0 0 auto; }
.project-shortcut span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-shortcut b { margin-left: auto; color: #a3a8a1; font-size: 11px; font-weight: 600; }

.sidebar-footer { margin-top: 8px; display: grid; gap: 8px; flex: 0 0 auto; }
.cloud-card { display: flex; align-items: center; gap: 9px; padding: 10px; background: #f1f4ef; border-radius: 10px; }
.cloud-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: white; color: var(--brand); }
.cloud-card strong, .cloud-card span { display: block; }
.cloud-card strong { font-size: 11px; }
.cloud-card span { margin-top: 2px; font-size: 9px; color: #90968f; }
.cloud-card i { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: #48a871; box-shadow: 0 0 0 3px #dcecdf; }
.cloud-card.saving i { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); animation: pulse 1s infinite alternate; }
.cloud-card.error i { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
@keyframes pulse { to { opacity: .45; } }
.profile-row { border: 0; background: transparent; display: flex; align-items: center; gap: 9px; padding: 9px; border-radius: 10px; cursor: pointer; text-align: left; }
.profile-row:hover { background: #f0f2ed; }
.avatar { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: #1e2521; color: white; font-size: 11px; }
.profile-row strong, .profile-row small { display: block; }
.profile-row strong { font-size: 11px; }
.profile-row small { margin-top: 2px; color: #949991; font-size: 9px; }
.profile-row b { margin-left: auto; color: #999e98; font-size: 9px; letter-spacing: 1px; }

.main-panel { min-width: 0; }
.topbar {
  height: 70px; padding: 0 32px;
  display: flex; align-items: center; gap: 20px;
  position: sticky; top: 0; z-index: 15;
  background: rgba(245,246,242,.88); backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(223,226,219,.8);
}
.mobile-brand { display: none; }
.global-search { width: min(430px, 40vw); display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.8); border-radius: 10px; padding: 9px 11px; }
.global-search span { color: #91978f; font-size: 18px; transform: rotate(-15deg); }
.global-search input { border: 0; outline: 0; background: transparent; width: 100%; color: var(--ink); }
.global-search input::placeholder { color: #9ba099; }
.global-search kbd { color: #9ba099; border: 1px solid var(--line); background: var(--surface-soft); border-radius: 5px; padding: 2px 5px; font-size: 9px; white-space: nowrap; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sync-button, .icon-button, .primary-button, .secondary-button { border-radius: 9px; cursor: pointer; transition: color .15s ease, background-color .15s ease, border-color .15s ease, transform .15s ease; }
.sync-button { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: rgba(255,255,255,.75); padding: 8px 10px; font-size: 12px; }
.sync-button:hover, .icon-button:hover, .secondary-button:hover { background: white; border-color: var(--line-strong); }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #337bd8; box-shadow: 0 0 0 3px #e0ecfb; }
.sync-button b { display: grid; place-items: center; min-width: 17px; height: 17px; border-radius: 6px; background: var(--blue-soft); color: var(--blue); font-size: 9px; }
.icon-button { width: 35px; height: 35px; border: 1px solid var(--line); background: rgba(255,255,255,.75); position: relative; }
.notification-button i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--red); top: 7px; right: 7px; border: 1px solid white; }
.primary-button { border: 0; background: var(--brand); color: white; padding: 9px 14px; font-weight: 650; }
.primary-button:hover { background: var(--brand-dark); transform: translateY(-1px); }
.primary-button span { margin-right: 5px; font-size: 17px; line-height: 0; }
.secondary-button { border: 1px solid var(--line); background: white; padding: 9px 14px; }

.view-container { padding: 26px 28px 60px; max-width: 1680px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.page-title small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.page-title h1 { margin: 0; font-size: clamp(25px, 2.4vw, 34px); letter-spacing: -.05em; line-height: 1.12; }
.page-title p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.head-actions { display: flex; align-items: center; gap: 8px; }
.date-switcher { display: flex; align-items: center; gap: 5px; padding: 4px; background: white; border: 1px solid var(--line); border-radius: 9px; }
.date-switcher button { width: 32px; height: 32px; border: 0; background: transparent; border-radius: 6px; padding: 0; cursor: pointer; color: var(--muted); }
.date-switcher button:hover { background: var(--surface-soft); color: var(--ink); }
.date-switcher strong { padding: 0 5px; font-size: 12px; }
.date-picker { border: 1px solid var(--line); border-radius: 8px; padding: 8px 9px; background: white; color: var(--ink); font: inherit; }

.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-bottom: 18px; }
.metric-card { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 15px 17px; min-width: 0; }
.metric-card .metric-top { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.metric-card .metric-icon { width: 23px; height: 23px; border-radius: 7px; display: grid; place-items: center; background: var(--surface-soft); color: var(--brand); }
.metric-card strong { display: block; margin-top: 10px; font-size: 22px; letter-spacing: -.04em; }
.metric-card strong small { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.metric-card .metric-note { margin-top: 3px; color: var(--muted); font-size: 10px; }
.metric-progress { height: 4px; background: #edf0eb; border-radius: 4px; overflow: hidden; margin-top: 10px; }
.metric-progress i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }

.today-reminder { display: flex; align-items: baseline; gap: 14px 18px; margin: -4px 0 14px; padding: 11px 14px; border: 1px solid #cfe0d6; border-left: 4px solid var(--brand); border-radius: 10px; background: #f7fbf8; }
.today-reminder-primary { color: var(--brand-dark); font-size: 15px; font-weight: 800; white-space: nowrap; }
.today-reminder p { margin: 0; color: #466151; font-size: 12px; line-height: 1.55; }

.today-work-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px, 310px); gap: 14px; align-items: start; }
.today-board { border: 1px solid var(--line); background: white; border-radius: 15px; overflow: hidden; box-shadow: 0 8px 24px rgba(33,46,38,.045); }
.today-board-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fbfcfa; }
.today-board-head small { display: block; color: var(--brand); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 10px; }
.today-board-head h2 { margin: 4px 0 3px; font-size: 19px; letter-spacing: -.04em; }
.today-board-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.today-counts { display: grid; grid-template-columns: repeat(6, 58px); gap: 7px; flex: 0 0 auto; }
.today-counts span { border: 1px solid var(--line); border-radius: 10px; background: white; padding: 9px 7px; color: var(--muted); font-size: 9px; text-align: center; }
.today-counts b { display: block; color: var(--ink); font-size: 18px; line-height: 1; margin-bottom: 4px; }
.today-head-tools { display: grid; justify-items: end; gap: 10px; }
.today-filter-row { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.today-project-filter { display: flex; align-items: center; gap: 6px; }
.today-project-filter > span { color: var(--muted); font-size: 9px; font-weight: 700; }
.today-project-filter select { width: auto; max-width: 190px; height: 36px; padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font-size: 11px; font-weight: 650; cursor: pointer; }
.today-visible-total { padding: 7px 10px; border: 1px solid #cfe0d6; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 9px; font-weight: 750; white-space: nowrap; }
.today-five-board { width: 100%; }
.today-five-columns { display: grid; grid-template-columns: minmax(205px,1.05fr) minmax(205px,1.05fr) minmax(220px,1.15fr) minmax(190px,.92fr) minmax(190px,.92fr); align-items: stretch; overflow-x: auto; background: #fff; }
.today-five-column { min-width: 0; min-height: 470px; border-right: 1px solid var(--line); background: #fff; }
.today-five-column:last-child { border-right: 0; }
.today-five-column.overdue { background: #fff8f7; }
.today-five-column.urgent { background: #fffbf5; }
.today-five-column.done { background: #f8fbf9; }
.today-five-column.tomorrow { background: #f8fafc; }
.today-five-column > header { position: sticky; top: 0; z-index: 2; min-height: 68px; padding: 12px 11px 9px; border-bottom: 1px solid var(--line); background: inherit; }
.today-five-column > header > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.today-five-column > header h3 { margin: 0; font-size: 13px; letter-spacing: -.02em; }
.today-five-column > header b { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.84); color: var(--ink); font-size: 11px; }
.today-five-column > header p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.35; }
.today-five-list { display: grid; align-content: start; gap: 7px; padding: 8px; }
.today-five-list .todo-item { width: 100%; margin: 0; }
.today-card-description, .today-result { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.today-done-card { cursor: pointer; }
.today-column-empty { padding: 24px 10px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.55); text-align: center; font-size: 9px; }
.energy-selector { display: flex; align-items: center; gap: 9px; }
.energy-selector > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.energy-selector > div { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.energy-selector button { min-width: 46px; min-height: 32px; padding: 6px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.energy-selector button.active { background: var(--brand); color: white; box-shadow: 0 3px 10px rgba(49,95,73,.2); }
.recommendation-board { border-bottom: 1px solid var(--line); background: #fff; }
.recommendation-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 20px 10px; }
.recommendation-head > div { display: grid; gap: 4px; }
.recommendation-head strong { font-size: 14px; }
.recommendation-head span { color: var(--muted); font-size: 9px; }
.recommendation-head button { border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; background: white; color: var(--brand); font-size: 9px; cursor: pointer; }
.recommendation-section { padding: 9px 20px 15px; }
.recommendation-section + .recommendation-section { padding-top: 0; }
.recommendation-section > header { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.recommendation-section > header b { font-size: 11px; color: var(--brand); }
.recommendation-section > header span { color: var(--muted); font-size: 8px; }
.recommendation-grid { display: grid; gap: 9px; }
.current-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.queue-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.recommendation-empty { grid-column: 1 / -1; padding: 18px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); text-align: center; font-size: 10px; }
.todo-item.compact { position: relative; grid-template-columns: 28px minmax(0,1fr) 28px; min-height: 0; padding: 9px 8px; }
.todo-item.compact .todo-title strong { display: -webkit-box; overflow: hidden; font-size: 12px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.todo-item.compact .todo-meta { margin-top: 7px; }
.todo-item.compact .todo-meta span { min-width: 0; }
.recommendation-order { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 7px; background: var(--brand); color: white; font-size: 10px; font-weight: 800; }
.queue-check { align-self: start; }
.recommendation-reason { color: #587163 !important; font-size: 9px !important; font-weight: 650; }
.recommendation-warning { color: var(--amber) !important; font-size: 8px !important; }
.today-task-pool { background: #fbfcfa; }
.today-task-pool > summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 20px; cursor: pointer; list-style: none; }
.today-task-pool > summary::-webkit-details-marker { display: none; }
.today-task-pool > summary > span { display: grid; gap: 3px; }
.today-task-pool > summary b { font-size: 12px; }
.today-task-pool > summary small { color: var(--muted); font-size: 8px; }
.today-task-pool > summary > strong { color: var(--brand); font-size: 11px; }
.today-task-pool > summary > strong::after { content: "⌄"; margin-left: 8px; }
.today-task-pool[open] > summary > strong::after { content: "⌃"; }
.today-pool-body { display: grid; gap: 15px; padding: 0 20px 18px; border-top: 1px solid var(--line); }
.today-pool-group { padding-top: 14px; }
.today-pool-group > header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.today-pool-group > header b { font-size: 11px; }
.today-pool-group > header span { color: var(--muted); font-size: 8px; }
.today-pool-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.today-focus { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(250px,.65fr); gap: 0; border-bottom: 1px solid var(--line); background: linear-gradient(105deg, #274f3c, #356a50); color: white; }
.today-focus-result { min-width: 0; padding: 18px 22px; cursor: pointer; }
.today-focus-result small, .today-start-action small { display: block; color: #bfe0cd; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.today-focus-result strong { display: block; margin-top: 7px; font-size: 20px; line-height: 1.3; letter-spacing: -.035em; }
.today-focus-result p { margin: 7px 0 0; color: #d6e6dc; font-size: 10px; line-height: 1.55; }
.today-focus-result > span { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: #bcd3c5; font-size: 8px; }
.today-focus-result i { width: 7px; height: 7px; border-radius: 2px; }
.today-start-action { display: grid; align-content: center; gap: 7px; min-width: 0; padding: 18px 20px; border: 0; border-left: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08); color: white; text-align: left; cursor: pointer; }
.today-start-action:hover { background: rgba(255,255,255,.14); }
.today-start-action strong { font-size: 13px; line-height: 1.4; }
.today-start-action span { color: #bfe0cd; font-size: 9px; }
.today-focus.empty { display: block; padding: 18px 22px; background: #f7faf7; color: var(--ink); }
.today-focus.empty small { color: var(--brand); }
.today-focus.empty strong { display: block; margin-top: 6px; }
.today-focus.empty p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.todo-columns { display: grid; grid-template-columns: 1.1fr 1.15fr 1fr 1fr 1fr; gap: 0; }
.todo-column { min-width: 0; border-right: 1px solid var(--line); background: #fff; }
.todo-column:last-child { border-right: 0; }
.todo-column.priority { background: #fffdf9; }
.todo-column.overdue { background: #fff8f7; }
.todo-column.blocked { background: #fffafa; }
.todo-column.done { background: #fbfdfb; }
.today-side-column { background: #fbfdfb; }
.todo-column-head { padding: 14px 14px 10px; border-bottom: 1px solid var(--line); min-height: 72px; }
.todo-column-head h3 { margin: 0; font-size: 13px; }
.todo-column-head small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.today-side-section { border-top: 1px solid var(--line); }
.today-side-section:first-of-type { border-top: 0; }
.today-side-section h4 { margin: 0; padding: 10px 12px 0; color: var(--brand); font-size: 11px; letter-spacing: .02em; }
.today-side-section.done-section h4 { color: var(--muted); }
.tomorrow-preview { position: sticky; top: 86px; min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: #fbfcfa; box-shadow: 0 10px 30px rgba(33,46,38,.05); overflow: hidden; }
.tomorrow-preview-head { padding: 17px 16px 13px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #ffffff, #f8faf7); }
.tomorrow-preview-head small { display: block; color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tomorrow-preview-head h3 { margin: 6px 0 5px; font-size: 18px; letter-spacing: -.04em; }
.tomorrow-preview-head p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.tomorrow-list { max-height: calc(100vh - 190px); overflow-y: auto; }
.todo-list { display: grid; gap: 8px; padding: 10px; align-content: start; }
.todo-item { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.todo-item.urgent { border-color: #f0c4bb; box-shadow: inset 3px 0 0 var(--red); }
.todo-item.high { border-color: #f2d7aa; box-shadow: inset 3px 0 0 var(--amber); }
.todo-item.normal { box-shadow: inset 3px 0 0 var(--status-doing); }
.todo-item.status-todo.normal { box-shadow: inset 3px 0 0 var(--status-todo); }
.todo-item.status-doing.normal { box-shadow: inset 3px 0 0 var(--status-doing); }
.todo-item.status-blocked { box-shadow: inset 3px 0 0 var(--status-blocked); }
.todo-item.done { opacity: .82; box-shadow: inset 3px 0 0 var(--brand); }
.todo-item.failed { box-shadow: inset 3px 0 0 var(--red); }
.todo-check { width: 28px; height: 28px; border: 1.5px solid #bfc7bd; border-radius: 8px; background: white; cursor: pointer; margin-top: 0; }
.todo-check:hover { border-color: var(--brand); background: var(--brand-soft); }
.todo-content { min-width: 0; cursor: pointer; }
.todo-title { display: flex; align-items: flex-start; gap: 7px; }
.todo-title strong { flex: 1; min-width: 0; font-size: 12px; line-height: 1.35; }
.urgency { flex: 0 0 auto; padding: 2px 6px; border-radius: 6px; font-size: 10px; }
.urgency.urgent { color: var(--red); background: var(--red-soft); }
.urgency.high { color: var(--amber); background: var(--amber-soft); }
.urgency.normal { color: var(--brand); background: var(--brand-soft); }
.todo-content p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.task-steps { display: grid; gap: 5px; margin-top: 8px; padding: 7px; border-radius: 9px; background: #f8faf7; border: 1px solid var(--line); }
.task-steps.compact { margin-top: 6px; padding: 0; border: 0; background: transparent; gap: 3px; }
.task-steps-progress { color: var(--muted); font-size: 10px; }
.task-step { display: grid; grid-template-columns: 16px minmax(0,1fr); gap: 6px; align-items: center; border: 0; background: transparent; padding: 2px 0; text-align: left; color: var(--ink); cursor: pointer; }
.task-step span { width: 14px; height: 14px; display: grid; place-items: center; border: 1.5px solid #bfc7bd; border-radius: 50%; color: white; font-size: 8px; line-height: 1; }
.task-step.done span { border-color: #718078; background: #718078; }
.task-step em { min-width: 0; color: #596159; font-style: normal; font-size: 11px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-step.done em { color: #8b928a; text-decoration: line-through; }
.todo-meta { display: flex; flex-wrap: wrap; gap: 5px 7px; margin-top: 8px; color: #7f877f; font-size: 10px; }
.todo-meta span { display: inline-flex; align-items: center; gap: 4px; }
.todo-meta i { width: 6px; height: 6px; border-radius: 2px; }
.todo-meta .status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--status-color); }
.todo-empty { padding: 25px 12px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; font-size: 10px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .75fr); gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 19px 14px; border-bottom: 1px solid var(--line); }
.panel-title { display: flex; align-items: center; gap: 9px; }
.panel-title h2 { margin: 0; font-size: 14px; }
.panel-title .count { color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; font-size: 9px; }
.panel-header > button, .text-button { border: 0; background: transparent; color: var(--brand); cursor: pointer; font-size: 11px; }

.thought-capture-panel { overflow: hidden; margin-bottom: 14px; }
.thought-page-input {
  width: calc(100% - 38px);
  margin: 18px 19px 0;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  outline: 0;
  background: #fbfcfa;
  line-height: 1.65;
}
.thought-page-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(49, 95, 73, .09);
  background: white;
}
.thought-actions { display: flex; justify-content: flex-end; padding: 12px 19px 18px; }
.thought-list { display: grid; gap: 10px; }
.thought-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.thought-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.thought-item-head time { color: var(--muted); font-size: 10px; }
.thought-item-head button { border: 0; background: transparent; color: #a25a52; cursor: pointer; font-size: 11px; }
.thought-item p { margin: 0; color: #3b423d; font-size: 13px; line-height: 1.7; white-space: normal; }
.thought-day-group { display: grid; gap: 10px; }
.thought-day-group + .thought-day-group { margin-top: 20px; }
.thought-day-divider { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3px 2px 9px; border-bottom: 1px solid var(--line); }
.thought-day-divider strong { color: var(--ink); font-size: 13px; }
.thought-day-divider span { padding: 3px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 9px; font-weight: 700; }
.thought-day-items { display: grid; gap: 10px; }
.thought-empty { padding: 42px 16px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; background: rgba(255,255,255,.55); }
.mobile-task-glance { display: none; }

.project-task-group { border-bottom: 1px solid var(--line); }
.project-task-group:last-child { border-bottom: 0; }
.group-head { display: flex; align-items: center; gap: 8px; padding: 14px 19px 7px; }
.group-head i { width: 9px; height: 9px; border-radius: 3px; }
.group-head strong { font-size: 12px; }
.group-head span { color: var(--muted); font-size: 10px; }
.group-head button { margin-left: auto; border: 0; background: transparent; color: #999f98; cursor: pointer; }
.task-list { padding: 0 9px 9px; }
.task-row {
  display: grid; grid-template-columns: 26px minmax(0,1fr) auto auto;
  align-items: center; gap: 8px; padding: 9px 10px;
  border-radius: 9px; transition: background-color .15s ease; position: relative;
}
.task-row:hover { background: #f8f9f6; }
.task-check { width: 17px; height: 17px; border: 1.5px solid #bec4bc; border-radius: 5px; background: white; cursor: pointer; display: grid; place-items: center; color: transparent; }
.task-check:hover { border-color: var(--brand); color: var(--brand); }
.task-main { min-width: 0; cursor: pointer; }
.task-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 580; }
.task-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; color: var(--muted); font-size: 9px; }
.task-meta span { display: inline-flex; align-items: center; gap: 3px; }
.status-pill { padding: 3px 7px; border-radius: 6px; font-size: 9px; white-space: nowrap; }
.status-pill.doing { color: #315ba6; background: #e8effc; }
.status-pill.blocked { color: #a33f60; background: #f9e8ee; }
.status-pill.todo { color: #69727e; background: #eef1f4; }
.status-pill.done { color: #276b4b; background: #e5f2ea; }
.status-pill.cancelled { color: #9d554d; background: #f8e9e6; }
.status-pill.archived, .status-pill.paused { color: #70756f; background: #efefec; }
.quantity-progress { width: 72px; }
.quantity-progress span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; text-align: right; }
.tiny-progress { height: 4px; background: #ebeee8; border-radius: 4px; overflow: hidden; }
.tiny-progress i { display: block; height: 100%; border-radius: 4px; background: var(--brand); }
.more-button { border: 0; background: transparent; color: #a0a59f; cursor: pointer; font-size: 14px; padding: 5px; }

.empty-state { text-align: center; padding: 45px 20px; color: var(--muted); }
.empty-state i { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; margin: 0 auto 10px; background: var(--brand-soft); color: var(--brand); font-style: normal; font-size: 20px; }
.empty-state strong { display: block; color: var(--ink); }
.empty-state p { margin: 6px auto 12px; max-width: 300px; font-size: 11px; line-height: 1.6; }

.side-stack { display: grid; gap: 16px; align-content: start; }
.week-focus { padding: 17px 18px; }
.week-focus .eyebrow, .eyebrow { color: var(--brand); font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.week-focus h3 { margin: 9px 0 5px; font-size: 17px; letter-spacing: -.03em; }
.week-focus p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.week-progress-line { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.week-progress-line .progress-track { flex: 1; height: 7px; border-radius: 5px; background: #edf0eb; overflow: hidden; }
.week-progress-line i { display: block; height: 100%; border-radius: 5px; background: var(--brand); }
.week-progress-line b { color: var(--brand); font-size: 11px; }
.week-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 13px; }
.week-stats div { border: 1px solid var(--line); border-radius: 9px; padding: 8px; }
.week-stats strong, .week-stats small { display: block; }
.week-stats strong { font-size: 14px; }
.week-stats small { margin-top: 2px; color: var(--muted); font-size: 8px; }

.plan-tree-panel { margin-bottom: 16px; overflow: hidden; }
.planbook-header { align-items: flex-start; }
.planbook-header p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.planbook-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.planbook-actions button, .plan-node-actions button {
  border: 1px solid var(--line-strong); background: white; color: var(--brand);
  border-radius: 8px; padding: 6px 8px; font-size: 10px; cursor: pointer;
}
.planbook-actions button:hover, .plan-node-actions button:hover { border-color: var(--brand); background: var(--brand-soft); }
.planbook-legend { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px 0; color: var(--muted); font-size: 9px; }
.planbook-legend span { padding: 4px 7px; border: 1px solid var(--line); border-radius: 999px; background: #fbfcfa; }
.plan-focus { padding: 12px; }
.plan-focus-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.plan-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 9px; }
.plan-breadcrumb button { border: 0; background: transparent; color: var(--brand); padding: 0; cursor: pointer; font-size: 9px; }
.plan-focus-card {
  display: grid; grid-template-columns: minmax(0,1fr) 150px; gap: 14px;
  padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfa;
}
.plan-focus-main h3 { margin: 9px 0 6px; font-size: 17px; letter-spacing: -.03em; }
.plan-focus-main p { margin: 0 0 8px; color: #586159; font-size: 11px; line-height: 1.55; }
.plan-focus-main small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.plan-focus-main small i { width: 7px; height: 7px; border-radius: 2px; }
.plan-focus-side { display: grid; align-content: start; gap: 8px; }
.plan-focus-side strong { font-size: 23px; color: var(--brand); }
.plan-focus-side span { color: var(--muted); font-size: 9px; }
.plan-focus-side button { justify-content: center; }
.plan-subtree-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 8px; }
.plan-subtree-head strong { font-size: 12px; }
.plan-subtree-head span { color: var(--muted); font-size: 9px; }
.focus-tree { padding: 0; }
.panel-note { color: var(--muted); font-size: 9px; }
.plan-tree { padding: 10px 12px 13px; }
.plan-node {
  display: grid; grid-template-columns: minmax(0,1fr) 116px; gap: 10px;
  align-items: center; padding: 10px 11px; margin-top: 7px;
  border: 1px solid var(--line); border-radius: 11px; background: white;
}
.plan-node:hover { border-color: var(--line-strong); background: #fbfcfa; }
.plan-node.depth-1 { margin-left: 20px; }
.plan-node.depth-2 { margin-left: 40px; }
.plan-node.depth-3 { margin-left: 60px; }
.plan-node.closed { opacity: .72; }
.plan-node.failed { border-color: #f0d0cb; background: #fff8f7; }
.plan-node-main { min-width: 0; }
.plan-node-main[data-plan-focus] { cursor: pointer; }
.plan-node-main strong { display: block; margin-top: 5px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-node-main small { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--muted); font-size: 9px; }
.plan-node-main small i { width: 7px; height: 7px; border-radius: 2px; flex: 0 0 auto; }
.plan-node-side { display: grid; gap: 7px; align-content: center; }
.plan-node-actions { display: flex; justify-content: flex-end; gap: 4px; }
.plan-node-actions button { padding: 4px 6px; font-size: 9px; }
.scope-badge { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 6px; font-size: 9px; font-weight: 700; }
.scope-badge.month { color: #5b43bd; background: #eee9ff; }
.scope-badge.week { color: var(--blue); background: var(--blue-soft); }
.scope-badge.day { color: var(--brand); background: var(--brand-soft); }
.scope-badge.inbox { color: #7a786b; background: #f1f0e8; }
.plan-node-progress span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; text-align: right; }
.plan-children { position: relative; }
.plan-children::before { content: ""; position: absolute; left: 18px; top: 0; bottom: 0; width: 1px; background: var(--line); }

.long-plan-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.long-plan-metrics article { padding: 13px 15px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.long-plan-metrics strong,.long-plan-metrics span { display: block; }
.long-plan-metrics strong { font-size: 20px; letter-spacing: -.04em; }
.long-plan-metrics span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.long-plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-bottom: 14px; }
.long-plan-panel { overflow: hidden; }
.long-plan-panel .panel-header > button,
.long-alert-panel .plan-alert button {
  border: 1px solid var(--line-strong); background: white; color: var(--brand);
  border-radius: 8px; padding: 6px 8px; font-size: 10px; cursor: pointer;
}
.long-plan-list { display: grid; gap: 10px; padding: 12px; }
.long-plan-card {
  border: 1px solid var(--line); border-radius: 13px; padding: 13px;
  background: #fff; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.long-plan-card:hover { border-color: var(--line-strong); background: #fbfcfa; transform: translateY(-1px); }
.long-plan-card.month-card { box-shadow: inset 3px 0 0 var(--purple); }
.long-plan-card.week-card { box-shadow: inset 3px 0 0 var(--blue); }
.long-plan-top { display: flex; align-items: center; gap: 7px; }
.long-plan-top .project-chip { min-width: 0; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.long-plan-top button { margin-left: auto; border: 0; background: transparent; color: var(--brand); font-size: 10px; cursor: pointer; }
.long-plan-card h3 { margin: 10px 0 6px; font-size: 14px; line-height: 1.35; }
.long-plan-card p { margin: 0; color: #5d655e; font-size: 11px; line-height: 1.55; }
.long-plan-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; color: var(--muted); font-size: 9px; }
.plan-mini-progress { display: grid; grid-template-columns: auto auto; gap: 6px; align-items: center; margin-top: 10px; color: var(--muted); font-size: 9px; }
.plan-mini-progress b { color: var(--ink); text-align: right; }
.plan-mini-progress .tiny-progress { grid-column: 1 / -1; }
.long-plan-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 10px; }
.long-plan-stats div { padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfa; }
.long-plan-stats b,.long-plan-stats small { display: block; }
.long-plan-stats b { font-size: 14px; }
.long-plan-stats small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.project-plan-board { display: grid; gap: 14px; margin-bottom: 14px; }
.project-plan-section { overflow: visible; }
.project-plan-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; border-bottom: 1px solid var(--line); background: #fbfcfa; }
.project-plan-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.project-plan-title > i { width: 12px; height: 38px; border-radius: 8px; flex: 0 0 auto; }
.project-plan-title h2 { margin: 0; font-size: 15px; letter-spacing: -.03em; }
.project-plan-title span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.project-plan-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.project-plan-actions button { border: 1px solid var(--line); border-radius: 9px; background: white; padding: 7px 9px; color: var(--brand); font-size: 10px; cursor: pointer; }
.project-plan-tree { padding: 11px 14px 14px; overflow-x: auto; overscroll-behavior-x: contain; }
.plan-project-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.plan-project-tabs button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--muted); padding: 8px 11px; font-size: 11px; cursor: pointer; transition: color .15s ease, background-color .15s ease, border-color .15s ease, transform .15s ease; }
.plan-project-tabs button:hover { border-color: var(--line-strong); color: var(--brand); transform: translateY(-1px); }
.plan-project-tabs button.active { background: var(--brand); border-color: var(--brand); color: white; box-shadow: 0 8px 18px rgba(47,95,70,.16); }
.plan-project-tabs i { width: 7px; height: 7px; border-radius: 2px; }
.project-plan-map { display: grid; justify-items: start; align-items: start; gap: 18px; width: max-content; min-width: 100%; padding: 8px 0 2px; }
.project-plan-root { position: relative; display: grid; justify-items: center; gap: 4px; min-width: 190px; border: 0; border-radius: 14px; padding: 13px 18px; background: var(--brand); color: white; cursor: pointer; box-shadow: 0 12px 24px rgba(47,95,70,.18); }
.project-plan-root::after { content: ""; position: absolute; left: 50%; bottom: -18px; width: 1px; height: 18px; background: #5b83ff; }
.project-plan-root i { width: 9px; height: 9px; border-radius: 3px; box-shadow: 0 0 0 2px rgba(255,255,255,.45); }
.project-plan-root strong { font-size: 15px; }
.project-plan-root span { color: #d8e8df; font-size: 9px; }
.plan-map-children { position: relative; display: flex; justify-content: flex-start; align-items: flex-start; gap: 18px; width: max-content; min-width: 100%; padding-top: 18px; }
.plan-map-children::before { content: ""; position: absolute; top: 0; left: 75px; right: 75px; height: 1px; background: #5b83ff; opacity: .78; }
.plan-map-branch { position: relative; display: grid; justify-items: center; gap: 12px; flex: 0 0 168px; width: 168px; }
.plan-map-branch::before { content: ""; position: absolute; top: -18px; left: 50%; width: 1px; height: 18px; background: #5b83ff; opacity: .78; }
.plan-map-node { width: 100%; min-height: 82px; border: 1px solid #d9e1ff; border-radius: 13px; background: white; box-shadow: 0 8px 18px rgba(35,52,92,.05); overflow: hidden; }
.plan-map-node.month { border-color: #cfc4ff; }
.plan-map-node.week { border-color: #bfd1ff; }
.plan-map-node.day { border-color: #c8ddd0; }
.plan-map-node.risk { border-color: #f1b5ac; box-shadow: inset 3px 0 0 var(--red), 0 8px 18px rgba(194,83,74,.06); }
.plan-map-node.closed { opacity: .72; }
.plan-map-node-main { display: grid; gap: 5px; padding: 10px 11px 8px; cursor: pointer; }
.plan-map-node-main strong { font-size: 12px; line-height: 1.35; }
.plan-map-node-main small { color: var(--muted); font-size: 8px; line-height: 1.35; }
.plan-map-actions { display: flex; justify-content: flex-end; gap: 4px; padding: 7px 9px; border-top: 1px solid var(--line); background: #fbfcfa; }
.plan-map-actions button { border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--brand); padding: 4px 6px; font-size: 8px; cursor: pointer; }
.project-month-branches { padding-top: 22px; }
.standalone-plan-group { width: 100%; margin-top: 10px; padding: 12px; border: 1px dashed #d6ded8; border-radius: 13px; background: #fbfcfa; }
.standalone-branches::before { background: #c8d1ca; }
.standalone-plan-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; color: var(--muted); }
.standalone-plan-title span { font-size: 11px; font-weight: 800; color: var(--ink); }
.standalone-plan-title small { font-size: 9px; }
.project-plan-outline { display: grid; gap: 14px; }
.plan-outline-month { border: 1px solid #d9d0ff; border-radius: 16px; background: white; padding: 14px; box-shadow: 0 8px 20px rgba(35,52,92,.04); }
.plan-outline-month.risk { border-color: #f1b5ac; box-shadow: inset 3px 0 0 var(--red), 0 8px 20px rgba(194,83,74,.06); }
.plan-outline-month-head { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: start; }
.plan-outline-month-head h3 { margin: 7px 0 4px; font-size: 15px; line-height: 1.35; cursor: pointer; }
.plan-outline-month-head h3:hover,.plan-outline-week-head strong:hover,.plan-outline-loose-head strong:hover { color: var(--brand); }
.plan-outline-month-head small,.plan-outline-week-head small,.plan-outline-loose-head small,.plan-outline-day small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.plan-outline-month > p,.plan-outline-week > p { margin: 9px 0 0; color: #5d655e; font-size: 11px; line-height: 1.55; max-width: 920px; }
.plan-outline-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.plan-outline-actions button { border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--brand); padding: 5px 8px; font-size: 9px; cursor: pointer; }
.plan-outline-actions button:hover { border-color: var(--line-strong); background: #fbfcfa; }
.plan-outline-weeks { display: grid; gap: 10px; margin-top: 12px; }
.plan-outline-week { border: 1px solid #dbe5de; border-radius: 13px; background: #fbfcfa; padding: 11px; }
.plan-outline-week.risk { border-color: #f1b5ac; background: #fffafa; }
.plan-outline-week-head,.plan-outline-loose-head { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: start; }
.plan-outline-week-head strong,.plan-outline-loose-head strong { display: block; margin: 6px 0 4px; font-size: 13px; line-height: 1.35; cursor: pointer; }
.plan-outline-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 8px; margin-top: 10px; }
.plan-outline-day { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 5px 9px; align-items: start; width: 100%; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 9px 10px; text-align: left; cursor: pointer; box-shadow: 0 4px 12px rgba(37,47,40,.03); }
.plan-outline-day:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.plan-outline-day > span { grid-row: span 2; min-width: 40px; color: var(--brand); font-size: 10px; font-weight: 800; }
.plan-outline-day strong { min-width: 0; color: var(--ink); font-size: 11px; line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.plan-outline-day.doing { border-color: #b8d2c0; box-shadow: inset 3px 0 0 var(--brand), 0 4px 12px rgba(37,47,40,.03); }
.plan-outline-day.todo { border-color: #e1e7e0; }
.plan-outline-day.blocked,.plan-outline-day.risk { border-color: #f1b5ac; background: #fffafa; }
.plan-outline-day.done,.plan-outline-day.archived,.plan-outline-day.cancelled { opacity: .66; }
.plan-outline-empty { border: 1px dashed #d6ded8; border-radius: 11px; padding: 13px; color: var(--muted); font-size: 11px; text-align: center; background: #fff; }
.plan-outline-direct-days { border-top: 1px dashed #d8dfd9; margin-top: 10px; padding-top: 10px; }
.plan-outline-direct-days > strong { color: var(--muted); font-size: 10px; }
.plan-outline-standalone { border: 1px dashed #d6ded8; border-radius: 15px; background: #fbfcfa; padding: 12px; }
.plan-outline-loose-list { display: grid; gap: 9px; }
.plan-outline-loose { border: 1px solid var(--line); border-radius: 12px; background: white; padding: 10px; }
.plan-outline-loose.risk { border-color: #f1b5ac; background: #fffafa; }
.long-alert-panel { overflow: hidden; }
.plan-alert-list { display: grid; gap: 8px; padding: 12px; }
.plan-alert { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fffdf9; }
.plan-alert strong { display: block; font-size: 11px; }
.plan-alert p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }

.risk-list { padding: 8px 10px 11px; }
.risk-item { display: grid; grid-template-columns: 29px 1fr auto; gap: 9px; align-items: start; padding: 10px 8px; border-radius: 9px; cursor: pointer; }
.risk-item:hover { background: #f8f9f6; }
.risk-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: var(--red-soft); color: var(--red); font-size: 12px; }
.risk-icon.warn { background: var(--amber-soft); color: var(--amber); }
.risk-icon.info { background: var(--blue-soft); color: var(--blue); }
.risk-item strong { display: block; font-size: 11px; }
.risk-item p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.risk-item > span { color: #a1a69f; font-size: 15px; }

.completed-preview { padding: 6px 10px 12px; }
.done-row { display: flex; align-items: center; gap: 9px; padding: 9px; }
.done-row.failed { color: #a34b45; background: rgba(194,83,74,.08); border-radius: 10px; }
.done-check { width: 17px; height: 17px; border-radius: 5px; display: grid; place-items: center; background: var(--brand); color: white; font-size: 10px; }
.done-row div { min-width: 0; }
.done-row strong { display: block; font-size: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.done-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }

.tabs { display: flex; align-items: center; gap: 4px; padding: 4px; background: #ecefe9; border-radius: 9px; }
.tabs button { border: 0; background: transparent; border-radius: 6px; padding: 6px 11px; color: var(--muted); font-size: 11px; cursor: pointer; }
.tabs button.active { background: white; color: var(--ink); box-shadow: 0 1px 4px rgba(37,47,40,.08); font-weight: 650; }

.calendar-shell { overflow: hidden; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.calendar-toolbar .legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 9px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 7px; height: 7px; border-radius: 2px; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(95px,1fr)); min-width: 760px; }
.weekday { padding: 10px; background: #fafbf8; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 700; text-align: center; }
.weekday strong, .weekday span { display: block; }
.weekday span { margin-top: 3px; font-size: 8px; font-weight: 500; }
.calendar-day { min-height: 128px; padding: 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: white; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.other { background: #fafbf8; color: #aeb3ac; }
.calendar-day.today { background: #fbfdfb; box-shadow: inset 0 0 0 1px rgba(49,95,73,.35); }
.calendar-day.selected { box-shadow: inset 0 0 0 2px var(--brand); }
.calendar-day { cursor: pointer; }
.calendar-count { margin: 3px 0 5px; color: var(--muted); font-size: 8px; }
.calendar-count,.calendar-date-button { border: 0; background: transparent; cursor: pointer; color: inherit; padding: 0; font: inherit; }
.calendar-count:hover { color: var(--brand); }
.calendar-items { max-height: 98px; overflow: auto; scrollbar-width: thin; }
.week-grid .calendar-items { max-height: 345px; }
.day-number { display: flex; align-items: center; justify-content: space-between; font-size: 10px; margin-bottom: 6px; }
.day-number b { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 8px; }
.calendar-day.today .day-number b { background: var(--brand); color: white; }
.day-number button { border: 0; background: transparent; opacity: 0; cursor: pointer; color: var(--brand); font-size: 15px; }
.calendar-day:hover .day-number button { opacity: 1; }
.calendar-task { border-left: 3px solid var(--status-color); background: color-mix(in srgb, var(--task-color) 9%, white); border-radius: 5px; padding: 5px 6px; margin-bottom: 4px; font-size: 8px; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.calendar-task.done { opacity: .55; text-decoration: line-through; }
.more-tasks { color: var(--muted); font-size: 8px; padding: 3px 5px; }
.week-grid .calendar-day { min-height: 430px; }
.day-agenda { display: grid; grid-template-columns: 170px minmax(0,1fr); min-height: 540px; }
.day-agenda > aside { padding: 30px 25px; border-right: 1px solid var(--line); background: #fafbf8; }
.day-big { display: block; color: var(--brand); font-size: 52px; line-height: 1; font-weight: 780; letter-spacing: -.08em; }
.day-agenda > aside > strong { display: block; margin-top: 9px; font-size: 15px; }
.day-agenda > aside > small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.day-summary { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.day-summary b, .day-summary span { display: block; }
.day-summary b { font-size: 21px; }
.day-summary span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.day-agenda-content { padding: 10px 12px; }
.day-agenda-content .project-task-group { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.battle-project-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 9px; margin-bottom: 4px; scrollbar-width: thin; }
.battle-project-tabs button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 8px 11px; color: #5f665f; font-size: 10px; cursor: pointer; transition: color .16s ease, background-color .16s ease, border-color .16s ease, transform .16s ease; }
.battle-project-tabs button i { width: 8px; height: 8px; border-radius: 3px; }
.battle-project-tabs button:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.battle-project-tabs button.active { border-color: var(--brand); background: var(--brand); color: white; box-shadow: 0 8px 18px rgba(49,95,73,.16); }
.status-visual-key { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 13px; color: var(--muted); font-size: 9px; }
.status-visual-key > span { margin-right: 4px; color: var(--ink); font-weight: 700; }
.status-visual-key i { width: 8px; height: 8px; border-radius: 50%; }
.status-visual-key i.todo { background: var(--status-todo); }
.status-visual-key i.doing { background: var(--status-doing); }
.status-visual-key i.done { background: var(--status-done); }
.status-visual-key i.blocked { background: var(--status-blocked); }
.status-visual-key i.cancelled { background: var(--status-cancelled); }
.status-visual-key b { color: #b3b7b1; font-weight: 500; }
.status-visual-key em { width: 12px; }
.project-battle { margin-bottom: 20px; overflow: hidden; border-color: color-mix(in srgb, var(--project-color) 28%, var(--line)); box-shadow: 0 18px 45px rgba(33,46,38,.06); }
.battle-hero { display: grid; grid-template-columns: auto minmax(0,1fr) 110px auto; align-items: center; gap: 16px; padding: 20px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--project-color) 8%, white), white 62%); }
.battle-project-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 15px; color: white; font-size: 13px; font-weight: 800; box-shadow: 0 10px 20px color-mix(in srgb, var(--project-color) 22%, transparent); }
.battle-hero-main { min-width: 0; }
.battle-hero-main > div { display: flex; align-items: center; gap: 8px; }
.battle-hero-main h2 { margin: 6px 0 4px; font-size: 22px; letter-spacing: -.045em; }
.battle-hero-main p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.battle-progress { display: grid; gap: 4px; text-align: right; }
.battle-progress strong { font-size: 22px; }
.battle-progress span { color: var(--muted); font-size: 8px; }
.battle-progress > div { height: 6px; overflow: hidden; border-radius: 5px; background: #edf0eb; }
.battle-progress i { display: block; height: 100%; border-radius: inherit; background: var(--project-color); }
.battle-hero-actions { display: flex; gap: 7px; }
.battle-four-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); }
.battle-module { min-width: 0; min-height: 184px; padding: 16px; border-right: 1px solid var(--line); background: white; }
.battle-module:last-child { border-right: 0; }
.battle-module header { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; }
.battle-module header b { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; color: white; background: var(--project-color); font-size: 8px; }
.battle-module header span { font-size: 11px; font-weight: 800; }
.battle-module > strong { display: block; font-size: 13px; line-height: 1.45; }
.battle-module > p { margin: 9px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.battle-module dl { display: grid; gap: 9px; margin: 0; }
.battle-module dl div { min-width: 0; }
.battle-module dt { color: var(--muted); font-size: 8px; }
.battle-module dd { margin: 3px 0 0; color: #343a35; font-size: 9px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.battle-risk { background: #fffafa; }
.battle-risk-counts { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; }
.battle-risk-counts span { padding: 7px 4px; border: 1px solid #f0ddda; border-radius: 8px; color: #966159; font-size: 7px; text-align: center; background: white; }
.battle-risk-counts b { display: block; color: var(--red); font-size: 14px; }
.battle-review { background: #fbfdfb; }
.battle-stage { background: #fbfcff; }
.battle-constraint { background: #fffafa; }
.battle-week-result { background: #fbfdfb; }
.battle-route { padding: 19px; border-top: 1px solid var(--line); }
.battle-section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 13px; }
.battle-section-head h3 { margin: 4px 0 0; font-size: 14px; }
.battle-section-head > span { color: var(--muted); font-size: 8px; }
.battle-route-track { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; }
.battle-route-node { position: relative; min-width: 0; min-height: 142px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: white; cursor: pointer; box-shadow: inset 3px 0 0 var(--project-color); }
.battle-route-node:not(:last-child)::after { content: "→"; position: absolute; right: -16px; top: 50%; transform: translateY(-50%); color: #aab0aa; font-weight: 800; }
.battle-route-node.objective { background: color-mix(in srgb, var(--project-color) 6%, white); }
.battle-route-node.empty { box-shadow: none; border-style: dashed; color: var(--muted); cursor: default; }
.battle-route-node > div { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.battle-route-node > div > span:first-child:not(.scope-badge) { padding: 3px 7px; border-radius: 6px; background: color-mix(in srgb, var(--project-color) 12%, white); color: var(--project-color); font-size: 9px; font-weight: 700; }
.battle-route-node > strong { display: block; margin-top: 10px; font-size: 11px; line-height: 1.45; }
.battle-route-node > p { margin: 6px 0 10px; color: var(--muted); font-size: 8px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.battle-route-node footer { position: absolute; left: 13px; right: 13px; bottom: 11px; display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 7px; }
.battle-route-node footer b { color: var(--project-color); font-size: 8px; }
.battle-bottom-grid { display: grid; grid-template-columns: .9fr 1.1fr; border-top: 1px solid var(--line); }
.battle-risk-list, .battle-weekly { padding: 18px 19px; }
.battle-risk-list { border-right: 1px solid var(--line); }
.battle-risk-list > button { width: 100%; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 3px 8px; align-items: center; margin-top: 7px; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: white; text-align: left; cursor: pointer; }
.battle-risk-list > button strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.battle-risk-list > button small { grid-column: 2; color: var(--muted); font-size: 7px; }
.battle-clear { display: flex; align-items: center; gap: 8px; padding: 17px; border: 1px dashed #bcd7c7; border-radius: 10px; background: #f8fcf9; color: var(--brand); font-size: 9px; }
.battle-clear b { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); }
.battle-weekly ol { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.battle-weekly li { display: grid; grid-template-columns: 105px minmax(0,1fr); gap: 9px; padding: 8px 0; border-top: 1px solid var(--line); }
.battle-weekly li:first-child { border-top: 0; }
.battle-weekly li span { color: var(--muted); font-size: 8px; }
.battle-weekly li b { min-width: 0; font-size: 9px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-list-head { display: flex; justify-content: space-between; align-items: end; margin: 22px 2px 11px; }
.project-list-head h2 { margin: 4px 0 0; font-size: 17px; }
.project-list-head > span { color: var(--muted); font-size: 9px; }
.project-card { padding: 18px; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.project-detail-grid { display: grid; grid-template-columns: minmax(280px,.75fr) minmax(0,1.7fr); gap: 14px; }
.project-detail-stack { display: grid; gap: 14px; }
.project-summary { padding: 20px; align-self: start; }
.progress-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 18px 0; }
.progress-fields > div { padding: 11px; border-radius: 9px; background: var(--surface-soft); }
.progress-fields small,.progress-fields strong { display: block; }
.progress-fields small { color: var(--muted); font-size: 8px; margin-bottom: 5px; }
.progress-fields strong { font-size: 12px; }
.task-row.is-done .task-main strong { color: var(--muted); text-decoration: line-through; }
.task-row.is-failed .task-main strong { color: #a34b45; }
.task-row.is-failed .task-check { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.task-check.checked { background: var(--brand); color: white; border-color: var(--brand); }
.empty-state.compact { padding: 24px 12px; }
.project-top { display: flex; align-items: flex-start; gap: 11px; }
.project-symbol { width: 39px; height: 39px; border-radius: 12px; display: grid; place-items: center; color: white; font-weight: 750; }
.project-top h3 { margin: 0 0 4px; font-size: 15px; }
.project-top p { margin: 0; color: var(--muted); font-size: 10px; }
.project-top .status-pill { margin-left: auto; }
.project-goal { margin: 16px 0 12px; padding: 11px; border-radius: 9px; background: var(--surface-soft); }
.project-goal small { display: block; color: var(--muted); font-size: 8px; margin-bottom: 4px; }
.project-goal strong { font-size: 11px; line-height: 1.45; }
.project-progress-head { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 9px; color: var(--muted); }
.project-progress-head b { color: var(--ink); }
.project-progress { height: 7px; background: #edf0eb; border-radius: 5px; overflow: hidden; }
.project-progress i { display: block; height: 100%; border-radius: 5px; }
.project-footer { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.project-footer div { border-right: 1px solid var(--line); padding: 0 10px; }
.project-footer div:first-child { padding-left: 0; }
.project-footer div:last-child { border-right: 0; }
.project-footer strong, .project-footer small { display: block; }
.project-footer strong { font-size: 12px; }
.project-footer small { margin-top: 3px; color: var(--muted); font-size: 8px; }

.gantt-overview { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.gantt-overview article { padding: 13px 15px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.gantt-overview strong, .gantt-overview span { display: block; }
.gantt-overview strong { font-size: 18px; letter-spacing: -.04em; }
.gantt-overview span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.gantt-panel { overflow: hidden; }
.gantt-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.filter-select { border: 1px solid var(--line); background: white; padding: 7px 28px 7px 9px; border-radius: 8px; color: var(--ink); font-size: 10px; }
.gantt-scroll { overflow: auto; }
.gantt-table { min-width: 1060px; }
.gantt-header, .gantt-row { display: grid; grid-template-columns: 210px 90px repeat(21, 36px); }
.gantt-header { position: sticky; top: 0; z-index: 2; background: #fafbf8; }
.gantt-header > div, .gantt-row > div { min-height: 39px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gantt-header > div { display: grid; place-items: center; color: var(--muted); font-size: 8px; }
.gantt-header .gantt-task-col, .gantt-row .gantt-task-col { position: sticky; left: 0; z-index: 3; background: white; border-right: 1px solid var(--line-strong); }
.gantt-header .gantt-task-col { background: #fafbf8; z-index: 5; place-items: center start; padding-left: 14px; }
.gantt-header .gantt-status-col, .gantt-row .gantt-status-col { position: sticky; left: 210px; z-index: 3; background: white; border-right: 1px solid var(--line-strong); }
.gantt-header .gantt-status-col { background: #fafbf8; z-index: 5; }
.gantt-row .gantt-task-col { padding: 8px 13px; }
.gantt-row .gantt-task-col strong { display: block; font-size: 9px; }
.gantt-row .gantt-task-col small { display: block; margin-top: 3px; color: var(--muted); font-size: 7px; }
.gantt-row .gantt-status-col { display: grid; place-items: center; }
.gantt-cell { position: relative; background-image: linear-gradient(to right, transparent 95%, rgba(0,0,0,.02) 95%); }
.gantt-cell.weekend { background-color: #fafbf8; }
.gantt-cell.gantt-week-start, .gantt-header .gantt-week-start { border-left: 2px solid var(--line-strong); }
.gantt-project-section { border-bottom: 1px solid var(--line-strong); }
.gantt-project-section:last-child { border-bottom: 0; }
.gantt-project-head {
  position: sticky; left: 0; z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-width: 100%; padding: 10px 13px; background: #f4f6f1; border-bottom: 1px solid var(--line);
}
.gantt-project-head > div:first-child { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gantt-project-head i { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 auto; }
.gantt-project-head strong { font-size: 12px; }
.gantt-project-head span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.gantt-project-progress { display: grid; grid-template-columns: 38px 100px auto; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; }
.gantt-project-progress b { color: var(--ink); font-size: 10px; }
.gantt-bar { position: absolute; z-index: 4; top: 9px; height: 21px; border-radius: 6px; color: white; font-size: 8px; line-height: 21px; padding-left: 8px; white-space: nowrap; overflow: hidden; cursor: pointer; box-shadow: 0 2px 6px rgba(36,43,38,.12); }
.gantt-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(255,255,255,.28); }
.gantt-bar span { position: relative; z-index: 2; }
.gantt-bar.failed { background: var(--red); }
.gantt-today-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--red); opacity: .7; }
.gantt-today-head { color: var(--red) !important; font-weight: 800; }
.today-line { position: absolute; width: 1px; top: 0; bottom: 0; background: var(--red); z-index: 3; opacity: .7; }

.table-panel { overflow: hidden; }
.data-toolbar { display: flex; align-items: center; gap: 9px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.data-toolbar .global-search { width: 260px; padding: 7px 9px; }
.data-toolbar .filter-select:last-child { margin-left: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: #fafbf8; color: var(--muted); font-size: 9px; text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--line); font-weight: 650; }
.data-table td { padding: 12px 13px; border-bottom: 1px solid var(--line); font-size: 10px; }
.data-table tr:hover td { background: #fbfcfa; }
.data-table .task-name-cell strong { display: block; }
.data-table .task-name-cell small { display: block; color: var(--muted); margin-top: 3px; }
.data-table .result-note { display: block; margin-top: 5px; color: var(--muted); max-width: 320px; line-height: 1.5; }
.data-table tr.completed-failed td { color: #9c4c45; background: rgba(194,83,74,.045); }
.project-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; background: var(--surface-soft); border-radius: 6px; white-space: nowrap; }
.project-chip i { width: 7px; height: 7px; border-radius: 2px; }
.undo-button { border: 0; background: transparent; color: var(--brand); font-size: 9px; cursor: pointer; }

.insight-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 15px; }
.insight-feature { padding: 20px; background: linear-gradient(135deg, #284e3c, #3c6e56); color: white; border: 0; }
.review-overview { margin-bottom: 15px; }
.insight-feature .eyebrow { color: #b9d8c7; }
.insight-feature h2 { margin: 10px 0 7px; font-size: 21px; letter-spacing: -.04em; }
.insight-feature p { margin: 0; max-width: 620px; color: #d3e3da; font-size: 11px; line-height: 1.65; }
.insight-summary { display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; margin-top: 22px; }
.insight-summary div { padding: 12px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); border-radius: 10px; }
.insight-summary strong, .insight-summary small { display: block; }
.insight-summary strong { font-size: 18px; }
.insight-summary small { margin-top: 4px; color: #bfd3c7; font-size: 8px; }
.chart-panel { padding: 18px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; }
.chart-head h3 { margin: 0; font-size: 13px; }
.chart-head span { color: var(--muted); font-size: 9px; }
.bar-chart { display: flex; align-items: end; gap: 10px; height: 135px; margin-top: 18px; padding-top: 10px; border-bottom: 1px solid var(--line); }
.bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: end; height: 100%; gap: 6px; }
.bar-group i { width: min(22px, 65%); border-radius: 5px 5px 0 0; background: var(--brand); min-height: 3px; }
.bar-group span { color: var(--muted); font-size: 8px; }
.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 15px; margin-bottom: 15px; }
.review-card { padding: 16px; }
.review-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.review-card-head h3 { margin: 5px 0 3px; font-size: 17px; letter-spacing: -.04em; }
.review-card-head small { color: var(--muted); font-size: 9px; }
.review-card-head > strong { min-width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 18px; }
.review-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 12px; }
.review-metrics div { border: 1px solid var(--line); border-radius: 10px; padding: 9px 8px; background: #fbfcfa; }
.review-metrics b, .review-metrics span { display: block; }
.review-metrics b { font-size: 16px; }
.review-metrics span { color: var(--muted); font-size: 9px; margin-top: 3px; }
.review-signal { margin-top: 12px; padding: 10px 11px; border-radius: 11px; background: #fffaf0; border: 1px solid #f1dfc3; }
.review-signal strong { display: block; font-size: 10px; color: #986a21; }
.review-signal p { margin: 5px 0 0; color: #75521f; font-size: 10px; line-height: 1.55; }
.review-signal ul { margin: 6px 0 0; padding-left: 16px; color: #75521f; font-size: 10px; line-height: 1.55; }
.review-signal li + li { margin-top: 3px; }
.review-outcomes { display: grid; gap: 6px; margin-top: 12px; padding: 10px 11px; border: 1px solid #cfe1d5; border-radius: 11px; background: #f7fbf8; }
.review-outcomes > strong { color: var(--brand); font-size: 10px; }
.review-outcomes button { display: grid; gap: 3px; width: 100%; border: 0; border-top: 1px solid #e0ebe3; padding: 7px 0 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.review-outcomes button:first-of-type { border-top: 0; padding-top: 2px; }
.review-outcomes button span { font-size: 10px; line-height: 1.45; }
.review-outcomes button small, .review-outcomes p { color: var(--muted); font-size: 8px; }
.review-outcomes p { margin: 0; }
.review-method { display: grid; grid-template-columns: repeat(5,1fr); gap: 5px; margin-top: 12px; }
.review-method span { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 6px 3px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fbfcfa; font-size: 8px; }
.review-method b { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 5px; background: var(--brand-soft); color: var(--brand); font-size: 7px; }
.review-risk-list { display: grid; gap: 7px; margin-top: 12px; }
.review-risk-list button { display: grid; grid-template-columns: auto 1fr; gap: 4px 7px; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 9px; cursor: pointer; }
.review-risk-list button b { min-width: 0; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.review-risk-list button small { grid-column: 2; color: var(--muted); font-size: 8px; }
.review-note { display: grid; gap: 6px; margin-top: 12px; }
.review-note span { font-size: 10px; font-weight: 700; }
.review-note textarea { min-height: 140px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; font-size: 11px; line-height: 1.55; outline: none; }
.review-note textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,95,70,.1); }
.review-note small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.review-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.review-actions button { justify-content: center; }

.batch-import-layout { display: grid; grid-template-columns: minmax(380px, .85fr) minmax(480px, 1.15fr); gap: 14px; align-items: start; }
.batch-input-panel { position: sticky; top: 84px; }
.batch-import-textarea { width: 100%; min-height: 620px; resize: vertical; border: 1px solid var(--line); border-radius: 14px; padding: 14px; font: 12px/1.7 Consolas, "SFMono-Regular", "Microsoft YaHei", monospace; color: var(--ink); background: #fbfcfa; outline: none; }
.batch-import-textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,95,70,.11); background: white; }
.batch-import-hint { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; color: var(--muted); font-size: 10px; }
.batch-import-hint span { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 5px 8px; }
.batch-preview-column { display: grid; gap: 12px; }
.batch-stat-grid { display: grid; grid-template-columns: repeat(8, minmax(0,1fr)); gap: 8px; }
.batch-stat-grid article { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fbfcfa; }
.batch-stat-grid article.danger { border-color: #f1b6ad; background: #fff5f3; }
.batch-stat-grid article.warn { border-color: #f2d29c; background: #fffaf0; }
.batch-stat-grid strong, .batch-stat-grid span { display: block; }
.batch-stat-grid strong { font-size: 20px; line-height: 1; letter-spacing: -.04em; }
.batch-stat-grid span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.batch-import-state { margin-top: 10px; border-radius: 12px; padding: 10px 12px; font-size: 11px; font-weight: 700; }
.batch-import-state.ok { background: var(--brand-soft); color: var(--brand); }
.batch-import-state.blocked { background: #fff5f3; color: var(--red); border: 1px solid #f1b6ad; }
.batch-import-result { border-left: 4px solid var(--brand); }
.batch-import-result.warn { border-left-color: var(--amber); background: #fffaf0; }
.batch-import-result.blocked { border-left-color: var(--red); background: #fff8f6; }
.batch-import-result strong, .batch-import-result p, .batch-import-result small { display: block; }
.batch-import-result p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.batch-import-result small { margin-top: 6px; color: var(--muted); font-size: 9px; }
.batch-problems.ok p { margin: 10px 0 0; color: var(--muted); font-size: 11px; }
.batch-warning-head { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.batch-issue-list { display: grid; gap: 7px; margin-top: 10px; }
.batch-issue { display: grid; grid-template-columns: 42px 58px 82px 1fr; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 11px; background: white; padding: 8px 10px; text-align: left; cursor: pointer; }
.batch-issue:hover, .batch-node:hover, .batch-project-root:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(33,46,38,.08); }
.batch-issue span { border-radius: 999px; padding: 3px 6px; text-align: center; font-size: 9px; font-weight: 800; }
.batch-issue.error span { background: #ffe5e0; color: var(--red); }
.batch-issue.warning span { background: #fff1d8; color: #9b6820; }
.batch-issue strong, .batch-issue em, .batch-issue small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-issue strong { font-size: 11px; }
.batch-issue em { color: var(--muted); font-style: normal; font-size: 10px; }
.batch-issue small { color: var(--muted); font-size: 10px; }
.batch-tree-panel { overflow: hidden; }
.batch-tree, .batch-loose, .batch-inbox { display: grid; gap: 12px; }
.batch-loose, .batch-inbox { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.batch-loose h3, .batch-inbox h3 { margin: 0; font-size: 13px; letter-spacing: -.02em; }
.batch-project-tree { display: grid; gap: 10px; }
.batch-project-root { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 1px solid #9db7ff; background: #f7f9ff; color: #264dca; border-radius: 14px; padding: 12px 14px; cursor: pointer; text-align: left; }
.batch-project-root strong { font-size: 14px; }
.batch-project-root span { color: #5d6f9e; font-size: 10px; }
.batch-project-root.has-error, .batch-node.has-error { border-color: #ef8d80; background: #fff8f6; }
.batch-project-root.has-warning, .batch-node.has-warning { border-color: #e7bd73; background: #fffaf0; }
.batch-tree-children { display: grid; gap: 8px; padding-left: 18px; border-left: 2px solid #dbe3ff; margin-left: 18px; }
.batch-tree-branch { display: grid; gap: 8px; }
.batch-standalone-group { display: grid; gap: 8px; border: 1px dashed #d6ddd4; border-radius: 13px; padding: 10px; background: #fbfcfa; }
.batch-standalone-group h4 { margin: 0; color: var(--muted); font-size: 11px; }
.batch-node { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; border: 1px solid var(--line); background: white; border-radius: 13px; padding: 11px 12px; cursor: pointer; }
.batch-node strong, .batch-node small, .batch-node p { display: block; }
.batch-node strong { font-size: 12px; letter-spacing: -.02em; }
.batch-node small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.batch-node p { margin: 6px 0 0; color: #516057; font-size: 10px; line-height: 1.5; }
.batch-node.month { border-left: 4px solid #7357d9; }
.batch-node.week { border-left: 4px solid var(--blue); }
.batch-node.day { border-left: 4px solid var(--brand); }
.batch-node.inbox { border-left: 4px solid var(--amber); }
.batch-steps { margin: 8px 0 0; padding: 8px 10px 8px 22px; border-radius: 10px; background: #f7f9f6; color: #536157; font-size: 10px; line-height: 1.6; }
.batch-steps li + li { margin-top: 2px; }
.batch-empty-panel { min-height: 220px; display: grid; place-items: center; }
.diagnosis-list { padding: 8px 12px 13px; }
.diagnosis-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 11px 7px; border-bottom: 1px solid var(--line); }
.diagnosis-row:last-child { border-bottom: 0; }
.diagnosis-row > i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-soft); font-style: normal; }
.diagnosis-row strong { display: block; font-size: 11px; }
.diagnosis-row p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.diagnosis-row button { border: 1px solid var(--line); background: white; border-radius: 7px; padding: 5px 8px; font-size: 9px; cursor: pointer; }

.mobile-fab, .mobile-nav { display: none; }

.workspace-project-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 10px; margin-bottom: 8px; scrollbar-width: thin; }
.workspace-project-tabs button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; min-height: 37px; border: 1px solid var(--line); border-radius: 10px; background: white; color: #5f665f; padding: 8px 12px; font-size: 10px; cursor: pointer; transition: color .16s ease, background-color .16s ease, border-color .16s ease, transform .16s ease; }
.workspace-project-tabs .workspace-project-tab { display: none; }
.workspace-project-tabs button i { width: 8px; height: 8px; border-radius: 3px; }
.workspace-project-tabs button:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.workspace-project-tabs button.active { border-color: var(--brand); background: var(--brand); color: white; box-shadow: 0 8px 18px rgba(49,95,73,.16); }
.workspace-project-tabs .workspace-overview-tab { padding-inline: 15px; font-weight: 800; }
.workspace-project-tabs .workspace-project-all { color: var(--brand); border-style: dashed; font-weight: 750; }
.workspace-view-tabs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; padding: 7px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 14px; background: #f0f3ef; }
.workspace-view-tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.workspace-view-tabs button span { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 7px; background: rgba(255,255,255,.72); color: #7d877f; font-size: 8px; }
.workspace-view-tabs button.active { background: white; color: var(--brand); font-weight: 800; box-shadow: 0 4px 14px rgba(28,43,34,.08); }
.workspace-view-tabs button.active span { background: var(--brand-soft); color: var(--brand); }
.workspace-content { min-width: 0; }
.workspace-plan-context { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 2px 0 13px; }
.workspace-plan-context h2 { margin: 5px 0 4px; font-size: 20px; letter-spacing: -.04em; }
.workspace-plan-context p, .workspace-gantt-head p { margin: 0; color: var(--muted); font-size: 10px; }
.workspace-gantt-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.workspace-gantt-head > div { display: flex; gap: 7px; align-items: center; }

.portfolio-overview { display: grid; gap: 14px; }
.portfolio-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.portfolio-metrics article { padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.portfolio-metrics strong,.portfolio-metrics span { display: block; }
.portfolio-metrics strong { font-size: 20px; letter-spacing: -.04em; }
.portfolio-metrics span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.portfolio-metrics article.risk strong { color: var(--red); }
.portfolio-distribution { overflow: hidden; }
.portfolio-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.portfolio-section-head h2 { margin: 5px 0 4px; font-size: 19px; letter-spacing: -.04em; }
.portfolio-section-head p { margin: 0; color: var(--muted); font-size: 9px; }
.portfolio-section-head > strong { align-self: center; padding: 8px 11px; border-radius: 9px; color: var(--brand); background: var(--brand-soft); font-size: 10px; }
.portfolio-distribution-body { display: grid; grid-template-columns: 230px minmax(0,1fr); align-items: start; gap: 22px; padding: 18px; }
.portfolio-donut { position: sticky; top: 88px; width: 184px; aspect-ratio: 1; margin: 10px auto 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(45,65,53,.04); }
.portfolio-donut::after { display: none; }
.portfolio-donut > div { position: absolute; inset: 29%; z-index: 1; display: grid; place-content: center; text-align: center; border-radius: 50%; background: white; box-shadow: 0 0 0 1px var(--line); }
.portfolio-donut strong,.portfolio-donut span { display: block; }
.portfolio-donut strong { font-size: 28px; letter-spacing: -.05em; }
.portfolio-donut span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.portfolio-legend { display: grid; gap: 6px; }
.portfolio-legend-row { display: grid; grid-template-columns: 10px minmax(0,1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; }
.portfolio-legend-row:hover { border-color: var(--line); background: var(--surface-soft); }
.portfolio-legend-row > i { width: 10px; height: 10px; border-radius: 4px; }
.portfolio-legend-row span strong,.portfolio-legend-row span small,.portfolio-legend-row > b small { display: block; }
.portfolio-legend-row span strong { font-size: 10px; }
.portfolio-legend-row span small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.portfolio-legend-row > b { min-width: 50px; font-size: 11px; text-align: right; }
.portfolio-legend-row > b small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.portfolio-empty { padding: 30px; color: var(--muted); font-size: 10px; text-align: center; }
.portfolio-list-head { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-top: 5px; }
.portfolio-list-head h2 { margin: 4px 0 0; font-size: 17px; }
.portfolio-list-head > span { color: var(--muted); font-size: 9px; }
.portfolio-project-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.portfolio-project-card { display: block; width: 100%; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); text-align: left; cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.portfolio-project-card:hover { transform: translateY(-1px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.portfolio-project-card header { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 14px 15px 11px; }
.portfolio-project-card header > i { width: 8px; height: 34px; border-radius: 6px; background: var(--project-color); }
.portfolio-project-card header span strong,.portfolio-project-card header span small { display: block; }
.portfolio-project-card header span strong { font-size: 12px; }
.portfolio-project-card header span small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.portfolio-project-card header > b { font-size: 16px; }
.portfolio-project-numbers { display: grid; grid-template-columns: repeat(4,1fr); padding: 0 15px 12px; }
.portfolio-project-numbers span { padding-left: 10px; border-left: 1px solid var(--line); }
.portfolio-project-numbers span:first-child { padding-left: 0; border-left: 0; }
.portfolio-project-numbers b,.portfolio-project-numbers small { display: block; }
.portfolio-project-numbers b { font-size: 12px; }
.portfolio-project-numbers small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.portfolio-project-progress { height: 5px; margin: 0 15px; overflow: hidden; border-radius: 5px; background: #edf0eb; }
.portfolio-project-progress i { display: block; height: 100%; border-radius: inherit; background: var(--project-color); }
.portfolio-project-card footer { display: grid; gap: 4px; padding: 11px 15px 14px; }
.portfolio-project-card footer small { color: var(--muted); font-size: 9px; }
.portfolio-project-card footer strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 820px) {
  .portfolio-distribution-body { grid-template-columns: 190px minmax(0,1fr); gap: 14px; }
  .portfolio-donut { width: 160px; }
}
@media (max-width: 620px) {
  .portfolio-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .portfolio-section-head { align-items: stretch; flex-direction: column; }
  .portfolio-section-head > strong { align-self: flex-start; }
  .portfolio-distribution-body { grid-template-columns: 1fr; }
  .portfolio-donut { position: relative; top: auto; }
  .portfolio-project-grid { grid-template-columns: 1fr; }
  .portfolio-list-head { align-items: flex-start; flex-direction: column; }
}

.review-hub-tabs { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; margin-bottom: 15px; }
.review-hub-tabs button { display: grid; gap: 4px; padding: 13px 15px; text-align: left; border: 1px solid var(--line); border-radius: 13px; background: white; color: var(--ink); cursor: pointer; transition: color .16s ease, background-color .16s ease, border-color .16s ease, transform .16s ease; }
.review-hub-tabs button strong { font-size: 12px; }
.review-hub-tabs button span { color: var(--muted); font-size: 9px; }
.review-hub-tabs button:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.review-hub-tabs button.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); box-shadow: 0 8px 18px rgba(49,95,73,.08); }
.review-hub-content { min-width: 0; }

.calendar-content { display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; border-top: 1px solid var(--line); }
.calendar-main { min-width: 0; }
.calendar-selection { position: sticky; top: 0; min-height: 100%; padding: 15px; border-left: 1px solid var(--line); background: #fafbf8; }
.calendar-selection-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.calendar-selection-head h3 { margin: 4px 0 3px; font-size: 16px; letter-spacing: -.03em; }
.calendar-selection-head p { margin: 0; color: var(--muted); font-size: 9px; }
.calendar-selection-list { display: grid; gap: 7px; margin-top: 11px; max-height: 540px; overflow-y: auto; }
.calendar-selected-task { display: grid; grid-template-columns: 7px minmax(0,1fr) auto; align-items: center; gap: 9px; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: white; text-align: left; cursor: pointer; }
.calendar-selected-task:hover { border-color: var(--line-strong); }
.calendar-selected-task > i { width: 7px; height: 28px; border-radius: 4px; }
.calendar-selected-task strong, .calendar-selected-task small { display: block; }
.calendar-selected-task strong { font-size: 10px; line-height: 1.4; }
.calendar-selected-task small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.calendar-selected-task > b { color: #a0a8a1; font-size: 15px; }
.calendar-selection-empty { padding: 32px 12px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 10px; text-align: center; }
.calendar-today-link { width: 100%; justify-content: center; margin-top: 12px; }

.modal { border: 0; padding: 0; border-radius: 18px; width: min(610px, calc(100vw - 28px)); box-shadow: 0 28px 80px rgba(24,34,28,.25); color: var(--ink); }
.task-modal { width: min(700px, calc(100vw - 28px)); }
.task-modal[open] { height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: 18px 0 0 18px; }
.task-modal form { height: 100%; display: flex; flex-direction: column; }
.task-modal .modal-body { flex: 1; min-height: 0; overflow-y: auto; }
.modal-header-actions { display: flex; align-items: center; gap: 8px; }
.modal::backdrop { background: rgba(24,31,27,.35); backdrop-filter: blur(4px); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 21px 23px 16px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 5px 0 0; font-size: 20px; letter-spacing: -.04em; }
.modal-close { border: 0; background: var(--surface-soft); width: 31px; height: 31px; border-radius: 9px; cursor: pointer; color: var(--muted); font-size: 20px; }
.modal-body { padding: 19px 23px; display: grid; gap: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.form-grid > .field-wide { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 10px; color: #555c56; font-weight: 650; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line-strong); background: white; border-radius: 9px; padding: 10px 11px; outline: 0; resize: vertical; color: var(--ink); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field small { color: var(--muted); font-size: 9px; }
.hidden-control { position: absolute; opacity: 0; pointer-events: none; width: 1px !important; height: 1px; padding: 0 !important; border: 0 !important; }
.choice-group { display: flex; flex-wrap: wrap; gap: 6px; }
.choice-group button { border: 1px solid var(--line-strong); background: white; color: var(--ink); border-radius: 9px; padding: 8px 10px; font-size: 10px; cursor: pointer; }
.choice-group button.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 750; }
.compact-choice-group { gap: 5px; }
.compact-choice-group button { padding: 7px 9px; min-width: 52px; }
.status-choice-group button { min-width: 58px; }
.project-choice-group { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-height: none; overflow: visible; align-items: stretch; }
.project-choice-group button { width: 100%; min-height: 32px; padding: 7px 9px; text-align: left; white-space: normal; line-height: 1.25; }
.task-scope-field .compact-choice-group { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.task-scope-field .compact-choice-group button { min-width: 0; padding: 9px 5px; }
.task-steps-editor { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fbfcfa; }
.task-steps-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.task-steps-head span, .task-steps-head small { display: block; }
.task-steps-head span { color: #555c56; font-size: 10px; font-weight: 750; }
.task-steps-head small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.small-button { padding: 7px 9px; font-size: 10px; }
.task-steps-list { display: grid; gap: 7px; }
.step-editor-row { display: grid; grid-template-columns: 24px 24px minmax(0,1fr) 26px; gap: 7px; align-items: center; }
.step-editor-check { width: 22px; height: 22px; display: grid; place-items: center; border: 1.5px solid #bfc7bd; border-radius: 50%; background: white; color: white; cursor: pointer; font-size: 10px; }
.step-editor-check.done { border-color: #718078; background: #718078; }
.step-editor-index { color: #5d6a60; font-size: 12px; font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; }
.step-editor-row input { width: 100%; border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 10px; outline: 0; }
.step-editor-row input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.step-editor-remove { width: 26px; height: 26px; border: 0; border-radius: 8px; background: var(--surface-soft); color: var(--muted); cursor: pointer; }
.step-editor-empty { padding: 12px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 10px; text-align: center; }
.unit-input { display: grid; grid-template-columns: 1fr 1.2fr; gap: 6px; }
.advanced-fields { border: 1px solid var(--line); border-radius: 12px; background: #fbfcfa; padding: 0; overflow: hidden; }
.advanced-fields summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px; cursor: pointer; list-style: none; }
.advanced-fields summary::-webkit-details-marker { display: none; }
.advanced-fields summary span { font-size: 11px; font-weight: 750; }
.advanced-fields summary small { color: var(--muted); font-size: 9px; }
.advanced-fields[open] { padding-bottom: 13px; }
.advanced-fields[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 13px; }
.advanced-fields .form-grid, .advanced-fields .field-wide { margin-left: 13px; margin-right: 13px; }
.advanced-fields .field-wide { margin-top: 13px; }
.toggle-row { display: flex; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.toggle-row b, .toggle-row small { display: block; }
.toggle-row b { font-size: 11px; }
.toggle-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.toggle-row input { display: none; }
.toggle-row i { margin-left: auto; width: 37px; height: 21px; padding: 3px; background: #dfe2dc; border-radius: 13px; transition: background-color .2s ease; }
.toggle-row i::after { content: ""; display: block; width: 15px; height: 15px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform .2s ease; }
.toggle-row input:checked + i { background: var(--brand); }
.toggle-row input:checked + i::after { transform: translateX(16px); }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 23px 20px; }
.footer-spacer { flex: 1; }

.detail-modal { width: min(520px, calc(100vw - 28px)); height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: 20px 0 0 20px; }
.detail-modal[open] { animation: detail-drawer-in .2s ease-out; }
@keyframes detail-drawer-in { from { transform: translateX(24px); opacity: .7; } to { transform: translateX(0); opacity: 1; } }
.detail-body { padding: 20px 23px 28px; max-height: calc(100dvh - 70px); overflow-y: auto; }
.detail-project { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.detail-project i { width: 8px; height: 8px; border-radius: 3px; }
.detail-body h2 { margin: 10px 0 18px; font-size: 21px; line-height: 1.35; letter-spacing: -.03em; }
.detail-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; }
.detail-field { padding: 11px; background: var(--surface-soft); border-radius: 9px; }
.detail-field small, .detail-field strong { display: block; }
.detail-field small { color: var(--muted); font-size: 8px; margin-bottom: 5px; }
.detail-field strong { font-size: 10px; }
.detail-actions { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.danger-button { border: 1px solid #f0d0cb; color: var(--red); background: #fff8f7; border-radius: 9px; padding: 8px 11px; cursor: pointer; }

.export-intro { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.export-options { display: grid; gap: 9px; }
.export-options > button { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 11px; width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 11px; background: white; text-align: left; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, transform .15s ease; }
.export-options > button:hover { border-color: #bcc9bf; background: #fbfcfa; transform: translateY(-1px); }
.export-options i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-style: normal; font-size: 10px; font-weight: 800; }
.export-options b, .export-options small { display: block; }
.export-options b { font-size: 11px; }
.export-options small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.export-options em { color: var(--brand); font-style: normal; font-size: 9px; }
.cockpit-checks { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.cockpit-checks label { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 9px 10px; color: #3f4842; font-size: 11px; line-height: 1.35; cursor: pointer; }
.cockpit-checks label:hover { border-color: var(--line-strong); background: #fbfcfa; }
.cockpit-checks input { width: 14px; height: 14px; accent-color: var(--brand); flex: 0 0 auto; }
.export-tip { display: flex; align-items: center; gap: 7px; padding: 10px 11px; border-radius: 9px; background: #f5f7f3; color: var(--muted); font-size: 9px; }
.export-tip span { color: #4aa16f; font-size: 7px; }

.toast { position: fixed; left: 50%; bottom: 25px; z-index: 100; transform: translate(-50%, 20px); background: #1f2823; color: white; border-radius: 10px; padding: 10px 15px; font-size: 11px; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1050px) {
  :root { --sidebar: 215px; }
  .metric-strip { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid, .insight-grid, .review-grid { grid-template-columns: 1fr; }
  .batch-import-layout { grid-template-columns: 1fr; }
  .batch-input-panel { position: static; }
  .batch-import-textarea { min-height: 420px; }
  .batch-stat-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .batch-issue { grid-template-columns: 38px 48px 1fr; }
  .batch-issue em { display: none; }
  .side-stack { grid-template-columns: repeat(2,1fr); }
  .side-stack .panel:last-child { grid-column: 1 / -1; }
  .project-grid { grid-template-columns: 1fr; }
  .battle-four-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .battle-module { border-bottom: 1px solid var(--line); }
  .battle-module:nth-child(2n) { border-right: 0; }
  .battle-hero { grid-template-columns: auto minmax(0,1fr) 100px; }
  .battle-hero-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .project-detail-grid { grid-template-columns: 1fr; }
  .long-plan-grid { grid-template-columns: 1fr; }
  .long-plan-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .today-work-layout { grid-template-columns: 1fr; }
  .tomorrow-preview { position: static; }
  .tomorrow-list { max-height: none; }
  .calendar-content { grid-template-columns: minmax(0,1fr) 240px; }
  .today-five-columns { grid-template-columns: repeat(5, 250px); }
  .today-five-column { min-width: 250px; }
}

@media (max-width: 760px) {
  body { background: #f7f8f5; padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { height: 58px; padding: 0 15px; background: rgba(247,248,245,.94); }
  .mobile-brand { display: flex; align-items: center; gap: 8px; }
  .mobile-brand .brand-mark { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; }
  .mobile-brand strong { font-size: 15px; }
  .global-search, .sync-button, .top-actions .primary-button, .top-actions .icon-button { display: none; }
  .top-actions { margin-left: auto; }
  .top-actions::after { content: "☁ 已保存"; color: var(--brand); font-size: 9px; padding: 5px 8px; background: var(--brand-soft); border-radius: 6px; }
  .view-container { padding: 18px 13px 30px; }
  .workspace-project-tabs { margin: 0 -13px 8px; padding: 0 13px 5px; scrollbar-width: none; }
  .workspace-project-tabs .workspace-project-tab { display: inline-flex; }
  .workspace-project-tabs::-webkit-scrollbar { display: none; }
  .workspace-view-tabs { margin: 0 -4px 14px; gap: 4px; padding: 5px; }
  .workspace-view-tabs button { gap: 4px; padding: 7px 4px; font-size: 9px; }
  .workspace-view-tabs button span { display: none; }
  .workspace-plan-context { align-items: flex-start; }
  .workspace-plan-context p, .workspace-gantt-head p { display: none; }
  .review-hub-tabs { display: flex; overflow-x: auto; margin: 0 -13px 13px; padding: 0 13px 4px; scrollbar-width: none; }
  .review-hub-tabs button { flex: 0 0 132px; }
  .thoughts-view .page-head { margin-bottom: 12px; }
  .thoughts-view .page-title h1 { font-size: 24px; }
  .thoughts-view .thought-capture-panel { margin: 0 -13px 12px; border-radius: 0; border-left: 0; border-right: 0; }
  .thoughts-view .thought-capture-panel .panel-header { padding-bottom: 10px; }
  .thoughts-view .thought-page-input { min-height: 180px; margin: 0 13px; width: calc(100% - 26px); padding: 15px; font-size: 16px; line-height: 1.7; }
  .thoughts-view .thought-actions { padding: 10px 13px 14px; }
  .thoughts-view .thought-actions button { width: 100%; min-height: 46px; font-size: 14px; }
  .mobile-task-glance { display: block; margin: 0 -13px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: white; }
  .mobile-task-glance-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; }
  .mobile-task-glance-head div { display: grid; gap: 2px; }
  .mobile-task-glance-head small { color: var(--muted); font-size: 9px; }
  .mobile-task-glance-head strong { color: var(--ink); font-size: 14px; }
  .mobile-task-glance-head button { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: white; color: var(--brand); font-size: 10px; }
  .mobile-task-glance-list { border-top: 1px solid var(--line); }
  .mobile-task-glance-list > button { display: grid; grid-template-columns: 5px minmax(0,1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 11px 13px; border: 0; border-bottom: 1px solid #eef0ec; background: white; text-align: left; }
  .mobile-task-glance-list > button:last-child { border-bottom: 0; }
  .mobile-task-glance-list i { width: 5px; height: 28px; border-radius: 999px; }
  .mobile-task-glance-list span { display: grid; gap: 3px; min-width: 0; }
  .mobile-task-glance-list strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-task-glance-list small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-task-glance-list b { color: #9aa19c; font-size: 18px; font-weight: 400; }
  .mobile-task-glance-list p { margin: 0; padding: 24px 13px; color: var(--muted); text-align: center; }
  .thoughts-view .thought-list { margin: 0 -13px; }
  .thoughts-view .thought-day-divider { padding: 8px 13px; background: #f1f4f0; }
  .thoughts-view .thought-day-items { gap: 0; }
  .thoughts-view .thought-item { border-width: 0 0 1px; border-radius: 0; padding: 13px; box-shadow: none; }
  .calendar-content { display: block; }
  .calendar-selection { position: static; min-height: 0; border-left: 0; border-top: 1px solid var(--line); }
  .calendar-selection-list { max-height: none; }
  .page-head { display: block; margin-bottom: 17px; }
  .page-title small { font-size: 10px; }
  .page-title h1 { font-size: 25px; }
  .page-title p { display: none; }
  .head-actions { width: 100%; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
  .head-actions::-webkit-scrollbar { display: none; }
  .head-actions .primary-button, .head-actions .secondary-button, .head-actions .danger-button { display: none; }
  .date-switcher { flex: 0 0 auto; }
  .date-switcher strong { font-size: 10px; white-space: nowrap; }
  .date-picker { flex: 0 0 138px; min-width: 138px; }
  .metric-strip { display: flex; overflow-x: auto; margin: 0 -13px 14px; padding: 0 13px 3px; gap: 8px; scrollbar-width: none; }
  .metric-strip::-webkit-scrollbar { display: none; }
  .metric-card { min-width: 145px; padding: 13px; }
  .metric-card strong { font-size: 19px; }
  .today-board { margin: 0 -13px; border-radius: 0; border-left: 0; border-right: 0; }
  .today-reminder { display: block; margin: -5px 0 15px; padding: 12px 13px; border-radius: 8px; }
  .today-reminder p { margin-top: 4px; }
  .today-work-layout { display: block; margin: 0 -13px; }
  .today-work-layout .today-board { margin: 0; }
  .tomorrow-preview { margin-top: 12px; border-radius: 0; border-left: 0; border-right: 0; }
  .today-board-head { display: block; padding: 14px 13px; }
  .today-board-head h2 { font-size: 19px; }
  .today-head-tools { justify-items: start; margin-top: 12px; }
  .today-filter-row { width: 100%; justify-content: space-between; }
  .today-project-filter select { max-width: 150px; min-height: 44px; }
  .today-five-columns { display: grid; grid-template-columns: 1fr; overflow: visible; }
  .today-five-column { min-width: 0; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .today-five-column:last-child { border-bottom: 0; }
  .today-five-column > header { position: static; }
  .today-five-column > header { min-height: 0; padding: 12px 13px 9px; }
  .today-five-column > header p { font-size: 11px; }
  .today-five-list { gap: 8px; padding: 8px 13px 13px; }
  .today-column-empty { padding: 14px 10px; }
  .today-five-list .todo-item.compact { grid-template-columns: 38px minmax(0,1fr) 38px; padding: 10px 9px; }
  .today-five-list .todo-check { width: 38px; height: 38px; }
  .today-five-list .todo-title strong { font-size: 14px; -webkit-line-clamp: 2; }
  .today-five-list .todo-meta { font-size: 11px; }
  .today-five-list .urgency { font-size: 10px; }
  .energy-selector { width: 100%; justify-content: space-between; }
  .energy-selector > div { flex: 1; }
  .energy-selector button { flex: 1; min-height: 38px; }
  .today-counts { display: flex; overflow-x: auto; margin-top: 12px; grid-template-columns: none; scrollbar-width: none; }
  .today-counts::-webkit-scrollbar { display: none; }
  .today-counts span { min-width: 58px; }
  .recommendation-head, .recommendation-section { padding-left: 13px; padding-right: 13px; }
  .current-grid { grid-template-columns: 1fr; }
  .queue-grid { display: flex; overflow-x: auto; margin: 0 -13px; padding: 0 13px 3px; scrollbar-width: none; }
  .queue-grid .todo-item { flex: 0 0 250px; }
  .today-task-pool > summary { padding: 14px 13px; }
  .today-pool-body { padding: 0 13px 15px; }
  .today-pool-list { grid-template-columns: 1fr; }
  .todo-columns { grid-template-columns: 1fr; }
  .todo-column { border-right: 0; border-bottom: 1px solid var(--line); }
  .todo-column:last-child { border-bottom: 0; }
  .todo-column-head { min-height: 0; padding: 13px; }
  .dashboard-grid { display: block; }
  .plan-node { grid-template-columns: 1fr; }
  .plan-node.depth-1 { margin-left: 10px; }
  .plan-node.depth-2 { margin-left: 20px; }
  .plan-node.depth-3 { margin-left: 30px; }
  .plan-node-progress span { text-align: left; }
  .panel-note { display: none; }
  .dashboard-grid > .panel { border-radius: 14px; }
  .planbook-header { display: grid; }
  .planbook-actions { justify-content: flex-start; }
  .plan-focus-card { grid-template-columns: 1fr; }
  .plan-focus-top, .plan-subtree-head { display: grid; }
  .long-plan-metrics { display: flex; overflow-x: auto; margin: 0 -13px 12px; padding: 0 13px 3px; scrollbar-width: none; }
  .long-plan-metrics article { min-width: 118px; }
  .long-plan-grid { grid-template-columns: 1fr; gap: 10px; }
  .long-plan-card h3 { font-size: 13px; }
  .long-plan-stats { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .project-plan-head { display: grid; padding: 13px; }
  .project-plan-actions { justify-content: stretch; }
  .project-plan-actions button { flex: 1; }
  .project-plan-tree { padding: 8px 10px 12px; overflow-x: auto; }
  .plan-project-tabs { flex-wrap: nowrap; overflow-x: auto; margin: -2px -13px 12px; padding: 0 13px 3px; scrollbar-width: none; }
  .plan-project-tabs::-webkit-scrollbar { display: none; }
  .plan-project-tabs button { flex: 0 0 auto; }
  .project-plan-map { width: max-content; min-width: 100%; justify-items: start; }
  .project-plan-root { min-width: 170px; }
  .plan-map-children { gap: 12px; }
  .plan-map-branch { flex-basis: 150px; width: 150px; }
  .plan-map-node-main strong { font-size: 11px; }
  .standalone-plan-title { display: grid; }
  .plan-alert { align-items: flex-start; display: grid; }
  .side-stack { display: grid; grid-template-columns: 1fr; margin-top: 12px; }
  .side-stack .panel:last-child { grid-column: auto; }
  .panel-header { padding: 14px; }
  .task-row { grid-template-columns: 25px minmax(0,1fr) auto auto; padding: 10px 7px; }
  .task-row .quantity-progress { display: none; }
  .task-main strong { font-size: 13px; white-space: normal; line-height: 1.35; }
  .group-head { padding: 13px 14px 6px; }
  .task-list { padding: 0 7px 8px; }
  .week-focus, .chart-panel { padding: 16px; }
  .week-stats { gap: 6px; }
  .calendar-shell { margin: 0 -13px; border-radius: 0; border-left: 0; border-right: 0; }
  .calendar-toolbar { padding: 10px 13px; }
  .calendar-toolbar .legend { display: none; }
  .month-grid { min-width: 0; grid-template-columns: repeat(7, 1fr); }
  .weekday { padding: 8px 2px; }
  .calendar-day { min-height: 82px; padding: 4px; }
  .week-grid { min-width: 700px; }
  .week-grid .calendar-day { min-height: 390px; }
  .day-number { margin-bottom: 3px; }
  .day-number b { width: 20px; height: 20px; font-size: 9px; }
  .day-number button { display: none; }
  .calendar-task { font-size: 0; height: 6px; padding: 0; border-left: 0; background: var(--task-color); opacity: .8; }
  .more-tasks { font-size: 7px; padding: 2px; }
  .day-agenda { grid-template-columns: 1fr; min-height: 0; }
  .day-agenda > aside { display: flex; align-items: center; gap: 9px; padding: 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .day-big { font-size: 34px; }
  .day-agenda > aside > strong { margin: 0; }
  .day-agenda > aside > small { margin: 0; }
  .day-summary { margin: 0 0 0 auto; padding: 0 0 0 12px; border-top: 0; border-left: 1px solid var(--line); }
  .day-summary b { font-size: 16px; }
  .day-agenda-content { padding: 8px; }
  .project-grid { gap: 10px; }
  .battle-project-tabs { margin: -2px -13px 8px; padding: 0 13px 5px; }
  .status-visual-key { margin-bottom: 10px; }
  .project-battle { margin: 0 -13px 18px; border-radius: 0; border-left: 0; border-right: 0; }
  .battle-hero { grid-template-columns: auto minmax(0,1fr); padding: 15px 13px; }
  .battle-project-mark { width: 42px; height: 42px; border-radius: 12px; }
  .battle-hero-main h2 { font-size: 18px; }
  .battle-progress { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; text-align: left; }
  .battle-progress > div { grid-column: 1 / -1; }
  .battle-hero-actions { justify-content: stretch; }
  .battle-hero-actions button { flex: 1; }
  .battle-four-grid { display: block; }
  .battle-module { min-height: 0; border-right: 0; padding: 14px 13px; }
  .battle-module:last-child { border-bottom: 0; }
  .battle-route { padding: 15px 13px; overflow: hidden; }
  .battle-route-track { display: flex; overflow-x: auto; gap: 22px; padding-bottom: 5px; scrollbar-width: thin; }
  .battle-route-node { flex: 0 0 220px; }
  .battle-bottom-grid { display: block; }
  .battle-risk-list { border-right: 0; border-bottom: 1px solid var(--line); }
  .battle-risk-list, .battle-weekly { padding: 15px 13px; }
  .battle-weekly li { grid-template-columns: 88px minmax(0,1fr); }
  .project-card { padding: 15px; }
  .project-footer { margin-top: 13px; }
  .gantt-panel { margin: 0 -13px; border-radius: 0; border-left: 0; border-right: 0; }
  .gantt-overview { display: flex; overflow-x: auto; margin: 0 -13px 12px; padding: 0 13px 3px; scrollbar-width: none; }
  .gantt-overview article { min-width: 112px; }
  .gantt-project-head { min-width: 760px; }
  .gantt-project-progress { grid-template-columns: 32px 80px auto; }
  .gantt-header, .gantt-row { grid-template-columns: 150px 75px repeat(21, 32px); }
  .gantt-header .gantt-status-col, .gantt-row .gantt-status-col { left: 150px; }
  .table-panel { overflow-x: auto; }
  .data-toolbar { min-width: 650px; }
  .data-table { min-width: 720px; }
  .insight-summary { grid-template-columns: 1fr; }
  .insight-summary div { padding: 9px 11px; }
  .insight-feature { padding: 18px; }
  .insight-feature h2 { font-size: 18px; }
  .mobile-fab { display: none; }
  .mobile-nav { display: grid; grid-template-columns: repeat(5,1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; height: calc(61px + env(safe-area-inset-bottom)); padding: 6px 9px env(safe-area-inset-bottom); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(16px); }
  .mobile-nav button { border: 0; background: transparent; color: #969b95; display: grid; place-items: center; align-content: center; gap: 2px; }
  .mobile-nav button span { font-size: 17px; }
  .mobile-nav button small { font-size: 8px; }
  .mobile-nav button.active { color: var(--brand); }
  .modal { max-height: 92vh; border-radius: 18px 18px 0 0; width: 100%; max-width: none; margin: auto 0 0; }
  .task-modal[open] { width: 100%; height: auto; max-height: 92vh; margin: auto 0 0; border-radius: 18px 18px 0 0; }
  .detail-modal[open] { width: 100%; height: 92vh; max-height: 92vh; margin: auto 0 0; border-radius: 18px 18px 0 0; animation: none; }
  .detail-body { max-height: calc(92vh - 70px); }
  .modal-header { padding: 18px 17px 14px; }
  .modal-body { padding: 16px 17px; max-height: 64vh; overflow-y: auto; }
  .modal-footer { padding: 12px 17px calc(16px + env(safe-area-inset-bottom)); }
  .form-grid { grid-template-columns: 1fr; }
  .project-choice-group { grid-template-columns: 1fr; }
  .advanced-fields summary { display: grid; }
  .field textarea { min-height: 74px; }
  .toast { bottom: calc(75px + env(safe-area-inset-bottom)); white-space: nowrap; }
}

/* Visual system v3: personal operations desk */
:root {
  --bg: #edf0ea;
  --surface: #fffefa;
  --surface-soft: #f4f5ef;
  --ink: #17231d;
  --muted: #66736b;
  --line: #d9dfd8;
  --line-strong: #c6cfc7;
  --brand: #173f31;
  --brand-dark: #0d2d23;
  --brand-soft: #dce9e1;
  --amber: #c9852f;
  --amber-soft: #fff0d9;
  --red: #c94f43;
  --red-soft: #fce9e5;
  --blue: #426b9e;
  --blue-soft: #e8eff8;
  --shadow: 0 16px 38px rgba(20, 43, 33, .09);
  --radius: 14px;
  --sidebar: 254px;
}

html { background: var(--brand-dark); }
body {
  color: var(--ink);
  background: linear-gradient(180deg, #e8ece5 0, #f3f4ef 260px, #edf0ea 100%);
  font-family: "Segoe UI Variable", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-variant-numeric: tabular-nums;
}
::selection { background: #c8dfd0; color: var(--brand-dark); }
* { scrollbar-color: #aebbb2 transparent; scrollbar-width: thin; }

.sidebar {
  padding: 22px 15px 15px;
  border-right: 0;
  background: #102d23;
  color: #f4f7f3;
  box-shadow: 10px 0 34px rgba(9, 29, 22, .12);
}
.brand { padding: 0 7px 23px; }
.brand-mark {
  color: #173428;
  background: #e2b86d;
  border-radius: 9px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
}
.brand strong { color: white; font-size: 19px; letter-spacing: -.03em; }
.brand span { color: #90aa9e; font-size: 9px; }
.quick-add-sidebar {
  min-height: 44px;
  color: #173428;
  background: #e7c17c;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(3, 17, 12, .22);
  font-weight: 800;
}
.quick-add-sidebar:hover { background: #f0cf90; }
.quick-add-sidebar kbd { color: rgba(23,52,40,.72); background: rgba(23,52,40,.08); border-color: rgba(23,52,40,.14); }
.thought-quick-capture {
  border-color: rgba(255,255,255,.1);
  background: rgba(255,255,255,.055);
}
.thought-quick-capture label { color: #e7c17c; }
.thought-quick-capture textarea { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.96); }
.thought-quick-capture button { color: #f2f6f3; background: rgba(255,255,255,.1); }
.thought-quick-capture button:hover { background: rgba(255,255,255,.16); }
.primary-nav { gap: 4px; }
.nav-item { min-height: 42px; color: #b8c8c0; border-radius: 8px; }
.nav-item span { color: #86a094; }
.nav-item:hover { color: white; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff8e9; background: rgba(231,193,124,.15); box-shadow: inset 3px 0 0 #e7c17c; }
.nav-item.active span { color: #e7c17c; }
.sidebar-label { color: #779288; }
.sidebar-label button { color: #9cb2a8; }
.project-shortcut { color: #b7c7bf; }
.project-shortcut:hover { color: white; background: rgba(255,255,255,.07); }
.project-shortcut b { color: #708b7f; }
.cloud-card { color: #e6eee9; background: rgba(255,255,255,.075); }
.cloud-icon { color: #e7c17c; background: rgba(255,255,255,.1); }
.cloud-card span { color: #89a196; }
.profile-row { color: #f2f6f3; }
.profile-row:hover { background: rgba(255,255,255,.07); }
.profile-row small, .profile-row b { color: #839b90; }
.avatar { color: #173428; background: #e7c17c; }

.topbar {
  height: 64px;
  padding: 0 28px;
  background: rgba(246,247,242,.94);
  border-bottom: 1px solid #d2d9d1;
  backdrop-filter: blur(18px);
}
.global-search {
  width: min(480px, 44vw);
  border-color: #d3dad2;
  border-radius: 8px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 4px 14px rgba(23,63,49,.04);
}
.view-container { max-width: 1760px; padding: 30px 34px 70px; }
.page-head { margin-bottom: 22px; }
.page-head .eyebrow { display: none; }
.page-head h1 { margin-top: 0; font-size: clamp(29px, 2.5vw, 40px); line-height: 1.08; letter-spacing: -.035em; font-weight: 850; }
.page-head p { max-width: 68ch; color: #5f6d64; font-size: 12px; }
.page-actions { padding-top: 1px; }
.panel {
  border-color: #d5ddd5;
  border-radius: 13px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(20,43,33,.045);
}
.panel-header { padding: 16px 18px 13px; }
.primary-button { min-height: 39px; border-radius: 8px; background: var(--brand); box-shadow: 0 8px 18px rgba(23,63,49,.16); }
.secondary-button { min-height: 39px; border-radius: 8px; background: #fffefa; }
.date-switcher { border-radius: 8px; background: #fffefa; box-shadow: 0 5px 16px rgba(23,63,49,.05); }
.date-picker { border-radius: 8px; background: #fffefa; }

.today-reminder {
  position: relative;
  align-items: center;
  margin: -3px 0 16px;
  padding: 13px 17px 13px 20px;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: #173f31;
  box-shadow: 0 13px 30px rgba(14,47,35,.16);
}
.today-reminder::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: #e7c17c; }
.today-reminder-primary { color: #fff8e9; font-size: 16px; letter-spacing: -.02em; }
.today-reminder p { color: #c7d8cf; }
.today-board {
  border: 0;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(20,43,33,.1);
}
.today-board-head {
  padding: 17px 18px;
  border-bottom: 0;
  background: #173f31;
  color: white;
}
.today-board-head small { color: #e7c17c; letter-spacing: .16em; }
.today-board-head h2 { margin-top: 5px; color: white; font-size: 22px; letter-spacing: -.025em; }
.today-board-head p { color: #bcd0c5; }
.today-project-filter > span, .energy-selector > span { color: #bcd0c5; }
.today-project-filter select, .energy-selector > div { border-color: rgba(255,255,255,.16); background: #fffefa; }
.today-visible-total { border-color: rgba(231,193,124,.35); color: #ffe0a6; background: rgba(231,193,124,.11); }
.energy-selector button.active { background: #e7c17c; color: #173428; box-shadow: none; font-weight: 800; }
.today-five-columns { background: #eef1eb; }
.today-five-column { min-height: 500px; background: #fbfcf8; }
.today-five-column.overdue { background: #fff8f6; }
.today-five-column.urgent { background: #fffaf2; }
.today-five-column.done { background: #f4faf6; }
.today-five-column.tomorrow { background: #f4f7fb; }
.today-five-column > header { min-height: 76px; padding: 16px 12px 10px; background: rgba(255,255,255,.7); box-shadow: inset 0 4px 0 #7c9689; }
.today-five-column.overdue > header { box-shadow: inset 0 4px 0 var(--red); }
.today-five-column.urgent > header { box-shadow: inset 0 4px 0 var(--amber); }
.today-five-column.done > header { box-shadow: inset 0 4px 0 #3f8a62; }
.today-five-column.tomorrow > header { box-shadow: inset 0 4px 0 var(--blue); }
.today-five-column > header h3 { font-size: 14px; font-weight: 800; }
.today-five-column > header b { border-radius: 7px; box-shadow: 0 2px 8px rgba(20,43,33,.06); }
.today-five-list { gap: 8px; padding: 9px; }
.todo-item {
  border-color: #d8ded7;
  border-radius: 10px;
  background: #fffefa;
  box-shadow: 0 5px 14px rgba(20,43,33,.055);
}
.todo-item.compact { padding: 10px 9px; }
.todo-item.compact .todo-title strong { color: #17231d; font-size: 12.5px; font-weight: 750; }
.todo-check { border-radius: 7px; }
.urgency { border-radius: 5px; font-weight: 750; }
.today-column-empty { border-color: #d0d8d1; background: rgba(255,255,255,.48); }

.workspace-project-tabs { padding-bottom: 12px; }
.workspace-project-tabs button { border-radius: 8px; background: #fffefa; }
.workspace-project-tabs button.active { background: var(--brand); box-shadow: 0 8px 18px rgba(23,63,49,.18); }
.workspace-view-tabs { padding: 5px; border-radius: 10px; background: #dfe5de; }
.workspace-view-tabs button { border-radius: 7px; }
.workspace-view-tabs button.active { color: var(--brand-dark); box-shadow: 0 4px 12px rgba(20,43,33,.08); }
.portfolio-metrics article { border-radius: 10px; background: #fffefa; box-shadow: 0 6px 18px rgba(20,43,33,.04); }
.portfolio-metrics article:first-child { color: white; border-color: var(--brand); background: var(--brand); }
.portfolio-metrics article:first-child span { color: #bcd0c5; }
.portfolio-project-card { border-radius: 10px; background: #fffefa; }
.portfolio-project-card header > i { border-radius: 2px; }
.portfolio-project-card:hover { box-shadow: 0 15px 32px rgba(20,43,33,.1); }
.portfolio-donut > div { background: #fffefa; }

.calendar-shell { background: #fffefa; box-shadow: var(--shadow); }
.calendar-day { background: #fffefa; }
.calendar-day.other { background: #f2f4ee; }
.calendar-day.today { background: #edf6f0; }
.calendar-task { border-left-width: 2px; border-radius: 4px; }
.panel.insight-feature { color: white; border: 0; background: linear-gradient(120deg, #173f31, #245c45); }
.panel.insight-feature .eyebrow { color: #e7c17c; }
.panel.insight-feature p { color: #c9dbd1; }
.panel.insight-feature .insight-summary div { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.075); }
.panel.insight-feature .insight-summary small { color: #bad0c4; }
.review-overview { border-radius: 12px; box-shadow: 0 18px 38px rgba(23,63,49,.16); }
.review-card { background: #fffefa; }
.review-card-head > strong { border-radius: 9px; }
.review-metrics div { border-radius: 8px; background: #f5f6f1; }
.modal, .task-modal[open], .detail-modal[open] { border-radius: 14px; }
.modal-header { background: #f1f4ee; }
.toast { border-radius: 9px; background: #102d23; }

@media (max-width: 760px) {
  body { background: #edf0ea; }
  .view-container { padding: 18px 12px 92px; }
  .page-head h1 { font-size: 28px; }
  .mobile-brand { color: white; background: #102d23; border-bottom: 0; }
  .mobile-brand .brand-mark { width: 31px; height: 31px; }
  .today-reminder { display: grid; gap: 4px; padding: 12px 14px 12px 18px; }
  .today-reminder-primary { font-size: 14px; white-space: normal; }
  .today-board-head { align-items: stretch; padding: 16px 14px; }
  .today-board-head h2 { font-size: 20px; }
  .today-filter-row { align-items: stretch; gap: 8px; }
  .today-project-filter, .energy-selector {
    display: grid;
    flex: 1;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 5px;
    min-width: 0;
  }
  .today-project-filter > span, .energy-selector > span {
    display: block;
    white-space: nowrap;
    font-size: 9px;
    line-height: 1.2;
  }
  .energy-selector > div { width: 100%; }
  .today-project-filter select { width: 100%; max-width: none; }
  .today-five-columns { gap: 10px; padding: 10px; background: #e2e7e0; }
  .today-five-column { min-height: 0; overflow: hidden; border: 0; border-radius: 10px; box-shadow: 0 7px 20px rgba(20,43,33,.065); }
  .today-five-column > header { position: relative; min-height: 68px; padding: 14px 12px 9px; }
  .todo-item.compact .todo-title strong { font-size: 13px; }
  .portfolio-metrics article:first-child { grid-column: 1 / -1; }
  .mobile-nav { border-top: 0; background: rgba(16,45,35,.98); box-shadow: 0 -8px 28px rgba(9,29,22,.18); }
  .mobile-nav button { color: #8ca398; }
  .mobile-nav button.active { color: #f0ca83; }
  .mobile-nav button.active small { font-weight: 800; }
}

@media (hover: none), (pointer: coarse) {
  .primary-button:hover,
  .long-plan-card:hover,
  .plan-project-tabs button:hover,
  .plan-outline-day:hover,
  .battle-project-tabs button:hover,
  .project-card:hover,
  .workspace-project-tabs button:hover,
  .portfolio-project-card:hover,
  .review-hub-tabs button:hover,
  .export-options > button:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .detail-modal[open], .toast, .toast.show { transform: none; }
}
