@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/Manrope-variable.ttf") format("truetype");
}
:root {
  --bg: #f5f6f8;
  --ink: #202b3e;
  --muted: #7b8494;
  --line: #e8ebf0;
  --blue: #4a62e8;
  --green: #279773;
  --red: #d67b80;
  --orange: #b9862d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    16px Manrope,
    "Segoe UI",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: var(--blue);
  text-decoration: none;
}
aside {
  position: fixed;
  width: 246px;
  inset: 0 auto 0 0;
  background: white;
  border-right: 1px solid var(--line);
  padding: 34px 22px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  font-size: 25px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -1px;
}
.brand-icon {
  display: grid;
  place-items: center;
  background: var(--blue);
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 23px;
  margin-right: 9px;
}
.brand-dot {
  color: var(--blue);
}
.workspace {
  font-size: 13px;
  letter-spacing: 1.2px;
  margin: 38px 10px 25px;
  color: #636f83;
  font-weight: 800;
}
.workspace small {
  display: block;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 500;
  margin-top: 9px;
  color: #666b73;
}
nav {
  display: grid;
  gap: 8px;
}
nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: transparent;
  border: 0;
  color: #616c7c;
  text-align: left;
  padding: 13px 12px;
  border-radius: 9px;
  font-size: 17px;
}
nav button span {
  font-size: 13px;
  font-weight: 700;
}
nav button.active {
  background: #edf0ff;
  color: var(--blue);
}
.side-note {
  margin-top: auto;
  padding: 25px 15px 0;
  overflow: hidden;
}
.side-note > span {
  color: var(--blue);
  font-size: 26px;
}
.side-note b {
  display: block;
  margin-top: 12px;
  font-size: 13px;
}
.side-note p {
  font-size: 13px;
  color: #646b77;
  line-height: 1.8;
}
.orbit {
  height: 120px;
  position: relative;
  display: grid;
  place-items: center;
  color: #646984;
  font-size: 70px;
  transform: rotate(-17deg);
}
.orbit:before,
.orbit:after {
  content: "";
  position: absolute;
  width: 150px;
  height: 65px;
  border: 1px solid #dbe0f8;
  border-radius: 50%;
  transform: rotate(35deg);
}
.orbit:after {
  transform: rotate(-35deg);
}
.orbit span {
  position: absolute;
  font-size: 30px;
  right: 5px;
  top: 12px;
  color: var(--blue);
}
.profile {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}
.avatar {
  display: inline-grid;
  place-items: center;
  background: #e9edfb;
  color: #5967a7;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.profile small {
  display: block;
  color: #666b73;
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
}
.main {
  margin-left: 246px;
}
header {
  height: 77px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  font-size: 13px;
  color: #666c75;
}
header i {
  margin: 0 14px;
  font-style: normal;
  color: #686b6f;
}
header b {
  font-weight: 600;
  color: #636c80;
}
.header-right {
  display: flex;
  gap: 8px;
  align-items: center;
}
.demo-dot {
  width: 6px;
  height: 6px;
  background: #a7b0c4;
  border-radius: 50%;
}
select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #586377;
  padding: 9px 12px;
  font-size: 13px;
}
.header-right select {
  margin-left: 15px;
}
main {
  max-width: 1600px;
  margin: auto;
  padding: 33px 38px 25px;
}
.eyebrow {
  font-size: 13px;
  letter-spacing: 1.4px;
  color: var(--blue);
  font-weight: 800;
  margin-bottom: 9px;
}
.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 15px;
}
h1 {
  font-size: 29px;
  letter-spacing: -1px;
  margin: 0 0 8px;
  font-weight: 800;
}
p.subtitle {
  color: #666c77;
  font-size: 13px;
  margin: 0;
  line-height: 1.7;
}
.primary {
  border: 0;
  background: var(--blue);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 8px #4a62e81a;
}
.secondary {
  border: 1px solid var(--line);
  background: white;
  color: #626c80;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-bottom: 25px;
}
.stat {
  padding: 20px 20px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.stat-label {
  font-size: 13px;
  color: #646c7a;
  display: flex;
  justify-content: space-between;
}
.stat-label span {
  color: #666c77;
}
.stat strong {
  display: block;
  font-size: 28px;
  margin: 10px 0 5px;
  letter-spacing: -1px;
}
.stat small {
  font-size: 13px;
  color: #666b74;
}
.stat small.good {
  color: var(--green);
}
.stat small.warn {
  color: var(--orange);
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 22px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.card-head {
  padding: 22px 22px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.card-head h2,
h2 {
  font-size: 15px;
  margin: 0;
}
.count {
  font-size: 13px;
  background: #f0f2f7;
  border-radius: 5px;
  padding: 3px 7px;
  color: #656b78;
  margin-left: 8px;
}
.filters {
  display: flex;
  gap: 8px;
  padding: 0 22px 18px;
  align-items: center;
  flex-wrap: wrap;
}
.search {
  flex: 1;
  min-width: 160px;
  position: relative;
}
.search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 13px;
  outline-color: var(--blue);
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  min-width: 640px;
}
th {
  background: #fafbfc;
  color: #666c75;
  font-size: 13px;
  font-weight: 600;
  padding: 13px 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
th:first-child,
td:first-child {
  padding-left: 22px;
}
td {
  padding: 21px 12px;
  border-bottom: 1px solid #f0f2f5;
}
tr:last-child td {
  border-bottom: 0;
}
.project-name {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  max-width: 210px;
  line-height: 1.6;
}
.project-name:hover {
  color: var(--blue);
}
.subtext {
  font-size: 13px;
  color: #656c78;
  margin-top: 5px;
}
.tag {
  display: inline-block;
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 13px;
  white-space: nowrap;
}
.tag.blue {
  background: #eef1ff;
  color: #5f68a2;
}
.tag.purple {
  background: #f2edfc;
  color: #776393;
}
.tag.amber {
  background: #fcf5e7;
  color: #7d683b;
}
.tag.green {
  background: #eaf6f0;
  color: var(--green);
}
.progress-line {
  height: 4px;
  background: #edf0f5;
  width: 90px;
  margin-top: 7px;
  border-radius: 9px;
  overflow: hidden;
}
.progress-line span {
  display: block;
  background: var(--blue);
  height: 100%;
}
.step-dots {
  display: flex;
  gap: 5px;
  white-space: nowrap;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  background: #f0d6d8;
  border: 1px solid #e4b7bb;
}
.dot.s1 {
  background: #b6c3f5;
  border-color: #94a7ec;
}
.dot.s2 {
  background: #f5dba2;
  border-color: #e8c675;
}
.dot.s3 {
  background: #64b89c;
  border-color: #52ab8e;
}
.legend {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 13px;
  padding: 15px 22px;
  color: #656c77;
  font-size: 13px;
  flex-wrap: wrap;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.rail {
  display: grid;
  align-content: start;
  gap: 18px;
}
.attention {
  background: #fffaf1;
  border: 1px solid #f3e7ce;
  padding: 20px;
  border-radius: 12px;
}
.attention h2 {
  font-size: 13px;
}
.attention h2 span {
  color: #846732;
  margin-right: 5px;
}
.attention p {
  color: #746b57;
  font-size: 13px;
  line-height: 1.7;
}
.attention button {
  background: white;
  border: 1px solid #eddfc3;
  color: #7d6841;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  width: 100%;
  text-align: left;
}
.rail .card {
  padding: 20px;
}
.activity {
  display: flex;
  gap: 10px;
  padding-top: 20px;
}
.activity .avatar {
  width: 27px;
  height: 27px;
  font-size: 13px;
}
.activity p {
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}
.activity small {
  font-size: 13px;
  color: #676c74;
}
.reference {
  background: #edf1ff !important;
  border-color: #e2e7fb !important;
}
.reference p {
  font-size: 13px;
  color: #636b80;
  line-height: 1.8;
}
.reference a {
  font-size: 13px;
  font-weight: 700;
}
.bottom-note {
  margin-top: 22px;
  padding: 18px 22px;
  border: 1px dashed #dce2ee;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 13px;
  color: #656c79;
  line-height: 1.7;
}
.bottom-note b {
  color: #5b6b90;
}
footer {
  max-width: 1600px;
  margin: auto;
  padding: 0 38px 25px;
  display: flex;
  justify-content: space-between;
  color: #676b73;
  font-size: 13px;
}
.back {
  border: 0;
  background: transparent;
  color: #656c79;
  padding: 0;
  margin: 0 0 20px;
  font-size: 13px;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
}
.stage {
  border-bottom: 1px solid var(--line);
  padding: 18px 22px;
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
.stage:last-child {
  border: 0;
}
.stage-num {
  height: 25px;
  width: 25px;
  display: grid;
  place-items: center;
  background: #f1f3f8;
  border-radius: 50%;
  font-size: 13px;
  flex-shrink: 0;
}
.stage-content {
  flex: 1;
}
.stage h3 {
  font-size: 13px;
  margin: 0 0 5px;
}
.stage p {
  font-size: 13px;
  color: #646b77;
  line-height: 1.7;
  margin: 0 0 10px;
}
.stage-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.stage-actions label {
  font-size: 13px;
  color: #636c7a;
  display: flex;
  gap: 5px;
  align-items: center;
}
.stage-actions button {
  font-size: 13px;
  padding: 6px 9px;
}
.status-label {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #646b79;
  white-space: nowrap;
}
.editor {
  padding: 22px;
}
label.field {
  display: block;
  font-size: 13px;
  color: #616c7f;
  margin-bottom: 15px;
}
input,
textarea {
  color: var(--ink);
}
.field input,
.field textarea,
.field select {
  display: block;
  width: 100%;
  margin-top: 7px;
  border: 1px solid #dfe4ed;
  border-radius: 7px;
  padding: 11px;
  background: #fff;
  font-size: 13px;
}
.field textarea {
  min-height: 80px;
  resize: vertical;
}
.uploads {
  padding: 0 22px 22px;
}
.dropzone {
  display: block;
  border: 1px dashed #c8d1e7;
  border-radius: 9px;
  text-align: center;
  padding: 22px;
  background: #fafbff;
  cursor: pointer;
  color: #5f6b8c;
  font-size: 13px;
  line-height: 1.8;
}
.dropzone input {
  display: block;
  margin: 12px auto 0;
  max-width: 100%;
  font-size: 13px;
}
.file {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.file small {
  display: block;
  color: #656c77;
  line-height: 1.8;
  margin-top: 5px;
}
.notice {
  font-size: 13px;
  line-height: 1.9;
  background: #f5f7fc;
  padding: 12px;
  border-radius: 8px;
  color: #626d80;
  margin: 15px 0;
}
.check-result {
  font-size: 13px;
  line-height: 1.9;
  margin-top: 12px;
}
.check-result .ok {
  color: var(--green);
}
.check-result .err {
  color: #9a5860;
}
.material-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.material-grid .card {
  padding: 23px;
}
.material-grid h3 {
  font-size: 14px;
  margin-top: 0;
}
.material-grid p,
.material-grid li {
  font-size: 13px;
  color: #636c7b;
  line-height: 1.9;
}
.material-grid a {
  display: block;
  font-size: 13px;
  margin: 12px 0;
}
.empty {
  padding: 35px;
  color: #636b7a;
  text-align: center;
  font-size: 13px;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.team-grid .card {
  padding: 24px;
}
.team-grid h3 {
  font-size: 15px;
}
.team-grid p {
  color: #656c77;
  line-height: 1.8;
  font-size: 13px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 15px;
  max-width: 540px;
  width: calc(100% - 30px);
  padding: 26px;
  color: var(--ink);
  box-shadow: 0 25px 80px #172d5030;
}
dialog::backdrop {
  background: #172c4d50;
}
dialog h2 {
  margin-bottom: 20px;
}
dialog .actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #263751;
  color: white;
  padding: 13px 20px;
  border-radius: 9px;
  display: none;
  font-size: 13px;
  z-index: 10;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}
@media (min-width: 1550px) {
  main {
    padding-top: 45px;
  }
  .card-head {
    padding-top: 27px;
    padding-bottom: 23px;
  }
  td {
    padding-top: 27px;
    padding-bottom: 27px;
  }
}
@media (max-width: 1200px) {
  aside {
    width: 210px;
    padding: 30px 16px;
  }
  .main {
    margin-left: 210px;
  }
  main {
    padding: 28px 24px;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .rail {
    grid-template-columns: repeat(3, 1fr);
  }
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
  .brand {
    font-size: 23px;
  }
  .material-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  aside {
    position: static;
    width: 100%;
    padding: 15px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 22px;
  }
  .workspace,
  .side-note,
  .profile {
    display: none;
  }
  nav {
    display: flex;
    margin-top: 15px;
    gap: 5px;
  }
  nav button {
    width: auto;
    padding: 10px;
    font-size: 13px;
  }
  nav button span {
    font-size: 13px;
  }
  .main {
    margin: 0;
  }
  header {
    height: auto;
    min-height: 62px;
    padding: 12px 18px;
    gap: 10px;
    flex-wrap: wrap;
  }
  header > span {
    display: none;
  }
  main {
    padding: 24px 15px;
  }
  .page-title {
    align-items: flex-start;
  }
  h1 {
    font-size: 24px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .rail,
  .detail-grid,
  .material-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }
  .page-title .primary {
    padding: 11px;
    font-size: 13px;
    white-space: nowrap;
  }
  .card-head {
    padding: 18px;
  }
  .filters {
    padding: 0 18px 15px;
  }
  .bottom-note {
    font-size: 13px;
  }
  footer {
    padding: 10px 15px 22px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .stage {
    padding: 16px 13px;
    flex-wrap: wrap;
  }
  .stage > .status-label {
    margin-left: 38px;
  }
  .header-right select {
    margin-left: 5px;
  }
}
.content-grid > *,
.detail-grid > * {
  min-width: 0;
}

[hidden] {
  display: none !important;
}
.main.signed-out {
  margin-left: 0;
}
.login-card {
  max-width: 510px;
  margin: 50px auto;
  padding: 36px;
}
.login-card form {
  margin-top: 30px;
}
.login-card a {
  font-size: 13px;
}
.header-right {
  flex-wrap: wrap;
}
#sync {
  font-size: 13px;
}
.file a {
  overflow-wrap: anywhere;
}
.notice p {
  margin-bottom: 0;
}
.signed-out header {
  justify-content: flex-end;
}

.recheck {
  color: #8c631c !important;
  background: #fff7df;
  padding: 8px;
  border-radius: 6px;
}
.conflict {
  background: #fff7e9;
  border: 1px solid #ead5ae;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
  font-size: 13px;
}
.conflict pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  background: white;
  padding: 10px;
}
.conflict button {
  margin-bottom: 6px;
}
#save-status {
  max-width: 310px;
  line-height: 1.8;
}
#save-status[data-state="saved"] {
  color: var(--green);
}
#save-status[data-state="conflict"],
#save-status[data-state="offline"] {
  color: #8e641f;
}
#backup-progress:empty {
  display: none;
}

.scope-controls {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 22px;
}
.scope-controls label {
  font-size: 13px;
  color: #656c79;
  display: grid;
  gap: 7px;
  min-width: 160px;
}
.scope-controls select {
  font-size: 13px;
}
.page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
button.stat {
  text-align: left;
  width: 100%;
  font: inherit;
  color: var(--ink);
}
button.stat:hover {
  border-color: #bcc7f9;
}
.selected-stat {
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 1px #4a62e822;
}
.summary-table {
  min-width: 780px;
}
.summary-table td {
  vertical-align: top;
}
.project-alerts {
  display: grid;
  justify-items: start;
  gap: 5px;
  max-width: 280px;
}
.project-alerts .tag {
  white-space: normal;
  line-height: 1.7;
}
.tag.danger {
  background: #fbecef;
  color: #b34d61;
}
.tag.missing {
  background: #fff3e1;
  color: #886529;
}
.issue-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.issue-item:last-of-type {
  border-bottom: 0;
}
.issue-item p {
  font-size: 13px;
  color: #646b77;
  line-height: 1.8;
  margin: 7px 0 0;
}
.rail .secondary {
  margin-top: 12px;
}
.year-section {
  margin: 26px 0;
}
.year-section > h2 {
  font-size: 18px;
  margin-bottom: 16px;
}
.class-card {
  padding: 22px;
}
.class-card h3 {
  margin: 0 0 12px;
}
.class-card p {
  font-size: 13px;
  color: #656c79;
  line-height: 1.9;
}
.unassigned-note {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  .scope-controls label {
    flex: 1;
    min-width: 125px;
  }
  .page-actions {
    justify-content: flex-end;
  }
  .stats small {
    line-height: 1.8;
    display: block;
  }
}

@media (max-width: 760px) {
  nav {
    flex-wrap: wrap;
  }
}
.plan-modal {
  width: min(920px, calc(100vw - 32px));
  max-width: 920px;
}
.plan-modal .card-head {
  align-items: center;
  gap: 14px;
}
.plan-people {
  display: grid;
  gap: 12px;
}
.person-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
.person-row .field {
  margin: 0;
}
.person-row button {
  margin-bottom: 3px;
}
.plan-stage {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  margin: 22px 0;
  background: #fff;
}
.plan-stage h3 {
  margin: 0;
}
.plan-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.plan-order {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.plan-task {
  background: #f7f9fc;
  border-radius: 10px;
  padding: 16px;
  margin: 14px 0;
  border: 1px solid #e9edf5;
}
.plan-modal textarea {
  min-height: 64px;
}
.plan-footer {
  position: sticky;
  bottom: -28px;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 18px 0 8px;
  z-index: 1;
}
.stage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: #656c79;
  font-size: 13px;
  margin: 10px 0 16px;
}
.task-list {
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #fafbfe;
}
.task-item {
  border-top: 1px solid var(--line);
  padding: 12px 0 2px;
  margin-top: 10px;
}
.task-item label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
}
.task-item input {
  margin-top: 2px;
  accent-color: var(--blue);
  flex: 0 0 auto;
}
.task-item small {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  color: #656c79;
  line-height: 1.7;
}
.task-meta {
  font-size: 13px;
  color: #656c79;
  line-height: 1.8;
  margin: 7px 0 0 24px;
}
.task-done label b {
  color: #3d7660;
}
.plan-description {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.stage-content {
  min-width: 0;
}
.stage .err,
.plan-modal .err {
  color: #b34252;
}
.template-modal {
  width: min(900px, calc(100vw - 32px));
  max-width: 900px;
}
.template-modal .actions {
  position: sticky;
  bottom: -26px;
  padding: 16px 0 0;
  background: #fff;
  border-top: 1px solid var(--line);
  margin-top: 18px;
}
.template-edit-stage {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 16px 0;
  background: #fff;
}
.template-edit-stage > summary {
  padding: 16px;
  color: var(--ink);
  font-weight: 600;
}
.template-edit-stage > summary small {
  display: block;
  margin-left: 18px;
  color: #636c7a;
  font-size: 13px;
  font-weight: 400;
}
.template-edit-stage .plan-stage {
  border: 0;
  margin: 0;
  border-top: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
}
.template-edit-stage .plan-order {
  margin-bottom: 14px;
}
.template-editor-modal input[type="number"] {
  width: 100%;
}
.template-modal .err {
  color: #b34252;
  font-size: 13px;
  line-height: 1.8;
}
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 20px;
}
.preset-offer {
  padding: 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
}
.preset-offer h2 {
  font-size: 17px;
  margin: 0 0 8px;
}
.preset-offer p {
  font-size: 13px;
  line-height: 1.8;
  color: #626c7c;
  margin: 0;
  max-width: 620px;
}
.preset-offer button {
  flex-shrink: 0;
}
@media (max-width: 760px) {
  .preset-offer {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
}
.template-card,
.reference-card {
  padding: 24px;
}
.template-card h2,
.reference-card h2 {
  font-size: 18px;
}
.template-card p,
.reference-card p {
  font-size: 13px;
  line-height: 1.9;
  color: #626c7c;
}
.template-card .page-actions {
  margin-top: 20px;
  justify-content: flex-start;
}
.template-outline {
  padding-left: 22px;
  line-height: 1.8;
  font-size: 13px;
}
.template-outline > li {
  margin: 14px 0;
}
.template-outline p {
  white-space: pre-line;
  margin: 5px 0;
}
.template-outline small,
.target-checks small {
  display: block;
  color: #636c7a;
  font-size: 13px;
}
.template-outline ul {
  padding-left: 20px;
}
.template-outline ul li {
  margin: 8px 0;
}
.archive-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0;
  font-size: 13px;
}
.target-checks {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 14px;
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 20px;
}
.target-checks label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  font-size: 13px;
  line-height: 1.7;
  border-bottom: 1px solid var(--line);
}
.target-checks label:last-child {
  border: 0;
}
.target-checks input {
  margin-top: 3px;
}
.template-target {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}
.template-target h3 {
  font-size: 14px;
  margin: 0 0 8px;
}
.template-target p,
.template-target li {
  font-size: 13px;
  line-height: 1.8;
}
.template-target ul {
  padding-left: 20px;
}
details > summary {
  cursor: pointer;
  font-size: 13px;
  line-height: 1.8;
  padding: 9px 0;
  color: var(--blue);
}
.reference-templates {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 15px;
}
.download-template {
  display: inline-block;
  text-decoration: none;
  margin: 8px 0;
  text-align: center;
}
@media (max-width: 760px) {
  .reference-templates {
    grid-template-columns: 1fr;
  }
  .template-modal {
    padding: 18px;
  }
  #route-card > .card-head .page-actions {
    justify-content: flex-start;
  }
}
@media (max-width: 760px) {
  .person-row {
    grid-template-columns: 1fr;
  }
  .plan-modal {
    padding: 18px;
  }
  .plan-stage {
    padding: 14px;
  }
  .plan-stage > .card-head {
    align-items: flex-start;
    flex-direction: column;
  }
  #route-card > .card-head {
    gap: 14px;
    flex-wrap: wrap;
  }
  .stage-content {
    flex: 1 1 calc(100% - 38px);
  }
  .plan-footer {
    bottom: -18px;
  }
}
.next-steps-card {
  margin-bottom: 20px;
}
.next-owner {
  display: grid;
  gap: 5px;
  color: #616c7e;
  font-size: 13px;
  min-width: 145px;
}
.next-owner select {
  max-width: 230px;
  min-height: 36px;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  color: #354462;
}
.next-step-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 0 24px 16px;
  color: #626c7c;
  font-size: 13px;
}
.next-step-list {
  padding: 0 16px 10px;
}
.next-step-row {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto 16px;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 0;
  border-top: 1px solid #edf0f6;
  border-radius: 0;
  padding: 15px 8px;
  color: #354462;
  align-items: center;
}
.next-step-row:hover {
  background: #f7f9ff;
}
.next-step-row:focus-visible {
  outline: 2px solid #5968e8;
  outline-offset: -2px;
}
.next-step-row b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.next-step-row small {
  display: block;
  color: #636b79;
  font-size: 13px;
  line-height: 1.6;
}
.next-step-marker {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b9c4d7;
}
.next-step-marker.late {
  background: #d66676;
}
.next-step-marker.soon {
  background: #d7a24b;
}
.next-step-due {
  text-align: right;
  font-size: 13px;
  white-space: nowrap;
}
.next-step-highlight {
  background: #f1f4ff;
  box-shadow: inset 3px 0 #5968e8;
}
.next-steps-card > p {
  margin: 0 24px 16px;
}
@media (max-width: 600px) {
  .next-steps-card .card-head {
    gap: 12px;
    flex-wrap: wrap;
  }
  .next-owner {
    min-width: 100%;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }
  .next-owner select {
    max-width: 100%;
  }
  .next-step-row {
    gap: 8px;
  }
  .next-step-summary {
    padding-left: 20px;
    font-size: 13px;
  }
}

.folder-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.folder-controls .field {
  flex: 1;
  min-width: 160px;
}
.upload[hidden] {
  display: none;
}

#project-folder > p,
#project-folder > form,
#project-folder > .folder-controls {
  margin: 16px 22px;
}
#project-feedback .notice,
.stage-content > .notice {
  font-size: 13px;
  color: #3e4b63;
}
#project-feedback .notice {
  margin-bottom: 12px;
}

.notification-count {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  align-items: center;
  justify-content: center;
  background: #4f5ce6;
  color: #fff;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}
.notification-count[hidden],
.unread-project[hidden] {
  display: none;
}
.notifications-card {
  padding: 22px;
}
.notifications-toolbar {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}
.notifications-toolbar .field {
  flex: 1;
  min-width: 180px;
}
.notification-item {
  padding: 22px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.notification-unread {
  border-left: 4px solid #5663e8;
  background: #f8f9ff;
}
.notification-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: #606c82;
}
.notification-item h2 {
  font-size: 17px;
  margin: 12px 0 8px;
}
.notification-project,
.notification-actor {
  font-size: 13px;
  color: #57657e;
}
.notification-message {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.notifications-open {
  white-space: nowrap;
}
@media (max-width: 700px) {
  .header-right {
    gap: 7px;
    flex-wrap: wrap;
  }
  .notifications-toolbar {
    align-items: stretch;
  }
  .notification-top {
    flex-wrap: wrap;
  }
  .notification-item {
    padding: 15px;
  }
  .notifications-card {
    padding: 14px;
  }
}

.curator-actions-card,
.deadlines-card {
  margin-top: 20px;
  padding: 22px;
}
.curator-action {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px;
  margin: 12px 0;
}
.curator-action h3 {
  font-size: 15px;
  margin: 10px 0;
}
.curator-action p {
  font-size: 13px;
  line-height: 1.7;
}
.curator-action small {
  color: #5f6c85;
}
.action-done {
  opacity: 0.7;
}
.action-done h3 {
  text-decoration: line-through;
}
.curator-action-create {
  margin-top: 18px;
}
.curator-action-create summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 15px;
}
.actions-filter {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}
.actions-filter > .field {
  flex: 1;
  min-width: 160px;
}
.actions-count {
  font-size: 13px;
}
.deadline-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}
.deadline-table td,
.deadline-table th {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: top;
}
.deadline-table small {
  display: block;
  line-height: 1.7;
  color: #5f6c85;
  margin-top: 5px;
}
.calendar-card,
.calendar-agenda-card,
.calendar-undated {
  padding: 22px;
  margin-top: 20px;
}
.calendar-toolbar,
.calendar-month-controls,
.calendar-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.calendar-toolbar {
  justify-content: space-between;
}
.calendar-month-controls h2 {
  margin: 0 6px;
  min-width: 160px;
}
.calendar-month-controls h2::first-letter {
  text-transform: uppercase;
}
.calendar-month-label {
  width: 160px;
  margin: 0;
}
.calendar-filters {
  margin-top: 20px;
  align-items: end;
}
.calendar-filters > .field {
  flex: 1;
  min-width: 170px;
}
.calendar-filters > label:not(.field) {
  font-size: 13px;
  padding: 12px 0;
}
.calendar-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #5f6c82;
  margin: 20px 0;
}
.calendar-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.calendar-legend i,
.calendar-mobile-dots i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5966e8;
}
.calendar-legend .personal-dot,
.calendar-mobile-dots .personal-dot {
  background: #249a81;
}
.calendar-legend .late-dot,
.calendar-mobile-dots .late-dot {
  background: #c85265;
}
.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.calendar-weekdays span {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #626c7c;
  padding: 12px;
}
.calendar-grid {
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.calendar-day {
  min-height: 115px;
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: white;
  padding: 9px;
  text-align: left;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.calendar-day:hover {
  background: #f4f6ff;
}
.calendar-day-number {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.calendar-day-number small {
  font-size: 13px;
  background: #eceffa;
  border-radius: 10px;
  padding: 2px 5px;
  color: #5b6881;
}
.calendar-today .calendar-day-number {
  color: #4057d7;
}
.calendar-today {
  background: #fafaff;
}
.calendar-selected {
  box-shadow: inset 0 0 0 2px #5966e8;
  background: #f5f6ff;
}
.calendar-outside {
  background: #fafbfc;
  color: #666c77;
}
.calendar-outside .calendar-day-items {
  opacity: 0.6;
}
.calendar-day-items {
  display: grid;
  gap: 4px;
  width: 100%;
}
.calendar-preview {
  font-size: 13px;
  line-height: 1.6;
  padding: 3px 5px;
  background: #eff1ff;
  border-left: 3px solid #5966e8;
  color: #3d4a83;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-preview-personal {
  background: #e9f7f2;
  border-color: #249a81;
  color: #246c5a;
}
.calendar-preview-late {
  border-color: #c85265;
}
.calendar-more {
  font-size: 13px;
  color: #5f6b84;
}
.calendar-mobile-dots {
  display: none;
}
.calendar-event {
  border: 1px solid var(--line);
  border-left: 3px solid #5966e8;
  border-radius: 10px;
  padding: 17px;
  margin: 12px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}
.calendar-personal {
  border-left-color: #249a81;
}
.calendar-event > div:first-child {
  min-width: 0;
}
.calendar-event h3 {
  font-size: 15px;
  line-height: 1.6;
  margin: 10px 0 6px;
  overflow-wrap: anywhere;
}
.calendar-event p {
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.calendar-event small {
  font-size: 13px;
  color: #5f6d83;
}
.calendar-event-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.calendar-event .page-actions {
  flex-shrink: 0;
  flex-wrap: wrap;
  max-width: 180px;
}
.calendar-event-note {
  white-space: pre-wrap;
}
.calendar-undated summary {
  cursor: pointer;
  font-weight: 700;
}
.calendar-agenda-card > h2 {
  font-size: 18px;
}
.calendar-agenda-card > h2:focus {
  outline: 2px solid #5966e8;
  outline-offset: 6px;
}
@media (max-width: 1050px) {
  .calendar-day {
    min-height: 95px;
    padding: 6px;
  }
  .calendar-preview {
    font-size: 13px;
  }
  .calendar-event {
    flex-direction: column;
  }
  .calendar-event .page-actions {
    max-width: 100%;
  }
}
@media (max-width: 650px) {
  .calendar-card,
  .calendar-agenda-card,
  .calendar-undated {
    padding: 14px;
  }
  .calendar-day {
    min-height: 62px;
    padding: 6px;
    gap: 8px;
  }
  .calendar-day-items {
    display: none;
  }
  .calendar-mobile-dots {
    display: flex;
    gap: 4px;
  }
  .calendar-day-number {
    font-size: 13px;
  }
  .calendar-day-number small {
    font-size: 13px;
    padding: 1px 4px;
  }
  .calendar-weekdays span {
    font-size: 13px;
    padding: 8px;
  }
  .calendar-toolbar {
    align-items: start;
  }
  .calendar-month-controls {
    gap: 7px;
  }
  .calendar-month-controls h2 {
    font-size: 16px;
    min-width: 120px;
    margin: 0;
  }
  .calendar-month-label {
    width: 100%;
  }
  .calendar-legend {
    gap: 10px;
    font-size: 13px;
  }
  .calendar-filters > .field {
    min-width: 140px;
  }
  .calendar-event {
    padding: 12px;
  }
  .calendar-day.calendar-selected {
    box-shadow: inset 0 0 0 2px #5966e8;
  }
}
.calendar-day-select {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
  padding: 2px 0;
  background: transparent;
  text-align: left;
  color: inherit;
  min-height: 24px;
}
.calendar-day {
  cursor: pointer;
}
.calendar-preview {
  display: block;
  max-width: 100%;
  width: 100%;
  border: 0;
  border-left: 3px solid #5966e8;
  border-radius: 0;
  text-align: left;
  font-weight: 500;
  min-height: 25px;
  cursor: pointer;
}
.calendar-preview-personal {
  border-left-color: #249a81;
}
.calendar-preview-late {
  border-left-color: #c85265;
}
.calendar-preview[draggable="true"],
.calendar-move-control {
  cursor: grab;
}
.calendar-preview[draggable="true"]:active,
.calendar-move-control:active {
  cursor: grabbing;
}
.calendar-drop-over {
  box-shadow: inset 0 0 0 3px #249a81;
  background: #eaf8f2;
}
.calendar-dragging {
  opacity: 0.5;
}
.calendar-event .page-actions {
  max-width: 210px;
}
.calendar-day-select:focus-visible,
.calendar-preview:focus-visible {
  outline: 2px solid #5966e8;
  outline-offset: 1px;
}
[data-calendar-save] {
  overflow-wrap: anywhere;
}
@media (max-width: 650px) {
  .calendar-day-select {
    min-height: 28px;
  }
  .calendar-event .page-actions {
    max-width: 100%;
  }
}
