:root {
  --bg: #f2f6fb;
  --surface: rgba(255, 255, 255, 0.46);
  --surface-strong: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.66);
  --line-strong: rgba(148, 163, 184, 0.42);
  --text: #18202e;
  --muted: #667085;
  --faint: #9ca7b8;
  --nav: rgba(255, 255, 255, 0.46);
  --primary: #4f6df5;
  --primary-soft: rgba(79, 109, 245, 0.12);
  --cyan: #0ea5e9;
  --green: #2f9d6a;
  --green-soft: #e9f7ef;
  --orange: #d97706;
  --orange-soft: #fff4df;
  --red: #c2413a;
  --red-soft: #fff0ee;
  --shadow: 0 22px 60px rgba(34, 48, 74, 0.11);
  --soft-shadow: 0 14px 34px rgba(34, 48, 74, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
}

* {
  box-sizing: border-box;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.28);
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.42);
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-width: 1200px;
  background: #eef5fc;
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  cursor: default;
  opacity: .62;
  box-shadow: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 204px minmax(620px, 1fr) 344px;
  gap: 18px;
  height: 100vh;
  padding: 18px;
  overflow: hidden;
}

body:not(.workbench-page) .app-shell {
  grid-template-columns: 204px minmax(0, 1fr);
}

body:not(.workbench-page) .insight-rail {
  display: none;
}

body:not(.workbench-page) .page-root {
  padding-bottom: 24px;
}

.nav-rail,
.insight-rail {
  height: calc(100vh - 36px);
  overflow: hidden;
}

.nav-rail {
  background: var(--nav);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), var(--soft-shadow);
  backdrop-filter: blur(30px) saturate(1.35);
}

.nav-rail {
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 8px;
  align-items: center;
  padding: 0 2px 8px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  font-weight: 850;
  background: linear-gradient(145deg, #101828 0%, #4f6df5 54%, #2dd4bf 100%);
  box-shadow: 0 18px 38px rgba(79, 109, 245, 0.28);
}

.brand h1 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.main-nav {
  display: grid;
  gap: 6px;
}

.nav-item,
.reset-button,
.nav-section-title button,
.primary-button,
.secondary-button,
.danger-ghost-button,
.ghost-button,
.segmented button,
.project-card,
.task-row {
  border: 0;
  border-radius: 16px;
}

.nav-item {
  width: 100%;
  min-height: 40px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.18);
  color: #485467;
  text-align: left;
  font-weight: 720;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  box-shadow: var(--soft-shadow);
}

.nav-section-title,
.panel-heading,
.chat-message-head,
.task-line,
.log-head,
.page-header,
.chat-actions,
.priority-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-section-title {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.nav-section-title button,
.reset-button,
.secondary-button,
.danger-ghost-button,
.ghost-button,
.segmented button {
  min-height: 36px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.44);
  color: #405066;
  font-weight: 720;
}

.danger-ghost-button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(194, 65, 58, 0.18);
  border-radius: 12px;
  background: rgba(255, 240, 238, 0.76);
  color: var(--red);
  font-size: inherit;
  font-weight: 760;
  box-shadow: 0 8px 18px rgba(194, 65, 58, 0.08);
}

.muted-line {
  color: var(--muted);
  font-size: 12px;
}

.reset-button {
  margin-top: auto;
}

.main-stage {
  height: calc(100vh - 36px);
  overflow: auto;
  padding: 0;
  scrollbar-gutter: stable;
}

body.workbench-page .main-stage {
  overflow: visible;
}

body:not(.workbench-page) .main-stage {
  width: calc(100% - 12px);
  min-width: 0;
  overflow: hidden;
}

.page-root {
  position: relative;
  min-height: 100%;
  height: 100%;
  background: transparent;
}

body:not(.workbench-page) .page-root {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  padding: 0 24px;
}

.page-content {
  min-height: 0;
  overflow-y: auto;
  padding: 10px 8px 24px 0;
}

.page-header {
  z-index: 4;
  align-items: flex-end;
  margin-bottom: 0;
  padding: 4px 16px 8px 0;
  background: linear-gradient(180deg, rgba(242, 246, 251, 0.94), rgba(242, 246, 251, 0.72) 78%, transparent);
  backdrop-filter: blur(18px);
}

.page-header-copy {
  min-width: 0;
}

.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 0 1px;
}

.nav-item,
.reset-button,
.nav-section-title button,
.primary-button,
.secondary-button,
.ghost-button,
.segmented button,
.calendar-task {
  border-radius: 12px;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.page-header h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.page-subtitle {
  margin: 4px 0 0;
  max-width: 690px;
  color: rgba(102, 112, 133, 0.7);
  font-size: 14px;
  line-height: 1.45;
}

.glass-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(30px) saturate(1.35);
}

.glass-panel:has(.custom-select.is-open) {
  position: relative;
  z-index: 330;
}

.agent-console {
  display: grid;
  grid-template-rows: minmax(340px, 1fr) auto;
  height: 100%;
  min-height: 0;
  padding: 0 0 0;
  overflow: visible;
}

.agent-console.glass-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.agent-console .compose-card {
  align-self: end;
  z-index: 6;
  margin: 0;
}

.conversation-scroll {
  overflow-y: auto;
  margin: 26px 24px 18px;
  padding: 0;
  min-height: 0;
}

.conversation {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 0;
  min-height: min-content;
}

.chat-message {
  max-width: min(760px, 82%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
}

.chat-message.user {
  justify-self: end;
  position: relative;
  background: rgba(219, 234, 254, 0.72);
  color: #1e3a8a;
  border-color: transparent;
  box-shadow: none;
}

.chat-message.user.is-pending {
  padding-right: 54px;
}

.message-pending-dots {
  position: absolute;
  right: 18px;
  top: 50%;
  display: inline-flex;
  gap: 3px;
  transform: translateY(-50%);
}

.message-pending-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #293b8f;
  opacity: 0.5;
  animation: thinking-dot 1s infinite ease-in-out;
}

.message-pending-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.message-pending-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes thinking-dot {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.chat-message.agent {
  justify-self: start;
}

.chat-message h3,
.chat-message h4,
.chat-message p,
.chat-message ul {
  margin-top: 0;
}

.chat-message p {
  line-height: 1.65;
}

.chat-message ul {
  padding-left: 18px;
  line-height: 1.75;
}

.chat-message-head {
  margin-bottom: 10px;
}

.chat-message-head strong {
  font-size: 15px;
}

.compose-card {
  border: 1px solid rgba(203, 213, 225, 0.68);
  border-radius: 22px;
  padding: 14px 58px 14px 18px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(34, 48, 74, 0.12);
  backdrop-filter: none;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--text);
  outline: none;
}

input[type="date"],
select {
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(255, 255, 255, 0.72);
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
}

select {
  background-image: linear-gradient(45deg, transparent 50%, #667085 50%), linear-gradient(135deg, #667085 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  padding-right: 34px;
}

input[type="date"] {
  padding-right: 34px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.58;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

textarea:focus,
input:focus,
select:focus {
  border-color: rgba(79, 109, 245, 0.48);
  box-shadow: 0 0 0 4px rgba(79, 109, 245, 0.1);
}

select {
  height: 36px;
}

#dailyReport {
  min-height: 72px;
  padding: 0;
  border: 0;
  border-radius: 0;
  resize: none;
  background: transparent;
  box-shadow: none;
}

.compose-input-row {
  position: relative;
}

.send-button {
  position: absolute;
  right: -46px;
  bottom: 2px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #293b8f;
  color: #fff;
  font-size: 20px;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(41, 59, 143, 0.18);
}

.chat-actions {
  justify-content: flex-start;
  margin-top: 12px;
  padding: 0;
}

.primary-button {
  min-height: 40px;
  padding: 0 15px;
  background: #293b8f;
  color: #fff;
  font-weight: 760;
  box-shadow: 0 12px 24px rgba(41, 59, 143, 0.22);
}

.secondary-button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(41, 59, 143, 0.2);
  background: rgba(255, 255, 255, 0.82);
  color: #293b8f;
  font-size: inherit;
  font-weight: 760;
  box-shadow: 0 8px 18px rgba(34, 48, 74, 0.08);
}

.inline-action-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(41, 59, 143, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  color: #293b8f;
  font-size: 13px;
  font-weight: 760;
  box-shadow: 0 6px 14px rgba(34, 48, 74, 0.06);
}

.insight-rail {
  padding: 0 8px 0 0;
  display: grid;
  gap: 6px;
  align-content: start;
  overflow-y: auto;
}

.insight-rail .glass-panel {
  padding: 14px;
  border: 1px solid rgba(203, 213, 225, 0.68);
  background: #ffffff;
  box-shadow: none;
  backdrop-filter: none;
}

.panel-heading {
  margin-bottom: 12px;
}

.panel-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.panel-heading strong {
  font-size: 14px;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.78);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4f6df5, #2dd4bf);
}

.rail-list,
.priority-bars,
.card-grid,
.project-stack,
.task-list,
.log-list {
  display: grid;
  gap: 10px;
}

.log-list {
  gap: 8px;
}

.insight-rail .rail-list,
.insight-rail .priority-bars {
  gap: 0;
}

.rail-item,
.task-card,
.project-card,
.log-card,
.timeline-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 10px 24px rgba(34, 48, 74, 0.045);
}

.rail-item {
  padding: 10px;
}

.rail-row {
  padding: 11px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.rail-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.rail-row:last-child {
  padding-bottom: 0;
}

.priority-group {
  padding: 11px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.priority-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.priority-group:last-child {
  padding-bottom: 0;
}

.rail-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.rail-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.rail-task {
  display: grid;
  gap: 3px;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.rail-task strong {
  font-size: 13px;
  line-height: 1.45;
}

.rail-task span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.check-line {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
}

.check-line input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--primary);
}

.check-line span {
  display: grid;
  gap: 3px;
}

.check-line strong {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.check-line em,
.check-line small {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.check-line.is-done,
.rail-task.is-done {
  opacity: 0.58;
}

.check-line.is-done strong,
.rail-task.is-done strong {
  text-decoration: line-through;
}

.priority-line {
  align-items: center;
}

.priority-meter {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.74);
  overflow: hidden;
}

.priority-fill {
  height: 100%;
  border-radius: inherit;
}

.priority-fill.p0 {
  background: #ef4444;
}

.priority-fill.p1 {
  background: #f59e0b;
}

.priority-fill.p2 {
  background: #2f9d6a;
}

.priority {
  display: inline-flex;
  min-width: 34px;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 900;
}

.priority-p0 {
  background: var(--red-soft);
  color: var(--red);
}

.priority-p1 {
  background: var(--orange-soft);
  color: var(--orange);
}

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

.priority-done {
  background: rgba(226, 232, 240, 0.95);
  color: #4c6470;
}

.panel-heading .priority-p0 {
  color: var(--red);
}

.panel-heading .priority-p1 {
  color: var(--orange);
}

.panel-heading .priority-p2 {
  color: var(--green);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #3854d8;
  background: rgba(79, 109, 245, 0.12);
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

.pill.warning {
  color: var(--orange);
  background: var(--orange-soft);
}

.pill.danger {
  color: var(--red);
  background: var(--red-soft);
}

.hidden {
  display: none;
}

.plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.plan-block {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.action-plan-block {
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.action-plan-block.is-executed {
  border-color: rgba(45, 148, 111, 0.24);
  background: rgba(240, 253, 244, 0.64);
}

.action-plan-block.needs-confirm {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(255, 251, 235, 0.72);
}

.action-plan-block.is-undone {
  border-color: rgba(203, 213, 225, 0.72);
  background: rgba(248, 250, 252, 0.74);
}

.plan-block.wide {
  grid-column: auto;
}

.plan-block h4 {
  margin: 0 0 5px;
  color: #405066;
  font-size: 13px;
}

.plan-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.plan-block-head h4 {
  margin: 0;
}

.small-action-button {
  min-height: 30px;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 12px;
}

.plan-block ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.plan-block li {
  font-size: 13px;
}

.plan-block li strong {
  color: #405066;
  font-size: 14px;
  font-weight: 760;
}

.critical-path-block p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.critical-path-block p strong {
  color: #405066;
  font-size: 12px;
}

.critical-path-block p span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 999px;
  padding: 0 8px;
  background: rgba(255, 255, 255, 0.62);
}

.critical-path-block p span + span::before {
  content: "→";
  margin-right: 6px;
  color: #94a3b8;
}

.confirm-reason {
  margin: 8px 0 0;
  color: #8a6730;
  font-size: 12px;
  line-height: 1.45;
}

.plan-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-stack {
  grid-template-columns: 1fr;
}

.project-card,
.task-card,
.log-card {
  padding: 15px;
}

.project-card {
  text-align: left;
  color: var(--text);
  box-shadow: none;
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.56);
}

.project-card h3,
.task-card h3,
.log-card h3 {
  margin: 0 0 8px;
}

.project-card p,
.task-card p,
.log-card p,
.empty-state {
  color: var(--muted);
  line-height: 1.65;
}

.project-task-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.project-task-preview span {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--muted);
  font-size: 12px;
}

.collapsible-heading {
  align-items: center;
}

.project-collapse-button {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 780;
  text-align: left;
}

.project-collapse-button i {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(203, 213, 225, 0.76);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.project-collapse-button i::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  width: 6px;
  height: 6px;
  border-right: 1.8px solid #667085;
  border-bottom: 1.8px solid #667085;
  transform: rotate(45deg);
  transition: transform .16s ease, top .16s ease;
}

.project-collapse-button[aria-expanded="false"] i::before {
  top: 7px;
  transform: rotate(-45deg);
}

.project-collapse-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-collapse-button em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  white-space: nowrap;
}

.project-detail {
  display: grid;
  gap: 16px;
}

.project-detail-card {
  padding: 16px;
  box-shadow: none;
  backdrop-filter: none;
}

.project-detail-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 18px;
}

.project-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.project-field.wide {
  grid-column: 1 / -1;
}

.project-field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.project-field input,
.project-field select,
.custom-select-trigger {
  height: 42px;
  min-width: 0;
  border-radius: 14px;
  padding: 0 13px;
  font-size: 14px;
}

.project-field textarea {
  min-height: 86px;
  border-radius: 14px;
  padding: 11px 13px;
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
}

.deadline-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
  align-items: center;
}

.deadline-control input:disabled {
  color: var(--faint);
  background: rgba(255, 255, 255, 0.42);
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 14px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.72);
  color: #405066;
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}

.inline-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
}

.custom-select {
  position: relative;
  min-width: 0;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.custom-select-trigger span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-left: 2px;
}

.custom-select-trigger i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 2px solid #667085;
  border-bottom: 2px solid #667085;
  transform: translateY(-2px) rotate(45deg);
}

.custom-select.is-open .custom-select-trigger {
  border-color: rgba(79, 109, 245, 0.48);
  box-shadow: 0 0 0 4px rgba(79, 109, 245, 0.1);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 300;
  display: grid;
  gap: 3px;
  min-width: max-content;
  border: 1px solid rgba(203, 213, 225, 0.86);
  border-radius: 14px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 38px rgba(34, 48, 74, 0.14);
}

.custom-select-menu[hidden] { display: none; }
.custom-select.is-open { z-index: 320; }

.date-control {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  padding: 0 30px 0 11px;
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='1.5'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18M8 15h2M14 15h2M8 18h2'/%3E%3C/svg%3E") no-repeat right 10px center;
  cursor: pointer;
}
.task-editors input.date-control { padding-right: 28px; }
.date-control:disabled { opacity: .5; cursor: default; }
.date-popover {
  position: fixed;
  z-index: 1000;
  width: 280px;
  max-width: calc(100vw - 16px);
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #fbfdff;
  color: var(--text);
  box-shadow: 0 12px 36px rgba(34,48,74,.14);
  font-size: 14px;
}
.date-popover button { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; border-radius: 8px; }
.date-popover-head { display: grid; grid-template-columns: 1fr 30px 30px; align-items: center; gap: 4px; margin-bottom: 10px; }
.date-popover-head button { font-size: 24px; height: 30px; }
.date-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.date-grid span { color: var(--muted); line-height: 28px; font-size: 12px; }
.date-grid button { height: 32px; padding: 0; font-variant-numeric: tabular-nums; }
.date-grid .outside-month { color: #a6afbd; }
.date-popover button:hover { background: #edf0fc; }
.date-grid .today { box-shadow: inset 0 0 0 1px #ccd3ee; }
.date-grid .selected { background: #293b8f; color: white; }
.date-popover-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.date-popover-foot button { color: #293b8f; padding: 6px 10px; }

.custom-select-menu button {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  padding: 0 11px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
}

.custom-select-menu button:hover,
.custom-select-menu button.active {
  background: rgba(79, 109, 245, 0.1);
  color: #293b8f;
}

input::placeholder,
textarea::placeholder {
  color: rgba(102, 112, 133, 0.42);
}

.toast {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  max-width: 320px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 14px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.94);
  color: #293b8f;
  font-size: 13px;
  font-weight: 760;
  box-shadow: 0 14px 34px rgba(34, 48, 74, 0.12);
}

.progress-readout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.58);
}

.progress-readout strong {
  font-size: 15px;
}

.progress-readout span {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.project-detail-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 32, 46, 0.18);
}

.content-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 32, 46, 0.12);
}

.confirm-dialog {
  width: min(420px, calc(100% - 48px));
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(34, 48, 74, 0.14);
  backdrop-filter: none;
}

.confirm-dialog h3 {
  margin: 0;
  font-size: 18px;
}

.confirm-dialog p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.task-dialog {
  width: min(560px, calc(100vw - 48px));
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(34, 48, 74, 0.12);
  backdrop-filter: none;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.modal-head h3 {
  margin: 0;
  font-size: 20px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

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

.modal-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 2px;
}

.task-row {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(150px, 1fr) 448px;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
}

.task-row:has(.custom-select.is-open) {
  z-index: 340;
}

.task-row.priority-task-row {
  grid-template-columns: 118px minmax(150px, 1fr) 448px;
}

.task-row.deletable-task-row {
  grid-template-columns: 54px minmax(150px, 1fr) 448px auto;
}

.task-row.priority-task-row.deletable-task-row {
  grid-template-columns: 118px minmax(150px, 1fr) 448px auto;
}

.project-badge {
  display: block;
  max-width: 118px;
  justify-self: start;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--project-bg);
  color: #485467;
  font-size: 12px;
  font-weight: 620;
}

.task-row.is-done {
  opacity: 0.58;
}

.task-row.is-done strong {
  text-decoration: line-through;
}

.task-editors {
  display: grid;
  grid-template-columns: 68px 92px repeat(2, 132px);
  gap: 8px;
  min-width: 0;
}

.task-editors input,
.task-editors select,
.task-editors .custom-select-trigger {
  height: 38px;
  min-width: 0;
  border-radius: 13px;
  padding: 0 11px;
  font-size: 13px;
}

.task-editors .custom-select-menu button {
  font-size: 13px;
}

.task-delete-button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  justify-self: end;
  border: 1px solid rgba(194, 65, 58, 0.18);
  border-radius: 50%;
  background: rgba(255, 240, 238, 0.68);
  color: var(--red);
}

.task-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.task-edit-button {
  height: 28px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.74);
  color: #405066;
  font-size: 12px;
  font-weight: 760;
}

.trash-icon {
  display: block;
  width: 17px;
  height: 17px;
  background: currentColor;
  mask: url('./垃圾桶.svg') center / contain no-repeat;
  -webkit-mask: url('./垃圾桶.svg') center / contain no-repeat;
  transform: translateX(-1px);
}

.plan-update-list li {
  display: grid;
  grid-template-columns: minmax(130px, 1.1fr) minmax(92px, .8fr) repeat(2, minmax(128px, 1fr));
  gap: 6px 12px;
  align-items: start;
  padding: 7px 0;
  border-bottom: 1px solid rgba(203, 213, 225, 0.58);
}

.plan-update-list li:last-child {
  border-bottom: 0;
}

.plan-update-list span,
.plan-update-list em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .task-row.deletable-task-row,
  .task-row.priority-task-row.deletable-task-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .task-row .task-editors { grid-column: 1 / -1; grid-row: 2; justify-self: end; max-width: 100%; }
  .task-row-actions { grid-column: 3; grid-row: 1; }
}
@media (max-width: 560px) {
  .task-row .task-editors { grid-template-columns: repeat(2, minmax(132px, 1fr)); width: 100%; }
  .plan-update-list li { grid-template-columns: 1fr; }
}

.danger-button {
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 12px;
  background: var(--red);
  color: #fff;
  font-weight: 760;
  box-shadow: 0 12px 24px rgba(194, 65, 58, 0.18);
}

.calendar-shell {
  display: grid;
  gap: 12px;
}

.calendar-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  padding: 16px;
}

.calendar-weekday {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-align: center;
}

.calendar-day {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.42);
}

.calendar-day.today {
  border-color: rgba(79, 109, 245, 0.36);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--soft-shadow);
}

.calendar-day.muted {
  opacity: 0.42;
}

.calendar-date {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.calendar-date strong {
  font-size: 22px;
}

.calendar-date span,
.calendar-empty {
  color: var(--faint);
  font-size: 12px;
}

.calendar-tasks {
  display: grid;
  gap: 6px;
}

.calendar-task {
  border: 0;
  text-align: left;
  border-radius: 10px;
  padding: 6px 7px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  background: rgba(255, 255, 255, 0.6);
}

.calendar-task.p0 {
  color: var(--red);
  background: var(--red-soft);
}

.calendar-task.p1 {
  color: var(--orange);
  background: var(--orange-soft);
}

.calendar-task.p2 {
  color: var(--green);
  background: var(--green-soft);
}

.calendar-task.is-done {
  opacity: 0.55;
  text-decoration: line-through;
}

.gantt-board {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: none;
  backdrop-filter: none;
}

.gantt-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.gantt-toolbar strong,
.gantt-toolbar span {
  display: block;
}

.gantt-toolbar span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.gantt-range-tabs {
  flex: 0 0 auto;
  border-color: rgba(180, 190, 206, 0.82);
  background: #ffffff;
  box-shadow: none;
}

.gantt-range-tabs button {
  color: #465467;
}

.gantt-range-tabs button.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: none;
}

.gantt-grid {
  --gantt-label-width: 280px;
  display: grid;
  grid-template-columns: var(--gantt-label-width) minmax(0, 1fr);
  gap: 0;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.68);
}

.gantt-task-head,
.gantt-date-head,
.gantt-task-meta,
.gantt-timeline {
  min-height: 54px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.gantt-task-head {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.gantt-date-head {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--gantt-days), minmax(22px, 1fr));
}

.gantt-date-head span {
  display: grid;
  place-items: center;
  border-left: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.gantt-date-head span.today {
  color: #293b8f;
}

.gantt-task-meta {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 14px;
}

.gantt-task-meta strong {
  font-size: 14px;
}

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

.gantt-timeline {
  position: relative;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(148, 163, 184, 0.14) 0,
    rgba(148, 163, 184, 0.14) 1px,
    transparent 1px,
    transparent calc(100% / var(--gantt-days))
  );
}

.gantt-bar {
  position: absolute;
  top: 50%;
  height: 18px;
  min-width: 8px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: #64748b;
}

.gantt-bar.priority-p0 {
  background: #ef4444;
}

.gantt-bar.priority-p1 {
  background: #f59e0b;
}

.gantt-bar.priority-p2 {
  background: #2f9d6a;
}

.gantt-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #293b8f;
  opacity: 0.6;
  transform: translateX(-1px);
  z-index: 2;
}

.gantt-empty {
  grid-column: 1 / -1;
  margin: 14px;
}

.period-nav {
  display: inline-flex;
  margin: 0 auto;
  justify-self: center;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: 1px solid rgba(180, 190, 206, 0.82);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(34, 48, 74, 0.07);
}

.period-nav span {
  min-width: 172px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  text-align: center;
}

.period-arrow {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #293b8f;
  font-size: 18px;
  font-weight: 820;
  line-height: 1;
}

.period-arrow:hover {
  background: rgba(41, 59, 143, 0.08);
}

.priority-heading > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.priority-heading .priority {
  font-weight: 950;
}

.task-row strong {
  display: block;
  margin-bottom: 4px;
}

.status-tag {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.segmented {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid var(--line);
}

.segmented button.active {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: var(--soft-shadow);
}

.task-tabs {
  position: static;
  box-shadow: 0 10px 24px rgba(34, 48, 74, 0.08);
}

.task-list .glass-panel,
.calendar-board {
  background: rgba(255, 255, 255, 0.64);
  box-shadow: none;
  backdrop-filter: none;
}

.calendar-day.today {
  box-shadow: none;
}

.log-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
}

.log-head strong {
  font-size: 15px;
}

.log-card p {
  margin: 0;
  line-height: 1.45;
}

.empty-state {
  border: 1px dashed #cdd5e1;
  border-radius: 20px;
  padding: 24px;
  text-align: center;
}
