:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #687386;
  --line: #dfe5ec;
  --blue: #156a8a;
  --blue-dark: #10263d;
  --blue-2: #e9f4f7;
  --nav-blue: #15263a;
  --teal: #0f8b8d;
  --red: #c23a5b;
  --red-2: #fde7e3;
  --orange: #d47a28;
  --orange-2: #fff1df;
  --yellow: #9a6700;
  --yellow-2: #fff6d7;
  --green: #21a77a;
  --green-2: #e6f4ea;
  --purple: #7b61ff;
  --pink: #e8529b;
  --shadow: 0 8px 22px rgba(26, 39, 58, 0.08);
  --shadow-soft: 0 4px 12px rgba(26, 39, 58, 0.06);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

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

button {
  border: 0;
  cursor: pointer;
}

.login {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  padding: 28px;
  background: #eef2f5;
}

.login-box {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(39, 84, 232, 0.16);
  padding: 30px;
}

.login-layout {
  width: min(940px, 100%);
  min-height: 540px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(360px, 1.05fr);
  overflow: hidden;
  border: 1px solid #d9e0e6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(26, 39, 58, 0.13);
}

.login-brand-panel {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 46px;
  background: #15263a url("/assets/login-project-blueprint.png") center / cover no-repeat;
  color: #fff;
}

.login-brand-panel > div:first-child {
  display: grid;
  gap: 7px;
}

.login-brand-panel strong {
  font-size: 25px;
  line-height: 1.2;
}

.login-brand-panel span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

.login-brand-panel p {
  max-width: 260px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.7;
}

.login-brand-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.login-brand-points span {
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.login-entry {
  display: grid;
  align-content: center;
  gap: 30px;
  padding: 48px 58px;
}

.login-heading > span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.login-heading h1 {
  margin: 9px 0 0;
  color: var(--ink);
  font-size: 27px;
  line-height: 1.2;
}

.login-heading p {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 16px;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 58px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-height: 28px;
  padding: 0 7px;
  transform: translateY(-50%);
  border-radius: 4px;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.password-toggle:hover {
  background: #edf5f6;
}

.login-security-note {
  margin-top: -6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.login-form .error {
  min-height: 0;
  margin: -4px 0 0;
  font-size: 12px;
}

.login-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 2px;
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.beian-footer {
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  padding: 18px 10px 0;
  color: #667085;
  font-size: 12px;
}

.beian-footer a {
  color: #667085;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.beian-footer a:hover {
  color: var(--blue);
}

.beian-footer img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.password-box {
  width: min(500px, 100%);
}

.login-box h1,
.page-title h1,
.detail-hero h1 {
  margin: 0;
  color: #21446c;
  font-size: 25px;
}

.login-box p,
.page-title p,
.detail-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--nav-blue);
  color: #fff;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 10px 0 24px rgba(18, 33, 51, 0.12);
}

.brand {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 8px;
}

.brand-avatar {
  width: 44px;
  height: 44px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #2d4861;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  font-size: 20px;
  font-weight: 800;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.brand-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

.brand-copy span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
}

.sidebar nav {
  display: grid;
  gap: 4px;
}

.nav-group {
  display: grid;
  gap: 3px;
  margin-top: 8px;
}

.nav-group-toggle {
  min-height: 30px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: left;
}

.nav-group-toggle:hover {
  color: #fff;
}

.nav-chevron {
  font-size: 16px;
  line-height: 1;
  transition: transform 160ms ease;
}

.nav-group.open .nav-chevron {
  transform: rotate(180deg);
}

.nav-group-items {
  display: none;
  gap: 3px;
}

.nav-group.open .nav-group-items {
  display: grid;
}

.nav-item {
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  width: 100%;
  min-height: 42px;
  padding: 0 8px;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 6px;
  transition: background 160ms ease, color 160ms ease;
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: inherit;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-item.active .nav-icon {
  background: #fff;
  color: var(--blue);
}

.main-shell {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  min-height: 76px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 30px;
}

.topbar > div:not(.topbar-actions) {
  display: grid;
  gap: 2px;
}

.topbar span,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: #556070;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(18, 30, 52, 0.28);
  backdrop-filter: blur(8px);
}

.modal-panel {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(31, 54, 99, 0.22);
  padding: 22px;
}

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

.modal-header h2 {
  margin: 0;
  color: #21446c;
  font-size: 20px;
}

.modal-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.content {
  padding: 26px 34px 34px;
  display: grid;
  align-content: start;
  gap: 22px;
}

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

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
}

.panel-header {
  min-height: 58px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.panel-header h2 {
  margin: 0;
  font-size: 15px;
  color: #2b3853;
  letter-spacing: 0.4px;
}

.panel-header.clean {
  min-height: auto;
  padding: 0;
  border: 0;
}

.panel-body {
  padding: 14px;
}

.primary,
.secondary,
.danger,
.ghost {
  min-height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 700;
  border: 1px solid transparent;
  border-radius: 6px;
}

.primary {
  background: var(--blue);
  color: #fff;
  box-shadow: none;
}

.secondary {
  background: #fff;
  color: var(--blue);
  border-color: #dce7ff;
}

.danger {
  background: var(--red);
  color: #fff;
}

.ghost {
  background: #fff;
  color: var(--blue);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: #334155;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  min-height: 42px;
  padding: 9px 12px;
  outline: none;
  border-radius: 6px;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 78, 120, 0.12);
}

.search {
  max-width: 300px;
}

.quick-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 16px;
}

.today-focus,
.quick-actions,
.project-command {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dfe8f5;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.today-focus {
  display: grid;
  gap: 14px;
  padding: 16px;
}

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

.todo-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e3eaf5;
  border-left: 4px solid var(--teal);
  background: #fff;
  border-radius: 10px;
}

.todo-card.red {
  border-left-color: var(--red);
}

.todo-card.orange {
  border-left-color: var(--orange);
}

.todo-card div,
.command-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.todo-card strong,
.quick-action strong,
.command-summary strong {
  color: #1f2a44;
}

.todo-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.todo-card footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.todo-due {
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
}

.todo-due.red {
  color: var(--red);
}

.todo-card button {
  min-height: 30px;
  padding: 0 10px;
}

.compact-empty {
  padding: 16px;
}

.quick-actions {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.quick-action {
  width: 100%;
  min-height: 66px;
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 4px;
  align-content: center;
  border: 1px solid #e3eaf5;
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
}

.quick-action.primary-action {
  border-color: rgba(32, 185, 201, 0.3);
  background: linear-gradient(135deg, #f7fffd, #eef7ff);
}

.quick-action span,
.command-summary span,
.form-hint span {
  color: var(--muted);
  line-height: 1.45;
}

.project-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
}

.command-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.command-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 14px;
}

.module-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 12px;
}

.module-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.module-guide {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: center;
  border-radius: var(--radius);
}

.module-guide span {
  color: #344054;
  line-height: 1.45;
  padding-left: 12px;
  border-left: 3px solid var(--teal);
}

.smart-form {
  align-items: start;
}

.form-hint {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #dfe8f5;
  border-left: 4px solid var(--teal);
  background: #f8fbff;
  border-radius: 10px;
}

.form-hint strong {
  color: #24466f;
}

.report-reuse {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #d6e4e7;
  border-radius: 6px;
  background: #f3f9f9;
  color: var(--muted);
  font-size: 12px;
}

.report-project-link {
  display: inline-block;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.report-project-link:hover {
  color: var(--teal);
  text-decoration: underline;
}

.report-export-panel {
  overflow: visible;
}

.report-export-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) repeat(2, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  padding: 0 16px 16px;
}

.report-export-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.report-export-filters select,
.report-export-filters input {
  min-width: 0;
  min-height: 38px;
}

.risk-guard {
  border-left-color: var(--orange);
  background: #fffaf2;
}

.advanced-fields {
  border: 1px solid #dfe8f5;
  background: #fff;
  border-radius: 12px;
  padding: 0;
}

.advanced-fields summary {
  min-height: 42px;
  padding: 11px 12px;
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
  list-style-position: inside;
}

.advanced-fields > .form-grid {
  padding: 0 12px 12px;
}

.seg-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: start;
  gap: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.seg-tabs button {
  height: 38px;
  min-height: 38px;
  flex: 0 0 auto;
  padding: 0 16px;
  border-radius: 13px;
  background: transparent;
  color: #53627a;
  font-weight: 800;
}

.seg-tabs button.active {
  background: linear-gradient(135deg, var(--blue), #5a88ff);
  color: #fff;
  box-shadow: 0 10px 22px rgba(39, 84, 232, 0.18);
}

.resource-dashboard {
  display: grid;
  gap: 16px;
}

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

.station-pressure,
.resource-conflicts {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.station-pressure article,
.resource-conflicts article {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 7px;
  background: #fff;
}

.station-pressure article.attention,
.resource-conflicts article {
  border-left-color: var(--orange);
}

.station-pressure header,
.station-pressure footer,
.resource-conflicts article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.station-pressure header strong,
.resource-conflicts strong {
  color: var(--ink);
}

.station-pressure header span {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.station-pressure .attention header span {
  color: var(--orange);
}

.pressure-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #e8edf1;
}

.pressure-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.station-pressure .attention .pressure-bar i {
  background: var(--orange);
}

.station-pressure footer,
.resource-conflicts span,
.resource-conflicts p,
.resource-empty span {
  color: var(--muted);
  font-size: 12px;
}

.resource-conflicts p {
  margin: 0;
  line-height: 1.5;
}

.resource-conflicts .secondary {
  justify-self: start;
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.resource-empty {
  display: grid;
  gap: 6px;
  padding: 24px 16px;
}

.resource-estimate-page {
  display: grid;
  gap: 16px;
}

.resource-request-page,
.resource-analysis {
  display: grid;
  gap: 16px;
}

.resource-investment-panel {
  overflow: visible;
}

.resource-stats-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  padding: 0 16px 16px;
}

.resource-stats-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.resource-stats-filters select,
.resource-stats-filters input {
  min-width: 0;
  min-height: 38px;
}

.resource-investment-kpis {
  padding-top: 0;
}

.resource-investment-tables {
  padding: 0 16px 16px;
  align-items: start;
}

.resource-investment-tables h3 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 14px;
}

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

.resource-flow article {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dce7ff;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 7px;
}

.resource-flow span {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), #5a88ff);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.resource-flow strong {
  color: #1f2a44;
  font-size: 16px;
}

.resource-flow b {
  color: var(--blue);
  font-size: 26px;
}

.resource-flow em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.focus-strip {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  overflow-x: auto;
  min-height: 38px;
  align-items: center;
}
.focus-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #fef7f0;
  border: 1px solid #f0dbd0;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 12px;
  flex-shrink: 0;
}
.focus-chip strong {
  color: #1d2940;
}
.focus-chip span:last-child {
  color: #667085;
  font-size: 11px;
}
.focus-chip .tag {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
}

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

.todo-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 180px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e4ecf7;
  border-radius: 14px;
  background: #fff;
}

.todo-list strong,
.todo-list p {
  min-width: 0;
}

.todo-list p {
  margin: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-plan-page {
  display: grid;
  gap: 16px;
}

.copy-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dce7ff;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.copy-box span {
  color: #344054;
  font-weight: 800;
}

.copy-box input {
  min-width: 0;
  color: var(--blue);
  font-weight: 700;
}

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

.time-view-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dce7ff;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.time-view-card > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.time-view-card strong {
  color: #1f2a44;
  font-size: 18px;
}

.time-view-card span {
  color: var(--blue);
  font-weight: 800;
}

.time-view-card p {
  margin: 0;
  color: var(--muted);
}

.two-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.compare-chart {
  display: grid;
  gap: 14px;
  padding: 14px 18px 20px;
}

.compare-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 14px;
  align-items: center;
}

.compare-row strong {
  grid-row: span 2;
  color: #27364f;
}

.compare-row div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 62px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.compare-row i {
  height: 10px;
  min-width: 8px;
  border-radius: 99px;
}

.compare-row .plan {
  background: linear-gradient(90deg, #94a3b8, #d5deec);
}

.compare-row .actual {
  background: linear-gradient(90deg, var(--teal), var(--blue));
  box-shadow: 0 6px 15px rgba(32, 185, 201, 0.18);
}

.kpi {
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-left: 0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: var(--shadow-soft);
  padding: 17px;
  min-height: 112px;
  position: relative;
  overflow: hidden;
}

.kpi::before {
  content: "";
  position: absolute;
  left: 17px;
  bottom: 15px;
  width: 34px;
  height: 5px;
  border-radius: 99px;
  background: var(--teal);
  opacity: 0.65;
}

.kpi.red {
  color: var(--red);
}

.kpi.orange {
  color: var(--orange);
}

.kpi.red::before {
  background: var(--pink);
}

.kpi.orange::before {
  background: var(--orange);
}

.kpi strong {
  display: block;
  margin-top: 12px;
  font-size: 31px;
  line-height: 1.2;
  word-break: break-word;
}

.kpi span {
  color: var(--muted);
}

.workspace-grid,
.portfolio-grid,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.workspace-grid > .panel,
.portfolio-grid > .panel,
.detail-grid > .panel {
  min-height: 220px;
}

.priority-panel {
  grid-column: span 2;
  grid-row: span 2;
}

.span-2 {
  grid-column: span 2;
}
.span-3 {
  grid-column: span 3;
}

.focus-list,
.detail-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.focus-card,
.line-item,
.project-card,
.report-card,
.digest-item,
.compact-item,
.manager-card,
.summary-grid article {
  border: 1px solid var(--line);
  background: #fff;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(32, 48, 76, 0.04);
}

.focus-card div,
.line-item div,
.project-card-head,
.report-card-head,
.detail-tags,
.tag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.focus-card p,
.line-item p,
.project-card p,
.digest-item p {
  margin: 10px 0;
  color: #344054;
  line-height: 1.55;
}

.digest-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.digest-item summary::-webkit-details-marker {
  display: none;
}

.digest-item summary > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.digest-item summary span,
.digest-toggle {
  color: var(--muted);
  font-size: 12px;
}

.digest-toggle {
  flex: 0 0 auto;
  color: var(--blue);
  font-weight: 700;
}

.digest-item[open] .digest-toggle {
  color: var(--teal);
}

.digest-body {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.digest-body div {
  display: grid;
  gap: 4px;
}

.digest-body dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.digest-body dd {
  margin: 0;
  color: #344054;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.focus-card footer,
.project-card footer,
.report-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.weekly-box {
  padding: 12px;
  display: grid;
  gap: 12px;
}

.weekly-meter {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #f8fbff, #edf6ff);
  padding: 12px;
  display: grid;
  gap: 8px;
  border-radius: 16px;
}

.weekly-meter strong {
  color: var(--blue);
  font-size: 28px;
}

.weekly-meter span {
  color: var(--muted);
  font-size: 12px;
}

.weekly-meter i {
  height: 8px;
  width: 100%;
  background: linear-gradient(90deg, var(--teal) var(--p), #e4eaf1 var(--p));
  border-radius: 99px;
}

.loop-grid {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.loop-step {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, #ffffff, #f7fbff);
  min-height: 84px;
  padding: 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
}

.loop-step i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff;
  font-style: normal;
  font-weight: 700;
  border-radius: 11px;
}

.loop-step div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.loop-step strong {
  color: var(--blue);
}

.loop-step span {
  color: var(--muted);
  line-height: 1.4;
}

.loop-step b {
  color: var(--teal);
  font-size: 22px;
}

.digest-list,
.compact-list,
.report-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.compact-item {
  width: 100%;
  display: grid;
  gap: 4px;
  text-align: left;
}

.lifecycle {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.life-node {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid var(--line);
  padding: 12px;
  background: #f8fbff;
  border-radius: 15px;
}

.life-node strong {
  color: var(--blue);
  font-size: 20px;
}

.chart-stack {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 98px minmax(80px, 1fr) 42px;
  align-items: center;
  gap: 8px;
}

.bar {
  height: 12px;
  background: #e2e8f0;
  overflow: hidden;
  border-radius: 99px;
}

.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.tech-bars {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.tech-bar {
  display: grid;
  gap: 7px;
}

.tech-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tech-bar-top span {
  color: #344054;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tech-bar-top strong {
  color: var(--blue);
}

.tech-bar-track {
  height: 13px;
  background: linear-gradient(90deg, #edf3ff, #f7fbff);
  border: 1px solid #d6e2ef;
  overflow: hidden;
  position: relative;
  border-radius: 99px;
}

.tech-bar-track i {
  display: block;
  height: 100%;
  width: var(--w);
  background: linear-gradient(90deg, var(--blue), #8d73ff);
  animation: growBar 700ms ease both;
  animation-delay: var(--d);
  border-radius: 99px;
}

.tech-bars.teal .tech-bar-track i {
  background: linear-gradient(90deg, var(--teal), #5be3c2);
}

.project-type-chart {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.project-type-chart article {
  display: grid;
  gap: 6px;
  cursor: pointer;
}

.project-type-chart article:hover {
  opacity: 0.78;
}

.project-type-chart article > div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
}

.project-type-chart strong {
  color: var(--blue);
  font-size: 14px;
}

.project-type-chart span {
  min-width: 0;
  color: #4c5969;
  font-size: 12px;
  line-height: 1.35;
}

.project-type-chart b {
  color: var(--ink);
  font-size: 13px;
}

.project-type-chart i {
  display: block;
  width: var(--w);
  height: 7px;
  border-radius: 4px;
  background: var(--teal);
  animation: growWidth 700ms ease both;
  animation-delay: var(--d);
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(15, 118, 110, 0.35);
  animation: pulseDot 1.8s ease-out infinite;
}

.donut-wrap {
  padding: 18px;
  min-height: 196px;
  display: grid;
  grid-template-columns: minmax(112px, 140px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  overflow: visible;
}

.donut-panel {
  overflow: visible;
}

.donut {
  width: min(100%, 140px);
  height: auto;
  aspect-ratio: 1;
  justify-self: center;
  transform: rotate(-90deg);
  overflow: visible;
}

.donut circle {
  animation: donutIn 800ms ease both;
}

.donut-segment {
  cursor: help;
  transition: opacity 160ms ease, stroke-width 160ms ease;
}

.donut-segment:hover {
  opacity: 0.8;
  stroke-width: 5.6;
}

.donut text {
  transform: rotate(90deg);
  transform-origin: center;
  fill: var(--blue);
  font-size: 7px;
  font-weight: 700;
}

.donut-legend {
  display: grid;
  gap: 8px;
}

.donut-legend span {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #344054;
  min-width: 0;
  font-size: 12px;
}

.donut-legend b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #344054;
  font-weight: 600;
}

.donut-legend i {
  width: 10px;
  height: 10px;
  border-radius: 4px;
}

.donut-legend strong {
  color: var(--blue);
}

.meter-grid {
  padding: 12px 16px;
  display: grid;
  gap: 10px;
}

.meter-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 10px;
}

.meter-card .meter-label {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.meter-card .meter-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue);
  white-space: nowrap;
}

.meter-card .meter-bar {
  flex: 1;
  height: 6px;
  background: #e7eef7;
  border-radius: 99px;
  overflow: hidden;
  min-width: 40px;
}

.meter-card .meter-bar i {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: 99px;
}

.meter-track {
  height: 8px;
  background: #e7eef7;
  overflow: hidden;
  border-radius: 99px;
}

.meter-track i {
  display: block;
  height: 100%;
  width: calc(var(--p) * 1%);
  background: linear-gradient(90deg, var(--teal), #6bc4b8);
  animation: growBar 800ms ease both;
  animation-delay: var(--d);
  border-radius: 99px;
}

@keyframes growBar {
  from {
    width: 0;
  }
}

@keyframes growWidth {
  from {
    width: 0;
  }
}

@keyframes pulseDot {
  70% {
    box-shadow: 0 0 0 10px rgba(15, 118, 110, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(15, 118, 110, 0);
  }
}

@keyframes donutIn {
  from {
    stroke-dasharray: 0 100;
  }
}

.manager-grid,
.pill-cloud,
.project-list {
  padding: 14px;
  display: grid;
  gap: 10px;
}

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

.manager-load-chart {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.manager-load-chart article {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dce7ff;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.manager-load-head,
.load-bar,
.stage-bars article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.manager-load-head span,
.load-bar span {
  color: var(--muted);
  font-size: 12px;
}

.load-bar {
  position: relative;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid #dce7ff;
  background: #f4f8ff;
  overflow: hidden;
  border-radius: 999px;
}

.load-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, rgba(39, 84, 232, 0.18), rgba(90, 136, 255, 0.38));
  animation: growWidth 700ms ease both;
  animation-delay: var(--d);
}

.load-bar.active i {
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.2), rgba(91, 227, 194, 0.38));
}

.load-bar span,
.load-bar b {
  position: relative;
  z-index: 1;
}

.stage-chart {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  align-items: stretch;
}

.stage-total {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  min-height: 160px;
  border: 1px solid #dce7ff;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 35%, #ffffff, #edf4ff);
}

.stage-total strong {
  color: var(--blue);
  font-size: 42px;
}

.stage-total span {
  color: var(--muted);
}

.stage-bars {
  display: grid;
  gap: 10px;
}

.stage-bars article {
  display: grid;
  gap: 7px;
}

.stage-bars article > i {
  display: block;
  height: 13px;
  width: var(--w);
  background: linear-gradient(90deg, var(--blue), #5a88ff);
  border-radius: 999px;
  animation: growWidth 700ms ease both;
  animation-delay: var(--d);
}

.manager-card {
  display: grid;
  gap: 6px;
}

.manager-card span {
  color: var(--muted);
  font-size: 12px;
}

.pill-cloud {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stage-pill {
  background: #f8fbff;
  border: 1px solid var(--line);
  color: var(--ink);
  min-height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  border-radius: 14px;
}

.project-board,
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
  gap: 16px;
}

.project-full {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.project-list,
.project-table-wrap {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: calc(100vh - 210px);
  overflow: auto;
}

.project-list-header > div {
  display: grid;
  gap: 4px;
}

.project-controls {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fafbfd;
}

.filter-chips,
.view-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.filter-chips button,
.view-switch button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #526071;
  font-size: 12px;
  font-weight: 700;
}

.filter-chips button:hover,
.filter-chips button.active {
  background: #e7f2f3;
  border-color: #afd8d9;
  color: #0d6669;
}

.view-switch {
  flex-wrap: nowrap;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.view-switch button.active {
  background: var(--ink);
  color: #fff;
}

.project-sort {
  width: auto;
  min-width: 130px;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 12px;
}

.analysis-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.analysis-filters strong {
  margin-right: 4px;
  color: var(--ink);
  font-size: 12px;
}

.analysis-filters select {
  width: auto;
  min-width: 110px;
  min-height: 32px;
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 12px;
}

.project-focus-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  padding: 14px;
  background: #fbfcfd;
}

.project-focus-card {
  min-width: 0;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid #8fa7b3;
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

.project-focus-card.needs-attention {
  border-left-color: var(--orange);
}

.project-focus-main {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.project-focus-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.project-focus-title > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.project-focus-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 15px;
}

.project-focus-title span,
.project-meta {
  color: var(--muted);
  font-size: 12px;
}

.project-focus-main p {
  margin: 0;
  color: #3f4d5c;
}

.project-meta {
  display: grid;
  gap: 5px;
}

.project-meta b {
  color: var(--ink);
  font-weight: 700;
}

.project-focus-actions {
  display: flex;
  align-items: flex-end;
  flex: 0 0 auto;
}

.project-focus-actions .primary {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.project-table {
  min-width: 1580px;
  table-layout: fixed;
}

.project-table col.w-short {
  width: 138px;
}

.project-table col.w-name {
  width: 220px;
}

.project-table col.w-code {
  width: 150px;
}

.project-table col.w-person {
  width: 96px;
}

.project-table col.w-area {
  width: 84px;
}

.project-table col.w-type {
  width: 96px;
}

.project-table col.w-stage {
  width: 118px;
}

.project-table col.w-date {
  width: 100px;
}

.project-table col.w-tag {
  width: 76px;
}

.project-table col.w-action {
  width: 120px;
}

.project-table th,
.project-table td {
  padding: 8px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.45;
}

.project-table td.wrap {
  white-space: nowrap;
  min-width: 0;
  max-width: none;
}

.project-table .strong-cell {
  color: var(--blue);
  font-weight: 700;
}

.code-cell {
  font-family: "SF Mono", "Consolas", "Courier New", monospace;
  font-size: 12px;
  color: #4b5563;
}

.row-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.row-actions .secondary {
  min-height: 30px;
  padding: 0 10px;
}

.project-card {
  display: grid;
  gap: 8px;
}

.project-card-head strong,
.report-card-head strong,
.digest-item strong,
.compact-item strong {
  display: block;
  font-size: 16px;
  color: var(--blue);
}

.project-card-head span,
.project-card dt,
.report-card-head span,
.report-card dt,
.report-card footer span,
.digest-item span,
.compact-item span,
.line-item span {
  color: var(--muted);
  font-size: 12px;
}

.project-card dl,
.report-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.project-card dd,
.report-card dd {
  margin: 2px 0 0;
  font-weight: 700;
  min-height: 20px;
}

.report-card {
  display: grid;
  gap: 10px;
}

.report-card dd,
.digest-item p {
  white-space: pre-wrap;
}

.detail-hero {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.detail-tags {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.detail-status {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.detail-owners {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.detail-owners span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
}

.detail-owners b {
  margin-left: 4px;
  color: var(--ink);
}

.detail-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

.timeline-node {
  min-height: 88px;
  border: 1px solid var(--line);
  background: #f8fafc;
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: center;
  border-radius: 8px;
}

.timeline-node.active {
  border-color: var(--blue);
  background: var(--blue-2);
}

.timeline-node.done {
  border-color: #a8ddb8;
  background: var(--green-2);
}

.acceptance-checklist {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.acceptance-checklist.multi {
  grid-template-columns: 1fr;
}

.acceptance-node {
  display: grid;
  gap: 10px;
}

.acceptance-node > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.acceptance-node-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

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

.project-action-list article {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 7px;
  background: #fff;
}

.project-action-list article.overdue {
  border-left-color: var(--orange);
}

.project-action-list article.done {
  border-left-color: var(--green);
  background: #f7fbf8;
}

.project-action-main {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.project-action-main > div,
.project-action-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.project-action-main strong {
  color: var(--ink);
}

.project-action-main p {
  margin: 0;
  color: #4c5969;
  line-height: 1.5;
}

.project-action-main footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
}

.project-action-actions {
  justify-content: flex-end;
  flex: 0 0 auto;
}

.project-action-actions button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.acceptance-checklist article {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafbfd;
}

.acceptance-checklist article.done {
  border-color: #a8ddb8;
  background: #f4fbf6;
}

.acceptance-checklist i {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #b4c1ca;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-style: normal;
}

.acceptance-checklist article.done i {
  border-color: var(--green);
  background: var(--green);
}

.acceptance-checklist article > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.acceptance-checklist strong {
  color: var(--ink);
  font-size: 13px;
}

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

.empty-state {
  grid-template-columns: 1fr;
  padding: 22px;
}

.activity-feed {
  display: grid;
  gap: 0;
  padding: 14px 16px;
}

.activity-feed article {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  padding: 0 0 16px;
}

.activity-feed article:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: #d8e1e8;
}

.activity-dot {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  margin-top: 4px;
  border: 3px solid #d7e9ea;
  border-radius: 50%;
  background: var(--teal);
}

.activity-dot.red {
  border-color: #f9d6d1;
  background: var(--red);
}

.activity-feed header {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
}

.activity-type {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.activity-feed strong {
  color: var(--ink);
}

.activity-feed time {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.activity-feed p {
  margin: 5px 0 0;
  color: #4c5969;
  line-height: 1.5;
}

.attachment-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.attachment-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px dashed #b9c9d5;
  border-radius: 7px;
  background: #fafcfd;
}

.attachment-upload input[type="file"] {
  min-height: 36px;
  padding: 5px 8px;
  border: 0;
  background: transparent;
}

.attachment-upload .primary {
  flex: 0 0 auto;
  min-height: 34px;
}

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

.attachment-list article {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.attachment-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 5px;
  background: var(--blue-2);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.attachment-list article > div:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
  flex: 1;
}

.attachment-list a {
  overflow: hidden;
  color: var(--blue);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-list span {
  color: var(--muted);
  font-size: 12px;
}

.overdue-label {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--red-2);
  color: var(--red) !important;
  font-size: 11px !important;
  font-weight: 700;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.summary-grid h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--blue);
}

.summary-grid p {
  margin: 0;
  color: #344054;
  line-height: 1.6;
  white-space: pre-wrap;
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

.labor-builder {
  display: grid;
  gap: 12px;
}

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

.labor-builder-head strong {
  display: block;
  color: #2b3853;
  font-size: 15px;
}

.labor-builder-head span {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.labor-rows {
  display: grid;
  gap: 12px;
}

.labor-row {
  border: 1px solid #dce7ff;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 12px;
}

.labor-main {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(112px, 180px) auto;
  gap: 10px;
  align-items: end;
  min-width: 0;
}

.labor-main label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 700;
}

.labor-result {
  grid-column: 1 / -1;
  min-height: 42px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
  min-width: 0;
}

.labor-result span {
  color: var(--muted);
  font-size: 12px;
}

.labor-result strong {
  color: var(--blue);
  white-space: normal;
  overflow-wrap: anywhere;
}

.factor-picker {
  display: grid;
  gap: 10px;
  max-height: 172px;
  overflow: auto;
  padding: 2px;
}

.factor-group {
  display: grid;
  gap: 7px;
}

.factor-group > strong {
  color: #24466f;
  font-size: 13px;
}

.factor-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.factor-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #dce7ff;
  background: #fff;
  border-radius: 999px;
  padding: 7px 10px;
  color: #344054;
  cursor: pointer;
  white-space: normal;
}

.factor-chip span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.factor-chip input {
  width: 14px;
  min-height: auto;
  padding: 0;
}

.factor-chip:has(input:checked) {
  border-color: rgba(39, 84, 232, 0.34);
  background: var(--blue-2);
  color: var(--blue);
  font-weight: 700;
}

.labor-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 15px;
  background: #f4f8fd;
  border: 1px solid #dce7ff;
}

.labor-summary span {
  color: #344054;
  white-space: nowrap;
}

.labor-summary strong {
  color: var(--blue);
  font-size: 18px;
  margin-left: 6px;
}

.table-wrap {
  overflow: auto;
  max-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5f8ff;
  color: #2d3c59;
  border-bottom: 1px solid #dce7ff;
  box-shadow: inset 0 -1px 0 #dce7ff;
  font-weight: 700;
}

td.wrap {
  white-space: normal;
  min-width: 220px;
}

tr:hover td {
  background: #f8fbff;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 99px;
}

.tag.red {
  background: var(--red-2);
  color: var(--red);
  border-color: #f3b5ac;
}

.tag.yellow {
  background: var(--yellow-2);
  color: var(--yellow);
  border-color: #f5d27c;
}

.tag.green {
  background: var(--green-2);
  color: var(--green);
  border-color: #a8ddb8;
}

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

.notice {
  margin-top: 16px;
  padding: 10px 12px;
  background: var(--blue-2);
  color: #23445c;
  border: 1px solid #c6d9eb;
}

.error {
  margin-top: 12px;
  color: var(--red);
  min-height: 20px;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .sidebar nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .workspace-grid,
  .portfolio-grid,
  .detail-grid,
  .quick-workbench,
  .resource-capacity-grid,
  .module-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-grid,
  .module-cards,
  .detail-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-board,
  .split {
    grid-template-columns: 1fr;
  }

  .labor-main {
    grid-template-columns: minmax(220px, 1fr) minmax(110px, 0.4fr) auto;
  }

  .labor-main .danger {
    justify-self: start;
  }

  .project-list,
  .project-focus-list,
  .acceptance-checklist,
  .manager-grid,
  .time-view-grid,
  .todo-cards,
  .resource-flow,
  .meter-grid,
  .pill-cloud,
  .timeline,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .login {
    padding: 14px;
  }

  .login-layout {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    gap: 10px;
    padding: 28px 26px;
  }

  .login-brand-panel p,
  .login-brand-points {
    display: none;
  }

  .login-entry {
    gap: 22px;
    padding: 30px 26px;
  }

  .topbar,
  .page-title,
  .detail-hero,
  .project-command {
    display: grid;
  }

  .content {
    padding: 12px;
  }

  .labor-main {
    grid-template-columns: 1fr;
  }

  .sidebar nav,
  .workspace-grid,
  .portfolio-grid,
  .detail-grid,
  .quick-workbench,
  .resource-capacity-grid,
  .module-overview,
  .kpi-grid,
  .module-cards,
  .todo-cards,
  .detail-kpis,
  .two-grid,
  .time-view-grid,
  .resource-flow,
  .stage-chart,
  .project-list,
  .manager-grid,
  .meter-grid,
  .donut-wrap,
  .pill-cloud,
  .timeline,
  .summary-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .todo-list article {
    grid-template-columns: 1fr;
  }

  .command-actions {
    justify-content: stretch;
  }

  .command-actions button {
    flex: 1 1 130px;
  }

  .project-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .view-switch {
    width: 100%;
  }

  .view-switch button {
    flex: 1;
  }

  .project-sort {
    width: 100%;
  }

  .analysis-filters select {
    width: 100%;
  }

  .resource-stats-filters {
    grid-template-columns: 1fr;
  }

  .report-export-filters {
    grid-template-columns: 1fr;
  }

  .resource-investment-tables {
    grid-template-columns: 1fr;
  }

  .project-focus-card {
    display: grid;
  }

  .project-focus-actions .primary {
    width: 100%;
  }

  .detail-status {
    justify-items: start;
  }

  .detail-owners {
    justify-content: flex-start;
  }

  .project-action-list article {
    display: grid;
  }

  .acceptance-node-grid {
    grid-template-columns: 1fr;
  }

  .project-action-actions {
    justify-content: flex-start;
  }

  .attachment-upload {
    align-items: stretch;
    flex-direction: column;
  }

  .attachment-upload .primary {
    width: 100%;
  }

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

  .report-reuse .secondary {
    width: 100%;
  }

  .priority-panel,
  .span-2,
  .span-3 {
    grid-column: auto;
  }

  .kpi {
    min-height: 72px;
  }
}

.pwd-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: #fff;
  border: 1px solid #e0e8f0;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.14);
  padding: 16px 20px;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: pwdToastIn 0.3s ease-out;
}
@keyframes pwdToastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.pwd-toast-body {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.pwd-toast-icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow-2);
  border-radius: 8px;
  color: #9a6700;
}
.pwd-toast-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pwd-toast-text strong {
  font-size: 14px;
  color: #1d2940;
}
.pwd-toast-text span {
  font-size: 12px;
  color: #667085;
  line-height: 1.4;
}
.pwd-toast-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.pwd-toast-actions button.secondary {
  background: var(--blue);
  color: #fff;
  border: none;
  font-size: 12px;
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
}
.pwd-toast-actions button.ghost {
  background: transparent;
  border: 1px solid #d0ddef;
  color: #567095;
  font-size: 12px;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
