:root {
  color-scheme: light;
  --bg: #f4f7f8;
  --panel: #ffffff;
  --ink: #1f2a37;
  --muted: #778393;
  --line: #dfe7ea;
  --green: #38a06f;
  --green-dark: #25845a;
  --green-soft: #eaf7f0;
  --blue: #3b76e5;
  --orange: #e9933f;
  --red: #d95145;
  --purple: #8066d8;
  --shadow: 0 10px 28px rgba(31, 42, 55, .08);
  --rail: 64px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--green-dark); }

button, .button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  min-height: 36px;
  padding: 0 14px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover, .button:hover {
  border-color: #bdd6cc;
  color: var(--green-dark);
  text-decoration: none;
}

button.primary, .button.primary, .primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

button.primary:hover, .button.primary:hover {
  background: var(--green-dark);
  color: #fff;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.danger-button {
  border-color: #ffd1c9;
  color: var(--red);
  background: #fff7f5;
}

.danger-button:hover {
  border-color: #f5a69b;
  color: #b1362c;
}

.wide { width: 100%; }
.plain { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: #f5f8f9; }

.login-shell {
  width: min(1020px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 360px;
  gap: 24px;
  align-items: stretch;
}

.login-copy {
  min-height: 380px;
  padding: 34px 38px;
  background:
    linear-gradient(135deg, rgba(21, 116, 80, .95) 0%, rgba(48, 158, 111, .93) 48%, rgba(67, 134, 192, .95) 100%),
    radial-gradient(circle at 82% 22%, rgba(255,255,255,.22), transparent 28%);
  color: #fff;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.brand-chip {
  display: inline-flex;
  align-self: flex-start;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-weight: 800;
  font-size: 14px;
}

.login-brand-block { max-width: 560px; }
.login-copy h1 { margin: 0 0 10px; font-size: 46px; line-height: 1.05; letter-spacing: 0; }
.login-copy p { margin: 0; width: min(520px, 100%); font-size: 17px; line-height: 1.7; color: rgba(255,255,255,.9); }

.login-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.login-feature-grid span {
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.92);
  font-size: 13px;
  font-weight: 700;
}
.login-feature-grid b {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: 14px;
}

.login-copy-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 8px;
  background: rgba(19, 72, 62, .24);
  border: 1px solid rgba(255,255,255,.2);
}
.login-copy-foot strong { white-space: nowrap; font-size: 14px; }
.login-copy-foot span { color: rgba(255,255,255,.86); font-size: 13px; line-height: 1.6; }

.login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.login-card-head { margin-bottom: 4px; }
.login-card-head strong { display: block; color: var(--text); font-size: 22px; line-height: 1.25; }
.login-card-head span { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }

.form-error {
  background: #fff1ef;
  border: 1px solid #ffd1c9;
  color: #b1362c;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 700;
}

.login-helper { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.login-helper span {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  background: #f5f8f7;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  background: #42a477;
  color: #fff;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rail-brand {
  width: 40px;
  height: 40px;
  margin: 18px 0 14px;
  background: #fff;
  color: var(--green-dark);
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 13px;
}

.rail nav { display: grid; gap: 8px; width: 100%; padding: 0 8px; }
.nav-link {
  min-height: 54px;
  display: grid;
  place-items: center;
  gap: 2px;
  color: rgba(255,255,255,.88);
  border-radius: 8px;
}
.nav-link span { font-size: 20px; line-height: 20px; }
.nav-link b { font-size: 12px; }
.nav-link.active, .nav-link:hover { background: rgba(20, 90, 61, .34); color: #fff; }
.rail-foot { margin-top: auto; padding: 16px 0; font-size: 12px; }
.rail-foot a { color: rgba(255,255,255,.9); }

.shell { margin-left: var(--rail); min-height: 100vh; }
.topbar {
  height: 58px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar strong { display: block; font-size: 16px; }
.topbar span { color: var(--muted); font-size: 12px; }
.topbar-user { display: flex; align-items: center; gap: 8px; }
.user-pill,
.password-link,
.logout-pill {
  background: var(--green-soft);
  color: var(--green-dark) !important;
  border-radius: 6px;
  padding: 8px 10px;
  font-weight: 800;
}
.password-link,
.logout-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
}
.password-link:hover,
.logout-pill:hover {
  background: #dcefe6;
  color: var(--green-dark) !important;
}

.button.return-button,
a.return-button {
  min-height: 32px;
  padding: 0 12px;
  border-color: var(--green);
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(56,160,111,.18);
}

.button.return-button:hover,
a.return-button:hover {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
}

.content {
  width: min(1500px, calc(100vw - var(--rail) - 36px));
  margin: 0 auto;
  padding: 18px 0 42px;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.page-head h1 { margin: 0 0 4px; font-size: 24px; letter-spacing: 0; }
.page-head p { margin: 0; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.header-form { margin: 0; }
.muted-text { color: var(--muted); font-size: 13px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(31,42,55,.04);
  padding: 18px;
  margin-bottom: 14px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.panel-title h2 { margin: 0; font-size: 17px; }
.panel-title a { color: var(--green-dark); font-weight: 800; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.metric-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 8px;
}
.metric-card span { color: var(--muted); }
.metric-card strong { font-size: 32px; letter-spacing: 0; }
.metric-card em { color: var(--green-dark); font-style: normal; font-weight: 800; }

.dashboard-workbench {
  padding-bottom: 14px;
}

.workbench-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.workbench-column {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e6edf0;
  border-radius: 8px;
  background: #fbfcfd;
}

.workbench-column header {
  display: grid;
  gap: 3px;
  padding-bottom: 4px;
}

.workbench-column header strong {
  font-size: 15px;
}

.workbench-column header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workbench-item {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 94px;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.workbench-item:hover {
  border-color: #bdd6cc;
  background: #fbfffd;
}

.workbench-item.danger {
  border-color: #ffd1c9;
  background: #fff9f7;
}

.workbench-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.workbench-main strong,
.workbench-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workbench-side {
  display: grid;
  justify-items: end;
  gap: 5px;
  color: #526070;
}

.workbench-side em {
  max-width: 94px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.workbench-side b {
  color: var(--green-dark);
  font-size: 15px;
}

.workbench-item.danger .workbench-side em,
.workbench-item.danger .workbench-side b {
  color: var(--red);
}

.workbench-side .mini-bar {
  width: 84px;
}

.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.tabs {
  display: flex;
  gap: 8px;
  background: #eaf0f2;
  padding: 6px;
  border-radius: 8px;
  margin-bottom: 14px;
  width: fit-content;
}
.tabs a {
  min-height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  color: #5e6978;
}
.tabs a.active { background: #fff; color: var(--green-dark); box-shadow: 0 2px 8px rgba(31,42,55,.08); }

.objective-list, .task-card-list { display: grid; gap: 14px; }
.objective-list {
  --okr-tree-columns: 74px minmax(180px, 1.55fr) 54px 58px 92px 92px minmax(118px, .75fr) 72px 50px 96px 58px 112px;
  --okr-tree-gap: 8px;
  --okr-tree-row-x: 12px;
  overflow-x: visible;
  overflow-y: visible;
}
.objective-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.okr-tree-card {
  padding: 0;
  overflow-x: visible;
  overflow-y: visible;
  border-color: #e3ebef;
  box-shadow: 0 4px 14px rgba(31,42,55,.035);
  width: 100%;
  max-width: 100%;
}
.objective-card.okr-tree-card {
  padding: 0;
}
.okr-tree-header,
.okr-tree-objective-row,
.okr-tree-kr-row,
.okr-tree-task-row {
  display: grid;
  grid-template-columns: var(--okr-tree-columns);
  gap: var(--okr-tree-gap);
  align-items: center;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.okr-tree-header {
  min-height: 32px;
  padding: 0 calc(var(--okr-tree-row-x) - 1px);
  border-bottom: 1px solid #edf2f4;
  background: #f8fbfc;
  color: #718091;
  font-size: 12px;
  font-weight: 900;
  z-index: 2;
  border: 1px solid #e3ebef;
  border-radius: 8px;
  margin-bottom: -6px;
}
.okr-tree-header span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.okr-tree-objective-row, .okr-tree-kr-row {
  min-height: 48px;
  padding: 6px var(--okr-tree-row-x);
}
.okr-tree-objective-row {
  background: #fff;
}
.okr-tree-kr-list {
  border-top: 1px solid #eef2f4;
}
.okr-tree-card.editing {
  border-color: var(--green);
  box-shadow: 0 6px 20px rgba(56,160,111,.14);
}
.quick-add-kr-toggle {
  min-width: 48px;
  height: 28px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px dashed #a8d9bf;
  background: #fbfffd;
  color: var(--green-dark);
  font-size: 12px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}
.inline-edit-toggle {
  border-color: #cdebdc;
  background: var(--green-soft);
  color: var(--green-dark);
  min-height: 32px;
  padding: 0 12px;
  font-weight: 900;
  border-radius: 6px;
  position: relative;
  z-index: 2;
}
.card-save-toggle {
  display: none;
}
.card-cancel-toggle {
  display: none;
}
.okr-tree-card.editing .card-save-toggle {
  display: inline-flex;
}
.okr-tree-card.editing .card-cancel-toggle {
  display: inline-flex;
}
.okr-tree-card.editing .inline-edit-toggle {
  display: none;
}
.okr-tree-card.editing .okr-tree-view-kr[hidden],
.okr-tree-edit-row[hidden],
.okr-tree-add-kr[hidden] {
  display: none;
}
.okr-tree-add-kr:not(.is-open) {
  display: none;
}
.okr-tree-card.editing .okr-tree-add-kr.is-open {
  display: grid;
}
.okr-tree-add-kr-trigger[hidden] {
  display: none;
}
.okr-tree-edit-row {
  min-height: 70px;
  display: grid;
  grid-template-columns: 150px minmax(260px, 1fr) 120px 128px 128px minmax(220px, .7fr);
  gap: 10px;
  align-items: center;
  padding: 12px 24px 12px 18px;
  border-bottom: 1px solid #eef2f4;
  background: #fbfdfc;
}
.okr-tree-edit-row label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.okr-tree-edit-row input,
.okr-tree-edit-row select {
  width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 13px;
}
.edit-row-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 900;
}
.objective-card-kr-edit {
  grid-template-columns: 150px minmax(260px, 1fr) 120px 128px 128px minmax(220px, .7fr);
}
.objective-card-kr-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: center;
  min-width: 0;
}
.objective-card-kr-actions .mini,
.objective-card-kr-actions .kr-action-pill {
  white-space: nowrap;
}
.objective-card-kr-action-label {
  display: block;
  min-height: 18px;
  color: transparent;
  font-size: 12px;
  font-weight: 800;
}
.kr-action-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #d8e1e8;
  border-radius: 999px;
  color: #8a97a6;
  background: #f7f9fb;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.objective-toolbar {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.objective-display-controls {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 22px;
}
.objective-display-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  color: #5f6d7a;
  font-size: 13px;
  font-weight: 900;
  user-select: none;
}
.objective-display-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--green);
}
.okr-tree-edit-row {
  align-items: start;
}
.objective-card-profile-edit {
  grid-template-columns: 118px minmax(260px, 1fr) 120px 138px 138px minmax(180px, .65fr);
  align-items: end;
  min-height: 56px;
}
.objective-card-profile-edit .edit-row-title {
  align-self: center;
}
.objective-card-profile-edit input,
.objective-card-profile-edit select {
  min-height: 32px;
}
.okr-tree-edit-row label {
  min-width: 0;
}
.okr-tree-edit-row input,
.okr-tree-edit-row select {
  max-width: 100%;
}
.objective-card-kr-edit label:nth-of-type(2),
.objective-card-kr-edit label:nth-of-type(3) {
  min-width: 0;
}
.objective-card-kr-edit input[type="date"] {
  min-width: 0;
}
.objective-card-kr-edit input[type="number"] {
  min-width: 72px;
}
.edit-row-spacer {
  min-width: 0;
}
.okr-tree-add-kr-trigger {
  min-height: 52px;
  background: #fff;
}
.okr-tree-add-kr-trigger .quick-add-kr-toggle {
  justify-self: start;
}
.okr-tree-kr-row {
  min-height: 44px;
  padding-top: 5px;
  padding-bottom: 5px;
  background: #fff;
  border-bottom: 1px solid #eef2f4;
  align-items: center;
}
.okr-tree-kr-row:last-child { border-bottom: 0; }
.okr-tree-add-kr {
  min-height: 68px;
  background: #fbfdfc;
}
.okr-tree-add-kr input {
  width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 13px;
}
.okr-tree-add-kr .kr-badge.muted {
  background: #eef3f4;
  color: #7b8793;
}
.okr-tree-add-kr .okr-tree-progress {
  min-width: 0;
}
.okr-tree-add-kr .okr-tree-actions {
  justify-content: flex-start;
}
.remove-add-kr {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border-radius: 50%;
  border-color: #ffd1c9;
  background: #fff7f5;
  color: var(--red);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}
.remove-add-kr:hover {
  border-color: #f5a69b;
  color: #b1362c;
}
.kr-action-pill {
  width: auto;
  min-width: 54px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
}
.tree-gutter {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 6px;
  min-height: 54px;
}
.tree-gutter .o-badge,
.tree-gutter .kr-badge {
  justify-self: start;
}
.tree-gutter.small {
  grid-template-columns: 22px 1fr;
  padding-left: 4px;
  align-self: start;
  padding-top: 0;
}
.tree-toggle {
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #7c8794;
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.tree-toggle:hover {
  background: #eef3f4;
  color: var(--green-dark);
}
.okr-tree-card.objective-collapsed .tree-toggle {
  transform: rotate(-90deg);
}
.okr-tree-card.objective-collapsed .okr-tree-kr-list {
  display: none;
}
.okr-tree-card.objective-collapsed .tree-line {
  display: none;
}
.tree-line {
  position: absolute;
  left: 41px;
  top: 40px;
  bottom: -42px;
  width: 1px;
  background: #dfe7ea;
}
.okr-tree-main { min-width: 0; }
.okr-tree-above {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--green-dark);
  font-weight: 800;
  margin-bottom: 6px;
}
.okr-tree-above a { color: #7b8794; }
.okr-tree-main h2, .okr-tree-main h3 {
  margin: 0;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.okr-tree-main h2 { font-size: 16px; }
.okr-tree-main h3 { font-size: 15px; }
.okr-tree-main h3 small {
  color: #9aa4af;
  font-size: 14px;
  font-weight: 800;
}
.okr-tree-main p {
  margin: 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  color: #7b8794;
}
.okr-tree-main p a {
  color: #7b8794;
  font-weight: 800;
}
.okr-tree-priority,
.okr-tree-kind,
.okr-tree-owner,
.okr-tree-visibility,
.okr-tree-extra,
.okr-tree-date,
.okr-tree-weight,
.okr-tree-update {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #7f8b99;
  font-size: 12px;
  font-weight: 800;
}
.okr-tree-owner {
  display: grid;
  gap: 2px;
}
.okr-tree-owner strong,
.okr-tree-owner small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.okr-tree-owner strong {
  color: var(--ink);
  font-size: 13px;
}
.okr-tree-owner small {
  color: #95a1ad;
  font-size: 11px;
}
.okr-tree-extra {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
}
.okr-tree-extra a {
  color: var(--green-dark);
  font-weight: 900;
}
.okr-tree-kr-group {
  border-bottom: 1px solid #eef2f4;
}
.okr-tree-kr-group:last-child {
  border-bottom: 0;
}
.kr-task-summary {
  display: grid;
  border-top: 1px solid #f0f3f5;
}
.okr-tree-task-row {
  min-height: 38px;
  padding: 4px var(--okr-tree-row-x);
  background: #fbfcfd;
}
.okr-tree-task-row.extra-task {
  display: grid;
}
.kr-task-summary:not(.is-expanded) .okr-tree-task-row.extra-task {
  display: none;
}
.task-sub-gutter {
  min-height: 38px;
  align-self: stretch;
  padding-top: 0;
}
.task-node-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #cfd9df;
  background: #fff;
  color: #7c8794;
  font-size: 11px;
  font-weight: 900;
  line-height: 16px;
  text-align: center;
  justify-self: center;
}
.okr-tree-task-main {
  min-width: 0;
  display: block;
}
.okr-tree-task-title {
  color: #2a3742;
}
.okr-tree-task-title strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.okr-tree-task-owner,
.okr-tree-task-participants,
.okr-tree-task-priority,
.okr-tree-task-extra {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8a96a3;
  font-size: 12px;
  font-weight: 800;
}
.okr-tree-task-progress {
  display: grid;
  gap: 4px;
  align-items: center;
}
.okr-tree-progress-head,
.okr-tree-task-progress > span {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
  width: 100%;
}
.okr-tree-task-progress strong,
.okr-tree-task-progress b {
  font-weight: 900;
}
.okr-tree-task-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.okr-tree-task-actions a {
  color: #627080;
  font-weight: 900;
}
.okr-tree-task-actions a:hover {
  color: var(--green-dark);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0;
  border-radius: 0;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  border: 0;
  background: transparent;
  white-space: nowrap;
}
.status-pill.doing {
  color: #2277d6;
}
.status-pill.pending_review {
  color: #c76c15;
}
.status-pill.completed {
  color: var(--green-dark);
}
.status-pill.not_started {
  color: #aab2bd;
}
.task-score-mini {
  color: var(--green-dark);
}
.kr-task-inline-toggle {
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #eef3f4;
  color: #65717e;
  font-size: 17px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.kr-task-inline-toggle:hover {
  background: #dfe8eb;
  color: var(--green-dark);
}
.okr-tree-kr-group:not(.tasks-expanded) .kr-task-inline-toggle {
  transform: rotate(-90deg);
}
.okr-tree-kr-group:not(.tasks-expanded) .kr-task-summary {
  display: none;
}
.type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 8px;
  background: #e8f3ff;
  color: #2277d6;
  font-weight: 900;
}
.okr-tree-date, .okr-tree-weight, .okr-tree-update {
  color: #7b8794;
  font-weight: 700;
}
.okr-tree-progress {
  display: grid;
  gap: 5px;
  align-items: center;
}
.okr-tree-progress strong {
  font-size: 13px;
}
.okr-tree-progress .bar {
  width: 88px;
  height: 7px;
}
.okr-tree-progress .mini-bar {
  width: 88px;
  height: 7px;
}
.okr-tree-progress .status-pill {
  font-size: 12px;
}
.okr-tree-progress em {
  color: var(--green);
  font-style: normal;
  font-weight: 900;
}
.okr-tree-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-content: start;
  justify-items: start;
  align-items: center;
  align-self: center;
  gap: 6px;
  color: #778393;
  font-weight: 800;
  min-width: 0;
}
.okr-tree-card.editing .okr-tree-objective-row .okr-tree-actions {
  grid-template-columns: 64px 64px 64px;
}
.okr-tree-actions .mini,
.okr-tree-actions button,
.okr-tree-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  min-width: 64px;
  padding: 0 12px;
  border: 1px solid #cdebdc;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.okr-tree-actions a:hover {
  border-color: #a8d9bf;
  background: #e0f5ea;
  color: var(--green-dark);
}
.okr-tree-actions .card-cancel-toggle,
.okr-tree-actions .card-save-toggle {
  display: none;
}
.okr-tree-card.editing .okr-tree-actions .card-cancel-toggle,
.okr-tree-card.editing .okr-tree-actions .card-save-toggle {
  display: inline-flex;
}
.okr-tree-view-kr .okr-tree-actions,
.okr-tree-view-kr .okr-tree-date,
.okr-tree-view-kr .okr-tree-weight,
.okr-tree-view-kr .okr-tree-progress,
.okr-tree-view-kr .okr-tree-update {
  align-self: start;
  padding-top: 4px;
}
.okr-tree-view-kr .okr-tree-actions {
  align-self: center;
  padding-top: 0;
}
.objective-head, .task-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.objective-title { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.objective-title h2, .task-card h2, .task-detail h1 { margin: 0 0 7px; font-size: 18px; letter-spacing: 0; }
.objective-title p, .task-card p, .task-detail p { margin: 0; color: var(--muted); }
.o-badge, .kr-badge {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  height: 28px;
  border-radius: 999px;
  font-weight: 900;
}
.o-badge { min-width: 42px; padding: 0 8px; background: var(--green); color: #fff; }
.kr-badge { width: 40px; background: var(--green-soft); color: var(--green-dark); }

.objective-progress { min-width: 150px; display: grid; gap: 6px; justify-items: end; }
.objective-progress strong { font-size: 17px; }
.bar, .kr-progress i, .progress-mini i {
  display: block;
  width: 150px;
  height: 8px;
  border-radius: 999px;
  background: #edf1f3;
  overflow: hidden;
}
.bar i, .kr-progress em, .progress-mini em { display: block; height: 100%; border-radius: inherit; }
.ok { background: var(--green); }
.good { background: var(--blue); }
.warn { background: var(--orange); }
.low { background: #b8c3ce; }

.kr-list, .kr-detail-list { margin-top: 14px; display: grid; gap: 6px; }
.kr-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 170px;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  border-top: 1px solid #edf1f3;
  padding-top: 8px;
}
.kr-main { min-width: 0; }
.kr-main strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kr-main small { color: var(--muted); }
.kr-progress { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.kr-progress i { width: 100px; }

.card-actions { display: flex; justify-content: flex-end; gap: 14px; margin-top: 12px; }
.card-actions a { color: var(--green-dark); font-weight: 800; }

.mini-objective, .task-row, .task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  background: #fff;
}
.mini-main,
.task-item-main {
  flex: 1;
  min-width: 0;
}
.mini-main strong, .task-row strong, .task-item strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-main small, .task-row small, .task-item small { color: var(--muted); }
.progress-mini { display: grid; gap: 4px; justify-items: end; }
.progress-mini i { width: 90px; }
.task-row em { color: var(--green-dark); font-style: normal; font-weight: 800; }

.empty {
  min-height: 80px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #f8fafb;
  border-radius: 8px;
  border: 1px dashed var(--line);
}
.empty.tall { min-height: 240px; }
.empty.compact { min-height: 52px; }

.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 7px; font-weight: 800; color: #405060; }
input, select, textarea {
  width: 100%;
  border: 1px solid #ccd7dd;
  border-radius: 6px;
  min-height: 38px;
  padding: 8px 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
input[type="date"] { max-width: 132px; }
input[type="number"] { max-width: 96px; }
select[name="priority"] { max-width: 112px; }
select[name="target_type"],
select[name="visibility"],
select[name="status"] { max-width: 128px; }
select[name="stage"] { max-width: 148px; }
select[name="role"] { max-width: 112px; }
textarea { resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(56, 160, 111, .18);
  border-color: var(--green);
}
.person-picker {
  position: relative;
  width: 100%;
}
.person-search-input {
  width: 100%;
  min-height: 34px;
  padding: 5px 30px 5px 8px;
  background:
    linear-gradient(45deg, transparent 50%, #7c8794 50%) calc(100% - 17px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, #7c8794 50%, transparent 50%) calc(100% - 12px) 50% / 6px 6px no-repeat,
    #fff;
}
.person-option-list {
  position: absolute;
  z-index: 80;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(31,42,55,.16);
}
.person-option-list[hidden] {
  display: none;
}
.multi-user-picker {
  position: relative;
  width: min(420px, 100%);
  display: grid;
  gap: 6px;
}
.multi-user-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.multi-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid #cdebdc;
  border-radius: 999px;
  background: #eef8f3;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}
.multi-user-chip button {
  min-height: 0;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6f9b87;
  line-height: 1;
}
.multi-user-search {
  width: 100%;
}
.multi-user-option-list {
  top: calc(100% + 4px);
}
.person-option {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 0;
  border-radius: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  color: var(--ink);
  font-weight: 800;
}
.person-option:hover,
.person-option.active {
  background: var(--green-soft);
  color: var(--green-dark);
}
.person-option strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.person-option span {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.person-option.empty {
  cursor: default;
  color: var(--muted);
  justify-content: flex-start;
}
.person-option.empty:hover {
  background: #fff;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.objective-editor-form,
.drawer-form,
.kr-add-form,
.alignment-form {
  align-content: start;
}
.objective-meta-grid {
  grid-template-columns: 180px 112px 128px 128px;
  justify-content: start;
}
.objective-meta-grid label,
.quick-task-options label,
.task-update-grid label,
.kr-add-grid label,
.alignment-field-grid label {
  min-width: 0;
}
.kr-add-grid {
  grid-template-columns: minmax(220px, 1fr) 132px 86px;
  align-items: end;
}
.objective-edit-kr-row {
  grid-template-columns: 54px minmax(260px, 1fr) 140px minmax(180px, .75fr) 76px;
  align-items: center;
}
.objective-edit-kr-row .objective-edit-kr-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.objective-edit-kr-row input[type="hidden"] {
  display: none;
}
.alignment-field-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, .85fr);
  gap: 10px;
}
.task-update-grid {
  grid-template-columns: 112px 148px;
  justify-content: start;
}
.password-form {
  max-width: 520px;
  margin: 0 auto;
}
.form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}
.form-action-spacer {
  flex: 1 1 auto;
}
.objective-edit-actions {
  justify-content: flex-start;
}
.section-label { font-size: 16px; font-weight: 900; }
.kr-editor { display: grid; gap: 10px; }
.kr-input-row {
  display: grid;
  grid-template-columns: 48px minmax(220px, 1fr) 132px minmax(150px, .55fr);
  gap: 10px;
  align-items: center;
}
.kr-input-row span { font-weight: 900; color: var(--green-dark); }

.progress-control {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 96px;
  gap: 12px;
  align-items: center;
  max-width: 520px;
}
.progress-control input[type="range"] {
  padding: 0;
  min-height: 30px;
  accent-color: var(--green);
}
.progress-number {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 4px;
}
.progress-number span {
  color: var(--muted);
  font-weight: 900;
}

.objective-detail .objective-head { align-items: center; }
.detail-note {
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  line-height: 1.7;
  color: #4a5565;
}
.kr-detail { border-top: 1px solid #edf1f3; padding: 10px 0; }
.kr-detail p {
  margin: 8px 0 0 58px;
  color: #4a5565;
  line-height: 1.6;
}
.kr-manage-list {
  display: grid;
  gap: 10px;
}
.kr-manage-row {
  display: grid;
  grid-template-columns: 48px minmax(220px, 1fr) 132px 76px minmax(150px, .58fr) 62px;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.kr-manage-row label {
  display: grid;
  gap: 5px;
  color: #526070;
  font-size: 12px;
  font-weight: 800;
}
.kr-manage-row input { min-height: 34px; padding: 5px 8px; }
.row-actions {
  display: flex;
  justify-content: flex-end;
}
.delete-line {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 4px;
}
.inline-update {
  display: grid;
  grid-template-columns: 90px 140px 72px;
  gap: 8px;
  justify-content: end;
  margin-top: 8px;
}
.inline-update input, .inline-update select, .inline-update button { min-height: 32px; }

.task-list { display: grid; gap: 8px; }
.task-meta { display: inline-flex; gap: 8px; align-items: center; }
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
  background: #eef3f6;
  color: #647181;
}
.status.doing { background: #eef4ff; color: var(--blue); }
.status.pending_review { background: #fff3e7; color: #c76c15; }
.status.completed, .status.active { background: var(--green-soft); color: var(--green-dark); }
.status.archived { background: #fff1ef; color: var(--red); }
.status.created { background: var(--green-soft); color: var(--green-dark); }
.status.failed { background: #fff1ef; color: var(--red); }
.score-chip {
  display: inline-flex;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #efeaff;
  color: var(--purple);
  font-weight: 900;
  align-items: center;
}

.task-workbench-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.report-toolbar {
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(31,42,55,.04);
}
.report-filter-line {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
}
.report-search {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: nowrap;
  width: auto;
  margin: 0;
}
.report-search label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.report-search input[type="date"],
.report-search select {
  min-width: 138px;
}
.report-search .person-picker {
  min-width: 220px;
  width: 220px;
}
.report-search button,
.report-query-button {
  min-height: 38px;
  min-width: 132px;
  padding: 0 16px;
  white-space: nowrap;
}
.report-toolbar .quick-tabs {
  align-self: flex-end;
  white-space: nowrap;
}
.quick-tabs {
  margin-bottom: 0;
}

.list-filter-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.list-filter-form {
  display: grid;
  grid-template-columns: minmax(200px, 1.2fr) minmax(150px, .75fr) 116px minmax(260px, 1fr) minmax(150px, .75fr) minmax(170px, .8fr) 128px;
  align-items: end;
  gap: 8px 10px;
}
.list-filter-form label {
  display: grid;
  gap: 4px;
  color: #526070;
  font-size: 12px;
  font-weight: 900;
}
.list-filter-form input,
.list-filter-form select {
  width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  border-radius: 6px;
}
.date-range-inline {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) 18px minmax(112px, 1fr);
  align-items: center;
  gap: 6px;
}
.date-range-inline input[type="date"] {
  max-width: none;
}
.date-range-inline em {
  color: var(--muted);
  font-style: normal;
  text-align: center;
  font-weight: 900;
}
.list-filter-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.list-filter-actions button,
.list-filter-actions .button {
  flex: 1;
  min-height: 32px;
  padding: 0 12px;
  white-space: nowrap;
}
.list-quick-tabs {
  min-height: 0;
  padding: 0;
  background: transparent;
}

.task-workbench-head .tabs {
  margin-bottom: 0;
}

.task-search {
  display: flex;
  gap: 8px;
  align-items: center;
  width: min(360px, 100%);
}

.task-search input {
  min-height: 34px;
  border-radius: 999px;
  background: #fff;
}

.task-search button {
  min-height: 34px;
}

.task-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

.filter-summary {
  color: var(--green-dark);
  font-weight: 900;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #eef3f6;
  color: #526070;
  font-weight: 800;
}

.filter-chip.active {
  background: #dcefeb;
  color: var(--green-dark);
}

.task-table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(31,42,55,.035);
}

.task-stats-bar {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid #eef2f4;
}

.task-stats-bar strong {
  font-size: 16px;
}

.task-stats-bar span {
  color: var(--muted);
  font-weight: 800;
}

.task-table-head, .task-table-row, .task-stage-row {
  display: grid;
  grid-template-columns: 36px minmax(180px, 1.55fr) minmax(118px, .72fr) 112px minmax(150px, .95fr) minmax(138px, .78fr) 88px;
  align-items: center;
}

.task-table-head {
  min-height: 38px;
  background: #fbfcfd;
  border-bottom: 1px solid #eef2f4;
}

.task-table-head strong {
  padding: 0 10px;
  color: #677381;
  font-size: 12px;
  font-weight: 900;
}

.task-stage-row {
  min-height: 38px;
  grid-template-columns: 44px minmax(0, 1fr) 70px;
  background: #f7faf9;
  border-bottom: 1px solid #eef2f4;
}

.task-stage-row span {
  justify-self: center;
  color: #90a09a;
  font-weight: 900;
}

.task-stage-row strong {
  font-size: 16px;
}

.task-stage-row small {
  color: var(--muted);
  font-weight: 800;
  justify-self: end;
  padding-right: 18px;
}

.task-table-row {
  min-height: 48px;
  color: var(--ink);
  border-bottom: 1px solid #eef2f4;
  background: #fff;
}

.task-table-row:hover {
  background: #fbfdfc;
}

.task-table-row.editing {
  background: #fbfdfc;
  border-bottom-color: #dce9e2;
}

.task-table-row > span {
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 7px;
}

.task-table-row .row-index {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7c8996;
  font-weight: 800;
}

.task-name {
  gap: 6px;
  min-width: 0;
  min-height: 48px;
  padding: 0 7px;
  display: flex;
  align-items: center;
}

.task-name i {
  color: #a3abb5;
  font-style: normal;
  font-size: 17px;
}

.task-name > span, .owner-cell > span, .task-progress-cell > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.task-name small, .owner-cell small, .latest-cell small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.task-name strong, .owner-cell strong, .relation-cell strong, .latest-cell strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-title-link {
  min-width: 0;
}

.owner-cell {
  gap: 6px;
  font-weight: 800;
}

.owner-cell b {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #eaf7f0;
  color: var(--green-dark);
  font-size: 12px;
}

.task-progress-cell {
  gap: 5px;
  flex-wrap: wrap;
  align-content: center;
}

.progress-pill {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  border-radius: 999px;
  padding: 0 6px;
  background: #e8f2ff;
  color: #2277d6;
  font-style: normal;
  font-weight: 900;
  font-size: 11px;
}

.task-progress-cell strong {
  font-size: 14px;
}

.mini-bar {
  display: block;
  width: 76px;
  height: 5px;
  border-radius: 999px;
  background: #edf2f4;
  overflow: hidden;
}

.mini-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.progress-pill.pending_review {
  background: #fff3e7;
  color: #c76c15;
}

.progress-pill.completed {
  background: var(--green-soft);
  color: var(--green-dark);
}

.latest-cell {
  color: #526070;
  display: grid !important;
  align-content: center;
  gap: 3px;
}

.latest-cell strong {
  font-weight: 700;
}

.latest-cell small {
  white-space: nowrap;
}

.relation-cell {
  gap: 6px;
  flex-wrap: wrap;
}

.relation-cell small {
  flex-basis: 100%;
  color: var(--muted);
  margin-left: 28px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.relation-pill {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 900;
}

.task-row-actions {
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.task-row-actions a,
.task-row-actions button {
  width: 42px;
  min-width: 42px;
  min-height: 22px;
  padding: 0 5px;
  border: 1px solid #dfe7ea;
  border-radius: 6px;
  color: #627080;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
}

.task-row-actions a.primary {
  background: var(--green-soft);
  border-color: #cdebdc;
  color: var(--green-dark);
}

.task-row-actions .inline-edit-toggle {
  min-height: 22px;
  padding: 0 6px;
  border: 1px solid #cdebdc;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 900;
}

.task-inline-edit-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  border-bottom: 1px solid #eef2f4;
  background: #f9fcfb;
}

.task-inline-edit-row[hidden] {
  display: none;
}

.task-inline-edit-gutter {
  min-height: 100%;
}

.task-inline-edit-panel {
  padding: 14px 18px 16px 0;
}

.task-inline-edit-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) 140px 170px;
  gap: 12px;
}

.task-inline-edit-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.task-inline-edit-grid input,
.task-inline-edit-grid select {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #d8e2e6;
  border-radius: 6px;
  font-size: 13px;
}

.task-inline-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.task-table-empty {
  min-height: 44px;
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  color: var(--muted);
  border-bottom: 1px solid #eef2f4;
}

.task-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.task-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.task-side strong { font-size: 20px; }
.task-detail-head h1 { font-size: 24px; }
.big-score {
  display: block;
  margin-top: 10px;
  text-align: right;
  font-size: 26px;
  color: var(--purple);
}
.task-progress { justify-items: stretch; width: 100%; margin-top: 16px; }
.task-progress .bar { width: 100%; }
.compact-form .actions { justify-content: flex-start; }

.quick-task-shell {
  min-height: calc(100vh - 132px);
  display: grid;
  place-items: start center;
  padding: 14px 0 18px;
}
.quick-task-modal {
  width: min(760px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(31,42,55,.16);
  overflow: visible;
}
.quick-task-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.quick-task-head h2 { margin: 0; font-size: 18px; }
.quick-task-head a { font-size: 28px; line-height: 1; color: var(--muted); }
.quick-task-head a.return-button {
  color: #fff;
  font-size: 13px;
}
.task-title-input {
  border: 0;
  border-radius: 0;
  min-height: 88px;
  padding: 14px 18px 6px;
  font-size: 18px;
  line-height: 1.6;
}
.task-title-input:focus, .task-note-input:focus { outline: none; border-color: transparent; }
.task-assignee-line {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 18px 12px;
  flex-wrap: wrap;
}
.task-assignee-line label {
  display: grid;
  gap: 5px;
  min-width: 130px;
  font-weight: 800;
  color: #526070;
}
.task-assignee-line select { min-height: 34px; padding: 5px 8px; }
.task-assignee-line .person-picker {
  width: 210px;
}
.task-assignee-line .person-search-input {
  min-height: 34px;
  padding-top: 5px;
  padding-bottom: 5px;
}
.line-icon {
  color: var(--muted);
  font-size: 20px;
}
.quick-task-options {
  display: grid;
  grid-template-columns: 100px 124px minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 10px;
  padding: 0 18px 12px;
}
.quick-task-options label {
  display: grid;
  gap: 6px;
  font-weight: 800;
  color: #526070;
}
.quick-task-options input, .quick-task-options select {
  min-height: 34px;
  padding: 5px 8px;
}
.task-note-input {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  min-height: 68px;
  background: #fbfcfd;
  padding: 12px 18px;
}
.quick-task-foot {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 18px 14px;
}
.quick-task-foot span { color: var(--muted); font-weight: 800; }

.review-panel { border-color: #f2c991; background: #fffdf9; }
.review-panel .panel-title {
  align-items: center;
}
.review-panel .panel-title .button {
  min-height: 32px;
  padding: 0 10px;
}
.score-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.score-grid label {
  cursor: pointer;
}
.score-grid input { display: none; }
.score-grid span {
  display: grid;
  place-items: center;
  height: 36px;
  border-radius: 6px;
  border: 1px solid #d7dee4;
  background: #fff;
  font-weight: 900;
}
.score-grid input:checked + span {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.timeline { display: grid; gap: 10px; }
.timeline-item {
  border-left: 3px solid var(--green);
  padding: 4px 0 4px 12px;
}
.timeline-item p { margin: 6px 0; color: #4a5565; }
.timeline-item small { color: var(--muted); }

.todo-panel {
  display: grid;
  gap: 8px;
}

.todo-log-list {
  display: grid;
  gap: 8px;
}

.todo-log {
  display: grid;
  grid-template-columns: 72px minmax(140px, .7fr) minmax(180px, 1fr) minmax(112px, auto);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.todo-log.failed {
  border-color: #ffd1c9;
  background: #fffafa;
}

.todo-log strong {
  font-size: 14px;
}

.todo-log small {
  color: var(--muted);
}

.notice-state {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef3f6;
  color: #647181;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.notice-state.sent {
  background: var(--green-soft);
  color: var(--green-dark);
}

.notice-state.failed {
  background: #fff1ef;
  color: var(--red);
}

.todo-log p {
  grid-column: 2 / -1;
  margin: -2px 0 0;
  color: var(--red);
  line-height: 1.5;
}

.comments { display: grid; gap: 10px; }
.comment {
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.comment p { margin: 6px 0; line-height: 1.6; }
.comment small { color: var(--muted); }
.comment-form {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  position: relative;
}
.comment-form-main {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.comment-form-main textarea {
  width: 100%;
  min-height: 86px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
  font: inherit;
}
.comment-form-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.comment-form-foot button {
  min-width: 72px;
}
.comment-mention-popover {
  position: absolute;
  left: 0;
  top: calc(100% - 54px);
  width: min(320px, 100%);
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid #d8e1e8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  z-index: 20;
}
.comment-mention-popover[hidden] {
  display: none;
}
.comment-mention-option {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.comment-mention-option:hover {
  background: #f5f8fb;
}
.comment-mention-option strong {
  font-size: 13px;
}
.comment-mention-option span {
  color: var(--muted);
  font-size: 12px;
}

.alignment-panel h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.alignment-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.alignment-list {
  display: grid;
  gap: 8px;
}

.alignment-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 110px auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 12px;
}

.alignment-item p {
  margin: 6px 0 0;
  color: #5e6978;
  line-height: 1.5;
}

.align-arrow {
  display: grid;
  place-items: center;
  height: 28px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 900;
}

.alignment-map {
  display: grid;
  gap: 12px;
}

.map-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.map-node {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 14px;
  min-height: 72px;
  display: grid;
  gap: 6px;
}

.map-node strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-node small {
  color: var(--muted);
}

.map-node.source {
  border-left: 4px solid var(--blue);
}

.map-node.target {
  border-left: 4px solid var(--green);
}

.map-line {
  display: grid;
  place-items: center;
  min-height: 32px;
  border-radius: 999px;
  background: #eef3f6;
  color: #526070;
  font-weight: 900;
}

.setting-list {
  display: grid;
  grid-template-columns: minmax(110px, max-content) minmax(90px, max-content);
  gap: 10px 16px;
  justify-content: start;
}
.setting-list span { color: var(--muted); }
.setting-list strong { color: var(--green-dark); }

table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  border-bottom: 1px solid var(--line);
  padding: 11px 8px;
  text-align: left;
  vertical-align: middle;
}
th { color: #526070; background: #f7fafb; }
td form { margin: 0; }
td small, .subtext {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}
.person-cell strong {
  display: block;
  margin-bottom: 4px;
}
.users-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}
.users-search {
  display: flex;
  align-items: end;
  gap: 8px;
  margin: 0;
  flex-wrap: wrap;
}
.users-search label {
  display: grid;
  gap: 5px;
  color: #526070;
  font-size: 12px;
  font-weight: 800;
}
.users-search input[type="search"] {
  width: min(360px, 52vw);
  min-height: 34px;
  padding: 6px 10px;
}
.users-search button,
.users-search .button {
  min-height: 34px;
  padding: 0 12px;
}
.users-toolbar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.users-permission-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.users-batch-form { margin: 0; }
.users-save-bar {
  position: sticky;
  right: 0;
  bottom: 12px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: -2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 30px rgba(31,42,55,.12);
}
.save-state {
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 900;
}
.save-state.error { color: #c93f32; }
.config-grid {
  display: grid;
  grid-template-columns: 112px minmax(150px, 1fr) 88px minmax(310px, 1.2fr);
  gap: 8px;
  align-items: end;
}
.config-grid label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #526070;
}
.config-grid select {
  min-height: 32px;
  padding: 4px 8px;
}
.config-grid .person-search-input {
  min-height: 32px;
  padding-top: 4px;
  padding-bottom: 4px;
  font-size: 13px;
}
.config-grid .person-option-list {
  max-height: 220px;
}
.config-grid .person-option {
  min-height: 31px;
  padding: 6px 8px;
}
.permission-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  align-self: end;
  min-height: 32px;
}
.config-grid .permission-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 2px 7px;
  border: 1px solid #dfe7ea;
  border-radius: 6px;
  background: #f8fbfa;
  color: #526070;
  white-space: nowrap;
  line-height: 1;
}
.permission-check input {
  width: 14px;
  height: 14px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--green);
}
.permission-grid .permission-check span {
  font-size: 12px;
}
.mini { min-height: 28px; padding: 0 9px; font-size: 12px; }
.inline-delete-form {
  display: inline-flex;
  margin: 0;
}
.task-row-actions .inline-delete-form {
  display: inline-flex;
}
.task-row-actions button {
  min-height: 22px;
  padding: 0 5px;
  border-radius: 6px;
  font-size: 12px;
}

.quick-context-menu {
  position: fixed;
  z-index: 1200;
  display: grid;
  gap: 6px;
  min-width: 168px;
  padding: 8px;
  border: 1px solid #d7e0e5;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 28px rgba(19, 28, 34, 0.16);
}
.quick-context-menu.hidden { display: none; }
.quick-context-menu button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #dfe7ea;
  border-radius: 6px;
  background: #fff;
  color: #334150;
  text-align: left;
  font-weight: 800;
}
.quick-context-menu button.primary {
  background: var(--green-soft);
  border-color: #cdebdc;
  color: var(--green-dark);
}

.notice { display: grid; gap: 14px; }
.notice.danger { border-color: #ffc9c1; background: #fff7f5; }
.notice.success { border-color: #bfe7d2; background: #f3fbf6; color: var(--green-dark); }

.sync-form { margin-top: 16px; }

.objective-update-layout {
  grid-template-columns: minmax(320px, .85fr) minmax(520px, 1.15fr);
  align-items: start;
}

.objective-progress-shell {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}
.objective-progress-form {
  width: min(720px, 100%);
  margin: 0;
}

.modal-open {
  overflow: hidden;
}

.okr-modal.hidden {
  display: none;
}

.okr-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
}

.okr-modal-mask {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(22, 31, 42, .42);
  backdrop-filter: blur(2px);
}

.okr-modal-panel {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 48px));
  height: min(680px, calc(100vh - 48px));
  background: #fff;
  border: 1px solid #dfe7ea;
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(31, 42, 55, .24);
  overflow: hidden;
}
.okr-modal.compact-modal .okr-modal-panel {
  width: min(760px, calc(100vw - 48px));
  height: min(520px, calc(100vh - 48px));
}

.okr-modal.task-modal .okr-modal-panel {
  width: min(760px, calc(100vw - 48px));
  height: min(620px, calc(100vh - 48px));
}

.okr-modal.task-detail-modal .okr-modal-panel {
  width: min(980px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 48px));
}

.okr-modal.objective-modal .okr-modal-panel {
  width: min(820px, calc(100vw - 48px));
  height: min(640px, calc(100vh - 48px));
}

.okr-modal-close {
  position: absolute;
  right: 10px;
  top: 8px;
  z-index: 2;
  min-width: 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7c8794;
  font-size: 23px;
  line-height: 1;
}

.okr-modal-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #f4f7f8;
}

.modal-body {
  margin: 0;
  background: #f4f7f8;
}

.modal-content-inner {
  width: 100%;
  min-height: 100vh;
  padding: 10px 12px 14px;
}

.modal-body .modal-content-inner {
  min-height: auto;
}

.modal-content-inner .page-head {
  padding-right: 42px;
}

.modal-content-inner .quick-task-shell {
  min-height: auto;
  padding-top: 0;
  place-items: start stretch;
}

.modal-content-inner .quick-task-modal {
  width: 100%;
  box-shadow: none;
  overflow: visible;
}

.modal-content-inner .task-title-input {
  min-height: 72px;
  font-size: 17px;
}

.modal-content-inner .task-note-input {
  min-height: 56px;
}

.modal-content-inner .quick-tag-line {
  padding: 0 12px 8px;
}

.modal-content-inner .attachment-upload-block {
  gap: 8px;
  margin: 0 12px 10px;
  padding: 10px;
}

.modal-content-inner .attachment-upload-note {
  font-size: 12px;
  line-height: 1.45;
}

.modal-content-inner .attachment-picker {
  min-height: 40px;
}

.modal-content-inner .attachment-pick-btn,
.modal-content-inner .attachment-clear {
  height: 38px;
}

.modal-content-inner .panel {
  box-shadow: none;
}

.priority-chip, .tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.priority-urgent { background: #fff1ef; color: #c93f32; }
.priority-high { background: #fff3e2; color: #c76c15; }
.priority-medium { background: #e8f2ff; color: #2277d6; }
.priority-low { background: #eef3f6; color: #647181; }

.tag-list {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.tag-chip {
  background: #eef8f3;
  border: 1px solid #cdebdc;
  color: var(--green-dark);
}

.tag-chip.tag-emphasis,
.tag-token.tag-emphasis {
  background: #fff1ef;
  border-color: #f3b0a8;
  color: var(--red);
}

.tag-field {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
  position: relative;
}

.tag-quick-form {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  position: relative;
  vertical-align: middle;
  flex: 0 0 auto;
  white-space: nowrap;
}

.tag-field-quick {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  min-height: 24px;
  gap: 5px;
  white-space: nowrap;
}

.tag-field-title {
  color: #526070;
  font-size: 13px;
  font-weight: 900;
}

.tag-selected,
.tag-chip-box {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}

.tag-selected {
  min-height: 28px;
  position: relative;
}

.tag-token {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid #cdebdc;
  border-radius: 999px;
  background: #eef8f3;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.tag-token b {
  color: #7da28f;
  font-size: 13px;
  line-height: 1;
}

.tag-token:disabled b {
  display: none;
}

.attachment-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attachment-input input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.attachment-upload-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafcfd;
}

.attachment-upload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
}

.attachment-upload-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.attachment-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  position: relative;
  border: 1px solid #b7d7f7;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  min-height: 50px;
  cursor: pointer;
}

.attachment-pick-btn,
.attachment-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 106px;
  height: 48px;
  border: 0;
  border-right: 1px solid #b7d7f7;
  background: #f8fbff;
  color: var(--ink);
  font-weight: 800;
}

.attachment-clear {
  justify-self: start;
  border-radius: 6px;
  padding: 0 14px;
}

.attachment-picker input[type="file"],
.attachment-upload-block .attachment-picker input[data-attachment-input] {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: auto;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: pointer;
  z-index: 2;
}

.attachment-picker-text {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 14px;
  color: var(--muted);
}

.attachment-grid-mini {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.attachment-card-mini {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.attachment-mini-preview {
  display: grid;
  place-items: center;
  min-height: 90px;
  border-radius: 4px;
  background: #f7fafb;
}

.attachment-mini-preview img {
  max-width: 100%;
  max-height: 70px;
  object-fit: cover;
}

.attachment-mini-name {
  font-size: 13px;
  color: var(--ink);
  word-break: break-all;
}

.attachment-remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 0 6px 0 6px;
  background: #e84554;
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

.attachment-remove:disabled {
  display: none;
}

.attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.attachment-card {
  display: grid;
  gap: 8px;
}

.attachment-preview {
  display: grid;
  place-items: center;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #f7fafb;
}

.attachment-preview img,
.attachment-preview object {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
}

.attachment-preview object {
  min-height: 150px;
}

.attachment-preview strong,
.attachment-preview span {
  display: block;
  text-align: center;
}

.attachment-meta {
  display: grid;
  gap: 2px;
}

.attachment-meta strong {
  font-size: 13px;
  line-height: 1.4;
  word-break: break-all;
}

.attachment-meta span {
  color: var(--muted);
  font-size: 12px;
}

.tag-choice-list {
  display: flex;
  align-items: center;
  position: relative;
}

.tag-plus {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 1px dashed #b9d4c4;
  border-radius: 50%;
  background: #fff;
  color: var(--green-dark);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
}

.tag-popover {
  position: fixed;
  z-index: 130;
  display: grid;
  gap: 6px;
  min-width: 180px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(31,42,55,.18);
}

.tag-option {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #d7eadf;
  background: #f5faf7;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.tag-popover em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.tag-popover[hidden] {
  display: none !important;
}

.tag-save-state {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tag-table input {
  min-height: 34px;
  max-width: 420px;
}

.tag-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.tag-edit-form {
  margin: 0;
}

.quick-tag-line {
  display: flex;
  padding: 0 14px 8px;
}

.content {
  padding-top: 10px;
}

button, .button {
  min-height: 32px;
  padding: 0 12px;
}

.panel {
  padding: 12px;
  margin-bottom: 8px;
}

.page-head {
  margin-bottom: 8px;
}

.page-head h1 {
  font-size: 20px;
}

.panel-title {
  margin-bottom: 9px;
}

.panel-title h2 {
  font-size: 16px;
}

.metric-grid,
.grid,
.objective-list,
.task-card-list {
  gap: 10px;
}

.metric-grid {
  margin-bottom: 10px;
}

.metric-card {
  padding: 14px;
  gap: 5px;
}

.metric-card strong {
  font-size: 28px;
}

.tabs {
  padding: 4px;
  margin-bottom: 8px;
}

.tabs a {
  min-height: 28px;
  padding: 0 12px;
}

input, select, textarea {
  min-height: 34px;
  padding: 6px 9px;
}

.form {
  gap: 10px;
}

.form label {
  gap: 5px;
}

.form-grid {
  gap: 10px;
}

.objective-meta-grid {
  grid-template-columns: 180px 112px 128px 128px;
  justify-content: start;
}

.objective-card {
  padding: 10px 12px;
}

.okr-tree-header {
  min-height: 30px;
}

.okr-tree-objective-row,
.okr-tree-kr-row {
  min-height: 46px;
  padding-top: 5px;
  padding-bottom: 5px;
}

.okr-tree-edit-row {
  grid-template-columns: 118px minmax(240px, 1.15fr) 128px 128px 128px minmax(220px, .85fr);
  gap: 8px;
  padding: 9px 12px 8px 10px;
}

.objective-card-kr-edit {
  grid-template-columns: 118px minmax(240px, 1.15fr) 128px 108px 110px minmax(220px, .85fr);
}

.objective-card-profile-edit {
  grid-template-columns: 118px minmax(260px, 1fr) 120px 138px 138px minmax(180px, .65fr);
  align-items: end;
  min-height: 56px;
}

.okr-tree-kr-row {
  min-height: 42px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.tree-gutter {
  gap: 4px;
  min-height: 34px;
}

.okr-tree-above {
  margin-bottom: 4px;
}

.okr-tree-main h2,
.okr-tree-main h3 {
  margin-bottom: 4px;
}

.okr-tree-main h2 {
  font-size: 16px;
}

.okr-tree-main h3 {
  font-size: 14px;
}

.okr-tree-main h3 small,
.okr-tree-main p,
.objective-title p,
.task-name small {
  font-size: 12px;
}

.okr-tree-main p,
.objective-title p,
.task-detail-head p,
.task-name small {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.type-pill {
  min-height: 20px;
  padding: 0 7px;
  border-radius: 6px;
}

.o-badge,
.kr-badge {
  height: 24px;
}

.o-badge {
  min-width: 34px;
  padding: 0 7px;
  font-size: 13px;
}

.kr-badge {
  width: 36px;
  font-size: 12px;
}

.okr-tree-progress .bar {
  width: 88px;
  height: 7px;
}

.okr-tree-actions {
  gap: 8px;
}

.objective-title h2,
.task-card h2,
.task-detail h1 {
  margin-bottom: 5px;
  font-size: 17px;
}

.kr-row {
  min-height: 42px;
}

.kr-list,
.kr-detail-list {
  margin-top: 10px;
  gap: 5px;
}

.kr-editor,
.kr-manage-list,
.timeline,
.comments {
  gap: 8px;
}

.kr-input-row,
.kr-manage-row {
  gap: 8px;
}

.kr-input-row {
  grid-template-columns: 44px minmax(220px, 1fr) 132px minmax(140px, .52fr);
}

.kr-manage-row {
  grid-template-columns: 44px minmax(220px, 1fr) 132px 76px minmax(140px, .55fr) 62px;
  padding: 10px;
}

.kr-manage-row input {
  min-height: 30px;
  padding: 4px 7px;
}

.task-filter-row {
  padding: 8px 10px;
  margin-bottom: 10px;
}

.filter-chip {
  min-height: 28px;
  padding: 0 11px;
}

.task-stats-bar {
  min-height: 42px;
  padding: 0 14px;
  gap: 12px;
}

.task-table-head,
.task-table-row,
.task-stage-row {
  grid-template-columns: 36px minmax(0, 1.55fr) minmax(112px, .68fr) 108px minmax(150px, .95fr) minmax(136px, .78fr) 88px;
}

.task-table-head {
  min-height: 34px;
}

.task-stage-row {
  min-height: 34px;
  grid-template-columns: 40px minmax(0, 1fr) 66px;
}

.task-stage-row strong {
  font-size: 14px;
}

.task-table-row {
  min-height: 48px;
}

.task-table-row .row-index,
.task-name {
  min-height: 48px;
}

.task-table-row > span,
.task-name {
  padding-left: 8px;
  padding-right: 8px;
}

.owner-cell b {
  width: 20px;
  height: 20px;
}

.progress-pill,
.relation-pill,
.score-chip,
.status {
  min-height: 18px;
  padding: 0 6px;
  font-size: 11px;
}

.task-progress-cell strong {
  font-size: 14px;
}

.mini-bar {
  width: 88px;
  height: 5px;
}

.task-row-actions a,
.task-row-actions button {
  width: 42px;
  min-width: 42px;
  min-height: 22px;
  padding: 0 5px;
}

.quick-task-shell {
  min-height: calc(100vh - 132px);
  padding: 12px 0 16px;
}

.quick-task-modal {
  width: min(760px, 100%);
}

.quick-task-head {
  padding: 12px 16px;
}

.quick-task-head h2 {
  font-size: 16px;
}

.task-title-input {
  min-height: 84px;
  padding: 12px 16px 4px;
  font-size: 17px;
  line-height: 1.5;
}

.task-assignee-line {
  padding: 5px 16px 8px;
}

.quick-task-options {
  grid-template-columns: 100px 124px minmax(160px, 1fr) minmax(160px, 1fr);
  gap: 8px;
  padding: 0 16px 8px;
}

.quick-task-options input,
.quick-task-options select,
.task-assignee-line select {
  min-height: 30px;
  padding: 4px 7px;
}

.task-note-input {
  min-height: 60px;
  padding: 8px 16px;
}

.quick-task-foot {
  padding: 8px 16px;
}

@media (max-width: 960px) {
  :root { --rail: 58px; }
  .login-shell { grid-template-columns: 1fr; }
  .login-copy { min-height: 300px; padding: 30px; }
  .login-copy h1 { font-size: 38px; }
  .login-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-copy-foot { align-items: flex-start; flex-direction: column; }
  .metric-grid, .workbench-grid, .grid.two, .form-grid { grid-template-columns: 1fr; }
  .content { width: calc(100vw - var(--rail) - 24px); }
  .objective-head, .task-detail-head, .page-head, .task-card { flex-direction: column; }
  .task-workbench-head { align-items: stretch; flex-direction: column; }
  .report-filter-line {
    grid-template-columns: 1fr;
  }
  .report-search {
    align-items: stretch;
    flex-direction: column;
  }
  .report-search .person-picker,
  .report-search input[type="date"],
  .report-search select,
  .report-query-button {
    width: 100%;
    min-width: 0;
  }
  .task-search { width: 100%; }
  .list-filter-form {
    grid-template-columns: 1fr;
  }
  .date-range-inline {
    grid-template-columns: 1fr 18px 1fr;
  }
  .task-table-wrap { overflow: hidden; }
  .task-stats-bar { min-height: auto; padding: 12px 14px; flex-wrap: wrap; gap: 10px; }
  .task-table-head { display: none; }
  .task-stage-row {
    grid-template-columns: 42px minmax(0, 1fr) 72px;
    min-height: 44px;
  }
  .task-stage-row small { padding-right: 14px; }
  .task-table-row {
    grid-template-columns: 42px minmax(0, 1fr);
    min-height: 0;
    align-items: start;
    padding: 12px 12px 12px 0;
  }
  .task-inline-edit-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .task-inline-edit-panel {
    padding: 0 12px 14px 0;
  }
  .task-inline-edit-grid {
    grid-template-columns: 1fr;
  }
  .task-inline-edit-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .task-table-row .row-index {
    min-height: 36px;
    grid-row: 1 / span 5;
    padding-top: 4px;
  }
  .task-name {
    min-height: 0;
    padding: 0;
    align-items: flex-start;
  }
  .owner-cell, .task-progress-cell, .latest-cell, .relation-cell, .task-row-actions {
    grid-column: 2;
    height: auto !important;
    padding: 8px 0 0 !important;
  }
  .owner-cell {
    align-items: flex-start;
  }
  .task-progress-cell {
    align-items: flex-start;
  }
  .latest-cell {
    border-top: 1px dashed #edf2f4;
    margin-top: 8px;
  }
  .relation-cell small {
    margin-left: 0;
  }
  .task-row-actions {
    justify-content: flex-start;
  }
  .task-table-empty {
    grid-template-columns: 42px 1fr;
  }
  .okr-tree-edit-row {
    grid-template-columns: 120px minmax(240px, 1.15fr) 132px 128px 128px minmax(220px, .85fr);
    min-width: 980px;
  }
  .objective-card-kr-edit {
    grid-template-columns: 120px minmax(240px, 1.15fr) 132px 112px 112px minmax(220px, .85fr);
  }
  .okr-tree-card { overflow-x: visible; overflow-y: visible; width: 100%; max-width: 100%; }
  .objective-progress { justify-items: stretch; width: 100%; }
  .objective-progress .bar,
  .kr-progress .bar,
  .progress-mini .bar { width: 100%; }
  .kr-row { grid-template-columns: 46px minmax(0, 1fr); }
  .kr-progress { grid-column: 2; justify-content: flex-start; }
  .kr-input-row { grid-template-columns: 44px minmax(0, 1fr); }
  .kr-input-row input { grid-column: 2; }
  .kr-manage-row { grid-template-columns: 44px minmax(0, 1fr); }
  .kr-manage-row label, .kr-manage-row .row-actions { grid-column: 2; }
  .alignment-columns, .map-row { grid-template-columns: 1fr; }
  .alignment-item { grid-template-columns: 34px minmax(0, 1fr); }
  .alignment-item .progress-mini, .alignment-item form { grid-column: 2; justify-self: start; }
  .progress-control { grid-template-columns: 1fr; }
  .score-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .users-toolbar { align-items: stretch; flex-direction: column; }
  .users-search { align-items: stretch; }
  .users-search input[type="search"] { width: 100%; }
  .users-toolbar-meta { align-items: flex-start; flex-direction: column; }
  .users-save-bar { justify-content: stretch; flex-direction: column; align-items: stretch; }
  .config-grid { grid-template-columns: 1fr; }
  .quick-task-options { grid-template-columns: 1fr; }
  .quick-task-foot { align-items: stretch; flex-direction: column; }
}

@media (min-width: 520px) and (max-width: 960px) {
  .modal-body .form-grid {
    grid-template-columns: repeat(3, max-content);
    justify-content: start;
  }
  .modal-body .objective-meta-grid {
    grid-template-columns: 180px 112px 128px 128px;
  }
  .modal-body .objective-progress-shell {
    padding: 0 12px 8px;
  }
  .modal-body .objective-progress-form {
    width: min(640px, 100%);
  }
  .modal-body .kr-add-grid {
    grid-template-columns: minmax(220px, 1fr) 132px 76px;
  }
  .modal-body .task-update-grid {
    grid-template-columns: 112px 148px;
  }
  .modal-body .kr-input-row {
    grid-template-columns: 44px minmax(180px, 1fr) 132px minmax(110px, .42fr);
  }
  .modal-body .kr-input-row input {
    grid-column: auto;
  }
  .modal-body .kr-manage-row {
    grid-template-columns: 44px minmax(220px, 1fr) 132px 76px minmax(120px, .48fr) 62px;
  }
  .modal-body .kr-manage-row label,
  .modal-body .kr-manage-row .row-actions {
    grid-column: auto;
  }
  .modal-body .alignment-field-grid {
    grid-template-columns: minmax(260px, 1fr) minmax(180px, .75fr);
  }
  .modal-body .progress-control {
    grid-template-columns: minmax(180px, 1fr) 96px;
  }
  .modal-body .quick-task-options {
    grid-template-columns: 100px 124px minmax(160px, 1fr) minmax(160px, 1fr);
  }
  .modal-body .quick-task-foot {
    align-items: center;
    flex-direction: row;
  }
  .modal-body .config-grid {
    grid-template-columns: 112px minmax(150px, 1fr) 88px;
  }
}

@media (min-width: 961px) {
  .modal-body .objective-progress-shell {
    padding: 0 24px 12px;
  }
  .modal-body .quick-task-shell {
    padding: 10px 12px 14px;
  }
  .modal-body .quick-task-modal {
    width: min(700px, 100%);
  }
}
