:root {
  --bg: #f4f9fd;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --ink: #12212b;
  --muted: #6b7c88;
  --line: rgba(64, 145, 184, 0.22);
  --accent: #168fb1;
  --accent-strong: #0d6f91;
  --blue: #4f6ff5;
  --cyan: #18b8c8;
  --gold: #b87a11;
  --red: #cf3d4a;
  --shadow: 0 18px 48px rgba(47, 86, 110, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(247, 252, 255, 0.72), rgba(244, 249, 253, 0.94)),
    url("/assets/tech-bg.svg") center top / cover fixed;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(24, 184, 200, 0.12), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(79, 111, 245, 0.10), transparent 24%);
}

.login-body {
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(24, 184, 200, 0.18), transparent 28%),
    radial-gradient(circle at 88% 14%, rgba(79, 111, 245, 0.22), transparent 26%),
    linear-gradient(180deg, #f4fbff 0%, #eef7fb 100%);
}

.login-body::after {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 38%, rgba(24, 184, 200, 0.08) 42%, transparent 48%),
    radial-gradient(circle at 72% 24%, rgba(79, 111, 245, 0.13), transparent 24%);
  animation: loginSweep 9s cubic-bezier(0.22, 1, 0.36, 1) infinite alternate;
}

.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 36px;
}

.login-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.login-ambient span {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(24, 184, 200, 0.2);
  box-shadow: inset 0 0 32px rgba(24, 184, 200, 0.08), 0 0 42px rgba(79, 111, 245, 0.08);
  animation: loginOrbit 12s cubic-bezier(0.22, 1, 0.36, 1) infinite alternate;
}

.login-ambient span:nth-child(1) {
  width: 360px;
  height: 360px;
  left: -90px;
  top: 12%;
}

.login-ambient span:nth-child(2) {
  width: 220px;
  height: 220px;
  right: 9%;
  top: 9%;
  animation-delay: -3s;
}

.login-ambient span:nth-child(3) {
  width: 520px;
  height: 520px;
  right: -180px;
  bottom: -180px;
  animation-delay: -6s;
}

.login-hero {
  width: min(1180px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  align-items: center;
  gap: 48px;
  padding: 48px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(232, 248, 253, 0.6)),
    linear-gradient(90deg, rgba(24, 184, 200, 0.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(24, 184, 200, 0.07) 1px, transparent 1px);
  background-size: auto, 52px 52px, 52px 52px;
  box-shadow: 0 28px 80px rgba(47, 86, 110, 0.18);
  backdrop-filter: blur(18px);
  overflow: hidden;
  position: relative;
}

.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(24, 184, 200, 0.12), transparent),
    radial-gradient(circle at 70% 50%, rgba(79, 111, 245, 0.1), transparent 30%);
  opacity: 0.82;
  transform: translateX(-45%);
  animation: loginHeroScan 7.5s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.login-copy h1 {
  max-width: 620px;
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 1.06;
}

.login-line {
  max-width: 620px;
  margin-top: 22px;
  color: #426779;
  font-size: 18px;
  line-height: 1.8;
  font-weight: 750;
}

.login-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.login-signals span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(24, 184, 200, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #24657c;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(64, 145, 184, 0.1);
  animation: loginSignalFloat 4.6s cubic-bezier(0.22, 1, 0.36, 1) infinite alternate;
}

.login-signals span:nth-child(2) {
  animation-delay: -1.4s;
}

.login-signals span:nth-child(3) {
  animation-delay: -2.8s;
}

.login-panel {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 30px;
  border: 1px solid rgba(64, 145, 184, 0.24);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 252, 255, 0.78)),
    radial-gradient(circle at 12% 8%, rgba(24, 184, 200, 0.16), transparent 32%);
  box-shadow: 0 28px 70px rgba(47, 86, 110, 0.18);
  overflow: hidden;
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent, rgba(24, 184, 200, 0.12), transparent);
  transform: translateX(-120%);
  animation: loginGlint 4.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.login-panel > * {
  position: relative;
  z-index: 1;
}

.login-panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}

.login-access-copy {
  color: #375d71;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.login-orbit {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(24, 184, 200, 0.42);
  background: radial-gradient(circle, rgba(24, 184, 200, 0.18), rgba(255, 255, 255, 0.8));
  box-shadow: inset 0 0 18px rgba(24, 184, 200, 0.2), 0 14px 28px rgba(64, 145, 184, 0.16);
  animation: loginFloat 3.8s cubic-bezier(0.22, 1, 0.36, 1) infinite alternate;
}

.login-orbit::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(24, 184, 200, 0.8);
  transform: translate(35px, 4px);
}

.login-scanline {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(24, 184, 200, 0.62), transparent);
  animation: loginLinePulse 2.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.login-field {
  display: grid;
  gap: 8px;
  color: #557384;
  font-size: 13px;
  font-weight: 900;
}

.login-field input {
  height: 46px;
  border: 1px solid rgba(64, 145, 184, 0.2);
  border-radius: 8px;
  padding: 0 13px;
  background: rgba(246, 251, 253, 0.86);
  color: var(--ink);
  outline: none;
  transition: border-color 240ms ease, box-shadow 240ms ease, transform 240ms ease;
}

.login-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(24, 184, 200, 0.14);
}

.login-submit {
  height: 46px;
  justify-content: center;
  margin-top: 4px;
}

.login-message {
  min-height: 22px;
  color: var(--red);
  font-size: 13px;
  font-weight: 850;
}

@keyframes loginSweep {
  from {
    transform: translate3d(-2%, -1%, 0) rotate(-1deg);
  }
  to {
    transform: translate3d(2%, 1%, 0) rotate(1deg);
  }
}

@keyframes loginGlint {
  0%, 46% {
    transform: translateX(-120%);
  }
  76%, 100% {
    transform: translateX(120%);
  }
}

@keyframes loginFloat {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-5px) scale(1.04);
  }
}

@keyframes loginOrbit {
  from {
    transform: translate3d(0, 0, 0) scale(0.96);
    opacity: 0.42;
  }
  to {
    transform: translate3d(18px, -14px, 0) scale(1.04);
    opacity: 0.82;
  }
}

@keyframes loginHeroScan {
  0%, 32% {
    transform: translateX(-65%);
    opacity: 0.28;
  }
  62% {
    opacity: 0.86;
  }
  100% {
    transform: translateX(62%);
    opacity: 0.36;
  }
}

@keyframes loginSignalFloat {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-6px);
  }
}

@keyframes loginPanelBreathe {
  from {
    transform: translateY(0);
    box-shadow: 0 28px 70px rgba(47, 86, 110, 0.18);
  }
  to {
    transform: translateY(-5px);
    box-shadow: 0 34px 86px rgba(47, 86, 110, 0.22);
  }
}

@keyframes loginLinePulse {
  0%, 100% {
    opacity: 0.34;
    transform: scaleX(0.72);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

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

.shell {
  width: min(1580px, calc(100% - 44px));
  margin: 0 auto;
  padding: 28px 0 42px;
  position: relative;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

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

h1 {
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: 0;
  color: #0f2a3a;
}

.ritual-line {
  position: relative;
  margin-top: 10px;
  max-width: 760px;
  color: #426779;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.55;
  letter-spacing: 0;
  opacity: 0.92;
}

.ritual-line::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(24, 184, 200, 0.62);
  vertical-align: 1px;
}

.ritual-line.is-loading::before {
  animation: ritualPulse 1.45s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes ritualPulse {
  0% {
    transform: scale(0.82);
    opacity: 0.48;
  }
  60% {
    transform: scale(1.18);
    opacity: 1;
  }
  100% {
    transform: scale(0.82);
    opacity: 0.48;
  }
}

h2 {
  font-size: 18px;
  line-height: 1.3;
}

h3 {
  font-size: 22px;
  line-height: 1.3;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 6px;
}

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

.ai-badge,
.week-range,
.collapse-button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(24, 184, 200, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(64, 145, 184, 0.11);
}

.panel-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.week-range {
  cursor: pointer;
}

.collapse-button {
  justify-content: center;
  width: 34px;
  padding: 0;
  cursor: pointer;
  color: #456578;
  transition:
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1),
    background 360ms ease,
    box-shadow 420ms ease;
}

.panel-content {
  max-height: 2400px;
  opacity: 1;
  overflow: hidden;
  transform: translateY(0) scaleY(1);
  transform-origin: top center;
  transition:
    max-height 760ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 360ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 680ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: max-height, opacity, transform;
}

.panel {
  transition:
    min-height 760ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 520ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 420ms ease,
    background 520ms ease;
}

.panel.is-collapsed .panel-content {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px) scaleY(0.985);
}

.panel.is-collapsed,
.main-panel.is-collapsed,
.risk-panel.is-collapsed,
.archive-panel.is-collapsed,
.review-panel.is-collapsed {
  min-height: 0;
}

.panel.is-collapsed .panel-head {
  border-bottom: 0;
}

.panel.is-collapsed:hover,
.panel.is-collapsed.is-hover-open,
.main-panel.is-collapsed:hover,
.main-panel.is-collapsed.is-hover-open,
.risk-panel.is-collapsed:hover,
.risk-panel.is-collapsed.is-hover-open,
.archive-panel.is-collapsed:hover,
.archive-panel.is-collapsed.is-hover-open,
.review-panel.is-collapsed:hover,
.review-panel.is-collapsed.is-hover-open {
  min-height: 0;
  box-shadow: 0 24px 64px rgba(47, 86, 110, 0.18);
  border-color: rgba(24, 184, 200, 0.28);
}

.panel.is-collapsed:hover .panel-content,
.panel.is-collapsed.is-hover-open .panel-content {
  max-height: 2400px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scaleY(1);
  transition:
    max-height 860ms cubic-bezier(0.2, 0.9, 0.18, 1),
    opacity 420ms cubic-bezier(0.16, 1, 0.3, 1) 80ms,
    transform 760ms cubic-bezier(0.2, 0.9, 0.18, 1);
}

.panel.is-collapsed:hover .panel-head,
.panel.is-collapsed.is-hover-open .panel-head {
  border-bottom: 1px solid var(--line);
}

.panel.is-collapsed .collapse-button {
  transform: scale(1);
}

.panel.is-collapsed:hover .collapse-button,
.panel.is-collapsed.is-hover-open .collapse-button {
  transform: scale(1.06);
  box-shadow: 0 12px 24px rgba(64, 145, 184, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .panel,
  .panel-content,
  .collapse-button {
    transition: none;
  }
}

.week-picker {
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.ai-badge.enabled {
  border-color: rgba(22, 143, 177, 0.36);
  background: rgba(226, 249, 252, 0.86);
}

.primary-button,
.ghost-button,
.icon-button,
.delete-button,
.mini-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  min-height: 38px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-button {
  background: linear-gradient(135deg, #1ab6c7, #6378f6);
  border-color: rgba(24, 184, 200, 0.45);
  color: #fff;
  padding: 0 18px;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(51, 123, 200, 0.22);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  padding: 0 16px;
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.26);
  font-size: 12px;
  font-weight: 900;
}

.command-grid {
  display: grid;
  grid-template-columns: 520px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
  align-items: stretch;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.metric,
.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.metric {
  border-radius: 8px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  min-height: 116px;
}

.metric::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 16px;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(24, 184, 200, 0.16), rgba(99, 120, 246, 0.13));
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.92;
}

.metric-completed {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(232, 249, 240, 0.78));
}

.metric-active {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(231, 242, 255, 0.78));
}

.metric-today {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 246, 224, 0.82));
}

.metric-risk {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 235, 238, 0.82));
}

.metric-completed::after {
  background-image: url("/assets/icon-completed.svg");
}

.metric-active::after {
  background-image: url("/assets/icon-active.svg");
}

.metric-today::after {
  background-image: url("/assets/icon-today.svg");
}

.metric-risk::after {
  background-image: url("/assets/icon-risk.svg");
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.metric strong {
  font-size: 30px;
}

.metric.urgent strong {
  color: var(--gold);
}

.metric.risk strong {
  color: var(--red);
}

.panel {
  border-radius: 8px;
  overflow: hidden;
}

.risk-panel {
  min-height: 244px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 241, 244, 0.72));
}

.active-panel {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(235, 249, 253, 0.7));
}

.archive-panel {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(236, 250, 241, 0.72));
}

.history-panel {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(233, 239, 255, 0.76) 52%, rgba(239, 247, 255, 0.74));
  border-color: rgba(119, 139, 214, 0.2);
}

.history-panel .panel-head {
  background: linear-gradient(90deg, rgba(227, 239, 255, 0.78), rgba(244, 241, 255, 0.58), transparent);
}

.review-panel {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(243, 240, 255, 0.72));
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(223, 245, 253, 0.72), rgba(246, 248, 255, 0.52), transparent);
}

.panel-head.compact {
  padding: 16px;
}

.main-panel {
  min-height: 590px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 132px 150px 150px 170px 92px;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.48);
}

.filter-input,
.filter-select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  outline: none;
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 184, 200, 0.13);
}

.filter-reset {
  min-height: 36px;
  padding: 0 12px;
}

.completed-panel,
.weekly-panel,
.history-panel {
  margin-top: 16px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.active-table th:nth-child(1),
.active-table td:nth-child(1) {
  width: 48px;
}

.active-table th:nth-child(2),
.active-table td:nth-child(2) {
  width: 15%;
}

.active-table th:nth-child(3),
.active-table td:nth-child(3) {
  width: 43%;
}

.active-table th:nth-child(4),
.active-table td:nth-child(4) {
  width: 116px;
}

.active-table th:nth-child(5),
.active-table td:nth-child(5) {
  width: 180px;
}

.active-table th:nth-child(6),
.active-table td:nth-child(6) {
  width: 112px;
}

.active-table th:nth-child(7),
.active-table td:nth-child(7) {
  width: 68px;
}

.completed-table th:nth-child(1),
.completed-table td:nth-child(1) {
  width: 22%;
}

.completed-table th:nth-child(2),
.completed-table td:nth-child(2) {
  width: 118px;
}

.completed-table th:nth-child(3),
.completed-table td:nth-child(3) {
  width: 170px;
}

.completed-table th:nth-child(4),
.completed-table td:nth-child(4) {
  width: 160px;
}

.completed-table th:nth-child(6),
.completed-table td:nth-child(6) {
  width: 68px;
}

.history-table {
  min-width: 1180px;
}

.history-table th:nth-child(1),
.history-table td:nth-child(1) {
  width: 16%;
}

.history-table th:nth-child(2),
.history-table td:nth-child(2) {
  width: 22%;
}

.history-table th:nth-child(3),
.history-table td:nth-child(3),
.history-table th:nth-child(4),
.history-table td:nth-child(4) {
  width: 100px;
}

.history-table th:nth-child(5),
.history-table td:nth-child(5),
.history-table th:nth-child(6),
.history-table td:nth-child(6) {
  width: 150px;
}

th,
td {
  border-bottom: 1px solid rgba(64, 145, 184, 0.13);
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: #557384;
  font-size: 12px;
  font-weight: 900;
  background: rgba(246, 250, 253, 0.72);
}

tr:hover td {
  background: rgba(227, 246, 252, 0.38);
}

.add-progress {
  width: 30px;
  height: 30px;
  min-height: 30px;
  border: 1px solid rgba(22, 143, 177, 0.34);
  border-radius: 50%;
  background: #e8f9fc;
  color: var(--accent-strong);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.delete-button,
.mini-button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 900;
}

.delete-button {
  border-color: rgba(207, 61, 74, 0.24);
  background: rgba(255, 238, 240, 0.78);
  color: #b9303c;
}

.mini-button {
  border-color: rgba(22, 143, 177, 0.24);
  background: rgba(232, 249, 252, 0.86);
  color: var(--accent-strong);
}

.compact-delete {
  min-height: 26px;
}

.item-name {
  font-weight: 900;
}

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

.progress-card {
  display: grid;
  gap: 6px;
  line-height: 1.5;
  padding: 8px 10px;
  border: 1px solid rgba(64, 145, 184, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.progress-time {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  background: #e8f9fc;
  color: var(--accent-strong);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 900;
}

.progress-detail {
  color: #2b4654;
  font-size: 14px;
  cursor: text;
}

.progress-detail::after {
  content: "右键菜单";
  display: inline-flex;
  margin-left: 8px;
  color: #8aa4b3;
  font-size: 11px;
  opacity: 0;
}

.context-menu {
  position: fixed;
  z-index: 1000;
  min-width: 150px;
  padding: 6px;
  border: 1px solid rgba(64, 145, 184, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 38px rgba(31, 67, 88, 0.18);
}

.context-menu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 238, 240, 0.82);
  color: #b9303c;
  font-weight: 900;
  cursor: pointer;
}

.progress-card:hover .progress-detail::after {
  opacity: 1;
}

.editable-text {
  cursor: text;
}

.editable-text:hover {
  outline: 2px solid rgba(24, 184, 200, 0.18);
  outline-offset: 3px;
  border-radius: 6px;
}

.date-pill,
.tag-pill,
.priority-pill,
.state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.date-pill {
  background: #eef5f8;
  color: #315164;
}

.tag-cell {
  display: grid;
  gap: 8px;
}

.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag-pill {
  --tag-color: #21d6c7;
  background: color-mix(in srgb, var(--tag-color) 18%, white);
  border: 1px solid color-mix(in srgb, var(--tag-color) 36%, white);
  color: color-mix(in srgb, var(--tag-color) 72%, #10232e);
}

.people-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.person-pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(38, 98, 217, 0.09);
  border: 1px solid rgba(38, 98, 217, 0.18);
  color: #315892;
  font-size: 12px;
  font-weight: 850;
}

.mini-tag {
  min-height: 22px;
  padding: 0 7px;
  font-size: 11px;
  margin-left: 4px;
}

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

.priority-pill {
  background: #fff4d9;
  color: #9c670d;
  margin-top: 8px;
}

.state-pill {
  background: #eef5f8;
}

.state-select {
  width: 96px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 8px;
  color: var(--ink);
}

.risk-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.risk-item {
  border: 1px solid rgba(64, 145, 184, 0.16);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.risk-title,
.risk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 900;
  margin-bottom: 8px;
}

.risk-actions {
  margin-bottom: 0;
}

.risk-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.risk-toggle {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.weekly-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 16px;
}

.weekly-grid > div {
  border: 1px solid rgba(64, 145, 184, 0.15);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.62);
}

.summary-count {
  display: block;
  color: var(--blue);
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 4px;
}

.weekly-grid p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

ul {
  margin: 0;
  padding-left: 18px;
}

li {
  margin: 5px 0;
  line-height: 1.4;
}

.weekly-grid li {
  margin: 8px 0;
}

.weekly-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  vertical-align: middle;
}

.history-search {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto minmax(260px, 0.85fr);
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
}

.history-search textarea,
.dialog-input {
  border: 1px solid rgba(64, 145, 184, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  outline: none;
}

.history-search textarea {
  min-height: 40px;
  padding: 8px 10px;
  resize: vertical;
  font-size: 12px;
}

.timeline-cell {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.timeline-line {
  display: grid;
  gap: 4px;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(247, 251, 253, 0.82);
  border: 1px solid rgba(64, 145, 184, 0.12);
}

.timeline-line span {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
}

.timeline-line p {
  margin: 0;
  color: #2f4b5a;
  font-size: 13px;
  line-height: 1.45;
}

.empty {
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

dialog {
  width: min(700px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

dialog::backdrop {
  background: rgba(28, 48, 62, 0.32);
  backdrop-filter: blur(6px);
}

.dialog-card {
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 26px 80px rgba(47, 86, 110, 0.26);
  padding: 22px;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.close-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.dialog-hint {
  color: var(--muted);
  margin: 12px 0;
  line-height: 1.6;
}

textarea,
.tag-name-input,
.edit-date-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.6;
}

textarea:focus,
.tag-name-input:focus,
.edit-date-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(24, 184, 200, 0.13);
}

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

.tag-editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px 54px;
  gap: 10px;
  align-items: center;
}

.tag-color-input {
  width: 48px;
  height: 38px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ai-message {
  margin-top: 12px;
  border: 1px solid rgba(184, 122, 17, 0.24);
  background: rgba(255, 246, 225, 0.86);
  color: #875b12;
  border-radius: 8px;
  padding: 12px;
  line-height: 1.5;
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

@media (max-width: 1080px) {
  .command-grid,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .login-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 28px;
  }

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

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .shell {
    width: min(100% - 22px, 1520px);
    padding-top: 18px;
  }

  h1 {
    font-size: 26px;
  }

  .actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .actions button {
    flex: 1;
  }

  th,
  td {
    min-width: 130px;
  }

  .weekly-grid {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .login-shell {
    padding: 18px;
  }

  .login-hero {
    padding: 24px;
  }

  .login-copy h1 {
    font-size: 36px;
  }
}
