:root {
  --ink: #172832;
  --ink-soft: #405660;
  --muted: #84939a;
  --line: #dde4e4;
  --line-light: #edf1f1;
  --paper: #ffffff;
  --canvas: #f4f7f6;
  --navy: #10232f;
  --teal: #1b8a83;
  --teal-dark: #116c68;
  --mint: #e9f6f3;
  --coral: #e66f57;
  --amber: #c98723;
  --shadow: 0 14px 40px rgba(22, 48, 56, 0.07);
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(27, 138, 131, .22); outline-offset: 2px; }

.auth-screen { display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: center; gap: clamp(50px, 10vw, 150px); min-height: 100vh; padding: 60px clamp(28px, 9vw, 150px); background: #f4f7f6; }
.auth-intro { max-width: 600px; }
.auth-brand { padding: 0; }
.auth-kicker { margin: 98px 0 18px; color: var(--teal); font-size: 10px; font-weight: 900; letter-spacing: .1em; }
.auth-intro h1 { color: var(--ink); font-size: clamp(36px, 5vw, 66px); line-height: 1.12; }
.auth-intro h1 span { color: var(--teal-dark); }
.auth-copy { max-width: 420px; margin: 25px 0 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.auth-card { width: 100%; padding: 30px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 20px 60px rgba(22, 48, 56, .1); }
.auth-card-header h2 { font-size: 24px; }
.auth-card-header p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.auth-tabs { display: flex; gap: 20px; margin: 28px 0 20px; border-bottom: 1px solid var(--line-light); }
.auth-tab { padding: 0 0 12px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 12px; font-weight: 800; }
.auth-tab.active { border-color: var(--coral); color: var(--ink); }
.auth-form { display: grid; gap: 15px; }
.auth-form label, .member-form label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.auth-form .primary-button { width: 100%; margin-top: 7px; }
.auth-message { min-height: 18px; margin: 15px 0 0; color: var(--teal-dark); font-size: 11px; line-height: 1.5; }
.auth-message.has-error { color: var(--coral); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }

.sidebar { display: flex; flex-direction: column; min-height: 100vh; padding: 28px 16px 18px; color: #e6f1ef; background: var(--navy); }
.brand-block { display: flex; align-items: center; gap: 11px; padding: 0 10px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--coral); border-radius: 9px; font-size: 20px; font-weight: 900; }
.brand-name { margin: 0; font-size: 17px; font-weight: 800; }
.brand-subtitle { margin: 3px 0 0; color: #9db2b4; font-size: 11px; }
.sidebar-add { display: flex; align-items: center; gap: 10px; width: 100%; margin: 32px 0 28px; padding: 11px 12px; border: 1px solid rgba(255,255,255,.15); border-radius: 9px; color: #fff; background: rgba(255,255,255,.09); text-align: left; font-weight: 700; }
.sidebar-add:hover { background: rgba(255,255,255,.15); }
.sidebar-add kbd { margin-left: auto; color: #99b4b4; font-size: 10px; }
.button-icon { font-size: 20px; line-height: 12px; font-weight: 400; }
.nav-group { display: grid; gap: 4px; }
.nav-label, .context-label, .section-eyebrow { text-transform: uppercase; letter-spacing: .08em; }
.nav-label { margin: 0 10px 8px; color: #789193; font-size: 10px; font-weight: 800; }
.nav-label-row { display: flex; align-items: center; justify-content: space-between; }
.nav-label-row .nav-label { margin-bottom: 8px; }
.mini-icon { width: 22px; height: 22px; margin: 0 6px 6px 0; border: 0; color: #a8c1c0; background: transparent; font-size: 20px; line-height: 1; }
.mini-icon:hover { color: white; }
.nav-item { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px; color: #b8cac9; background: transparent; text-align: left; font-size: 13px; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: #1a3d48; box-shadow: inset 3px 0 0 var(--coral); }
.nav-icon { color: #81a5a4; font-size: 15px; text-align: center; }
.nav-item.active .nav-icon { color: #ff987f; }
.nav-count { color: #789698; font-size: 11px; }
.team-nav { margin-top: 22px; }
.team-nav-heading { display: flex; align-items: center; justify-content: space-between; padding-right: 9px; }
.team-nav-heading .nav-label { margin-bottom: 8px; }
.team-nav-heading span { margin-bottom: 8px; color: #68898b; font-size: 9px; }
.team-list { display: grid; gap: 3px; max-height: 230px; overflow: auto; }
.team-member-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 13px; align-items: center; gap: 7px; min-height: 34px; padding: 0 7px 0 10px; border: 0; border-radius: 7px; color: #a8bfbe; background: transparent; text-align: left; font-size: 12px; cursor: grab; }
.team-member-item:hover, .team-member-item.active { color: #fff; background: rgba(255,255,255,.08); }
.team-member-item.active { box-shadow: inset 2px 0 0 var(--coral); }
.team-member-item.is-dragging { opacity: .45; cursor: grabbing; }
.team-member-dot { width: 6px; height: 6px; border-radius: 50%; background: #7dc9bd; }
.team-member-item:nth-child(3n) .team-member-dot { background: #ddb25e; }
.team-member-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-member-count { color: #789698; font-size: 10px; }
.team-member-drag { overflow: hidden; color: #607f81; font-size: 10px; letter-spacing: 0; }
.team-member-item:hover .team-member-drag { color: #a8c1c0; }
.project-nav { margin-top: 32px; }
.project-list { display: grid; gap: 3px; }
.project-entry { display: grid; grid-template-columns: minmax(0, 1fr) 24px; align-items: center; gap: 2px; }
.project-item { display: grid; grid-template-columns: 10px minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 38px; padding: 3px 10px; border: 0; border-radius: 7px; color: #a8bfbe; background: transparent; text-align: left; font-size: 12px; }
.project-item:hover, .project-item.active, .project-entry:hover .project-item { color: #fff; background: rgba(255,255,255,.07); }
.project-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.project-entry:nth-child(2n) .project-dot { background: #7dc9bd; }
.project-entry:nth-child(3n) .project-dot { background: #ddb25e; }
.project-name-wrap { display: grid; min-width: 0; gap: 1px; }
.project-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-scope { overflow: hidden; color: #789698; font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.project-item:hover .project-scope, .project-item.active .project-scope { color: #a8c6c4; }
.project-item .project-count { color: #789698; font-size: 10px; }
.project-edit { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; color: #8da8a7; background: transparent; font-size: 14px; line-height: 1; opacity: .82; }
.project-edit:hover, .project-edit:focus-visible { color: #fff; background: rgba(255,255,255,.1); opacity: 1; }
.sidebar-footer { margin-top: auto; padding: 17px 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.storage-status { display: flex; align-items: center; gap: 7px; color: #89a3a3; font-size: 11px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #72c3a4; }
.sidebar-actions { display: flex; gap: 8px; margin-top: 14px; }
.sidebar-actions button { padding: 0; border: 0; color: #8aa3a4; background: transparent; font-size: 11px; }
.sidebar-actions button:hover { color: #fff; }

.main-area { min-width: 0; padding: 36px clamp(24px, 4vw, 64px) 50px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: 1280px; margin: 0 auto 28px; }
.topbar-context { flex: 0 0 auto; min-width: 0; }
.context-label { margin: 0 0 8px; color: var(--teal); font-size: 10px; font-weight: 800; }
h1, h2, h3, p { letter-spacing: 0; }
h1, h2, h3 { margin: 0; }
h1 { font-size: clamp(28px, 3vw, 40px); line-height: 1; white-space: nowrap; }
h2 { font-size: 18px; line-height: 1.3; }
h3 { font-size: 14px; line-height: 1.4; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.search-box { display: flex; align-items: center; gap: 8px; width: min(310px, 32vw); min-height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.75); color: var(--muted); }
.search-box input { min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; }
.search-box kbd { color: #a2adaf; font-size: 10px; }
.icon-control { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); background: rgba(255,255,255,.75); font-size: 21px; line-height: 1; }
.icon-control:hover { border-color: #b9cccc; color: var(--teal-dark); background: #f7fbfa; }
.member-button { min-height: 34px; padding: 0 10px; border: 1px solid #cce1de; border-radius: 7px; color: var(--teal-dark); background: var(--mint); font-size: 11px; font-weight: 800; }
.member-button span { display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 3px; border-radius: 9px; color: #fff; background: var(--teal); font-size: 9px; }
.task-card-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: 5px; min-width: 112px; }
.task-like { display: inline-flex; align-items: center; justify-content: center; min-width: 31px; height: 30px; padding: 0 7px; border: 1px solid transparent; border-radius: 7px; color: #7b9697; background: transparent; font-size: 15px; font-weight: 800; transition: border-color .16s ease, background .16s ease, color .16s ease; }
.task-like:hover, .task-like.is-liked { border-color: #ffd8cf; color: var(--coral); background: #fff4f0; }
.task-like:disabled { opacity: .6; }
.management-modal { width: min(900px, 100%); }
.datetime-field { display: grid; gap: 7px; min-width: 0; }
.datetime-field > span { color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.datetime-inputs { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(92px, .65fr); gap: 7px; }
.datetime-inputs input { min-width: 0; }
.overview-detail-modal { width: min(680px, 100%); }
.overview-detail-list { display: grid; gap: 8px; max-height: min(60vh, 520px); overflow: auto; }
.overview-detail-item { display: grid; gap: 5px; padding: 13px 14px; border: 1px solid var(--line-light); border-radius: 7px; color: var(--ink); background: #fbfdfc; text-align: left; }
.overview-detail-item:hover { border-color: #b9cccc; background: var(--mint); }
.overview-detail-item strong { font-size: 13px; }
.overview-detail-item span { color: var(--muted); font-size: 10px; }
.overdue-reminder-modal { width: min(620px, 100%); }
.reminder-intro { margin: -8px 0 4px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.overdue-reminder-list { display: grid; gap: 8px; max-height: min(52vh, 420px); overflow: auto; }
.overdue-reminder-item { display: grid; gap: 5px; padding: 13px 14px; border: 1px solid #f0d8d1; border-radius: 7px; color: var(--ink); background: #fffaf8; text-align: left; }
.overdue-reminder-item:hover { border-color: var(--coral); background: #fff4f0; }
.overdue-reminder-item strong { font-size: 13px; }
.overdue-reminder-item span { color: var(--muted); font-size: 10px; }
.task-comment { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 30px; padding: 0 7px; border: 1px solid transparent; border-radius: 7px; color: var(--teal-dark); background: transparent; font-size: 11px; font-weight: 800; white-space: nowrap; transition: border-color .16s ease, background .16s ease, color .16s ease; }
.task-comment:hover { border-color: #cce1de; background: var(--mint); }
.task-card-actions .task-more { width: 30px; height: 30px; border: 1px solid transparent; border-radius: 7px; }
.task-card-actions .task-more:hover { border-color: #cce1de; }
.task-comment-preview { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 6px 8px; margin: 10px 0 0; padding: 7px 9px; overflow: hidden; border: 1px solid #dcebe8; border-left: 3px solid #6cb4aa; border-radius: 6px; color: var(--ink-soft); background: #f7fbfa; font-size: 10px; line-height: 1.55; cursor: pointer; }
.task-comment-preview:hover { border-color: #9bcac2; background: #f0faf7; }
.task-comment-thread { display: grid; gap: 4px; min-width: 0; }
.task-comment-thread-line { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.task-comment-thread-line.is-reply { margin-left: 14px; padding-left: 8px; border-left: 2px solid #b8d9d3; }
.task-comment-thread-label { flex: 0 0 auto; color: var(--teal-dark); font-size: 9px; font-weight: 850; }
.task-comment-thread-line strong { flex: 0 0 auto; color: var(--ink-soft); font-size: 10px; }
.task-comment-thread-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-comment-inline-reply { flex: 0 0 auto; padding: 2px 7px; border: 1px solid #b8d9d3; border-radius: 5px; color: var(--teal-dark); background: #fff; font-size: 10px; font-weight: 800; }
.task-comment-inline-reply:hover { border-color: var(--teal); color: #fff; background: var(--teal); }
.task-comments-modal, .comment-reminder-modal { width: min(680px, 100%); }
.task-comments-list, .comment-reminder-list { display: grid; gap: 8px; max-height: min(48vh, 400px); overflow: auto; }
.task-comment-item { padding: 11px 13px; border: 1px solid var(--line-light); border-radius: 7px; background: #fbfdfc; }
.task-comment-item.is-reply { margin-left: 22px; border-left: 3px solid #c7dfdb; background: #f7fbfa; }
.task-comment-item > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.task-comment-item > div > span { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.task-comment-item strong { font-size: 12px; }
.task-comment-item time { color: var(--muted); font-size: 10px; }
.task-comment-item p { margin: 6px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.task-comment-reply { flex: 0 0 auto; padding: 0; border: 0; color: var(--teal-dark); background: transparent; font-size: 10px; font-weight: 800; }
.task-comment-reply:hover { color: var(--coral); }
.task-comment-form { display: grid; gap: 10px; margin-top: 14px; }
.task-comment-replying { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border-left: 3px solid var(--teal); color: var(--teal-dark); background: var(--mint); font-size: 11px; }
.comment-reminder-item { display: grid; gap: 5px; padding: 13px 14px; border: 1px solid #d7e7e3; border-radius: 7px; color: var(--ink); background: #f7fbfa; text-align: left; }
.comment-reminder-item:hover { border-color: var(--teal); background: var(--mint); }
.comment-reminder-item strong { font-size: 13px; }
.comment-reminder-item span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.management-tabs { display: flex; gap: 18px; margin: -4px 0 22px; border-bottom: 1px solid var(--line-light); }
.management-tab { padding: 0 0 11px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 12px; font-weight: 800; }
.management-tab.active { border-color: var(--coral); color: var(--ink); }
.management-panel { display: grid; gap: 18px; }
.management-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.management-stat { display: grid; gap: 4px; padding: 13px 12px; border: 1px solid var(--line-light); border-radius: 8px; background: #f8fbfa; }
.management-stat strong { color: var(--ink); font-size: 23px; line-height: 1; }
.management-stat span { color: var(--muted); font-size: 10px; font-weight: 700; }
.management-stat.positive strong { color: var(--teal-dark); }
.management-stat.warning strong, .management-stat.danger strong { color: var(--coral); }
.management-panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.management-panel-header h3 { margin-bottom: 5px; }
.management-panel-header select { min-width: 135px; }
.management-list { display: grid; gap: 7px; }
.management-row, .organization-group { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.management-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 14px; padding: 12px 14px; }
.management-row.risk, .management-row.missing { border-left: 3px solid var(--coral); }
.management-row.ok { border-left: 3px solid #78bbaa; }
.management-row-main { display: grid; gap: 4px; min-width: 0; }
.management-row-main strong { overflow: hidden; color: var(--ink-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.management-row-main span, .management-row-meta { color: var(--muted); font-size: 10px; }
.management-status { color: var(--ink-soft); font-size: 11px; font-weight: 800; white-space: nowrap; }
.management-row.risk .management-status, .management-row.missing .management-status { color: var(--coral); }
.management-action { color: var(--teal-dark); font-size: 11px; white-space: nowrap; }
.management-empty { margin: 0; padding: 18px; color: var(--muted); font-size: 11px; text-align: center; }
.organization-group { overflow: hidden; }
.organization-group-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; background: #f8fbfa; }
.organization-group-header > div { display: grid; gap: 4px; }
.organization-group-header strong { color: var(--ink); font-size: 13px; }
.organization-group-header span { color: var(--muted); font-size: 10px; }
.organization-member { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px 14px; border-top: 1px solid var(--line-light); }
.organization-member > span:nth-child(2) { display: grid; gap: 3px; }
.organization-member strong { color: var(--ink-soft); font-size: 11px; }
.organization-member small { color: var(--muted); font-size: 10px; }
.organization-indent { color: var(--teal); font-size: 14px; }
.user-chip { display: grid; gap: 2px; min-width: 72px; color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.user-chip span:last-child { color: var(--muted); font-size: 9px; font-weight: 600; }
.profile-button { min-height: auto; padding: 0; border: 0; color: var(--teal-dark); background: transparent; font-size: 11px; font-weight: 800; }
.profile-button:hover { color: var(--coral); }
.profile-button:focus-visible { border-radius: 5px; outline-offset: 4px; }
.logout-button { padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 11px; }
.logout-button:hover { color: var(--coral); }
.primary-button, .secondary-button, .danger-button, .control-button, .text-button { min-height: 40px; padding: 0 14px; border-radius: 8px; font-weight: 750; }
.primary-button { border: 1px solid var(--teal-dark); color: #fff; background: var(--teal-dark); box-shadow: 0 5px 12px rgba(17,108,104,.16); }
.primary-button:hover { background: #0e5d5a; }
.secondary-button { border: 1px solid var(--line); color: var(--ink-soft); background: #fff; }
.secondary-button:hover, .control-button:hover { border-color: #b9cccc; background: #f7fbfa; }
.danger-button { border: 1px solid #f1c9c1; color: #b44b39; background: #fff7f5; }
.control-button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); color: var(--ink-soft); background: #fff; font-size: 12px; }
.text-button { min-height: auto; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 12px; }
.text-button:hover { color: var(--teal-dark); }

.overview-strip { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); max-width: 1280px; margin: 0 auto 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.overview-item { min-height: 104px; padding: 19px 22px; border-left: 1px solid var(--line-light); }
.overview-item[role="button"] { cursor: pointer; }
.overview-item[role="button"]:hover, .overview-item[role="button"]:focus-visible { background: #f7fbfa; outline: 0; }
.overview-item:first-child { border-left: 0; }
.overview-kicker { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.overview-item strong { display: block; color: var(--ink); font-size: 30px; line-height: 1; }
.overview-main strong { color: var(--teal-dark); }
.overview-note { display: block; margin-top: 8px; color: #a0acad; font-size: 11px; }
.attention-item strong { color: var(--coral); }

.motivation-panel { display: grid; grid-template-columns: 34px minmax(0, 1fr) 36px; align-items: center; gap: 14px; max-width: 1280px; min-height: 76px; margin: 0 auto 22px; padding: 13px 18px; border: 1px solid #d7e7e3; border-radius: var(--radius); background: #f7fbfa; box-shadow: 0 8px 24px rgba(22, 48, 56, .045); }
.motivation-mark { align-self: start; color: var(--coral); font-family: Georgia, serif; font-size: 42px; line-height: .9; }
.motivation-content { min-width: 0; }
.motivation-content .section-eyebrow { margin-bottom: 3px; }
.motivation-content h2 { display: inline; color: var(--ink-soft); font-size: 11px; }
.motivation-text { display: inline; margin: 0 0 0 12px; color: var(--ink); font-size: 15px; font-weight: 750; line-height: 1.5; overflow-wrap: anywhere; }
.motivation-text.is-placeholder { color: var(--muted); font-weight: 500; }
.motivation-edit { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 7px; color: var(--teal-dark); background: #fff; font-size: 15px; }
.motivation-edit:hover { border-color: #b9cccc; background: var(--mint); }
.updates-panel { display: grid; gap: 14px; margin: 0 auto 18px; max-width: 1280px; padding: 18px 20px; border: 1px solid var(--line-light); border-radius: 8px; background: rgba(255,255,255,.72); }
.auth-updates { position: relative; max-width: 600px; margin: 28px 0 0; padding: 20px 24px 18px 26px; border: 0; border-left: 3px solid var(--coral); border-radius: 0 12px 12px 0; background: rgba(255,255,255,.82); box-shadow: 0 12px 30px rgba(22, 48, 56, .06); }
.updates-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.updates-header h2 { margin-top: 5px; color: var(--ink); font-size: 18px; letter-spacing: -.01em; }
.updates-current { color: var(--teal-dark); font-size: 10px; font-weight: 800; }
.updates-list { display: grid; gap: 10px; max-height: 222px; overflow-y: auto; padding-right: 8px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b8d9d3 transparent; }
.updates-list::-webkit-scrollbar { width: 5px; }
.updates-list::-webkit-scrollbar-thumb { border-radius: 5px; background: #b8d9d3; }
.update-item { position: relative; display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 16px; padding: 12px 0 0 12px; border-top: 1px solid var(--line-light); }
.update-item:first-child { padding-top: 0; border-top: 0; }
.update-item::before { position: absolute; top: 17px; left: -31px; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 1px #f0c7bd; content: ""; }
.update-item:first-child::before { top: 5px; }
.update-item time { color: var(--teal); font-size: 10px; font-weight: 850; line-height: 1.4; }
.update-item strong { color: var(--ink); font-size: 12px; font-weight: 850; }
.update-item p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.motivation-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; margin-top: 7px; }
.motivation-form input { min-width: 0; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: #fff; }
.motivation-form button { min-height: 38px; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 22px; max-width: 1280px; margin: 0 auto; }
.content-column, .insight-column { display: grid; gap: 18px; min-width: 0; }
.focus-banner { display: grid; grid-template-columns: minmax(200px, .86fr) minmax(0, 1.14fr); gap: 22px; padding: 22px 24px; border-radius: var(--radius); color: #edf8f4; background: linear-gradient(120deg, #17424b, #1f6e6b); box-shadow: var(--shadow); }
.section-eyebrow { display: block; margin-bottom: 9px; color: #75c6b6; font-size: 9px; font-weight: 900; }
.focus-banner h2 { max-width: 260px; font-size: 19px; }
.focus-banner p { margin: 9px 0 0; color: #afd2cb; font-size: 12px; line-height: 1.6; }
.focus-capture-button { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; margin-top: 17px; padding: 0 14px; border: 1px solid rgba(255,255,255,.34); border-radius: 8px; color: #17424b; background: #d9f4eb; box-shadow: 0 5px 12px rgba(0,0,0,.12); font-size: 12px; font-weight: 850; }
.focus-capture-button span { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; color: #d9f4eb; background: #17424b; font-size: 15px; font-weight: 500; line-height: 1; }
.focus-capture-button:hover { border-color: #fff; background: #f2fff9; transform: translateY(-1px); }
.focus-capture-button:focus-visible { outline: 3px solid rgba(217,244,235,.55); outline-offset: 2px; }
.focus-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: focus; }
.focus-list li { display: grid; grid-template-columns: 25px minmax(0,1fr); align-items: center; gap: 9px; min-height: 32px; color: #eaf5f1; font-size: 12px; line-height: 1.4; counter-increment: focus; }
.focus-list li::before { content: counter(focus, decimal-leading-zero); display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid rgba(255,255,255,.24); border-radius: 50%; color: #9ee1d2; font-size: 10px; font-weight: 800; }
.focus-list .focus-empty { color: #a8cbc5; }

.task-panel, .side-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.task-panel { min-height: 370px; padding: 23px 24px 18px; }
.panel-header, .side-panel-header, .panel-title-row, .panel-controls { display: flex; align-items: center; }
.panel-header, .side-panel-header { justify-content: space-between; gap: 16px; }
.panel-title-row { gap: 8px; }
.count-badge, .side-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; color: var(--teal-dark); background: var(--mint); font-size: 10px; font-weight: 800; }
.panel-description { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.panel-controls { gap: 15px; }
.filter-bar { display: flex; align-items: center; gap: 8px; margin: 18px 0 -3px; padding: 10px; border: 1px solid var(--line-light); border-radius: 8px; background: #f9fbfb; }
.filter-bar select { height: 33px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink-soft); background: #fff; font-size: 11px; }
.hidden { display: none !important; }
.task-list { display: grid; gap: 8px; margin-top: 20px; }
.task-list-divider { display: flex; align-items: center; gap: 10px; margin: 7px 0 1px; color: #9aa9a9; font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.task-list-divider::before, .task-list-divider::after { flex: 1; height: 1px; background: var(--line); content: ""; }
.task-card { display: grid; grid-template-columns: 27px minmax(0,1fr) minmax(112px, auto); align-items: start; gap: 12px; padding: 14px 12px 14px 12px; border: 1px solid var(--line-light); border-radius: 9px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.task-card:hover { border-color: #c4d9d6; box-shadow: 0 7px 16px rgba(27, 77, 77, .07); transform: translateY(-1px); }
.task-card.is-done { background: #f8fbfa; }
.task-card.is-done .task-card-title { color: #9aa9aa; text-decoration: line-through; }
.task-check { display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; padding: 0; border: 1.5px solid #c9d5d4; border-radius: 50%; color: #fff; background: #fff; }
.task-check:hover { border-color: var(--teal); background: var(--mint); }
.task-card.is-done .task-check { border-color: var(--teal); background: var(--teal); }
.task-check span { display: none; font-size: 13px; line-height: 1; }
.task-card.is-done .task-check span { display: block; }
.task-card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.task-card-title { min-width: 0; overflow-wrap: anywhere; font-weight: 800; }
.task-card.is-capture .task-card-title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.priority-tag { flex: 0 0 auto; padding: 3px 6px; border-radius: 4px; font-size: 9px; font-weight: 900; }
.priority-tag.p0 { color: #b64a3a; background: #fff0ed; }
.priority-tag.p1 { color: #9d6a13; background: #fff6df; }
.priority-tag.p2 { color: #2c7190; background: #edf7fb; }
.priority-tag.p3 { color: #688386; background: #f0f5f5; }
.task-outcome { margin: 5px 0 9px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.task-card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: #95a4a5; font-size: 10px; }
.task-card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.task-card-meta span::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: #bfd1d0; }
.task-card-meta .task-due.is-overdue { color: var(--coral); font-weight: 800; }
.task-card-meta .task-due.is-overdue::before { background: var(--coral); }
.task-more { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; color: #aab6b6; background: transparent; letter-spacing: 1px; }
.task-more:hover { color: var(--teal-dark); background: var(--mint); }
.empty-state { display: grid; justify-items: center; padding: 54px 20px 42px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 14px; border-radius: 50%; color: var(--teal); background: var(--mint); font-size: 20px; }
.empty-state h3 { font-size: 15px; }
.empty-state p { margin: 7px 0 18px; color: var(--muted); font-size: 12px; }

.side-panel { padding: 20px; }
.side-panel-header { align-items: flex-start; }
.side-panel-header h2 { font-size: 16px; }
.side-panel-header .section-eyebrow { margin-bottom: 7px; }
.progress-label { color: var(--teal-dark); font-size: 16px; font-weight: 850; }
.large-progress { height: 8px; margin: 20px 0 12px; overflow: hidden; border-radius: 20px; background: #edf2f1; }
.large-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--teal); transition: width .2s ease; }
.weekly-stats { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.weekly-stats strong { color: var(--ink-soft); font-size: 14px; }
.week-mini-list, .followup-list { display: grid; gap: 9px; margin-top: 17px; }
.mini-task, .followup-item { min-width: 0; padding-bottom: 9px; border-bottom: 1px solid var(--line-light); }
.mini-task:last-child, .followup-item:last-child { padding-bottom: 0; border-bottom: 0; }
.mini-task-title, .followup-title { display: block; overflow: hidden; color: var(--ink-soft); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.mini-task-meta, .followup-meta { display: block; margin-top: 4px; color: #a0adae; font-size: 10px; }
.followup-item { display: grid; grid-template-columns: 8px minmax(0,1fr); gap: 9px; width: 100%; padding: 0 0 9px; border: 0; border-bottom: 1px solid var(--line-light); background: transparent; text-align: left; }
.followup-dot { width: 6px; height: 6px; margin-top: 5px; border-radius: 50%; background: var(--amber); }
.followup-item.overdue .followup-dot { background: var(--coral); }
.followup-item.overdue .followup-meta { color: var(--coral); }
.review-panel textarea { min-height: 74px; }
.review-panel textarea[readonly] { color: var(--ink-soft); background: #f7f9f8; cursor: default; }
.review-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line-light); }
.review-tabs { display: flex; gap: 4px; margin-top: 15px; padding: 3px; border: 1px solid var(--line-light); border-radius: 8px; background: #f6f9f8; }
.review-tab { flex: 1; min-height: 30px; padding: 0 9px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 800; }
.review-tab:hover { color: var(--ink-soft); background: #fff; }
.review-tab.active { color: var(--teal-dark); background: #fff; box-shadow: 0 2px 5px rgba(22, 48, 56, .08); }
.review-status { color: #9aa8a8; font-size: 10px; }
.review-status.saving, .review-status.pending { color: var(--amber); }
.review-status.saved { color: var(--teal); }
.review-status.view-only { color: var(--muted); }
.review-status.failed { color: var(--coral); }
.field-label { display: block; margin: 16px 0 7px; color: var(--muted); font-size: 11px; font-weight: 750; }
textarea, input, select { width: 100%; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: #fff; outline: 0; }
textarea { resize: vertical; padding: 10px; line-height: 1.5; }
input, select { min-height: 38px; padding: 0 10px; }
textarea:focus, input:focus, select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(27, 138, 131, .11); }

.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(13, 31, 38, .48); }
.modal { width: min(650px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 24px; border-radius: 13px; background: #fff; box-shadow: 0 30px 80px rgba(10, 34, 42, .22); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.modal-header h2 { font-size: 22px; }
.modal-close { width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--muted); background: #f5f8f7; font-size: 22px; line-height: 1; }
.modal-close:hover { color: var(--ink); background: var(--mint); }
.task-form { display: grid; gap: 16px; }
.full-field, .form-grid label { display: grid; gap: 7px; color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.full-field em { color: var(--coral); font-style: normal; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--line-light); }
.modal-actions { display: flex; gap: 9px; margin-left: auto; }
.member-modal { width: min(680px, 100%); }
.member-scope-hint { margin: -8px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.member-list { display: grid; gap: 7px; max-height: 250px; overflow: auto; padding-right: 3px; }
.member-row { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line-light); border-radius: 8px; }
.member-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: var(--teal); font-size: 13px; font-weight: 850; }
.member-info { display: grid; gap: 3px; min-width: 0; }
.member-info strong { overflow: hidden; color: var(--ink-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.member-info span { color: var(--muted); font-size: 10px; }
.member-role { color: var(--teal-dark); font-size: 10px; font-weight: 800; }
.member-form select:disabled { color: var(--ink-soft); background: #f5f8f7; opacity: 1; }
.member-empty { margin: 0; color: var(--muted); font-size: 12px; }
.member-form { display: grid; gap: 14px; margin-top: 22px; padding-top: 19px; border-top: 1px solid var(--line-light); }
.member-form-title { margin: 0; color: var(--ink); font-size: 13px; font-weight: 800; }
.member-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.member-account-hint { margin: -4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.member-form-message { margin: -3px 0 0; padding: 9px 11px; border: 1px solid #f1c9c1; border-radius: 7px; color: #a74334; background: #fff7f5; font-size: 11px; line-height: 1.5; }
.member-form-message.pending { border-color: #ead8b8; color: #9a691e; background: #fffaf0; }
.member-form-message.success { border-color: #c9e4dd; color: var(--teal-dark); background: var(--mint); }
.member-form .modal-actions { margin: 0; justify-content: flex-end; }
.member-form .primary-button:disabled { cursor: wait; opacity: .65; }
.toast { position: fixed; z-index: 30; right: 24px; bottom: 24px; max-width: min(380px, calc(100vw - 32px)); padding: 12px 15px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink-soft); background: #fff; box-shadow: 0 14px 40px rgba(10, 34, 42, .18); font-size: 12px; line-height: 1.5; }
.toast.success { border-color: #c9e4dd; color: var(--teal-dark); background: #f2fbf8; }
.toast.error { border-color: #f1c9c1; color: #a74334; background: #fff7f5; }
.capture-modal { width: min(620px, 100%); }
.capture-form { display: grid; gap: 14px; }
.capture-form textarea { min-height: 190px; resize: vertical; font-size: 14px; line-height: 1.7; }
.capture-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.capture-form .modal-actions { margin-left: auto; }

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .main-area { padding-right: 28px; padding-left: 28px; }
  .workspace-grid { grid-template-columns: minmax(0,1fr) 280px; gap: 16px; }
  .focus-banner { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; gap: 28px; justify-items: center; padding: 36px 20px; }
  .auth-intro { max-width: 520px; }
  .auth-kicker { margin-top: 50px; }
  .auth-card { max-width: 520px; }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { min-height: auto; padding: 14px 16px; }
  .brand-block { padding: 0; }
  .sidebar-add { width: auto; margin: 15px 0 12px; }
  .nav-group { display: flex; flex-wrap: wrap; gap: 3px; }
  .nav-label, .project-nav, .sidebar-footer { display: none; }
  .nav-item { min-height: 34px; padding: 0 9px; }
  .nav-item span:nth-child(2) { white-space: nowrap; }
  .nav-item .nav-count { display: none; }
  .sidebar { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
  .sidebar .nav-group { grid-column: 1 / -1; }
  .main-area { padding: 24px 16px 36px; }
  .topbar { align-items: flex-start; flex-direction: column; gap: 16px; }
  .topbar-actions, .search-box { width: 100%; }
  .search-box { flex: 1; }
  .topbar-actions .icon-control { align-self: flex-end; }
  .topbar-actions .member-button, .topbar-actions .user-chip, .topbar-actions .logout-button { align-self: flex-start; }
  .overview-strip { grid-template-columns: repeat(2, 1fr); }
  .overview-item:nth-child(3) { border-left: 0; border-top: 1px solid var(--line-light); }
  .overview-item:nth-child(4) { border-top: 1px solid var(--line-light); }
  .workspace-grid { display: block; }
  .insight-column { margin-top: 18px; }
}
@media (max-width: 520px) {
  .main-area { padding-right: 11px; padding-left: 11px; }
  .topbar-actions { align-items: stretch; flex-direction: column; }
  .topbar-actions .icon-control { align-self: center; }
  .topbar-actions .primary-button { width: 100%; }
  .overview-item { min-height: 95px; padding: 15px; }
  .overview-item strong { font-size: 26px; }
  .motivation-panel { grid-template-columns: 25px minmax(0, 1fr) 34px; gap: 9px; padding: 13px; }
  .motivation-content h2, .motivation-text { display: block; }
  .motivation-text { margin: 5px 0 0; font-size: 14px; }
  .motivation-form { grid-template-columns: 1fr 1fr; }
  .motivation-form input { grid-column: 1 / -1; }
  .focus-banner, .task-panel, .side-panel { padding: 18px; }
  .panel-header { align-items: flex-start; flex-direction: column; }
  .panel-controls { width: 100%; justify-content: space-between; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-bar select { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .member-form-grid { grid-template-columns: 1fr; }
  .modal { padding: 18px; }
  .management-stats { grid-template-columns: repeat(2, 1fr); }
  .management-panel-header { align-items: stretch; flex-direction: column; }
  .management-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .management-row-meta { grid-column: 1; }
  .management-row .management-action { grid-column: 2; grid-row: 1 / span 2; }
  .modal-footer { align-items: stretch; flex-direction: column; }
  .task-card { grid-template-columns: 27px minmax(0, 1fr); gap: 10px; }
  .task-card-actions { grid-column: 2; justify-content: flex-start; min-width: 0; }
  .modal-actions { margin-left: 0; }
  .modal-actions button { flex: 1; }
}

.sync-status { display: inline-flex; align-items: center; min-width: 92px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.sync-status::before { content: ""; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #9aa8a8; }
.sync-status.online { color: var(--teal-dark); }
.sync-status.online::before { background: #55a58e; }
.sync-status.syncing { color: var(--amber); }
.sync-status.syncing::before { background: var(--amber); }
.sync-status.offline { color: var(--coral); }
.sync-status.offline::before { background: var(--coral); }
.icon-control:disabled { cursor: wait; opacity: .55; }
.filter-button.is-active, .control-button.is-active { border-color: #acd8d1; color: var(--teal-dark); background: var(--mint); }
.task-card.is-archived { background: #f7f9f8; }
.task-card.is-archived .task-card-title { color: #7e9090; }
.task-card.is-archived .task-more { width: auto; padding: 0 7px; color: var(--teal-dark); font-size: 11px; letter-spacing: 0; }
.priority-tag.capture-tag { color: #6b648e; background: #f1effa; }
.task-detail-fields.hidden { display: none; }
.modal-left-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.simple-form { display: grid; gap: 16px; }
.form-hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.error-text { color: var(--coral); }
.toggle-field { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 11px; font-weight: 750; }
.toggle-field input { width: 17px; height: 17px; min-height: 0; accent-color: var(--teal); }
.member-row { grid-template-columns: 32px minmax(0,1fr) auto auto; }
.member-row.is-disabled { opacity: .67; }
.member-actions { display: flex; align-items: center; gap: 9px; }
.member-actions .text-button { color: var(--teal-dark); font-size: 11px; }
.import-modal { width: min(690px, 100%); }
.import-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 15px; }
.import-stat-grid > div { display: grid; gap: 4px; padding: 13px 10px; border: 1px solid var(--line-light); border-radius: 8px; background: #f8fbfa; text-align: center; }
.import-stat-grid strong { color: var(--teal-dark); font-size: 21px; }
.import-stat-grid span { color: var(--muted); font-size: 10px; }
.import-conflict-note { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }
.import-risk-note { margin: 7px 0 0; color: var(--amber); font-size: 11px; line-height: 1.6; }
.confirm-modal { width: min(480px, 100%); }
.password-modal { width: min(480px, 100%); }
.confirm-message { margin: 0 0 24px; color: var(--ink-soft); font-size: 13px; line-height: 1.8; white-space: pre-wrap; }
.danger-button { box-shadow: 0 5px 12px rgba(180, 75, 57, .09); }
.project-entry.is-archived .project-item { color: #768d8e; }
.project-entry.is-archived .project-dot { background: #aebdbc; }

@media (max-width: 1080px) {
  .sync-status { display: none; }
}
@media (max-width: 520px) {
  .import-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .member-row { grid-template-columns: 32px minmax(0,1fr) auto; }
  .member-actions { grid-column: 2 / -1; justify-content: flex-end; }
  .modal-left-actions { width: 100%; }
  .team-nav { display: none; }
  .topbar { gap: 12px; }
  .topbar-actions { display: grid; grid-template-columns: 42px 42px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; width: 100%; }
  .topbar-actions .search-box { grid-column: 1 / -1; width: 100%; }
  .topbar-actions .icon-control { align-self: center; }
  .topbar-actions .member-button, .topbar-actions .user-chip, .topbar-actions .logout-button { align-self: center; }
  .topbar-actions .primary-button { grid-column: 1 / -1; width: 100%; }
}
