:root {
  color-scheme: light;
  --ink: #20312f;
  --muted: #73817d;
  --line: #e3e9e5;
  --canvas: #f7f9f6;
  --white: #fff;
  --green: #247767;
  --green-dark: #195b4e;
  --green-light: #e7f3ed;
  --danger: #a3463a;
  --shadow: 0 12px 34px rgba(38, 75, 59, .055);
}
* { box-sizing: border-box; }
html { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 15px; line-height: 1.6; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
*:focus-visible { outline: 3px solid #91c9ae; outline-offset: 2px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { background: #f0f5ef; border-right: 1px solid var(--line); min-height: 100vh; display: flex; flex-direction: column; padding: 34px 20px 22px; }
.sidebar-top { padding: 0 13px 30px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 23px; font-weight: 760; letter-spacing: -.04em; line-height: 1; }
.brand-mark { background: var(--green); color: #fff; display: inline-flex; align-items: center; justify-content: center; width: 29px; height: 29px; border-radius: 9px; font-size: 18px; font-weight: 700; letter-spacing: 0; }
.brand-dot { color: var(--green); }
.sidebar-caption { color: #8b9b91; font-size: 12px; margin: 19px 0 0; }
.main-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #5c6d65; padding: 10px 13px; border-radius: 10px; font-size: 14px; font-weight: 550; transition: background .15s ease; }
.nav-link:hover { background: #e5eee6; color: var(--ink); }
.nav-link.active { color: var(--green-dark); background: #dcebe0; font-weight: 700; }
.nav-count { color: #93a59a; font-size: 12px; font-weight: 500; }
.nav-link.active .nav-count { color: #608a70; }
.nav-heading { padding: 26px 13px 9px; text-transform: uppercase; color: #98a89e; letter-spacing: .09em; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.nav-heading a { font-size: 22px; font-weight: 400; line-height: .65; padding: 5px; color: #688b74; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid #dfe8dc; padding: 18px 13px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.utility-link { color: #87988a; font-size: 12px; }
.text-button { border: 0; background: none; padding: 0; text-align: left; }
.workspace { min-width: 0; }
.content-wrap { max-width: 1040px; padding: 61px 66px 100px; margin: 0 auto; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 33px; }
.eyebrow { color: #8baa95; letter-spacing: .19em; font-size: 11px; line-height: 1.4; font-weight: 750; margin: 0 0 10px; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(27px, 3vw, 36px); letter-spacing: -.04em; line-height: 1.2; margin-bottom: 10px; }
.page-description { color: var(--muted); font-size: 14px; margin-bottom: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; min-height: 40px; padding: 8px 16px; font-weight: 650; font-size: 13px; border: 1px solid transparent; white-space: nowrap; transition: transform .12s ease, background .12s ease; }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--green); color: #fff; }
.button-primary:hover { background: var(--green-dark); color: #fff; }
.button-subtle { background: #fff; border-color: var(--line); color: #65756d; }
.button-subtle:hover { border-color: #bad0c0; background: #f9fcf9; }
.button-danger { background: var(--danger); color: #fff; }
.button-danger:hover { background: #82372e; color: #fff; }
.quick-add { display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 20px; border: 1px solid #dce6dc; background: var(--white); border-radius: 13px; box-shadow: var(--shadow); }
.quick-add-plus { color: #6da083; font-size: 22px; line-height: 1; }
.quick-add input[type=text] { flex: 1; border: none; outline: none; min-width: 0; color: var(--ink); font-size: 15px; background: transparent; }
.quick-add input::placeholder { color: #a1aca3; }
.list-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: 34px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.status-tabs { display: flex; align-items: center; gap: 23px; }
.status-tab { color: #8a9890; font-size: 13px; font-weight: 650; padding: 0 0 14px; border-bottom: 2px solid transparent; }
.status-tab.active { border-color: var(--green); color: var(--green-dark); }
.search-form { display: flex; align-items: center; margin-bottom: 8px; border: 1px solid transparent; border-radius: 8px; }
.search-form:focus-within { border-color: #91c9ae; }
.search-form input { background: transparent; border: 0; width: 160px; min-width: 0; font-size: 12px; color: var(--ink); outline: none; padding: 7px 5px 7px 8px; }
.search-form button { color: #7f9889; background: none; border: 0; padding: 7px; font-size: 12px; }
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 19px 20px; background: #fff; border: 1px solid #e6ece7; border-radius: 12px; box-shadow: 0 4px 16px rgba(33, 70, 49, .025); }
.task-main { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.completion-form { line-height: 0; padding-top: 2px; }
.completion-button { background: #fff; width: 21px; height: 21px; border: 1.7px solid #a8b9ad; border-radius: 7px; color: #fff; font-size: 13px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.completion-button:hover, .completion-button.checked { border-color: var(--green); background: var(--green); }
.task-copy { min-width: 0; }
.task-title { font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.task-done .task-title { text-decoration: line-through; color: #91a099; }
.task-note { color: #97a49c; font-size: 12px; line-height: 1.5; margin: 4px 0 0; overflow-wrap: anywhere; }
.task-meta { color: #a1afa4; display: flex; flex-wrap: wrap; align-items: center; column-gap: 17px; row-gap: 3px; font-size: 11px; margin-top: 8px; }
.task-meta:empty { display: none; }
.due-date.overdue { color: #b25e50; }
.resource-link { color: var(--green); }
.task-side { display: flex; align-items: center; gap: 13px; flex-shrink: 0; padding-top: 2px; }
.status-label { border-radius: 5px; background: #eef3ee; color: #839388; font-size: 10px; padding: 2px 8px; white-space: nowrap; }
.status-doing { background: #ecf5ee; color: var(--green); }
.status-done { background: #f2f4f1; color: #9aa89c; }
.text-action { background: none; border: 0; color: var(--green); font-size: 12px; padding: 0; }
.empty-state { text-align: center; padding: 91px 20px; color: #9bab9f; }
.empty-icon { font-size: 29px; color: #afd1b7; margin-bottom: 9px; }
.empty-state h2 { color: #6e8174; font-size: 16px; margin-bottom: 5px; }
.empty-state p { font-size: 13px; }
.messages { max-width: 1040px; padding: 20px 66px 0; margin: 0 auto; }
.alert { border-radius: 8px; padding: 10px 13px; font-size: 13px; }
.alert-success { color: #276a4e; background: #e5f3e8; }
.alert-error { color: #9c4139; background: #fff0ed; }
.messages .alert + .alert { margin-top: 8px; }
.form-wrap { max-width: 820px; }
.back-link { display: inline-block; color: #86978c; font-size: 13px; margin-bottom: 37px; }
.form-heading { margin-bottom: 27px; }
.editor-card { display: flex; flex-direction: column; gap: 20px; padding: 30px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { color: #506258; font-size: 13px; font-weight: 650; }
.field input, .field textarea, .field select { width: 100%; color: var(--ink); border: 1px solid #dce5dc; background: #fff; border-radius: 8px; padding: 10px 12px; outline: none; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #80b89a; box-shadow: 0 0 0 3px #e7f3eb; }
.field textarea { resize: vertical; min-height: 104px; }
.field-error { color: var(--danger); font-size: 12px; margin: 0; }
.form-actions { display: flex; flex-direction: row; align-items: center; gap: 10px; margin-top: 5px; }
.danger-zone { margin-top: 24px; }
.danger-link { font-size: 12px; color: var(--danger); }
.section-delete-link { display: inline-block; margin-top: 24px; }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 192px minmax(0, 1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .content-wrap { padding: 45px 30px 80px; }
  .messages { padding-left: 30px; padding-right: 30px; }
}
@media (max-width: 660px) {
  .app-shell { display: block; }
  .sidebar { min-height: 0; padding: 15px 17px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-top { display: flex; align-items: center; gap: 16px; padding: 0 0 12px; }
  .brand { font-size: 20px; }
  .brand-mark { width: 26px; height: 26px; }
  .sidebar-caption { margin: 0; font-size: 10px; }
  .main-nav { display: flex; flex-direction: row; gap: 3px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
  .main-nav::-webkit-scrollbar { display: none; }
  .nav-link { padding: 7px 10px; font-size: 12px; gap: 5px; }
  .nav-heading { padding: 6px 4px 0 12px; align-items: center; gap: 5px; }
  .nav-heading span { display: none; }
  .sidebar-bottom { margin-top: 4px; border-top: 0; padding: 5px 1px 0; flex-direction: row; gap: 16px; }
  .content-wrap { padding: 32px 18px 60px; }
  .messages { padding: 12px 18px 0; }
  .page-header { margin-bottom: 24px; }
  .page-header .button { font-size: 11px; padding: 7px 10px; }
  .quick-add { padding-left: 13px; gap: 8px; }
  .quick-add input[type=text] { font-size: 13px; }
  .list-toolbar { align-items: stretch; flex-direction: column; gap: 4px; margin-top: 27px; }
  .status-tabs { gap: 20px; }
  .status-tab { padding-bottom: 7px; }
  .search-form { margin-bottom: 7px; }
  .search-form input { width: 100%; flex: 1; }
  .task-card { padding: 15px; }
  .task-side { flex-direction: column; align-items: flex-end; gap: 4px; }
  .task-note { max-width: 58vw; }
  .editor-card { padding: 20px; }
}
