/* Code Fingerprint: Caius | Project Gantt Builder | 2026 | CGFB-2026-N7Q4-X1K8 | ORIGINAL-WORK | INTERNAL-USE-ONLY */

:root {
  --ink: #142033;
  --muted: #667085;
  --subtle: #8590a2;
  --line: rgba(45, 63, 92, 0.16);
  --soft-line: rgba(45, 63, 92, 0.11);
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --frost: rgba(243, 247, 252, 0.78);
  --blue: #007aff;
  --cyan: #32ade6;
  --green: #34c759;
  --amber: #ff9f0a;
  --red: #ff2d55;
  --violet: #5856d6;
  --deep: #16213a;
  --shadow: 0 18px 48px rgba(22, 33, 58, 0.12);
  --tight-shadow: 0 9px 24px rgba(22, 33, 58, 0.08);
  --page-shell-width: calc(100vw - clamp(28px, 3vw, 56px));
  --body-font: "Avenir Next", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --display-font: "Avenir Next Condensed", "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --footer-height: 34px;
  --health-sticky-top: 148px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  min-height: 100%;
  background: #eef4fa;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  overflow: auto;
  color: var(--ink);
  font-family: var(--body-font);
  background: #eef4fa;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(45, 63, 92, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(45, 63, 92, 0.038) 1px, transparent 1px),
    linear-gradient(180deg, #f8fbff 0%, #eef4fa 56%, #e9f0f7 100%);
  background-size: 34px 34px, 34px 34px, auto;
}

body.intro-active {
  overflow: hidden;
}

.home-screen,
.template-setup-screen {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  color: var(--ink);
}

.home-screen {
  --home-topbar-height: clamp(58px, 3.75vw, 78px);
  --home-outer-gap: clamp(14px, 1.55vh, 24px);
  --home-process-height: clamp(112px, 12.5vh, 150px);
  --home-main-height: calc(100vh - var(--home-topbar-height) - var(--home-process-height) - (var(--home-outer-gap) * 3));
  display: grid;
  grid-template-rows: var(--home-topbar-height) minmax(0, var(--home-main-height)) var(--home-process-height);
  gap: var(--home-outer-gap);
  overflow: hidden;
}

.home-screen[hidden],
.template-setup-screen[hidden],
.app-shell[hidden],
.intro-screen[hidden] {
  display: none !important;
}

.home-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 0;
  height: var(--home-topbar-height, 78px);
  padding: clamp(8px, 0.75vw, 14px) 30px;
  border-bottom: 1px solid rgba(207, 225, 244, 0.72);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 30px rgba(15, 59, 94, 0.035);
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.home-brand strong {
  color: var(--deep);
  font-size: 30px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.home-logo-mark {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #5ec4ff, #096ae8);
  transform: rotate(-12deg);
  box-shadow: 0 9px 18px rgba(0, 122, 255, 0.24);
}

.home-logo-mark::before,
.home-logo-mark::after {
  content: "";
  position: absolute;
  left: 5px;
  width: 24px;
  height: 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.72);
}

.home-logo-mark::before {
  top: 7px;
}

.home-logo-mark::after {
  bottom: 6px;
  background: rgba(255, 255, 255, 0.38);
}

.setup-back-btn,
.setup-secondary-btn {
  position: relative;
  min-height: 44px;
  padding: 0 18px 0 42px;
  border: 1px solid rgba(185, 212, 239, 0.95);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: #17456f;
  font-size: 16px;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.setup-back-btn:hover,
.setup-secondary-btn:hover {
  border-color: rgba(0, 122, 255, 0.28);
  background: rgba(239, 248, 255, 0.94);
  color: #0066d6;
}

.home-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.76fr) minmax(440px, 1.42fr) minmax(300px, 0.85fr);
  gap: 24px;
  align-items: stretch;
  width: min(100%, calc(100vw - 52px));
  min-height: 0;
  height: 100%;
  margin: 0 auto;
  padding: 0;
}

.home-hero,
.home-template-zone,
.home-preview,
.setup-form-card,
.setup-preview-card {
  border: 1px solid rgba(185, 212, 239, 0.88);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(242, 248, 255, 0.82)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 38px rgba(15, 59, 94, 0.075);
}

.home-hero {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  gap: clamp(8px, 1vh, 14px);
  min-height: 0;
  height: 100%;
  padding: clamp(20px, 2vh, 34px);
}

.home-hero-copy {
  align-self: start;
  padding-top: clamp(4px, 0.7vh, 12px);
}

.home-hero h1,
.home-hero h2 {
  margin: 0;
  font-family: var(--display-font);
  letter-spacing: -0.02em;
}

.home-hero h1 {
  color: var(--deep);
  font-size: clamp(40px, 3.1vw, 62px);
  font-weight: 960;
  line-height: 1.02;
}

.home-hero h2 {
  margin-top: clamp(10px, 1vh, 16px);
  color: #0a7cff;
  font-size: clamp(25px, 1.85vw, 38px);
  font-weight: 950;
  line-height: 1.08;
}

.home-hero p {
  max-width: 480px;
  margin: clamp(10px, 1vh, 16px) 0 0;
  color: #263c58;
  font-size: clamp(15px, 0.92vw, 18px);
  font-weight: 760;
  line-height: 1.55;
}

.home-hero-visual {
  position: relative;
  align-self: stretch;
  min-height: 0;
  filter: saturate(1.05);
}

.home-visual-platform {
  position: absolute;
  inset: clamp(6px, 0.9vh, 14px) clamp(0px, 1vw, 12px) 0;
  min-height: 0;
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.96), transparent 58%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(221, 237, 255, 0.88));
  border: 1px solid rgba(164, 203, 249, 0.28);
  box-shadow:
    0 34px 70px rgba(56, 111, 190, 0.22),
    0 10px 24px rgba(0, 122, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.home-visual-platform::before {
  content: "";
  position: absolute;
  inset: clamp(16px, 1.45vw, 28px) clamp(18px, 1.8vw, 34px) clamp(18px, 1.9vw, 38px);
  border-radius: 28px;
  background:
    linear-gradient(120deg, rgba(0, 122, 255, 0.08), transparent 42%),
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(137, 190, 248, 0.17) 38px 39px),
    repeating-linear-gradient(0deg, transparent 0 38px, rgba(137, 190, 248, 0.14) 38px 39px);
  opacity: 0.9;
}

.home-visual-board {
  position: absolute;
  left: 20%;
  right: 6%;
  top: clamp(42px, 14%, 96px);
  height: clamp(132px, 35%, 268px);
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(11, 100, 210, 0.9) 0 18%, rgba(255, 255, 255, 0.96) 18%),
    repeating-linear-gradient(0deg, transparent 0 26px, rgba(207, 225, 244, 0.72) 26px 27px),
    repeating-linear-gradient(90deg, transparent 0 40px, rgba(207, 225, 244, 0.48) 40px 41px),
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(236, 246, 255, 0.96));
  border: 1px solid rgba(137, 190, 248, 0.55);
  box-shadow:
    -12px 18px 0 rgba(10, 88, 188, 0.18),
    0 22px 34px rgba(28, 103, 207, 0.22);
  transform: rotate(-2deg);
}

.home-visual-board span {
  position: absolute;
  left: 25%;
  top: 18%;
  width: 30%;
  height: clamp(7px, 0.85vh, 11px);
  border-radius: 999px;
  background: rgba(34, 84, 138, 0.16);
  box-shadow: 0 22px 0 rgba(34, 84, 138, 0.12);
}

.home-visual-board i {
  position: absolute;
  left: 36%;
  height: clamp(9px, 1.05vh, 13px);
  border-radius: 999px;
  background: #1476e8;
}

.home-visual-board i:nth-child(2) {
  top: 42%;
  width: 36%;
}

.home-visual-board i:nth-child(3) {
  top: 56%;
  width: 50%;
}

.home-visual-board i:nth-child(4) {
  top: 70%;
  width: 62%;
}

.home-visual-board i:nth-child(5) {
  top: 84%;
  width: 48%;
}

.home-visual-icon {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(56px, 4.1vw, 84px);
  height: clamp(56px, 4.1vw, 84px);
  border-radius: 16px;
  box-shadow: 0 18px 24px rgba(28, 103, 207, 0.18);
}

.home-visual-icon::before {
  color: #fff;
  font-size: clamp(26px, 1.9vw, 38px);
  font-weight: 950;
}

.home-visual-calendar {
  left: 5%;
  top: 31%;
  background: linear-gradient(135deg, #6cc3ff, #177be8);
}

.home-visual-calendar::before {
  content: "▦";
}

.home-visual-excel {
  left: 10%;
  bottom: 18%;
  background: linear-gradient(135deg, #43d185, #15945b);
}

.home-visual-excel::before {
  content: "X";
}

.home-visual-cloud {
  right: 17%;
  bottom: 15%;
  background: linear-gradient(135deg, #64b9ff, #1976e8);
}

.home-visual-cloud::before {
  content: "☁";
}

.home-visual-platform em {
  position: absolute;
  width: clamp(13px, 1.1vw, 18px);
  height: clamp(13px, 1.1vw, 18px);
  border-radius: 4px;
  background: #ffb000;
  transform: rotate(45deg);
  box-shadow: 0 8px 16px rgba(255, 159, 10, 0.25);
}

.home-visual-platform em:nth-of-type(1) {
  right: 16%;
  top: 32%;
}

.home-visual-platform em:nth-of-type(2) {
  right: 11%;
  top: 52%;
}

.home-template-zone {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 1.35vh, 22px);
  min-height: 0;
  height: 100%;
  padding: clamp(18px, 2vh, 28px);
}

.home-template-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.home-template-head h2 {
  position: relative;
  margin: 0;
  padding-left: 18px;
  color: var(--deep);
  font-size: clamp(22px, 1.35vw, 27px);
  font-weight: 940;
}

.home-template-head h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 4px;
  width: 5px;
  border-radius: 999px;
  background: #1476e8;
}

.home-template-head p {
  margin: 4px 0 0;
  color: #7b8798;
  font-size: clamp(13px, 0.78vw, 15px);
  font-weight: 760;
}

.home-template-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  align-content: start;
  gap: clamp(6px, 0.75vh, 11px);
  min-height: 0;
  padding: clamp(16px, 1.9vh, 26px);
  overflow: hidden;
  border: 1px solid rgba(207, 225, 244, 0.94);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.9));
  color: #12345a;
  text-align: left;
  box-shadow: 0 8px 20px rgba(15, 59, 94, 0.055);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.home-template-card::before {
  content: "";
  position: absolute;
  top: clamp(18px, 1.25vw, 24px);
  right: clamp(18px, 1.25vw, 24px);
  width: clamp(20px, 1.2vw, 24px);
  height: clamp(20px, 1.2vw, 24px);
  border: 3px solid rgba(183, 198, 220, 0.55);
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

.home-template-card:hover {
  border-color: rgba(0, 122, 255, 0.32);
  box-shadow: 0 16px 32px rgba(15, 59, 94, 0.09);
  transform: translateY(-2px);
}

.home-template-active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 250, 255, 0.94));
  border-color: rgba(0, 122, 255, 0.74);
  color: #12345a;
  box-shadow:
    0 18px 38px rgba(0, 122, 255, 0.12),
    inset 0 0 0 2px rgba(0, 122, 255, 0.3);
}

.home-template-active::before {
  border-color: rgba(0, 122, 255, 0.28);
  background:
    radial-gradient(circle at center, #1476e8 0 43%, #fff 45% 64%, #1476e8 66%);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.home-template-icon {
  display: grid;
  place-items: center;
  width: clamp(48px, 5.5vh, 68px);
  height: clamp(48px, 5.5vh, 68px);
  border-radius: 16px;
  background: rgba(232, 244, 255, 0.9);
  color: #1476e8;
  font-size: clamp(25px, 1.55vw, 32px);
  font-weight: 950;
}

.home-template-icon::before {
  display: block;
  line-height: 1;
}

.home-icon-saas::before {
  content: "☁";
}

.home-icon-dev {
  background: rgba(232, 252, 236, 0.95);
  color: #2fb344;
}

.home-icon-dev::before {
  content: "</>";
  font-size: 24px;
}

.home-icon-blank {
  background: rgba(241, 235, 255, 0.95);
  color: #7161e8;
}

.home-icon-blank::before {
  content: "▣";
}

.home-icon-excel {
  background: rgba(232, 252, 241, 0.95);
  color: #15945b;
}

.home-icon-excel::before {
  content: "X";
}

.home-icon-event {
  background: rgba(255, 247, 229, 0.96);
  color: #e49b12;
}

.home-icon-event::before {
  content: "◆";
  font-size: 24px;
}

.home-template-active .home-card-index,
.home-template-active strong,
.home-template-active small,
.home-template-active em,
.home-template-active .home-card-chips i {
  color: inherit;
}

.home-template-card strong {
  align-self: start;
  margin-top: 2px;
  padding-right: 20px;
  color: #0f3b5e;
  font-size: clamp(20px, 1.32vw, 27px);
  font-weight: 920;
  line-height: 1.2;
}

.home-template-card small {
  margin-top: 0;
  color: #526071;
  font-size: clamp(13px, 0.84vw, 17px);
  font-weight: 720;
  line-height: 1.42;
}

.home-template-active small {
  color: #526071;
}

.home-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(6px, 0.5vw, 10px);
  align-self: start;
  align-items: center;
  margin-top: 2px;
}

.home-card-chips i,
.home-feature-list span {
  display: inline-flex;
  align-items: center;
  align-self: center;
  min-height: clamp(21px, 1.17vw, 24px);
  padding: 0 clamp(8px, 0.55vw, 11px);
  border: 1px solid rgba(0, 122, 255, 0.14);
  border-radius: 999px;
  background: rgba(232, 244, 255, 0.82);
  color: #0a64c7;
  font-size: clamp(11px, 0.64vw, 13px);
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.home-template-active .home-card-chips i {
  border-color: rgba(0, 122, 255, 0.14);
  background: rgba(232, 244, 255, 0.82);
  color: #0a64c7;
}

.home-template-card em {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: end;
  justify-self: stretch;
  gap: 12px;
  min-height: clamp(40px, 4.6vh, 52px);
  margin-top: 2px;
  border-radius: 9px;
  background: linear-gradient(180deg, #1687ff, #086bd8);
  color: #fff;
  font-size: clamp(15px, 0.9vw, 18px);
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 14px 22px rgba(0, 122, 255, 0.22);
}

.home-template-card em b {
  font-size: 28px;
  line-height: 1;
}

.home-blank-card {
  overflow: visible;
  z-index: 2;
}

.home-blank-card.home-template-active {
  z-index: 5;
}

.home-blank-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 8px;
  align-self: end;
}

.home-blank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: clamp(40px, 4.6vh, 52px);
  padding: 0 10px;
  border-radius: 9px;
  font-size: clamp(13px, 0.78vw, 16px);
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
}

.home-blank-action span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-blank-action b {
  flex: 0 0 auto;
}

.home-blank-action-primary {
  border: 1px solid rgba(0, 122, 255, 0.18);
  background: linear-gradient(180deg, #1687ff, #086bd8);
  color: #fff;
  box-shadow: 0 14px 22px rgba(0, 122, 255, 0.2);
}

.home-blank-action-primary b {
  font-size: 24px;
  line-height: 1;
}

.home-blank-action-secondary {
  border: 1px solid rgba(0, 122, 255, 0.18);
  background: rgba(235, 247, 255, 0.88);
  color: #0a64c7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.home-blank-action-secondary b {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.11);
  color: #0a64c7;
  font-size: 10px;
  line-height: 1;
}

.home-preview {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(10px, 1.2vh, 16px);
  min-height: 0;
  height: 100%;
  padding: clamp(18px, 2vh, 28px);
}

.home-preview-head,
.setup-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: clamp(8px, 1vh, 12px);
  border-bottom: 1px solid rgba(71, 101, 135, 0.12);
}

.home-preview-head strong,
.setup-preview-head strong {
  color: #0f3b5e;
  font-size: 22px;
  font-weight: 920;
}

.home-preview-board {
  --preview-label-width: clamp(102px, 34%, 138px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(207, 225, 244, 0.76);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.home-preview-axis {
  display: grid;
  grid-template-rows: clamp(24px, 2.8vh, 32px) clamp(34px, 3.6vh, 42px);
  min-height: 0;
  margin-left: var(--preview-label-width);
  border-bottom: 1px solid rgba(207, 225, 244, 0.8);
  background: rgba(248, 251, 255, 0.84);
}

.home-preview-months,
.home-preview-weeks {
  display: grid;
}

.home-preview-months {
  grid-template-columns: 1fr 1fr;
}

.home-preview-weeks {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  border-top: 1px solid rgba(207, 225, 244, 0.76);
}

.home-preview-months span,
.home-preview-weeks span {
  display: grid;
  place-items: center;
  color: #64748b;
  font-weight: 900;
  border-left: 1px solid rgba(207, 225, 244, 0.72);
}

.home-preview-months span {
  font-size: 12px;
}

.home-preview-weeks span {
  align-content: center;
  gap: 1px;
  font-size: 10px;
  line-height: 1.05;
}

.home-preview-weeks small {
  color: #8fa0b4;
  font-size: 8px;
  font-weight: 760;
}

.home-preview-table {
  position: relative;
  display: grid;
  grid-template-columns: var(--preview-label-width) repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(23, minmax(0, 1fr));
  align-content: stretch;
  min-height: 0;
  padding: 0;
  background:
    linear-gradient(90deg, transparent 0 calc(var(--preview-label-width) - 1px), rgba(207, 225, 244, 0.66) calc(var(--preview-label-width) - 1px) var(--preview-label-width), transparent var(--preview-label-width)),
    repeating-linear-gradient(90deg, transparent 0 calc((100% - var(--preview-label-width)) / 8 - 1px), rgba(207, 225, 244, 0.54) calc((100% - var(--preview-label-width)) / 8 - 1px) calc((100% - var(--preview-label-width)) / 8)),
    repeating-linear-gradient(180deg, transparent 0 calc(4.347826% - 1px), rgba(207, 225, 244, 0.42) calc(4.347826% - 1px) 4.347826%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(248, 251, 255, 0.28));
  background-position: 0 0, var(--preview-label-width) 0, 0 0, 0 0;
}

.preview-stage,
.preview-task {
  grid-column: 1;
  grid-row: var(--row);
  align-self: center;
  min-width: 0;
  padding-left: clamp(10px, 1vw, 16px);
  padding-right: 6px;
  overflow: hidden;
  color: #334155;
  font-size: clamp(8px, 0.76vw, 11px);
  font-weight: 820;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-stage {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 950;
}

.preview-stage::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 13%, transparent);
}

.stage-blue { color: #1476e8; }
.stage-teal { color: #11a8a6; }
.stage-cyan { color: #159db5; }
.stage-violet { color: #635bff; }
.stage-amber { color: #d48a06; }

.preview-task {
  color: #64748b;
  padding-left: clamp(18px, 1.45vw, 26px);
  font-size: clamp(7px, 0.68vw, 10px);
}

.preview-bar {
  grid-column: var(--col) / span var(--span);
  grid-row: var(--row);
  align-self: center;
  justify-self: stretch;
  height: clamp(8px, 1.1vh, 12px);
  margin: 0 4px;
  border-radius: 999px;
  box-shadow: 0 7px 12px rgba(22, 33, 58, 0.13);
}

.preview-bar.blue { background: #1476e8; }
.preview-bar.teal { background: #11b7b0; }
.preview-bar.cyan { background: #16b2c8; }
.preview-bar.violet { background: #625df5; }
.preview-bar.amber { background: #e89b12; }

.preview-diamond {
  grid-column: var(--col);
  grid-row: var(--row);
  align-self: center;
  justify-self: center;
  width: clamp(8px, 1.1vh, 12px);
  height: clamp(8px, 1.1vh, 12px);
  border-radius: 3px;
  background: #ffb000;
  transform: rotate(45deg);
  box-shadow: 0 5px 10px rgba(232, 155, 18, 0.24);
}

.home-preview-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: clamp(42px, 5vh, 50px);
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(232, 244, 255, 0.82);
  color: #64748b;
  font-size: 13px;
  font-weight: 760;
}

.home-preview-note span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(20, 118, 232, 0.42);
  border-radius: 999px;
  color: #1476e8;
  font-size: 12px;
  font-weight: 900;
}

.home-preview-note p {
  margin: 0;
}

.home-process {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr) 32px minmax(0, 1fr) 32px minmax(0, 1fr);
  gap: clamp(18px, 2.3vw, 46px);
  align-items: center;
  width: min(100%, calc(100vw - 52px));
  min-height: 0;
  height: 100%;
  margin: 0 auto var(--home-outer-gap, 18px);
  padding: clamp(14px, 1.45vh, 24px) clamp(28px, 3.1vw, 64px);
  border: 1px solid rgba(185, 212, 239, 0.88);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(245, 250, 255, 0.92)),
    rgba(255, 255, 255, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 18px 42px rgba(15, 59, 94, 0.08);
}

.home-process > i {
  justify-self: center;
  width: 18px;
  height: 18px;
  border-top: 3px solid rgba(113, 133, 161, 0.34);
  border-right: 3px solid rgba(113, 133, 161, 0.34);
  transform: rotate(45deg);
}

.home-process-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(14px, 1.1vw, 20px);
  align-items: center;
  min-width: 0;
}

.process-illustration {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(58px, 6.4vh, 84px);
  height: clamp(58px, 6.4vh, 84px);
  border: 1px solid rgba(198, 220, 245, 0.92);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.96) 0 48%, rgba(238, 247, 255, 0.86) 49% 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 12px 28px rgba(0, 122, 255, 0.08);
}

.process-illustration::before,
.process-illustration::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.process-template::before {
  width: 30px;
  height: 42px;
  border-radius: 7px;
  background: linear-gradient(180deg, #59b8ff, #1476e8);
  box-shadow:
    -16px 14px 0 -7px rgba(20, 118, 232, 0.84),
    13px -10px 0 -8px rgba(20, 118, 232, 0.2);
  transform: translate(-50%, -50%) rotate(-8deg);
}

.process-template::after {
  left: 55%;
  top: 39%;
  width: 15px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 10px 0 rgba(255, 255, 255, 0.48);
  transform: translate(-50%, -50%) rotate(-8deg);
}

.process-config::before {
  width: 42px;
  height: 30px;
  background:
    linear-gradient(#1476e8, #1476e8) 0 5px / 42px 4px no-repeat,
    linear-gradient(#1476e8, #1476e8) 0 15px / 42px 4px no-repeat,
    linear-gradient(#1476e8, #1476e8) 0 25px / 42px 4px no-repeat;
}

.process-config::after {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #1476e8;
  box-shadow:
    -18px -10px 0 #1476e8,
    15px 10px 0 #1476e8,
    0 0 0 5px rgba(20, 118, 232, 0.13),
    -18px -10px 0 5px rgba(20, 118, 232, 0.13),
    15px 10px 0 5px rgba(20, 118, 232, 0.13);
}

.process-generate::before {
  width: 12px;
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(180deg, #53b9ff, #1476e8);
  transform: translate(-50%, -50%) rotate(42deg);
}

.process-generate::after {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #1476e8;
  box-shadow:
    22px -16px 0 #1476e8,
    15px 12px 0 #53b9ff,
    28px 5px 0 2px rgba(20, 118, 232, 0.16),
    -12px -20px 0 2px rgba(20, 118, 232, 0.16);
}

.process-edit::before {
  width: 42px;
  height: 36px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(90deg, transparent 0 10px, rgba(255, 255, 255, 0.2) 10px 11px),
    linear-gradient(180deg, rgba(20, 118, 232, 0.12), rgba(20, 118, 232, 0.04));
  border: 2px solid rgba(20, 118, 232, 0.32);
}

.process-edit::after {
  left: 53%;
  top: 44%;
  width: 28px;
  height: 5px;
  border-radius: 999px;
  background: #1476e8;
  box-shadow:
    -8px 11px 0 #53b9ff,
    6px 22px 0 #1476e8;
}

.process-copy {
  display: grid;
  gap: clamp(3px, 0.55vh, 7px);
  min-width: 0;
}

.process-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.process-title b {
  display: grid;
  place-items: center;
  width: clamp(22px, 2.35vh, 26px);
  height: clamp(22px, 2.35vh, 26px);
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(180deg, #238cff, #0a6fe4);
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 8px 16px rgba(0, 122, 255, 0.18);
}

.process-title strong {
  min-width: 0;
  overflow: hidden;
  color: var(--deep);
  font-size: clamp(15px, 0.9vw, 19px);
  font-weight: 930;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.process-copy small {
  color: #718096;
  font-size: clamp(11px, 0.68vw, 14px);
  font-weight: 760;
  line-height: 1.35;
}

/* Legacy process icon hooks kept for older cached markup. */
.process-illustration > svg {
  width: 32px;
  height: 32px;
}

/*
.process-illustration::before {
  color: #1476e8;
  font-size: 30px;
  font-weight: 950;
}

.process-template::before { content: "▰"; }
.process-config::before { content: "☷"; }
.process-generate::before { content: "✦"; }
.process-edit::before { content: "▤"; }

.home-process-step b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #1476e8;
  color: #fff;
  font-size: 13px;
  font-weight: 950;
}

.home-process-step strong {
  color: var(--deep);
  font-size: 18px;
  font-weight: 930;
}

.home-process-step small {
  grid-column: 2 / span 2;
  color: #64748b;
  font-size: 13px;
  font-weight: 720;
}
*/

.template-setup-screen {
  display: grid;
  place-items: center;
  padding: 28px 0 44px;
}

.setup-shell {
  display: grid;
  gap: 18px;
  width: min(100%, 1080px);
}

.setup-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.setup-head h1 {
  margin: 3px 0 0;
  color: var(--deep);
  font-family: var(--display-font);
  font-size: 42px;
  line-height: 1.08;
}

.setup-head p {
  margin: 8px 0 0;
  color: #526071;
  font-size: 14px;
  font-weight: 700;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.75fr) minmax(420px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.setup-form-card,
.setup-preview-card {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.setup-form-card {
  align-content: start;
}

.setup-form-card label {
  display: grid;
  gap: 8px;
}

.setup-form-card label span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.setup-form-card input {
  min-height: 48px;
  border-color: rgba(0, 122, 255, 0.2);
  font-size: 15px;
  font-weight: 780;
}

.setup-hint {
  min-height: 22px;
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 720;
}

.setup-hint[data-state="error"] {
  color: #b42342;
}

.setup-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 10px;
  margin-top: 6px;
}

.setup-primary-btn {
  min-height: 46px;
  border: 1px solid rgba(0, 122, 255, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(0, 122, 255, 0.98), rgba(17, 106, 203, 0.92));
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(0, 122, 255, 0.22);
}

.setup-phase-preview {
  display: grid;
  gap: 9px;
}

.setup-phase-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid rgba(207, 225, 244, 0.78);
  border-left: 4px solid var(--phase-accent, var(--blue));
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.setup-phase-item span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--phase-accent, var(--blue)) 14%, #fff);
  color: var(--phase-accent, var(--blue));
  font-size: 12px;
  font-weight: 950;
}

.setup-phase-item strong {
  color: #12345a;
  font-size: 14px;
  font-weight: 880;
}

.setup-phase-item small {
  color: #64748b;
  font-size: 12px;
  font-weight: 780;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  min-height: 100vh;
  opacity: 1;
  transform: none;
  will-change: opacity, transform;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
}

body.intro-active .app-shell {
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  pointer-events: none;
}

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: block;
  min-height: 100svh;
  padding: clamp(18px, 2.2vw, 36px);
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(45, 63, 92, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(45, 63, 92, 0.038) 1px, transparent 1px),
    linear-gradient(180deg, #f8fbff 0%, #eef4fa 58%, #e9f0f7 100%);
  background-size: 34px 34px, 34px 34px, auto;
  backface-visibility: hidden;
  contain: layout paint style;
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
  will-change: opacity, transform;
  transition:
    opacity 0.32s ease,
    transform 0.32s ease,
    visibility 0s linear 0.32s;
}

body.app-entered .intro-screen {
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, -10px, 0);
  pointer-events: none;
}

body.intro-leaving .intro-ambient span,
body.intro-leaving .intro-generation-track i::before,
body.intro-leaving .demo-gantt-panel::before,
body.intro-leaving .demo-gantt-line i,
body.intro-leaving .demo-gantt-line b,
body.intro-leaving .demo-health-card strong em {
  animation-play-state: paused;
}

.intro-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.intro-ambient span {
  position: absolute;
  height: 10px;
  border-radius: 999px;
  opacity: 0.22;
  background: linear-gradient(90deg, transparent, rgba(0, 122, 255, 0.5), rgba(52, 199, 89, 0.42), transparent);
  animation: intro-rail-drift 12s ease-in-out infinite;
}

.intro-ambient span:nth-child(1) {
  top: 16%;
  left: 4%;
  width: 38vw;
}

.intro-ambient span:nth-child(2) {
  top: 68%;
  right: 6%;
  width: 46vw;
  background: linear-gradient(90deg, transparent, rgba(50, 173, 230, 0.46), rgba(139, 92, 246, 0.28), transparent);
  animation-delay: -4s;
}

.intro-ambient span:nth-child(3) {
  right: 24%;
  bottom: 18%;
  width: 30vw;
  background: linear-gradient(90deg, transparent, rgba(52, 199, 89, 0.36), rgba(255, 159, 10, 0.28), transparent);
  animation-delay: -7s;
}

.intro-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(420px, 0.82fr) minmax(620px, 1.18fr);
  grid-template-areas:
    "copy preview"
    "features preview";
  gap: clamp(18px, 2vw, 28px);
  width: 100%;
  max-width: 1880px;
  height: calc(100svh - clamp(36px, 4.4vw, 72px));
  min-height: 690px;
  margin: 0 auto;
  padding: clamp(28px, 3vw, 56px);
  border: 1px solid rgba(185, 212, 239, 0.84);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(241, 248, 255, 0.88)),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 70px rgba(22, 33, 58, 0.12);
  overflow: hidden;
}

.intro-copy {
  grid-area: copy;
  display: grid;
  align-content: start;
  justify-items: start;
  min-width: 0;
  padding-top: clamp(18px, 4vh, 48px);
  padding-right: clamp(0px, 1vw, 16px);
}

.intro-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  padding: 0 12px 0 5px;
  border: 1px solid rgba(0, 122, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #0a64c7;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.intro-copy h1 {
  max-width: none;
  margin: 20px 0 0;
  color: var(--deep);
  font-family: var(--display-font);
  font-size: clamp(38px, 3.45vw, 62px);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.98;
  white-space: nowrap;
}

.intro-title-line {
  display: flex;
  align-items: baseline;
  gap: clamp(8px, 0.9vw, 14px);
}

.intro-title-divider {
  color: transparent;
  background: linear-gradient(180deg, #0a84ff, #16a272);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 0.82em;
  transform: translateY(-0.03em);
}

.intro-hero-subtitle {
  max-width: 560px;
  margin: 13px 0 0;
  color: #526071;
  font-size: clamp(18px, 1.25vw, 22px);
  font-weight: 900;
  line-height: 1.35;
}

.intro-audience-panel {
  position: relative;
  display: grid;
  gap: 8px;
  width: min(600px, 100%);
  margin-top: 18px;
  padding: 13px;
  overflow: hidden;
  border: 1px solid rgba(171, 205, 240, 0.8);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(238, 247, 255, 0.76)),
    rgba(255, 255, 255, 0.84);
  box-shadow:
    0 18px 38px rgba(15, 59, 94, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.intro-audience-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--blue), var(--cyan), var(--green));
}

.intro-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #526071;
  font-size: 11px;
  font-weight: 900;
}

.intro-section-heading span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  color: #0a64c7;
  background: rgba(232, 244, 255, 0.84);
  white-space: nowrap;
}

.intro-section-heading strong {
  color: #24364e;
  font-size: 12px;
  font-weight: 920;
}

.intro-audience-panel article {
  display: grid;
  grid-template-columns: minmax(78px, 0.28fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(207, 225, 244, 0.78);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.intro-audience-panel b {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #0f4d8a;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.intro-audience-panel b::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--cyan));
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.09);
}

.intro-audience-panel article:nth-of-type(2) b::before {
  background: linear-gradient(180deg, var(--cyan), var(--green));
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.1);
}

.intro-audience-panel article:nth-of-type(3) b::before {
  background: linear-gradient(180deg, var(--green), var(--amber));
  box-shadow: 0 0 0 4px rgba(255, 159, 10, 0.1);
}

.intro-audience-panel p,
.intro-closing-panel p {
  max-width: none;
  margin: 0;
  color: #4e5f73;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.45;
}

.intro-closing-panel {
  display: grid;
  gap: 11px;
  width: min(600px, 100%);
  margin-top: 12px;
  padding: 13px;
  border: 1px solid rgba(162, 201, 242, 0.78);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(238, 247, 255, 0.8)),
    rgba(255, 255, 255, 0.82);
  box-shadow:
    0 16px 34px rgba(15, 59, 94, 0.085),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.intro-closing-panel p {
  color: #23344a;
  font-size: 13px;
  font-weight: 900;
}

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

.intro-secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(10, 132, 255, 0.24);
  border-radius: 14px;
  color: #0a64c7;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 247, 255, 0.86));
  box-shadow: 0 10px 24px rgba(15, 59, 94, 0.07);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.intro-secondary-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(10, 132, 255, 0.42);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 28px rgba(15, 59, 94, 0.1);
}

.intro-copy > p:not(.intro-hero-subtitle) {
  max-width: 560px;
  margin: 17px 0 0;
  color: #526071;
  font-size: 16px;
  font-weight: 720;
  line-height: 1.65;
}

.intro-subtitle-rotator {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  width: min(520px, 100%);
  margin-top: 22px;
  padding: 13px 15px 12px;
  overflow: hidden;
  border: 1px solid rgba(171, 205, 240, 0.78);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(236, 247, 255, 0.78)),
    rgba(255, 255, 255, 0.84);
  box-shadow:
    0 16px 32px rgba(15, 59, 94, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.intro-subtitle-rotator::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--blue), var(--cyan), var(--green));
}

.intro-subtitle-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  color: #0a64c7;
  background: rgba(232, 244, 255, 0.84);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.intro-subtitle-rotator p {
  align-self: center;
  min-height: 24px;
  margin: 0;
  color: #24364e;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.45;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.intro-subtitle-rotator p.is-changing {
  opacity: 0;
  transform: translateY(5px);
}

.intro-subtitle-rotator i {
  position: relative;
  grid-column: 1 / -1;
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(111, 128, 150, 0.1);
}

.intro-subtitle-rotator i::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green));
  animation: intro-subtitle-progress 3s ease-in-out infinite;
}

.intro-flow-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(520px, 100%);
  margin-top: 12px;
}

.intro-flow-rail span {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 58px;
  padding: 10px 11px;
  overflow: hidden;
  border: 1px solid rgba(207, 225, 244, 0.86);
  border-radius: 16px;
  color: #526071;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 18px rgba(15, 59, 94, 0.045);
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.intro-flow-rail span::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 8px;
  left: 10px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green));
  opacity: 0;
  transform: scaleX(0.35);
  transform-origin: left center;
  transition:
    opacity 0.2s ease,
    transform 0.24s ease;
}

.intro-flow-rail b {
  color: #0a64c7;
  font-size: 11px;
  font-weight: 950;
}

.intro-flow-rail em {
  color: inherit;
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.intro-flow-rail span.active {
  border-color: rgba(10, 132, 255, 0.4);
  color: #0b4f98;
  background: linear-gradient(180deg, rgba(239, 247, 255, 0.96), rgba(255, 255, 255, 0.86));
  box-shadow: 0 12px 24px rgba(15, 59, 94, 0.08);
}

.intro-flow-rail span.active::after {
  opacity: 0.9;
  transform: scaleX(1);
}

.intro-actions {
  width: min(420px, 100%);
  margin-top: 18px;
}

.intro-actions.intro-closing-panel {
  width: min(600px, 100%);
}

.intro-launch-panel {
  display: grid;
  gap: 10px;
  width: min(468px, 100%);
  padding: 12px;
  border: 1px solid rgba(162, 201, 242, 0.82);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(238, 247, 255, 0.86)),
    rgba(255, 255, 255, 0.82);
  box-shadow:
    0 20px 44px rgba(15, 59, 94, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.intro-launch-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #526071;
  font-size: 12px;
  font-weight: 900;
}

.intro-launch-label i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #34c759;
  box-shadow: 0 0 0 5px rgba(52, 199, 89, 0.14);
}

.intro-enter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid rgba(0, 122, 255, 0.22);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(180deg, #0a84ff, #087bd3);
  box-shadow: 0 16px 34px rgba(8, 123, 211, 0.24);
  font-size: 16px;
  font-weight: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.intro-enter-btn em {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.14);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.intro-enter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(8, 123, 211, 0.3);
}

.intro-enter-btn i {
  position: relative;
  width: 18px;
  height: 12px;
  background: none;
}

.intro-enter-btn i::before,
.intro-enter-btn i::after {
  content: "";
  position: absolute;
  display: block;
}

.intro-enter-btn i::before {
  top: 5px;
  left: 0;
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

.intro-enter-btn i::after {
  top: 2px;
  right: 1px;
  width: 7px;
  height: 7px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(45deg);
}

.intro-launch-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.intro-launch-meta span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border: 1px solid rgba(207, 225, 244, 0.9);
  border-radius: 999px;
  color: #526071;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.intro-demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid rgba(15, 77, 138, 0.16);
  border-radius: 14px;
  color: #0f4d8a;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(15, 59, 94, 0.08);
  font-size: 15px;
  font-weight: 900;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.intro-demo-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 122, 255, 0.34);
  background: rgba(255, 255, 255, 0.92);
}

.intro-skip-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  color: #526071;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}

.intro-skip-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.intro-signal-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, auto));
  gap: 8px;
  margin-top: 26px;
}

.intro-signal-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(207, 225, 244, 0.9);
  border-radius: 999px;
  color: #2b597f;
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 860;
  white-space: nowrap;
}

.intro-preview {
  grid-area: preview;
  align-self: stretch;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  min-height: 0;
  padding: clamp(18px, 2vw, 28px);
  border: 1px solid rgba(185, 212, 239, 0.82);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 251, 255, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 16px 42px rgba(15, 59, 94, 0.09);
  overflow: hidden;
}

.intro-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: #0a64c7;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.intro-preview-head strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(0, 122, 255, 0.13);
  border-radius: 999px;
  color: #0a64c7;
  background: rgba(232, 241, 251, 0.72);
  font-family: var(--body-font);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.intro-demo-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 8px;
}

.intro-demo-steps button {
  position: relative;
  align-self: start;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  align-content: center;
  gap: 9px;
  height: 82px;
  min-height: 82px;
  padding: 13px 14px 18px;
  overflow: hidden;
  border: 1px solid rgba(207, 225, 244, 0.9);
  border-radius: 14px;
  color: #4d6078;
  background: rgba(255, 255, 255, 0.68);
  text-align: left;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.intro-demo-steps button::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 10px;
  left: 14px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green));
  opacity: 0;
  transform: scaleX(0.22);
  transform-origin: left center;
  transition:
    opacity 0.2s ease,
    transform 0.24s ease;
}

.intro-demo-steps button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #0a64c7;
  background: rgba(232, 241, 251, 0.92);
  font-size: 11px;
  font-weight: 950;
}

.intro-demo-steps button strong {
  font-size: 13px;
  font-weight: 900;
}

.intro-demo-steps button small {
  grid-column: 2;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
}

.intro-demo-steps button.active {
  transform: translateY(-1px);
  border-color: rgba(0, 122, 255, 0.38);
  color: #0b4f98;
  background: linear-gradient(180deg, rgba(239, 247, 255, 0.96), rgba(255, 255, 255, 0.86));
  box-shadow: 0 10px 24px rgba(15, 59, 94, 0.1);
}

.intro-demo-steps button.active::after {
  opacity: 0.86;
  transform: scaleX(1);
}

.intro-demo-steps button.active span {
  color: #fff;
  background: linear-gradient(180deg, #0a84ff, #087bd3);
}

.intro-demo-board {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(320px, 1.28fr);
  grid-template-rows: minmax(210px, auto) minmax(176px, 1fr) auto;
  grid-template-areas:
    "phases tasks"
    "gantt gantt"
    "health health";
  gap: 12px;
  min-height: 0;
  padding: 14px;
  border: 1px solid rgba(207, 225, 244, 0.78);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(45, 63, 92, 0.048) 1px, transparent 1px),
    linear-gradient(180deg, rgba(45, 63, 92, 0.04) 1px, transparent 1px),
    #f8fbff;
  background-size: 72px 100%, 100% 58px, auto;
  overflow: hidden;
}

.demo-phase-list,
.demo-task-table,
.demo-gantt-panel,
.demo-health-card {
  min-width: 0;
  border: 1px solid rgba(207, 225, 244, 0.82);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
}

.demo-phase-list {
  grid-area: phases;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
}

.demo-task-table {
  grid-area: tasks;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  overflow: hidden;
}

.demo-gantt-panel {
  grid-area: gantt;
  position: relative;
  display: grid;
  grid-template-rows: 24px repeat(3, minmax(32px, 1fr));
  gap: 6px;
  padding: 12px;
  overflow: hidden;
}

.demo-health-card {
  grid-area: health;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.demo-section-title {
  color: #0a64c7;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.demo-phase-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: center;
  min-height: 48px;
  padding: 8px 9px;
  border: 1px solid rgba(207, 225, 244, 0.88);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease,
    background 0.25s ease;
}

.demo-phase-card b {
  display: inline-flex;
  grid-row: span 2;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(180deg, #0a84ff, #087bd3);
  font-size: 12px;
  font-weight: 950;
}

.demo-phase-card span,
.demo-task-row span,
.demo-health-card span {
  color: #23344a;
  font-size: 13px;
  font-weight: 850;
}

.demo-phase-card em,
.demo-health-card small {
  color: #667085;
  font-style: normal;
  font-size: 11px;
  font-weight: 780;
}

.phase-two b {
  background: linear-gradient(180deg, #13a8c8, #0f8ba5);
}

.phase-three b {
  background: linear-gradient(180deg, #16a272, #10845d);
}

.demo-task-head,
.demo-task-row {
  display: grid;
  grid-template-columns: minmax(118px, 1.3fr) repeat(3, minmax(54px, 0.7fr));
  gap: 8px;
  align-items: center;
}

.demo-task-head span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #526071;
  background: rgba(239, 246, 255, 0.8);
  font-size: 11px;
  font-weight: 900;
}

.demo-task-row {
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid rgba(207, 225, 244, 0.8);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.76);
  transform: translateY(3px);
  opacity: 0.72;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.demo-task-row strong {
  color: #087b54;
  font-size: 12px;
  font-weight: 900;
}

.demo-gantt-axis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  color: #64748b;
  font-size: 11px;
  font-weight: 880;
}

.demo-gantt-line {
  position: relative;
  display: grid;
  align-items: center;
  min-width: 0;
}

.demo-gantt-line i {
  display: block;
  height: 18px;
  border-radius: 999px;
  transform-origin: left center;
  animation: intro-bar-grow 3.6s ease-in-out infinite;
}

.line-one i {
  width: 56%;
  margin-left: 7%;
  background: linear-gradient(90deg, #0a84ff, #32ade6);
}

.line-two i {
  width: 46%;
  margin-left: 28%;
  background: linear-gradient(90deg, #13a8c8, #34c759);
  animation-delay: 0.32s;
}

.line-three i {
  width: 34%;
  margin-left: 51%;
  background: linear-gradient(90deg, #16a272, #34c759);
  animation-delay: 0.64s;
}

.demo-gantt-line b {
  position: absolute;
  right: 9%;
  width: 18px;
  height: 18px;
  transform: rotate(45deg) scale(0.72);
  background: #ff2d55;
  box-shadow: 0 0 0 6px rgba(255, 45, 85, 0.1);
  animation: intro-milestone-pulse 3.6s ease-in-out infinite;
}

.demo-callout {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.holiday-callout {
  top: 50%;
  left: 33%;
  color: #996000;
  background: rgba(255, 247, 237, 0.94);
  border: 1px solid rgba(255, 159, 10, 0.24);
}

.milestone-callout {
  right: 8%;
  bottom: 18%;
  color: #b8003b;
  background: rgba(255, 242, 246, 0.94);
  border: 1px solid rgba(255, 45, 85, 0.18);
}

.demo-health-card strong {
  color: var(--deep);
  font-size: 25px;
  font-weight: 950;
}

.demo-health-card strong em {
  display: inline-block;
  color: #0a64c7;
  font-style: normal;
}

.intro-screen[data-step="0"] .phase-one,
.intro-screen[data-step="1"] .demo-task-table,
.intro-screen[data-step="2"] .demo-gantt-panel {
  border-color: rgba(0, 122, 255, 0.45);
  box-shadow: 0 12px 28px rgba(15, 59, 94, 0.12);
}

.intro-screen[data-step="0"] .phase-one {
  transform: translateX(4px);
  background: rgba(239, 247, 255, 0.94);
}

.intro-screen[data-step="1"] .demo-task-row {
  opacity: 1;
  transform: translateY(0);
}

.intro-screen[data-step="1"] .task-two {
  border-color: rgba(52, 199, 89, 0.36);
  background: rgba(239, 253, 244, 0.72);
}

.intro-screen[data-step="2"] .holiday-callout,
.intro-screen[data-step="2"] .milestone-callout {
  opacity: 1;
  transform: translateY(0);
}

.intro-feature-strip {
  grid-area: features;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(112px, 1fr);
  gap: 12px;
  align-self: start;
  min-width: 0;
}

.intro-feature-strip article {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 3px 10px;
  min-width: 0;
  min-height: 112px;
  padding: 15px;
  border: 1px solid rgba(207, 225, 244, 0.78);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 20px rgba(15, 59, 94, 0.045);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.intro-feature-strip article:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 122, 255, 0.26);
  box-shadow: 0 14px 28px rgba(15, 59, 94, 0.08);
}

.intro-feature-strip span {
  display: inline-flex;
  align-items: center;
  grid-column: 1;
  min-height: 18px;
  color: #0a64c7;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.feature-mark {
  grid-column: 2;
  justify-self: end;
  width: 28px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(10, 132, 255, 0.18), rgba(50, 173, 230, 0.64));
  box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.16);
}

.feature-task {
  background: linear-gradient(90deg, rgba(19, 168, 200, 0.2), rgba(52, 199, 89, 0.6));
}

.feature-preview {
  background: linear-gradient(90deg, rgba(52, 199, 89, 0.2), rgba(255, 159, 10, 0.62));
}

.feature-data {
  background: linear-gradient(90deg, rgba(10, 132, 255, 0.2), rgba(95, 109, 241, 0.62));
}

.intro-feature-strip strong {
  display: block;
  grid-column: 1 / -1;
  margin-top: 5px;
  color: var(--deep);
  font-size: 15px;
  font-weight: 900;
}

.intro-feature-strip p {
  grid-column: 1 / -1;
  margin: 7px 0 0;
  color: #5b6b7f;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.intro-scenario-grid {
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(64px, auto);
  gap: 8px;
  align-self: stretch;
}

.intro-scenario-grid article {
  grid-template-columns: auto auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  min-height: 64px;
  padding: 11px 13px;
}

.intro-scenario-grid span {
  grid-column: 1;
  grid-row: 1 / 3;
  justify-content: center;
  width: 30px;
  min-height: 30px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(180deg, #0a84ff, #087bd3);
  font-size: 11px;
  letter-spacing: 0;
}

.intro-scenario-grid article:nth-child(2) span {
  background: linear-gradient(180deg, #13a8c8, #0f8ba5);
}

.intro-scenario-grid article:nth-child(3) span {
  background: linear-gradient(180deg, #16a272, #10845d);
}

.intro-scenario-grid .feature-mark {
  grid-column: 2;
  grid-row: 1 / 3;
  width: 4px;
  height: 38px;
  margin: 0 1px 0 2px;
  border-radius: 999px;
}

.intro-scenario-grid strong {
  grid-column: 3;
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
}

.intro-scenario-grid p {
  grid-column: 3;
  margin: 4px 0 0;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.intro-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 30%, rgba(10, 132, 255, 0.12), transparent 28%),
    radial-gradient(circle at 78% 24%, rgba(52, 199, 89, 0.1), transparent 24%),
    radial-gradient(circle at 62% 82%, rgba(255, 159, 10, 0.08), transparent 24%);
}

.intro-shell {
  border-color: rgba(160, 202, 245, 0.92);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(242, 248, 255, 0.9) 46%, rgba(248, 253, 250, 0.84)),
    rgba(255, 255, 255, 0.94);
  box-shadow:
    0 28px 76px rgba(22, 33, 58, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.intro-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 32%, rgba(10, 132, 255, 0.06) 32% 33%, transparent 33% 68%, rgba(52, 199, 89, 0.055) 68% 69%, transparent 69%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent 34%);
}

.intro-ambient span {
  height: 12px;
  opacity: 0.26;
}

.intro-ambient span:nth-child(4) {
  top: 42%;
  left: 8%;
  width: 24vw;
  background: linear-gradient(90deg, transparent, rgba(10, 132, 255, 0.26), rgba(50, 173, 230, 0.34), transparent);
  animation-delay: -1.8s;
}

.intro-ambient span:nth-child(5) {
  top: 54%;
  right: 5%;
  width: 31vw;
  background: linear-gradient(90deg, transparent, rgba(22, 162, 114, 0.3), rgba(52, 199, 89, 0.24), transparent);
  animation-delay: -5.2s;
}

.intro-ambient span:nth-child(6) {
  left: 18%;
  bottom: 23%;
  width: 28vw;
  background: linear-gradient(90deg, transparent, rgba(95, 109, 241, 0.2), rgba(10, 132, 255, 0.22), transparent);
  animation-delay: -8.4s;
}

.intro-ambient span:nth-child(7) {
  right: 15%;
  bottom: 35%;
  width: 19vw;
  background: linear-gradient(90deg, transparent, rgba(255, 159, 10, 0.18), rgba(52, 199, 89, 0.2), transparent);
  animation-delay: -10.2s;
}

.intro-copy h1 {
  text-shadow: 0 16px 34px rgba(15, 59, 94, 0.08);
}

.intro-title-line {
  max-width: none;
  color: #1f2d45;
  font-size: clamp(40px, 3.5vw, 62px);
  white-space: nowrap;
}

.intro-enter-btn {
  min-height: 58px;
  padding: 0 18px 0 22px;
  border-radius: 15px;
  box-shadow:
    0 18px 36px rgba(8, 123, 211, 0.24),
    0 0 0 8px rgba(10, 132, 255, 0.08);
}

.intro-enter-btn:hover {
  transform: translateY(-2px) scale(1.025);
  box-shadow:
    0 22px 44px rgba(8, 123, 211, 0.32),
    0 0 0 11px rgba(10, 132, 255, 0.1);
}

.intro-launch-panel:hover {
  border-color: rgba(10, 132, 255, 0.34);
  box-shadow:
    0 24px 52px rgba(15, 59, 94, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.intro-signal-row {
  grid-template-columns: repeat(4, minmax(96px, auto));
  gap: 10px;
}

.intro-signal-row span {
  display: grid;
  justify-items: start;
  min-height: 48px;
  padding: 8px 13px;
  border-color: rgba(185, 212, 239, 0.84);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 247, 255, 0.74));
  box-shadow: 0 8px 20px rgba(15, 59, 94, 0.055);
}

.intro-signal-row strong {
  color: #0a64c7;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
}

.intro-signal-row small {
  margin-top: 4px;
  color: #526071;
  font-size: 11px;
  font-weight: 820;
  white-space: nowrap;
}

.intro-preview {
  position: relative;
  border-color: rgba(151, 197, 245, 0.96);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 251, 255, 0.92)),
    rgba(255, 255, 255, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 22px 54px rgba(15, 59, 94, 0.12);
}

.intro-preview::before {
  content: "";
  position: absolute;
  top: 0;
  right: 24px;
  left: 24px;
  height: 4px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green), var(--amber));
  opacity: 0.72;
}

.intro-generation-track {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 30px;
  padding: 0 3px;
  color: #526071;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.intro-generation-track i {
  position: relative;
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(111, 128, 150, 0.1);
}

.intro-generation-track i::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 64%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green));
  transform-origin: left center;
  animation: intro-track-fill 3.8s ease-in-out infinite;
}

.intro-demo-board {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.demo-gantt-panel::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 19%;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, transparent, rgba(10, 132, 255, 0.42), transparent);
  animation: intro-build-scan 3.8s ease-in-out infinite;
}

.demo-gantt-line i {
  box-shadow: 0 8px 16px rgba(10, 132, 255, 0.12);
}

.line-two i,
.line-three i {
  box-shadow: 0 8px 16px rgba(22, 162, 114, 0.12);
}

.sync-callout {
  right: 30%;
  bottom: 43%;
  color: #0a64c7;
  background: rgba(232, 244, 255, 0.95);
  border: 1px solid rgba(10, 132, 255, 0.18);
}

.intro-screen[data-step="2"] .sync-callout {
  opacity: 1;
  transform: translateY(0);
}

.intro-screen[data-step="2"] .demo-health-card strong em {
  animation: intro-score-pop 1.4s ease-in-out infinite;
}

.intro-feature-strip article {
  position: relative;
  overflow: hidden;
}

.intro-feature-strip article::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 12px;
  left: 14px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green));
  opacity: 0;
  transform: scaleX(0.2);
  transform-origin: left center;
  transition:
    opacity 0.2s ease,
    transform 0.28s ease;
}

.intro-feature-strip article:hover::after {
  opacity: 0.85;
  transform: scaleX(1);
}

.intro-feature-strip article:nth-child(2)::after {
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.intro-feature-strip article:nth-child(3)::after {
  background: linear-gradient(90deg, var(--green), var(--amber));
}

.intro-feature-strip article:nth-child(4)::after {
  background: linear-gradient(90deg, var(--blue), var(--violet));
}

@media (min-width: 1680px) and (min-height: 860px) {
  .intro-shell {
    width: min(calc(100vw - clamp(48px, 5vw, 96px)), calc((100svh - clamp(36px, 4.4vw, 72px)) * 1.9));
    max-width: none;
    height: calc(100svh - clamp(36px, 4.4vw, 72px));
    grid-template-columns: minmax(560px, 0.78fr) minmax(780px, 1.22fr);
    padding: clamp(34px, 2.4vw, 46px);
  }

  .intro-preview {
    justify-self: end;
    width: 100%;
    max-width: none;
    align-content: start;
  }

  .intro-demo-steps {
    align-items: start;
  }

  .intro-demo-steps button {
    align-self: start;
    height: 82px;
  }
}

@media (min-width: 1181px) and (max-width: 1679px), (min-width: 1181px) and (max-height: 920px) {
  .intro-copy {
    padding-top: clamp(10px, 2.2vh, 24px);
  }

  .intro-copy h1 {
    margin-top: 14px;
  }

  .intro-title-line {
    font-size: clamp(34px, 3.2vw, 52px);
  }

  .intro-hero-subtitle {
    margin-top: 8px;
    font-size: clamp(16px, 1.15vw, 19px);
  }

  .intro-audience-panel {
    gap: 7px;
    margin-top: 14px;
    padding: 11px;
  }

  .intro-audience-panel article {
    min-height: 39px;
    padding: 7px 9px;
  }

  .intro-closing-panel {
    gap: 8px;
    margin-top: 10px;
    padding: 11px;
  }

  .intro-enter-btn,
  .intro-secondary-btn {
    min-height: 48px;
  }

  .intro-preview {
    gap: 12px;
    padding: clamp(16px, 1.8vw, 24px);
  }

  .intro-preview-head {
    margin-bottom: 8px;
  }

  .intro-demo-board {
    grid-template-rows: minmax(188px, 0.95fr) minmax(146px, 0.8fr) auto;
    gap: 10px;
    padding: 12px;
  }

  .demo-phase-list,
  .demo-task-table,
  .demo-gantt-panel {
    gap: 6px;
    padding: 10px;
  }

  .demo-phase-card {
    min-height: 43px;
    padding: 6px 8px;
  }

  .demo-phase-card b {
    width: 28px;
    height: 28px;
  }

  .demo-task-head,
  .demo-task-row {
    gap: 6px;
  }

  .demo-task-head span {
    min-height: 22px;
  }

  .demo-task-row {
    min-height: 34px;
    padding: 0 7px;
  }

  .demo-gantt-panel {
    grid-template-rows: 22px repeat(3, minmax(26px, 1fr));
  }

  .demo-health-card {
    min-height: 54px;
    padding: 10px 12px;
  }

  .demo-health-card strong {
    font-size: 23px;
  }

  .intro-scenario-grid {
    grid-auto-rows: minmax(54px, auto);
    gap: 7px;
  }

  .intro-scenario-grid article {
    min-height: 54px;
    padding: 8px 11px;
  }

  .intro-scenario-grid span {
    width: 28px;
    min-height: 28px;
  }

  .intro-scenario-grid .feature-mark {
    height: 32px;
  }

  .intro-scenario-grid strong {
    font-size: 13px;
  }

  .intro-scenario-grid p {
    margin-top: 2px;
    font-size: 11px;
  }
}

@keyframes intro-rail-drift {
  from {
    transform: translate3d(-28px, 0, 0) scaleX(0.86);
  }
  to {
    transform: translate3d(28px, 0, 0) scaleX(1.06);
  }
}

@keyframes intro-track-fill {
  0%,
  100% {
    transform: scaleX(0.18);
    opacity: 0.72;
  }
  48%,
  76% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes intro-subtitle-progress {
  0%,
  100% {
    transform: translateX(-18%) scaleX(0.36);
    opacity: 0.56;
  }
  48%,
  82% {
    transform: translateX(142%) scaleX(1);
    opacity: 1;
  }
}

@keyframes intro-build-scan {
  0%,
  100% {
    left: 18%;
    opacity: 0.28;
  }
  52%,
  76% {
    left: 82%;
    opacity: 0.74;
  }
}

@keyframes intro-score-pop {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes intro-caret-blink {
  0%,
  48% {
    opacity: 1;
  }
  49%,
  100% {
    opacity: 0;
  }
}

@keyframes intro-bar-grow {
  0%,
  100% {
    transform: scaleX(0.22);
    opacity: 0.74;
  }
  42%,
  72% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes intro-milestone-pulse {
  0%,
  45%,
  100% {
    opacity: 0.42;
    transform: rotate(45deg) scale(0.62);
  }
  62%,
  78% {
    opacity: 1;
    transform: rotate(45deg) scale(0.86);
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-ambient span,
  .demo-gantt-line i,
  .demo-gantt-line b {
    animation: none;
  }
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 0 10px;
  border-bottom: 0;
  background:
    linear-gradient(180deg, #f8fbff 0%, #f5f9fe 72%, #eef4fa 100%);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.topbar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -28px;
  left: 0;
  height: 28px;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, rgba(0, 122, 255, 0.12) 16%, rgba(50, 173, 230, 0.1) 38%, rgba(52, 199, 89, 0.08) 60%, transparent 86%),
    linear-gradient(180deg, rgba(238, 244, 250, 0.92), rgba(238, 244, 250, 0));
  opacity: 0.88;
}

.topbar-inner {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: var(--page-shell-width);
  margin: 0 auto;
}

.brand-block {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  padding-left: 8px;
}

.editor-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.editor-brand-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
  margin: 0;
}

.editor-brand-logo strong {
  color: var(--deep);
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.02em;
}

.editor-entry-banner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: var(--page-shell-width);
  margin: 8px auto 0;
  padding: 9px 12px 9px 14px;
  border: 1px solid rgba(185, 212, 239, 0.86);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(237, 248, 255, 0.82)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    0 14px 30px rgba(15, 59, 94, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.editor-entry-banner[hidden] {
  display: none !important;
}

.entry-banner-copy {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.entry-banner-copy span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1476e8, #0ea5e9);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 122, 255, 0.18);
}

.entry-banner-copy strong {
  min-width: 0;
  overflow: hidden;
  color: #183452;
  font-size: 13px;
  font-weight: 840;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  color: #65758a;
  list-style: none;
  font-size: 12px;
  font-weight: 830;
  white-space: nowrap;
}

.entry-stepper li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.entry-stepper li + li::before {
  content: "";
  width: 20px;
  height: 1px;
  margin: 0 9px;
  background: linear-gradient(90deg, rgba(0, 122, 255, 0.22), rgba(50, 173, 230, 0.42));
}

.entry-stepper li::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.22);
}

.entry-stepper li.active {
  color: #075da8;
}

.entry-stepper li.active::after {
  width: 9px;
  height: 9px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  padding: 0 10px 0 4px;
  border: 1px solid rgba(0, 122, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  box-shadow:
    0 0 0 4px rgba(0, 122, 255, 0.1),
    0 0 18px rgba(52, 199, 89, 0.48);
}

.topbar h1 {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--deep);
  font-family: var(--display-font);
  font-size: clamp(28px, 2.6vw, 42px);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
  background: linear-gradient(95deg, #10213a 0%, #0a64c7 58%, #0e8da8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topbar p,
.hint {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.topbar .brand-block p {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(45, 63, 92, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: #34465d;
  font-size: 13px;
  font-weight: 740;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(22, 33, 58, 0.06);
}

.top-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  justify-content: end;
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(207, 225, 244, 0.78);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(15, 59, 94, 0.07);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.io-menu {
  position: relative;
  z-index: 12;
  min-width: 0;
}

.primary-action-btn,
.save-as-template-btn,
.io-menu-btn,
.io-menu-item {
  white-space: nowrap;
}

.primary-action-btn,
.save-as-template-btn,
.io-menu-btn {
  min-width: 112px;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 830;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.primary-action-btn {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, #0a84ff, #087bd3);
  box-shadow: 0 10px 20px rgba(8, 123, 211, 0.18);
}

.save-as-template-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #17456f;
  border-color: rgba(191, 215, 242, 0.9);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.save-as-template-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(10, 132, 255, 0.34);
  background: #f0f7ff;
  color: #0875d8;
}

.save-as-template-icon {
  position: relative;
  width: 15px;
  height: 15px;
  border: 1.6px solid currentColor;
  border-radius: 3px;
}

.save-as-template-icon::before {
  position: absolute;
  top: -4px;
  left: 3px;
  width: 10px;
  height: 10px;
  border: 1.6px solid currentColor;
  border-radius: 3px;
  background: #fff;
  content: "";
}

.primary-action-btn:hover,
.io-menu-btn:hover {
  transform: translateY(-1px);
}

.io-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #17456f;
  border-color: rgba(207, 225, 244, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 253, 255, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.io-menu-btn:hover {
  border-color: rgba(10, 132, 255, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(241, 248, 255, 0.92));
  box-shadow: 0 8px 18px rgba(10, 100, 199, 0.08);
}

.primary-action-btn:hover {
  box-shadow: 0 13px 24px rgba(8, 123, 211, 0.23);
}

.io-menu-icon {
  position: relative;
  width: 17px;
  height: 13px;
  border: 1.8px solid #0a64c7;
  border-radius: 3px;
  background: rgba(10, 132, 255, 0.08);
}

.io-menu-icon::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 1px;
  width: 8px;
  height: 5px;
  border: 1.8px solid #0a64c7;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
  background: rgba(255, 255, 255, 0.95);
}

.io-menu-caret {
  color: #0a64c7;
  font-size: 10px;
  line-height: 1;
  transition: transform 0.16s ease;
}

.io-menu.open .io-menu-caret {
  transform: rotate(180deg);
}

.io-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: grid;
  gap: 6px;
  width: 168px;
  padding: 8px;
  border: 1px solid rgba(207, 225, 244, 0.92);
  border-radius: 13px;
  background:
    linear-gradient(145deg, #fff, #f7fbff);
  box-shadow: 0 18px 32px rgba(15, 59, 94, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.io-menu.open .io-menu-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.io-menu-item {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #12345a;
  font-size: 13px;
  font-weight: 780;
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.io-menu-item:hover {
  border-color: rgba(10, 132, 255, 0.18);
  background: rgba(232, 244, 255, 0.74);
  transform: translateX(1px);
}

.io-menu-item:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.preview-btn {
  min-width: 118px;
  min-height: 40px;
  padding: 0 17px;
  border: 1px solid rgba(88, 86, 214, 0.2);
  border-radius: 10px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(180deg, rgba(120, 116, 242, 0.95), rgba(88, 86, 214, 0.95));
  box-shadow: 0 12px 26px rgba(88, 86, 214, 0.22);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.preview-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(88, 86, 214, 0.28);
}

.layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  width: var(--page-shell-width);
  min-height: 0;
  margin: 0 auto;
  padding: 10px 0 8px;
  overflow: visible;
}

.layout::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 0;
  left: 0;
  height: 1px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(0, 122, 255, 0.26), rgba(50, 173, 230, 0.18), rgba(52, 199, 89, 0.14), rgba(255, 159, 10, 0.12), transparent 76%);
  pointer-events: none;
}

.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  min-height: 22px;
  margin-top: auto;
  padding: 8px 16px 14px;
  color: rgba(71, 85, 105, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.site-footer-card {
  display: block;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-footer-card strong,
.site-footer-card span {
  text-align: center;
  text-wrap: balance;
}

.site-footer-card strong {
  color: rgba(51, 65, 85, 0.84);
  font-size: 11px;
  font-weight: 800;
}

.site-footer-card span {
  color: rgba(71, 85, 105, 0.74);
  font-size: 10px;
  line-height: 1.45;
}

.plan-pane {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto;
  gap: 14px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(22, 33, 58, 0.075);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.phase-card {
  border: 1px solid rgba(207, 225, 244, 0.86);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 16px rgba(15, 59, 94, 0.045);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.control-board {
  display: grid;
  grid-template-columns: minmax(420px, 0.82fr) minmax(560px, 1.18fr);
  gap: 14px;
  align-items: stretch;
  min-width: 0;
}

.control-panel {
  padding: 14px;
  overflow: hidden;
}

.command-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(240px, 0.78fr);
  gap: 12px;
  align-items: stretch;
  min-height: 152px;
  background:
    radial-gradient(circle at 8% 12%, rgba(0, 122, 255, 0.16), transparent 28%),
    radial-gradient(circle at 94% 8%, rgba(52, 199, 89, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(240, 247, 255, 0.72));
}

.command-panel::after {
  content: none;
}

.command-section {
  min-width: 0;
}

.command-copy {
  position: relative;
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 82px;
  padding: 2px 10px 2px 4px;
}

.command-copy h2 {
  display: block;
  margin: 0;
  color: var(--deep);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.command-copy p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.output-panel {
  display: grid;
  align-content: stretch;
  min-width: 0;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(45, 63, 92, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.44);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.command-group-title {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  color: #526071;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.output-panel {
  align-content: stretch;
}

.output-head {
  display: grid;
  grid-template-columns: auto minmax(130px, 1fr);
  align-items: center;
  gap: 10px;
}

.output-stack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.output-stack .primary-btn,
.output-stack .import-btn,
.output-stack .download-btn,
.output-stack .preview-btn {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  white-space: nowrap;
}

.plan-console {
  display: grid;
  flex: 1 0 auto;
  grid-template-columns: minmax(920px, 1.72fr) minmax(360px, 0.48fr);
  gap: 18px;
  align-items: stretch;
  min-width: 0;
  min-height: 0;
}

.left-console.command-panel {
  align-self: stretch;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: stretch;
  gap: 0;
  min-width: 0;
  min-height: 100%;
  padding: 20px;
  overflow: visible;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(244, 250, 255, 0.78)),
    rgba(255, 255, 255, 0.72);
}

.left-console.command-panel::after {
  content: none;
}

.console-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-width: 0;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(71, 101, 135, 0.12);
}

.left-console .command-copy {
  min-height: 0;
  padding: 0;
}

.left-console .command-copy h2 {
  margin: 4px 0 0;
  font-size: 25px;
}

.left-console .command-copy p {
  margin-top: 6px;
  font-size: 13px;
}

.console-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.project-save-state {
  display: grid;
  grid-template-columns: 8px auto;
  align-items: center;
  gap: 2px 7px;
  min-width: 112px;
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.84);
  color: #64748b;
}

.project-save-state i {
  grid-row: 1 / span 2;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 12%, transparent);
}

.project-save-state span,
.project-save-state small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-save-state span {
  font-size: 11px;
  font-weight: 900;
}

.project-save-state small {
  color: #8291a3;
  font-size: 9px;
  font-weight: 720;
}

.project-save-state[data-state="dirty"] {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(255, 248, 230, 0.88);
  color: #b96b00;
}

.project-save-state[data-state="saved"] {
  border-color: rgba(20, 150, 106, 0.24);
  background: rgba(236, 253, 245, 0.84);
  color: #13865f;
}

.project-save-state[data-state="saving"],
.project-save-state[data-state="pending"] {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(255, 248, 230, 0.88);
  color: #b96b00;
}

.project-save-state[data-state="saving"] i {
  animation: cloud-save-pulse 1s ease-in-out infinite;
}

.project-save-state[data-state="conflict"] {
  border-color: rgba(244, 63, 94, 0.3);
  background: rgba(255, 241, 242, 0.9);
  color: #d62f55;
}

@keyframes cloud-save-pulse {
  50% {
    opacity: 0.38;
    transform: scale(0.72);
  }
}

#saveProjectBtn:disabled {
  border-color: rgba(148, 163, 184, 0.2);
  background: #e8eef5;
  color: #91a0b1;
  box-shadow: none;
  cursor: default;
  transform: none;
}

.plan-calendar-summary {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(8, 125, 240, 0.16);
  border-radius: 8px;
  background: rgba(239, 248, 255, 0.66);
  color: #173b60;
  text-align: left;
}

.plan-calendar-summary:hover,
.plan-calendar-summary:focus-visible {
  border-color: rgba(8, 125, 240, 0.36);
  background: rgba(232, 244, 255, 0.9);
}

.plan-calendar-summary.has-warning {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(255, 247, 229, 0.76);
}

.plan-calendar-summary-icon {
  position: relative;
  width: 19px;
  height: 18px;
  border: 2px solid #1680df;
  border-radius: 4px;
}

.plan-calendar-summary-icon::before,
.plan-calendar-summary-icon::after {
  position: absolute;
  content: "";
}

.plan-calendar-summary-icon::before {
  top: 3px;
  right: -2px;
  left: -2px;
  border-top: 2px solid #1680df;
}

.plan-calendar-summary-icon::after {
  top: -5px;
  left: 3px;
  width: 7px;
  height: 5px;
  border-right: 2px solid #1680df;
  border-left: 2px solid #1680df;
}

.plan-calendar-summary-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.plan-calendar-summary-copy small {
  color: #6b7f94;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.plan-calendar-summary-copy strong {
  color: #14558f;
  font-size: 12px;
  font-weight: 920;
  white-space: nowrap;
}

.plan-calendar-summary-copy em {
  overflow: hidden;
  color: #7a8ca0;
  font-size: 10px;
  font-style: normal;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-calendar-summary > b {
  color: #0875df;
  font-size: 11px;
  font-weight: 900;
}

.plan-calendar-summary.has-warning .plan-calendar-summary-copy strong,
.plan-calendar-summary.has-warning .plan-calendar-summary-copy em,
.plan-calendar-summary.has-warning > b {
  color: #9a5b00;
}

.left-console .workspace {
  align-self: stretch;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 0;
  margin-top: 16px;
  min-height: 0;
}

.left-console .workspace-head {
  align-items: center;
  padding: 0;
}

.left-console .workspace-head h2 {
  margin: 0;
  font-size: 19px;
}

.console-template-badge {
  display: inline-flex;
  align-items: center;
  max-width: min(320px, 36vw);
  min-height: 24px;
  margin-left: 8px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid rgba(185, 212, 239, 0.9);
  border-radius: 999px;
  background: rgba(239, 248, 255, 0.9);
  color: #096ac2;
  font-family: var(--body-font);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.console-template-badge[hidden] {
  display: none !important;
}

.left-console .workspace-preview-btn {
  min-width: 132px;
  min-height: 40px;
  height: 40px;
  font-size: 13px;
}

.left-console .workspace-tasklist-btn {
  border-color: rgba(0, 122, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(239, 248, 255, 0.98), rgba(223, 240, 255, 0.82));
  color: #075aa8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 9px 20px rgba(0, 98, 188, 0.1);
}

.left-console .workspace-tasklist-btn:hover {
  border-color: rgba(0, 122, 255, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 12px 24px rgba(0, 98, 188, 0.14);
}

.left-console .phase-list {
  align-self: stretch;
  gap: 10px;
  padding: 0;
  overflow: visible;
}

.workspace-welcome {
  display: grid;
  grid-template-columns: minmax(270px, 0.58fr) minmax(300px, 0.72fr) minmax(330px, 0.84fr);
  gap: 14px;
  align-items: stretch;
  min-height: 360px;
  padding: 16px;
  border: 1px solid rgba(185, 212, 239, 0.88);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(242, 248, 255, 0.9)),
    linear-gradient(120deg, rgba(0, 122, 255, 0.08), rgba(20, 184, 166, 0.06));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 28px rgba(15, 59, 94, 0.06);
}

.workspace-welcome-copy,
.workspace-welcome-actions,
.workspace-welcome-preview {
  min-width: 0;
}

.workspace-welcome-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 16px;
}

.workspace-welcome-copy h3 {
  margin: 0;
  color: var(--deep);
  font-size: 32px;
  line-height: 1.05;
}

.workspace-welcome-copy p {
  max-width: 280px;
  margin: 0;
  color: #526071;
  font-size: 14px;
  font-weight: 680;
  line-height: 1.7;
}

.workspace-welcome-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: center;
}

.workspace-template-card,
.workspace-start-card {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 9px;
  min-height: 118px;
  padding: 14px;
  border: 1px solid rgba(207, 225, 244, 0.94);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.9));
  color: #12345a;
  text-align: left;
  box-shadow: 0 8px 18px rgba(15, 59, 94, 0.055);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.workspace-template-card::before,
.workspace-start-card::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(0, 122, 255, 0.1);
}

.workspace-template-card:hover,
.workspace-start-card:hover {
  border-color: rgba(0, 122, 255, 0.28);
  box-shadow: 0 12px 24px rgba(15, 59, 94, 0.08);
  transform: translateY(-1px);
}

.workspace-template-card strong,
.workspace-start-card strong {
  padding-right: 18px;
  color: #0f3b5e;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.25;
}

.workspace-template-card small,
.workspace-start-card small {
  color: #64748b;
  font-size: 12px;
  font-weight: 740;
  line-height: 1.45;
}

.workspace-template-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.workspace-template-tags i,
.workspace-welcome-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(0, 122, 255, 0.14);
  border-radius: 999px;
  background: rgba(232, 244, 255, 0.78);
  color: #0a64c7;
  font-size: 11px;
  font-style: normal;
  font-weight: 830;
  white-space: nowrap;
}

.workspace-start-primary {
  background:
    linear-gradient(135deg, rgba(0, 122, 255, 0.98), rgba(17, 106, 203, 0.92));
  color: #fff;
  box-shadow: 0 14px 30px rgba(0, 122, 255, 0.22);
}

.workspace-start-primary::before {
  background: #fff;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.16);
}

.workspace-start-primary strong,
.workspace-start-primary small {
  color: #fff;
}

.workspace-welcome-preview {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(207, 225, 244, 0.92);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 251, 255, 0.7));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.workspace-welcome-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(71, 101, 135, 0.12);
}

.workspace-welcome-preview-head span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 920;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.workspace-welcome-preview-head strong {
  color: #0f3b5e;
  font-size: 14px;
  font-weight: 900;
}

.workspace-welcome-gantt {
  display: grid;
  gap: 10px;
  align-content: center;
}

.workspace-welcome-gantt-row {
  display: grid;
  grid-template-columns: minmax(86px, 0.6fr) minmax(72px, 0.42fr) minmax(120px, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid rgba(207, 225, 244, 0.72);
  border-left: 4px solid var(--phase-accent, var(--blue));
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.workspace-welcome-gantt-row span {
  color: #12345a;
  font-size: 13px;
  font-weight: 860;
  white-space: nowrap;
}

.workspace-welcome-gantt-row small {
  color: #64748b;
  font-size: 11px;
  font-weight: 780;
  white-space: nowrap;
}

.workspace-welcome-gantt-row b {
  position: relative;
  display: block;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(226, 232, 240, 0.74) 0 1px, transparent 1px 24px),
    rgba(235, 241, 248, 0.94);
  background-size: 24px 100%, auto;
}

.workspace-welcome-gantt-row i {
  position: absolute;
  top: 3px;
  height: 10px;
  border-radius: 999px;
  background: var(--phase-accent, var(--blue));
  box-shadow: 0 5px 10px color-mix(in srgb, var(--phase-accent, var(--blue)) 28%, transparent);
}

.workspace-welcome-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.editor-empty-state {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  min-height: 320px;
  padding: 26px;
  border: 1px dashed rgba(0, 122, 255, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(242, 248, 255, 0.74));
  color: #526071;
  text-align: center;
}

.editor-empty-state h3 {
  margin: 0;
  color: var(--deep);
  font-size: 25px;
}

.editor-empty-state p {
  max-width: 420px;
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7;
}

.editor-empty-action {
  margin-top: 6px;
}

.left-console .phase-list::before,
.left-console .phase-card::after {
  content: none;
}

.left-console .phase-card {
  min-height: 58px;
  padding: 12px 14px;
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.91));
  box-shadow: 0 5px 14px rgba(15, 59, 94, 0.035);
}

.left-console .phase-card.expanded {
  padding-bottom: 14px;
  border-color: rgba(185, 212, 239, 0.88);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 254, 0.96));
  box-shadow:
    inset 4px 0 0 var(--phase-accent, var(--blue)),
    0 8px 18px rgba(15, 59, 94, 0.055);
}

.left-console .phase-card::before {
  content: none;
}

.left-console .phase-summary {
  padding-left: 52px;
}

.left-console .task-detail-panel {
  height: auto;
  min-height: 0;
  max-height: none;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

h2 {
  margin: 0 0 12px;
  color: #1f2937;
  font-family: var(--display-font);
  font-size: 17px;
  font-weight: 780;
  line-height: 1.2;
}

h3 {
  margin: 2px 0 0;
  color: #1f2937;
  font-family: var(--display-font);
  font-size: 15px;
  font-weight: 780;
  line-height: 1.2;
}

.field,
.phase-fields label {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.field + .field {
  margin-top: 0;
}

label span {
  color: var(--subtle);
  font-size: 12px;
  font-weight: 700;
}

input[type="text"],
input[type="date"],
input[type="number"],
select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 38px;
  border: 1px solid rgba(142, 142, 147, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  padding: 0 11px;
  text-align: left;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input[type="date"]::-webkit-date-and-time-value,
input[type="date"]::-webkit-datetime-edit {
  width: 100%;
  text-align: left;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus {
  border-color: rgba(0, 122, 255, 0.62);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.14);
}

input[readonly] {
  color: #5b6472;
  background: rgba(244, 246, 250, 0.84);
}

.primary-btn,
.import-btn,
.download-btn,
.secondary-btn,
.danger-btn,
.ghost-btn,
.icon-btn {
  border: 1px solid transparent;
  border-radius: 10px;
  color: #10213a;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.primary-btn,
.import-btn,
.download-btn {
  min-width: 122px;
  min-height: 40px;
  padding: 0 17px;
  color: #fff;
  font-weight: 800;
}

.primary-btn {
  background: linear-gradient(180deg, #1689ff, #0066d6);
  box-shadow: 0 12px 26px rgba(0, 102, 214, 0.22);
}

.import-btn {
  background: linear-gradient(180deg, #39d98a, #16a34a);
  box-shadow: 0 12px 26px rgba(22, 163, 74, 0.2);
}

.download-btn {
  background: linear-gradient(180deg, #7c5cff, #5b48d6);
  box-shadow: 0 12px 26px rgba(88, 72, 214, 0.2);
}

.primary-btn:hover,
.import-btn:hover,
.download-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:disabled,
.import-btn:disabled,
.download-btn:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.secondary-btn,
.danger-btn,
.ghost-btn {
  width: 100%;
  height: 38px;
  margin-top: 8px;
  background: linear-gradient(180deg, rgba(0, 122, 255, 0.13), rgba(0, 122, 255, 0.07));
  border-color: rgba(0, 122, 255, 0.2);
  color: #075eb8;
  font-weight: 760;
}

.danger-btn {
  background: linear-gradient(180deg, rgba(255, 69, 58, 0.13), rgba(255, 69, 58, 0.07));
  border-color: rgba(255, 69, 58, 0.22);
  color: #c92a2a;
  font-weight: 780;
}

.danger-btn:hover {
  background: linear-gradient(180deg, rgba(255, 69, 58, 0.18), rgba(255, 69, 58, 0.1));
  transform: translateY(-1px);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.76);
  border-color: var(--line);
  color: #526071;
}

.icon-btn {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.76);
  border-color: var(--line);
  color: #64748b;
  font-size: 19px;
  line-height: 1;
}

.icon-btn:hover {
  border-color: rgba(255, 45, 85, 0.22);
  color: var(--red);
  background: rgba(255, 45, 85, 0.08);
}

.create-project-dialog {
  position: fixed;
  inset: 0;
  z-index: 58;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.create-project-dialog.open {
  pointer-events: auto;
  opacity: 1;
}

body.create-project-open {
  overflow: hidden;
}

body.save-template-open {
  overflow: hidden;
}

.save-template-dialog {
  position: fixed;
  inset: 0;
  z-index: 59;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.save-template-dialog.open {
  pointer-events: auto;
  opacity: 1;
}

.save-template-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 28, 48, 0.34);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.save-template-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  width: min(640px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  padding: 20px;
  overflow: auto;
  border: 1px solid rgba(170, 207, 244, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(rgba(202, 224, 246, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(202, 224, 246, 0.09) 1px, transparent 1px),
    linear-gradient(145deg, #fff, #f7fbff);
  background-size: 30px 30px, 30px 30px, auto;
  box-shadow: 0 28px 80px rgba(8, 23, 43, 0.34);
  transform: translateY(10px) scale(0.985);
  transition: transform 0.18s ease;
}

.save-template-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, #1476e8, #2fc4b2, #f1a30f);
  content: "";
}

.save-template-dialog.open .save-template-card {
  transform: translateY(0) scale(1);
}

.save-template-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(45, 63, 92, 0.12);
}

.save-template-head h2 {
  margin: 3px 0 0;
  color: var(--deep);
  font-size: 25px;
}

.save-template-head p {
  margin: 6px 0 0;
  color: #65758c;
  font-size: 13px;
  font-weight: 720;
}

.save-template-source-summary {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border-left: 3px solid #1687f8;
  background: rgba(234, 245, 255, 0.82);
}

.save-template-source-summary strong {
  overflow: hidden;
  color: #173b61;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.save-template-source-summary span {
  color: #668096;
  font-size: 12px;
  font-weight: 720;
}

.save-template-form {
  display: grid;
  gap: 13px;
}

.save-template-form label {
  display: grid;
  gap: 7px;
}

.save-template-form label > span {
  color: #557088;
  font-size: 12px;
  font-weight: 850;
}

.save-template-form input,
.save-template-form textarea {
  width: 100%;
  border: 1px solid #bfd8ef;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.94);
  color: #17324f;
  font: inherit;
  font-size: 14px;
  font-weight: 720;
  outline: none;
}

.save-template-form input {
  min-height: 44px;
  padding: 0 12px;
}

.save-template-form textarea {
  min-height: 84px;
  padding: 11px 12px;
  line-height: 1.55;
  resize: vertical;
}

.save-template-form input:focus,
.save-template-form textarea:focus {
  border-color: #1687f8;
  box-shadow: 0 0 0 3px rgba(22, 135, 248, 0.12);
}

.save-template-scope {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #d5e3ef;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
}

.save-template-scope > div {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 92px;
  padding: 13px 14px;
}

.save-template-scope > div + div {
  border-left: 1px solid #d5e3ef;
}

.save-template-scope strong {
  color: #1476e8;
  font-size: 12px;
}

.save-template-scope > div:last-child strong {
  color: #8a6b28;
}

.save-template-scope span {
  color: #6b7d90;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.6;
}

.save-template-hint {
  min-height: 18px;
  margin: -3px 0 0;
  color: #718197;
  font-size: 12px;
  font-weight: 720;
}

.save-template-hint[data-state="error"] {
  color: #b42342;
}

.save-template-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.create-project-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 28, 48, 0.34);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.create-project-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  width: min(940px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  padding: 20px;
  overflow: auto;
  border: 1px solid rgba(170, 207, 244, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(rgba(202, 224, 246, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(202, 224, 246, 0.1) 1px, transparent 1px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.995), rgba(246, 251, 255, 0.985)),
    #fff;
  background-size: 30px 30px, 30px 30px, auto;
  box-shadow:
    0 28px 80px rgba(8, 23, 43, 0.34),
    0 0 0 1px rgba(255, 255, 255, 0.72) inset;
  transform: translateY(10px) scale(0.985);
  transition: transform 0.18s ease;
}

.create-project-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, #1476e8, #2fc4b2, #f1a30f);
  content: "";
}

.create-project-dialog.open .create-project-card {
  transform: translateY(0) scale(1);
}

.create-project-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(45, 63, 92, 0.12);
}

.create-project-head h2 {
  margin: 3px 0 0;
  color: var(--deep);
  font-size: 25px;
}

.create-project-head p {
  margin: 6px 0 0;
  color: #65758c;
  font-size: 13px;
  font-weight: 720;
}

.create-project-steps {
  display: grid;
  grid-template-columns: auto minmax(34px, 1fr) auto;
  align-items: center;
  width: min(420px, 100%);
  padding: 4px;
  border: 1px solid rgba(185, 212, 239, 0.86);
  border-radius: 8px;
  background: rgba(246, 250, 254, 0.86);
}

.create-project-steps span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.create-project-steps b {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 122, 255, 0.12);
  color: #0875d8;
  font-size: 11px;
}

.create-project-steps span.active {
  background: #087fee;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 122, 255, 0.18);
}

.create-project-steps span.active b {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.create-project-steps span.done {
  color: #0875d8;
}

.create-project-steps i {
  height: 1px;
  background: rgba(173, 200, 228, 0.9);
}

.create-project-step-panel {
  display: none;
  min-height: 320px;
}

.create-project-step-panel.active {
  display: grid;
}

#createProjectTemplateStep.active {
  align-content: start;
  gap: 12px;
}

.create-project-import-entry {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid rgba(0, 122, 255, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(232, 245, 255, 0.94), rgba(255, 255, 255, 0.96));
  box-shadow: 0 10px 22px rgba(22, 86, 150, 0.06);
}

.create-project-import-icon {
  position: relative;
  display: block;
  width: 42px;
  height: 46px;
  border: 2px solid #1687f8;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.92);
}

.create-project-import-icon::before {
  position: absolute;
  top: 9px;
  left: 12px;
  width: 14px;
  height: 14px;
  border-right: 2px solid #1687f8;
  border-bottom: 2px solid #1687f8;
  content: "";
  transform: rotate(45deg);
}

.create-project-import-icon::after {
  position: absolute;
  bottom: 8px;
  left: 9px;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #1687f8;
  content: "";
}

.create-project-import-entry div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.create-project-import-entry strong {
  color: #102c4d;
  font-size: 15px;
  font-weight: 900;
}

.create-project-import-entry small {
  color: #64748b;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.45;
}

.create-project-import-btn {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(0, 122, 255, 0.28);
  border-radius: 8px;
  background: #fff;
  color: #0875d8;
  font-size: 12px;
  font-weight: 880;
  white-space: nowrap;
}

.create-project-import-btn:hover {
  border-color: rgba(0, 122, 255, 0.52);
  background: #f2f8ff;
}

.create-project-import-btn:disabled {
  cursor: wait;
  opacity: 0.62;
}

.create-project-choice-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #72839a;
  font-size: 11px;
  font-weight: 840;
}

.create-project-choice-divider::before,
.create-project-choice-divider::after {
  height: 1px;
  background: rgba(185, 212, 239, 0.82);
  content: "";
  flex: 1;
}

.create-project-choice-divider span {
  white-space: nowrap;
}

.create-project-template-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.create-project-template-option {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: auto auto auto auto;
  gap: 8px 12px;
  min-width: 0;
  min-height: 148px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(45, 63, 92, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.9));
  color: #10213a;
  text-align: left;
  box-shadow: 0 10px 22px rgba(22, 33, 58, 0.055);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.create-project-template-option::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--template-accent, #1687f8);
  opacity: 0;
}

.create-project-template-option:hover {
  border-color: rgba(0, 122, 255, 0.32);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(22, 33, 58, 0.085);
}

.create-project-template-option.active {
  border-color: rgba(0, 122, 255, 0.54);
  background:
    linear-gradient(135deg, rgba(235, 247, 255, 0.98), rgba(255, 255, 255, 0.94));
  box-shadow: 0 14px 30px rgba(0, 87, 168, 0.1);
}

.create-project-template-option.active::before {
  opacity: 1;
}

.create-project-template-mark {
  grid-row: 1 / span 4;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--template-accent, #1687f8) 12%, white);
}

.create-project-template-mark::before {
  content: "";
  width: 18px;
  height: 12px;
  border-radius: 999px;
  background: var(--template-accent, #1687f8);
  box-shadow:
    8px 10px 0 color-mix(in srgb, var(--template-accent, #1687f8) 74%, #fff),
    -2px 21px 0 color-mix(in srgb, var(--template-accent, #1687f8) 56%, #fff);
}

.create-project-template-option strong {
  overflow: hidden;
  color: #102c4d;
  font-size: 18px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.create-project-template-option small {
  color: #53667e;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.45;
}

.create-project-template-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.create-project-template-tags i {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(0, 122, 255, 0.15);
  border-radius: 999px;
  background: rgba(232, 244, 255, 0.8);
  color: #0a64c7;
  font-size: 10px;
  font-style: normal;
  font-weight: 820;
  white-space: nowrap;
}

.create-project-template-option em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 780;
}

.create-project-step-panel[hidden] {
  display: none;
}

.create-project-step-panel#createProjectInfoStep.active {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
  gap: 14px;
}

.create-project-info-import {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 7px 8px 7px 12px;
  border: 1px solid rgba(185, 212, 239, 0.72);
  border-radius: 8px;
  background: rgba(246, 250, 254, 0.8);
}

.create-project-info-import span {
  color: #64748b;
  font-size: 12px;
  font-weight: 720;
}

.create-project-info-import button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 7px;
  background: #fff;
  color: #0875d8;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.create-project-info-import button:hover {
  border-color: rgba(0, 122, 255, 0.42);
  background: #f2f8ff;
}

.create-project-form,
.create-project-template-summary {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(185, 212, 239, 0.74);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.create-project-form label {
  display: grid;
  gap: 7px;
  color: #64748b;
  font-size: 12px;
  font-weight: 820;
}

.create-project-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #10213a;
  font-size: 15px;
  font-weight: 760;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.create-project-form input:focus {
  border-color: rgba(0, 122, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

.create-project-template-summary-head {
  display: grid;
  gap: 5px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(185, 212, 239, 0.74);
}

.create-project-template-summary-head span {
  color: #0875d8;
  font-size: 12px;
  font-weight: 900;
}

.create-project-template-summary-head strong {
  color: #102c4d;
  font-size: 18px;
  font-weight: 950;
}

.create-project-phase-preview {
  display: grid;
  gap: 7px;
  max-height: 220px;
  overflow: auto;
}

.create-project-phase-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 8px;
  border: 1px solid color-mix(in srgb, var(--phase-accent, #1687f8) 18%, rgba(185, 212, 239, 0.7));
  border-radius: 8px;
  background: color-mix(in srgb, var(--phase-accent, #1687f8) 8%, rgba(255, 255, 255, 0.9));
}

.create-project-phase-item span {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  border-radius: 7px;
  background: var(--phase-accent, #1687f8);
  color: #fff;
  font-size: 10px;
  font-weight: 950;
}

.create-project-phase-item strong {
  overflow: hidden;
  color: #173b61;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.create-project-phase-item small {
  color: #60738a;
  font-size: 10px;
  font-weight: 780;
  white-space: nowrap;
}

.create-project-empty-preview {
  display: grid;
  place-items: center;
  min-height: 112px;
  color: #7d8ea2;
  font-size: 12px;
  font-weight: 780;
  text-align: center;
}

.create-project-hint {
  min-height: 20px;
  margin: -2px 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 720;
}

.create-project-hint[data-state="error"] {
  color: #b42342;
}

.create-project-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.create-project-actions button {
  min-height: 44px;
  min-width: 104px;
  padding-right: 18px;
  padding-left: 18px;
}

.create-project-actions .primary-action-btn {
  min-width: 136px;
}

.create-project-actions button[hidden] {
  display: none;
}

.template-dialog {
  position: fixed;
  inset: 0;
  z-index: 57;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.template-dialog.open {
  pointer-events: auto;
  opacity: 1;
}

body.template-dialog-open {
  overflow: hidden;
}

.template-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.template-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  width: min(100%, 760px);
  max-height: calc(100vh - 48px);
  padding: 20px;
  border: 1px solid rgba(45, 63, 92, 0.15);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(242, 248, 255, 0.94)),
    rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(22, 33, 58, 0.22);
  overflow: auto;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.18s ease;
}

.template-dialog.open .template-card {
  transform: translateY(0) scale(1);
}

.template-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(45, 63, 92, 0.12);
}

.template-head h2 {
  margin: 3px 0 0;
  color: var(--deep);
  font-size: 24px;
}

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

.template-option {
  display: grid;
  gap: 9px;
  min-width: 0;
  min-height: 220px;
  padding: 15px;
  border: 1px solid rgba(45, 63, 92, 0.13);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.9));
  color: #10213a;
  text-align: left;
  box-shadow: 0 10px 22px rgba(22, 33, 58, 0.06);
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.template-option:hover {
  border-color: rgba(0, 122, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(22, 33, 58, 0.09);
}

.template-option.active {
  border-color: rgba(0, 122, 255, 0.52);
  background:
    linear-gradient(135deg, rgba(235, 247, 255, 0.98), rgba(255, 255, 255, 0.94));
  box-shadow:
    0 14px 30px rgba(0, 87, 168, 0.11),
    inset 4px 0 0 var(--blue);
}

.template-option-title {
  font-size: 17px;
  font-weight: 920;
  line-height: 1.2;
}

.template-option-summary {
  color: #526071;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.45;
}

.template-tags,
.template-phase-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.template-tags span,
.template-phase-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 820;
  white-space: nowrap;
}

.template-tags span {
  border: 1px solid rgba(0, 122, 255, 0.15);
  background: rgba(232, 244, 255, 0.8);
  color: #0a64c7;
}

.template-phase-strip span {
  border: 1px solid rgba(45, 63, 92, 0.1);
  background: rgba(255, 255, 255, 0.76);
  color: #475569;
}

.template-option-meta {
  align-self: end;
  color: #64748b;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.3;
}

.template-start-field {
  display: grid;
  gap: 7px;
}

.template-start-field span {
  color: #64748b;
  font-size: 12px;
  font-weight: 820;
}

.template-start-field input {
  width: min(100%, 260px);
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.92);
  color: #10213a;
  font-size: 15px;
  font-weight: 760;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.template-start-field input:focus {
  border-color: rgba(0, 122, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

.template-hint {
  min-height: 20px;
  margin: -3px 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 720;
}

.template-hint[data-state="error"] {
  color: #b42342;
}

.template-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 10px;
}

.template-actions button {
  min-height: 44px;
}

.template-cancel {
  border: 1px solid rgba(45, 63, 92, 0.14);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.84);
  color: #334155;
  font-size: 14px;
  font-weight: 820;
}

.template-cancel:hover {
  border-color: rgba(0, 122, 255, 0.24);
  background: rgba(239, 248, 255, 0.92);
  color: #0f4c81;
}

.app-toast {
  position: fixed;
  right: 24px;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  max-width: min(480px, calc(100vw - 32px));
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid rgba(0, 122, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 34px rgba(15, 43, 74, 0.18);
  color: #12395e;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-toast::before {
  display: grid;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #1476e8;
  color: #fff;
  content: "i";
  font-size: 12px;
  font-weight: 900;
}

.app-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.app-toast[data-state="ok"] {
  border-color: rgba(21, 158, 100, 0.28);
  color: #116442;
}

.app-toast[data-state="ok"]::before {
  background: #159e64;
  content: "\2713";
}

.app-toast[data-state="error"] {
  border-color: rgba(224, 62, 95, 0.3);
  color: #a42143;
}

.app-toast[data-state="error"]::before {
  background: #e03e5f;
  content: "!";
}

.preview-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: none;
  padding: 14px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 251, 255, 0.72));
}

.preview-panel.fit-mode {
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: stretch;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-head .eyebrow {
  color: var(--blue);
}

.preview-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--tight-shadow);
}

.preview-unit-field {
  position: relative;
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 25px 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #475569;
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.preview-unit-field::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10px;
  width: 6px;
  height: 6px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  pointer-events: none;
  transform: translateY(-62%) rotate(45deg);
}

.preview-unit-field:hover {
  border-color: rgba(0, 122, 255, 0.08);
  background: rgba(0, 122, 255, 0.08);
  color: #0066d6;
}

.preview-unit-field span {
  color: inherit;
}

.preview-unit-select {
  min-width: 18px;
  height: 28px;
  padding: 0;
  border: 0;
  color: #0b63ce;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  appearance: none;
  outline: none;
  cursor: pointer;
}

.preview-unit-field:focus-within {
  border-color: rgba(10, 132, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.14);
}

.preview-edit-btn,
.zoom-btn,
.zoom-icon-btn {
  height: 28px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 780;
}

.preview-edit-btn,
.zoom-btn {
  min-width: 48px;
  padding: 0 10px;
}

.preview-edit-btn.active,
.zoom-btn.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.2);
}

.zoom-icon-btn {
  width: 28px;
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1;
}

.zoom-icon-btn:hover,
.preview-edit-btn:not(.active):hover,
.zoom-btn:not(.active):hover {
  background: rgba(0, 122, 255, 0.08);
  color: #0066d6;
}

.zoom-slider {
  width: 104px;
  accent-color: var(--blue);
}

.zoom-value {
  width: 66px;
  color: #475569;
  font-size: 12px;
  font-weight: 780;
  text-align: right;
}

.zoom-percent-field {
  display: inline-grid;
  grid-template-columns: auto 42px auto;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(0, 122, 255, 0.16);
  border-radius: 7px;
  background: rgba(239, 248, 255, 0.76);
  color: #475569;
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
}

.zoom-percent-field input {
  width: 42px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0b63ce;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  outline: none;
}

.zoom-percent-field input::-webkit-outer-spin-button,
.zoom-percent-field input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.zoom-percent-field:focus-within {
  border-color: rgba(10, 132, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.14);
}

.overview-panel {
  position: relative;
  z-index: 5;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(246, 250, 255, 0.68));
  box-shadow: var(--tight-shadow);
}

@media (max-width: 760px) {
  .editor-brand-row,
  .entry-banner-copy {
    align-items: flex-start;
    flex-direction: column;
  }

  .editor-entry-banner {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-banner-copy strong {
    white-space: normal;
  }

  .entry-stepper {
    flex-wrap: wrap;
    row-gap: 8px;
    white-space: normal;
  }

  .workspace-head {
    align-items: stretch;
    flex-direction: column;
  }

  .stage-list-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .top-controls,
  .header-actions,
  .action-bar,
  .toolbar,
  .control-bar,
  .controls-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }

  .top-controls > *,
  .header-actions > *,
  .action-bar > *,
  .toolbar > *,
  .control-bar > *,
  .controls-row > * {
    flex: 1 1 140px;
    min-width: 0;
  }

  #addPhaseBtn,
  #saveProjectBtn,
  #exportExcelBtn,
  #exportImageBtn,
  #previewTaskListBtn,
  #previewGanttBtn {
    width: 100%;
    min-width: 0;
    justify-content: center;
    white-space: normal;
  }
}

.overview-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.overview-head .eyebrow {
  color: var(--blue);
}

.overview-back {
  height: 30px;
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 7px;
  background: rgba(0, 122, 255, 0.08);
  color: #0066d6;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 780;
}

.project-overview {
  position: relative;
  min-width: 0;
  overflow: visible;
}

.overview-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 8px;
}

.overview-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  min-height: 58px;
  padding: 8px 9px;
  border: 1px solid rgba(142, 142, 147, 0.15);
  border-left: 4px solid var(--phase-accent, var(--blue));
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.overview-card.popover-open {
  z-index: 80;
}

.overview-card:hover,
.overview-card.located {
  border-color: color-mix(in srgb, var(--phase-accent, var(--blue)) 28%, transparent);
  background: color-mix(in srgb, var(--phase-accent, var(--blue)) 7%, #fff);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--phase-accent, var(--blue)) 12%, transparent);
  transform: translateY(-1px);
}

.overview-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.overview-phase-name {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  color: #1f2937;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-date,
.overview-count-cell {
  color: #475569;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.overview-count-cell {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  overflow: visible;
}

.overview-count-btn {
  min-width: 54px;
  height: 26px;
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-color: color-mix(in srgb, var(--phase-accent, var(--blue)) 24%, transparent);
  border-radius: 999px;
  background: rgba(0, 122, 255, 0.08);
  background: color-mix(in srgb, var(--phase-accent, var(--blue)) 10%, #fff);
  color: var(--phase-accent, #0066d6);
  font-size: 11px;
  font-weight: 850;
  box-shadow: 0 5px 12px rgba(0, 122, 255, 0.08);
  box-shadow: 0 5px 12px color-mix(in srgb, var(--phase-accent, var(--blue)) 10%, transparent);
}

.overview-count-btn:hover {
  background: var(--blue);
  background: var(--phase-accent, var(--blue));
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 122, 255, 0.2);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--phase-accent, var(--blue)) 22%, transparent);
}

.overview-count-btn.active {
  background: var(--blue);
  background: var(--phase-accent, var(--blue));
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 122, 255, 0.2);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--phase-accent, var(--blue)) 22%, transparent);
}

.overview-popover {
  position: absolute;
  top: 34px;
  right: 0;
  z-index: 120;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(440px, calc(100vw - 38px));
  max-height: clamp(260px, calc(100vh - 220px), 440px);
  gap: 8px;
  padding: 11px;
  overflow: hidden;
  border: 1px solid rgba(142, 142, 147, 0.22);
  border-left: 4px solid var(--phase-accent, var(--blue));
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  animation: popover-in 0.16s ease both;
}

.overview-popover-title {
  min-width: 0;
  overflow: hidden;
  color: #1f2937;
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.overview-popover-list {
  min-height: 0;
  max-height: clamp(180px, calc(100vh - 330px), 330px);
  overflow: auto;
  overscroll-behavior: contain;
}

.preview-scroll {
  position: relative;
  z-index: 1;
}

.overview-detail {
  display: grid;
  gap: 8px;
}

.overview-detail-banner {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid rgba(142, 142, 147, 0.16);
  border-left: 4px solid var(--phase-accent, var(--blue));
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.overview-detail-title {
  color: #1f2937;
  font-size: 14px;
  font-weight: 850;
}

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

.overview-task-list {
  display: grid;
  max-height: 178px;
  overflow: auto;
  border: 1px solid rgba(142, 142, 147, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
}

.overview-task-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 90px 90px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-top: 1px solid rgba(142, 142, 147, 0.13);
  color: #374151;
  font-size: 12px;
}

.overview-task-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(238, 243, 249, 0.96);
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.overview-task-row:first-child {
  border-top: 0;
}

.overview-task-name {
  overflow: hidden;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-task-date {
  color: #64748b;
  white-space: nowrap;
}

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

.preview-scroll {
  min-height: 0;
  grid-row: 2;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.94), rgba(241, 246, 252, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.gantt-modal-dialog.fit-mode .preview-scroll {
  height: 100%;
  max-height: none;
}

.gantt-modal-dialog.manual-mode .preview-scroll {
  height: 100%;
  max-height: calc(100dvh - 300px);
  min-height: 0;
  overflow: auto;
}

.preview-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  overflow: visible;
}

.gantt-preview {
  --week-width: 72px;
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  min-width: max-content;
  color: #334155;
  background: #f7f9fc;
  transform-origin: top left;
  transition: transform 0.16s ease;
}

.preview-title {
  min-height: 50px;
  padding: 13px 16px;
  border-bottom: 1px solid #dce6f2;
  background:
    linear-gradient(90deg, rgba(22, 33, 58, 0.05), rgba(255, 255, 255, 0.96));
  color: #123c94;
  font-size: 23px;
  font-weight: 850;
  line-height: 1;
}

.preview-head-cell,
.preview-month,
.preview-week,
.preview-date,
.preview-name,
.preview-duration,
.preview-holiday,
.preview-status,
.preview-owner,
.preview-track {
  border-right: 1px solid #dbe5f1;
  border-bottom: 1px solid #dbe5f1;
}

.preview-head-cell {
  display: grid;
  place-items: center;
  min-height: 78px;
  background: #dce9fb;
  color: #1e3a8a;
  font-size: 15px;
  font-weight: 850;
}

.preview-duration-head {
  background: #dff3f8;
  color: #0f4c63;
}

.preview-holiday-head {
  background: #e8eef6;
  color: #35516f;
  font-size: 13px;
}

.preview-owner-head {
  background: #edf3fb;
  color: #36506a;
  font-size: 12px;
}

.preview-status-head {
  background: #edf8f3;
  color: #166534;
  font-size: 12px;
}

.preview-month {
  display: grid;
  place-items: center;
  min-height: 34px;
  padding: 0 6px;
  background: #e5ebf4;
  color: #334155;
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.preview-year-band {
  background:
    linear-gradient(180deg, rgba(224, 242, 254, 0.92), rgba(229, 231, 235, 0.96));
  color: #0f3b5e;
}

.preview-month-unit {
  color: #0f4c63;
  background:
    linear-gradient(180deg, rgba(236, 253, 245, 0.9), rgba(238, 243, 249, 0.98));
}

.gantt-preview[data-timeline-unit="month"] .preview-date {
  color: #5f7288;
  font-size: 10px;
}

.gantt-preview[data-timeline-unit="day"] .preview-week {
  padding: 0 3px;
  color: #245179;
  font-size: 11px;
}

.gantt-preview[data-timeline-unit="day"] .preview-date {
  min-height: 22px;
  padding: 0 2px;
  font-size: 9px;
}

.preview-week,
.preview-date {
  display: grid;
  place-items: center;
  background: #eef3f9;
  color: #334155;
  font-weight: 850;
}

.preview-date {
  min-height: 24px;
  background: #f5f8fc;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

.gantt-preview[data-timeline-unit="day"] .preview-day-weekend {
  background: #fff8ed;
  color: #b45309;
}

.gantt-preview[data-timeline-unit="month"] .preview-month-unit {
  color: #0f4c63;
  background:
    linear-gradient(180deg, rgba(236, 253, 245, 0.9), rgba(238, 243, 249, 0.98));
}

.preview-name,
.preview-duration,
.preview-holiday,
.preview-status,
.preview-owner {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  background: #f1f5fc;
  color: #334155;
  font-size: 13px;
}

.preview-name {
  white-space: nowrap;
}

.preview-duration {
  justify-content: flex-start;
  background: #eef7fb;
  color: #475569;
  text-align: left;
  white-space: nowrap;
}

.preview-holiday {
  justify-content: center;
  background: #f4f7fb;
  color: #486177;
  font-weight: 780;
  white-space: nowrap;
}

.preview-owner {
  overflow: hidden;
  justify-content: flex-start;
  background: #f8fbff;
  color: #475569;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-status {
  justify-content: center;
  background: #f4fbf7;
  color: #166534;
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

.preview-row-phase.preview-name {
  min-height: 36px;
  background: color-mix(in srgb, var(--phase-accent, var(--blue)) 12%, #fff);
  color: color-mix(in srgb, var(--phase-accent, var(--blue)) 76%, #111827);
  font-size: 15px;
  font-weight: 850;
}

.preview-row-phase.preview-duration {
  justify-content: flex-start;
  min-height: 36px;
  background: color-mix(in srgb, var(--phase-accent, var(--cyan)) 10%, #fff);
  color: color-mix(in srgb, var(--phase-accent, var(--cyan)) 72%, #111827);
  font-size: 15px;
  font-weight: 850;
  text-align: left;
}

.preview-row-phase.preview-holiday {
  min-height: 36px;
  background: color-mix(in srgb, var(--phase-accent, var(--blue)) 6%, #f8fbff);
  color: #35516f;
  font-size: 14px;
  font-weight: 850;
}

.preview-row-phase.preview-owner {
  min-height: 36px;
  background: color-mix(in srgb, var(--phase-accent, var(--blue)) 4%, #fbfdff);
  color: #64748b;
  font-weight: 760;
}

.preview-row-phase.preview-status {
  min-height: 36px;
  background: color-mix(in srgb, var(--phase-accent, var(--green)) 7%, #f7fcfa);
  color: color-mix(in srgb, var(--phase-accent, var(--green)) 72%, #166534);
  font-size: 14px;
  font-weight: 900;
}

.preview-track {
  position: relative;
  min-height: 32px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 calc(var(--week-width) - 1px),
      rgba(193, 207, 226, 0.35) calc(var(--week-width) - 1px) var(--week-width)
    ),
    #f9fbfe;
}

.preview-track.preview-row-phase {
  min-height: 36px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 calc(var(--week-width) - 1px),
      rgba(193, 207, 226, 0.38) calc(var(--week-width) - 1px) var(--week-width)
    ),
    color-mix(in srgb, var(--phase-accent, var(--blue)) 5%, #fff);
}

.preview-row-overdue.preview-name,
.preview-row-overdue.preview-duration {
  background: #fff3f6;
  color: #a51f3d;
}

.preview-row-overdue.preview-name::before {
  content: '';
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #e73d62;
  box-shadow: 0 0 0 3px rgba(231, 61, 98, 0.1);
}

.preview-track.preview-row-overdue {
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 calc(var(--week-width) - 1px),
      rgba(205, 164, 175, 0.28) calc(var(--week-width) - 1px) var(--week-width)
    ),
    #fff8fa;
}

.preview-bar-shell.is-overdue {
  border-color: rgba(231, 61, 98, 0.42);
  box-shadow: 0 0 0 2px rgba(231, 61, 98, 0.08);
}

.preview-bar-shell.is-overdue .preview-bar-fill {
  background: var(--bar-color, #e73d62);
  border-color: #e73d62;
}

.preview-today-layer {
  position: relative;
  z-index: 7;
  min-width: 0;
  pointer-events: none;
}

.preview-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 45, 85, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.62);
  transform: translateX(-1px);
}

.preview-today-label {
  position: absolute;
  top: 4px;
  left: 50%;
  min-width: max-content;
  padding: 2px 5px;
  border-radius: 5px;
  background: #e73d62;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
  transform: translateX(-50%);
  box-shadow: 0 3px 8px rgba(183, 29, 65, 0.2);
}

.preview-row-focused.preview-name,
.preview-row-focused.preview-duration,
.preview-row-focused.preview-holiday,
.preview-row-focused.preview-status,
.preview-row-focused.preview-owner,
.preview-row-focused.preview-track {
  box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--phase-accent, var(--blue)) 8%, transparent);
}

.preview-row-focused.preview-name {
  box-shadow:
    inset 4px 0 0 var(--phase-accent, var(--blue)),
    inset 0 0 0 999px color-mix(in srgb, var(--phase-accent, var(--blue)) 10%, transparent);
}

.preview-bar-shell,
.preview-bar-fill {
  position: absolute;
  top: 50%;
  height: 18px;
  border-radius: 5px;
  transform: translateY(-50%);
}

.preview-row-phase .preview-bar-shell,
.preview-row-phase .preview-bar-fill {
  height: 22px;
}

.preview-bar-shell {
  background: #fff;
  border: 1px solid #dce4f0;
}

.gantt-preview.preview-edit-mode .preview-bar-task {
  cursor: grab;
  touch-action: none;
}

.gantt-preview.preview-edit-mode .preview-bar-task:hover {
  border-color: rgba(0, 122, 255, 0.44);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}

.gantt-preview.preview-edit-mode .preview-bar-task:hover .preview-bar-fill {
  filter: saturate(1.08) brightness(1.02);
}

.preview-bar-task.is-dragging {
  z-index: 8;
  cursor: grabbing;
  border-color: rgba(0, 122, 255, 0.62);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16), 0 0 0 3px rgba(0, 122, 255, 0.16);
}

.preview-bar-task.is-resizing {
  z-index: 8;
  cursor: ew-resize;
  border-color: rgba(0, 122, 255, 0.62);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16), 0 0 0 3px rgba(0, 122, 255, 0.16);
}

.preview-bar-task.is-milestone-dragging {
  z-index: 8;
  cursor: grab;
  border-color: rgba(255, 45, 85, 0.48);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16), 0 0 0 3px rgba(255, 45, 85, 0.14);
}

.preview-resize-handle {
  position: absolute;
  top: 50%;
  z-index: 9;
  width: 10px;
  height: calc(100% + 8px);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(226, 236, 249, 0.92));
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
  cursor: ew-resize;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.preview-resize-start {
  left: -5px;
}

.preview-resize-end {
  right: -5px;
}

.gantt-preview.preview-edit-mode .preview-bar-task:hover .preview-resize-handle,
.preview-bar-task.is-resizing .preview-resize-handle {
  opacity: 1;
  pointer-events: auto;
}

.preview-bar-task.is-resizing .preview-resize-handle {
  transform: translateY(-50%) scaleY(1.08);
}

.preview-task-dragging,
.preview-task-dragging * {
  cursor: grabbing !important;
  user-select: none;
}

.preview-task-resizing,
.preview-task-resizing * {
  cursor: ew-resize !important;
  user-select: none;
}

.preview-milestone-dragging,
.preview-milestone-dragging * {
  cursor: grabbing !important;
  user-select: none;
}

.preview-is-dragging {
  transition: none;
}

.preview-bar-fill {
  left: 0;
  background: var(--bar-color, var(--blue));
  border: 1px solid var(--bar-color, var(--blue));
}

.preview-drag-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 10;
  min-width: max-content;
  padding: 5px 8px;
  border: 1px solid rgba(14, 78, 150, 0.22);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f3764;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  pointer-events: none;
  transform: translateX(-50%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

.preview-drag-label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 8px;
  height: 8px;
  border-right: 1px solid rgba(14, 78, 150, 0.22);
  border-bottom: 1px solid rgba(14, 78, 150, 0.22);
  background: rgba(255, 255, 255, 0.96);
  transform: translateX(-50%) rotate(45deg);
}

.preview-milestone {
  position: absolute;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  transform: translateY(-50%);
}

.gantt-preview.preview-edit-mode .preview-milestone-draggable {
  cursor: grab;
}

.gantt-preview.preview-edit-mode .preview-milestone-draggable:hover .preview-milestone-star {
  filter: drop-shadow(0 0 6px rgba(255, 45, 85, 0.35));
  transform: scale(1.08);
}

.preview-milestone-star {
  color: var(--red);
  font-size: 18px;
  line-height: 1;
  transition: filter 0.14s ease, transform 0.14s ease;
}

.preview-milestone-label {
  white-space: nowrap;
}

.preview-milestone-countdown {
  display: none;
  padding-left: 6px;
  border-left: 1px solid rgba(113, 128, 150, 0.28);
  color: #63758a;
  font-size: 10px;
  font-weight: 850;
}

.preview-empty {
  padding: 26px;
  color: var(--muted);
  font-size: 13px;
}

.workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  height: auto;
  overflow: visible;
  padding: 0 2px 0 0;
  padding-right: 2px;
  scrollbar-color: rgba(0, 122, 255, 0.28) transparent;
  scrollbar-width: thin;
}

.workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 8px 0 34px;
}

.stage-list-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}

.workspace-head h2 {
  margin: 0;
  color: var(--deep);
  font-size: 18px;
}

.workspace-note {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.workspace-add-phase-btn {
  width: auto;
  min-width: 124px;
  min-height: 40px;
  height: 40px;
  margin-top: 0;
  padding: 0 14px;
  border-radius: 10px;
}

.workspace-add-phase-btn,
.task-detail-head .add-task {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(239, 248, 255, 0.96), rgba(220, 239, 255, 0.78));
  border-color: rgba(0, 122, 255, 0.24);
  color: #0057a8;
  font-weight: 850;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 8px 18px rgba(0, 87, 168, 0.08);
}

.workspace-add-phase-btn:hover,
.task-detail-head .add-task:hover {
  background: linear-gradient(180deg, rgba(226, 243, 255, 0.98), rgba(205, 231, 255, 0.84));
  border-color: rgba(0, 122, 255, 0.36);
  transform: translateY(-1px);
}

.workspace-preview-btn {
  width: auto;
  min-width: 148px;
  height: 40px;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 10px;
  font-size: 12px;
  box-shadow: 0 10px 22px rgba(88, 86, 214, 0.18);
}

.project-stats {
  min-width: 0;
}

.health-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  min-height: 152px;
  padding: 14px;
  overflow: hidden;
  border-color: rgba(0, 122, 255, 0.16);
  background:
    linear-gradient(90deg, rgba(0, 122, 255, 0.08), transparent 34%, rgba(52, 199, 89, 0.07) 68%, rgba(255, 159, 10, 0.06)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(240, 247, 255, 0.74));
}

.health-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green), var(--amber));
}

.health-panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.health-panel-head h2 {
  margin: 0;
  color: var(--deep);
  font-size: 20px;
  font-weight: 920;
  letter-spacing: -0.02em;
}

.health-panel-note {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 11px;
  border: 1px solid rgba(0, 122, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  flex: 0 0 auto;
  color: #0a64c7;
  font-size: 11px;
  font-weight: 850;
}

.health-panel-note[data-tone="good"] {
  border-color: rgba(52, 199, 89, 0.24);
  color: #137a38;
  background: rgba(52, 199, 89, 0.1);
}

.health-panel-note[data-tone="watch"] {
  border-color: rgba(255, 159, 10, 0.26);
  color: #9a5a00;
  background: rgba(255, 159, 10, 0.11);
}

.health-panel-note[data-tone="risk"] {
  border-color: rgba(255, 45, 85, 0.25);
  color: #b42342;
  background: rgba(255, 45, 85, 0.1);
}

.health-dashboard {
  --progress: 0deg;
  --timeline-progress: 0%;
  --health-accent: var(--blue);
  --health-soft: rgba(0, 122, 255, 0.1);
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(170px, 0.78fr) minmax(300px, 1.1fr) minmax(210px, 0.86fr);
  grid-template-areas:
    "progress metrics milestone";
  gap: 12px;
  align-items: stretch;
  min-width: 0;
}

.health-dashboard[data-tone="good"] {
  --health-accent: var(--green);
  --health-soft: rgba(52, 199, 89, 0.12);
}

.health-dashboard[data-tone="watch"] {
  --health-accent: var(--amber);
  --health-soft: rgba(255, 159, 10, 0.13);
}

.health-dashboard[data-tone="risk"] {
  --health-accent: var(--red);
  --health-soft: rgba(255, 45, 85, 0.12);
}

.health-progress-card,
.health-grid,
.health-milestone-card {
  position: relative;
  min-width: 0;
  min-height: 104px;
  border: 1px solid rgba(45, 63, 92, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(243, 248, 253, 0.72));
  box-shadow: var(--tight-shadow);
  overflow: hidden;
}

.health-progress-card {
  grid-area: progress;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 12px;
  min-height: 124px;
  padding: 13px 14px 13px 18px;
  border-color: color-mix(in srgb, var(--health-accent) 22%, rgba(45, 63, 92, 0.12));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--health-accent) 8%, #fff), rgba(255, 255, 255, 0.78) 48%, rgba(242, 247, 253, 0.76));
  text-align: left;
}

.health-progress-card::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 8px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--health-accent));
}

.health-ring {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #fff 0 57%, transparent 58%),
    conic-gradient(var(--health-accent) var(--progress), rgba(148, 163, 184, 0.18) 0);
  box-shadow:
    inset 0 0 0 1px rgba(45, 63, 92, 0.08),
    0 12px 24px var(--health-soft);
}

.health-ring strong {
  color: var(--deep);
  font-family: var(--display-font);
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.health-progress-copy {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
}

.health-pace-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 22px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--health-accent) 26%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--health-accent) 10%, #fff);
  color: color-mix(in srgb, var(--health-accent) 78%, #10213a);
  font-size: 11px;
  font-weight: 880;
}

.health-progress-title {
  color: var(--deep);
  font-size: 16px;
  font-weight: 900;
}

.health-progress-meta {
  margin-top: 0;
  color: var(--subtle);
  font-size: 11px;
  font-weight: 760;
}

.health-grid {
  grid-area: metrics;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) 10px auto;
  gap: 8px 10px;
  min-height: 124px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(246, 250, 253, 0.7)),
    linear-gradient(90deg, rgba(0, 122, 255, 0.04), rgba(52, 199, 89, 0.05));
}

.health-stat {
  position: relative;
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px 10px 18px;
  border: 1px solid rgba(45, 63, 92, 0.1);
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(248, 251, 255, 0.68));
  overflow: hidden;
}

.health-stat::before {
  content: "";
  position: absolute;
  inset: 11px auto 11px 7px;
  width: 4px;
  border-radius: 999px;
  background: #94a3b8;
}

.health-stat.ok::before {
  background: var(--green);
}

.health-stat.risk::before {
  background: var(--red);
}

.health-stat.time::before {
  background: var(--cyan);
}

.health-label {
  color: var(--subtle);
  font-size: 11px;
  font-weight: 850;
}

.health-value {
  color: var(--deep);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
}

.health-detail {
  overflow: hidden;
  color: #667085;
  font-size: 11px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-panel .health-detail {
  line-height: 1.28;
  white-space: normal;
}

.health-timeline {
  grid-column: 1 / -1;
  align-self: center;
  height: 10px;
  padding: 2px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.13);
}

.health-timeline-fill {
  display: block;
  width: var(--timeline-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--green));
  box-shadow: 0 0 16px rgba(0, 122, 255, 0.18);
}

.health-timeline-meta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  color: #667085;
  font-size: 11px;
  font-weight: 720;
}

.health-timeline-meta strong {
  overflow: hidden;
  color: var(--deep);
  font-size: 11px;
  font-weight: 850;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-milestone-card {
  grid-area: milestone;
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 124px;
  padding: 13px 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(246, 250, 253, 0.7)),
    linear-gradient(90deg, rgba(52, 199, 89, 0.06), rgba(0, 122, 255, 0.04));
}

.health-milestone-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.milestone-nodes {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-height: 18px;
}

.milestone-nodes::before {
  content: "";
  position: absolute;
  inset: 8px 5px auto;
  height: 2px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.milestone-nodes span {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(45, 63, 92, 0.16);
  background: #eef3f8;
}

.milestone-nodes span.done {
  border-color: rgba(22, 163, 74, 0.28);
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.12);
}

.health-phase-flow {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 5px;
  min-height: 13px;
}

.health-phase-segment {
  position: relative;
  min-width: 0;
  height: 11px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--phase-accent, var(--blue)) 24%, rgba(45, 63, 92, 0.1));
  border-radius: 999px;
  background: color-mix(in srgb, var(--phase-accent, var(--blue)) 10%, #fff);
}

.health-phase-segment::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--phase-progress);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--phase-accent, var(--blue)), color-mix(in srgb, var(--phase-accent, var(--blue)) 72%, #fff));
}

.plan-console .health-panel {
  position: relative;
  align-self: stretch;
  display: block;
  min-height: 0;
  height: auto;
  max-height: none;
  padding: 18px;
  border-radius: 20px;
  overflow: visible;
  overscroll-behavior: contain;
  scrollbar-color: rgba(0, 122, 255, 0.22) transparent;
  scrollbar-width: thin;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(244, 250, 255, 0.78)),
    rgba(255, 255, 255, 0.72);
}

.plan-console .health-panel-sticky {
  position: sticky;
  top: var(--health-sticky-top);
  display: grid;
  grid-template-rows: auto auto;
  gap: 14px;
  max-height: calc(100svh - var(--health-sticky-top) - 18px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(0, 122, 255, 0.22) transparent;
  scrollbar-width: thin;
}

.plan-console .health-panel-head {
  align-items: start;
  margin-bottom: 0;
}

.plan-console .health-panel-head h2 {
  margin: 4px 0 0;
  font-size: 25px;
}

.plan-console .health-panel-note {
  min-height: 28px;
  padding: 0 12px;
}

.plan-console .health-dashboard {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: none;
  gap: 12px;
  min-width: 0;
}

.plan-console .health-card {
  grid-area: auto;
  grid-column: auto;
  grid-row: auto;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(71, 101, 135, 0.13);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.plan-console .health-card h3 {
  margin: 0 0 10px;
  color: #526071;
  font-family: var(--body-font);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.plan-console .bar-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  color: #526071;
  font-size: 12px;
  font-weight: 800;
}

.plan-console .bar-row strong {
  color: #45566f;
  text-align: right;
}

.plan-console .health-bar {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(111, 128, 150, 0.12);
}

.plan-console .health-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.plan-console .health-bar.time i {
  background: linear-gradient(90deg, var(--amber), #ff7d45);
}

.plan-console .health-hint {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 11px;
  color: #9b6100;
  background: rgba(255, 159, 10, 0.1);
  font-size: 12px;
  font-weight: 820;
  line-height: 1.35;
}

.plan-console .health-dashboard[data-tone="good"] .health-hint {
  color: #177a3d;
  background: rgba(52, 199, 89, 0.1);
}

.plan-console .health-dashboard[data-tone="risk"] .health-hint {
  color: #b42342;
  background: rgba(255, 45, 85, 0.1);
}

.plan-console .health-metric-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.plan-console .health-metric-value {
  color: #0f2138;
  font-family: var(--display-font);
  font-size: 30px;
  font-weight: 950;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.plan-console .health-metric-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.plan-console .metric-badge,
.plan-console .overdue-ok,
.plan-console .overdue-risk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
}

.plan-console .metric-badge {
  border: 1px solid rgba(71, 101, 135, 0.13);
  color: #526071;
  background: rgba(255, 255, 255, 0.66);
}

.plan-console .overdue-ok {
  color: #177a3d;
  background: rgba(52, 199, 89, 0.12);
}

.plan-console .overdue-risk {
  color: #b42342;
  background: rgba(255, 45, 85, 0.12);
}

.plan-console .milestone-value-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.plan-console .milestone-ratio {
  color: #0f2138;
  font-family: var(--display-font);
  font-size: 30px;
  font-weight: 950;
  letter-spacing: -0.03em;
  line-height: 1;
}

.plan-console .milestone-percent {
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
}

.plan-console .milestone-track {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(111, 128, 150, 0.12);
}

.plan-console .milestone-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.phase-list {
  position: relative;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  padding: 0 8px 18px 34px;
  scrollbar-color: rgba(0, 122, 255, 0.28) transparent;
  scrollbar-width: thin;
}

.phase-list::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 18px;
  width: 2px;
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      rgba(17, 106, 203, 0.18),
      rgba(19, 168, 200, 0.28),
      rgba(22, 162, 114, 0.26),
      rgba(95, 109, 241, 0.28),
      rgba(139, 92, 246, 0.18)
    );
}

.phase-card {
  position: relative;
  display: grid;
  grid-template-rows: auto;
  gap: 10px;
  height: auto;
  min-height: 58px;
  max-height: none;
  padding: 13px 13px 13px 18px;
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.91));
  box-shadow: 0 5px 14px rgba(15, 59, 94, 0.035);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  transform: none;
  animation: none;
  backface-visibility: hidden;
}

.phase-card::after {
  content: "";
  position: absolute;
  top: 24px;
  left: -29px;
  width: 14px;
  height: 14px;
  border: 3px solid #f8fbff;
  border-radius: 999px;
  background: var(--phase-accent, var(--blue));
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--phase-accent, var(--blue)) 10%, transparent),
    0 4px 10px color-mix(in srgb, var(--phase-accent, var(--blue)) 14%, transparent);
  pointer-events: none;
}

.phase-card.expanded {
  z-index: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 254, 0.96));
  box-shadow:
    inset 4px 0 0 var(--phase-accent, var(--blue)),
    0 8px 18px rgba(15, 59, 94, 0.055);
}

.phase-card.collapsed {
  height: auto;
  min-height: 58px;
  padding: 10px 12px 10px 18px;
}

.phase-card.collapsed .task-detail-panel,
.phase-card.collapsed .phase-fields,
.phase-card.collapsed .phase-summary {
  display: none;
}

.phase-card::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 4px;
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--phase-accent, var(--blue)) 92%, #fff),
      color-mix(in srgb, var(--phase-accent, var(--blue)) 58%, #fff)
    );
}

.phase-card:hover {
  border-color: rgba(0, 122, 255, 0.24);
  border-color: color-mix(in srgb, var(--phase-accent, var(--blue)) 28%, transparent);
}

.phase-card.phase-focused {
  border-color: color-mix(in srgb, var(--phase-accent, var(--blue)) 46%, transparent);
  box-shadow:
    inset 4px 0 0 var(--phase-accent, var(--blue)),
    0 9px 20px rgba(15, 59, 94, 0.07),
    0 0 0 3px color-mix(in srgb, var(--phase-accent, var(--blue)) 10%, transparent);
}

.phase-card-header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  min-height: 34px;
}

.phase-card.collapsed .phase-card-header {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

.phase-index {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--phase-accent, var(--blue));
  background: linear-gradient(180deg, var(--phase-accent, var(--blue)), #1d4ed8);
  background: linear-gradient(
    180deg,
    var(--phase-accent, var(--blue)),
    color-mix(in srgb, var(--phase-accent, var(--blue)) 72%, #111827)
  );
  color: #fff;
  font-family: var(--display-font);
  font-size: 15px;
  font-weight: 850;
  box-shadow:
    0 8px 16px color-mix(in srgb, var(--phase-accent, var(--blue)) 22%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.phase-card.expanded .phase-index {
  transform: none;
  box-shadow:
    0 10px 22px color-mix(in srgb, var(--phase-accent, var(--blue)) 28%, transparent),
    0 0 0 5px color-mix(in srgb, var(--phase-accent, var(--blue)) 12%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.phase-card.collapsed .phase-index {
  width: 32px;
  height: 32px;
  font-size: 14px;
}

.phase-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 170px) minmax(150px, 170px);
  gap: 10px 12px;
  align-items: end;
}

.phase-card.expanded .phase-fields {
  grid-column: 2;
}

.phase-compact-summary {
  display: none;
}

.phase-card.collapsed .phase-compact-summary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.phase-compact-name {
  min-width: 86px;
  overflow: hidden;
  color: #111827;
  font-size: 15px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phase-compact-date {
  color: color-mix(in srgb, var(--phase-accent, var(--blue)) 78%, #334155);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.phase-compact-metric {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(142, 142, 147, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #475569;
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

.phase-tools {
  display: flex;
  gap: 6px;
  align-items: center;
}

.phase-card.expanded .phase-tools {
  grid-column: 3;
  justify-content: flex-end;
}

.phase-toggle {
  min-width: 64px;
  height: 32px;
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-color: color-mix(in srgb, var(--phase-accent, var(--blue)) 26%, transparent);
  border-radius: 10px;
  background: rgba(0, 122, 255, 0.08);
  background: color-mix(in srgb, var(--phase-accent, var(--blue)) 9%, #fff);
  color: color-mix(in srgb, var(--phase-accent, var(--blue)) 78%, #0f172a);
  font-size: 12px;
  font-weight: 820;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.phase-toggle:hover {
  background: rgba(0, 122, 255, 0.14);
  background: color-mix(in srgb, var(--phase-accent, var(--blue)) 15%, #fff);
  transform: translateY(-1px);
}

.phase-card.expanded .phase-toggle {
  background: var(--phase-accent, var(--blue));
  color: #fff;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--phase-accent, var(--blue)) 22%, transparent);
}

.delete-phase {
  border-color: transparent;
  background: transparent;
  color: #94a3b8;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
}

.phase-card:hover .delete-phase,
.delete-phase:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.delete-phase:hover {
  border-color: rgba(255, 45, 85, 0.2);
  background: rgba(255, 45, 85, 0.08);
  color: var(--red);
}

.phase-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0 0 52px;
}

.phase-card.collapsed .phase-summary {
  gap: 6px;
  padding: 6px 0 0 50px;
}

.phase-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(142, 142, 147, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #334155;
  font-size: 12px;
}

.phase-card.collapsed .phase-summary-pill {
  min-height: 22px;
  padding: 0 8px;
  font-size: 11px;
}

.phase-summary-label {
  color: #7b8798;
  font-size: 11px;
  font-weight: 760;
}

.phase-summary-pill strong {
  color: color-mix(in srgb, var(--phase-accent, var(--blue)) 72%, #111827);
}

.task-detail-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: clamp(250px, 34vh, 390px);
  min-height: 250px;
  max-height: 390px;
  margin-top: 2px;
  padding: 12px;
  border: 1px solid rgba(207, 225, 244, 0.86);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 254, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 6px 14px rgba(15, 59, 94, 0.035);
  overflow: hidden;
  backface-visibility: hidden;
}

.phase-card.expanded .phase-summary {
  animation: none;
}

.phase-card.expanded .task-detail-panel {
  animation: none;
}

.task-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.task-detail-eyebrow {
  display: block;
  color: color-mix(in srgb, var(--phase-accent, var(--blue)) 78%, #334155);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.task-detail-head h3 {
  margin: 3px 0 0;
  color: #111827;
  font-family: var(--display-font);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.1;
}

.task-table {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  margin-top: 0;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.9);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  scrollbar-color: rgba(0, 122, 255, 0.26) transparent;
  scrollbar-width: thin;
}

.task-list {
  min-height: 0;
  width: 100%;
  min-width: 0;
  overflow-x: visible;
  overflow-y: visible;
}

.task-row,
.task-row-head {
  position: relative;
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns:
    minmax(160px, 1.75fr)
    minmax(100px, 0.88fr)
    minmax(100px, 0.88fr)
    minmax(116px, 0.95fr)
    minmax(92px, 0.78fr)
    minmax(60px, 0.5fr)
    52px
    minmax(66px, 0.62fr)
    28px;
  gap: 7px;
  align-items: end;
}

.task-row {
  grid-template-areas: "name start end owner status holiday milestone breakdown delete";
  padding: 8px 10px;
  border-top: 1px solid var(--soft-line);
  background: rgba(255, 255, 255, 0.74);
}

.task-row:not(.task-row-head) {
  align-items: center;
}

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

.task-row:not(.task-row-head):hover {
  background: rgba(239, 246, 255, 0.72);
}

.task-row-head {
  position: sticky;
  top: 0;
  z-index: 2;
  align-items: center;
  padding: 8px 10px;
  background:
    linear-gradient(180deg, rgba(244, 249, 255, 0.98), rgba(234, 243, 253, 0.96)),
    #f4f9ff;
  box-shadow: 0 1px 0 rgba(45, 63, 92, 0.08);
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.task-row-head span {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  white-space: nowrap;
}

.task-row-head .task-action-head,
.task-row-head .task-delete-head {
  padding: 0;
  background: transparent;
}

.task-row-head .task-holiday-head,
.task-row-head .task-milestone-head {
  justify-content: center;
  padding-inline: 4px;
}

.task-field {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.task-row:not(.task-row-head) .task-field {
  gap: 0;
}

.task-field > span:not(.check-control) {
  overflow: hidden;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-row:not(.task-row-head) .task-field > span:not(.check-control) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.task-name-field {
  grid-area: name;
}

.task-start-field {
  grid-area: start;
}

.task-end-field {
  grid-area: end;
}

.task-owner-field {
  grid-area: owner;
}

.task-status-field {
  grid-area: status;
}

.task-holiday-field {
  grid-area: holiday;
}

.task-row input[type="text"],
.task-row input[type="date"],
.task-row select {
  height: 34px;
  min-width: 0;
  padding: 0 8px;
  font-size: 12px;
}

.task-status-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 0;
  padding: 0 28px 0 10px;
  border: 1px solid color-mix(in srgb, var(--status-color, #94a3b8) 42%, rgba(142, 142, 147, 0.2));
  border-radius: 10px;
  background:
    linear-gradient(45deg, transparent 50%, color-mix(in srgb, var(--status-color, #64748b) 76%, #111827) 50%) right 12px center / 6px 6px no-repeat,
    linear-gradient(135deg, color-mix(in srgb, var(--status-color, #64748b) 76%, #111827) 50%, transparent 50%) right 8px center / 6px 6px no-repeat,
    linear-gradient(90deg, color-mix(in srgb, var(--status-color, #94a3b8) 14%, transparent), rgba(255, 255, 255, 0.96)),
    #fff;
  color: color-mix(in srgb, var(--status-color, #64748b) 72%, #111827);
  appearance: none;
  -webkit-appearance: none;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.task-row input[type="date"] {
  letter-spacing: 0;
  text-align: left;
}

.task-row:not(.task-row-head) input[type="text"],
.task-row:not(.task-row-head) input[type="date"] {
  border-color: rgba(142, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.64);
  box-shadow: none;
}

.task-row:not(.task-row-head):hover input[type="text"],
.task-row:not(.task-row-head):hover input[type="date"],
.task-row:not(.task-row-head) input[type="text"]:focus,
.task-row:not(.task-row-head) input[type="date"]:focus {
  border-color: rgba(0, 122, 255, 0.32);
  background: #fff;
}

.task-row select.custom-select,
.breakdown-row select.custom-select {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(0, 122, 255, 0.24);
  border-radius: 8px;
  color: #12345a;
  padding: 8px 32px 8px 14px;
  font-size: 13px;
  font-weight: 780;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 6px 14px rgba(0, 122, 255, 0.05);
  background-image:
    linear-gradient(90deg, rgba(0, 122, 255, 0.07), rgba(255, 255, 255, 0.92)),
    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='%230078d4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left center, right 12px center;
  background-size: auto, 16px 16px;
}

.task-row select.custom-select:hover,
.breakdown-row select.custom-select:hover {
  border-color: rgba(0, 122, 255, 0.42);
  background-color: rgba(244, 250, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 8px 18px rgba(0, 122, 255, 0.09);
}

.task-row select.custom-select:focus,
.breakdown-row select.custom-select:focus {
  outline: none;
  border-color: #1689ff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.task-row select.custom-select option,
.breakdown-row select.custom-select option {
  background: #f8fbff;
  color: #12345a;
  padding: 10px;
}

.holiday-stat {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 30px;
  min-width: 42px;
  gap: 0;
  padding: 3px 6px;
  border: 1px solid rgba(142, 142, 147, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(243, 247, 252, 0.84)),
    rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.holiday-stat strong {
  color: #1f2c3d;
  font-size: 12px;
  font-weight: 820;
  line-height: 1.1;
}

.holiday-stat small {
  display: none;
}

.task-holiday-field {
  justify-items: center;
}

.task-row.has-calendar-pending .holiday-stat {
  opacity: 0.58;
}

.holiday-stat[data-tone="holiday"] {
  border-color: rgba(255, 159, 10, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(255, 244, 214, 0.84)),
    rgba(255, 255, 255, 0.76);
}

.holiday-stat[data-tone="holiday"] strong {
  color: #a85b00;
}

.holiday-stat[data-tone="weekend"] {
  border-color: rgba(0, 122, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(240, 248, 255, 0.98), rgba(230, 242, 255, 0.84)),
    rgba(255, 255, 255, 0.76);
}

.holiday-stat[data-tone="weekend"] strong {
  color: #0d63b7;
}

.holiday-stat[data-tone="clear"] {
  border-color: rgba(52, 199, 89, 0.18);
  background:
    linear-gradient(135deg, rgba(243, 252, 246, 0.98), rgba(229, 248, 235, 0.84)),
    rgba(255, 255, 255, 0.76);
}

.holiday-stat[data-tone="clear"] strong {
  color: #18804a;
}

.holiday-stat[data-tone="pending"] {
  border-style: dashed;
  border-color: rgba(102, 112, 133, 0.16);
}

.check-cell {
  grid-area: milestone;
  align-content: center;
  color: #40536b;
  font-size: 13px;
}

.check-control {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(142, 142, 147, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.check-cell input {
  width: 17px;
  height: 17px;
  accent-color: var(--red);
}

.check-control em {
  display: none;
}

.delete-task {
  grid-area: delete;
  align-self: center;
  justify-self: end;
  width: 28px;
  height: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, background 0.16s ease;
}

.task-row:hover .delete-task,
.task-row:focus-within .delete-task {
  opacity: 1;
  pointer-events: auto;
}

.add-task {
  width: auto;
  min-width: 116px;
  padding: 0 14px;
}

.task-detail-head .add-task {
  flex: 0 0 auto;
  height: 34px;
}

.breakdown-btn {
  grid-area: breakdown;
  align-self: center;
  justify-self: stretch;
  height: 32px;
  min-width: 0;
  padding: 0 7px;
  border: 1px solid color-mix(in srgb, var(--phase-accent, var(--blue)) 28%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--phase-accent, var(--blue)) 10%, #fff);
  color: color-mix(in srgb, var(--phase-accent, var(--blue)) 78%, #0f172a);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breakdown-btn:hover {
  background: color-mix(in srgb, var(--phase-accent, var(--blue)) 18%, #fff);
  transform: translateY(-1px);
}

@keyframes popover-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes timeline-card-in {
  from {
    opacity: 0;
    transform: translateX(-10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes node-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 5px color-mix(in srgb, var(--phase-accent, var(--blue)) 13%, transparent),
      0 8px 18px color-mix(in srgb, var(--phase-accent, var(--blue)) 22%, transparent);
  }
  50% {
    box-shadow:
      0 0 0 9px color-mix(in srgb, var(--phase-accent, var(--blue)) 8%, transparent),
      0 10px 24px color-mix(in srgb, var(--phase-accent, var(--blue)) 28%, transparent);
  }
}

@keyframes detail-slide-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes detail-drawer-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .home-screen {
    display: block;
    min-height: 100vh;
    overflow: auto;
  }

  .home-topbar {
    height: auto;
    min-height: var(--home-topbar-height, 78px);
  }

  .home-shell {
    grid-template-columns: 1fr;
    height: auto;
    padding: 14px 0;
  }

  .home-hero,
  .home-template-zone,
  .home-preview {
    height: auto;
    min-height: 0;
  }

  .home-process {
    height: auto;
    min-height: 112px;
    margin-top: 0;
  }

  .home-template-card {
    min-height: 220px;
  }

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

  .workspace-welcome {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .workspace-welcome-copy {
    align-content: start;
  }

  .workspace-welcome-copy p {
    max-width: 620px;
  }

  .workspace-welcome-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .intro-screen {
    padding: 20px;
    overflow: auto;
  }

  .intro-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "preview"
      "features";
    height: auto;
    min-height: 0;
    padding: 26px;
    overflow: visible;
  }

  .intro-copy {
    align-content: start;
  }

  .intro-copy h1 {
    max-width: 780px;
    font-size: 42px;
  }

  .intro-preview {
    align-self: stretch;
  }

  .intro-demo-board {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(230px, auto) auto;
    grid-template-areas:
      "phases"
      "tasks"
      "gantt"
      "health";
  }

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

@media (max-width: 760px) {
  .home-topbar,
  .setup-head {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .home-topbar {
    flex-direction: column;
  }

  .setup-back-btn {
    flex: 1 1 0;
  }

  .home-shell {
    padding-top: 14px;
  }

  .home-hero,
  .home-template-zone,
  .home-preview,
  .setup-form-card,
  .setup-preview-card {
    border-radius: 16px;
  }

  .home-hero {
    padding: 20px;
  }

  .home-hero h1 {
    font-size: 34px;
  }

  .home-flow {
    grid-template-columns: 1fr;
  }

  .home-flow i {
    width: 2px;
    height: 14px;
    justify-self: center;
  }

  .home-template-zone {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 12px;
  }

  .home-blank-actions {
    grid-template-columns: 1fr;
  }

  .home-template-card {
    min-height: 180px;
  }

  .setup-shell {
    width: min(100%, calc(100vw - 24px));
  }

  .setup-head h1 {
    font-size: 32px;
  }

  .setup-actions {
    grid-template-columns: 1fr;
  }

  .setup-phase-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .setup-phase-item small {
    grid-column: 2;
  }

  .workspace-welcome {
    padding: 12px;
  }

  .workspace-welcome-copy {
    padding: 6px;
  }

  .workspace-welcome-copy h3 {
    font-size: 25px;
  }

  .workspace-welcome-actions {
    grid-template-columns: 1fr;
  }

  .workspace-template-card,
  .workspace-start-card {
    min-height: 96px;
  }

  .workspace-welcome-gantt-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .intro-screen {
    padding: 12px;
  }

  .intro-shell {
    gap: 16px;
    padding: 18px;
    border-radius: 20px;
  }

  .intro-copy h1 {
    font-size: 30px;
  }

  .intro-subtitle-rotator {
    width: 100%;
    padding: 12px;
  }

  .intro-subtitle-rotator p {
    font-size: 14px;
  }

  .intro-actions {
    align-items: stretch;
    width: 100%;
  }

  .intro-enter-btn {
    justify-content: center;
    width: 100%;
  }

  .intro-enter-btn em {
    display: none;
  }

  .intro-launch-meta {
    grid-template-columns: 1fr;
  }

  .intro-preview {
    padding: 14px;
  }

  .intro-demo-steps {
    grid-template-columns: 1fr;
  }

  .intro-demo-board {
    padding: 10px;
    background-size: 56px 100%, 100% 48px, auto;
  }

  .demo-task-head,
  .demo-task-row {
    grid-template-columns: minmax(96px, 1fr) repeat(3, minmax(44px, 0.54fr));
    gap: 6px;
  }

  .demo-task-head span,
  .demo-task-row span,
  .demo-task-row strong {
    font-size: 10px;
  }

  .demo-health-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .intro-feature-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  body {
    overflow: auto;
  }

  .topbar-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .top-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(118px, 1fr));
    justify-content: stretch;
  }

  .io-menu,
  .io-menu-btn {
    width: 100%;
  }

  .layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    align-items: start;
    overflow: visible;
  }

  .preview-panel {
    position: static;
    height: auto;
    max-height: none;
  }

  .plan-pane,
  .workspace {
    min-height: 0;
    overflow: visible;
  }
}

@media (max-width: 1280px) {
  .plan-console {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .plan-console .health-panel {
    position: relative;
    top: auto;
  }

  .plan-console .health-panel-sticky {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
  }

  .control-board {
    grid-template-columns: 1fr;
  }

  .command-panel {
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 0.8fr);
    gap: 12px;
  }

}

@media (max-width: 1500px) {
  .health-progress-card {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 7px;
    padding: 13px 14px;
    text-align: center;
  }

  .health-ring {
    width: 70px;
    height: 70px;
  }

  .health-pace-chip {
    justify-self: center;
  }
}

@media (max-width: 980px) {
  .task-detail-panel {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .task-table {
    display: block;
    overflow: visible;
  }

  .task-row-head {
    display: none;
  }

  .task-list {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 10px;
    padding: 10px;
  }

  .task-row {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "name"
      "start"
      "end"
      "owner"
      "status"
      "holiday"
      "milestone"
      "breakdown"
      "delete";
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--soft-line);
    border-radius: 12px;
  }

  .task-row:not(.task-row-head) .task-field {
    gap: 5px;
  }

  .task-row:not(.task-row-head) .task-field > span:not(.check-control) {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
  }

  .task-row input[type="text"],
  .task-row input[type="date"],
  .task-row select,
  .task-status-select,
  .holiday-stat,
  .check-control {
    width: 100%;
  }

  .delete-task {
    justify-self: end;
  }
}

@media (max-width: 920px) {
  .top-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 900px) {
  .command-panel {
    grid-template-columns: 1fr;
  }

  .command-copy {
    min-height: 0;
  }

  .health-dashboard {
    grid-template-columns: 1fr;
    grid-template-areas:
      "progress"
      "metrics"
      "milestone";
  }
}

/* Project calendar */
.setup-calendar-select {
  width: 100%;
  min-height: 48px;
  padding: 0 42px 0 14px;
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 8px;
  background:
    rgba(255, 255, 255, 0.94)
    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='%230a64c7' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
    no-repeat right 14px center / 16px;
  color: #10213a;
  font-size: 15px;
  font-weight: 780;
  appearance: none;
  outline: none;
}

.setup-calendar-select:focus {
  border-color: rgba(0, 122, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

.project-calendar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(45, 63, 92, 0.12);
}

.project-calendar-head h2 {
  margin: 3px 0 0;
  color: var(--deep);
  font-size: 24px;
}

.project-calendar-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

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

.calendar-mode-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid rgba(45, 63, 92, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.calendar-mode-option.active {
  border-color: rgba(0, 122, 255, 0.48);
  background: rgba(236, 247, 255, 0.92);
  box-shadow: inset 3px 0 0 #0a84ff;
}

.calendar-mode-option input {
  width: 18px;
  height: 18px;
  accent-color: #0a84ff;
}

.calendar-mode-option span {
  display: grid;
  gap: 3px;
}

.calendar-mode-option strong {
  color: #173554;
  font-size: 13px;
  font-weight: 900;
}

.calendar-mode-option small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.calendar-coverage-notice {
  min-height: 38px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(52, 199, 89, 0.22);
  border-radius: 8px;
  background: rgba(236, 253, 245, 0.82);
  color: #167345;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.45;
}

.calendar-coverage-notice[data-tone="warning"] {
  border-color: rgba(245, 158, 11, 0.32);
  background: rgba(255, 247, 229, 0.92);
  color: #9a5b00;
}

.calendar-custom-dates {
  align-content: start;
  display: grid;
  gap: 18px;
  min-height: 0;
}

.calendar-custom-dates[hidden] {
  display: none;
}

.calendar-date-section {
  display: grid;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid rgba(45, 63, 92, 0.1);
}

.calendar-date-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.calendar-date-head > div:first-child {
  display: grid;
  gap: 3px;
}

.calendar-date-head strong {
  color: #173554;
  font-size: 13px;
  font-weight: 900;
}

.calendar-date-head small {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}

.calendar-date-input {
  display: grid;
  grid-template-columns: minmax(0, 150px) auto;
  gap: 6px;
}

.calendar-date-input input,
.calendar-date-input button {
  min-height: 34px;
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.94);
  color: #12345a;
  font-size: 11px;
  font-weight: 800;
}

.calendar-date-input input {
  min-width: 0;
  padding: 0 8px;
}

.calendar-date-input button {
  padding: 0 12px;
  color: #0874d1;
  background: rgba(232, 244, 255, 0.9);
}

.calendar-date-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 30px;
}

.calendar-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 5px 0 9px;
  border: 1px solid rgba(0, 122, 255, 0.16);
  border-radius: 999px;
  background: rgba(239, 248, 255, 0.9);
  color: #17578f;
  font-size: 10px;
}

.calendar-date-chip strong {
  font-weight: 850;
}

.calendar-date-chip button {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: #64748b;
  font-size: 14px;
}

.calendar-date-empty {
  align-self: center;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
}

.project-calendar-actions {
  position: sticky;
  bottom: -22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 10px;
  padding: 14px 0 2px;
  border-top: 1px solid rgba(45, 63, 92, 0.12);
  background: rgba(247, 251, 255, 0.96);
}

.project-calendar-actions button {
  min-height: 42px;
}

.project-calendar-cancel {
  border: 1px solid rgba(45, 63, 92, 0.14);
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 820;
}

@media (max-width: 760px) {
  .create-project-dialog {
    padding: 14px;
  }

  .create-project-card {
    width: min(100%, calc(100vw - 28px));
    padding: 16px;
  }

  .create-project-head {
    gap: 10px;
  }

  .create-project-head h2 {
    font-size: 22px;
  }

  .create-project-steps {
    width: 100%;
  }

  .create-project-template-options,
  .create-project-step-panel#createProjectInfoStep.active {
    grid-template-columns: 1fr;
  }

  .create-project-info-import {
    align-items: stretch;
    flex-direction: column;
  }

  .create-project-import-entry {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .create-project-import-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .create-project-template-option {
    min-height: 0;
  }

  .create-project-actions {
    flex-wrap: wrap;
  }

  .create-project-actions button {
    flex: 1 1 120px;
    width: auto;
  }

  .console-tools {
    flex-wrap: wrap;
  }

  .calendar-date-head {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-date-input {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding: 14px 0;
  }

  .plan-console .console-head {
    grid-template-columns: 1fr;
  }

  .console-tools {
    align-items: stretch;
    flex-direction: column;
    justify-content: stretch;
  }

  .workspace-preview-btn,
  .workspace-add-phase-btn {
    width: 100%;
  }

  .command-panel,
  .phase-fields {
    grid-template-columns: 1fr;
  }

  .health-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 10px auto;
  }

  .health-timeline,
  .health-timeline-meta {
    grid-column: 1;
  }

  .health-timeline-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .health-timeline-meta strong {
    text-align: left;
    white-space: normal;
  }

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

  .io-menu-panel {
    left: 0;
    right: auto;
    width: 100%;
  }

  .template-dialog {
    padding: 14px;
  }

  .template-card {
    padding: 16px;
  }

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

  .template-option {
    min-height: 0;
  }

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

  .template-start-field input {
    width: 100%;
  }

  .preview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .overview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .preview-tools {
    justify-content: space-between;
  }

  .zoom-slider {
    flex: 1;
    min-width: 80px;
  }

  .zoom-percent-field {
    grid-template-columns: auto 38px auto;
  }

  .overview-row {
    grid-template-columns: minmax(120px, 1fr) 82px 82px 64px;
  }

  .overview-task-row {
    grid-template-columns: minmax(120px, 1fr) 78px 78px;
  }

  .layout {
    padding: 12px;
  }

  .primary-btn,
  .import-btn,
  .preview-btn {
    width: 100%;
  }

  .primary-btn,
  .import-btn,
  .preview-btn {
    min-width: 0;
  }

  .phase-card-header {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .phase-card.expanded .phase-fields {
    grid-column: 1 / -1;
  }

  .phase-fields input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
  }

  .phase-tools {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .phase-tools .delete-phase {
    grid-column: auto;
    width: 32px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .phase-summary {
    padding-left: 0;
  }

  .phase-card.collapsed .phase-compact-summary {
    flex-wrap: wrap;
    gap: 6px;
  }

  .phase-compact-name {
    min-width: 0;
    flex: 1 1 100%;
  }

  .task-detail-panel {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .task-table {
    display: block;
    overflow: visible;
  }

  .task-row-head {
    display: none;
  }

  .task-list {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 10px;
    padding: 10px;
  }

  .task-row {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "name"
      "start"
      "end"
      "owner"
      "status"
      "holiday"
      "milestone"
      "breakdown"
      "delete";
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--soft-line);
    border-radius: 12px;
  }

  .task-row:not(.task-row-head) .task-field {
    gap: 5px;
  }

  .task-row:not(.task-row-head) .task-field > span:not(.check-control) {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: normal;
  }

  .task-row input[type="text"],
  .task-row input[type="date"],
  .task-row select,
  .task-status-select,
  .holiday-stat,
  .check-control {
    width: 100%;
  }

  .delete-task {
    justify-self: end;
  }
}

@media (max-width: 520px) {
  .top-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .health-progress-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .health-ring {
    width: 64px;
    height: 64px;
  }
}

/* ============================================================
   GANTT MODAL (fullscreen preview)
   ============================================================ */

.gantt-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: stretch;
  justify-content: stretch;
  pointer-events: none;
}

.gantt-modal.open {
  display: flex;
  pointer-events: auto;
  animation: gantt-modal-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes gantt-modal-in {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: scale(1); }
}

.gantt-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 122, 255, 0.08), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(52, 199, 89, 0.06), transparent 45%),
    rgba(16, 24, 40, 0.72);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}

.gantt-modal-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  width: calc(100vw - 48px);
  height: calc(100vh - 48px);
  margin: 24px;
  padding: 18px 20px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 253, 0.92));
  box-shadow: 0 40px 90px rgba(15, 23, 42, 0.32), 0 12px 30px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.gantt-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 8px 10px;
  border-bottom: 1px solid var(--soft-line);
}

.gantt-modal-head h2 {
  margin: 6px 0 0;
  color: var(--deep);
  font-family: var(--display-font);
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 950;
  letter-spacing: -0.035em;
  background: linear-gradient(95deg, #10213a 0%, #0a64c7 58%, #0e8da8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gantt-modal-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gantt-modal-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: #475569;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.gantt-modal-close:hover {
  background: rgba(255, 45, 85, 0.1);
  border-color: rgba(255, 45, 85, 0.24);
  color: var(--red);
  transform: translateY(-1px);
}

.gantt-modal-body {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 8px;
}

.tasklist-modal-dialog {
  width: min(1680px, calc(100vw - 48px));
  height: min(880px, calc(100vh - 48px));
  margin: auto;
  padding: 20px;
  grid-template-rows: auto auto minmax(0, 1fr);
  background:
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.tasklist-modal .gantt-modal-head {
  padding: 4px 8px 14px;
}

.tasklist-modal-meta {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(0, 122, 255, 0.16);
  border-radius: 999px;
  background: rgba(232, 244, 255, 0.78);
  color: #0a64c7;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.tasklist-modal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 12px;
  margin: 0 0 12px;
  border: 1px solid rgba(190, 214, 239, 0.78);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 248, 255, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 8px 18px rgba(15, 59, 94, 0.045);
}

.tasklist-expand-toggle,
.tasklist-filter-menu {
  min-height: 34px;
  border: 1px solid rgba(0, 122, 255, 0.22);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  color: #0a64c7;
  font-size: 12px;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.tasklist-expand-toggle {
  min-width: 86px;
  padding: 0 13px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.tasklist-filter-menu {
  position: relative;
  min-width: 186px;
}

.tasklist-filter-menu summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 0 32px 0 12px;
  color: #0a64c7;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}

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

.tasklist-filter-menu summary::after {
  content: '';
  position: absolute;
  right: 13px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.16s ease;
}

.tasklist-filter-menu[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.tasklist-filter-options {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: -1px;
  width: 210px;
  padding: 6px;
  border: 1px solid rgba(171, 205, 237, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 30px rgba(16, 52, 92, 0.16);
}

.tasklist-filter-options button {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #50647c;
  text-align: left;
  font-size: 12px;
  font-weight: 780;
  cursor: pointer;
}

.tasklist-filter-options button:hover,
.tasklist-filter-options button.active {
  background: #e8f4ff;
  color: #087de6;
}

.tasklist-filter-options button.active::after {
  content: '\2713';
  float: right;
  color: #087de6;
  font-weight: 950;
}

.tasklist-expand-toggle:hover,
.tasklist-filter-menu:hover,
.tasklist-filter-menu:focus-within {
  border-color: rgba(0, 122, 255, 0.38);
  background: rgba(232, 244, 255, 0.92);
  box-shadow: 0 6px 14px rgba(0, 122, 255, 0.1);
  transform: translateY(-1px);
}

.tasklist-expand-toggle:focus-visible,
.tasklist-filter-menu:focus-within {
  outline: 3px solid rgba(0, 122, 255, 0.14);
  outline-offset: 2px;
}

.tasklist-modal-body {
  display: grid;
  min-height: 0;
  height: auto;
  overflow: hidden;
}

.tasklist-modal-list {
  min-height: 0;
  height: auto;
  padding: 14px;
  border: 1px solid rgba(185, 212, 239, 0.86);
  border-radius: 16px;
  background:
    linear-gradient(135deg, #ffffff, #f7fbff);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 18px 38px rgba(15, 59, 94, 0.075);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(0, 122, 255, 0.3) rgba(232, 244, 255, 0.5);
  scrollbar-width: thin;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

.preview-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.preview-tasklist-pane,
.preview-gantt-pane {
  min-height: 0;
}

.preview-tasklist-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(242, 247, 252, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.preview-tasklist-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(210, 222, 236, 0.82);
}

.preview-tasklist-head h3 {
  margin: 4px 0 0;
  color: var(--deep);
  font-size: 20px;
  font-weight: 940;
  letter-spacing: -0.03em;
}

.preview-tasklist-head small {
  color: #64748b;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.preview-tasklist {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.preview-tasklist-empty {
  display: grid;
  gap: 4px;
  padding: 16px 14px;
  border: 1px dashed rgba(191, 207, 226, 0.8);
  border-radius: 12px;
  background: rgba(249, 251, 254, 0.88);
  color: #64748b;
}

.preview-tasklist-empty strong {
  color: #334155;
  font-size: 13px;
}

.preview-wbs-table {
  --preview-wbs-columns: 84px minmax(300px, 1fr) 190px 92px 140px 120px;
  min-width: 926px;
  display: grid;
  grid-auto-rows: 44px;
  border: 1px solid rgba(190, 214, 239, 0.88);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 34px rgba(15, 59, 94, 0.07);
  overflow: visible;
}

.preview-wbs-row {
  display: grid;
  grid-template-columns: var(--preview-wbs-columns);
  min-height: 44px;
  color: #18324f;
}

.preview-wbs-header {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 46px;
  color: #0474d9;
  background:
    linear-gradient(180deg, rgba(242, 249, 255, 0.98), rgba(226, 240, 253, 0.96));
  box-shadow: 0 1px 0 rgba(177, 204, 232, 0.9);
}

.preview-wbs-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  overflow: hidden;
  border-right: 1px solid rgba(206, 224, 242, 0.86);
  border-bottom: 1px solid rgba(206, 224, 242, 0.86);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
}

.preview-wbs-cell:last-child {
  border-right: 0;
}

.preview-wbs-head-cell {
  justify-content: center;
  color: #007aff;
  font-size: 13px;
  font-weight: 930;
  white-space: nowrap;
}

.preview-wbs-row-clickable {
  cursor: pointer;
}

.preview-wbs-row-clickable:focus-visible {
  outline: 3px solid rgba(0, 122, 255, 0.18);
  outline-offset: -3px;
}

.preview-wbs-row:hover:not(.preview-wbs-header) {
  background: rgba(239, 248, 255, 0.72);
}

.preview-wbs-phase {
  color: #09284b;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--preview-accent, var(--blue)) 11%, #eff7ff), rgba(239, 247, 255, 0.9));
}

.preview-wbs-phase .preview-wbs-cell {
  border-bottom-color: rgba(172, 207, 241, 0.95);
  font-weight: 920;
}

.preview-wbs-task {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--preview-accent, var(--blue)) 7%, #f6fbff), rgba(255, 255, 255, 0.96));
}

.preview-wbs-task .preview-wbs-cell {
  border-bottom-color: rgba(183, 212, 241, 0.76);
}

.preview-wbs-task .preview-wbs-name-cell {
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--preview-accent, var(--blue)) 76%, #007aff);
}

.preview-wbs-task .preview-wbs-name-text {
  color: #0f2947;
  font-weight: 930;
}

.preview-wbs-subtask {
  background:
    linear-gradient(90deg, rgba(252, 254, 255, 0.98), rgba(255, 255, 255, 0.96));
}

.preview-wbs-subtask .preview-wbs-cell {
  border-bottom-color: rgba(217, 229, 243, 0.92);
}

.preview-wbs-subtask .preview-wbs-name-text {
  color: #2e4966;
  font-weight: 720;
}

.preview-wbs-execution {
  background: linear-gradient(90deg, rgba(255, 252, 247, 0.98), rgba(255, 255, 255, 0.96));
}

.preview-wbs-leaf .preview-wbs-name-text {
  font-weight: 720;
}

.preview-wbs-code-cell,
.preview-wbs-duration-cell,
.preview-wbs-status-cell {
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.preview-wbs-name-cell {
  position: sticky;
  left: 84px;
  z-index: 2;
  overflow: hidden;
  background: inherit;
  box-shadow: inset -1px 0 rgba(180, 207, 234, 0.82);
}

.preview-wbs-code-cell {
  position: sticky;
  left: 0;
  z-index: 3;
  background: inherit;
}

.preview-wbs-header .preview-wbs-code-cell,
.preview-wbs-header .preview-wbs-name-cell {
  z-index: 6;
  background: linear-gradient(180deg, rgba(242, 249, 255, 0.99), rgba(226, 240, 253, 0.98));
}

.preview-wbs-schedule-cell,
.preview-wbs-responsible-cell {
  justify-content: flex-start;
  text-align: left;
}

.preview-wbs-schedule,
.preview-wbs-responsible {
  min-width: 0;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-wbs-schedule {
  color: #173654;
  font-size: 12px;
  font-weight: 860;
}

.preview-wbs-responsible {
  display: flex;
  align-items: center;
  gap: 4px;
}

.preview-wbs-owner-line {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

.preview-wbs-owner-line i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 5px;
  background: rgba(232, 244, 255, 0.92);
  color: #0875d8;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.preview-wbs-owner-line strong {
  min-width: 0;
  overflow: hidden;
  color: #3e5872;
  font-size: 11px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-wbs-owner-divider {
  flex: 0 0 auto;
  color: #b2c0cf;
  font-size: 10px;
  font-weight: 700;
}

.preview-wbs-owner-line.is-client i {
  background: rgba(223, 247, 243, 0.94);
  color: #008f82;
}

.preview-wbs-code-wrap,
.preview-wbs-name-wrap {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.preview-wbs-name-wrap {
  max-width: 100%;
  padding-left: calc(var(--preview-level, 0) * 22px);
}

.preview-wbs-row:not(.preview-wbs-phase) .preview-wbs-name-cell::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(25px + (var(--preview-level, 0) * 22px));
  width: 1px;
  background: color-mix(in srgb, var(--preview-accent, var(--blue)) 20%, #dbeafe);
}

.preview-wbs-subtask .preview-wbs-name-cell::before,
.preview-wbs-execution .preview-wbs-name-cell::before {
  width: 2px;
  background: color-mix(in srgb, var(--preview-accent, var(--blue)) 36%, #dbeafe);
}

.preview-wbs-row:not(.preview-wbs-phase) .preview-wbs-name-wrap::before {
  content: "";
  width: 18px;
  height: 1px;
  flex: 0 0 auto;
  background: color-mix(in srgb, var(--preview-accent, var(--blue)) 42%, #cbd5e1);
}

.preview-wbs-task .preview-wbs-name-wrap::before {
  width: 12px;
  background: color-mix(in srgb, var(--preview-accent, var(--blue)) 58%, #93c5fd);
}

.preview-wbs-subtask .preview-wbs-name-wrap::before,
.preview-wbs-execution .preview-wbs-name-wrap::before {
  height: 2px;
}

.preview-wbs-code {
  color: #0877d8;
  font-weight: 820;
  white-space: nowrap;
}

.preview-wbs-phase .preview-wbs-code {
  font-weight: 930;
}

.preview-wbs-toggle,
.preview-wbs-toggle-spacer {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.preview-wbs-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: #0877d8;
  cursor: pointer;
}

.preview-wbs-toggle::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.16s ease;
}

.preview-wbs-row[aria-expanded="true"] .preview-wbs-toggle::before {
  transform: rotate(45deg) translate(-1px, -1px);
}

.preview-wbs-level-badge {
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--preview-accent, var(--blue)) 20%, #cbd5e1);
  background: color-mix(in srgb, var(--preview-accent, var(--blue)) 8%, #fff);
  color: color-mix(in srgb, var(--preview-accent, var(--blue)) 78%, #0f172a);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.preview-wbs-level-phase {
  background: rgba(228, 244, 255, 0.96);
  color: #0877d8;
}

.preview-wbs-level-task {
  min-width: 58px;
  border-color: color-mix(in srgb, var(--preview-accent, var(--blue)) 32%, #cbd5e1);
  background: color-mix(in srgb, var(--preview-accent, var(--blue)) 12%, #fff);
  color: color-mix(in srgb, var(--preview-accent, var(--blue)) 86%, #0f172a);
}

.preview-wbs-level-subtask {
  min-width: 66px;
  border-color: rgba(14, 165, 203, 0.2);
  background: rgba(236, 253, 255, 0.78);
  color: #0e7490;
  font-weight: 820;
}

.preview-wbs-level-execution {
  border-color: rgba(217, 119, 6, 0.2);
  background: rgba(255, 247, 237, 0.92);
  color: #b45309;
}

.preview-wbs-task-marker {
  flex: 0 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid color-mix(in srgb, var(--preview-accent, var(--blue)) 24%, #dbeafe);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.82);
  color: color-mix(in srgb, var(--preview-accent, var(--blue)) 82%, #0f172a);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.preview-wbs-task-summary {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(14, 116, 144, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #526b83;
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

.preview-wbs-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-wbs-phase .preview-wbs-name-text {
  font-weight: 930;
}

.preview-wbs-phase-summary {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(14, 141, 168, 0.14);
  background: rgba(255, 255, 255, 0.64);
  color: #4f6580;
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

.preview-wbs-milestone-mark {
  flex: 0 0 auto;
  color: #ff3b68;
  font-size: 13px;
  line-height: 1;
}

.preview-wbs-muted-cell {
  color: #9fb0c3;
  font-weight: 680;
}

.preview-wbs-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(241, 245, 249, 0.72);
  color: #72849a;
  font-size: 11px;
  font-weight: 860;
  white-space: nowrap;
}

.preview-wbs-status-badge[data-status="未开始"] {
  color: #72849a;
}

.preview-wbs-status-badge[data-status="进行中"] {
  border-color: rgba(0, 122, 255, 0.2);
  background: rgba(232, 244, 255, 0.86);
  color: #0a7cc7;
}

.preview-wbs-status-badge[data-status="已完成"] {
  border-color: rgba(20, 150, 106, 0.2);
  background: rgba(236, 253, 245, 0.84);
  color: #14966a;
}

.preview-wbs-status-badge[data-status="已暂停"],
.preview-wbs-status-badge[data-status="已取消"] {
  border-color: rgba(161, 98, 7, 0.2);
  background: rgba(255, 251, 235, 0.86);
  color: #a16207;
}

.preview-wbs-status-select {
  width: 96px;
  height: 28px;
  padding: 0 24px 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(241, 245, 249, 0.84);
  background-image:
    linear-gradient(45deg, transparent 50%, #6f86a0 50%),
    linear-gradient(135deg, #6f86a0 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 11px,
    calc(100% - 10px) 11px;
  background-repeat: no-repeat;
  background-size: 4px 4px;
  color: #72849a;
  font: inherit;
  font-size: 11px;
  font-weight: 860;
  line-height: 26px;
  text-align: center;
  text-align-last: center;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.preview-wbs-status-select:hover,
.preview-wbs-status-select:focus-visible {
  border-color: rgba(0, 122, 255, 0.42);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.preview-wbs-status-select[data-status="进行中"] {
  border-color: rgba(0, 122, 255, 0.2);
  background-color: rgba(232, 244, 255, 0.92);
  color: #0a7cc7;
}

.preview-wbs-status-select[data-status="已完成"] {
  border-color: rgba(20, 150, 106, 0.2);
  background-color: rgba(236, 253, 245, 0.92);
  color: #14966a;
}

.preview-wbs-status-select[data-status="延期"],
.preview-wbs-status-select[data-status="已暂停"],
.preview-wbs-status-select[data-status="已取消"] {
  border-color: rgba(217, 119, 6, 0.22);
  background-color: rgba(255, 247, 237, 0.94);
  color: #b45309;
}

@media (max-width: 1500px) {
  .preview-wbs-phase-summary {
    display: none;
  }
}

@media (max-width: 1350px) {
  .preview-wbs-task-summary {
    display: none;
  }
}

.preview-wbs-empty-row {
  grid-template-columns: 1fr;
  min-height: 44px;
  background: rgba(249, 251, 254, 0.82);
}

.preview-wbs-empty-cell {
  grid-column: 1 / -1;
  justify-content: center;
  color: #64748b;
  font-size: 12px;
  font-style: italic;
}

.tasklist-modal .tasklist-modal-list {
  padding: 0;
  gap: 0;
}

.preview-gantt-pane {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.preview-risk-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 247, 237, 0.96), rgba(255, 251, 235, 0.9));
  color: #92400e;
  font-size: 12px;
  font-weight: 820;
  box-shadow: 0 8px 18px rgba(146, 64, 14, 0.08);
}

.preview-risk-notice[hidden] {
  display: none;
}

.preview-risk-notice span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
}

.preview-risk-notice[data-tone="ok"] {
  border-color: rgba(22, 163, 74, 0.18);
  background: linear-gradient(90deg, rgba(240, 253, 244, 0.96), rgba(236, 253, 245, 0.88));
  color: #166534;
}

.preview-task-node {
  position: relative;
  border: 1px solid rgba(209, 221, 236, 0.92);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 253, 0.9));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  overflow: visible;
}

.preview-task-node-clickable > .preview-task-node-head {
  cursor: pointer;
}

.preview-task-node-clickable > .preview-task-node-head:focus-visible {
  outline: 3px solid rgba(0, 122, 255, 0.18);
  outline-offset: -3px;
}

.preview-task-node::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: calc(10px + (var(--preview-level, 0) * 12px));
  width: 3px;
  border-radius: 999px;
  background: var(--preview-accent, var(--blue));
}

.preview-task-node-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px 10px calc(18px + (var(--preview-level, 0) * 12px));
}

.preview-task-node-left {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.preview-task-node-titleline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.preview-task-node-code,
.preview-task-node-kind,
.preview-task-chip,
.preview-task-node-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 840;
  white-space: nowrap;
}

.preview-task-node-code {
  border: 1px solid rgba(0, 122, 255, 0.14);
  background: rgba(235, 247, 255, 0.9);
  color: #0a64c7;
}

.preview-task-node-kind {
  border: 1px solid color-mix(in srgb, var(--preview-accent, var(--blue)) 18%, #d8e4f2);
  background: color-mix(in srgb, var(--preview-accent, var(--blue)) 8%, #fff);
  color: color-mix(in srgb, var(--preview-accent, var(--blue)) 78%, #0f172a);
}

.preview-task-node-title {
  min-width: 0;
  color: #10213a;
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-task-node-leaf .preview-task-node-title {
  font-weight: 820;
}

.preview-task-node-subline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.preview-task-node-range {
  color: #0f3b5e;
  white-space: nowrap;
}

.preview-task-node-subtitle {
  color: #94a3b8;
  white-space: nowrap;
}

.preview-task-node-detailchips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 1px;
}

.preview-task-node-right {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
}

.preview-task-chip {
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(241, 245, 249, 0.82);
  color: #475569;
}

.preview-task-chip-status {
  border-color: color-mix(in srgb, var(--status-color, var(--blue)) 30%, #cbd5e1);
  background: color-mix(in srgb, var(--status-color, var(--blue)) 10%, #fff);
  color: color-mix(in srgb, var(--status-color, var(--blue)) 84%, #0f172a);
}

.preview-task-chip-detail {
  min-height: 22px;
  padding: 0 7px;
  border-color: rgba(186, 207, 229, 0.58);
  background: rgba(255, 255, 255, 0.86);
  color: #52657c;
  font-size: 10px;
  font-weight: 760;
}

.preview-task-node-toggle {
  gap: 5px;
  border: 1px solid rgba(0, 122, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(239, 248, 255, 0.98), rgba(224, 239, 255, 0.88));
  color: #0a64c7;
  cursor: pointer;
}

.preview-task-node-phase > .preview-task-node-head .preview-task-node-toggle {
  min-width: 68px;
  border-color: color-mix(in srgb, var(--preview-accent, var(--blue)) 32%, #cbd5e1);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--preview-accent, var(--blue)) 13%, #fff), rgba(255, 255, 255, 0.9));
  color: color-mix(in srgb, var(--preview-accent, var(--blue)) 82%, #0f172a);
}

.preview-task-node-phase > .preview-task-node-head .preview-task-node-toggle::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.16s ease;
}

.preview-task-node-phase > .preview-task-node-head[aria-expanded="true"] .preview-task-node-toggle::before {
  transform: rotate(225deg) translateY(-1px);
}

.preview-task-node-toggle:hover {
  border-color: rgba(0, 122, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(229, 244, 255, 1), rgba(209, 233, 255, 0.92));
}

.preview-task-node-toggle b {
  font-size: 11px;
  font-weight: 920;
}

.preview-task-node-children {
  display: grid;
  gap: 8px;
  margin-left: 14px;
  padding: 0 12px 10px 12px;
  border-left: 1px solid rgba(191, 207, 226, 0.56);
}

.preview-task-node-empty {
  padding: 10px 12px;
  border: 1px dashed rgba(191, 207, 226, 0.8);
  border-radius: 10px;
  background: rgba(249, 251, 254, 0.82);
  color: #64748b;
  font-size: 12px;
  font-style: italic;
}

.preview-task-node-phase {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--preview-accent, var(--blue)) 5%, #fff), rgba(247, 250, 253, 0.94));
}

.preview-task-node-phase .preview-task-node-title {
  font-size: 14px;
}

.preview-task-node-task {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.92));
}

.preview-task-node-leaf {
  border-color: rgba(193, 213, 236, 0.86);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 255, 0.86));
}

.preview-task-node-leaf::before {
  width: 2px;
  opacity: 0.78;
}

.preview-task-node-subtask {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--preview-accent, var(--blue)) 3%, #fff), rgba(248, 250, 253, 0.94));
}

.preview-task-node-execution {
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.96), rgba(255, 255, 255, 0.94));
}

.preview-task-node-execution .preview-task-node-title {
  font-size: 12px;
  font-weight: 860;
}

.preview-task-node-execution .preview-task-node-kind {
  border-color: rgba(217, 119, 6, 0.18);
  background: rgba(255, 247, 237, 0.92);
  color: #b45309;
}

body.gantt-modal-visible {
  overflow: hidden;
}

/* ============================================================
   INLINE TASK BREAKDOWN (inside task detail table)
   ============================================================ */

.phase-card.has-open-breakdown .task-detail-panel {
  height: auto;
  max-height: none;
}

.phase-card.has-open-breakdown .task-table {
  grid-template-rows: auto auto;
  overflow-x: auto;
  overflow-y: visible;
}

.phase-card.has-open-breakdown .task-row-head {
  position: relative;
  top: auto;
  z-index: 1;
}

.task-row-breakdown-open {
  border-color: rgba(190, 217, 244, 0.9);
  background:
    linear-gradient(90deg, rgba(239, 246, 255, 0.82), rgba(255, 255, 255, 0.9));
  box-shadow: inset 3px 0 0 color-mix(in srgb, var(--phase-accent, var(--blue)) 76%, #0f172a);
}

.task-row-breakdown-open .breakdown-btn {
  border-color: color-mix(in srgb, var(--phase-accent, var(--blue)) 44%, transparent);
  background: color-mix(in srgb, var(--phase-accent, var(--blue)) 18%, #fff);
}

.inline-breakdown-panel {
  display: grid;
  grid-template-columns: minmax(176px, 200px) minmax(0, 1fr);
  gap: 0;
  margin: 0 10px 10px;
  border: 1px solid color-mix(in srgb, var(--phase-accent, var(--blue)) 22%, var(--soft-line));
  border-left-width: 3px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 254, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(15, 59, 94, 0.055);
  overflow: hidden;
  animation: none;
}

.inline-breakdown-summary {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid color-mix(in srgb, var(--phase-accent, var(--blue)) 14%, var(--soft-line));
  background:
    linear-gradient(180deg, rgba(244, 249, 255, 0.98), rgba(255, 255, 255, 0.86));
}

.inline-breakdown-eyebrow {
  display: block;
  color: color-mix(in srgb, var(--phase-accent, var(--blue)) 78%, #334155);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.inline-breakdown-summary h4,
.inline-breakdown-head h4 {
  margin: 7px 0 0;
  color: var(--deep);
  font-family: var(--display-font);
  font-size: 16px;
  font-weight: 920;
  line-height: 1.15;
}

.inline-breakdown-summary h4 {
  min-height: 32px;
}

.inline-breakdown-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.inline-breakdown-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(142, 142, 147, 0.16);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.74);
}

.inline-breakdown-meta strong {
  overflow: hidden;
  color: color-mix(in srgb, var(--phase-accent, var(--blue)) 74%, #111827);
  font-size: 13px;
  font-weight: 880;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-breakdown-meta small {
  color: #6b7788;
  font-size: 10px;
  font-weight: 780;
}

.inline-breakdown-editor {
  min-width: 0;
  padding: 14px 8px 14px 14px;
}

.inline-breakdown-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.breakdown-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  max-width: min(680px, 52vw);
  margin: 5px 0 8px;
  color: #64748b;
  font-size: 11px;
  font-weight: 780;
}

.breakdown-path span,
.breakdown-path strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breakdown-path strong {
  color: color-mix(in srgb, var(--phase-accent, var(--blue)) 72%, #0f172a);
}

.breakdown-path b {
  color: #b6c2d1;
  font-weight: 900;
}

.breakdown-back-btn {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  margin-bottom: 4px;
  padding: 0 10px;
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: 999px;
  background: rgba(235, 247, 255, 0.86);
  color: #0a64c7;
  font-size: 11px;
  font-weight: 850;
}

.breakdown-back-btn::before {
  content: "‹";
  margin-right: 5px;
  font-size: 16px;
  line-height: 1;
}

.inline-breakdown-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.add-subtask-btn,
.complete-breakdown-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.add-subtask-btn {
  border: 1.5px dashed color-mix(in srgb, var(--phase-accent, var(--blue)) 42%, transparent);
  background: color-mix(in srgb, var(--phase-accent, var(--blue)) 7%, #fff);
  color: color-mix(in srgb, var(--phase-accent, var(--blue)) 76%, #0f172a);
}

.complete-breakdown-btn {
  border: 1px solid rgba(22, 163, 74, 0.24);
  background: linear-gradient(180deg, #39d98a, #16a34a);
  color: #fff;
  box-shadow: 0 10px 18px rgba(22, 163, 74, 0.16);
}

.add-subtask-btn:hover,
.complete-breakdown-btn:hover {
  transform: translateY(-1px);
}

.breakdown-table-wrap {
  --breakdown-columns: 150px 124px 124px 128px 128px 150px 88px 108px 92px 34px;
  width: 100%;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  overflow: auto;
  max-height: 330px;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: rgba(0, 122, 255, 0.26) transparent;
  scrollbar-width: thin;
}

.breakdown-table-wrap.execution-item-table {
  --breakdown-columns: 190px 128px 128px 150px 116px 34px;
  max-height: 260px;
}

.breakdown-table-head,
.breakdown-row {
  display: grid;
  grid-template-columns: var(--breakdown-columns);
  gap: 8px;
  width: max-content;
  min-width: 100%;
}

.breakdown-table-head {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 9px 8px 9px 12px;
  border-bottom: 1px solid var(--soft-line);
  background:
    linear-gradient(180deg, rgba(242, 248, 255, 0.98), rgba(233, 243, 255, 0.96)),
    #f4f9ff;
  box-shadow: 0 1px 0 rgba(45, 63, 92, 0.08), 0 8px 14px rgba(15, 23, 42, 0.04);
  color: #475569;
  font-size: 11px;
  font-weight: 850;
}

.breakdown-table-head span {
  display: inline-flex;
  align-items: center;
  height: 22px;
  min-width: 0;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breakdown-table-head span:last-child {
  justify-content: center;
  padding: 0;
  font-size: 10px;
}

.breakdown-list {
  width: max-content;
  min-width: 100%;
}

.breakdown-row {
  position: relative;
  align-items: center;
  padding: 9px 8px 9px 12px;
  border-top: 1px solid var(--soft-line);
  background: rgba(255, 255, 255, 0.76);
}

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

.breakdown-row:hover {
  background: rgba(239, 246, 255, 0.72);
}

.inline-breakdown-panel.execution-view {
  border-left-color: color-mix(in srgb, var(--phase-accent, var(--blue)) 72%, #14b8a6);
}

.execution-item-row {
  background:
    linear-gradient(90deg, rgba(240, 253, 250, 0.48), rgba(255, 255, 255, 0.78));
}

.bd-field {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.bd-field > span {
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.breakdown-row input[type="text"],
.breakdown-row input[type="date"],
.breakdown-row select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(142, 142, 147, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
}

.breakdown-row select {
  padding-right: 28px;
  appearance: none;
  -webkit-appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #526071 50%) right 12px center / 6px 6px no-repeat,
    linear-gradient(135deg, #526071 50%, transparent 50%) right 8px center / 6px 6px no-repeat,
    rgba(255, 255, 255, 0.94);
}

.breakdown-row select[data-field="status"] {
  border-color: color-mix(in srgb, var(--status-color, #94a3b8) 42%, rgba(142, 142, 147, 0.2));
  background:
    linear-gradient(45deg, transparent 50%, color-mix(in srgb, var(--status-color, #64748b) 76%, #111827) 50%) right 12px center / 6px 6px no-repeat,
    linear-gradient(135deg, color-mix(in srgb, var(--status-color, #64748b) 76%, #111827) 50%, transparent 50%) right 8px center / 6px 6px no-repeat,
    linear-gradient(90deg, color-mix(in srgb, var(--status-color, #94a3b8) 14%, transparent), rgba(255, 255, 255, 0.96)),
    #fff;
  color: color-mix(in srgb, var(--status-color, #64748b) 72%, #111827);
  font-weight: 850;
}

.breakdown-row select[data-field="priority"] {
  border-color: color-mix(in srgb, var(--priority-color, #64748b) 32%, rgba(142, 142, 147, 0.2));
  background:
    linear-gradient(45deg, transparent 50%, color-mix(in srgb, var(--priority-color, #64748b) 76%, #111827) 50%) right 12px center / 6px 6px no-repeat,
    linear-gradient(135deg, color-mix(in srgb, var(--priority-color, #64748b) 76%, #111827) 50%, transparent 50%) right 8px center / 6px 6px no-repeat,
    linear-gradient(90deg, color-mix(in srgb, var(--priority-color, #64748b) 12%, transparent), rgba(255, 255, 255, 0.96)),
    #fff;
  color: color-mix(in srgb, var(--priority-color, #64748b) 72%, #111827);
  font-weight: 850;
}

.task-row select.custom-select,
.breakdown-row select.custom-select,
.breakdown-row select.custom-select[data-field="status"],
.breakdown-row select.custom-select[data-field="priority"] {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(0, 122, 255, 0.24);
  border-radius: 8px;
  color: #12345a;
  padding: 8px 32px 8px 14px;
  font-size: 13px;
  font-weight: 780;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 6px 14px rgba(0, 122, 255, 0.05);
  background-image:
    linear-gradient(90deg, rgba(0, 122, 255, 0.07), rgba(255, 255, 255, 0.92)),
    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='%230078d4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left center, right 12px center;
  background-size: auto, 16px 16px;
}

.task-row select.custom-select:hover,
.breakdown-row select.custom-select:hover,
.breakdown-row select.custom-select[data-field="status"]:hover,
.breakdown-row select.custom-select[data-field="priority"]:hover {
  border-color: rgba(0, 122, 255, 0.42);
  background-color: rgba(244, 250, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 8px 18px rgba(0, 122, 255, 0.09);
  background-image:
    linear-gradient(90deg, rgba(0, 122, 255, 0.09), rgba(255, 255, 255, 0.94)),
    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='%230078d4' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left center, right 12px center;
  background-size: auto, 16px 16px;
}

.task-row select.custom-select:focus,
.breakdown-row select.custom-select:focus,
.breakdown-row select.custom-select[data-field="status"]:focus,
.breakdown-row select.custom-select[data-field="priority"]:focus {
  outline: none;
  border-color: #1689ff;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.task-row select.custom-select option,
.breakdown-row select.custom-select option {
  background: #f8fbff;
  color: #12345a;
  padding: 10px;
}

.breakdown-row select.custom-select[data-field="priority"] {
  --select-accent: var(--priority-color, #14b8a6);
  padding-left: 18px;
  border-color: color-mix(in srgb, var(--select-accent) 34%, rgba(142, 142, 147, 0.22));
  color: color-mix(in srgb, var(--select-accent) 74%, #111827);
  background-image:
    linear-gradient(90deg, var(--select-accent) 0 4px, transparent 4px),
    linear-gradient(90deg, color-mix(in srgb, var(--select-accent) 10%, transparent), rgba(255, 255, 255, 0.94)),
    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='%230a64c7' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left center, left center, right 12px center;
  background-size: 100% 100%, auto, 16px 16px;
  font-weight: 850;
}

.breakdown-row select.custom-select[data-field="status"] {
  --select-accent: var(--status-color, #64748b);
  padding-left: 30px;
  border-color: color-mix(in srgb, var(--select-accent) 34%, rgba(142, 142, 147, 0.22));
  color: color-mix(in srgb, var(--select-accent) 72%, #111827);
  background-image:
    radial-gradient(circle at 14px 50%, var(--select-accent) 0 4px, transparent 4.5px),
    linear-gradient(90deg, color-mix(in srgb, var(--select-accent) 9%, transparent), rgba(255, 255, 255, 0.94)),
    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='%230a64c7' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left center, left center, right 12px center;
  background-size: 100% 100%, auto, 16px 16px;
  font-weight: 850;
}

.breakdown-row select.custom-select[data-field="priority"]:hover,
.breakdown-row select.custom-select[data-field="status"]:hover {
  border-color: color-mix(in srgb, var(--select-accent) 52%, rgba(0, 122, 255, 0.24));
  background-color: rgba(255, 255, 255, 0.96);
}

.breakdown-row select.custom-select[data-field="priority"]:focus,
.breakdown-row select.custom-select[data-field="status"]:focus {
  border-color: color-mix(in srgb, var(--select-accent) 68%, #1689ff);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--select-accent) 16%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.execution-items-btn {
  align-self: center;
  justify-self: stretch;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(0, 122, 255, 0.18);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(239, 248, 255, 0.96), rgba(223, 239, 255, 0.86));
  color: #0a64c7;
  font-size: 11px;
  font-weight: 860;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.execution-items-btn:hover {
  border-color: rgba(0, 122, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(229, 244, 255, 0.98), rgba(207, 231, 255, 0.9));
  box-shadow: 0 8px 16px rgba(0, 122, 255, 0.08);
}

.delete-subtask,
.delete-execution-item {
  align-self: center;
  justify-self: end;
  position: static;
  width: 28px;
  height: 28px;
}

.inline-breakdown-empty {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 96px;
  padding: 18px;
  border-top: 1px solid var(--soft-line);
  color: #667085;
  text-align: center;
}

.inline-breakdown-empty strong {
  color: #25364a;
  font-size: 13px;
  font-weight: 860;
}

.inline-breakdown-empty span {
  font-size: 12px;
  font-weight: 700;
}

/* Breakdown responsive */
@media (max-width: 900px) {
  .phase-card.has-open-breakdown .task-detail-panel {
    height: auto;
  }

  .inline-breakdown-panel {
    grid-template-columns: 1fr;
  }

  .inline-breakdown-summary {
    border-right: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--phase-accent, var(--blue)) 14%, var(--soft-line));
  }

  .inline-breakdown-meta-grid {
    grid-template-columns: 1fr;
  }

  .inline-breakdown-head {
    align-items: stretch;
    flex-direction: column;
  }

  .breakdown-path {
    max-width: 100%;
  }

  .inline-breakdown-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .breakdown-table-head,
  .breakdown-row,
  .breakdown-list {
    width: max-content;
    min-width: 100%;
  }

  .breakdown-table-head,
  .breakdown-row {
    grid-template-columns: 130px 116px 116px 104px 104px 128px 74px 104px 84px 32px;
  }

  .breakdown-table-wrap.execution-item-table .breakdown-table-head,
  .breakdown-table-wrap.execution-item-table .breakdown-row {
    grid-template-columns: 160px 116px 116px 130px 104px 32px;
  }
}

/* Gantt modal responsive */
@media (max-width: 900px) {
  .gantt-modal-dialog {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    margin: 8px;
    padding: 14px;
  }
  .tasklist-modal-dialog {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
    margin: 8px;
  }
  .gantt-modal-head {
    flex-direction: column;
    align-items: stretch;
  }
  .gantt-modal-tools {
    justify-content: space-between;
  }

  .tasklist-modal-meta {
    justify-content: center;
    white-space: normal;
  }

  .tasklist-modal-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .tasklist-expand-toggle,
  .tasklist-filter-menu {
    flex: 1 1 0;
  }

  .tasklist-filter-menu summary {
    justify-content: center;
  }

  .tasklist-filter-options {
    width: min(260px, calc(100vw - 48px));
  }

  .preview-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .preview-tasklist-pane {
    max-height: 280px;
  }

  .preview-tasklist-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .preview-tasklist-head small {
    white-space: normal;
  }
}

/* Project cockpit */
.project-cockpit-screen[hidden],
.editor-shell-section[hidden],
.return-cockpit-btn[hidden] {
  display: none !important;
}

.project-cockpit-screen {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.cockpit-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(199, 219, 239, 0.82);
  background: rgba(248, 251, 255, 0.94);
  box-shadow: 0 14px 34px rgba(15, 59, 94, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.cockpit-topbar-inner {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: var(--page-shell-width);
  min-height: 66px;
  margin: 0 auto;
}

.cockpit-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--deep);
  cursor: pointer;
}

.cockpit-brand strong {
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.cockpit-actions,
.cockpit-gantt-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.cockpit-gantt-actions {
  gap: 3px;
  min-height: 38px;
  padding: 3px;
  border: 1px solid rgba(143, 181, 218, 0.42);
  border-radius: 9px;
  background: rgba(239, 246, 253, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.cockpit-primary-btn,
.cockpit-secondary-btn,
.return-cockpit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.cockpit-primary-btn {
  border: 1px solid #087df0;
  background: linear-gradient(135deg, #2093ff, #0875df);
  color: #fff;
  box-shadow: 0 10px 22px rgba(0, 122, 255, 0.2);
}

.cockpit-secondary-btn,
.return-cockpit-btn {
  border: 1px solid rgba(126, 177, 226, 0.52);
  background: rgba(255, 255, 255, 0.82);
  color: #14558f;
}

.return-cockpit-btn {
  gap: 7px;
  min-height: 38px;
  padding: 0 13px;
}

.return-cockpit-btn span {
  color: #087df0;
  font-size: 17px;
}

.return-cockpit-btn strong {
  font-size: 12px;
  font-weight: 900;
}

.cockpit-primary-btn:hover,
.cockpit-secondary-btn:hover,
.return-cockpit-btn:hover {
  transform: translateY(-1px);
}

.cockpit-main {
  display: grid;
  gap: 12px;
  width: var(--page-shell-width);
  margin: 0 auto;
  padding: 12px 0 22px;
}

.cockpit-status-band,
.cockpit-gantt-panel {
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(242, 248, 255, 0.82)),
    rgba(255, 255, 255, 0.86);
}

.cockpit-status-band {
  display: grid;
  gap: 12px;
  padding: 15px 18px 16px;
}

.cockpit-status-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.48fr);
  align-items: center;
  gap: 24px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(148, 177, 207, 0.22);
}

.cockpit-project-copy h1 {
  margin: 3px 0;
  overflow: hidden;
  color: #10345c;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cockpit-project-copy p,
.cockpit-section-head p {
  margin: 0;
  color: #718096;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.45;
}

.cockpit-next-milestone {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 11px;
  min-width: 0;
  padding: 2px 0 2px 20px;
  border: 0;
  border-left: 1px solid rgba(148, 177, 207, 0.3);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cockpit-next-milestone:disabled {
  cursor: default;
}

.cockpit-next-milestone:not(:disabled):hover > strong,
.cockpit-next-milestone:not(:disabled):focus-visible > strong {
  color: #0875df;
}

.cockpit-next-milestone:focus-visible {
  outline: 2px solid rgba(8, 125, 240, 0.28);
  outline-offset: 5px;
}

.cockpit-next-milestone::before {
  content: "";
  grid-row: 1 / span 2;
  align-self: center;
  width: 9px;
  height: 9px;
  border: 3px solid rgba(8, 125, 240, 0.18);
  border-radius: 999px;
  background: #087df0;
  box-shadow: 0 0 0 4px rgba(8, 125, 240, 0.08);
}

.cockpit-next-milestone > span {
  color: #718096;
  font-size: 10px;
  font-weight: 850;
}

.cockpit-next-milestone > strong {
  overflow: hidden;
  color: #173b60;
  font-size: 14px;
  font-weight: 920;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cockpit-next-milestone > small {
  grid-column: 2;
  overflow: hidden;
  color: #718096;
  font-size: 10px;
  font-weight: 760;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cockpit-next-milestone[data-tone="risk"]::before {
  border-color: rgba(255, 45, 85, 0.2);
  background: #ff2d55;
  box-shadow: 0 0 0 4px rgba(255, 45, 85, 0.08);
}

.cockpit-next-milestone[data-tone="risk"] > strong,
.cockpit-next-milestone[data-tone="risk"] > small {
  color: #b42342;
}

.cockpit-next-milestone[data-tone="complete"]::before {
  border-color: rgba(52, 199, 89, 0.2);
  background: #34c759;
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.08);
}

.cockpit-status-body {
  display: grid;
  grid-template-columns: minmax(340px, 0.72fr) minmax(0, 1.78fr);
  align-items: stretch;
  gap: 18px;
  min-width: 0;
}

.cockpit-plan-summary,
.cockpit-health-panel {
  min-width: 0;
}

.cockpit-plan-summary {
  display: grid;
  align-content: start;
  gap: 9px;
  padding-right: 18px;
  border-right: 1px solid rgba(148, 177, 207, 0.22);
}

.cockpit-group-head,
.cockpit-health-panel .health-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 2px 8px;
  border-bottom: 1px solid rgba(148, 177, 207, 0.16);
}

.cockpit-group-head h2 {
  margin: 2px 0 0;
  color: #173b60;
  font-size: 16px;
  font-weight: 930;
  line-height: 1.2;
}

.cockpit-project-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
}

.cockpit-project-meta > div {
  min-width: 0;
  min-height: 62px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(148, 177, 207, 0.16);
}

.cockpit-project-meta > div:nth-child(odd) {
  padding-left: 2px;
  border-right: 1px solid rgba(148, 177, 207, 0.16);
}

.cockpit-project-meta > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.cockpit-project-meta dt {
  color: #76869a;
  font-size: 10px;
  font-weight: 850;
}

.cockpit-project-meta dd {
  margin: 3px 0 0;
  color: #173b60;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cockpit-meta-link {
  display: inline-flex;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.cockpit-meta-link:not(:disabled) {
  cursor: pointer;
}

.cockpit-meta-link:not(:disabled):hover,
.cockpit-meta-link:not(:disabled):focus-visible {
  color: #0875df;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cockpit-attention-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 52px;
  padding: 7px 10px 7px 16px;
  border: 1px solid rgba(126, 177, 226, 0.44);
  border-radius: 11px;
  background: rgba(248, 252, 255, 0.9);
  box-shadow: 0 7px 18px rgba(31, 94, 145, 0.07);
}

.cockpit-attention-bar[hidden] {
  display: none;
}

.cockpit-attention-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: #173b60;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.cockpit-attention-heading > span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #087df0;
  box-shadow: 0 0 0 4px rgba(8, 125, 240, 0.1);
}

.cockpit-attention-items {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.cockpit-attention-items::-webkit-scrollbar {
  display: none;
}

.cockpit-attention-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(126, 177, 226, 0.36);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: #34516f;
  font: inherit;
  cursor: pointer;
}

.cockpit-attention-action strong {
  color: #123a63;
  font-size: 11px;
  font-weight: 930;
}

.cockpit-attention-action span {
  color: #718096;
  font-size: 10px;
  font-weight: 760;
}

.cockpit-attention-action[data-tone="risk"] {
  border-color: rgba(231, 61, 98, 0.24);
  background: rgba(255, 244, 247, 0.9);
}

.cockpit-attention-action[data-tone="risk"] strong {
  color: #b42342;
}

.cockpit-attention-action[data-tone="warning"] {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(255, 249, 235, 0.92);
}

.cockpit-attention-action[data-tone="warning"] strong {
  color: #9a6100;
}

.cockpit-attention-action[data-tone="milestone"] {
  border-color: rgba(106, 92, 226, 0.24);
  background: rgba(247, 245, 255, 0.92);
}

.cockpit-attention-action[data-tone="milestone"] strong {
  color: #5d4ed0;
}

.cockpit-attention-action:hover,
.cockpit-attention-action:focus-visible {
  border-color: rgba(8, 125, 240, 0.48);
  background: #fff;
  outline: none;
  box-shadow: 0 4px 12px rgba(8, 125, 240, 0.1);
}

.cockpit-health-panel {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 0;
  padding-left: 0;
}

.cockpit-health-panel .health-panel-head {
  min-height: 38px;
  padding: 0 2px 8px;
}

.cockpit-health-panel .health-panel-head h2 {
  margin: 2px 0 0;
  font-size: 16px;
}

.cockpit-health-panel .health-panel-note {
  min-height: 25px;
  padding: 0 8px;
  font-size: 10px;
}

.cockpit-health-panel .health-dashboard {
  grid-template-columns: minmax(320px, 1.55fr) repeat(3, minmax(150px, 0.72fr));
  grid-template-areas: none;
  gap: 0;
}

.cockpit-health-panel .health-card {
  grid-area: auto;
  grid-column: auto;
  grid-row: auto;
  min-width: 0;
  min-height: 124px;
  padding: 9px 16px;
  border: 0;
  border-left: 1px solid rgba(148, 177, 207, 0.2);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.cockpit-health-panel .health-card:first-child {
  border-left: 0;
}

.cockpit-health-panel .health-primary-card {
  min-height: 124px;
}

.cockpit-health-panel .health-card-actionable {
  cursor: pointer;
}

.cockpit-health-panel .health-card-actionable:hover,
.cockpit-health-panel .health-card-actionable:focus-visible {
  background: rgba(255, 245, 248, 0.72);
  outline: 2px solid rgba(231, 61, 98, 0.16);
  outline-offset: -2px;
}

.cockpit-health-panel .health-card h3 {
  margin: 0 0 7px;
  color: #526071;
  font-size: 11px;
  font-weight: 900;
}

.cockpit-health-panel .bar-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
  color: #526071;
  font-size: 11px;
  font-weight: 820;
}

.cockpit-health-panel .bar-row strong {
  color: #41536b;
  text-align: right;
}

.cockpit-health-panel .health-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(111, 128, 150, 0.12);
}

.cockpit-health-panel .health-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.cockpit-health-panel .health-bar.time i {
  background: linear-gradient(90deg, var(--amber), #ff7d45);
}

.cockpit-health-panel .health-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 159, 10, 0.1);
  color: #915a00;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
}

.cockpit-health-panel .health-risk-link {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(180, 35, 66, 0.2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
  color: #b42342;
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.cockpit-health-panel .health-risk-link:hover {
  border-color: rgba(180, 35, 66, 0.38);
  background: #fff;
}

.cockpit-health-panel .health-dashboard[data-tone="good"] .health-hint {
  background: rgba(52, 199, 89, 0.1);
  color: #177a3d;
}

.cockpit-health-panel .health-dashboard[data-tone="risk"] .health-hint {
  background: rgba(255, 45, 85, 0.1);
  color: #b42342;
}

.cockpit-health-panel .health-metric-card {
  display: grid;
  align-content: center;
  gap: 6px;
}

.cockpit-health-panel .health-metric-value,
.cockpit-health-panel .milestone-ratio {
  color: #102b49;
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
}

.cockpit-health-panel .health-metric-sub {
  margin-top: 5px;
  color: #718096;
  font-size: 10px;
  font-weight: 740;
  line-height: 1.35;
}

.cockpit-health-panel .metric-badge,
.cockpit-health-panel .overdue-ok,
.cockpit-health-panel .overdue-risk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.cockpit-health-panel .metric-badge {
  border: 1px solid rgba(71, 101, 135, 0.13);
  color: #526071;
}

.cockpit-health-panel .overdue-ok {
  color: #177a3d;
  background: rgba(52, 199, 89, 0.12);
}

.cockpit-health-panel .overdue-risk {
  color: #b42342;
  background: rgba(255, 45, 85, 0.12);
}

.cockpit-health-panel .milestone-value-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.cockpit-health-panel .milestone-percent {
  color: #718096;
  font-size: 13px;
  font-weight: 900;
}

.cockpit-health-panel .milestone-track {
  height: 7px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(111, 128, 150, 0.12);
}

.cockpit-health-panel .milestone-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.cockpit-gantt-panel {
  min-width: 0;
  padding: 15px 18px 18px;
  border: 0;
}

.cockpit-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 11px;
}

.cockpit-section-head h2 {
  margin: 4px 0 3px;
  color: #10345c;
  font-size: 19px;
  font-weight: 940;
}

.cockpit-unit-field,
.cockpit-view-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #315b82;
  font-size: 11px;
  font-weight: 850;
}

.cockpit-unit-field {
  position: relative;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.cockpit-unit-field:hover {
  background: rgba(255, 255, 255, 0.86);
}

.cockpit-unit-field:focus-within {
  background: #fff;
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.16);
}

.cockpit-unit-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 1.5px solid #2785d7;
  border-radius: 3px;
}

.cockpit-unit-icon::before {
  position: absolute;
  top: 3px;
  right: 1px;
  left: 1px;
  height: 1.5px;
  background: #2785d7;
  content: "";
}

.cockpit-unit-icon::after {
  position: absolute;
  top: -3px;
  left: 2px;
  width: 6px;
  height: 4px;
  border-right: 1.5px solid #2785d7;
  border-left: 1.5px solid #2785d7;
  content: "";
}

.cockpit-view-field {
  gap: 8px;
  min-height: 38px;
  padding: 0 7px 0 11px;
  border: 1px solid rgba(126, 177, 226, 0.52);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: #526071;
  font-size: 11px;
  font-weight: 850;
}

.cockpit-view-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, auto);
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(220, 234, 247, 0.68);
}

.cockpit-view-switch button {
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #63758a;
  font: inherit;
  cursor: pointer;
}

.cockpit-view-switch button.active {
  background: #fff;
  color: #0877e8;
  box-shadow: 0 2px 7px rgba(20, 88, 145, 0.13);
}

.cockpit-unit-field select {
  min-width: 52px;
  height: 28px;
  padding: 0 18px 0 0;
  border: 0;
  outline: 0;
  background-color: transparent;
  color: #14558f;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.cockpit-zoom-btn,
.cockpit-zoom-icon-btn {
  height: 28px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #315b82;
  font-size: 12px;
  font-weight: 850;
}

.cockpit-zoom-btn {
  min-width: 66px;
  padding: 0 10px;
}

.cockpit-zoom-btn.active {
  background: #1476e8;
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 122, 255, 0.18);
}

.cockpit-zoom-icon-btn {
  display: grid;
  width: 28px;
  place-items: center;
  font-size: 17px;
  line-height: 1;
}

.cockpit-zoom-btn:not(.active):hover,
.cockpit-zoom-icon-btn:hover {
  background: rgba(0, 122, 255, 0.08);
  color: #0066d6;
}

.cockpit-zoom-slider {
  width: 86px;
  accent-color: #1476e8;
}

.cockpit-zoom-percent-field {
  display: inline-grid;
  grid-template-columns: auto 40px auto;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(0, 122, 255, 0.15);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.68);
  color: #526d89;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.cockpit-zoom-percent-field input {
  width: 40px;
  height: 24px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0b63ce;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.cockpit-zoom-percent-field input::-webkit-outer-spin-button,
.cockpit-zoom-percent-field input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.cockpit-zoom-percent-field:focus-within {
  border-color: rgba(10, 132, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.14);
}

.cockpit-tool-divider {
  width: 1px;
  height: 20px;
  margin: 0 2px;
  background: rgba(126, 161, 195, 0.28);
}

.cockpit-task-list-btn.cockpit-secondary-btn {
  gap: 7px;
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #14558f;
  font-size: 12px;
  box-shadow: none;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.cockpit-task-list-btn.cockpit-secondary-btn:hover {
  transform: none;
  background: #fff;
  color: #0875df;
  box-shadow: 0 2px 7px rgba(20, 88, 145, 0.09);
}

.cockpit-task-list-btn.cockpit-secondary-btn:focus-visible {
  outline: 0;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.16);
}

.cockpit-task-list-icon {
  display: grid;
  gap: 2px;
  width: 14px;
  flex: 0 0 14px;
}

.cockpit-task-list-icon i {
  position: relative;
  display: block;
  width: 10px;
  height: 1.5px;
  margin-left: 4px;
  border-radius: 2px;
  background: currentColor;
}

.cockpit-task-list-icon i::before {
  position: absolute;
  top: -1px;
  left: -4px;
  width: 2px;
  height: 3px;
  border-radius: 1px;
  background: currentColor;
  content: "";
}

.cockpit-gantt-scroll {
  position: relative;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border: 0;
  border-radius: 12px;
  background: #f7f9fc;
  scrollbar-color: rgba(0, 122, 255, 0.28) rgba(225, 235, 245, 0.46);
  scrollbar-width: thin;
}

.cockpit-gantt-canvas {
  position: relative;
  min-width: 100%;
  min-height: 0;
  overflow: hidden;
}

.cockpit-gantt-scroll[data-view-mode="summary"] {
  min-height: 300px;
  max-height: min(48vh, 520px);
}

.cockpit-gantt-preview {
  position: absolute;
  inset: auto;
  min-width: max-content;
  transform-origin: top left;
  pointer-events: auto;
}

.cockpit-gantt-preview .preview-phase-head,
.cockpit-gantt-preview .preview-name {
  position: sticky;
  left: 0;
  z-index: 5;
  background-color: #f7f9fc;
}

.cockpit-gantt-preview .preview-duration-head,
.cockpit-gantt-preview .preview-duration {
  position: sticky;
  left: 250px;
  z-index: 5;
  background-color: #f7f9fc;
}

.cockpit-gantt-preview .preview-phase-head,
.cockpit-gantt-preview .preview-duration-head {
  z-index: 8;
}

.cockpit-gantt-preview .preview-row-phase {
  background-color: color-mix(in srgb, var(--phase-accent, #1476e8) 8%, #f7f9fc);
}

.cockpit-gantt-preview .preview-row-phase {
  cursor: pointer;
}

.cockpit-gantt-preview .preview-bar-shell,
.cockpit-gantt-preview .preview-bar-fill {
  border: 0;
}

.cockpit-gantt-preview .preview-bar-phase.is-current-phase {
  box-shadow: 0 5px 12px color-mix(in srgb, var(--bar-color, #1476e8) 24%, transparent);
}

.cockpit-gantt-preview .preview-row-current-phase.preview-name,
.cockpit-gantt-preview .preview-row-current-phase.preview-duration,
.cockpit-gantt-preview .preview-row-current-phase.preview-track {
  box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--phase-accent, #1476e8) 7%, transparent);
}

.cockpit-gantt-preview .preview-row-current-phase.preview-name {
  box-shadow:
    inset 4px 0 0 var(--phase-accent, #1476e8),
    inset 0 0 0 999px color-mix(in srgb, var(--phase-accent, #1476e8) 8%, transparent);
}

.cockpit-gantt-preview .preview-row-complete-phase,
.cockpit-gantt-preview .preview-bar-phase.is-complete {
  filter: saturate(0.4);
  opacity: 0.76;
}

.cockpit-gantt-preview .preview-bar-phase.has-overdue,
.cockpit-gantt-preview .preview-bar-shell.is-overdue {
  box-shadow: none;
}

.cockpit-gantt-preview .preview-row-risk-phase.preview-name::after {
  content: "风险";
  margin-left: 7px;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(231, 61, 98, 0.1);
  color: #b42342;
  font-size: 9px;
  font-weight: 900;
}

.cockpit-gantt-preview .preview-milestone-countdown {
  display: inline-flex;
}

.cockpit-gantt-preview .cockpit-focus-pulse {
  animation: cockpit-focus-pulse 0.8s ease-in-out 2;
}

@keyframes cockpit-focus-pulse {
  0%, 100% {
    filter: none;
  }
  50% {
    filter: brightness(1.08) drop-shadow(0 0 6px rgba(8, 125, 240, 0.45));
  }
}

.plan-console {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 1500px) {
  .cockpit-status-body {
    grid-template-columns: minmax(270px, 0.62fr) minmax(0, 1.38fr);
  }

  .cockpit-health-panel .health-dashboard {
    grid-template-columns: minmax(230px, 1.45fr) repeat(3, minmax(112px, 0.72fr));
  }
}

@media (max-width: 1120px) {
  .cockpit-topbar-inner {
    grid-template-columns: auto minmax(180px, 1fr) auto;
  }

  .cockpit-status-body {
    grid-template-columns: 1fr;
  }

  .cockpit-plan-summary {
    padding: 0 0 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 177, 207, 0.22);
  }

  .cockpit-project-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .cockpit-project-meta > div,
  .cockpit-project-meta > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .cockpit-health-panel {
    padding: 10px 0 0;
  }

  .cockpit-health-panel .health-dashboard {
    grid-template-columns: minmax(240px, 1.45fr) repeat(3, minmax(125px, 0.72fr));
  }

  .cockpit-health-panel .health-card {
    min-height: 92px;
  }

  .cockpit-section-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .cockpit-gantt-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 780px) {
  .cockpit-topbar-inner {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    padding: 8px 0;
  }

  .cockpit-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .cockpit-status-head {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cockpit-next-milestone {
    padding: 8px 0 0;
    border-top: 1px solid rgba(148, 177, 207, 0.22);
    border-left: 0;
  }

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

  .cockpit-primary-btn,
  .cockpit-secondary-btn,
  .cockpit-unit-field,
  .cockpit-view-field,
  .cockpit-zoom-btn,
  .cockpit-zoom-percent-field {
    flex: 1 1 auto;
  }

  .cockpit-zoom-slider {
    flex: 1 1 92px;
  }

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

  .cockpit-health-panel .health-dashboard {
    grid-template-columns: 1fr;
  }

  .cockpit-health-panel .health-card,
  .cockpit-health-panel .health-card:first-child {
    min-height: 100px;
    border-top: 1px solid rgba(148, 177, 207, 0.2);
    border-left: 0;
  }

  .cockpit-health-panel .health-card:nth-child(odd) {
    border-right: 0;
  }

  .cockpit-health-panel .health-secondary-stack {
    border-top: 1px solid rgba(148, 177, 207, 0.2);
    border-left: 0;
  }

  .cockpit-gantt-scroll {
    min-height: 0;
  }
}

/* Project workspace shell */
.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 46;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(176, 204, 232, 0.62);
  background: rgba(249, 252, 255, 0.95);
  box-shadow: 0 9px 24px rgba(30, 87, 132, 0.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.workspace-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--deep);
}

.workspace-brand .home-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.workspace-brand strong {
  font-size: 23px;
  font-weight: 950;
  letter-spacing: 0;
}

.workspace-current-project {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid rgba(148, 177, 207, 0.24);
}

.workspace-current-project > span {
  color: #0877e8;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
}

.workspace-current-project > strong {
  max-width: min(38vw, 520px);
  overflow: hidden;
  color: #173654;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-current-project > small {
  overflow: hidden;
  color: #74849a;
  font-size: 11px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.workspace-icon-button,
.workspace-user-button,
.workspace-sidebar-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(143, 181, 218, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: #173b60;
}

.workspace-icon-button {
  width: 38px;
  padding: 0;
}

.workspace-icon-button > b {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid #f8fbff;
  border-radius: 999px;
  background: #ff3b64;
  color: #fff;
  font-size: 9px;
  font-weight: 950;
}

.workspace-icon-button > b[hidden],
.workspace-nav-item > b[hidden] {
  display: none;
}

.workspace-icon-button:disabled {
  color: #8290a1;
  cursor: default;
  opacity: 0.76;
}

.workspace-notice-icon {
  position: relative;
  width: 15px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border-bottom: 0;
}

.workspace-notice-icon::before {
  position: absolute;
  right: -4px;
  bottom: 0;
  left: -4px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.workspace-notice-icon::after {
  position: absolute;
  bottom: -5px;
  left: 4px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.workspace-user-button {
  gap: 8px;
  padding: 0 10px 0 6px;
}

.workspace-user-button > span,
.workspace-profile > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(145deg, #dceeff, #c9e4ff);
  color: #0875df;
  font-size: 11px;
  font-weight: 950;
}

.workspace-user-button > strong {
  font-size: 12px;
  font-weight: 900;
}

.workspace-icon-button:hover,
.workspace-user-button:hover,
.workspace-brand:hover {
  border-color: rgba(8, 125, 240, 0.38);
  color: #0875df;
}

.workspace-shell-grid {
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
  min-height: calc(100vh - 64px);
}

.workspace-sidebar {
  position: sticky;
  top: 64px;
  z-index: 34;
  display: flex;
  height: calc(100vh - 64px);
  min-height: 0;
  flex-direction: column;
  padding: 16px 11px 12px;
  overflow-y: auto;
  border-right: 1px solid rgba(184, 210, 235, 0.64);
  background: rgba(247, 251, 255, 0.9);
  box-shadow: 10px 0 30px rgba(22, 74, 116, 0.035);
}

.workspace-project-switcher {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  width: 100%;
  min-height: 64px;
  padding: 10px 34px 10px 12px;
  border: 1px solid rgba(143, 181, 218, 0.46);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #173b60;
  text-align: left;
}

.workspace-project-switcher::before {
  align-self: center;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #28c76f;
  box-shadow: 0 0 0 4px rgba(40, 199, 111, 0.1);
  content: "";
  grid-column: 2;
  grid-row: 2;
}

.workspace-project-switcher > span {
  grid-column: 1 / -1;
  color: #718096;
  font-size: 10px;
  font-weight: 820;
}

.workspace-project-switcher > strong {
  grid-column: 1;
  overflow: hidden;
  font-size: 12px;
  font-weight: 920;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-project-switcher > i {
  position: absolute;
  top: 50%;
  right: 11px;
  color: #66809b;
  font-style: normal;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 160ms ease;
}

.workspace-project-switcher.open {
  border-color: rgba(8, 125, 240, 0.58);
  background: #fff;
  box-shadow: 0 8px 20px rgba(28, 92, 150, 0.08);
}

.workspace-project-switcher.open > i {
  transform: translateY(-50%) rotate(180deg);
}

.workspace-project-menu {
  width: 100%;
  margin-top: 6px;
  overflow: hidden;
  border: 1px solid rgba(143, 181, 218, 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 28px rgba(27, 76, 121, 0.12);
}

.workspace-project-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 10px;
  border-bottom: 1px solid rgba(193, 215, 236, 0.56);
  color: #1f466c;
}

.workspace-project-menu-head > strong {
  font-size: 11px;
  font-weight: 900;
}

.workspace-project-menu-head > span {
  color: #8191a3;
  font-size: 9px;
  font-weight: 800;
}

.workspace-project-menu-list {
  display: grid;
  max-height: 224px;
  padding: 5px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.workspace-project-option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 5px 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #183d63;
  text-align: left;
}

.workspace-project-option:hover,
.workspace-project-option.current {
  background: #edf7ff;
}

.workspace-project-option-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: #dceeff;
  color: #0875df;
  font-size: 11px;
  font-weight: 950;
}

.workspace-project-option-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.workspace-project-option-copy > strong,
.workspace-project-option-copy > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-project-option-copy > strong {
  font-size: 11px;
  font-weight: 900;
}

.workspace-project-option-copy > small {
  color: #7d8fa3;
  font-size: 9px;
  font-weight: 760;
}

.workspace-project-option-current {
  padding: 3px 5px;
  border-radius: 999px;
  background: #dff3ff;
  color: #0875df;
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.workspace-project-menu-empty {
  margin: 0;
  padding: 18px 8px;
  color: #8b9aae;
  font-size: 10px;
  font-weight: 760;
  text-align: center;
}

.workspace-project-menu-manage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 36px;
  padding: 0 11px;
  border: 0;
  border-top: 1px solid rgba(193, 215, 236, 0.56);
  background: #f8fbff;
  color: #1769ae;
}

.workspace-project-menu-manage:hover {
  background: #edf7ff;
}

.workspace-project-menu-manage > span {
  font-size: 10px;
  font-weight: 880;
}

.workspace-project-menu-manage > i {
  font-style: normal;
  font-weight: 900;
}

.workspace-new-project {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  padding: 0 12px;
  border: 1px dashed rgba(8, 125, 240, 0.36);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
  color: #1769ae;
}

.workspace-new-project > span {
  font-size: 20px;
  line-height: 1;
}

.workspace-new-project > strong {
  font-size: 12px;
  font-weight: 900;
}

.workspace-new-project:hover,
.workspace-project-switcher:hover {
  border-color: rgba(8, 125, 240, 0.58);
  background: #fff;
}

.workspace-nav-label {
  margin: 20px 9px 7px;
  color: #8493a5;
  font-size: 10px;
  font-weight: 900;
}

.workspace-nav {
  display: grid;
  gap: 3px;
}

.workspace-nav-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #4c6077;
  text-align: left;
}

.workspace-nav-item > strong {
  font-size: 13px;
  font-weight: 860;
}

.workspace-nav-item > b {
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 45, 85, 0.1);
  color: #c3284c;
  font-size: 9px;
  font-weight: 950;
}

.workspace-nav-item > b.workspace-nav-count {
  background: #e3f1ff;
  color: #0875df;
}

.workspace-nav-item:hover {
  background: rgba(222, 237, 251, 0.6);
  color: #14558f;
}

.workspace-nav-item.active {
  background: #e5f1fd;
  color: #0875df;
  box-shadow: inset 3px 0 0 #087df0;
}

.workspace-nav-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  color: currentColor;
}

.workspace-icon-overview {
  border: 1.8px solid currentColor;
  border-radius: 4px;
}

.workspace-icon-overview::before,
.workspace-icon-overview::after {
  position: absolute;
  bottom: 2px;
  width: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.workspace-icon-overview::before {
  left: 4px;
  height: 5px;
  box-shadow: 4px -3px 0 currentColor;
}

.workspace-icon-plan::before,
.workspace-icon-plan::after,
.workspace-icon-tasks::before,
.workspace-icon-tasks::after,
.workspace-icon-recent::before,
.workspace-icon-recent::after,
.workspace-icon-template::before,
.workspace-icon-template::after {
  position: absolute;
  content: "";
}

.workspace-icon-plan::before {
  inset: 1px 0;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  box-shadow: inset 0 5px 0 -3px currentColor;
}

.workspace-icon-plan::after {
  top: 0;
  left: 4px;
  width: 2px;
  height: 16px;
  background: currentColor;
  box-shadow: 7px 0 0 currentColor;
}

.workspace-icon-tasks::before {
  inset: 2px 0 1px 5px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  box-shadow: inset 0 5px 0 -3px currentColor;
}

.workspace-icon-tasks::after {
  top: 2px;
  left: 0;
  width: 2px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
}

.workspace-icon-members::before,
.workspace-icon-members::after {
  position: absolute;
  border: 1.8px solid currentColor;
  border-radius: 999px;
  content: "";
}

.workspace-icon-members::before {
  top: 0;
  left: 5px;
  width: 6px;
  height: 6px;
}

.workspace-icon-members::after {
  right: 1px;
  bottom: 0;
  left: 1px;
  height: 7px;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.workspace-icon-recent {
  border: 1.8px solid currentColor;
  border-radius: 999px;
}

.workspace-icon-recent::before {
  top: 2px;
  left: 7px;
  width: 1.5px;
  height: 6px;
  background: currentColor;
  transform-origin: bottom;
  transform: rotate(-42deg);
}

.workspace-icon-settings {
  border: 4px dotted currentColor;
  border-radius: 999px;
}

.workspace-icon-settings::after {
  position: absolute;
  inset: 2px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  content: "";
}

.workspace-icon-template::before {
  inset: 3px 0 0 3px;
  border: 1.8px solid currentColor;
  border-radius: 2px;
}

.workspace-icon-template::after {
  inset: 0 3px 3px 0;
  border: 1.8px solid currentColor;
  border-radius: 2px;
  background: #f7fbff;
}

.workspace-profile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding: 12px 8px 0;
  border-top: 1px solid rgba(148, 177, 207, 0.22);
}

.workspace-profile > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workspace-profile strong {
  color: #24415e;
  font-size: 12px;
  font-weight: 900;
}

.workspace-profile small {
  color: #8390a0;
  font-size: 10px;
  font-weight: 760;
}

.workspace-profile > i {
  color: #8290a1;
  font-style: normal;
}

.workspace-content {
  min-width: 0;
  overflow: clip;
}

.project-cockpit-screen {
  min-height: auto;
}

.cockpit-main {
  width: auto;
  margin: 0;
  padding: 16px 18px 24px;
}

.workspace-tasklist-screen {
  min-height: calc(100vh - 64px);
}

.workspace-members-screen {
  height: calc(100vh - 64px);
  height: calc(100dvh - 64px);
  min-height: 0;
  overflow: hidden;
}

.workspace-settings-screen {
  min-height: calc(100vh - 64px);
}

.workspace-settings-screen[hidden] {
  display: none !important;
}

.tasklist-page-main {
  width: auto;
  margin: 0;
  padding: 16px 18px 24px;
}

.members-page-main {
  width: auto;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 16px 18px 24px;
  overflow: hidden;
}

.settings-page-main {
  width: auto;
  margin: 0;
  padding: 16px 18px 28px;
}

.settings-page-panel {
  min-height: calc(100vh - 108px);
  padding: 0 0 28px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.settings-page-head {
  position: relative;
  margin: 0 4px;
  padding: 20px 20px 16px;
  overflow: hidden;
  border: 1px solid rgba(127, 173, 217, 0.3);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, 0.94);
}

.settings-page-head::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #1688f5 0%, #2ca5e6 72%, #36b7bd 100%);
  content: '';
}

.settings-page-head h1 {
  margin: 4px 0 3px;
  color: #10345c;
  font-size: 25px;
  font-weight: 950;
  letter-spacing: 0;
}

.settings-page-head p {
  margin: 0;
  color: #718096;
  font-size: 12px;
  font-weight: 740;
}

.settings-project-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 4px;
  border: 1px solid rgba(127, 173, 217, 0.3);
  border-radius: 0 0 8px 8px;
  background: rgba(248, 251, 255, 0.94);
  box-shadow: 0 8px 22px rgba(46, 86, 126, 0.06);
}

.settings-project-summary > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 16px 18px;
}

.settings-project-summary > div + div {
  border-left: 1px solid rgba(148, 177, 207, 0.18);
}

.settings-project-summary span {
  color: #7a8ca0;
  font-size: 10px;
  font-weight: 850;
}

.settings-project-summary strong {
  overflow: hidden;
  color: #173b60;
  font-size: 14px;
  font-weight: 920;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-settings-section {
  --settings-section-accent: #1688f5;
  --settings-section-accent-rgb: 22, 136, 245;
  position: relative;
  display: grid;
  gap: 16px;
  margin: 14px 4px 0;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(127, 163, 198, 0.28);
  border-left: 3px solid var(--settings-section-accent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 7px 20px rgba(46, 86, 126, 0.05);
}

.project-basic-settings {
  --settings-section-accent: #1688f5;
  --settings-section-accent-rgb: 22, 136, 245;
}

.project-calendar-settings {
  --settings-section-accent: #1688f5;
  --settings-section-accent-rgb: 22, 136, 245;
}

.project-health-settings {
  --settings-section-accent: #1688f5;
  --settings-section-accent-rgb: 22, 136, 245;
}

.project-settings-section::before {
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(22, 136, 245, 0.24);
  border-radius: 7px;
  background: #edf6ff;
  color: #0879df;
  font-size: 11px;
  font-weight: 950;
  content: attr(data-section-index);
}

.project-settings-section-head,
.project-calendar-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  min-height: 38px;
  padding: 0 0 14px 50px;
  border-bottom: 1px solid rgba(133, 168, 201, 0.22);
}

.project-settings-section-head h2,
.project-calendar-head h2 {
  margin: 4px 0 3px;
  color: #12385e;
  font-size: 18px;
  font-weight: 930;
}

.project-settings-section-head p,
.project-calendar-head p {
  margin: 0;
  color: #74869a;
  font-size: 11px;
  font-weight: 700;
}

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

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

.project-settings-field-wide {
  grid-column: span 2;
}

.project-settings-field > span,
.project-settings-compact-field > span {
  color: #536b84;
  font-size: 10px;
  font-weight: 860;
}

.project-settings-field > span em {
  margin-left: 3px;
  color: #e64963;
  font-style: normal;
}

.project-settings-field input,
.project-settings-field select,
.project-settings-field textarea,
.project-settings-compact-field select,
.health-rule-value input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(132, 172, 211, 0.42);
  border-radius: 7px;
  background: #fff;
  color: #173854;
  font: inherit;
  font-size: 12px;
  font-weight: 720;
  outline: none;
}

.project-settings-field input,
.project-settings-field select,
.project-settings-compact-field select {
  min-height: 40px;
  padding: 0 12px;
}

.project-settings-field textarea {
  min-height: 76px;
  padding: 10px 12px;
  line-height: 1.55;
  resize: vertical;
}

.project-settings-field input:focus,
.project-settings-field select:focus,
.project-settings-field textarea:focus,
.project-settings-compact-field select:focus,
.health-rule-value input:focus {
  border-color: #1688f5;
  box-shadow: 0 0 0 3px rgba(22, 136, 245, 0.1);
}

.project-calendar-settings {
  scroll-margin-top: 80px;
}

.project-calendar-settings .project-calendar-head {
  padding-bottom: 14px;
}

.project-settings-compact-field {
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.project-settings-compact-field select {
  min-height: 38px;
  padding: 0 34px 0 12px;
}

.project-calendar-settings .calendar-mode-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-calendar-settings .calendar-mode-option {
  min-height: 76px;
}

.project-calendar-settings .calendar-custom-dates {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project-calendar-settings .calendar-date-section {
  padding: 16px;
  border: 1px solid rgba(148, 177, 207, 0.22);
  border-radius: 8px;
  background: #fafcff;
}

.project-health-settings {
  border-bottom: 1px solid rgba(127, 163, 198, 0.28);
}

.health-rule-list {
  display: grid;
  border-top: 1px solid rgba(146, 185, 222, 0.28);
}

.health-rule-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(150px, 180px);
  align-items: center;
  gap: 20px;
  min-height: 70px;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(146, 185, 222, 0.22);
}

.health-rule-copy {
  display: grid;
  gap: 4px;
}

.health-rule-copy strong {
  color: #173b60;
  font-size: 12px;
  font-weight: 900;
}

.health-rule-copy small {
  color: #7b8b9d;
  font-size: 10px;
  font-weight: 680;
}

.settings-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #58718a;
  font-size: 10px;
  font-weight: 820;
  cursor: pointer;
}

.settings-switch input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.settings-switch > span {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 10px;
  background: #cad8e6;
  transition: background 0.16s ease;
}

.settings-switch > span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(31, 65, 98, 0.22);
  content: '';
  transition: transform 0.16s ease;
}

.settings-switch input:checked + span {
  background: #1688f5;
}

.settings-switch input:checked + span::after {
  transform: translateX(14px);
}

.settings-switch input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(22, 136, 245, 0.14);
}

.settings-switch em {
  font-style: normal;
}

.health-rule-value {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.health-rule-value input {
  min-height: 38px;
  padding: 0 10px;
  text-align: center;
}

.health-rule-value input:disabled {
  background: #f2f6fa;
  color: #9aabba;
}

.health-rule-value > span {
  color: #6f8296;
  font-size: 10px;
  font-weight: 780;
  white-space: nowrap;
}

.health-rule-thresholds {
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 180px) minmax(150px, 180px);
}

.health-rule-thresholds .health-rule-value {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.health-rule-value-watch input {
  border-color: rgba(237, 160, 38, 0.42);
  background: #fffaf0;
}

.health-rule-value-risk input {
  border-color: rgba(230, 73, 99, 0.36);
  background: #fff7f8;
}

.project-settings-actions {
  position: sticky;
  bottom: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 16px 4px -4px;
  padding: 12px 16px;
  border: 1px solid rgba(127, 173, 217, 0.3);
  border-radius: 8px;
  background: rgba(250, 253, 255, 0.94);
  box-shadow: 0 -10px 26px rgba(40, 83, 125, 0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.project-settings-actions > span {
  color: #708397;
  font-size: 10px;
  font-weight: 720;
}

.project-settings-actions > div {
  display: flex;
  gap: 10px;
}

.project-settings-actions button {
  min-width: 138px;
  min-height: 42px;
}

.cockpit-calendar-link {
  display: grid;
  gap: 1px;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.cockpit-calendar-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cockpit-calendar-link small {
  color: #1680df;
  font-size: 9px;
  font-weight: 820;
}

.cockpit-calendar-link:hover span,
.cockpit-calendar-link:focus-visible span {
  color: #0875df;
}

.cockpit-calendar-link.has-warning span,
.cockpit-calendar-link.has-warning small {
  color: #9a5b00;
}

.members-page-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  height: 100%;
  min-height: 0;
  padding: 20px;
  overflow: hidden;
  border-radius: 8px;
}

.members-page-panel.is-empty {
  grid-template-rows: auto minmax(0, 1fr);
}

.members-page-panel.is-empty .members-toolbar,
.members-page-panel.is-empty .members-table-head,
.members-page-panel.is-empty .members-head-actions {
  display: none;
}

.members-page-panel.is-empty .members-table-wrap {
  display: grid;
  border-style: dashed;
  background: rgba(248, 252, 255, 0.64);
}

.members-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  padding: 0 4px 14px;
  border-bottom: 1px solid rgba(148, 177, 207, 0.22);
}

.members-page-head h1 {
  margin: 4px 0 3px;
  color: #10345c;
  font-size: 25px;
  font-weight: 950;
  letter-spacing: 0;
}

.members-page-head p {
  margin: 0;
  color: #718096;
  font-size: 12px;
  font-weight: 740;
}

.members-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.members-page-meta {
  color: #5f748b;
  font-size: 11px;
  font-weight: 840;
  white-space: nowrap;
}

.members-add-btn {
  min-height: 40px;
  padding-inline: 18px;
}

.members-bulk-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(231, 76, 98, 0.32);
  border-radius: 7px;
  background: #fff6f7;
  color: #cf3850;
  font-size: 11px;
  font-weight: 880;
  white-space: nowrap;
}

.members-bulk-delete-btn:hover {
  border-color: rgba(231, 76, 98, 0.55);
  background: #ffedef;
}

.members-bulk-delete-btn:disabled,
.members-clear-selection-btn:disabled {
  border-color: rgba(143, 166, 188, 0.22);
  background: #f5f8fb;
  color: #9aabbc;
  cursor: not-allowed;
}

.members-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 520px) auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid rgba(146, 185, 222, 0.35);
  border-radius: 8px;
  background: rgba(248, 252, 255, 0.76);
}

.members-search-field {
  position: relative;
  display: block;
}

.members-search-field input {
  width: 100%;
  min-height: 36px;
  padding: 0 12px 0 36px;
  border: 1px solid rgba(143, 181, 218, 0.44);
  border-radius: 7px;
  background: #fff;
  color: #173654;
  font-size: 12px;
  font-weight: 720;
  outline: none;
}

.members-search-field input:focus {
  border-color: #1688f5;
  box-shadow: 0 0 0 3px rgba(22, 136, 245, 0.1);
}

.members-search-icon {
  position: absolute;
  top: 50%;
  left: 13px;
  z-index: 1;
  width: 12px;
  height: 12px;
  border: 1.8px solid #66809b;
  border-radius: 999px;
  pointer-events: none;
  transform: translateY(-58%);
}

.members-search-icon::after {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 1.8px;
  border-radius: 2px;
  background: #66809b;
  content: "";
  transform: rotate(45deg);
}

.members-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(143, 181, 218, 0.36);
  border-radius: 7px;
  background: #eef5fc;
}

.members-filter-group button {
  min-height: 30px;
  padding: 0 13px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #63768b;
  font-size: 11px;
  font-weight: 850;
}

.members-filter-group button:hover {
  color: #0875df;
}

.members-filter-group button.active {
  background: #fff;
  color: #0875df;
  box-shadow: 0 2px 7px rgba(40, 94, 142, 0.1);
}

.members-selection-tools {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 7px 9px 0;
  border-top: 1px solid rgba(143, 181, 218, 0.28);
}

.members-select-all-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #244763;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.members-select-all-control input,
.member-select-checkbox {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #087ff0;
  cursor: pointer;
}

.members-selected-count {
  min-width: 64px;
  color: #0875df;
  font-size: 11px;
  font-weight: 880;
}

.members-clear-selection-btn {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(143, 181, 218, 0.4);
  border-radius: 7px;
  background: #fff;
  color: #47627c;
  font-size: 11px;
  font-weight: 840;
}

.members-table-wrap {
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(143, 181, 218, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  overscroll-behavior: auto;
  scrollbar-gutter: stable;
}

.members-table-head,
.member-row {
  display: grid;
  grid-template-columns:
    minmax(175px, 1.25fr)
    76px
    minmax(90px, 0.75fr)
    minmax(108px, 0.85fr)
    minmax(130px, 1fr)
    82px
    82px
    118px;
  align-items: center;
  min-width: 950px;
}

.members-table-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 42px;
  border-bottom: 1px solid rgba(143, 181, 218, 0.42);
  background: #eef6fe;
  color: #0875df;
  font-size: 11px;
  font-weight: 920;
}

.members-table-head > span,
.members-table-head > label,
.member-row > div {
  min-width: 0;
  padding: 9px 13px;
}

.members-table-head > span,
.members-table-head > label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.members-table-head > span:nth-child(n + 6),
.member-row > div:nth-child(n + 6) {
  text-align: center;
}

.member-row {
  min-height: 62px;
  border-bottom: 1px solid rgba(178, 204, 229, 0.42);
  color: #28445f;
  font-size: 11px;
  cursor: pointer;
}

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

.member-row:hover {
  background: rgba(238, 247, 255, 0.68);
}

.member-row:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid rgba(22, 136, 245, 0.72);
  outline-offset: -2px;
}

.member-row.is-selected {
  background: rgba(224, 241, 255, 0.8);
  box-shadow: inset 3px 0 0 #1688f5;
}

.member-row.is-inactive {
  background: rgba(247, 249, 251, 0.74);
  color: #8290a1;
}

.member-identity {
  display: grid;
  grid-template-columns: 15px 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.member-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #e1f0ff;
  color: #0875df;
  font-size: 12px;
  font-weight: 950;
}

.member-avatar[data-side="client"] {
  background: #ddf7f3;
  color: #008f82;
}

.member-avatar[data-side="third"] {
  background: #fff0d8;
  color: #b36c00;
}

.member-identity strong {
  display: block;
  overflow: hidden;
  color: #173654;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-contact span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #7a899a;
  font-size: 10px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-department,
.member-project-role {
  overflow: hidden;
  color: #38526d;
  font-size: 11px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-side-badge,
.member-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e7f2ff;
  color: #0875df;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.member-side-badge[data-side="client"] {
  background: #dff7f3;
  color: #008f82;
}

.member-side-badge[data-side="third"] {
  background: #fff1db;
  color: #a86600;
}

.member-status-badge[data-status="inactive"] {
  background: #edf0f4;
  color: #758398;
}

.member-task-count {
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.member-row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.member-row-actions button {
  flex: 0 0 auto;
  min-width: 42px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(143, 181, 218, 0.42);
  border-radius: 6px;
  background: #fff;
  color: #1769ae;
  font-size: 10px;
  font-weight: 860;
  white-space: nowrap;
}

.member-row-actions button:hover {
  border-color: #1688f5;
  color: #0875df;
}

.member-row-actions .member-toggle-btn[data-action="activate"] {
  border-color: rgba(22, 163, 74, 0.25);
  color: #15803d;
}

.members-empty {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 280px;
  padding: 40px;
  text-align: center;
}

.members-empty[hidden] {
  display: none;
}

.members-empty-add-btn {
  min-height: 38px;
  margin-top: 16px;
  padding-inline: 16px;
}

.members-empty-icon {
  position: relative;
  width: 46px;
  height: 46px;
  margin-bottom: 13px;
  border: 2px solid #9bc9f3;
  border-radius: 999px;
}

.members-empty-icon::before {
  position: absolute;
  top: 8px;
  left: 15px;
  width: 12px;
  height: 12px;
  border: 2px solid #1688f5;
  border-radius: 999px;
  content: "";
}

.members-empty-icon::after {
  position: absolute;
  right: 8px;
  bottom: 7px;
  left: 8px;
  height: 12px;
  border: 2px solid #1688f5;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  content: "";
}

.members-empty strong {
  color: #25445f;
  font-size: 14px;
}

.members-empty p {
  margin: 7px 0 0;
  color: #8290a1;
  font-size: 11px;
}

.member-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 88;
  border: 0;
  background: rgba(15, 37, 61, 0.36);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

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

.cloud-migration-backdrop {
  position: fixed;
  inset: 0;
  z-index: 92;
  background: rgba(15, 37, 61, 0.38);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

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

.cloud-migration-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 93;
  display: grid;
  gap: 16px;
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 22px;
  overflow: auto;
  border: 1px solid rgba(139, 181, 221, 0.55);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 72px rgba(11, 43, 72, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -47%);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.cloud-migration-dialog.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.cloud-migration-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 177, 207, 0.24);
}

.cloud-migration-head h2 {
  margin: 4px 0 4px;
  color: #10345c;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0;
}

.cloud-migration-head p {
  margin: 0;
  color: #718096;
  font-size: 11px;
  font-weight: 720;
  line-height: 1.6;
}

.cloud-migration-head button {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(143, 181, 218, 0.42);
  border-radius: 7px;
  background: #fff;
  color: #61758b;
  font-size: 20px;
}

.cloud-migration-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}

.cloud-migration-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(143, 181, 218, 0.38);
  border-radius: 7px;
  background: #f8fbff;
}

.cloud-migration-item input {
  width: 16px;
  height: 16px;
  accent-color: #1688f5;
}

.cloud-migration-item > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.cloud-migration-item strong {
  overflow: hidden;
  color: #183b5d;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloud-migration-item small,
.cloud-migration-item > span {
  color: #71849a;
  font-size: 10px;
  font-weight: 720;
  white-space: nowrap;
}

.cloud-migration-hint {
  min-height: 18px;
  margin: 0;
  color: #657b91;
  font-size: 11px;
  font-weight: 720;
}

.cloud-migration-hint[data-state="error"] {
  color: #b42342;
}

.cloud-migration-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 2px;
}

.cloud-migration-actions button {
  min-width: 104px;
  min-height: 40px;
  border-radius: 7px;
}

body.cloud-migration-open {
  overflow: hidden;
}

.member-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 89;
  display: grid;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 22px;
  overflow: auto;
  border: 1px solid rgba(139, 181, 221, 0.55);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 72px rgba(11, 43, 72, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -47%);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.member-dialog.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.member-dialog-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(148, 177, 207, 0.24);
}

.member-dialog-head h2 {
  margin: 4px 0 3px;
  color: #10345c;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0;
}

.member-dialog-head p {
  margin: 0;
  color: #718096;
  font-size: 11px;
  font-weight: 720;
}

.member-dialog-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(143, 181, 218, 0.42);
  border-radius: 7px;
  background: #fff;
  color: #61758b;
  font-size: 20px;
}

.member-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 18px;
}

.member-field {
  display: grid;
  gap: 6px;
}

.member-field-name {
  grid-column: 1 / -1;
}

.member-field > span {
  color: #586d84;
  font-size: 10px;
  font-weight: 860;
}

.member-field em {
  color: #e11d48;
  font-style: normal;
}

.member-field input,
.member-field select {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid rgba(143, 181, 218, 0.5);
  border-radius: 7px;
  background: #fff;
  color: #173654;
  font-size: 12px;
  font-weight: 720;
  outline: none;
}

.member-field input:focus,
.member-field select:focus {
  border-color: #1688f5;
  box-shadow: 0 0 0 3px rgba(22, 136, 245, 0.1);
}

.member-form-hint {
  grid-column: 1 / -1;
  min-height: 17px;
  margin: 0;
  color: #74849a;
  font-size: 10px;
  font-weight: 760;
}

.member-form-hint[data-tone="error"] {
  color: #c3284c;
}

.member-form-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 4px;
}

.member-form-actions button {
  min-width: 94px;
  min-height: 40px;
  border-radius: 7px;
}

.breakdown-row input[data-owner-select] {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(143, 181, 218, 0.48);
  border-radius: 7px;
  background-color: #fff;
  color: #24415e;
  font-size: 11px;
  font-weight: 760;
  outline: none;
}

.breakdown-row input[data-owner-select]:focus {
  border-color: #1688f5;
  box-shadow: 0 0 0 3px rgba(22, 136, 245, 0.1);
}

.tasklist-page-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  height: calc(100vh - 104px);
  min-height: 560px;
  padding: 20px;
  overflow: hidden;
  border-radius: 8px;
}

.tasklist-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  padding: 0 4px 14px;
  border-bottom: 1px solid rgba(148, 177, 207, 0.22);
}

.tasklist-page-head h1 {
  margin: 4px 0 3px;
  color: #10345c;
  font-size: 25px;
  font-weight: 950;
}

.tasklist-page-head p {
  margin: 0;
  color: #718096;
  font-size: 12px;
  font-weight: 740;
}

.tasklist-page-toolbar {
  position: relative;
  z-index: 80;
  margin: 0;
  border-radius: 8px;
  box-shadow: none;
  overflow: visible;
}

.tasklist-page-body {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.tasklist-page-list {
  display: block;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: auto;
  border-radius: 8px;
  overscroll-behavior: contain;
}

.workspace-content .layout {
  width: auto;
  margin-right: 0;
  margin-left: 0;
}

.console-global-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.console-global-actions .primary-action-btn,
.console-global-actions .save-as-template-btn,
.console-global-actions .workspace-add-phase-btn,
.console-global-actions .io-menu-btn {
  min-height: 42px;
  height: 42px;
  border-radius: 8px;
}

.workspace-content .layout {
  padding: 10px 16px 8px;
}

.workspace-sidebar-toggle,
.workspace-sidebar-backdrop {
  display: none;
}

@media (max-width: 1180px) {
  .workspace-shell-grid {
    grid-template-columns: 214px minmax(0, 1fr);
  }

  .workspace-sidebar {
    padding-right: 9px;
    padding-left: 9px;
  }

  .cockpit-main {
    padding-right: 12px;
    padding-left: 12px;
  }

  .tasklist-page-main {
    padding-right: 12px;
    padding-left: 12px;
  }

  .members-page-main {
    padding-right: 12px;
    padding-left: 12px;
  }

  .settings-page-main {
    padding-right: 12px;
    padding-left: 12px;
  }

  .project-calendar-settings .calendar-mode-list {
    grid-template-columns: 1fr;
  }

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

  .health-rule-row,
  .health-rule-thresholds {
    grid-template-columns: minmax(220px, 1fr) auto minmax(140px, 170px);
  }

}

@media (max-width: 900px) {
  .workspace-topbar {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 10px;
    padding: 0 12px;
  }

  .workspace-sidebar-toggle {
    display: grid;
    width: 38px;
    padding: 9px;
    gap: 4px;
  }

  .workspace-sidebar-toggle > span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }

  .workspace-shell-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace-sidebar {
    position: fixed;
    top: 64px;
    bottom: 0;
    left: 0;
    z-index: 52;
    width: min(280px, 84vw);
    height: auto;
    transform: translateX(-104%);
    transition: transform 0.2s ease;
  }

  body.workspace-sidebar-open .workspace-sidebar {
    transform: translateX(0);
  }

  .workspace-sidebar-backdrop:not([hidden]) {
    position: fixed;
    inset: 64px 0 0;
    z-index: 51;
    display: block;
    border: 0;
    border-radius: 0;
    background: rgba(15, 37, 61, 0.34);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
}

@media (max-width: 680px) {
  .workspace-brand strong,
  .workspace-current-project > span,
  .workspace-current-project > small,
  .workspace-user-button > strong {
    display: none;
  }

  .workspace-current-project {
    padding-left: 10px;
  }

  .workspace-current-project > strong {
    max-width: 38vw;
    font-size: 12px;
  }

  .workspace-user-button {
    padding-right: 5px;
  }

  .cockpit-main,
  .tasklist-page-main,
  .settings-page-main,
  .workspace-content .layout {
    padding-right: 10px;
    padding-left: 10px;
  }

  .tasklist-page-panel {
    height: calc(100vh - 84px);
    min-height: 520px;
    padding: 14px;
  }

  .members-page-panel {
    height: 100%;
    min-height: 0;
    padding: 14px;
  }

  .settings-page-panel {
    min-height: calc(100vh - 84px);
    padding: 14px;
  }

  .settings-project-summary,
  .project-settings-form-grid,
  .project-calendar-settings .calendar-custom-dates {
    grid-template-columns: 1fr;
  }

  .project-settings-field-wide {
    grid-column: auto;
  }

  .project-settings-section-head,
  .project-calendar-head {
    align-items: stretch;
    flex-direction: column;
  }

  .project-settings-compact-field {
    min-width: 0;
  }

  .settings-project-summary > div + div {
    border-top: 1px solid rgba(148, 177, 207, 0.18);
    border-left: 0;
  }

  .calendar-date-head {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-date-input {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .health-rule-row,
  .health-rule-thresholds {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 14px;
  }

  .health-rule-row .health-rule-copy {
    grid-column: 1 / -1;
  }

  .health-rule-value {
    min-width: 132px;
  }

  .project-settings-actions {
    align-items: stretch;
    flex-direction: column;
    margin: 0 -14px -14px;
    padding: 12px 14px;
  }

  .project-settings-actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .project-settings-actions button {
    min-width: 0;
  }

  .plan-calendar-summary-copy em {
    display: none;
  }

  .members-page-head,
  .members-toolbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .members-head-actions {
    justify-content: space-between;
    width: 100%;
  }

  .members-filter-group {
    width: 100%;
    overflow-x: auto;
  }

  .members-filter-group button {
    flex: 1 0 auto;
  }

  .member-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-field-name,
  .member-form-hint,
  .member-form-actions {
    grid-column: 1;
  }

  .tasklist-page-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .tasklist-page-head .tasklist-modal-meta {
    justify-self: start;
  }

  .console-global-actions {
    width: 100%;
  }

  .console-global-actions > button,
  .console-global-actions .io-menu,
  .console-global-actions .io-menu-btn {
    flex: 1 1 0;
    width: 100%;
  }
}

/* Login and project portfolio */
.login-screen,
.project-hub-screen {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 100vh;
  color: var(--ink);
}

.login-screen {
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  padding: 34px 0 58px;
}

.login-screen::before,
.login-screen::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.login-screen::before {
  inset: 8% 6% auto;
  height: 58%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 22% 42%, rgba(22, 135, 248, 0.14), transparent 34%),
    radial-gradient(circle at 74% 34%, rgba(34, 200, 189, 0.13), transparent 32%),
    radial-gradient(circle at 56% 72%, rgba(96, 110, 238, 0.1), transparent 35%);
  filter: blur(22px);
}

.login-screen::after {
  right: 10%;
  bottom: 10%;
  width: 38%;
  height: 28%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.46);
  filter: blur(42px);
}

.login-screen[hidden],
.project-hub-screen[hidden] {
  display: none !important;
}

body.login-active,
body.project-hub-active {
  overflow: hidden;
}

.project-hub-topbar {
  display: flex;
  align-items: center;
  min-height: 68px;
  border-bottom: 1px solid rgba(185, 212, 239, 0.72);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(15, 59, 94, 0.04);
}

.project-hub-topbar .workspace-brand strong {
  font-size: 25px;
  letter-spacing: 0;
}

.login-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 42px);
  width: min(1248px, calc(100vw - 68px));
  height: min(710px, calc(100vh - 92px));
  min-height: min(620px, calc(100vh - 92px));
  margin: 0 auto;
  overflow: visible;
}

.login-form-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 48px;
  overflow: hidden;
  border: 1px solid rgba(175, 213, 248, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(rgba(202, 224, 246, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(202, 224, 246, 0.16) 1px, transparent 1px),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 252, 255, 0.76));
  background-size: 30px 30px, 30px 30px, auto;
  box-shadow: 0 20px 48px rgba(13, 61, 126, 0.1);
  backdrop-filter: blur(18px);
}

.login-form-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #1687f8, #22c8bd, rgba(244, 159, 10, 0.84));
  opacity: 0.82;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--deep);
  font-size: 28px;
  font-weight: 950;
  letter-spacing: 0;
}

.login-brand .home-logo-mark {
  width: 40px;
  height: 40px;
}

.login-form-copy {
  margin-top: 64px;
  margin-bottom: 38px;
}

.login-form-copy h1 {
  margin: 14px 0 10px;
  color: #0b1c38;
  font-family: var(--display-font);
  font-size: 44px;
  font-weight: 950;
  line-height: 1.06;
  letter-spacing: 0;
}

.login-form-copy p {
  margin: 0;
  color: #65758c;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.7;
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-form > label {
  display: grid;
  gap: 8px;
  color: #52657d;
  font-size: 13px;
  font-weight: 850;
}

.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"] {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid #cfe0f3;
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.96);
  color: #0e2442;
  font: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.login-form input:focus {
  border-color: #67b6ff;
  box-shadow: 0 0 0 4px rgba(22, 131, 247, 0.12);
}

.login-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #51637b;
  font-size: 14px;
  font-weight: 750;
}

.login-demo-mode {
  justify-content: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(8, 125, 240, 0.16);
  border-radius: 8px;
  background: rgba(239, 248, 255, 0.74);
  color: #657990;
  font-size: 12px;
}

.login-demo-mode strong {
  color: #0875d8;
  font-weight: 900;
}

@media (max-width: 820px) {
  .delete-task {
    opacity: 1;
    pointer-events: auto;
  }

  .project-save-state {
    width: 100%;
  }
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.login-remember input {
  width: 16px;
  height: 16px;
  accent-color: #1687f8;
}

.login-form-options a,
.login-register a {
  color: #0875d8;
  font-weight: 850;
  text-decoration: none;
}

.login-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  border: 1px solid #0879e8;
  border-radius: 8px;
  background: #087fee;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(0, 111, 232, 0.25);
}

.login-submit-btn:hover {
  background: #006ed9;
}

.login-register {
  margin: 0;
  color: #63748c;
  font-size: 14px;
  font-weight: 750;
  text-align: center;
}

.login-showcase-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  min-width: 0;
  min-height: 0;
  padding: 48px 58px;
  overflow: hidden;
  border: 1px solid rgba(175, 213, 248, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(rgba(202, 224, 246, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(202, 224, 246, 0.28) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(234, 247, 255, 0.52));
  background-size: 30px 30px, 30px 30px, auto;
  box-shadow: 0 20px 48px rgba(13, 61, 126, 0.09);
  backdrop-filter: blur(16px);
}

.login-showcase-panel::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(159, 203, 244, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.26), rgba(238, 248, 255, 0.04));
  pointer-events: none;
}

.login-showcase-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(670px, 100%);
  margin: 0 auto;
}

.login-showcase-copy {
  margin-bottom: 34px;
}

.login-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #b7dbff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #0875d8;
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(22, 131, 247, 0.12);
}

.login-pill::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c8bd;
}

.login-showcase-copy h2 {
  margin: 28px 0 18px;
  color: #0d2c55;
  font-family: var(--display-font);
  font-size: 40px;
  font-weight: 950;
  line-height: 1.18;
  letter-spacing: 0;
}

.login-showcase-copy p {
  max-width: 500px;
  margin: 0;
  color: #5c6f88;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.75;
}

.login-workspace-preview {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(155, 195, 232, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(rgba(205, 225, 244, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(205, 225, 244, 0.22) 1px, transparent 1px),
    rgba(250, 253, 255, 0.94);
  background-size: 24px 24px;
  box-shadow: 0 22px 48px rgba(34, 92, 146, 0.15);
}

.login-workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(184, 211, 236, 0.7);
  background: rgba(255, 255, 255, 0.88);
}

.login-workspace-head > div {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.login-workspace-head strong {
  overflow: hidden;
  color: #123b65;
  font-size: 13px;
  font-weight: 920;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-workspace-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(145deg, #3da9ff, #087ceb);
  box-shadow: 0 5px 12px rgba(8, 124, 235, 0.22);
}

.login-workspace-status {
  padding: 4px 8px;
  border: 1px solid rgba(231, 90, 111, 0.18);
  border-radius: 999px;
  background: #fff0f3;
  color: #c83252;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.login-workspace-body {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 250px;
}

.login-workspace-nav {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 15px 9px;
  border-right: 1px solid rgba(188, 214, 237, 0.64);
  background: rgba(243, 249, 255, 0.86);
}

.login-workspace-nav > strong {
  margin: 0 7px 6px;
  color: #8798aa;
  font-size: 8px;
  font-weight: 900;
}

.login-workspace-nav > span {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  color: #61758b;
  font-size: 9px;
  font-weight: 830;
}

.login-workspace-nav > span.active {
  background: #dfefff;
  color: #0875d8;
}

.login-workspace-nav > span i {
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 3px;
}

.login-workspace-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 15px 12px;
}

.login-workspace-summary {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr 0.7fr;
  border: 1px solid #d9e7f4;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
}

.login-workspace-summary > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
}

.login-workspace-summary > span + span {
  border-left: 1px solid #d9e7f4;
}

.login-workspace-summary small,
.login-workspace-phases small {
  color: #7d8da0;
  font-size: 8px;
  font-weight: 780;
}

.login-workspace-summary b {
  overflow: hidden;
  color: #173f68;
  font-size: 12px;
  font-weight: 930;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-workspace-summary .risk b {
  color: #c83252;
}

.login-workspace-progress {
  height: 5px;
  margin: 9px 2px 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7eef5;
}

.login-workspace-progress > i {
  display: block;
  width: 62%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1687f8, #20b9b0);
  animation: login-progress-reveal 900ms ease-out both;
}

@keyframes login-progress-reveal {
  from { width: 0; }
}

.login-workspace-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.login-workspace-section-head > strong {
  color: #224b73;
  font-size: 10px;
  font-weight: 900;
}

.login-workspace-section-head > span {
  color: #8292a5;
  font-size: 8px;
  font-weight: 800;
}

.login-workspace-phases {
  display: grid;
  border: 1px solid #d9e7f4;
  border-radius: 7px;
  overflow: hidden;
}

.login-workspace-phases > div {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 37px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.7);
}

.login-workspace-phases > div + div {
  border-top: 1px solid #e0ebf5;
}

.login-workspace-phases > div.current {
  background: rgba(227, 246, 249, 0.78);
  box-shadow: inset 3px 0 #18a9bb;
}

.login-workspace-phases > div > i {
  display: grid;
  place-items: center;
  width: 27px;
  height: 22px;
  border-radius: 6px;
  background: #deeeff;
  color: #0875d8;
  font-size: 8px;
  font-style: normal;
  font-weight: 950;
}

.login-workspace-phases > div.current > i {
  background: #d9f4f4;
  color: #0d909f;
}

.login-workspace-phases > div > span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.login-workspace-phases strong {
  overflow: hidden;
  color: #274765;
  font-size: 9px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-workspace-phases > div > b {
  color: #617890;
  font-size: 9px;
  font-weight: 920;
}

.login-workspace-phases > div.complete > b {
  color: #16945f;
}

.login-workspace-focus {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 29px;
  margin-top: 8px;
  padding: 0 9px;
  border: 1px solid #f1d6b0;
  border-radius: 7px;
  background: #fff9ef;
}

.login-workspace-focus > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f39a12;
}

.login-workspace-focus > strong {
  margin-right: auto;
  color: #79561d;
  font-size: 9px;
  font-weight: 900;
}

.login-workspace-focus > b,
.login-workspace-focus > i {
  font-size: 8px;
  font-style: normal;
  font-weight: 860;
}

.login-workspace-focus > b { color: #c83252; }
.login-workspace-focus > i { color: #a56a0a; }

.login-capability-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 16px;
  border: 1px solid rgba(187, 218, 248, 0.85);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 28px rgba(22, 131, 247, 0.07);
}

.login-capability-strip span {
  display: grid;
  gap: 4px;
  min-height: 66px;
  padding: 12px 14px;
}

.login-capability-strip span + span {
  border-left: 1px solid #d9e7f4;
}

.login-capability-strip b {
  color: #155b9f;
  font-size: 12px;
  font-weight: 930;
}

.login-capability-strip small {
  color: #61758f;
  font-size: 9px;
  font-weight: 780;
}

.login-copyright {
  position: absolute;
  right: 0;
  bottom: 16px;
  left: 0;
  margin: 0;
  color: #7a8aa0;
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.project-hub-topbar {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 230px minmax(260px, 560px) 1fr;
  gap: 24px;
  padding: 0 24px;
}

.project-hub-topbar .workspace-brand { justify-self: start; }

.project-hub-search {
  position: relative;
  align-self: center;
}

.project-hub-search > span {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 13px;
  height: 13px;
  border: 2px solid #7b8da2;
  border-radius: 50%;
  transform: translateY(-58%);
}

.project-hub-search > span::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 6px;
  height: 2px;
  background: #7b8da2;
  transform: rotate(45deg);
}

.project-hub-search input {
  width: 100%;
  height: 38px;
  padding: 0 16px 0 40px;
  border: 1px solid #d4e1ee;
  border-radius: 7px;
  outline: none;
  background: #f6f9fc;
  color: #173b61;
  font: inherit;
}

.project-hub-search input:focus { border-color: #1687f8; background: #fff; }

.project-hub-user {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.project-hub-user-button i { color: #7a8ca0; font-style: normal; }

.project-hub-user-menu {
  position: absolute;
  top: 56px;
  right: 0;
  width: 140px;
  padding: 6px;
  border: 1px solid #d5e3f1;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(20, 56, 91, 0.16);
}

.project-hub-user-menu button {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #b4233d;
  text-align: left;
  font: inherit;
  font-weight: 750;
}

.project-hub-user-menu button:hover { background: #fff1f3; }

.project-hub-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  height: calc(100vh - 68px);
}

.project-hub-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 24px 14px 18px;
  border-right: 1px solid #d7e4f1;
  background: rgba(248, 251, 254, 0.94);
}

.project-hub-sidebar-title {
  display: grid;
  gap: 4px;
  padding: 0 12px 22px;
}

.project-hub-sidebar-title span,
.project-hub-sidebar-note span { color: #8190a2; font-size: 11px; font-weight: 750; }
.project-hub-sidebar-title strong { color: #173b61; font-size: 18px; }

.project-hub-sidebar nav { display: grid; gap: 5px; }

.project-hub-sidebar nav button {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #53677e;
  text-align: left;
  font: inherit;
}

.project-hub-sidebar nav button:hover { background: #edf5fd; color: #176bbd; }
.project-hub-sidebar nav button.active { border-left-color: #1687f8; background: #e5f2ff; color: #095eae; }

.project-hub-sidebar-note {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding: 16px 14px;
  border-top: 1px solid #dce7f2;
}

.project-hub-sidebar-note strong { color: #284a69; font-size: 14px; }
.project-hub-sidebar-note small { color: #8a99aa; font-size: 11px; }

.project-hub-main {
  min-width: 0;
  overflow: auto;
  padding: 30px clamp(24px, 3.4vw, 54px) 46px;
}

.project-hub-heading[hidden],
.project-hub-summary[hidden],
.project-hub-projects[hidden],
.project-hub-templates-view[hidden] {
  display: none !important;
}

.project-hub-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.project-hub-heading h1 {
  margin: 4px 0 5px;
  color: #102c4d;
  font-family: var(--display-font);
  font-size: 36px;
  letter-spacing: 0;
}

.project-hub-heading p { margin: 0; color: #718197; font-size: 14px; }

.project-hub-create-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 132px;
  height: 42px;
  border: 1px solid #0879e8;
  border-radius: 7px;
  background: #087fee;
  color: #fff;
  font: inherit;
  box-shadow: 0 10px 22px rgba(0, 122, 255, 0.17);
}

.project-hub-create-btn span { font-size: 21px; font-weight: 500; }

.project-hub-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 22px;
  border: 1px solid #cbddec;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.project-hub-summary > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 16px;
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid #dce7f2;
}

.project-hub-summary > div:last-child { border-right: 0; }
.project-hub-summary span { color: #60738a; font-size: 12px; font-weight: 750; }
.project-hub-summary strong { grid-row: 1 / span 2; grid-column: 2; color: #12395f; font-size: 27px; line-height: 1; }
.project-hub-summary small { color: #8a99aa; font-size: 10px; }

.project-hub-projects {
  min-width: 760px;
  overflow: hidden;
  border: 1px solid #cbddec;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(15, 59, 94, 0.06);
}

.project-hub-projects > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid #dce7f2;
}

.project-hub-projects > header > div:first-child { display: flex; align-items: baseline; gap: 10px; }
.project-hub-projects h2 { margin: 0; color: #173b61; font-size: 18px; }
.project-hub-projects header span { color: #8190a2; font-size: 12px; }

.project-hub-filters { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid #d6e4f1; border-radius: 7px; background: #f5f8fb; }
.project-hub-filters button { min-height: 30px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; color: #65778b; font: inherit; font-size: 12px; font-weight: 750; }
.project-hub-filters button.active { background: #fff; color: #0875d8; box-shadow: 0 2px 7px rgba(28, 78, 123, 0.1); }

.project-hub-table-head,
.project-hub-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.45fr) minmax(118px, 0.78fr) minmax(160px, 0.92fr) minmax(124px, 0.7fr) 78px 84px;
  align-items: center;
  gap: 12px;
}

.project-hub-table-head {
  min-height: 38px;
  padding: 0 20px;
  border-bottom: 1px solid #dce7f2;
  background: #f5f9fd;
  color: #718499;
  font-size: 11px;
  font-weight: 800;
}

.project-hub-row {
  min-height: 78px;
  padding: 12px 20px;
  border-bottom: 1px solid #e1ebf4;
}

.project-hub-row:last-child { border-bottom: 0; }
.project-hub-row:hover { background: #f8fbff; }

.project-hub-project-cell {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.project-hub-project-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--project-accent) 12%, white);
  color: var(--project-accent);
  font-size: 15px;
  font-weight: 900;
}

.project-hub-project-cell > div,
.project-hub-structure,
.project-hub-range { display: grid; gap: 4px; min-width: 0; }
.project-hub-project-cell strong { overflow: hidden; color: #173b61; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.project-hub-project-cell small,
.project-hub-structure small,
.project-hub-range small { overflow: hidden; color: #8190a2; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.project-hub-structure strong,
.project-hub-range strong { color: #465d75; font-size: 12px; }

.project-hub-progress {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) 34px;
  align-items: center;
  gap: 9px;
}

.project-hub-progress > span {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: #e6edf4;
}

.project-hub-progress > span::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--project-progress);
  border-radius: inherit;
  background: #1687f8;
}

.project-hub-progress strong { color: #405a73; font-size: 11px; }

.project-hub-status {
  justify-self: start;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.project-hub-status-active { background: #e7f3ff; color: #0875d8; }
.project-hub-status-risk { background: #fff0f2; color: #d22c4a; }
.project-hub-status-complete { background: #eaf8f1; color: #16845a; }
.project-hub-status-planning { background: #fff7e6; color: #a56500; }
.project-hub-status-paused { background: #f1f3f6; color: #64768a; }

.project-hub-open-btn {
  min-height: 34px;
  border: 1px solid #bcd7ee;
  border-radius: 6px;
  background: #fff;
  color: #0875d8;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.project-hub-open-btn:hover { border-color: #1687f8; background: #eef7ff; }

.project-hub-empty {
  display: grid;
  place-items: center;
  gap: 9px;
  min-height: 310px;
  padding: 40px;
  text-align: center;
}

.project-hub-empty[hidden] { display: none; }
.project-hub-empty .home-logo-mark { width: 42px; height: 42px; margin-bottom: 8px; }
.project-hub-empty strong { color: #284a69; font-size: 18px; }
.project-hub-empty p { margin: 0; color: #8190a2; font-size: 13px; }
.project-hub-empty button { min-height: 38px; margin-top: 8px; padding: 0 18px; border: 1px solid #1687f8; border-radius: 6px; background: #087fee; color: #fff; font: inherit; font-weight: 800; }

.project-hub-templates-view {
  min-width: 0;
}

.project-hub-template-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.project-hub-template-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-hub-template-heading h1 {
  margin: 4px 0 5px;
  color: #102c4d;
  font-family: var(--display-font);
  font-size: 36px;
  letter-spacing: 0;
}

.project-hub-template-heading p,
.project-hub-template-section-head p {
  margin: 0;
  color: #718197;
  font-size: 14px;
}

.project-hub-template-meta {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #c9dff2;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.84);
  color: #54708c;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.project-hub-template-section-head {
  margin-bottom: 14px;
}

.project-hub-template-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  border: 1px solid #caddec;
  border-radius: 7px;
  background: rgba(244, 249, 253, 0.86);
}

.project-hub-template-tabs button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #647b91;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.project-hub-template-tabs button.active {
  background: #fff;
  color: #0875d8;
  box-shadow: 0 4px 12px rgba(39, 86, 124, 0.1);
}

.project-hub-template-tabs button span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  min-height: 20px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e4f2ff;
  color: #1476e8;
  font-size: 10px;
}

.project-hub-template-section-head h2 {
  margin: 0 0 4px;
  color: #173b61;
  font-size: 18px;
}

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

.project-hub-template-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 16px;
  min-width: 0;
  min-height: 390px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid #cbddec;
  border-top: 3px solid var(--template-accent);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(15, 59, 94, 0.06);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.project-hub-template-card:hover {
  border-color: color-mix(in srgb, var(--template-accent) 54%, #cbddec);
  box-shadow: 0 18px 38px rgba(15, 59, 94, 0.1);
  transform: translateY(-2px);
}

.project-hub-template-card.custom {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(244, 253, 251, 0.9));
}

.project-hub-template-card-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.project-hub-template-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--template-accent) 13%, white);
  color: var(--template-accent);
  font-size: 13px;
  font-weight: 950;
}

.project-hub-template-card-head > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-hub-template-card-head strong {
  overflow: hidden;
  color: #173b61;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-hub-template-card-head small {
  color: #8291a3;
  font-size: 11px;
  font-weight: 750;
}

.project-hub-template-summary {
  min-height: 44px;
  margin: 0;
  color: #5d7188;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.65;
}

.project-hub-template-phases {
  display: grid;
  align-content: start;
  gap: 7px;
}

.project-hub-template-phases > span {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 10px 0 7px;
  border-left: 3px solid var(--phase-accent);
  background: color-mix(in srgb, var(--phase-accent) 5%, #f8fbfe);
}

.project-hub-template-phases i {
  color: var(--phase-accent);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.project-hub-template-phases b {
  overflow: hidden;
  color: #38536d;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-hub-template-phases small {
  color: #8b99a8;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.project-hub-template-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 15px;
  border-top: 1px solid #e0eaf3;
}

.project-hub-template-tags {
  display: flex;
  min-width: 0;
  gap: 5px;
  overflow: hidden;
}

.project-hub-template-tags i {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 5px;
  background: #edf6ff;
  color: #2473b9;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.project-hub-template-use-btn {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #0879e8;
  border-radius: 6px;
  background: #087fee;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
}

.project-hub-template-use-btn:hover { background: #006ed9; }

.project-hub-template-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.project-hub-template-delete-btn {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #d7e2ec;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.82);
  color: #78899a;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
}

.project-hub-template-delete-btn:hover {
  border-color: rgba(220, 62, 88, 0.35);
  background: rgba(255, 241, 244, 0.86);
  color: #b42342;
}

.project-hub-template-delete-btn.confirming {
  border-color: #dc3e58;
  background: #dc3e58;
  color: #fff;
}

.project-hub-template-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 280px;
  border: 1px dashed #bed4e7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.project-hub-template-empty strong { color: #284a69; font-size: 17px; }
.project-hub-template-empty p { margin: 0; color: #8190a2; font-size: 13px; }

.home-back-projects {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid #bed8ef;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.8);
  color: #1768b2;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.home-back-projects:hover { border-color: #1687f8; background: #eef7ff; }
.home-blank-actions { grid-template-columns: 1fr; }

@media (max-height: 820px) and (min-width: 761px) {
  .login-main {
    height: min(640px, calc(100vh - 84px));
    min-height: min(590px, calc(100vh - 84px));
  }

  .login-form-panel {
    padding: 36px 44px;
  }

  .login-form-copy {
    margin-top: 42px;
    margin-bottom: 26px;
  }

  .login-showcase-panel {
    padding: 28px 50px;
  }

  .login-showcase-copy {
    margin-bottom: 16px;
  }

  .login-showcase-copy h2 {
    margin: 14px 0 8px;
    font-size: 32px;
  }

  .login-workspace-body {
    min-height: 226px;
  }

  .login-workspace-main {
    padding-top: 11px;
    padding-bottom: 9px;
  }

  .login-workspace-phases > div {
    min-height: 32px;
  }

  .login-capability-strip span {
    min-height: 58px;
    padding: 9px 12px;
  }
}

@media (max-width: 1080px) {
  .login-main {
    grid-template-columns: minmax(340px, 0.8fr) minmax(0, 1fr);
    width: calc(100vw - 36px);
  }

  .login-form-panel {
    padding: 38px;
  }

  .login-showcase-panel {
    padding: 38px;
  }

  .login-showcase-copy h2 {
    font-size: 34px;
  }

  .project-hub-topbar { grid-template-columns: 205px minmax(220px, 1fr) auto; }
  .project-hub-layout { grid-template-columns: 205px minmax(0, 1fr); }
  .project-hub-summary { grid-template-columns: repeat(2, 1fr); }
  .project-hub-summary > div:nth-child(2) { border-right: 0; }
  .project-hub-summary > div:nth-child(-n + 2) { border-bottom: 1px solid #dce7f2; }
  .project-hub-template-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}

@media (max-width: 760px) {
  body.login-active { overflow: auto; }

  .login-screen {
    padding: 18px 0 52px;
  }

  .login-main {
    grid-template-columns: 1fr;
    gap: 16px;
    width: calc(100vw - 24px);
    height: auto;
    min-height: 0;
  }

  .login-form-panel {
    padding: 28px 24px;
  }

  .login-form-copy {
    margin-top: 38px;
  }

  .login-showcase-panel {
    padding: 28px 24px;
  }

  .login-showcase-copy h2 {
    font-size: 30px;
  }

  .login-capability-strip {
    grid-template-columns: 1fr;
  }

  .login-capability-strip span + span {
    border-top: 1px solid #d9e7f4;
    border-left: 0;
  }

  .login-workspace-body {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .login-workspace-summary {
    grid-template-columns: 1fr 1fr;
  }

  .login-workspace-summary > span:nth-child(3) {
    display: none;
  }

  .login-copyright {
    bottom: 18px;
  }

  .project-hub-topbar { grid-template-columns: 1fr auto; padding: 0 14px; }
  .project-hub-search { display: none; }
  .project-hub-layout { grid-template-columns: 68px minmax(0, 1fr); }
  .project-hub-sidebar { padding: 18px 8px; }
  .project-hub-sidebar-title,
  .project-hub-sidebar-note,
  .project-hub-sidebar nav button strong { display: none; }
  .project-hub-sidebar nav button { grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .project-hub-main { padding: 22px 14px 36px; }
  .project-hub-heading { align-items: center; }
  .project-hub-heading h1 { font-size: 30px; }
  .project-hub-heading p { display: none; }
  .project-hub-summary { grid-template-columns: 1fr 1fr; }
  .project-hub-summary > div { padding: 14px; }
  .project-hub-projects { min-width: 700px; }
  .project-hub-template-heading { align-items: center; }
  .project-hub-template-heading h1 { font-size: 30px; }
  .project-hub-template-heading p { display: none; }
  .project-hub-template-heading-actions { align-items: stretch; flex-direction: column; }
  .project-hub-template-meta { justify-content: center; }
  .project-hub-template-grid { grid-template-columns: 1fr; }

  .save-template-dialog { padding: 12px; }
  .save-template-card { width: calc(100vw - 24px); max-height: calc(100vh - 24px); padding: 16px; }
  .save-template-head p { display: none; }
  .save-template-scope { grid-template-columns: 1fr; }
  .save-template-scope > div + div { border-top: 1px solid #d5e3ef; border-left: 0; }
}

/* Login page composition: brand header, product story, compact sign-in card. */
.login-screen {
  grid-template-rows: 72px minmax(0, 1fr) 44px;
  place-items: stretch;
  min-height: 100dvh;
  padding: 0 36px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(232, 246, 255, 0.76), rgba(247, 250, 255, 0.9) 52%, rgba(234, 249, 246, 0.66));
}

.login-screen::before {
  inset: 0;
  height: auto;
  border-radius: 0;
  background:
    linear-gradient(rgba(194, 220, 245, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(194, 220, 245, 0.2) 1px, transparent 1px);
  background-size: 34px 34px;
  filter: none;
}

.login-screen::after {
  display: none;
}

.login-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(1440px, 100%);
  margin: 0 auto;
  border-bottom: 1px solid rgba(176, 209, 239, 0.66);
}

.login-topbar .login-brand {
  flex: 0 0 auto;
}

.login-topbar-note {
  padding-left: 20px;
  border-left: 1px solid #cbdceb;
  color: #73859a;
  font-size: 13px;
  font-weight: 760;
}

.login-main {
  grid-template-columns: minmax(0, 720px) 380px;
  align-items: center;
  gap: clamp(48px, 6vw, 84px);
  width: min(1180px, 100%);
  height: auto;
  min-height: 0;
  margin: 0 auto;
}

.login-showcase-panel {
  order: 1;
  align-items: center;
  padding: 0;
  overflow: visible;
  border: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
}

.login-showcase-panel::before {
  display: none;
}

.login-showcase-inner {
  width: 100%;
}

.login-showcase-copy {
  margin-bottom: 22px;
}

.login-showcase-copy h2 {
  max-width: 680px;
  margin: 18px 0 12px;
  font-size: 42px;
  line-height: 1.2;
}

.login-showcase-copy p {
  max-width: 620px;
  line-height: 1.65;
}

.login-workspace-preview {
  box-shadow: 0 22px 50px rgba(34, 92, 146, 0.13);
}

.login-capability-strip {
  margin-top: 14px;
}

.login-form-panel {
  order: 2;
  align-self: center;
  width: 100%;
  max-width: 380px;
  min-height: 0;
  padding: 38px 34px 34px;
  border-color: rgba(165, 204, 239, 0.9);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 60px rgba(23, 69, 111, 0.15);
  backdrop-filter: blur(18px);
}

.login-form-copy {
  margin: 0 0 28px;
  text-align: center;
}

.login-form-copy h1 {
  margin: 12px 0 9px;
  font-size: 31px;
}

.login-form-copy p {
  font-size: 14px;
  line-height: 1.65;
}

.login-form {
  gap: 16px;
}

.login-copyright {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  z-index: 1;
  display: grid;
  place-items: center;
  margin: 0;
}

@media (max-height: 780px) and (min-width: 761px) {
  .login-screen {
    grid-template-rows: 62px minmax(0, 1fr) 34px;
    padding: 0 28px;
  }

  .login-main {
    grid-template-columns: minmax(0, 690px) 360px;
    gap: 48px;
  }

  .login-showcase-copy {
    margin-bottom: 14px;
  }

  .login-showcase-copy h2 {
    margin: 10px 0 7px;
    font-size: 33px;
  }

  .login-showcase-copy p {
    font-size: 14px;
  }

  .login-workspace-body {
    min-height: 214px;
  }

  .login-workspace-main {
    padding-top: 10px;
    padding-bottom: 9px;
  }

  .login-workspace-phases > div {
    min-height: 31px;
  }

  .login-capability-strip span {
    min-height: 52px;
    padding: 8px 12px;
  }

  .login-form-panel {
    max-width: 360px;
    padding: 30px;
  }

  .login-form-copy {
    margin-bottom: 22px;
  }
}

@media (max-width: 980px) and (min-width: 761px) {
  .login-screen {
    padding-right: 24px;
    padding-left: 24px;
  }

  .login-main {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
  }

  .login-showcase-copy h2 {
    font-size: 34px;
  }

  .login-form-panel {
    max-width: 340px;
    padding-right: 28px;
    padding-left: 28px;
  }
}

@media (max-width: 760px) {
  .login-screen {
    grid-template-rows: 62px auto 38px;
    min-height: 100dvh;
    padding: 0 12px;
    overflow: auto;
  }

  .login-topbar {
    gap: 12px;
  }

  .login-topbar .login-brand {
    font-size: 24px;
  }

  .login-topbar .login-brand .home-logo-mark {
    width: 34px;
    height: 34px;
  }

  .login-topbar-note {
    display: none;
  }

  .login-main {
    grid-template-columns: 1fr;
    gap: 26px;
    width: 100%;
    padding: 22px 0 34px;
  }

  .login-form-panel {
    order: 1;
    max-width: none;
    padding: 28px 24px;
  }

  .login-showcase-panel {
    order: 2;
  }

  .login-showcase-copy h2 {
    font-size: 30px;
  }

  .login-copyright {
    bottom: auto;
  }
}

@media (max-width: 520px) {
  .login-workspace-body {
    grid-template-columns: 1fr;
  }

  .login-workspace-nav {
    display: none;
  }

  .login-capability-strip span {
    min-height: 54px;
  }
}

/* Login page: restrained product cover with one clear sign-in action. */
.login-screen {
  grid-template-rows: 76px minmax(0, 1fr) 40px;
  padding: 0 clamp(28px, 3.2vw, 72px);
  background: #f5f9fd;
}

.login-screen::before {
  background:
    linear-gradient(rgba(187, 213, 238, 0.17) 1px, transparent 1px),
    linear-gradient(90deg, rgba(187, 213, 238, 0.17) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.72) 52%, transparent 86%);
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.72) 52%, transparent 86%);
}

.login-topbar {
  width: 100%;
  max-width: none;
  border-bottom-color: rgba(184, 209, 233, 0.58);
}

.login-topbar .login-brand {
  gap: 11px;
  font-size: 26px;
}

.login-main {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: none;
  padding: 34px 0;
}

.login-showcase-panel {
  align-items: center;
}

.login-showcase-inner {
  justify-content: center;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.login-showcase-copy {
  margin: 0 0 22px;
}

.login-pill {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #1574cc;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.login-pill::before {
  display: block;
  width: 8px;
  height: 8px;
  background: #18b8ad;
}

.login-showcase-copy h2 {
  max-width: none;
  margin: 18px 0 14px;
  color: #0d2d53;
  font-size: 50px;
  line-height: 1.16;
  white-space: nowrap;
}

.login-showcase-copy h2 span {
  color: #087ce6;
}

.login-showcase-copy p {
  max-width: 560px;
  color: #61748b;
  font-size: 16px;
  line-height: 1.7;
}

.login-feature-pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 680px;
  margin-top: 24px;
  padding: 16px 0 0;
  border-top: 1px solid rgba(180, 207, 232, 0.72);
  background: transparent;
}

.login-feature-pillar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 34px;
  padding: 0 18px;
  border-right: 1px solid rgba(180, 207, 232, 0.64);
}

.login-feature-pillar:first-child {
  padding-left: 14px;
}

.login-feature-pillar:last-child {
  padding-right: 14px;
  border-right: 0;
}

.login-feature-pillar strong {
  overflow: hidden;
  color: #315472;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-feature-icon {
  position: relative;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border: 1px solid #c5def4;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.76);
}

.login-feature-icon.milestone::before {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #1687f8;
  transform: rotate(45deg);
  content: "";
}

.login-feature-icon.health::before {
  position: absolute;
  top: 7px;
  left: 6px;
  width: 13px;
  height: 3px;
  border-radius: 2px;
  background: #1ab4c1;
  box-shadow: 0 5px 0 #20a66f, 0 10px 0 #6f68e9;
  content: "";
}

.login-feature-icon.speed::before {
  position: absolute;
  top: 5px;
  left: 8px;
  width: 11px;
  height: 16px;
  background: #e89b12;
  clip-path: polygon(52% 0, 100% 0, 65% 42%, 100% 42%, 28% 100%, 42% 56%, 0 56%);
  content: "";
}

.login-timeline-visual {
  position: relative;
  width: 100%;
  overflow: hidden;
  border: 1px solid #c9ddef;
  border-top: 3px solid #1687f8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 50px rgba(44, 87, 127, 0.12);
}

.login-timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 18px;
  border-bottom: 1px solid #dce8f3;
}

.login-timeline-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-timeline-head > div:first-child > span {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #1687f8;
  box-shadow: 0 0 0 4px #e6f3ff;
}

.login-timeline-head strong {
  color: #183e65;
  font-size: 13px;
  font-weight: 900;
}

.login-timeline-head small {
  color: #7c8da0;
  font-size: 10px;
  font-weight: 800;
}

.login-timeline-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-timeline-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #3f627f;
  font-size: 10px;
  font-weight: 820;
}

.login-timeline-meta > span > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #20a66f;
  box-shadow: 0 0 0 3px #e3f6ed;
}

.login-timeline-table {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  min-height: 226px;
}

.login-timeline-labels {
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  padding-top: 35px;
  border-right: 1px solid #dce8f3;
  background: rgba(244, 249, 254, 0.82);
}

.login-timeline-labels span {
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-top: 1px solid #e5edf5;
  color: #516a82;
  font-size: 10px;
  font-weight: 830;
}

.login-timeline-chart {
  min-width: 0;
  background:
    linear-gradient(90deg, rgba(203, 219, 234, 0.58) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
}

.login-timeline-weeks {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  height: 35px;
  border-bottom: 1px solid #dce8f3;
  background: #f1f6fb;
}

.login-timeline-weeks span {
  display: grid;
  place-items: center;
  color: #6f8194;
  font-size: 9px;
  font-weight: 850;
}

.login-timeline-rows {
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  height: 191px;
}

.login-timeline-rows > span {
  position: relative;
  display: block;
  border-bottom: 1px solid #e5edf5;
}

.login-timeline-rows .bar {
  position: absolute;
  top: 50%;
  height: 10px;
  border-radius: 3px;
  transform: translateY(-50%);
  animation: login-timeline-reveal 720ms ease-out both;
  transform-origin: left center;
}

.login-timeline-rows > span:nth-child(1) .bar { left: 5%; width: 25%; }
.login-timeline-rows > span:nth-child(2) .bar { left: 18%; width: 35%; animation-delay: 80ms; }
.login-timeline-rows > span:nth-child(3) .bar { left: 39%; width: 31%; animation-delay: 160ms; }
.login-timeline-rows > span:nth-child(4) .bar { left: 58%; width: 29%; animation-delay: 240ms; }
.login-timeline-rows > span:nth-child(5) .bar { left: 76%; width: 20%; animation-delay: 320ms; }

.login-timeline-rows .bar-blue { background: #1687f8; }
.login-timeline-rows .bar-cyan { background: #1ab4c1; }
.login-timeline-rows .bar-green { background: #20a66f; }
.login-timeline-rows .bar-violet { background: #6f68e9; }
.login-timeline-rows .bar-amber { background: #e89b12; }

.login-timeline-rows b {
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  background: #f0a213;
  transform: translateY(-50%) rotate(45deg);
}

.login-timeline-rows > span:nth-child(3) b { left: 72%; }
.login-timeline-rows > span:nth-child(5) b { left: 97%; }

@keyframes login-timeline-reveal {
  from { transform: translateY(-50%) scaleX(0); }
}

.login-form-panel {
  justify-self: center;
  width: min(100%, 380px);
  max-width: 380px;
  padding: 40px 34px 34px;
  border: 1px solid #cbdfee;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 64px rgba(30, 71, 109, 0.14);
}

.login-form-panel::before {
  display: none;
}

.login-form-copy {
  margin: 0 0 30px;
  text-align: left;
}

.login-form-copy h1 {
  margin: 0 0 9px;
  font-size: 31px;
}

.login-form-copy p {
  color: #6b7b8e;
  font-size: 13px;
}

.login-form {
  gap: 17px;
}

.login-form > label {
  gap: 7px;
  color: #4f647b;
  font-size: 12px;
}

.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"] {
  height: 48px;
  border-color: #cadceb;
  background: #fff;
}

.login-submit-btn {
  height: 50px;
  margin-top: 3px;
  box-shadow: 0 12px 24px rgba(0, 111, 232, 0.2);
}

.login-demo-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #7b8c9e;
  font-size: 11px;
  font-weight: 700;
}

.login-demo-mode > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #28b879;
}

.login-copyright {
  color: #8a9aac;
  font-size: 11px;
}

@media (max-height: 760px) and (min-width: 761px) {
  .login-screen {
    grid-template-rows: 64px minmax(0, 1fr) 32px;
  }

  .login-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 20px 0;
  }

  .login-showcase-copy {
    margin-bottom: 20px;
  }

  .login-showcase-copy h2 {
    margin-top: 12px;
    font-size: 39px;
  }

  .login-feature-pillars {
    margin-top: 16px;
  }

  .login-feature-pillar {
    min-height: 44px;
    padding: 0 12px;
  }

  .login-timeline-table {
    min-height: 190px;
  }

  .login-timeline-rows {
    height: 155px;
  }

  .login-form-panel {
    width: 100%;
    padding: 32px 30px 28px;
  }
}

@media (max-width: 980px) and (min-width: 761px) {
  .login-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px;
  }

  .login-showcase-copy h2 {
    font-size: 39px;
  }

  .login-timeline-table {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .login-form-panel {
    width: 100%;
    padding-right: 28px;
    padding-left: 28px;
  }
}

@media (max-width: 1120px) and (min-width: 761px) {
  .login-feature-pillar {
    gap: 6px;
    padding: 0 8px;
  }

  .login-feature-icon {
    flex-basis: 22px;
    width: 22px;
    height: 22px;
  }

  .login-feature-icon.milestone::before {
    top: 7px;
    left: 7px;
    width: 7px;
    height: 7px;
  }

  .login-feature-icon.health::before {
    top: 5px;
    left: 5px;
    width: 11px;
  }

  .login-feature-icon.speed::before {
    top: 4px;
    left: 7px;
    width: 9px;
    height: 14px;
  }

  .login-feature-pillar strong {
    font-size: 12px;
  }
}

/* Centered login entry */
body.login-active {
  min-width: 0;
  overflow: hidden;
  background: #f4f9fe;
}

.login-active .login-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  min-width: 0;
  min-height: 100dvh;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: #f4f9fe;
  background-image:
    linear-gradient(rgba(51, 124, 190, 0.052) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 124, 190, 0.052) 1px, transparent 1px);
  background-size: 34px 34px;
  isolation: isolate;
}

.login-active .login-screen::before,
.login-active .login-screen::after {
  content: "";
  position: absolute;
  z-index: -2;
  width: clamp(220px, 25vw, 480px);
  height: clamp(220px, 25vw, 480px);
  pointer-events: none;
  filter: blur(52px);
  opacity: 0.72;
}

.login-active .login-screen::before {
  top: -13%;
  left: -9%;
  background: rgba(39, 103, 224, 0.84);
  clip-path: polygon(0 0, 100% 0, 68% 78%, 0 100%);
}

.login-active .login-screen::after {
  right: -10%;
  bottom: -16%;
  background: rgba(36, 92, 218, 0.82);
  clip-path: polygon(34% 22%, 100% 0, 100% 100%, 0 100%);
}

.login-active .login-geometry {
  position: absolute;
  z-index: -1;
  width: 360px;
  height: 320px;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    repeating-linear-gradient(30deg, rgba(46, 118, 181, 0.35) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(150deg, rgba(46, 118, 181, 0.28) 0 1px, transparent 1px 34px);
  mask-image: linear-gradient(90deg, transparent, #000 28%, #000 72%, transparent);
}

.login-active .login-geometry-left {
  top: 42%;
  left: 16%;
  transform: rotate(2deg);
}

.login-active .login-geometry-right {
  top: 22%;
  right: 15%;
  transform: rotate(-4deg);
}

.login-active .login-main {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  place-items: center;
  gap: 0;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 38px 20px 24px;
}

.login-active .login-form-panel {
  position: relative;
  display: block;
  width: min(386px, calc(100vw - 32px));
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 30px 30px 26px;
  overflow: visible;
  border: 1px solid rgba(126, 166, 202, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.83);
  box-shadow:
    0 28px 58px rgba(31, 67, 104, 0.20),
    0 8px 20px rgba(31, 67, 104, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px) saturate(1.08);
  animation: login-card-enter 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-active .login-form-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: #1889ed;
  opacity: 0.76;
}

.login-card-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
}

.login-card-brand .home-logo-mark {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: 0 9px 18px rgba(0, 122, 255, 0.20);
}

.login-card-brand strong {
  color: #10233e;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.login-card-title {
  margin: 15px 0 0;
  color: #1c344f;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  letter-spacing: 0;
}

.login-card-subtitle {
  margin: 3px 0 0;
  color: #6e8091;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
}

.login-active .login-form {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-top: 22px;
}

.login-active .login-field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 0;
}

.login-active .login-registration-field[hidden] {
  display: none;
}

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

.login-field-icon {
  position: absolute;
  left: 13px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: #6b7c8c;
  font-size: 15px;
  font-style: normal;
  line-height: 1;
  pointer-events: none;
}

.login-field-icon.password::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 5px;
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.login-field-icon.password::after {
  content: "";
  position: absolute;
  bottom: 1px;
  left: 3px;
  width: 12px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.72);
}

.login-field-icon.display-name::before {
  position: absolute;
  top: 1px;
  left: 6px;
  width: 7px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  content: "";
}

.login-field-icon.display-name::after {
  position: absolute;
  bottom: 1px;
  left: 3px;
  width: 12px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-radius: 8px 8px 3px 3px;
  content: "";
}

.login-active .login-form input[type="email"],
.login-active .login-form input[type="password"],
.login-active .login-form input[type="text"] {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 42px;
  border: 1px solid #cbd9e7;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.91);
  color: #20364c;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(28, 52, 79, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.login-active .login-form input::placeholder {
  overflow: hidden;
  color: #9aa9b7;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-active .login-form input:focus {
  border-color: #1889ed;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(24, 137, 237, 0.14);
}

.login-password-toggle {
  position: absolute;
  right: 7px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #738699;
  cursor: pointer;
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
  background: #edf6ff;
  color: #0877da;
  outline: none;
}

.login-password-toggle > span {
  position: relative;
  width: 15px;
  height: 9px;
  border: 1.5px solid currentColor;
  border-radius: 50% / 58%;
}

.login-password-toggle > span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.login-password-toggle[aria-pressed="true"] > span::before {
  content: "";
  position: absolute;
  top: 3px;
  left: -2px;
  width: 19px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(-35deg);
}

.login-active .login-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 24px;
  margin: 0;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #627487;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.login-remember input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #1889ed;
}

.login-text-button,
.login-trial button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #567084;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.login-text-button:hover,
.login-text-button:focus-visible,
.login-trial button:hover,
.login-trial button:focus-visible {
  color: #0877da;
  outline: none;
}

.login-active .login-submit-btn {
  width: 100%;
  height: 44px;
  margin-top: 3px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(100deg, #42b5ed 0%, #2257d5 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: 0 10px 20px rgba(29, 92, 201, 0.24);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.login-active .login-submit-btn:hover {
  transform: translateY(-1px);
  filter: saturate(1.05);
  box-shadow: 0 13px 24px rgba(29, 92, 201, 0.29);
}

.login-active .login-submit-btn:active {
  transform: translateY(0);
}

.login-active .login-submit-btn:disabled {
  transform: none;
  filter: saturate(0.55);
  box-shadow: none;
  cursor: wait;
  opacity: 0.72;
}

.login-trial {
  margin: 2px 0 0;
  color: #78899a;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.login-trial button {
  margin-left: 4px;
  color: #46647e;
}

.login-active .login-demo-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 18px;
  margin: 0;
  color: #8090a0;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.login-active .login-demo-mode > span {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #20b878;
  box-shadow: 0 0 0 4px rgba(32, 184, 120, 0.09);
}

.login-active .login-demo-mode[data-state="error"] {
  color: #b42342;
}

.login-active .login-demo-mode[data-state="error"] > span {
  background: #e03e5f;
  box-shadow: 0 0 0 4px rgba(224, 62, 95, 0.09);
}

.login-active .login-demo-mode[data-state="busy"] > span {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.login-active .login-copyright {
  position: relative;
  z-index: 2;
  inset: auto;
  margin: 0;
  padding: 0 20px 18px;
  color: #5e6f80;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  transform: none;
}

@keyframes login-card-enter {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
  .login-active .login-main {
    padding: 24px 16px 18px;
  }

  .login-active .login-form-panel {
    width: min(386px, calc(100vw - 32px));
    padding: 28px 22px 24px;
  }

  .login-active .login-geometry {
    width: 260px;
    height: 240px;
    opacity: 0.15;
  }

  .login-active .login-geometry-left {
    left: -28%;
  }

  .login-active .login-geometry-right {
    right: -28%;
  }
}

@media (max-height: 620px) {
  .login-active .login-main {
    padding-top: 18px;
    padding-bottom: 12px;
  }

  .login-active .login-form-panel {
    padding-top: 22px;
    padding-bottom: 20px;
  }

  .login-card-title {
    margin-top: 10px;
  }

  .login-active .login-form {
    gap: 8px;
    margin-top: 15px;
  }

  .login-active .login-copyright {
    padding-bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-active .login-form-panel {
    animation: none;
  }
}

/* Login product demo: a deterministic, browser-rendered delivery loop. */
.login-delivery-demo {
  --demo-blue: #2b9dff;
  --demo-cyan: #25c7c4;
  --demo-green: #2ac58a;
  --demo-violet: #8a76ff;
  --demo-amber: #ffb126;
  position: relative;
  width: 100%;
  min-height: 302px;
  overflow: hidden;
  border: 1px solid rgba(116, 152, 184, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(rgba(128, 159, 188, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 159, 188, 0.09) 1px, transparent 1px),
    #1a2330;
  background-size: 32px 32px;
  box-shadow: 0 24px 58px rgba(24, 49, 74, 0.2);
  color: #f4f8fc;
  isolation: isolate;
}

.login-delivery-demo::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, rgba(43, 157, 255, 0.12), transparent 38%, rgba(37, 199, 196, 0.08) 75%, transparent);
  content: "";
}

.login-demo-head,
.login-demo-foot {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: rgba(16, 25, 37, 0.72);
  backdrop-filter: blur(10px);
}

.login-demo-head {
  min-height: 58px;
  border-bottom: 1px solid rgba(144, 176, 205, 0.2);
}

.login-demo-project {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.login-demo-live-dot,
.login-demo-activity-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--demo-cyan);
  box-shadow: 0 0 0 5px rgba(37, 199, 196, 0.12), 0 0 16px rgba(37, 199, 196, 0.52);
}

.login-demo-project > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.login-demo-project strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-demo-project small {
  color: #8397aa;
  font-size: 9px;
  font-weight: 750;
}

.login-demo-scene-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #b6c6d5;
  font-size: 10px;
  font-weight: 780;
}

.login-demo-scene-status > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-demo-scene-status > b {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 24px;
  border: 1px solid rgba(99, 177, 255, 0.35);
  border-radius: 5px;
  background: rgba(43, 157, 255, 0.1);
  color: #75beff;
  font-size: 9px;
}

.login-demo-body {
  position: relative;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 208px;
}

.login-demo-task-labels {
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  padding-top: 34px;
  border-right: 1px solid rgba(144, 176, 205, 0.18);
  background: rgba(14, 23, 34, 0.45);
}

.login-demo-task-labels > span {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 8px;
  padding: 0 14px;
  border-top: 1px solid rgba(144, 176, 205, 0.12);
}

.login-demo-task-labels i {
  grid-row: 1 / 3;
  align-self: center;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
}

.login-demo-task-labels i.blue { background: var(--demo-blue); color: var(--demo-blue); }
.login-demo-task-labels i.cyan { background: var(--demo-cyan); color: var(--demo-cyan); }
.login-demo-task-labels i.green { background: var(--demo-green); color: var(--demo-green); }
.login-demo-task-labels i.violet { background: var(--demo-violet); color: var(--demo-violet); }
.login-demo-task-labels i.amber { background: var(--demo-amber); color: var(--demo-amber); }

.login-demo-task-labels strong {
  overflow: hidden;
  color: #d8e4ef;
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-demo-task-labels small {
  margin-top: 2px;
  color: #6f8498;
  font-size: 8px;
  font-weight: 700;
}

.login-demo-chart {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.login-demo-weeks {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  height: 34px;
  border-bottom: 1px solid rgba(144, 176, 205, 0.18);
  background: rgba(31, 45, 60, 0.82);
}

.login-demo-weeks span {
  display: grid;
  place-items: center;
  border-left: 1px solid rgba(144, 176, 205, 0.12);
  color: #91a5b8;
  font-size: 9px;
  font-weight: 820;
}

.login-demo-grid {
  position: relative;
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  height: 174px;
  background: linear-gradient(90deg, rgba(144, 176, 205, 0.13) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
}

.login-demo-row {
  position: relative;
  border-bottom: 1px solid rgba(144, 176, 205, 0.12);
}

.login-demo-bar {
  position: absolute;
  top: 50%;
  height: 10px;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 0 16px color-mix(in srgb, currentColor 34%, transparent);
  transform: translateY(-50%);
  transform-origin: left center;
  transition: transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 500ms ease;
}

.login-demo-bar::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.48), transparent);
  transform: translateX(-120%);
  content: "";
}

.row-blue .login-demo-bar { left: 5%; width: 24%; background: linear-gradient(90deg, #1689ff, var(--demo-blue)); color: var(--demo-blue); }
.row-cyan .login-demo-bar { left: 18%; width: 37%; background: linear-gradient(90deg, #12aeb8, var(--demo-cyan)); color: var(--demo-cyan); }
.row-green .login-demo-bar { left: 39%; width: 31%; background: linear-gradient(90deg, #18aa72, var(--demo-green)); color: var(--demo-green); }
.row-violet .login-demo-bar { left: 55%; width: 29%; background: linear-gradient(90deg, #7663f5, var(--demo-violet)); color: var(--demo-violet); }
.row-amber .login-demo-bar { left: 74%; width: 19%; background: linear-gradient(90deg, #e9990c, var(--demo-amber)); color: var(--demo-amber); }

.login-demo-milestone {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--demo-amber);
  box-shadow: 0 0 0 4px rgba(255, 177, 38, 0.1), 0 0 18px rgba(255, 177, 38, 0.42);
  transform: translateY(-50%) rotate(45deg);
  transition: background 300ms ease, box-shadow 300ms ease;
}

.row-green .login-demo-milestone { left: 72%; }
.row-amber .login-demo-milestone { left: 95%; }

.login-demo-alert,
.login-demo-drag-label {
  position: absolute;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 5px;
  opacity: 0;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
  pointer-events: none;
}

.login-demo-alert {
  top: -17px;
  left: calc(72% + 18px);
  border: 1px solid rgba(255, 115, 92, 0.62);
  background: #f04f46;
  box-shadow: 0 10px 24px rgba(240, 79, 70, 0.28);
  color: #fff;
  transform: translateY(5px) scale(0.94);
}

.login-demo-alert::before {
  margin-right: 5px;
  content: "!";
}

.login-demo-drag-label {
  top: -17px;
  left: 67%;
  border: 1px solid rgba(105, 186, 255, 0.5);
  background: #246fae;
  color: #fff;
  transform: translateY(5px);
}

.login-demo-now-line {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  left: 8%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(74, 181, 255, 0.82) 15%, rgba(74, 181, 255, 0.82) 85%, transparent);
  box-shadow: 0 0 10px rgba(74, 181, 255, 0.56);
  opacity: 0;
}

.login-demo-cursor {
  position: absolute;
  z-index: 12;
  top: 137px;
  left: 67%;
  width: 19px;
  height: 24px;
  opacity: 0;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.login-demo-cursor::before {
  position: absolute;
  inset: 0;
  background: #f8fbff;
  clip-path: polygon(0 0, 0 88%, 24% 68%, 38% 100%, 54% 92%, 39% 63%, 72% 62%);
  content: "";
}

.login-demo-cursor i {
  position: absolute;
  right: -15px;
  bottom: -8px;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(112, 194, 255, 0.82);
  border-radius: 50%;
  opacity: 0;
}

.login-demo-health {
  position: absolute;
  z-index: 15;
  top: 16px;
  right: 16px;
  width: 250px;
  padding: 13px 14px 12px;
  border: 1px solid rgba(122, 172, 216, 0.36);
  border-radius: 7px;
  background: rgba(20, 32, 46, 0.94);
  box-shadow: 0 18px 42px rgba(4, 11, 19, 0.42);
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  transition: opacity 350ms ease, transform 450ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}

.login-demo-health-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.login-demo-health-head strong {
  font-size: 11px;
  font-weight: 850;
}

.login-demo-health-head span {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 4px;
  background: rgba(37, 199, 196, 0.12);
  color: #58ddd8;
  font-size: 8px;
  font-weight: 800;
}

.login-demo-health-gauges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.login-demo-gauge {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--demo-blue);
}

.login-demo-gauge.risk { color: var(--demo-green); }
.login-demo-gauge.quality { color: var(--demo-violet); }
.login-demo-gauge.risk.attention { color: var(--demo-amber); }

.login-demo-gauge > span {
  position: relative;
  display: grid;
  place-items: center;
  width: 51px;
  height: 51px;
  border-radius: 50%;
  background: conic-gradient(currentColor calc(var(--score) * 1%), rgba(132, 158, 184, 0.15) 0);
  transition: color 500ms ease;
}

.login-demo-gauge > span::before {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #192637;
  content: "";
}

.login-demo-gauge > span > b,
.login-demo-gauge > span > small {
  position: relative;
  z-index: 1;
  color: #f7fbff;
}

.login-demo-gauge > span > b {
  margin-left: -4px;
  font-size: 13px;
  font-weight: 900;
}

.login-demo-gauge > span > small {
  position: absolute;
  top: 20px;
  right: 9px;
  font-size: 7px;
  font-weight: 800;
}

.login-demo-gauge > em {
  color: #8ca1b5;
  font-size: 8px;
  font-style: normal;
  font-weight: 780;
}

.login-demo-foot {
  min-height: 36px;
  border-top: 1px solid rgba(144, 176, 205, 0.18);
}

.login-demo-foot > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.login-demo-activity-dot {
  width: 6px;
  height: 6px;
  box-shadow: 0 0 0 4px rgba(37, 199, 196, 0.1), 0 0 12px rgba(37, 199, 196, 0.48);
}

.login-demo-foot strong {
  overflow: hidden;
  color: #9eb0c1;
  font-size: 9px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-demo-scene-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.login-demo-scene-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #526476;
  transition: width 300ms ease, background 300ms ease;
}

.login-demo-scene-dots i.active {
  width: 15px;
  border-radius: 3px;
  background: var(--demo-blue);
}

.login-delivery-demo[data-scene="flow"] .login-demo-now-line {
  animation: login-demo-now-flow 5.6s linear both;
}

.login-delivery-demo[data-scene="flow"] .login-demo-bar {
  animation: login-demo-bar-grow 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.login-delivery-demo[data-scene="flow"] .login-demo-row:nth-child(3) .login-demo-bar { animation-delay: 120ms; }
.login-delivery-demo[data-scene="flow"] .login-demo-row:nth-child(4) .login-demo-bar { animation-delay: 240ms; }
.login-delivery-demo[data-scene="flow"] .login-demo-row:nth-child(5) .login-demo-bar { animation-delay: 360ms; }
.login-delivery-demo[data-scene="flow"] .login-demo-row:nth-child(6) .login-demo-bar { animation-delay: 480ms; }

.login-delivery-demo[data-scene="flow"] .login-demo-bar::after {
  animation: login-demo-bar-shine 2.6s ease-in-out 700ms infinite;
}

.login-delivery-demo[data-scene="alert"] .row-green .login-demo-milestone {
  background: #ff5a52;
  box-shadow: 0 0 0 5px rgba(255, 90, 82, 0.13), 0 0 22px rgba(255, 90, 82, 0.7);
  animation: login-demo-alert-pulse 900ms ease-in-out infinite;
}

.login-delivery-demo[data-scene="alert"] .login-demo-alert {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: login-demo-bubble-in 420ms cubic-bezier(0.2, 0.9, 0.2, 1.2) both;
}

.login-delivery-demo[data-scene="alert"] .login-demo-activity-dot,
.login-delivery-demo[data-scene="health"] .login-demo-activity-dot {
  background: #ff8b36;
  box-shadow: 0 0 0 4px rgba(255, 139, 54, 0.12), 0 0 14px rgba(255, 139, 54, 0.52);
}

.login-delivery-demo[data-scene="health"] .login-demo-health {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.login-delivery-demo[data-scene="health"] .login-demo-gauge > span {
  animation: login-demo-gauge-enter 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.login-delivery-demo[data-scene="health"] .login-demo-gauge:nth-child(2) > span { animation-delay: 100ms; }
.login-delivery-demo[data-scene="health"] .login-demo-gauge:nth-child(3) > span { animation-delay: 200ms; }

.login-delivery-demo[data-scene="drag"] .login-demo-cursor {
  opacity: 1;
  animation: login-demo-cursor-drag 5.3s ease-in-out both;
}

.login-delivery-demo[data-scene="drag"] .login-demo-cursor i {
  animation: login-demo-cursor-click 5.3s ease-in-out both;
}

.login-delivery-demo[data-scene="drag"] .login-demo-drag-target {
  transform: translate(42px, -50%);
  filter: brightness(1.16);
}

.login-delivery-demo[data-scene="drag"] .login-demo-drag-label {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 250ms ease 1.15s, transform 350ms ease 1.15s;
}

@keyframes login-demo-now-flow {
  0% { left: 8%; opacity: 0; }
  8% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: 86%; opacity: 0; }
}

@keyframes login-demo-bar-grow {
  0% { transform: translateY(-50%) scaleX(0.45); filter: brightness(0.72); }
  100% { transform: translateY(-50%) scaleX(1); filter: brightness(1); }
}

@keyframes login-demo-bar-shine {
  0%, 48% { transform: translateX(-120%); }
  75%, 100% { transform: translateX(120%); }
}

@keyframes login-demo-alert-pulse {
  0%, 100% { transform: translateY(-50%) rotate(45deg) scale(1); }
  50% { transform: translateY(-50%) rotate(45deg) scale(1.28); }
}

@keyframes login-demo-bubble-in {
  from { opacity: 0; transform: translateY(6px) scale(0.9); }
}

@keyframes login-demo-gauge-enter {
  from { opacity: 0; transform: scale(0.72) rotate(-18deg); }
}

@keyframes login-demo-cursor-drag {
  0%, 12% { left: 43%; top: 137px; opacity: 0; }
  22% { left: 55%; top: 128px; opacity: 1; }
  42% { left: 63%; top: 137px; opacity: 1; }
  68% { left: calc(63% + 42px); top: 137px; opacity: 1; }
  88% { left: calc(63% + 42px); top: 137px; opacity: 1; }
  100% { left: calc(63% + 42px); top: 137px; opacity: 0; }
}

@keyframes login-demo-cursor-click {
  0%, 34%, 72%, 100% { opacity: 0; transform: scale(0.7); }
  40%, 50% { opacity: 0.8; transform: scale(1); }
}

@media (max-height: 760px) and (min-width: 761px) {
  .login-delivery-demo {
    min-height: 260px;
  }

  .login-demo-head {
    min-height: 50px;
  }

  .login-demo-body {
    min-height: 176px;
  }

  .login-demo-grid {
    height: 142px;
  }

  .login-demo-cursor {
    top: 112px;
  }

  @keyframes login-demo-cursor-drag {
    0%, 12% { left: 43%; top: 112px; opacity: 0; }
    22% { left: 55%; top: 103px; opacity: 1; }
    42% { left: 63%; top: 112px; opacity: 1; }
    68%, 88% { left: calc(63% + 42px); top: 112px; opacity: 1; }
    100% { left: calc(63% + 42px); top: 112px; opacity: 0; }
  }
}

@media (max-width: 980px) and (min-width: 761px) {
  .login-demo-body {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .login-demo-task-labels > span {
    padding: 0 10px;
  }

  .login-demo-health {
    right: 10px;
    width: 220px;
  }
}

@media (max-width: 760px) {
  .login-delivery-demo {
    max-width: 680px;
    margin: 0 auto;
  }
}

@media (max-width: 520px) {
  .login-demo-head,
  .login-demo-foot {
    padding-right: 12px;
    padding-left: 12px;
  }

  .login-demo-body {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .login-demo-task-labels > span {
    grid-template-columns: 7px minmax(0, 1fr);
    column-gap: 6px;
    padding: 0 8px;
  }

  .login-demo-task-labels small {
    display: none;
  }

  .login-demo-health {
    right: 8px;
    width: 210px;
  }

  .login-demo-alert {
    left: 54%;
  }

  .login-demo-scene-status > span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-delivery-demo *,
  .login-delivery-demo *::before,
  .login-delivery-demo *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 760px) {
  .login-screen {
    grid-template-rows: 64px auto 36px;
    padding: 0 16px;
  }

  .login-screen::before {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .login-main {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 28px 0 40px;
  }

  .login-form-panel {
    order: 1;
    width: min(100%, 390px);
    margin: 0 auto;
  }

  .login-showcase-panel {
    order: 2;
  }

  .login-showcase-copy {
    text-align: center;
  }

  .login-pill {
    justify-content: center;
  }

  .login-showcase-copy h2 {
    font-size: 34px;
    white-space: normal;
  }

  .login-showcase-copy p {
    margin: 0 auto;
    font-size: 14px;
  }

  .login-feature-pillars {
    max-width: 540px;
    margin: 20px auto 0;
  }

  .login-feature-pillar {
    justify-content: center;
    min-height: 50px;
    padding: 0 8px;
  }

  .login-feature-pillar:first-child {
    padding-left: 0;
  }

  .login-feature-pillar:last-child {
    padding-right: 0;
  }

  .login-feature-pillar strong {
    font-size: 11px;
  }
}

@media (max-width: 520px) {
  .login-timeline-table {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .login-timeline-labels span {
    padding: 0 10px;
    font-size: 9px;
  }

  .login-form-panel {
    padding: 30px 24px 26px;
  }

  .login-feature-pillars {
    grid-template-columns: 1fr;
    border-bottom: 0;
  }

  .login-feature-pillar,
  .login-feature-pillar:first-child,
  .login-feature-pillar:last-child {
    justify-content: flex-start;
    min-height: 42px;
    padding: 0 4px;
    border-right: 0;
    border-bottom: 1px solid rgba(180, 207, 232, 0.64);
  }

  .login-feature-pillar strong {
    font-size: 12px;
  }
}
