:root {
  --ink: #3f4850;
  --muted: #7f898d;
  --line: #e4e5df;
  --soft: #f6f6f2;
  --accent: #7894a3;
  --accent-dark: #5f7d8d;
  --accent-soft: #e7eef0;
  --blue: #718f9f;
  --blue-soft: #e7eef1;
  --green: #7f9889;
  --green-soft: #e9efea;
  --yellow: #b29a62;
  --yellow-soft: #f3edda;
  --purple: #8d8497;
  --purple-soft: #eeeaf0;
  --shadow: 0 14px 34px rgba(67, 78, 82, 0.09);
  --shadow-soft: 0 6px 18px rgba(67, 78, 82, 0.06);
  --card: #fff;
  --text: var(--ink);
  --font-family-base: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-xs: 10px;
  --font-sm: 12px;
  --font-md: 13px;
  --font-base: 14px;
  --font-lg: 16px;
  --font-xl: 20px;
  --font-2xl: 28px;
  --weight-regular: 400;
  --weight-medium: 560;
  --weight-semibold: 650;
  --weight-bold: 760;
  --weight-heavy: 800;
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;
  --radius-control: 12px;
  --radius-card: 16px;
  --color-bg: #f7f7f3;
  --color-card: #fff;
  --color-card-soft: #fbfbf8;
  --color-border: var(--line);
  --color-border-strong: #aebec5;
  --color-text: var(--ink);
  --color-muted: var(--muted);
  --color-primary: var(--accent);
  --color-primary-hover: var(--accent-dark);
  --color-primary-soft: var(--accent-soft);
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 999px;
  --shadow-xs: 0 1px 4px rgba(32, 39, 50, 0.05);
  --shadow-sm: 0 4px 14px rgba(60, 74, 84, 0.06);
  --shadow-md: 0 10px 24px rgba(62, 77, 84, 0.09);
  --shadow-lg: var(--shadow);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-bg);
  font-family: var(--font-family-base);
  font-size: var(--font-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: var(--space-6) var(--space-4) var(--space-4);
  border-right: 1px solid var(--color-border);
  background: var(--color-card);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px 25px;
}

.brand-mark {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border-radius: 12px 12px 12px 4px;
  color: #fff;
  background: var(--accent);
  font-size: var(--font-xl);
  font-weight: var(--weight-heavy);
  box-shadow: 0 7px 18px rgba(95, 125, 141, 0.24);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: var(--font-lg);
  font-weight: var(--weight-bold);
}

.brand span {
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--font-sm);
}

nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 25px 1fr auto;
  align-items: center;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  color: #68757b;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--color-card-soft);
}

.nav-item:focus-visible {
  outline: 2px solid var(--color-border-strong);
  outline-offset: 2px;
}

.nav-item.active {
  color: var(--color-primary-hover);
  background: var(--color-primary-soft);
  font-weight: var(--weight-semibold);
}

.nav-item > span {
  font-size: var(--font-lg);
  text-align: center;
}

.nav-item small {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 10px;
  color: #768286;
  background: #eceeea;
  font-size: 10px;
  text-align: center;
}

.nav-item small.danger {
  color: #9d8249;
  background: #f4ecd5;
}

.nav-item i,
.icon-btn i {
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--accent);
}

.sidebar-foot {
  margin-top: auto;
}

.team-card {
  position: relative;
  margin-top: 10px;
  padding: 10px 4px 2px;
  border-top: 1px solid var(--line);
}

.profile-trigger {
  display: flex;
  position: static;
  align-items: center;
  width: 100%;
  min-height: 44px;
  gap: 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  padding: 6px 8px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

.profile-trigger:hover,
.profile-trigger[aria-expanded="true"] { background: var(--color-card-soft); }
.profile-trigger:focus-visible { outline: 2px solid var(--color-border-strong); outline-offset: 2px; }
.profile-trigger:active { transform: scale(0.98); }
.profile-trigger .avatar { width: 32px; height: 32px; border-radius: 10px; font-size: 12px; }
.profile-copy { display: block; min-width: 0; flex: 1; }
.profile-copy strong, .profile-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { font-size: var(--font-md); line-height: 17px; font-weight: var(--weight-semibold); }
.profile-copy small { margin-top: 1px; color: var(--muted); font-size: var(--font-xs); line-height: 14px; }
.profile-chevron { display: grid; width: 20px; height: 20px; place-items: center; color: var(--muted); font-size: 15px; line-height: 1; transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1); }
.profile-trigger[aria-expanded="true"] .profile-chevron { transform: rotate(180deg); }

.profile-menu {
  position: absolute;
  right: 4px;
  bottom: calc(100% + 6px);
  left: 4px;
  z-index: 20;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 12px 28px rgba(45, 61, 69, 0.12), 0 2px 5px rgba(45, 61, 69, 0.04);
  transform-origin: bottom center;
}
.profile-menu p { margin: 2px 3px 7px; color: var(--muted); font-size: var(--font-xs); font-weight: var(--weight-semibold); letter-spacing: .02em; }
.profile-menu-identity { display: block; margin: 0 3px 9px; color: var(--text); font-size: var(--font-md); font-weight: var(--weight-semibold); }
.team-card .profile-menu select { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: var(--radius-xs); background: #fff; padding: 5px 8px; font-size: var(--font-sm); }
.team-card .profile-menu button { position: static; width: 100%; height: 32px; margin-top: 6px; border: 0; border-radius: var(--radius-xs); background: var(--accent); color: #fff; padding: 5px 8px; font-size: var(--font-sm); font-weight: var(--weight-semibold); transition: background-color 140ms ease, transform 140ms cubic-bezier(0.23, 1, 0.32, 1); }
.team-card .profile-menu button:hover { filter: brightness(0.97); }
.team-card .profile-menu button:active { transform: scale(0.98); }
.team-card .profile-menu button[disabled] { opacity: 0.5; cursor: default; }
.team-card .profile-menu [data-auth-logout] { border: 1px solid var(--line); background: #fff; color: var(--text); }
.team-card .profile-menu [data-auth-logout]:hover { background: #f7f8f7; }

.avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 11px;
  color: #596267;
  background: #e4e6e3;
  font-size: 12px;
  font-weight: 700;
}

.avatar.coral,
.avatar.blue,
.avatar.green,
.avatar.purple {
  color: #596267;
  background: #e4e6e3;
}

.auth-screen { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: #f7f7f4; }
.auth-card { width: min(420px, 100%); padding: 32px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 18px 50px rgba(44, 57, 63, .1); }
.auth-card .brand-mark { margin-bottom: 22px; }
.auth-card h1 { margin: 6px 0 8px; font-size: 25px; }
.auth-card > p:not(.eyebrow) { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.auth-card form { display: grid; gap: 14px; }
.auth-card label { display: grid; gap: 6px; color: var(--text); font-size: 13px; font-weight: 600; }
.auth-card input { height: 40px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; }
.auth-card .primary-btn { margin-top: 4px; min-height: 40px; }
.auth-card .primary-btn[disabled] { cursor: wait; opacity: .72; }
.auth-form-feedback { margin: 0; padding: 9px 10px; border: 1px solid #efc5c1; border-radius: 8px; color: #a4423d; background: #fff6f5; font-size: 13px; line-height: 1.45; }

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 69px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(420px, 42vw);
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #879195;
  background: #f0f1ed;
}

.search:focus-within {
  border-color: #9fb4bd;
  background: #fff;
}

.search input {
  width: 100%;
  margin: 0 8px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.global-search-panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + 10px);
  left: 0;
  width: min(620px, calc(100vw - 300px));
  max-height: min(560px, calc(100vh - 110px));
  overflow: auto;
  padding: 6px;
  border: 1px solid #dfe3df;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 46px rgba(50, 59, 57, 0.14), 0 2px 8px rgba(50, 59, 57, 0.06);
  color: var(--ink);
  backdrop-filter: blur(14px);
}

.global-search-state {
  padding: 24px 18px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.global-search-result {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.global-search-result:hover,
.global-search-result.is-active,
.global-search-result:focus-visible {
  outline: 0;
  background: #eef2f2;
}

.global-search-kind {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #e7ebea;
  color: #5f6b6f;
  font-size: 12px;
  font-weight: 700;
}

.global-search-copy {
  min-width: 0;
}

.global-search-copy strong,
.global-search-copy span,
.global-search-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-copy strong {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 13px;
}

.global-search-copy span {
  color: #6f7b7f;
  font-size: 12px;
}

.global-search-copy small {
  margin-top: 3px;
  color: #9aa3a5;
  font-size: 11px;
}

.global-search-status {
  max-width: 96px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f3f4ef;
  color: #768083;
  font-size: 10px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .global-search-panel {
    position: fixed;
    top: 62px;
    right: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100vh - 78px);
  }
}

kbd {
  padding: 2px 6px;
  border: 1px solid #dfe3e8;
  border-radius: 5px;
  color: #8e97a4;
  background: #fff;
  font-size: 10px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.icon-btn,
.primary-btn,
.secondary-btn,
.close-btn {
  border: 0;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.icon-btn {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--soft);
}

.icon-btn i {
  position: absolute;
  top: 6px;
  right: 6px;
}

.primary-btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  color: #fff;
  background: var(--color-primary);
  font-size: var(--font-base);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  box-shadow: none;
}

.primary-btn:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-xs);
}

.secondary-btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card);
  font-size: var(--font-base);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
}

.secondary-btn:hover {
  border-color: var(--color-border-strong);
  background: var(--color-card-soft);
}

.secondary-btn.danger-light {
  border-color: rgba(177, 91, 84, 0.35);
  color: #9d4540;
  background: rgba(177, 91, 84, 0.06);
}

.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.text-btn:focus-visible,
.icon-btn:focus-visible,
.close-btn:focus-visible,
.filter-popover summary:focus-visible,
.saved-view-menu summary:focus-visible,
.view-tabs button:focus-visible,
.saved-view-chip:focus-visible {
  outline: 3px solid rgba(113, 143, 159, 0.22);
  outline-offset: 2px;
}

.primary-btn:disabled,
.secondary-btn:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.danger-btn {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid #e2a2a0;
  border-radius: 10px;
  color: #9d4540;
  background: #fff5f2;
  cursor: pointer;
  font-weight: 650;
}

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-8) 52px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.page-heading .page-create {
  flex: 0 0 auto;
  white-space: nowrap;
}

.page-heading > .secondary-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.project-page-heading {
  align-items: flex-start;
}

.project-page-heading > :first-child,
.project-page-edit-form {
  min-width: 0;
  flex: 1 1 auto;
}

.project-page-title {
  justify-content: flex-start;
}

.project-page-title button {
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  background: transparent;
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease, transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

.project-page-title button:focus-visible {
  border-color: var(--accent);
  outline: 2px solid rgba(113, 143, 159, 0.18);
  outline-offset: 2px;
}

.project-page-title button:active {
  transform: scale(0.97);
}

.project-page-edit-form {
  gap: var(--space-2);
}

.project-edit-form .project-page-title-input {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  font-size: var(--font-xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  outline: none;
}

.project-edit-form .project-page-description-input {
  min-height: 88px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-muted);
  font-size: var(--font-sm);
  line-height: var(--leading-relaxed);
  outline: none;
  resize: vertical;
}

.project-edit-form .project-page-title-input:focus,
.project-edit-form .project-page-description-input:focus {
  box-shadow: inset 2px 0 0 var(--accent);
  padding-left: var(--space-3);
}

.project-page-edit-form .form-actions {
  align-items: center;
  padding-top: var(--space-2);
}

@media (hover: hover) and (pointer: fine) {
  .project-page-title button:hover {
    color: var(--color-text);
    border-color: var(--color-border);
    background: var(--color-card-soft);
  }
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent-dark);
  font-size: var(--font-sm);
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 7px;
  font-size: var(--font-2xl);
  line-height: var(--leading-tight);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-base);
  line-height: var(--leading-normal);
}

.date-chip {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: #6f7b80;
  background: var(--color-card);
  font-size: var(--font-sm);
  line-height: 1;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 25px;
}

.metric-card {
  padding: 17px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card);
  box-shadow: none;
}

.metric-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.metric-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 9px;
  font-weight: 700;
}

.metric-icon.coral-bg {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.metric-icon.blue-bg {
  color: var(--blue);
  background: var(--blue-soft);
}

.metric-icon.green-bg {
  color: var(--green);
  background: var(--green-soft);
}

.metric-icon.yellow-bg {
  color: var(--yellow);
  background: var(--yellow-soft);
}

.metric-card strong {
  display: block;
  margin: 15px 0 3px;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.metric-card small {
  color: var(--muted);
  font-size: 10px;
}

.metric-card small em {
  color: var(--green);
  font-style: normal;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 18px;
}

.panel {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card);
  box-shadow: none;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 19px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: var(--font-lg);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--color-muted);
  font-size: var(--font-sm);
}

.subtle-head {
  align-items: flex-start;
  background: var(--color-card-soft);
}

.subtle-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: var(--font-sm);
}

.message-panel {
  margin-bottom: 16px;
}

.message-overview {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-5) 0 var(--space-4);
}

.message-chip {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: var(--space-2);
  padding: 7px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-muted);
  background: var(--color-card);
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
  font-family: inherit;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.message-chip b {
  color: var(--color-primary-hover);
  font-size: var(--font-md);
}

.message-chip:hover {
  border-color: rgba(113, 143, 159, 0.42);
  color: var(--color-text);
  background: var(--color-card-soft);
}

.message-chip.is-active {
  border-color: rgba(113, 143, 159, 0.5);
  color: var(--color-primary-hover);
  background: var(--blue-soft);
}

.message-chip:focus-visible {
  outline: 2px solid rgba(113, 143, 159, 0.42);
  outline-offset: 2px;
}

.text-btn {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--accent-dark);
  background: transparent;
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  text-decoration: none;
}

.text-btn:hover {
  background: var(--color-primary-soft);
}

.work-list,
.activity-list,
.project-risk-list,
.time-risk-list,
.record-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-item {
  display: grid;
  grid-template-columns: 27px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: 14px var(--space-5);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
}

.work-item:last-child {
  border-bottom: 0;
}

.work-item:hover,
.record-row:hover {
  background: rgba(113, 143, 159, 0.045);
}

.work-item.is-overdue {
  background: rgba(181, 99, 90, 0.055);
}

.work-item.is-due-soon {
  background: rgba(179, 148, 87, 0.055);
}

.time-risk-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: 13px var(--space-5);
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
}

.time-risk-item:last-child {
  border-bottom: 0;
}

.time-risk-item:hover {
  background: rgba(113, 143, 159, 0.045);
}

.time-risk-item.is-overdue {
  background: rgba(181, 99, 90, 0.05);
}

.time-risk-item.is-due-soon {
  background: rgba(179, 148, 87, 0.05);
}

.time-risk-main {
  min-width: 0;
}

.time-risk-main strong,
.time-risk-main span,
.time-risk-due span {
  display: block;
}

.time-risk-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--font-sm);
}

.time-risk-main span,
.time-risk-due {
  color: var(--muted);
  font-size: var(--font-xs);
}

.time-risk-due {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.checkbox {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid #d8dce3;
  border-radius: 6px;
  color: transparent;
}

.work-title {
  margin: 0 0 5px;
  font-size: var(--font-md);
  font-weight: var(--weight-semibold);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: var(--space-5);
}

/* The sidebar consumes a fixed column on narrow desktops and phones. Keep
   administrative forms in a single readable flow before their columns become
   too narrow to operate safely. */
@media (max-width: 980px) {
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.entry-management-card {
  margin: var(--space-5) 0;
}

.entry-management-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.3fr) auto auto;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.entry-management-row strong,
.entry-management-row span {
  display: block;
}

.entry-management-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--font-sm);
}

.entry-management-row input {
  min-width: 0;
}

@media (max-width: 900px) {
  .entry-management-row {
    grid-template-columns: 1fr;
  }
}

.panel-card {
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card);
  box-shadow: none;
}

.member-create-form {
  display: grid;
  align-content: start;
  gap: var(--space-4);
}

.member-create-form h3,
.member-list-card h3 {
  margin: 0;
}

.member-create-form label {
  display: grid;
  gap: 8px;
  color: var(--color-text-muted);
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
}

.member-create-form input,
.member-create-form select {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--color-text);
  font: inherit;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.section-head span {
  color: var(--color-text-muted);
}

.member-list {
  display: grid;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.member-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 90px 86px auto;
  align-items: center;
  gap: var(--space-4);
  padding: 14px var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.member-role-control select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  background: #fff;
  color: var(--color-text);
  font: inherit;
}

.member-row:last-child {
  border-bottom: 0;
}

.member-account-config {
  grid-column: 1 / -1;
  margin-top: -2px;
}

.member-account-config summary {
  width: fit-content;
  padding: 4px 0;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.member-account-config summary::-webkit-details-marker {
  display: none;
}

.member-account-config summary::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 8px 2px 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 160ms ease;
}

.member-account-config[open] summary::before {
  transform: rotate(45deg);
  margin-bottom: 4px;
}

.member-account-config form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 10px 12px;
  max-width: 720px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-subtle);
}

.member-account-config label {
  display: grid;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 600;
}

.member-account-config input {
  min-width: 0;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text);
  font: inherit;
}

.member-account-config p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 12px;
}

.account-audit-card {
  margin-top: var(--space-5);
}

.account-audit-list {
  display: grid;
  border-top: 1px solid var(--color-border);
}

.account-audit-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.account-audit-row:last-child {
  border-bottom: 0;
}

.account-audit-row strong,
.account-audit-row span,
.account-audit-row time {
  display: block;
}

.account-audit-row strong {
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
}

.account-audit-row span,
.account-audit-row time {
  margin-top: 3px;
  color: var(--color-text-muted);
  font-size: var(--font-sm);
}

.account-audit-row time {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .account-audit-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

.custom-fields-settings {
  margin-top: var(--space-5);
}

.custom-field-required,
.custom-field-checkbox {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.custom-field-required input,
.custom-field-checkbox input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.custom-field-list {
  display: grid;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.custom-field-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: var(--space-4);
  padding: 14px var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.custom-field-row:last-child {
  border-bottom: 0;
}

.custom-field-row > div {
  display: grid;
  gap: 4px;
}

.custom-field-row span:not(.status-pill) {
  color: var(--color-text-muted);
  font-size: var(--font-sm);
}

.template-edit-details {
  margin-top: var(--space-2);
}

.template-edit-details summary {
  width: fit-content;
  color: var(--color-primary);
  cursor: pointer;
  font-size: var(--font-sm);
}

.template-edit-details form {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card-soft);
}

.template-edit-details label {
  display: grid;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
}

.template-edit-details input,
.template-edit-details textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text);
  font: inherit;
}

.template-edit-details textarea {
  resize: vertical;
}

.template-edit-details p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-xs);
}

.custom-field-row.is-inactive {
  opacity: .68;
}

.custom-field-values-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.custom-field-values-grid > label {
  display: grid;
  gap: 8px;
  color: var(--color-text-muted);
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
}

.custom-field-values-grid input,
.custom-field-values-grid select,
.custom-field-values-grid textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--color-text);
  font: inherit;
}

.custom-field-values-grid textarea {
  min-height: 86px;
  resize: vertical;
}

@media (max-width: 760px) {
  .custom-field-row,
  .custom-field-values-grid {
    grid-template-columns: 1fr;
  }
}

.person-cell {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.person-cell div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.person-cell span:last-child {
  color: var(--color-text-muted);
  font-size: var(--font-sm);
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.status-pill.blue {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.status-pill.muted {
  color: var(--color-text-muted);
  background: var(--color-card-soft);
}

.project-risk-list {
  display: grid;
  gap: 10px;
  padding: var(--space-4);
}

.project-risk-card {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card-soft);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.project-risk-card:hover {
  border-color: rgba(127, 154, 169, 0.45);
  box-shadow: var(--shadow-xs);
  transform: translateY(-1px);
}

.project-risk-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.project-risk-main strong,
.project-risk-main span {
  display: block;
}

.project-risk-main strong {
  overflow: hidden;
  color: var(--color-text);
  font-size: var(--font-md);
  font-weight: var(--weight-bold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-risk-main div > span {
  margin-top: 3px;
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.project-risk-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.project-risk-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--color-muted);
  background: var(--color-card);
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
}

.project-risk-meta .risk-total {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.project-risk-all {
  margin: 0 var(--space-4) var(--space-4);
}

.project-risk-all summary {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 8px 11px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--accent-dark);
  background: var(--color-card-soft);
  font-size: var(--font-sm);
  font-weight: var(--weight-bold);
  cursor: pointer;
  list-style: none;
}

.project-risk-all summary::-webkit-details-marker {
  display: none;
}

.project-risk-all summary::after {
  content: "展开";
  color: var(--color-muted);
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
}

.project-risk-all[open] summary::after {
  content: "收起";
}

.project-risk-all summary b {
  display: inline-flex;
  min-width: 28px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: var(--font-xs);
}

.project-risk-list-full {
  padding: var(--space-3) 0 0;
}

.work-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: var(--font-xs);
}

.due-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: var(--weight-semibold);
}

.due-status.overdue {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.due-status.due-soon {
  color: var(--yellow);
  background: var(--yellow-soft);
}

.due-status.future {
  color: var(--blue);
  background: var(--blue-soft);
}

.due-status.unset {
  color: var(--muted);
  background: var(--surface-muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.tag.coral-tag {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.tag.blue-tag {
  color: var(--blue);
  background: var(--blue-soft);
}

.tag.green-tag {
  color: var(--green);
  background: var(--green-soft);
}

.tag.yellow-tag {
  color: var(--yellow);
  background: var(--yellow-soft);
}

.tag.purple-tag {
  color: var(--purple);
  background: var(--purple-soft);
}

.tag.orange-tag {
  color: #9b5d24;
  background: #fbeddc;
}

.tag.muted-tag {
  color: var(--muted);
  background: var(--surface-muted);
}

.detail-status-menu {
  position: relative;
}

.detail-status-menu summary {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.detail-status-menu summary::-webkit-details-marker {
  display: none;
}

.detail-status-menu summary::after {
  margin-left: 5px;
  color: var(--color-muted);
  content: "⌄";
  font-size: var(--font-xs);
}

.detail-status-menu[open] summary::after {
  content: "⌃";
}

.detail-status-menu-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 148px;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 30px rgba(62, 77, 84, 0.16);
}

.detail-status-menu-list button {
  display: flex;
  width: 100%;
  padding: 7px 8px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.detail-status-menu-list button:hover {
  background: var(--color-card-soft);
}

.detail-status-menu-list button:disabled {
  cursor: default;
  opacity: 0.42;
}

.detail-meta-list li.detail-status-row {
  position: relative;
  z-index: 4;
}

.detail-goal-summary {
  display: -webkit-box;
  overflow: hidden;
  color: var(--color-text);
  font-weight: var(--weight-regular);
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.task-baseline-panel {
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  background: var(--color-card-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.task-baseline-panel .eyebrow {
  margin-bottom: 4px;
}

.task-baseline-panel h3 {
  margin: 0 0 4px;
}

.task-baseline-panel > strong {
  display: block;
  margin-bottom: 5px;
  color: var(--color-text);
}

.task-baseline-panel > p:last-child {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--font-xs);
  line-height: 1.6;
}

.task-page-baseline,
.task-page-editor {
  display: grid;
  gap: var(--space-3);
}

.detail-page-read-section {
  display: grid;
  gap: var(--space-2);
}

.detail-page-read-section + .detail-page-read-section {
  padding-top: var(--space-5);
  margin-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

.detail-page-read-section > header,
.detail-page-editor > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.detail-page-read-section > header h3,
.detail-page-editor > header h3 {
  margin: 0;
}

.detail-page-read-section > header span {
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--color-muted);
  background: var(--color-card-soft);
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
}

.detail-page-editable-section > header button {
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  background: transparent;
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background-color 140ms ease, transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

.detail-page-editable-section > header button:focus-visible {
  border-color: var(--accent);
  outline: 2px solid rgba(113, 143, 159, 0.18);
  outline-offset: 2px;
}

.detail-page-editable-section > header button:active {
  transform: scale(0.97);
}

.detail-page-empty-copy {
  color: var(--color-muted);
}

.detail-page-editor {
  display: grid;
  gap: var(--space-3);
}

.detail-page-editor > header span {
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.detail-page-editor .detail-page-textarea {
  min-height: 220px;
  padding: 2px 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--color-text);
  font-size: var(--font-sm);
  line-height: 1.78;
  outline: none;
}

.detail-page-editor .detail-page-textarea:focus {
  box-shadow: inset 2px 0 0 var(--accent);
  padding-left: var(--space-3);
}

@media (hover: hover) and (pointer: fine) {
  .detail-page-editable-section > header button:hover {
    color: var(--color-text);
    border-color: var(--color-border);
    background: var(--color-card-soft);
  }
}

.task-page-baseline {
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.task-page-baseline > header,
.task-page-editor > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.task-page-baseline > header h3,
.task-page-editor > header h3 {
  margin: 0;
}

.task-page-baseline > header span {
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--color-muted);
  background: var(--color-card-soft);
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
}

.task-page-editor > header span {
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.main-edit-form[data-kind="task"] {
  gap: var(--space-5);
}

.feedback-page-edit-form {
  display: grid;
  gap: var(--space-4);
  padding-top: var(--space-5);
  margin-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}

.feedback-source-record {
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card-soft);
}

.main-edit-form[data-kind="task"] .block-toolbar {
  padding: 8px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
}

.main-edit-form[data-kind="task"] .block-editor-item {
  margin: 0 -10px;
  border-color: transparent;
  background: transparent;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.main-edit-form[data-kind="task"] .block-editor-item:focus-within {
  border-color: var(--color-border);
  background: var(--color-card-soft);
}

.main-edit-form[data-kind="task"] .form-actions {
  align-items: center;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.main-edit-form[data-kind="task"] .form-actions button {
  transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

.main-edit-form[data-kind="task"] .form-actions button:active,
.main-edit-form[data-kind="task"] .block-toolbar button:active,
.main-edit-form[data-kind="task"] .block-editor-item button:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .main-edit-form[data-kind="task"] .block-editor-item:hover {
    border-color: var(--color-border);
    background: var(--color-card-soft);
  }
}

.inline-status-control {
  display: inline-flex;
  width: fit-content;
  cursor: default;
}

.inline-status-control select {
  min-height: 28px;
  max-width: 126px;
  padding: 3px 25px 3px 9px;
  border: 0;
  border-radius: 9px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  box-shadow: none;
}

.inline-status-control select:disabled {
  cursor: wait;
  opacity: 0.64;
}

.inline-field-control {
  display: inline-flex;
  width: min(148px, 100%);
  cursor: default;
}

.inline-field-control.compact {
  width: min(102px, 100%);
}

.inline-field-control.date {
  position: relative;
  width: min(138px, 100%);
}

.inline-field-control.date.is-empty .inline-date-empty {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 8px;
  color: var(--color-text-muted);
  font-size: var(--font-sm);
  pointer-events: none;
  transform: translateY(-50%);
}

.inline-field-control.date.is-empty input,
.inline-field-control.date.is-empty input::-webkit-datetime-edit {
  color: transparent;
}

.inline-field-control.date.is-empty:focus-within input,
.inline-field-control.date.is-empty:focus-within input::-webkit-datetime-edit {
  color: var(--color-text);
}

.inline-field-control.date.is-empty:focus-within .inline-date-empty {
  display: none;
}

.project-list-row .inline-field-control {
  width: min(128px, 100%);
}

.project-list-row .inline-field-control.compact {
  width: min(96px, 100%);
}

.project-list-row .inline-field-control.date {
  width: min(146px, 100%);
}

.project-list-row .inline-field-control select,
.project-list-row .inline-field-control input {
  min-height: 27px;
  border-color: transparent;
  border-radius: 8px;
  background: rgba(248, 250, 247, 0.58);
  font-size: var(--font-sm);
  padding: 3px 25px 3px 8px;
}

.project-list-row .inline-status-control select {
  min-height: 27px;
  border: 1px solid transparent;
  border-radius: 8px;
  background-color: rgba(232, 242, 246, 0.58);
  padding: 3px 24px 3px 8px;
}

.project-list-row .inline-field-control select:hover,
.project-list-row .inline-field-control input:hover,
.project-list-row .inline-field-control select:focus,
.project-list-row .inline-field-control input:focus,
.project-list-row .inline-status-control select:hover,
.project-list-row .inline-status-control select:focus {
  border-color: rgba(113, 143, 159, 0.42);
  background: var(--color-card);
  box-shadow: 0 0 0 2px rgba(113, 143, 159, 0.12);
  outline: none;
}

.inline-field-control select,
.inline-field-control input {
  width: 100%;
  min-height: 29px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--color-card-soft);
  color: var(--color-text);
  font: inherit;
  font-size: var(--font-sm);
  padding: 4px 8px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.inline-field-control select:hover,
.inline-field-control input:hover,
.inline-field-control select:focus,
.inline-field-control input:focus {
  border-color: var(--color-border-strong);
  background: var(--color-card);
  box-shadow: 0 0 0 3px rgba(113, 143, 159, 0.12);
  outline: none;
}

.inline-field-control select:disabled,
.inline-field-control input:disabled {
  cursor: wait;
  opacity: 0.62;
}

.project-list-row .inline-field-control {
  width: min(128px, 100%);
}

.project-list-row .inline-field-control.compact {
  width: min(96px, 100%);
}

.project-list-row .inline-field-control.date {
  width: min(146px, 100%);
}

.project-list-row .inline-field-control select,
.project-list-row .inline-field-control input {
  min-height: 27px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(248, 250, 247, 0.58);
  font-size: var(--font-sm);
  padding: 3px 25px 3px 8px;
}

.project-list-row .inline-status-control select {
  min-height: 27px;
  border: 1px solid transparent;
  border-radius: 8px;
  background-color: rgba(232, 242, 246, 0.58);
  padding: 3px 24px 3px 8px;
}

.project-list-row .inline-field-control select:hover,
.project-list-row .inline-field-control input:hover,
.project-list-row .inline-field-control select:focus,
.project-list-row .inline-field-control input:focus,
.project-list-row .inline-status-control select:hover,
.project-list-row .inline-status-control select:focus {
  border-color: rgba(113, 143, 159, 0.42);
  background: var(--color-card);
  box-shadow: 0 0 0 2px rgba(113, 143, 159, 0.12);
  outline: none;
}

.inline-field-control.is-saving select,
.inline-field-control.is-saving input,
.inline-status-control.is-saving select {
  border-color: rgba(113, 143, 159, 0.58);
  background: rgba(232, 242, 246, 0.92);
  box-shadow: 0 0 0 3px rgba(113, 143, 159, 0.14);
}

.inline-field-control.is-error select,
.inline-field-control.is-error input,
.inline-status-control.is-error select {
  border-color: rgba(185, 99, 94, 0.72);
  background: rgba(252, 240, 238, 0.94);
  box-shadow: 0 0 0 3px rgba(185, 99, 94, 0.16);
}

.stacked-cell {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.activity-item {
  display: grid;
  grid-template-columns: 35px 1fr;
  gap: 10px;
  padding: 14px 18px;
}

.activity-item[data-detail] {
  cursor: pointer;
}

.activity-item[data-detail]:hover {
  background: var(--color-card-soft);
}

.activity-item p {
  margin: 0 0 4px;
  font-size: var(--font-sm);
  line-height: 1.5;
}

.activity-item span {
  color: var(--muted);
  font-size: var(--font-xs);
}

.assignment-list {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
}

.assignment-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: 13px 15px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.assignment-card:hover {
  border-color: rgba(113, 143, 159, 0.35);
  background: var(--color-card-soft);
  box-shadow: var(--shadow-sm);
}

.assignment-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
}

.assignment-title {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: var(--font-md);
}

.assignment-body p {
  margin: 0;
  overflow: hidden;
  color: #5f6a70;
  font-size: var(--font-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-card time {
  color: var(--muted);
  font-size: var(--font-sm);
  white-space: nowrap;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.filter-btn {
  padding: 7px 11px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: #6e797e;
  background: var(--color-card);
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
}

.filter-btn.active {
  color: var(--color-primary-hover);
  border-color: var(--color-border-strong);
  background: var(--color-primary-soft);
}

.record-table {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-card);
  box-shadow: none;
  scrollbar-color: rgba(113, 143, 159, 0.45) transparent;
  scrollbar-width: thin;
}

.record-head,
.record-row {
  display: grid;
  grid-template-columns: minmax(250px, 2fr) 0.8fr 0.8fr 0.75fr 0.8fr;
  align-items: center;
  gap: var(--space-3);
  min-width: 920px;
  padding: 9px var(--space-4);
}

.record-head {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: rgba(248, 250, 247, 0.54);
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
}

.record-row {
  position: relative;
  border-top: 1px solid var(--color-border);
  font-size: var(--font-sm);
  min-height: 54px;
  cursor: pointer;
  transition: background 0.16s ease;
}

.record-cell {
  min-width: 0;
}

.record-row::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 2px;
  border-radius: 999px;
  background: transparent;
  content: "";
  transition: background 0.16s ease;
}

.record-row:hover::before {
  background: rgba(113, 143, 159, 0.42);
}

.record-row.is-recently-saved {
  background: rgba(239, 232, 199, 0.62);
  box-shadow: inset 3px 0 0 var(--color-accent-warm), 0 10px 22px rgba(91, 105, 111, 0.08);
}

.record-table .empty-state {
  margin: var(--space-4);
}

.work-item-head,
.work-item-row {
  grid-template-columns: minmax(220px, 1.8fr) 0.8fr 0.68fr 0.68fr 0.68fr 0.72fr 0.72fr;
  min-width: 1080px;
}

.task-list-head,
.task-list-row {
  grid-template-columns: minmax(260px, 1.45fr) minmax(220px, 1.25fr) 0.55fr 0.7fr 0.65fr 0.65fr;
  min-width: 1060px;
}

.task-goal-preview {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.delivery-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 5px 9px;
  background: #f2eeee;
  color: var(--color-muted);
  font-size: var(--font-xs);
  font-weight: var(--weight-bold);
}

.delivery-pill.ready {
  background: var(--green-soft);
  color: var(--green);
}

.task-tree {
  display: grid;
  gap: 8px;
  margin-top: var(--space-3);
}

.task-tree-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.task-tree-summary-counts,
.task-tree-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.task-tree-owner-load {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.task-tree-owner-load strong {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 9px;
  background: #f7f5f0;
  color: var(--color-text);
  font-weight: var(--weight-bold);
}

.task-tree-owner-load b {
  color: var(--blue);
}

.task-tree-owner-load.is-risk strong {
  border-color: #efc6be;
  background: #fff3f0;
  color: #a65245;
}

.task-tree-owner-load.is-risk b {
  color: #a65245;
}

.task-tree-search {
  min-width: min(280px, 100%);
  flex: 1 1 240px;
}

.task-tree-search input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  background: var(--surface);
  color: var(--color-text);
  font-size: var(--font-sm);
}

.task-tree-search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
  outline: none;
}

.task-tree-filter-count {
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.task-tree-empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 8px 0 0;
  color: var(--color-muted);
  background: #fbfaf7;
  font-size: var(--font-sm);
}

.task-tree-filter-chip {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  color: var(--color-muted);
  background: var(--surface);
  font-size: var(--font-xs);
  font-weight: var(--weight-bold);
  cursor: pointer;
}

.task-tree-filter-chip:hover,
.task-tree-filter-chip:focus-visible,
.task-tree-filter-chip.is-active {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
  outline: none;
}

.task-tree-filter-chip.owner-chip {
  background: #f7f5f0;
}

.task-tree-summary-counts span {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 9px;
  background: var(--surface);
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.task-tree-summary-counts b {
  color: var(--color-text);
}

.task-tree-summary-counts .is-risk {
  border-color: #efc6be;
  background: #fff3f0;
  color: #a65245;
}

.task-tree-summary-counts .is-warning {
  border-color: #ead6a6;
  background: #fff8e7;
  color: #8a6a24;
}

.task-tree-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.52);
}

.task-tree-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-tree-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  cursor: pointer;
}

.task-tree-item:first-child {
  border-top: 0;
}

.task-tree-item:hover {
  background: var(--surface-soft);
}

.task-tree-item.is-context-only {
  opacity: 0.74;
}

.task-tree-item.is-child {
  padding-left: 28px;
  background: rgba(247, 245, 240, 0.46);
}

.task-tree-symbol {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--blue-soft);
  color: var(--blue);
  font-size: var(--font-xs);
  font-weight: var(--weight-heavy);
}

.task-tree-toggle {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 15px;
  font-weight: var(--weight-heavy);
  cursor: pointer;
}

.task-tree-toggle:hover,
.task-tree-toggle:focus-visible {
  background: #d9e6eb;
  outline: none;
}

.task-tree-group.is-collapsed .task-tree-item.is-child {
  display: none;
}

.task-tree-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.task-tree-title strong {
  overflow: hidden;
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-tree-wbs {
  flex: 0 0 auto;
  border-radius: var(--radius-pill);
  padding: 3px 7px;
  background: #f1ece4;
  color: #796f64;
  font-size: 11px;
  font-weight: var(--weight-bold);
}

.task-tree-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
  align-items: center;
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.task-tree-action-control select {
  min-width: 96px;
}

.task-tree-meta .inline-field-control select,
.task-tree-meta .inline-field-control input {
  min-height: 28px;
  padding: 4px 8px;
  font-size: var(--font-xs);
}

.task-tree-meta .inline-field-control.date input {
  width: 122px;
}

.muted-cell {
  color: var(--muted);
}

.project-list-head,
.project-list-row {
  min-width: 900px;
  gap: 12px;
  padding-inline: 18px;
}

.project-list-head > *,
.project-list-row > * {
  min-width: 0;
}

.project-table {
  overflow-x: auto;
}

.project-table .project-list-head {
  min-height: 54px;
}

.project-list-row {
  min-height: 64px;
  cursor: default;
}

.project-name-cell {
  align-items: flex-start;
  gap: 10px;
}

.project-name-cell div {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.project-open-title {
  display: block;
  max-width: 100%;
  margin: 0 0 3px;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
  color: var(--color-text);
  cursor: pointer;
  font: inherit;
  font-weight: var(--weight-semibold);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-line-clamp: unset;
}

.project-open-title:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-name-cell span,
.project-name-cell em {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--color-muted);
  font-size: var(--font-xs);
  font-style: normal;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-name-cell em {
  color: var(--muted);
}

.project-list-row .inline-field-control,
.project-list-row .inline-status-control {
  max-width: 100%;
}

.project-progress-cell,
.number-cell {
  color: var(--color-text);
  font-weight: var(--weight-semibold);
}

.number-cell {
  display: inline-flex;
  min-width: 28px;
  justify-content: center;
}

.view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  color: var(--color-muted);
  font-size: var(--font-sm);
}

.project-view-toolbar {
  align-items: center;
  margin-bottom: var(--space-2);
}

.project-view-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.compact-tabs {
  border-radius: var(--radius-md);
}

.compact-tabs button {
  min-height: 32px;
  padding-inline: 12px;
}

.view-tabs {
  display: inline-flex;
  gap: var(--space-1);
  padding: var(--space-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card);
  box-shadow: var(--shadow-xs);
}

.view-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: var(--radius-md);
  padding: 7px 12px;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
  transition: background 0.16s ease, color 0.16s ease;
}

.view-tabs button.active {
  background: var(--color-primary-soft);
  color: var(--color-primary-hover);
}

.lifecycle-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: var(--radius-pill);
  padding: 4px 9px;
  font-size: var(--font-xs);
  font-weight: var(--weight-bold);
}

.lifecycle-badge.current {
  color: #49675e;
  background: #edf5ee;
}

.lifecycle-badge.history {
  color: #7a7267;
  background: #f1ece4;
}

.record-name {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: var(--space-2);
}

.record-kind {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border-radius: var(--radius-sm);
  font-size: var(--font-xs);
  font-weight: var(--weight-heavy);
}

.record-name strong,
.record-name span,
.record-name small {
  display: block;
}

.record-name strong {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 2px;
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.record-title-link {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 2px;
  padding: 0;
  border: 0;
  color: var(--color-text);
  background: transparent;
  font: inherit;
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
  line-height: 1.32;
  text-align: left;
  cursor: pointer;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.record-title-link:hover,
.record-title-link:focus-visible {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.record-name span {
  overflow: hidden;
  color: var(--color-muted);
  font-size: var(--font-xs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-name .record-hierarchy {
  overflow: hidden;
  margin-top: 2px;
  color: #8a8175;
  font-size: 11px;
  font-weight: var(--weight-medium);
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.person .avatar {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  border-radius: var(--radius-sm);
  font-size: var(--font-xs);
}

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

.project-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(36, 43, 56, 0.07);
}

.project-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-card h3 {
  margin: 16px 0 7px;
  font-size: 15px;
}

.project-card p {
  min-height: 36px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.project-card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #687479;
  background: var(--soft);
  font-size: 10px;
}

.progress {
  height: 6px;
  margin: 18px 0 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9ebe7;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: var(--space-5);
}

.detail-main,
.detail-side {
  display: grid;
  gap: var(--space-4);
  align-content: start;
}

.detail-card {
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-card);
  box-shadow: var(--shadow-xs);
}

.detail-main .detail-card {
  padding: 24px 28px;
}

.detail-card h2 {
  margin-bottom: var(--space-4);
  font-size: var(--font-lg);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
}

.detail-side .detail-card {
  padding: var(--space-4);
  border-color: rgba(113, 143, 159, 0.14);
  background: rgba(255, 255, 255, 0.56);
  box-shadow: none;
}

.detail-side .detail-card h2 {
  margin-bottom: var(--space-3);
  color: var(--color-muted);
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
}

.detail-card h3 {
  margin: 22px 0 8px;
  color: var(--color-text);
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.01em;
}

.detail-card p,
.detail-card li {
  color: #667277;
  font-size: var(--font-sm);
  line-height: 1.78;
}

.detail-card ol {
  padding-left: 20px;
  margin: 8px 0 14px;
}

.rich-text-content {
  color: var(--color-text);
  font-size: var(--font-sm);
  line-height: 1.78;
}

.rich-text-content p,
.rich-text-content ul,
.rich-text-content ol,
.rich-text-content blockquote,
.rich-text-content table {
  margin: 10px 0 14px;
}

.rich-text-content ul,
.rich-text-content ol {
  padding-left: 20px;
}

.rich-text-content table,
.rich-editable table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
}

.rich-text-content th,
.rich-text-content td,
.rich-editable th,
.rich-editable td {
  border: 1px solid var(--color-border);
  padding: 8px;
  text-align: left;
}

.rich-editor {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card);
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-card-soft);
}

.rich-toolbar button {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-card);
  padding: 6px 8px;
  color: var(--color-text);
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
  cursor: pointer;
}

.rich-toolbar-divider {
  width: 1px;
  min-height: 24px;
  margin: 0 2px;
  background: var(--color-border);
}

.rich-toolbar-hint {
  align-self: center;
  color: var(--color-muted);
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
}

.unsaved-hint {
  display: none;
  align-self: center;
  color: var(--color-warning);
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
}

.main-edit-form[data-dirty="true"] .unsaved-hint,
.project-page-edit-form[data-dirty="true"] .unsaved-hint,
.feedback-page-edit-form[data-dirty="true"] .unsaved-hint {
  display: inline-flex;
}

.rich-editable {
  min-height: 160px;
  padding: var(--space-4);
  color: var(--color-text);
  font-size: var(--font-sm);
  line-height: var(--leading-relaxed);
  outline: none;
}

.rich-editable:empty::before {
  color: var(--color-muted);
  content: attr(data-placeholder);
  pointer-events: none;
}

.muted-editor-text {
  color: var(--color-muted);
}

.delivery-blocks,
.block-list {
  display: grid;
  gap: var(--space-3);
}

.delivery-block {
  color: var(--color-muted);
  font-size: var(--font-sm);
  line-height: var(--leading-relaxed);
}

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

.todo-block label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-block {
  overflow-x: auto;
}

.attachment-ref-block {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  color: var(--color-text);
  background: var(--color-card-soft);
  text-decoration: none;
}

.attachment-ref-block .file-preview-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 9px;
}

.attachment-ref-block.is-unavailable {
  color: var(--muted);
  background: #f7f7f5;
}

.attachment-ref-block.is-unavailable small {
  font-size: var(--font-xs);
}

.delivery-divider {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 6px 0;
}

.block-editor {
  display: grid;
  gap: 10px;
}

.block-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card-soft);
}

.block-toolbar span {
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.block-toolbar button,
.block-editor-item header button,
.table-block-tools button {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-card);
  padding: 6px 8px;
  color: var(--color-text);
  cursor: pointer;
}

.table-block-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.table-block-tools span {
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.block-editor-item {
  display: grid;
  gap: 9px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 10px;
  background: var(--color-card);
}

.block-editor-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.block-editor-item textarea,
.block-editor-item select,
.todo-editor-list input:not([type="checkbox"]) {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 9px 10px;
  font: inherit;
}

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

.todo-editor-list label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}

.block-text-editable {
  min-height: 88px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.project-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.project-summary-grid .metric-card {
  min-height: 0;
  padding: 14px;
}

.completion-check {
  margin: 0 0 var(--space-5);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card-soft);
}

.completion-check.is-ready {
  border-color: rgba(111, 142, 124, 0.32);
  background: var(--green-soft);
}

.completion-check.has-blockers {
  border-color: rgba(187, 112, 93, 0.28);
  background: var(--accent-soft);
}

.completion-check-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.completion-check-head h3 {
  margin: 2px 0 0;
}

.completion-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.62);
  font-size: var(--font-xs);
  font-weight: var(--weight-bold);
  white-space: nowrap;
}

.completion-message {
  margin: 0;
}

.completion-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--space-3);
}

.completion-counts span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--color-muted);
  background: rgba(255, 255, 255, 0.62);
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
}

.completion-blockers {
  display: grid;
  gap: 8px;
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

.completion-blockers li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
}

.completion-blockers li:hover {
  border-color: var(--color-border-strong);
  background: rgba(255, 255, 255, 0.86);
}

.completion-blockers strong,
.completion-blockers span {
  display: block;
}

.completion-blockers strong {
  overflow: hidden;
  color: var(--color-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.completion-blockers div > span {
  margin-top: 2px;
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.completion-all-blockers {
  margin-top: var(--space-3);
}

.completion-all-blockers summary {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-md);
  color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.58);
  font-size: var(--font-sm);
  font-weight: var(--weight-bold);
  cursor: pointer;
  list-style: none;
}

.completion-all-blockers summary::-webkit-details-marker {
  display: none;
}

.completion-all-blockers summary::after {
  content: "展开";
  color: var(--color-muted);
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
}

.completion-all-blockers[open] summary::after {
  content: "收起";
}

.completion-all-blockers summary b {
  display: inline-flex;
  min-width: 28px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: var(--font-xs);
}

.completion-all-groups {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.completion-blocker-group {
  padding: var(--space-3);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.45);
}

.completion-blocker-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.completion-blocker-group header strong {
  color: var(--color-text);
}

.completion-blocker-group header span {
  color: var(--color-muted);
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
}

.completion-blockers-full {
  margin-top: 0;
}

.project-edit-form,
.main-edit-form {
  display: grid;
  gap: var(--space-4);
}

.project-edit-form label,
.main-edit-form label {
  display: grid;
  gap: 6px;
  color: var(--color-muted);
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
}

.project-edit-form input,
.project-edit-form select,
.project-edit-form textarea,
.main-edit-form input,
.main-edit-form select,
.main-edit-form textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 11px;
  color: var(--color-text);
  background: var(--color-card);
  font: inherit;
}

.project-edit-form textarea,
.main-edit-form textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.detail-meta-list {
  display: grid;
  gap: var(--space-2);
  padding: 0;
  margin: 0;
  list-style: none;
}

.detail-meta-list li {
  display: grid;
  gap: 3px;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid rgba(113, 143, 159, 0.1);
}

.detail-meta-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-meta-list span {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: var(--weight-medium);
}

.detail-meta-list strong {
  color: var(--color-text);
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
}

.project-detail-meta-list strong,
.detail-side .detail-meta-list .inline-field-control,
.detail-side .detail-meta-list .inline-field-control select,
.detail-side .detail-meta-list .inline-field-control input {
  width: 100%;
}

.migration-panel form {
  display: grid;
  gap: var(--space-3);
}

.requirement-split-panel form {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.migration-panel p {
  margin: 0 0 var(--space-3);
  color: var(--color-muted);
  font-size: var(--font-sm);
  line-height: var(--leading-relaxed);
}

.requirement-split-panel p {
  margin: 0 0 var(--space-3);
  color: var(--color-muted);
  font-size: var(--font-sm);
  line-height: var(--leading-relaxed);
}

.migration-type-list {
  display: grid;
  gap: var(--space-2);
}

.check-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card-soft);
  color: var(--color-text);
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
}

.check-row b {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: var(--radius-pill);
  color: var(--color-primary-hover);
  background: var(--color-primary-soft);
  font-size: var(--font-xs);
}

.check-row.is-disabled {
  color: var(--color-muted);
  opacity: 0.64;
}

.form-row.compact {
  grid-template-columns: 1fr;
  gap: 12px;
}

.danger-zone {
  border-color: #f0c5bf;
  background: #fffaf7;
}

.detail-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.detail-title h1 {
  font-size: var(--font-xl);
  line-height: var(--leading-tight);
  font-weight: var(--weight-bold);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: flex-start;
}

.detail-actions button {
  padding: 8px 11px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-card);
  color: var(--color-text);
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
}

.detail-actions > button:first-child {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.bug-action-panel {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-4) 0;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card-soft);
}

.bug-action-panel p {
  margin: 0;
}

.bug-action-panel.is-done {
  border-color: #c9ddca;
  background: #f3f8f2;
}

.bug-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.task-in-progress-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin: var(--space-4) 0 var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card-soft);
}

.task-in-progress-panel strong {
  display: block;
  margin-bottom: 2px;
  font-size: var(--font-sm);
}

.task-in-progress-panel p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.task-in-progress-panel .primary-btn {
  flex: 0 0 auto;
}

.task-status-actions {
  margin: 0 0 var(--space-4);
}

.task-status-actions summary {
  width: fit-content;
  color: var(--color-muted);
  cursor: pointer;
  font-size: var(--font-xs);
  list-style: none;
}

.task-status-actions summary::-webkit-details-marker {
  display: none;
}

.task-status-actions summary::after {
  content: "⌄";
  margin-left: 6px;
}

.task-status-actions[open] summary::after {
  content: "⌃";
}

.task-status-actions-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.task-inline-action {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card-soft);
}

.task-inline-action label {
  display: grid;
  gap: var(--space-2);
  color: var(--color-muted-dark);
  font-size: var(--font-xs);
}

.danger-action {
  border-color: #f0c5bf;
  background: #fff8f6;
}

.activity-status {
  color: var(--color-muted);
  font-size: var(--font-xs);
  font-weight: var(--weight-bold);
}

.field-visibility-list {
  display: grid;
  gap: var(--space-2);
  min-width: 180px;
}

.field-visibility-note {
  max-width: 240px;
  margin: 0 0 var(--space-1);
  color: var(--color-muted);
  font-size: var(--font-xs);
  line-height: 1.55;
}

.field-visibility-list label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
  font-size: var(--font-sm);
}

.field-visibility-list label.is-required {
  color: var(--color-muted);
}

.field-visibility-list input {
  width: 16px;
  height: 16px;
}

.saved-view-bar {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 32px;
  gap: 4px;
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.saved-view-label,
.saved-view-bar em {
  margin-right: 3px;
  color: var(--color-muted);
  font-style: normal;
  font-weight: var(--weight-medium);
}

.saved-view-bar.is-empty {
  min-height: 22px;
}

.saved-view-chip {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  font-size: var(--font-xs);
  font-weight: var(--weight-medium);
  padding: 4px 8px;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

.saved-view-chip:hover {
  background: var(--color-card-soft);
}

.saved-view-chip:active,
.saved-view-menu summary:active {
  transform: scale(0.97);
}

.saved-view-chip-wrap {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.saved-view-menu {
  position: relative;
}

.saved-view-menu summary {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  font-size: 15px;
  font-weight: var(--weight-bold);
  line-height: 1;
  list-style: none;
  opacity: 0;
  transition: opacity 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

.saved-view-menu summary::-webkit-details-marker {
  display: none;
}

.saved-view-menu summary:hover,
.saved-view-menu[open] summary {
  border-color: var(--color-border-strong);
  background: var(--color-primary-soft);
  color: var(--color-text);
}

.saved-view-chip-wrap:hover .saved-view-menu summary,
.saved-view-chip-wrap:focus-within .saved-view-menu summary,
.saved-view-chip-wrap.is-current .saved-view-menu summary,
.saved-view-menu[open] summary {
  opacity: 1;
}

.saved-view-menu-body {
  position: absolute;
  z-index: 22;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  min-width: 112px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card);
  box-shadow: var(--shadow-md);
}

.saved-view-menu-body button {
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
  padding: 7px 8px;
  text-align: left;
  font: inherit;
  font-size: var(--font-xs);
}

.saved-view-menu-body button:hover {
  background: var(--color-card-soft);
}

.saved-view-menu-body button.danger {
  color: #a94b42;
}

.saved-view-menu-body button.danger:hover {
  background: #fff5f3;
}

.saved-view-chip.is-default {
  color: var(--color-text);
}

.saved-view-chip.is-shared {
  color: #46786e;
}

.saved-view-chip.is-active {
  border-color: rgba(113, 143, 159, 0.26);
  background: var(--color-primary-soft);
  color: var(--color-primary-hover);
  font-weight: var(--weight-bold);
}

.saved-view-chip.is-dirty {
  border-color: rgba(178, 154, 98, 0.34);
}

.saved-view-dirty-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--yellow);
}

.saved-view-shared-mark {
  color: #6c958c;
  font-size: 10px;
  font-weight: var(--weight-semibold);
}

.sortable-head {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 5px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
  padding: 2px 4px;
  text-align: left;
}

.sortable-head:hover,
.sortable-head:focus-visible {
  background: rgba(113, 143, 159, 0.08);
  color: var(--color-primary-hover);
  outline: none;
}

.sortable-head.is-active {
  color: var(--color-primary-hover);
  background: rgba(113, 143, 159, 0.1);
}

.sortable-head b,
.sortable-head i {
  color: currentColor;
  font-size: var(--font-xs);
  font-style: normal;
  opacity: 0.78;
}

.project-activity-card {
  margin-top: var(--space-4);
}

.project-activity-list {
  margin-top: var(--space-3);
}

.project-activity-event {
  background: var(--color-card);
}

.more-menu {
  position: relative;
}

.more-menu summary {
  display: grid;
  min-width: 38px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-card);
  color: var(--color-text);
  font-size: 13px;
  cursor: pointer;
  list-style: none;
}

.more-menu summary::-webkit-details-marker {
  display: none;
}

.more-menu-list {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  min-width: 142px;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card);
  box-shadow: var(--shadow-md);
}

.more-menu-list button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}

.more-menu-list button:hover {
  background: var(--color-card-soft);
}

.more-menu-list .danger-menu-item {
  color: #b3483e;
}

.more-menu-list .danger-menu-item:hover {
  background: #fff0ed;
}

.info-list {
  display: grid;
  gap: 13px;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}

.info-row > span:first-child {
  color: var(--muted);
}

.linked-record {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border-radius: 9px;
  background: var(--soft);
  font-size: 11px;
}

.comment {
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 10px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.comment p {
  margin-bottom: 3px;
  color: var(--ink);
  line-height: 1.55;
}

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

.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background: rgba(25, 30, 39, 0.42);
  backdrop-filter: blur(5px);
}

.modal-backdrop[hidden] {
  display: none;
}

.confirm-backdrop {
  position: fixed;
  z-index: 35;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(25, 30, 39, 0.32);
  backdrop-filter: blur(4px);
}

.confirm-backdrop[hidden] {
  display: none;
}

.confirm-dialog {
  width: min(420px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.confirm-dialog h2 {
  margin: 4px 0 10px;
  color: var(--text);
  font-size: var(--font-xl);
  line-height: var(--leading-tight);
}

.confirm-dialog p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-md);
  line-height: var(--leading-normal);
}

.confirm-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.confirm-dialog .danger-btn {
  width: auto;
}

.prompt-field {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  color: var(--muted);
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
}

.prompt-field input {
  width: 100%;
}

.schedule-dialog {
  width: min(520px, 100%);
}

.schedule-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.schedule-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
}

.schedule-form select {
  width: 100%;
}

.modal {
  width: min(560px, 100%);
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal > header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 21px 23px 16px;
  border-bottom: 1px solid var(--line);
}

.modal h2 {
  margin: 0;
  font-size: var(--font-xl);
  line-height: var(--leading-tight);
  font-weight: var(--weight-bold);
}

.close-btn {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  color: var(--muted);
  background: var(--soft);
  font-size: 20px;
}

.modal form {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 15px;
  padding: 20px 23px 0;
}

.type-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border-radius: 11px;
  background: var(--soft);
}

.type-switch[hidden],
.upload-box[hidden] {
  display: none;
}

.type-option {
  padding: 8px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
}

.type-option.active {
  color: var(--accent-dark);
  background: #fff;
  box-shadow: 0 2px 8px rgba(32, 39, 50, 0.08);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
}

label b {
  color: var(--accent);
}

label input,
label textarea,
label select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  outline: 0;
  color: var(--ink);
  background: #fff;
  font-size: var(--font-base);
  line-height: var(--leading-normal);
}

label textarea {
  min-height: 105px;
  resize: vertical;
}

label input:focus,
label textarea:focus,
label select:focus {
  border-color: #9fb4bd;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.upload-box,
.detail-upload-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  color: var(--color-muted);
  background: var(--color-card-soft);
  font-size: var(--font-xs);
  cursor: pointer;
  transition: 0.18s ease;
}

.upload-box:hover,
.upload-box.dragging,
.detail-upload-box:hover,
.detail-upload-box.dragging {
  color: var(--accent-dark);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upload-box strong,
.upload-box small,
.detail-upload-box strong,
.detail-upload-box small {
  display: block;
}

.upload-box strong,
.detail-upload-box strong {
  color: var(--color-text);
  font-size: var(--font-sm);
}

.upload-box small,
.detail-upload-box small {
  margin-top: 2px;
  font-weight: 400;
}

.detail-upload-box {
  width: 100%;
  margin-bottom: var(--space-4);
}

.upload-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 18px;
}

.selected-files {
  display: grid;
  gap: var(--space-2);
}

.selected-files:empty {
  display: none;
}

.selected-file {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card);
}

.selected-file-preview {
  display: grid;
  width: 48px;
  height: 42px;
  overflow: hidden;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  background: var(--color-card-soft);
  font-size: var(--font-xs);
}

.selected-file-preview img,
.selected-file-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.selected-file-preview .file-preview-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  font-size: 9px;
}

.selected-file strong,
.selected-file small {
  display: block;
}

.selected-file strong {
  overflow: hidden;
  margin-bottom: 3px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--font-xs);
}

.selected-file small {
  color: var(--color-muted);
  font-size: 9px;
}

.remove-file {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  background: var(--color-card-soft);
  cursor: pointer;
}

.attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-3);
}

.attachment-card {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card);
  box-shadow: var(--shadow-xs);
}

.attachment-card img,
.attachment-card video {
  display: block;
  width: 100%;
  height: 115px;
  object-fit: cover;
  background: var(--color-card-soft);
}

.audio-preview {
  display: grid;
  align-content: center;
  gap: var(--space-2);
  height: 115px;
  padding: var(--space-3);
  background: var(--color-card-soft);
}

.audio-preview .file-preview-icon {
  margin: 0 auto;
}

.audio-preview audio {
  width: 100%;
}

.file-preview-link,
.file-preview-icon {
  display: grid;
  width: 100%;
  height: 115px;
  place-items: center;
  background: var(--color-card-soft);
  text-decoration: none;
}

.file-preview-icon {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-lg);
  background: var(--color-primary-soft);
  color: var(--accent-dark);
  font-weight: 800;
}

.attachment-card footer {
  padding: var(--space-3);
}

.attachment-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text);
  font-size: var(--font-xs);
  font-weight: var(--weight-bold);
}

.attachment-card small {
  color: var(--color-muted);
  font-size: 9px;
}

.attachment-card footer a {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  color: var(--accent-dark);
  font-size: var(--font-xs);
  font-weight: var(--weight-bold);
  text-decoration: none;
}

.attachment-hint {
  display: block;
  margin-top: 6px;
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.attachment-empty {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--font-sm);
}

.empty-state {
  display: block;
  width: 100%;
  margin: 0;
  padding: var(--space-5);
  border: 1px dashed #d9dfdc;
  border-radius: var(--radius-lg);
  color: var(--color-muted);
  background: var(--color-card-soft);
  font-size: var(--font-md);
}

.quick-panel {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-card);
  box-shadow: var(--shadow-xs);
  margin-bottom: var(--space-5);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(120px, 1fr)) auto;
  gap: var(--space-2);
  align-items: end;
  padding: 8px 0;
  border: 0;
  border-top: 1px solid rgba(113, 143, 159, 0.12);
  border-bottom: 1px solid rgba(113, 143, 159, 0.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  margin-bottom: var(--space-2);
}

.compact-filter-panel {
  grid-template-columns: minmax(260px, 1fr) auto minmax(max-content, auto);
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-radius: 0;
  background: transparent;
}

.compact-filter-panel .filter-search {
  min-width: 0;
}

.compact-filter-panel .filter-search input {
  min-height: 34px;
  padding-inline: 10px;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.filter-popover {
  position: relative;
}

.filter-popover summary {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-card);
  padding: 6px 9px;
  color: var(--color-text);
  font-size: var(--font-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}

.filter-popover summary:hover,
.filter-popover[open] summary {
  border-color: var(--color-border-strong);
  background: var(--color-primary-soft);
}

.filter-popover summary.is-active {
  color: var(--color-primary-hover);
  border-color: rgba(113, 143, 159, 0.45);
}

.filter-popover summary:active {
  transform: scale(0.97);
}

.filter-popover summary b {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: var(--radius-pill);
  color: #fff;
  background: var(--color-primary);
  font-size: var(--font-xs);
}

.filter-popover summary::-webkit-details-marker {
  display: none;
}

.filter-popover-body {
  position: absolute;
  right: 0;
  z-index: 20;
  display: grid;
  width: 260px;
  gap: var(--space-2);
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card);
  box-shadow: var(--shadow-md);
}

.filter-panel label {
  display: grid;
  gap: 4px;
}

.filter-panel label span {
  color: var(--color-muted);
  font-size: var(--font-xs);
  font-weight: var(--weight-bold);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-card);
  padding: 5px 8px;
  font: inherit;
  font-size: var(--font-sm);
  color: var(--color-text);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--color-border-strong);
  outline: 3px solid rgba(113, 143, 159, 0.16);
}

.filter-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
  white-space: nowrap;
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.compact-filter-panel .filter-summary {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  min-height: 34px;
}

.filter-active-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  padding-top: 1px;
}

.filter-chip {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  max-width: 260px;
  padding: 4px 8px;
  border: 1px solid rgba(113, 143, 159, 0.18);
  border-radius: 999px;
  background: rgba(113, 143, 159, 0.09);
  color: var(--color-text);
  font-size: var(--font-xs);
  line-height: 1.2;
}

.filter-chip b {
  color: var(--color-muted);
  font-weight: 700;
}

.filter-chip button {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(62, 73, 83, 0.08);
  color: var(--color-muted);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.filter-chip button:hover {
  background: rgba(62, 73, 83, 0.16);
  color: var(--color-text);
}

.inline-create-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 140px 180px auto;
  gap: 10px;
  align-items: center;
}

.feedback-create-panel {
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  background: var(--color-card);
}

.feedback-create-panel .inline-create-form {
  grid-template-columns: minmax(260px, 1fr) 140px 190px 150px;
  align-items: stretch;
}

.inline-create-form input,
.inline-create-form select,
.quick-panel textarea,
.work-log-form textarea,
.work-log-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fff;
  padding: 11px 12px;
  font: inherit;
  font-size: var(--font-base);
  color: var(--text);
}

.inline-create-form .primary-btn,
.import-actions .primary-btn,
.import-actions .secondary-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 13px;
  white-space: nowrap;
}

.import-actions .primary-btn {
  min-width: 116px;
  box-shadow: var(--shadow-xs);
}

.import-actions .secondary-btn {
  min-width: 116px;
}

.quick-panel textarea {
  min-height: 84px;
  resize: vertical;
}

.bug-quick-panel {
  margin: 16px 0;
}

.public-form-page {
  max-width: 860px;
  margin: 0 auto;
}

body.is-public-bug-submit {
  background: #f6f8f7;
}

body.is-public-bug-submit .sidebar,
body.is-public-bug-submit .topbar,
body.is-public-bug-submit .modal-backdrop,
body.is-public-bug-submit .confirm-backdrop {
  display: none !important;
}

body.is-public-bug-submit .app-shell,
body.is-public-bug-submit .main {
  display: block;
  min-height: 100vh;
}

body.is-public-bug-submit .page {
  max-width: none;
  padding: 0;
}

.public-bug-page {
  width: min(100% - 32px, 820px);
  margin: 0 auto;
  padding: 72px 0 96px;
}

.public-bug-intro {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 24px;
}

.public-bug-intro .brand-mark,
.public-bug-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: #7897a8;
  color: #fff;
  box-shadow: 0 10px 24px rgba(75, 110, 125, .16);
}

.public-bug-intro h1,
.public-bug-success h1 {
  margin: 2px 0 6px;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -.035em;
}

.public-bug-intro p:not(.eyebrow),
.public-bug-success p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.public-bug-card {
  padding: 28px;
  border: 1px solid #dfe7e5;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(46, 67, 77, .06);
}

.public-bug-card textarea {
  min-height: 104px;
}

.public-bug-card .detail-upload-box {
  min-height: 78px;
  border-style: dashed;
  background: #fbfcfc;
}

.public-bug-card .detail-upload-box:hover,
.public-bug-card .detail-upload-box.dragging {
  border-color: #7897a8;
  background: #f2f7f8;
}

.public-bug-card .form-actions {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
}

.public-bug-note {
  max-width: 410px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.public-bug-success {
  max-width: 510px;
  margin: 96px auto;
  text-align: center;
}

.public-bug-success .public-bug-mark {
  margin: 0 auto 18px;
  background: #718f80;
}

.public-bug-success .eyebrow {
  margin: 0 0 8px;
}

.public-bug-success .primary-btn {
  margin-top: 24px;
}

@media (max-width: 640px) {
  .public-bug-page {
    width: min(100% - 24px, 820px);
    padding: 36px 0 56px;
  }

  .public-bug-card {
    padding: 20px;
    border-radius: 15px;
  }

  .public-bug-card .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .public-bug-card .form-actions .primary-btn {
    width: 100%;
  }
}

.bug-submit-link-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
}

.bug-submit-link-card h3 {
  margin: 2px 0 4px;
}

.bug-submit-link-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.bug-submit-link-card code {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  padding: 8px 10px;
  color: var(--muted);
  white-space: normal;
  word-break: break-all;
}

.form-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.quick-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.quick-panel-head h3 {
  margin: 2px 0 4px;
  font-size: 18px;
}

.quick-panel-head span {
  color: var(--muted);
  font-size: 12px;
}

.bug-quick-form {
  display: grid;
  gap: 12px;
}

.bug-quick-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.bug-quick-form input,
.bug-quick-form select,
.bug-quick-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fff;
  padding: 11px 12px;
  font: inherit;
  font-size: var(--font-base);
  color: var(--text);
}

.bug-quick-form textarea {
  min-height: 82px;
  resize: vertical;
}

.import-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-4);
  margin: var(--space-4) 0;
  padding: var(--space-5);
  border: 1px solid #d9e4e8;
  border-radius: var(--radius-xl);
  background: #f5f9f8;
}

.feedback-import-panel {
  align-items: center;
  border-color: #dbe8ea;
  background: linear-gradient(135deg, #f8fbfa 0%, #f2f8f8 100%);
}

.import-panel h3 {
  margin: 3px 0 6px;
  font-size: 18px;
}

.import-panel p {
  margin: 0;
  color: var(--muted);
}

.import-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.import-file-label {
  cursor: pointer;
}

.import-preview {
  grid-column: 1 / -1;
  border-top: 1px solid #d9e4e8;
  padding: 12px 2px 0;
  color: var(--muted);
  font-size: 12px;
}

.import-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.import-summary span,
.import-action {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.import-preview-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid #dce7e6;
  border-radius: var(--radius-sm);
  background: #fbfdfc;
}

.import-preview-status strong {
  color: var(--ink);
}

.import-preview-status span,
.import-preview-meta {
  color: var(--muted);
}

.import-preview-status.blocked {
  border-color: #efc4bd;
  background: #fff8f6;
}

.import-preview-status.blocked strong {
  color: #a34c43;
}

.import-preview-status.ready {
  border-color: #bdd8ce;
  background: #f4faf7;
}

.import-preview-status.ready strong {
  color: #427c68;
}

.import-preview-status.committed {
  border-color: #cddde3;
  background: #f4f8fa;
}

.import-preview-status.committed strong {
  color: #587887;
}

.import-preview-meta {
  margin: 0 0 9px;
  font-size: 12px;
  line-height: 1.55;
}

.feedback-import-history {
  grid-column: 1 / -1;
  border-top: 1px solid #d9e4e8;
  padding-top: 12px;
}

.feedback-import-history > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.feedback-import-history > summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.feedback-import-history-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.feedback-import-history-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.feedback-import-history-row:hover {
  border-color: #d6e2e5;
  background: rgba(255, 255, 255, 0.9);
}

.feedback-import-history-row.is-active {
  border-color: #b9ced7;
  background: #f1f6f8;
}

.feedback-import-history-file {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.feedback-import-history-file strong,
.feedback-import-history-file small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feedback-import-history-file strong {
  font-size: 12px;
}

.feedback-import-history-file small,
.feedback-import-history-counts {
  color: var(--muted);
  font-size: 11px;
}

.feedback-import-history-status {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}

.feedback-import-history-status.is-committed {
  color: #527566;
  background: #e9f1ed;
}

.feedback-import-history-status.is-preview {
  color: #8b733d;
  background: #f5efd9;
}

.feedback-import-history-empty {
  padding: 10px 2px 2px;
  color: var(--muted);
  font-size: 12px;
}

.import-mapping {
  margin: 0 0 10px;
  border: 1px solid #dce5e4;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
}

.import-mapping summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  color: var(--text);
  font-weight: var(--weight-semibold);
  cursor: pointer;
}

.import-mapping summary span {
  color: var(--muted);
  font-weight: var(--weight-regular);
}

.import-mapping > ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0;
  padding: 0 10px 9px;
}

.import-mapping > ul > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 7px;
  padding: 5px 7px;
  color: var(--muted);
}

.import-mapping > ul > li strong {
  color: var(--text);
}

.import-mapping > ul > li.is-unmapped,
.import-mapping > ul > li.is-unmapped strong {
  color: #8a7650;
}

.import-mapping summary:focus-visible {
  outline: 2px solid var(--color-border-strong);
  outline-offset: 2px;
}

.import-diagnostics {
  margin: 0 0 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.import-diagnostics.error-list {
  border: 1px solid #efc4bd;
  background: #fff8f6;
  color: #a34c43;
}

.import-diagnostics.warning-list {
  border: 1px solid #ead8ac;
  background: #fffdf6;
  color: #896d2c;
}

.import-preview ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.import-preview li {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.import-preview em {
  color: #b45a50;
  font-style: normal;
}

.import-action.create {
  background: #e8f2d9;
}

.import-action.update {
  background: #f3e4bc;
}

.import-action.skip {
  background: #eef0f0;
}

.import-action.error {
  background: #f7ddd8;
}

.feedback-row .row-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.empty-state.block {
  padding: var(--space-6);
}

.work-log-form {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.work-log-attachment-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  padding: 9px 11px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card-soft);
  color: var(--color-muted);
  font-size: var(--font-sm);
}

.work-log-attachment-input input {
  width: 100%;
  min-width: 0;
  max-width: none;
  color: var(--color-text-muted);
  font: inherit;
  font-size: var(--font-xs);
}

.work-log-attachment-input input::file-selector-button {
  margin-right: 9px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  background: #fff;
  padding: 6px 9px;
  font: inherit;
  font-size: var(--font-xs);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.work-log-attachment-input input::file-selector-button:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-subtle);
}

.work-log-list {
  display: grid;
  gap: var(--space-3);
}

.detail-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.detail-section-heading h2 {
  margin-bottom: var(--space-1);
}

.detail-section-heading p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.work-log-order-control select {
  min-width: 112px;
  min-height: 34px;
  padding: 0 var(--space-6) 0 var(--space-3);
  border-color: var(--color-border);
  background-color: var(--color-card);
  color: var(--color-muted-dark);
  font-size: var(--font-xs);
}

.work-log-timeline {
  display: grid;
  gap: var(--space-5);
}

.work-log-day-group h3 {
  margin: 0 0 var(--space-3);
  color: var(--color-muted);
  font-size: var(--font-xs);
  font-weight: 650;
}

.work-log-day-items {
  display: grid;
}

.work-log-item {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  column-gap: var(--space-3);
  padding: 0 0 var(--space-3);
}

.work-log-item:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: -2px;
  left: 6px;
  width: 1px;
  background: var(--color-border);
}

.work-log-node {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: 10px;
  border: 2px solid var(--color-card);
  border-radius: 999px;
  background: var(--color-accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-accent) 28%, transparent);
}

.work-log-item-content {
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-card-soft);
}

.work-log-item header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-2);
}

.work-log-item header span {
  color: var(--color-muted);
  font-size: var(--font-xs);
  white-space: nowrap;
}

.work-log-item header em {
  font-style: normal;
  color: var(--color-muted);
}

.work-log-meta-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  min-width: 0;
}

.work-log-menu {
  position: relative;
  flex: 0 0 auto;
}

.work-log-menu summary {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: var(--weight-bold);
  line-height: 1;
  list-style: none;
}

.work-log-menu summary::-webkit-details-marker {
  display: none;
}

.work-log-menu summary:hover,
.work-log-menu[open] summary {
  background: var(--color-primary-soft);
  color: var(--color-text);
}

.work-log-menu-list {
  position: absolute;
  z-index: 8;
  top: calc(100% + 5px);
  right: 0;
  min-width: 96px;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-card);
  box-shadow: var(--shadow-md);
}

.work-log-menu-list button {
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  padding: 7px 8px;
  text-align: left;
  font: inherit;
  font-size: var(--font-xs);
}

.work-log-menu-list button:hover {
  background: #fff0ed;
}

.work-log-item p {
  margin: 0;
  white-space: pre-wrap;
  color: var(--color-text);
  font-size: var(--font-sm);
  line-height: var(--leading-relaxed);
}

.work-log-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.work-log-attachment {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  max-width: 100%;
  padding: 6px 9px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  background: var(--color-surface);
  text-decoration: none;
  font-size: var(--font-xs);
}

.work-log-attachment strong {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.work-log-edit-form,
.work-log-history {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.work-log-edit-form label {
  display: grid;
  gap: 6px;
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.work-log-edit-form select,
.work-log-edit-form textarea {
  width: 100%;
}

.work-log-history summary {
  color: var(--color-accent-strong);
  cursor: pointer;
  font-size: var(--font-xs);
}

.work-log-history ol {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding-left: var(--space-4);
}

.work-log-history li span {
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.work-log-history li p {
  margin-top: 4px;
  color: var(--color-muted);
}

.task-children-summary {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border-subtle);
}

.task-children-summary header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.task-children-summary header h3 {
  margin: 0;
}

.task-children-summary header span {
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.task-child-list {
  display: grid;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.task-child-row {
  display: grid;
  grid-template-columns: 72px minmax(160px, 1fr) minmax(100px, .55fr) auto 84px;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  color: var(--color-text);
  text-decoration: none;
}

.task-child-row + .task-child-row {
  border-top: 1px solid var(--color-border-subtle);
}

.task-child-row:hover {
  background: var(--color-card-soft);
}

.task-child-wbs,
.task-child-row small {
  color: var(--color-muted);
  font-size: var(--font-xs);
}

@media (max-width: 760px) {
  .task-child-row {
    grid-template-columns: 1fr auto;
  }

  .task-child-row > :nth-child(1),
  .task-child-row > :nth-child(3),
  .task-child-row > :nth-child(5) {
    display: none;
  }
}

.comment-form {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.comment-list {
  display: grid;
  gap: var(--space-3);
}

.comment-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  background: var(--color-card-soft);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.comment-item-highlight {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(126, 154, 170, 0.18);
  background: var(--color-primary-soft);
}

.comment-item header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-2);
}

.comment-item header span,
.muted-hint {
  color: var(--color-muted);
  font-size: var(--font-xs);
}

.comment-item p {
  margin: 0;
  white-space: pre-wrap;
  color: var(--color-text);
  font-size: var(--font-sm);
  line-height: var(--leading-relaxed);
}

.mention-token {
  color: var(--blue);
  font-weight: var(--weight-bold);
}

.compact-list {
  margin: 0;
}

.notification-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: 14px var(--space-4);
  margin-bottom: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-card);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.notification-card:hover {
  border-color: rgba(113, 143, 159, 0.35);
  box-shadow: var(--shadow-sm);
}

.notification-card.is-unread {
  border-color: rgba(113, 143, 159, 0.45);
  border-left: 5px solid var(--blue);
  background: linear-gradient(90deg, #edf5f7 0%, #fbfdfd 100%);
}

.notification-card.is-read {
  background: var(--color-card);
  opacity: 0.72;
}

.notification-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 12px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 15px;
  font-weight: 800;
}

.notification-card.is-read .notification-icon {
  color: #8c969b;
  background: #eef0ef;
}

.notification-body {
  min-width: 0;
}

.notification-title {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: var(--font-md);
}

.notification-card.is-unread .notification-title {
  font-weight: var(--weight-bold);
}

.notification-card.is-read .notification-title {
  color: #68747a;
  font-weight: var(--weight-medium);
}

.notification-body p {
  margin: 0;
  overflow: hidden;
  color: #6f7d83;
  font-size: var(--font-sm);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
  color: var(--muted);
  font-size: var(--font-sm);
  white-space: nowrap;
}

.notification-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: var(--font-sm);
  font-weight: var(--weight-bold);
}

.notification-card.is-unread .notification-status {
  color: #fff;
  background: var(--blue);
}

.notification-card.is-read .notification-status {
  color: #7b858a;
  background: #eef0ef;
}

.modal footer {
  position: sticky;
  z-index: 1;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 2px -23px 0;
  padding: 12px 23px 20px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), #fff 34%);
}

.toast {
  position: fixed;
  z-index: 30;
  right: 26px;
  bottom: 24px;
  padding: 11px 16px;
  border-radius: 10px;
  color: #fff;
  background: #29303b;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: 0.2s ease;
  pointer-events: none;
  font-size: 12px;
}

.toast.has-action {
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
}

.toast button {
  appearance: none;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  padding: 1px 0 1px 14px;
  color: #d5edf8;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.toast button:hover,
.toast button:focus-visible {
  color: #fff;
  outline: none;
}

.toast.show {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 10px;
  }

  .brand {
    justify-content: center;
    padding-inline: 0;
  }

  .brand > div:last-child {
    display: none;
  }

  .nav-item:not(.active)::after,
  .nav-item {
    font-size: 0;
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .nav-item small,
  .nav-item i {
    position: absolute;
    top: 5px;
    right: 5px;
  }

  .team-card {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-inline: 0;
  }

  .team-card .profile-menu {
    right: auto;
    left: 0;
    width: 220px;
  }

  .team-card .profile-trigger {
    display: flex;
    position: static;
    width: 100%;
    height: auto;
    justify-content: center;
  }

  .team-card .profile-copy,
  .team-card .profile-chevron { display: none; }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid,
  .detail {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .inline-create-form,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .feedback-create-panel .inline-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feedback-create-panel .inline-create-form > :first-child,
  .feedback-create-panel .inline-create-form > .primary-btn {
    grid-column: 1 / -1;
  }

  .filter-summary {
    align-items: flex-start;
  }
}

@media (max-width: 680px) {
  .topbar,
  .page {
    padding-inline: 18px;
  }

  .project-page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .project-page-heading > .secondary-btn {
    align-self: flex-start;
  }

  .search {
    width: 55%;
  }

  .metric-grid,
  .project-grid,
  .inline-create-form,
  .filter-panel,
  .form-row {
    grid-template-columns: 1fr;
  }

  .feedback-create-panel {
    padding: var(--space-4);
  }

  .feedback-create-panel .inline-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .type-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .record-head {
    display: none;
  }

  .record-table,
  .project-table {
    overflow: visible;
  }

  .record-row,
  .task-list-row,
  .work-item-row,
  .project-list-row,
  .feedback-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    min-width: 0;
    gap: 12px 16px;
    padding: 14px 16px;
  }

  .record-row > .record-cell:first-child {
    grid-column: 1 / -1;
  }

  .record-cell {
    display: grid;
    align-content: start;
    gap: 4px;
    min-width: 0;
  }

  .record-cell:not(:first-child)::before {
    color: var(--color-muted);
    content: attr(data-field-label);
    font-size: var(--font-xs);
    font-weight: var(--weight-medium);
    line-height: 1.2;
  }

  .record-cell .inline-field-control,
  .record-cell .inline-status-control,
  .record-cell .inline-field-control select,
  .record-cell .inline-field-control input,
  .record-cell .inline-status-control select {
    width: 100%;
  }

  .detail-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .work-log-order-control select {
    width: 100%;
  }

  .work-log-item header {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-1);
  }

  .work-log-item header span {
    white-space: normal;
  }

  .work-log-meta-actions {
    align-self: stretch;
    justify-content: space-between;
  }

  .task-in-progress-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .task-in-progress-panel .primary-btn {
    width: 100%;
  }

  .task-status-actions-body {
    grid-template-columns: 1fr;
  }

  .member-account-config form {
    grid-template-columns: 1fr;
  }

  .member-account-config p {
    grid-column: auto;
  }
}

@media (max-width: 540px) {
  .page-heading.has-date {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .page-heading.has-date > div {
    flex: 0 0 100%;
  }

  .page-heading.has-date .date-chip {
    margin-left: auto;
    white-space: nowrap;
  }

  .feedback-import-panel {
    grid-template-columns: 1fr;
    align-items: start;
    padding: var(--space-4);
  }

  .feedback-import-panel .import-actions {
    width: 100%;
  }

  .feedback-import-panel .import-actions .primary-btn,
  .feedback-import-panel .import-actions .secondary-btn {
    min-width: 0;
    flex: 1 1 0;
  }

  .feedback-import-history-row {
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
  }

  .feedback-import-history-counts {
    grid-column: 1 / -1;
  }
}
