@import url("/assets/themes.css");

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-sans);
  background: var(--gradient-body);
}

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

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

h1,
h2,
h3,
strong {
  font-weight: 650;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--green-800) 25%, transparent);
  border-radius: var(--radius-sm);
  background: var(--gradient-brand-mark);
  color: var(--green-800);
  font-weight: 700;
}

.brand-title {
  display: block;
  font-size: 0.98rem;
  font-weight: 650;
}

.brand-subtitle {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(220px, auto) 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 58px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 92%, transparent);
  background: color-mix(in srgb, var(--color-surface) 86%, transparent);
  backdrop-filter: blur(14px);
  padding: 0 18px;
}

.home-shell {
  min-height: 100vh;
  background: var(--color-page-strong);
}

.home-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--topbar-height);
  border-bottom: 1px solid var(--line-soft);
  background: var(--color-surface);
  padding: 0 clamp(16px, 4vw, 32px);
}

.home-tenant-name {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 650;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid color-mix(in srgb, var(--green-100) 55%, var(--green-800));
  border-radius: var(--radius-pill);
  background: var(--green-100);
  color: var(--green-800);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0;
  padding: 0;
  cursor: pointer;
}

.home-avatar:focus-visible,
.home-menu-item:focus-visible,
.home-menu-submit:focus-visible,
.home-menu select:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.home-user-menu {
  position: relative;
  flex: 0 0 auto;
}

.ppm-topbar-project {
  display: grid;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.ppm-topbar-project span {
  overflow: hidden;
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppm-topbar-project small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppm-project-menu {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}

.ppm-project-menu + .ppm-project-menu {
  margin-left: var(--space-2);
}

.ppm-edit-mode-button {
  flex: 0 0 auto;
  margin-left: var(--space-2);
}

.ppm-edit-mode-button + .ppm-project-menu {
  margin-left: var(--space-2);
}

.ppm-project-menu + .ppm-dependency-toggle-button,
.ppm-edit-mode-button + .ppm-dependency-toggle-button,
.ppm-dependency-toggle-button + .ppm-dependency-conflict-button,
.ppm-dependency-conflict-button + .ppm-project-menu {
  margin-left: var(--space-2);
}

.ppm-project-menu-button {
  min-height: 36px;
  padding: 0 var(--space-4);
  font-weight: 500;
  white-space: nowrap;
}

.button-link.segmented-pill-button {
  display: inline-flex;
  align-items: stretch;
  justify-content: flex-start;
  height: 40px;
  min-height: 40px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--green-100) 55%, var(--green-800));
  border-radius: 9999px;
  background: var(--green-100);
  background-clip: padding-box;
  color: var(--green-800);
  line-height: 1;
  padding: 0;
}

.button-link.segmented-pill-button:hover,
.button-link.segmented-pill-button:focus-visible {
  background: color-mix(in srgb, var(--green-100) 86%, var(--color-surface));
  color: var(--green-800);
}

.button-link.segmented-pill-button.is-active {
  background: color-mix(in srgb, var(--green-100) 72%, var(--green-800));
  color: var(--color-surface);
}

.button-link.ppm-scale-menu-button {
  width: 68px;
  min-width: 68px;
}

.button-link.ppm-actions-menu-button {
  width: auto;
  min-width: 150px;
}

.button-link.segmented-pill-button--icon {
  width: 68px;
  min-width: 68px;
}

.segmented-pill-button__main,
.segmented-pill-button__chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 100%;
}

.segmented-pill-button__main {
  flex: 1 1 auto;
  border-radius: 9999px 0 0 9999px;
  padding: 0 var(--space-4);
}

.ppm-scale-menu-button .segmented-pill-button__main {
  padding: 0;
}

.segmented-pill-button__chevron {
  flex: 0 0 28px;
  border-left: 1px solid color-mix(in srgb, var(--green-800) 18%, var(--green-100));
  border-radius: 0 9999px 9999px 0;
  color: var(--green-800);
  font-size: 0.78rem;
  line-height: 1;
}

.ppm-scale-menu-icon,
.ppm-actions-menu-icon,
.ppm-edit-mode-icon,
.ppm-dependency-toggle-icon,
.ppm-dependency-conflict-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.ppm-dependency-conflict-button .segmented-pill-button__main {
  position: relative;
}

.ppm-dependency-conflict-count {
  position: absolute;
  top: 4px;
  right: 8px;
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  border: 1px solid color-mix(in srgb, var(--color-surface) 78%, transparent);
  border-radius: var(--radius-pill);
  background: var(--red-700);
  color: var(--color-surface);
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1;
  padding: 0 4px;
}

.ppm-dependency-conflict-button.has-conflicts {
  border-color: color-mix(in srgb, var(--red-700) 42%, var(--green-800));
}

.ppm-project-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 45;
  display: grid;
  gap: 4px;
  width: min(88vw, 280px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: var(--space-3);
}

.ppm-project-menu-panel[hidden] {
  display: none;
}

.ppm-project-menu-panel a,
.ppm-project-menu-panel button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink);
  padding: 0 var(--space-3);
  font-size: 0.86rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.ppm-project-menu-panel a:hover,
.ppm-project-menu-panel a:focus-visible,
.ppm-project-menu-panel button:hover,
.ppm-project-menu-panel button:focus-visible,
.ppm-project-menu-button:focus-visible {
  background: var(--color-surface-hover);
  color: var(--green-800);
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.ppm-project-menu-panel button[aria-checked="true"] {
  background: color-mix(in srgb, var(--green-100) 58%, var(--color-surface));
  color: var(--green-800);
  font-weight: 600;
}

.ppm-project-menu-panel button[aria-checked="true"]::after {
  content: "✓";
  margin-left: auto;
  color: var(--green-800);
}

.ppm-project-menu-separator {
  border-top: 1px solid var(--line-soft);
  margin-top: var(--space-2);
  padding-top: var(--space-3);
}

.ppm-project-menu-group {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--line-soft);
  margin-top: var(--space-2);
  padding-top: var(--space-3);
}

.ppm-project-menu-label {
  color: var(--muted);
  padding: 0 var(--space-3) var(--space-1);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
}

.home-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 50;
  display: grid;
  gap: 4px;
  width: min(92vw, 320px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: 8px;
}

.home-menu[hidden] {
  display: none;
}

.home-menu-item,
.home-menu-submit {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--ink);
  padding: 0 10px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.home-menu-item:hover,
.home-menu-submit:hover {
  background: var(--color-surface-hover);
}

.home-menu-item.danger {
  color: var(--red-700);
}

.home-menu-group {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--line-soft);
  padding: 8px 0 4px;
}

.home-menu-item + .home-menu-group,
.home-menu-group + .home-menu-item {
  border-top: 1px solid var(--line-soft);
  margin-top: 4px;
  padding-top: 8px;
}

.home-menu-label {
  padding: 0 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.home-menu-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  padding: 0 4px;
}

.home-theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  padding: 0 4px 2px;
}

.home-theme-option {
  min-height: var(--control-height);
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-xs);
  background: var(--color-surface);
  color: var(--color-subtle);
  padding: 0 var(--space-2);
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.home-theme-option:hover,
.home-theme-option:focus-visible {
  border-color: color-mix(in srgb, var(--green-800) 38%, var(--line));
  color: var(--green-800);
  outline: 0;
}

.home-theme-option.active,
.home-theme-option[aria-pressed="true"] {
  border-color: var(--green-800);
  background: var(--green-100);
  color: var(--green-800);
}

.home-menu select {
  min-height: var(--control-height);
  border-radius: var(--radius-xs);
  padding: 7px 8px;
  font-size: 0.86rem;
}

.home-menu-submit {
  min-height: var(--control-height);
  border: 1px solid var(--color-control-border);
  background: var(--color-surface);
  padding: 0 9px;
}

.ppm-top-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: auto;
}

.ppm-nav-link,
.ppm-create-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-xs);
  background: var(--color-surface);
  color: var(--color-subtle);
  padding: 0 var(--space-4);
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
}

.ppm-nav-link:hover,
.ppm-nav-link:focus-visible,
.ppm-create-menu summary:hover,
.ppm-create-menu summary:focus-visible {
  border-color: color-mix(in srgb, var(--green-800) 34%, var(--line));
  color: var(--green-800);
  outline: 0;
}

.ppm-nav-link.active {
  background: var(--green-100);
  color: var(--green-800);
}

.ppm-create-menu {
  position: relative;
}

.ppm-create-menu summary {
  cursor: pointer;
  list-style: none;
}

.ppm-create-menu summary::-webkit-details-marker {
  display: none;
}

.ppm-create-options {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: var(--space-2);
}

.ppm-create-options a {
  border-radius: var(--radius-xs);
  color: var(--ink);
  padding: var(--space-4);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

.ppm-create-options a:hover,
.ppm-create-options a:focus-visible {
  background: var(--color-surface-hover);
  color: var(--green-800);
  outline: 0;
}

.ppm-workspace {
  display: grid;
  gap: var(--space-7);
  padding: var(--admin-main-padding);
}

.ppm-page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-7);
}

.ppm-page-heading h1 {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  letter-spacing: 0;
}

.ppm-page-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.ppm-heading-actions {
  justify-content: flex-end;
  min-width: fit-content;
}

.ppm-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.ppm-summary-item {
  display: grid;
  gap: var(--space-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  padding: var(--space-6);
}

.ppm-summary-item span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.ppm-summary-item strong {
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
}

.ppm-view-switch {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  padding: 3px;
}

.ppm-view-switch a {
  border-radius: var(--radius-pill);
  color: var(--muted);
  padding: var(--space-2) var(--space-4);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.ppm-view-switch a:hover,
.ppm-view-switch a:focus-visible,
.ppm-view-switch a.is-active {
  background: var(--green-800);
  color: var(--color-surface);
  outline: 0;
}

.ppm-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--space-5);
}

.ppm-list-card {
  display: grid;
  gap: var(--space-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  padding: var(--space-6);
  color: var(--ink);
  text-decoration: none;
}

.ppm-list-card:hover,
.ppm-list-card:focus-visible {
  border-color: color-mix(in srgb, var(--green-800) 30%, var(--line));
  color: var(--green-800);
  outline: 0;
}

.ppm-list-card span,
.ppm-list-card small,
.ppm-muted {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.ppm-project-table strong {
  font-weight: 700;
}

.ppm-project-name-link {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.ppm-project-name-link:hover,
.ppm-project-name-link:focus-visible {
  color: var(--green-800);
  outline: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ppm-roadmap-section {
  overflow: hidden;
}

.ppm-roadmap-heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
}

.ppm-roadmap-export-button {
  white-space: nowrap;
}

.ppm-roadmap {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(var(--roadmap-timeline-width), 1fr);
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.ppm-roadmap-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.ppm-roadmap-kpis div {
  min-height: 58px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  padding: var(--space-3);
}

.ppm-roadmap-kpis span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.ppm-roadmap-kpis strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1;
}

.ppm-roadmap-kpis .is-attention {
  border-color: color-mix(in srgb, var(--orange-500) 36%, var(--line-soft));
  background: color-mix(in srgb, var(--orange-100) 36%, var(--color-surface));
}

.ppm-roadmap-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  padding: var(--space-3) var(--space-4);
}

.ppm-roadmap-filters-title {
  align-self: center;
  color: var(--ink);
  font-size: 0.86rem;
}

.ppm-roadmap-filters fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-width: min(100%, 260px);
  margin: 0;
  border: 0;
  padding: 0;
}

.ppm-roadmap-filters legend {
  width: 100%;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
}

.ppm-roadmap-filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  background: var(--color-surface-muted);
  color: var(--ink);
  padding: 0 var(--space-3);
  font-size: 0.78rem;
  cursor: pointer;
}

.ppm-roadmap-filters input {
  accent-color: var(--green-800);
}

.ppm-roadmap-filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  color: var(--muted);
  font-size: 0.78rem;
}

.ppm-roadmap-reset {
  color: var(--green-800);
  font-weight: 700;
  text-decoration: none;
}

.ppm-roadmap-reset:hover,
.ppm-roadmap-reset:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ppm-roadmap-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin-bottom: var(--space-4);
  color: var(--muted);
  font-size: 0.76rem;
}

.ppm-roadmap-legend strong,
.ppm-roadmap-legend > span:not(.ppm-roadmap-legend-item) {
  color: var(--ink);
  font-weight: 750;
}

.ppm-roadmap-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.ppm-roadmap-legend-phase {
  --ppm-work-package-bar-color: color-mix(in srgb, var(--blue-700) 34%, var(--green-100));
  width: 20px;
  height: 9px;
  border: 1px solid color-mix(in srgb, var(--ppm-work-package-bar-color) 64%, var(--color-surface));
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--ppm-work-package-bar-color) 62%, var(--color-surface));
}

.ppm-roadmap-project-head,
.ppm-roadmap-timeline-heading,
.ppm-roadmap-project-cell,
.ppm-roadmap-lane {
  min-height: 44px;
  border-bottom: 1px solid var(--line-soft);
}

.ppm-roadmap-project-head,
.ppm-roadmap-timeline-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--color-surface-muted);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  text-transform: uppercase;
}

.ppm-roadmap-project-head {
  left: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--line-soft);
  background: var(--color-surface);
  padding: 0 var(--space-4);
}

.ppm-roadmap-project-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppm-roadmap-timeline-heading {
  display: grid;
  grid-template-rows: 30px 32px;
  min-width: var(--roadmap-timeline-width);
}

.ppm-roadmap-year-head,
.ppm-roadmap-period-head {
  position: relative;
}

.ppm-roadmap-year-head span,
.ppm-roadmap-period-head span {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  border-left: 1px solid var(--line-soft);
  padding: 0 var(--space-3);
  white-space: nowrap;
}

.ppm-roadmap-year-head span {
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--color-surface-muted) 70%, var(--color-surface));
  color: var(--ink);
  font-size: 0.78rem;
}

.ppm-roadmap-period-head span {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.72rem;
}

.ppm-roadmap-project-cell {
  position: sticky;
  left: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
  border-right: 1px solid var(--line-soft);
  background: var(--color-surface);
  background-clip: padding-box;
  color: var(--ink);
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  box-shadow: 4px 0 10px color-mix(in srgb, var(--color-surface) 82%, transparent);
}

.ppm-roadmap-project-cell.is-alt {
  background: var(--color-surface);
}

.ppm-roadmap-project-cell.is-risk-red {
  border-left: 3px solid var(--red-700);
  background: color-mix(in srgb, var(--red-100) 26%, var(--color-surface));
}

.ppm-roadmap-project-cell.is-risk-amber {
  border-left: 3px solid var(--orange-500);
  background: color-mix(in srgb, var(--orange-100) 28%, var(--color-surface));
}

.ppm-roadmap-project-cell.is-muted-state,
.ppm-roadmap-lane.is-muted-state {
  opacity: 0.68;
}

.ppm-roadmap-project-cell:hover,
.ppm-roadmap-project-cell:focus-visible {
  color: var(--green-800);
  outline: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ppm-roadmap-project-name {
  min-width: 0;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 400;
  line-height: 1.24;
  overflow-wrap: anywhere;
  white-space: normal;
}

.ppm-roadmap-project-icons {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.ppm-roadmap-health-icon {
  width: 10px;
  height: 10px;
  border: 1px solid color-mix(in srgb, var(--color-surface) 72%, var(--line));
  border-radius: var(--radius-pill);
  background: var(--muted);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-surface) 88%, transparent);
}

.ppm-roadmap-health-icon.is-health-green {
  background: var(--green-600);
}

.ppm-roadmap-health-icon.is-health-amber {
  background: var(--orange-500);
}

.ppm-roadmap-health-icon.is-health-red {
  background: var(--red-700);
}

.ppm-roadmap-health-icon.is-health-not_assessed,
.ppm-roadmap-health-icon.is-health-not-assessed {
  background: var(--muted);
}

.ppm-roadmap-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-surface-muted) 72%, var(--color-surface));
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  font-style: normal;
  line-height: 1;
}

.ppm-roadmap-status-icon.is-status-active {
  color: var(--green-800);
}

.ppm-roadmap-status-icon.is-status-on_hold,
.ppm-roadmap-status-icon.is-status-on-hold {
  color: var(--orange-800);
}

.ppm-roadmap-status-icon.is-status-completed {
  color: var(--blue-700);
}

.ppm-roadmap-status-icon.is-status-cancelled {
  color: var(--red-700);
}

.ppm-roadmap-lane {
  position: relative;
  min-width: var(--roadmap-timeline-width);
  overflow: hidden;
}

.ppm-roadmap-lane.is-alt {
  background: color-mix(in srgb, var(--color-surface-muted) 32%, transparent);
}

.ppm-roadmap-lane.is-risk-red {
  background: color-mix(in srgb, var(--red-100) 14%, transparent);
}

.ppm-roadmap-lane.is-risk-amber {
  background: color-mix(in srgb, var(--orange-100) 16%, transparent);
}

.ppm-roadmap-lane::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--color-surface-muted) 22%, transparent), transparent);
  pointer-events: none;
}

.ppm-roadmap-period-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 1px;
  background: color-mix(in srgb, var(--line) 78%, var(--ink));
  pointer-events: none;
}

.ppm-roadmap-month-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 1px;
  background: color-mix(in srgb, var(--line-soft) 54%, transparent);
  pointer-events: none;
}

.ppm-roadmap-month-marker.is-quarter-start {
  background: transparent;
}

.ppm-roadmap-bar {
  --ppm-work-package-bar-color: color-mix(in srgb, var(--blue-700) 34%, var(--green-100));
  position: absolute;
  z-index: 3;
  top: 50%;
  display: flex;
  align-items: center;
  min-width: 28px;
  max-width: 100%;
  height: 24px;
  transform: translateY(-50%);
  border: 1px solid color-mix(in srgb, var(--ppm-work-package-bar-color) 76%, var(--color-surface));
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--ppm-work-package-bar-color) 58%, var(--color-surface));
  color: color-mix(in srgb, var(--ink) 76%, var(--ppm-work-package-bar-color));
  padding: 0 var(--space-2);
  font-size: 0.7rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}

.ppm-roadmap-bar:hover,
.ppm-roadmap-bar:focus-visible {
  filter: saturate(1.04) brightness(0.99);
  outline: 2px solid color-mix(in srgb, var(--ppm-work-package-bar-color) 44%, var(--line));
  outline-offset: 2px;
}

.ppm-roadmap-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppm-roadmap-missing {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.ppm-roadmap-empty-lane {
  position: absolute;
  top: 50%;
  left: var(--space-4);
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
}

.ppm-project-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: flex-end;
}

.ppm-project-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xs);
  background: var(--color-surface);
  color: var(--blue-950);
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
}

.ppm-project-action-icon:hover,
.ppm-project-action-icon:focus-visible {
  border-color: color-mix(in srgb, var(--green-800) 38%, var(--line));
  color: var(--green-800);
  outline: 0;
}

.ppm-action-gantt {
  display: grid;
  gap: 2px;
  width: 17px;
}

.ppm-action-gantt span {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.ppm-action-gantt span:nth-child(1) {
  width: 12px;
}

.ppm-action-gantt span:nth-child(2) {
  width: 15px;
  margin-left: 2px;
}

.ppm-action-gantt span:nth-child(3) {
  width: 10px;
  margin-left: 6px;
}

.ppm-action-finance {
  position: relative;
  width: 17px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.ppm-action-finance::before {
  content: "";
  position: absolute;
  top: 3px;
  right: -2px;
  width: 4px;
  height: 5px;
  border: 2px solid currentColor;
  border-left: 0;
  border-radius: 0 4px 4px 0;
  background: var(--color-surface);
}

.ppm-action-finance::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 5px;
  top: 4px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.ppm-action-people {
  position: relative;
  width: 18px;
  height: 15px;
}

.ppm-action-people span::before,
.ppm-action-people span::after {
  content: "";
  position: absolute;
  border: 2px solid currentColor;
}

.ppm-action-people span::before {
  top: 0;
  width: 6px;
  height: 6px;
  border-radius: 999px;
}

.ppm-action-people span::after {
  bottom: 0;
  width: 8px;
  height: 5px;
  border-radius: 6px 6px 2px 2px;
}

.ppm-action-people span:first-child::before,
.ppm-action-people span:first-child::after {
  left: 0;
}

.ppm-action-people span:last-child::before,
.ppm-action-people span:last-child::after {
  right: 0;
}

.ppm-action-raid {
  font-size: 1rem;
  font-weight: 850;
  line-height: 1;
}

.profile-workspace {
  max-width: 980px;
  margin: 0 auto;
}

.profile-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.profile-form {
  max-width: 860px;
}

.admin-shell {
  display: grid;
  grid-template-columns: var(--admin-sidebar-width) minmax(0, 1fr);
  gap: 0;
  min-height: calc(100vh - var(--topbar-height));
  background: var(--color-page);
}

.admin-sidebar {
  border-right: 1px solid var(--line);
  background: var(--color-surface);
}

.admin-nav {
  position: sticky;
  top: var(--topbar-height);
  display: grid;
  gap: 4px;
  max-height: calc(100vh - var(--topbar-height));
  overflow: auto;
  padding: 14px 10px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  border-radius: var(--radius-xs);
  color: var(--color-subtle);
  padding: 0 11px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}

.admin-nav-link:hover,
.admin-nav-link:focus-visible {
  background: var(--color-surface-hover);
  color: var(--green-800);
}

.admin-nav-link:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.admin-nav-link.active {
  background: var(--green-100);
  color: var(--green-800);
}

.admin-main {
  min-width: 0;
  padding: var(--admin-main-padding);
}

.admin-mobile-menu {
  display: none;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.admin-mobile-menu summary {
  min-height: var(--touch-height);
  padding: 12px 14px;
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
}

.admin-mobile-nav {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line-soft);
  padding: 8px;
}

.admin-panel {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.admin-panel h1 {
  margin-bottom: var(--space-3);
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  letter-spacing: 0;
}

.admin-panel.wide {
  width: 100%;
}

.admin-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-7);
  margin-bottom: var(--space-7);
}

.admin-header-actions {
  justify-content: flex-end;
}

.admin-header-actions .primary {
  order: 1;
}

.admin-header-actions .button-link:not(.primary) {
  order: 0;
}

.admin-tertiary-link {
  order: 2;
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.admin-tertiary-link:hover,
.admin-tertiary-link:focus-visible {
  color: var(--green-800);
  outline: 0;
}

.admin-panel-heading .btn:disabled,
.admin-action:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.admin-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-6) 0 var(--space-7);
}

.admin-section-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, var(--blue-100));
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-subtle);
  padding: 0 12px;
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

.admin-section-tabs a:hover,
.admin-section-tabs a:focus-visible {
  border-color: color-mix(in srgb, var(--green-800) 32%, var(--line));
  color: var(--green-800);
  outline: 0;
}

.admin-data-section {
  display: grid;
  gap: var(--space-5);
  border-top: 1px solid var(--line-soft);
  padding-top: var(--space-6);
  margin-top: var(--space-6);
}

.admin-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.admin-section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
}

.admin-section-heading span,
.admin-empty {
  color: var(--muted);
  font-size: 0.86rem;
}

.ppm-gantt-workspace {
  --gantt-label-column-width: 280px;
  --gantt-label-column-min: 260px;
  --gantt-label-column-max: 600px;
  --gantt-task-row-height: 40px;
  --gantt-group-row-height: 46px;
  --gantt-current-row-height: var(--gantt-task-row-height);
  --gantt-day-width: 10px;
  --gantt-timeline-width: 720px;
  --gantt-sticky-header-top: var(--topbar-height);
  --gantt-weight-title: 650;
  --gantt-weight-label: 600;
  --gantt-weight-task: 550;
  --gantt-weight-muted: 450;
  --gantt-grid-unit: color-mix(in srgb, var(--line-soft) 48%, transparent);
  --gantt-grid-month: color-mix(in srgb, var(--line-soft) 86%, transparent);
  --gantt-grid-month-end: color-mix(in srgb, var(--line-soft) 96%, var(--muted));
  --gantt-unit-grid: linear-gradient(90deg, transparent 0 100%);
  --gantt-month-grid: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 119px,
    var(--line-soft) 120px
  );
  position: relative;
  display: grid;
  grid-template-columns: minmax(var(--gantt-label-column-min), var(--gantt-label-column-width)) minmax(0, 1fr);
  align-content: start;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: visible;
}

.ppm-gantt-label-pane {
  position: relative;
  min-width: 0;
  border-right: 1px solid var(--line-soft);
  background: var(--color-surface);
}

.ppm-gantt-label-resize-handle {
  position: absolute;
  top: 0;
  right: -6px;
  bottom: 0;
  z-index: 9;
  display: flex;
  justify-content: center;
  width: 12px;
  border: 0;
  background: transparent;
  cursor: col-resize;
  opacity: 0.18;
  touch-action: none;
}

.ppm-gantt-label-resize-handle::before {
  content: "";
  width: 2px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--green-800) 50%, var(--line-soft));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-surface) 76%, transparent);
}

.ppm-gantt-workspace[data-gantt-edit-mode="1"] .ppm-gantt-label-resize-handle,
.ppm-gantt-label-resize-handle:focus-visible,
.ppm-gantt-label-resize-handle:hover {
  opacity: 0.9;
}

.ppm-gantt-label-resize-handle:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.ppm-gantt-workspace.is-resizing-label-column {
  cursor: col-resize;
  user-select: none;
}

.ppm-gantt-timeline-pane {
  min-width: 0;
}

.ppm-gantt-timeline-viewport {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-y: none;
}

.ppm-gantt-timeline-canvas {
  position: relative;
  width: var(--gantt-timeline-width);
  min-width: var(--gantt-timeline-width);
}

.ppm-gantt-timeline-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--gantt-month-grid), var(--gantt-unit-grid);
  background-repeat: no-repeat, no-repeat;
  background-size: var(--gantt-timeline-width) 100%, var(--gantt-timeline-width) 100%;
  pointer-events: none;
}

.ppm-gantt-dependency-html-overlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  width: var(--gantt-timeline-width);
  min-width: var(--gantt-timeline-width);
  overflow: visible;
  pointer-events: none;
}

.ppm-dependency-link {
  --dependency-color: var(--blue-700);
  --dependency-thickness: 2px;
  position: absolute;
  inset: 0;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

.ppm-dependency-link--conflict {
  --dependency-color: var(--red-700);
  --dependency-thickness: 3px;
}

.ppm-dependency-segment {
  position: absolute;
  border-radius: var(--radius-pill);
  background: var(--dependency-color);
  opacity: 0.82;
}

.ppm-dependency-link--conflict .ppm-dependency-segment {
  opacity: 0.94;
}

.ppm-dependency-segment--horizontal {
  height: var(--dependency-thickness);
}

.ppm-dependency-segment--vertical {
  width: var(--dependency-thickness);
}

.ppm-dependency-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--dependency-color);
  pointer-events: none;
}

.ppm-dependency-debug-panel {
  position: absolute;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 4;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  color: var(--color-subtle);
  box-shadow: var(--shadow-soft);
  padding: var(--space-2) var(--space-4);
  font-size: 0.74rem;
  font-weight: var(--gantt-weight-muted);
  pointer-events: none;
  white-space: pre-wrap;
}

.ppm-gantt-month-end-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.ppm-gantt-month-end-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--month-end-offset);
  width: 1px;
  background-image: repeating-linear-gradient(
    0deg,
    var(--gantt-grid-month-end) 0,
    var(--gantt-grid-month-end) 3px,
    transparent 3px,
    transparent 7px
  );
}

.ppm-gantt-today-marker {
  position: absolute;
  top: 0;
  left: var(--today-offset);
  z-index: 2;
  width: 2px;
  min-height: 100%;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--red-700) 82%, var(--orange-500));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-surface) 72%, transparent);
  opacity: 0.78;
  pointer-events: none;
}

.ppm-gantt-label-header,
.ppm-gantt-timeline-header {
  position: sticky;
  top: var(--gantt-sticky-header-top);
  z-index: 6;
  height: 42px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--color-surface);
  color: var(--color-subtle);
  font-size: 0.78rem;
  font-weight: var(--gantt-weight-label);
  text-transform: uppercase;
}

.ppm-gantt-timeline-header {
  overflow: hidden;
  z-index: 7;
}

.ppm-gantt-label-header {
  z-index: 8;
}

.ppm-gantt-timeline-header-track {
  position: relative;
  width: var(--gantt-timeline-width);
  min-width: var(--gantt-timeline-width);
  transform: translateX(0);
  will-change: transform;
}

.ppm-gantt-today-label {
  position: absolute;
  top: 4px;
  left: var(--today-offset);
  z-index: 2;
  max-width: 92px;
  transform: translateX(6px);
  border: 1px solid color-mix(in srgb, var(--red-700) 42%, transparent);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  color: color-mix(in srgb, var(--red-700) 86%, var(--ink));
  padding: 2px var(--space-2);
  font-size: 0.68rem;
  font-weight: var(--gantt-weight-label);
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
  pointer-events: none;
}

.ppm-gantt-label-header,
.ppm-gantt-task-label,
.ppm-gantt-group-label {
  display: flex;
  align-items: center;
  padding: 0 var(--space-5);
}

.ppm-gantt-empty-row {
  height: 240px;
}

.ppm-gantt-task-row {
  --gantt-current-row-height: var(--gantt-task-row-height);
  height: var(--gantt-task-row-height);
}

.ppm-gantt-group-row {
  --gantt-current-row-height: var(--gantt-group-row-height);
  height: var(--gantt-group-row-height);
  border-top: 1px solid color-mix(in srgb, var(--line-soft) 72%, transparent);
  background: color-mix(in srgb, var(--blue-100) 42%, var(--color-surface));
}

.ppm-gantt-task-label {
  height: 100%;
  align-items: center;
  background: var(--color-surface);
  color: var(--muted);
  font-size: 0.9rem;
  gap: var(--space-3);
}

.ppm-gantt-task-row.is-nested .ppm-gantt-task-label {
  padding-left: calc(var(--space-5) + var(--wbs-indent, 0px));
}

.ppm-gantt-group-label {
  height: 100%;
  align-items: center;
  gap: var(--space-3);
  padding-left: calc(var(--space-5) + var(--wbs-indent, 0px));
  background: color-mix(in srgb, var(--blue-100) 42%, var(--color-surface));
  color: var(--ink);
}

.ppm-gantt-group-label strong {
  overflow: hidden;
  font-size: 0.9rem;
  font-weight: var(--gantt-weight-title);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppm-gantt-group-label span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: var(--gantt-weight-muted);
}

.ppm-phase-badge {
  --ppm-phase-badge-bg: color-mix(in srgb, var(--green-100) 42%, var(--color-surface));
  --ppm-phase-badge-text: color-mix(in srgb, var(--green-800) 84%, var(--ink));
  --ppm-phase-badge-border: color-mix(in srgb, var(--green-800) 22%, var(--line-soft));
  --ppm-work-package-bar-color: color-mix(in srgb, var(--blue-700) 34%, var(--green-100));
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--ppm-phase-badge-border);
  border-radius: var(--radius-pill);
  background: var(--ppm-phase-badge-bg);
  color: var(--ppm-phase-badge-text);
  padding: 2px var(--space-2);
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.ppm-phase-badge--ideation {
  --ppm-phase-badge-bg: #F3E8FF;
  --ppm-phase-badge-text: #6B21A8;
  --ppm-phase-badge-border: #C084FC;
  --ppm-work-package-bar-color: #C084FC;
}

.ppm-phase-badge--discovery {
  --ppm-phase-badge-bg: #DBEAFE;
  --ppm-phase-badge-text: #1D4ED8;
  --ppm-phase-badge-border: #60A5FA;
  --ppm-work-package-bar-color: #60A5FA;
}

.ppm-phase-badge--execute {
  --ppm-phase-badge-bg: #DCFCE7;
  --ppm-phase-badge-text: #15803D;
  --ppm-phase-badge-border: #4ADE80;
  --ppm-work-package-bar-color: #4ADE80;
}

.ppm-phase-badge--rollout {
  --ppm-phase-badge-bg: #FFEDD5;
  --ppm-phase-badge-text: #C2410C;
  --ppm-phase-badge-border: #FB923C;
  --ppm-work-package-bar-color: #FB923C;
}

.ppm-phase-badge--run {
  --ppm-phase-badge-bg: #CCFBF1;
  --ppm-phase-badge-text: #0F766E;
  --ppm-phase-badge-border: #2DD4BF;
  --ppm-work-package-bar-color: #2DD4BF;
}

.ppm-gantt-group-label .ppm-work-package-phase-badge {
  flex: 0 0 auto;
}

.ppm-work-package-phase-preview {
  margin-top: var(--space-1);
}

.ppm-gantt-group-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--color-subtle);
  font-size: 0.86rem;
  font-weight: var(--gantt-weight-label);
  line-height: 1;
  cursor: pointer;
}

.ppm-gantt-group-toggle:hover,
.ppm-gantt-group-toggle:focus-visible {
  background: var(--color-surface-hover);
  color: var(--green-800);
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.ppm-gantt-task-label strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: var(--gantt-weight-task);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppm-task-edit-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xs);
  background: var(--color-surface);
  color: var(--color-subtle);
  font-size: 0.82rem;
  font-weight: var(--gantt-weight-label);
  line-height: 1;
  text-decoration: none;
}

.ppm-gantt-order-form {
  margin: 0;
}

.ppm-gantt-order-button:disabled {
  cursor: default;
  opacity: 0.38;
}

.ppm-task-edit-icon:hover,
.ppm-task-edit-icon:focus-visible {
  border-color: color-mix(in srgb, var(--green-800) 36%, var(--line));
  color: var(--green-800);
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.ppm-gantt-scale,
.ppm-gantt-empty-timeline {
  width: 100%;
  min-width: 100%;
}

.ppm-gantt-scale {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 42px;
  background-image: var(--gantt-month-grid), var(--gantt-unit-grid);
  background-repeat: no-repeat;
  background-size: var(--gantt-timeline-width) 100%, var(--gantt-timeline-width) 100%;
}

.ppm-gantt-scale span {
  display: flex;
  flex: 0 0 var(--unit-width, var(--month-width));
  align-items: center;
  min-width: 0;
  overflow: hidden;
  padding-left: var(--space-3);
  font-weight: var(--gantt-weight-label);
  line-height: 1.15;
  white-space: nowrap;
}

.ppm-gantt-scale span.is-week {
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  padding-left: var(--space-2);
  text-transform: none;
}

.ppm-gantt-scale span.is-week strong,
.ppm-gantt-scale span.is-week small {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppm-gantt-scale span.is-week strong {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: var(--gantt-weight-label);
}

.ppm-gantt-scale span.is-week small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: var(--gantt-weight-muted);
}

.ppm-gantt-empty-timeline {
  position: relative;
  z-index: 1;
  height: 240px;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 47px,
      var(--line-soft) 48px
    );
  background-repeat: repeat;
  background-size: auto;
}

.ppm-gantt-row-track {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 100%;
  height: 100%;
  min-height: var(--gantt-current-row-height);
  background: transparent;
}

.ppm-gantt-bar {
  position: absolute;
  top: calc((var(--gantt-current-row-height) - 18px) / 2);
  left: var(--task-offset);
  display: flex;
  align-items: center;
  width: var(--task-width);
  min-width: var(--gantt-day-width);
  height: 18px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--green-800) 78%, var(--color-surface));
  color: var(--color-surface);
  padding: 0 var(--space-3);
  font-size: 0.72rem;
  font-weight: var(--gantt-weight-task);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ppm-gantt-bar.is-status-not_started {
  background: color-mix(in srgb, var(--muted) 42%, var(--color-surface));
  color: var(--ink);
}

.ppm-gantt-bar.is-status-in_progress {
  background: color-mix(in srgb, var(--green-800) 78%, var(--color-surface));
}

.ppm-gantt-bar.is-status-completed {
  background: color-mix(in srgb, var(--green-600) 82%, var(--color-surface));
}

.ppm-gantt-bar.is-status-on_hold {
  background: color-mix(in srgb, var(--orange-500) 72%, var(--color-surface));
  color: var(--blue-950);
}

.ppm-gantt-bar.is-status-blocked,
.ppm-gantt-bar.is-overdue {
  background: color-mix(in srgb, var(--red-700) 76%, var(--color-surface));
}

.ppm-gantt-bar.is-status-cancelled {
  background: color-mix(in srgb, var(--muted) 30%, var(--color-surface));
  color: var(--muted);
}

.ppm-gantt-bar.is-dependency-conflict,
.ppm-gantt-marker.is-dependency-conflict {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--red-700) 32%, transparent);
}

.ppm-gantt-group-bar {
  --ppm-work-package-bar-color: color-mix(in srgb, var(--blue-700) 34%, var(--green-100));
  height: 12px;
  top: calc((var(--gantt-current-row-height) - 12px) / 2);
  border: 1px solid color-mix(in srgb, var(--ppm-work-package-bar-color) 76%, var(--color-surface));
  background: color-mix(in srgb, var(--ppm-work-package-bar-color) 72%, var(--color-surface));
  color: transparent;
}

.ppm-work-package-bar--ideation {
  --ppm-work-package-bar-color: #C084FC;
}

.ppm-work-package-bar--discovery {
  --ppm-work-package-bar-color: #60A5FA;
}

.ppm-work-package-bar--execute {
  --ppm-work-package-bar-color: #4ADE80;
}

.ppm-work-package-bar--rollout {
  --ppm-work-package-bar-color: #FB923C;
}

.ppm-work-package-bar--run {
  --ppm-work-package-bar-color: #2DD4BF;
}

.ppm-gantt-marker {
  position: absolute;
  top: 50%;
  left: var(--task-offset);
  width: 14px;
  height: 14px;
  border: 2px solid color-mix(in srgb, var(--green-800) 76%, var(--color-surface));
  background: var(--color-surface);
  transform: translate(-50%, -50%) rotate(45deg);
}

.ppm-gantt-marker.is-type-strict_milestone {
  width: 22px;
  height: 22px;
  border: 0;
  background: color-mix(in srgb, var(--orange-100) 36%, var(--color-surface));
  color: color-mix(in srgb, var(--orange-800) 86%, var(--ink));
  transform: translate(-50%, -50%);
}

.ppm-gantt-marker.is-type-deliverable {
  width: 20px;
  height: 22px;
  border: 0;
  background: color-mix(in srgb, var(--green-100) 58%, var(--color-surface));
  color: color-mix(in srgb, var(--blue-700) 80%, var(--ink));
  transform: translate(-50%, -50%);
}

.ppm-gantt-marker svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ppm-gantt-marker.is-type-completion_milestone {
  width: 22px;
  height: 20px;
  border: 0;
  background: none;
  transform: translate(-35%, -50%);
}

.ppm-gantt-marker.is-type-completion_milestone::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2px;
  height: 20px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--ink) 70%, var(--color-surface));
}

.ppm-gantt-marker.is-type-completion_milestone::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 1px;
  width: 17px;
  height: 12px;
  border: 1px solid color-mix(in srgb, var(--ink) 48%, var(--color-surface));
  border-radius: 1px;
  background:
    linear-gradient(45deg, var(--ink) 25%, transparent 25% 50%, var(--ink) 50% 75%, transparent 75%),
    var(--color-surface);
  background-size: 6px 6px;
}

.ppm-gantt-marker.is-status-completed {
  border-color: color-mix(in srgb, var(--green-600) 82%, var(--color-surface));
}

.ppm-gantt-marker.is-status-blocked,
.ppm-gantt-marker.is-overdue {
  border-color: color-mix(in srgb, var(--red-700) 76%, var(--color-surface));
  background: color-mix(in srgb, var(--red-100) 66%, var(--color-surface));
}

.ppm-gantt-marker.is-type-completion_milestone.is-status-blocked,
.ppm-gantt-marker.is-type-completion_milestone.is-overdue {
  background: none;
}

.ppm-toast {
  position: fixed;
  top: calc(var(--topbar-height) + var(--space-4));
  right: var(--space-6);
  z-index: 45;
  max-width: min(420px, calc(100vw - var(--space-6) * 2));
  border: 1px solid color-mix(in srgb, var(--green-800) 30%, var(--line));
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--green-800);
  box-shadow: var(--shadow-soft);
  padding: var(--space-3) var(--space-5);
  font-size: 0.86rem;
  font-weight: var(--gantt-weight-label);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.ppm-dependency-conflict-badge {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--red-100) 72%, var(--color-surface));
  color: var(--red-700);
  font-size: 0.76rem;
  font-weight: 650;
}

.ppm-dependency-section {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface) 88%, var(--blue-100));
}

.ppm-dependency-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.ppm-dependency-columns h4 {
  margin: 0 0 var(--space-2);
  color: var(--color-subtle);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
}

.ppm-dependency-item {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.ppm-dependency-item.is-conflict {
  border-color: color-mix(in srgb, var(--red-700) 34%, var(--line-soft));
}

.ppm-dependency-conflict {
  margin: 0;
  color: var(--red-700);
  font-size: 0.82rem;
  font-weight: 550;
}

.ppm-dependency-conflict-panel {
  gap: var(--space-5);
}

.ppm-dependency-conflict-list {
  display: grid;
  gap: var(--space-4);
}

.ppm-dependency-conflict-item {
  display: grid;
  gap: var(--space-3);
  border: 1px solid color-mix(in srgb, var(--red-700) 24%, var(--line-soft));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-surface) 90%, var(--red-100));
  padding: var(--space-4);
}

.ppm-dependency-conflict-item h3,
.ppm-dependency-conflict-item p,
.ppm-dependency-conflict-item ul {
  margin: 0;
}

.ppm-dependency-conflict-item h3 {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 620;
}

.ppm-dependency-conflict-meta,
.ppm-dependency-conflict-dates {
  color: var(--color-subtle);
  font-size: 0.82rem;
}

.ppm-dependency-conflict-details {
  display: grid;
  gap: var(--space-1);
  padding-left: var(--space-5);
  color: var(--red-700);
  font-size: 0.84rem;
}

.ppm-gantt-bar.is-conflict-focus,
.ppm-gantt-marker.is-conflict-focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.ppm-dependency-form,
.ppm-dependency-delete-form {
  display: grid;
  gap: var(--space-3);
}

.ppm-toast.is-hiding {
  opacity: 0;
  transform: translateY(-6px);
}

.ppm-side-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: color-mix(in srgb, var(--ink) 16%, transparent);
}

.ppm-side-panel-overlay[hidden],
.ppm-side-panel[hidden] {
  display: none;
}

.ppm-side-panel {
  position: fixed;
  top: var(--topbar-height);
  right: 0;
  z-index: 40;
  display: grid;
  align-content: start;
  gap: var(--space-5);
  width: min(92vw, 500px);
  height: calc(100vh - var(--topbar-height));
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: var(--space-6);
}

.ppm-side-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}

.ppm-side-panel-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.2rem;
}

.ppm-side-panel-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.ppm-side-panel-close:hover,
.ppm-side-panel-close:focus-visible {
  color: var(--green-800);
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

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

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: var(--font-size-table);
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line-soft);
  padding: var(--table-cell-padding-y) var(--table-cell-padding-x);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--color-subtle);
  font-weight: 650;
  white-space: nowrap;
}

.admin-table td {
  color: var(--ink);
}

.admin-action {
  min-height: 30px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, var(--blue-100));
  border-radius: var(--radius-xs);
  background: var(--color-surface);
  color: var(--ink);
  padding: 0 9px;
  font-size: 0.8rem;
  font-weight: 650;
}

.admin-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-xs);
  background: var(--color-surface);
  color: var(--blue-950);
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.admin-action-link.compact {
  min-height: 28px;
  border-color: var(--line-soft);
  padding: 0 var(--space-3);
  font-size: 0.78rem;
}

.admin-action-link:hover,
.admin-action-link:focus-visible {
  border-color: color-mix(in srgb, var(--green-800) 38%, var(--line));
  color: var(--green-800);
  outline: 0;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.admin-detail-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
  padding: var(--space-5);
}

.admin-detail-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.admin-detail-grid strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.org-tree,
.org-tree-children {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.org-tree {
  margin-top: var(--space-6);
}

.org-tree-children {
  margin-top: var(--space-3);
}

.org-tree-children[hidden] {
  display: none;
}

.org-tree-item {
  min-width: 0;
}

.org-tree-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-5);
  align-items: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  padding: var(--space-4) var(--space-5);
  margin-left: calc(var(--tree-depth, 0) * var(--tree-indent));
}

.org-tree-main,
.org-tree-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.org-tree-main strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.org-tree-main span,
.org-tree-meta span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.org-tree-toggle,
.org-tree-leaf {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
}

.org-tree-toggle {
  display: grid;
  place-items: center;
  min-height: 24px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--green-800);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.org-tree-toggle:hover,
.org-tree-toggle:focus-visible {
  background: var(--color-surface-hover);
  outline: 2px solid var(--color-focus);
  outline-offset: 1px;
}

.org-tree-toggle::before {
  content: "▸";
  font-size: 0.9rem;
  line-height: 1;
}

.org-tree-toggle[aria-expanded="true"]::before {
  content: "▾";
}

.org-tree-leaf {
  display: inline-block;
  width: 24px;
  height: 24px;
}

.org-tree-meta .admin-action-link {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
}

.org-unit-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  background: var(--color-surface-soft);
  color: var(--color-subtle);
  padding: 0 var(--space-3);
  font-size: 0.74rem;
  font-weight: 650;
}

.org-unit-badge.status.active {
  border-color: color-mix(in srgb, var(--green-800) 20%, var(--green-100));
  background: var(--green-100);
  color: var(--green-800);
}

.org-unit-badge.status.inactive {
  border-color: color-mix(in srgb, var(--red-700) 18%, var(--red-100));
  background: var(--red-100);
  color: var(--red-700);
}

.org-unit-manager {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.app-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.app-tab {
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-subtle);
  padding: 8px 11px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.app-tab.active {
  border-color: color-mix(in srgb, var(--green-800) 24%, var(--line));
  background: var(--color-surface);
  color: var(--green-800);
  box-shadow: var(--shadow-soft);
}

.top-actions,
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.btn,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  border: 1px solid var(--color-control-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--blue-950);
  padding: 0 12px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.btn.primary,
.button-link.primary {
  border-color: var(--blue-800);
  background: var(--color-surface-soft);
}

.button-link.danger {
  border-color: color-mix(in srgb, var(--red-700) 24%, var(--red-100));
  background: color-mix(in srgb, var(--red-100) 44%, var(--color-surface));
  color: var(--red-700);
}

.page-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(14px, 3vw, 28px);
}

.center-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(14px, 3vw, 28px);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.status-card,
.form-card {
  width: min(94vw, 780px);
  overflow: hidden;
}

.split-card {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 360px;
}

.card-rail {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-12);
  padding: var(--space-10);
  border-right: 1px solid var(--line);
  background: var(--gradient-rail);
}

.card-content {
  padding: var(--content-padding);
}

.kicker {
  margin-bottom: 8px;
  color: var(--green-800);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
}

.lead {
  margin-bottom: 20px;
  font-size: 1rem;
}

.mt-24 {
  margin-top: 24px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-16 {
  margin-top: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  width: max-content;
  border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-3);
  font-size: 0.76rem;
  font-weight: 650;
}

.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
}

.badge.ok,
.notice {
  border: 1px solid color-mix(in srgb, var(--green-800) 22%, var(--green-100));
  background: var(--green-100);
  color: var(--green-800);
}

.badge.ok::before {
  background: var(--green-800);
}

.badge.pending {
  border: 1px solid color-mix(in srgb, var(--orange-800) 24%, var(--orange-100));
  background: var(--orange-100);
  color: var(--orange-800);
}

.badge.pending::before {
  background: var(--orange-500);
}

.badge.risk,
.errors {
  border: 1px solid color-mix(in srgb, var(--red-700) 24%, var(--red-100));
  background: var(--red-100);
  color: var(--red-700);
}

.badge.risk::before {
  background: var(--red-700);
}

.notice,
.errors {
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
}

.form-grid {
  display: grid;
  gap: var(--space-6);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.input-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
}

label {
  display: grid;
  gap: var(--space-2);
  color: var(--color-subtle);
  font-size: 0.82rem;
  font-weight: 600;
}

.field-hint {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.3;
}

.required-label::after {
  content: " *";
  color: var(--red-700);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--color-field-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--ink);
  padding: var(--space-4) var(--space-4);
}

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

.choice-group {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.choice-label {
  margin: 0;
  color: var(--color-subtle);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.radio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.radio-card {
  position: relative;
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: var(--space-4);
  min-height: 68px;
  border: 1px solid var(--color-field-border);
  border-radius: var(--radius-lg);
  background: var(--gradient-control);
  padding: var(--space-4) var(--space-5);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-control);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.radio-card:hover {
  border-color: color-mix(in srgb, var(--green-800) 38%, var(--line));
  box-shadow: var(--shadow-control-hover);
  transform: translateY(-1px);
}

.radio-card:has(input:checked) {
  border-color: var(--green-600);
  background: var(--gradient-control-selected);
  box-shadow: var(--shadow-control-selected);
}

.radio-card input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.radio-control {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid color-mix(in srgb, var(--blue-800) 24%, var(--line));
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  box-shadow: inset 0 0 0 4px var(--color-surface);
}

.radio-control::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: transparent;
}

.radio-card input[type="radio"]:focus-visible + .radio-control {
  outline: 2px solid color-mix(in srgb, var(--green-600) 32%, transparent);
  outline-offset: 2px;
}

.radio-card input[type="radio"]:checked + .radio-control {
  border-color: var(--green-800);
  background: var(--green-800);
}

.radio-card input[type="radio"]:checked + .radio-control::after {
  background: var(--color-surface);
}

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

.radio-title {
  color: var(--blue-950);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.2;
}

.radio-description {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.25;
}

@media (max-width: 760px) {
  .app-topbar,
  .split-card,
  .field-grid,
  .ppm-dependency-columns,
  .input-action-row,
  .radio-grid {
    grid-template-columns: 1fr;
  }

  .app-topbar {
    position: static;
    padding: 12px 14px;
  }

  .admin-shell {
    display: block;
    min-height: calc(100vh - 56px);
  }

  .home-topbar {
    flex-wrap: wrap;
    min-height: auto;
  }

  .ppm-top-actions {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    padding-top: var(--space-2);
  }

  .ppm-workspace {
    padding: var(--space-6);
  }

  .ppm-page-heading {
    display: grid;
  }

  .ppm-heading-actions {
    justify-content: flex-start;
  }

  .ppm-summary-grid {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    display: none;
  }

  .admin-mobile-menu {
    display: block;
  }

  .card-rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .actions,
  .actions form,
  .actions .btn,
  .actions .button-link {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .home-topbar {
    gap: 10px;
    min-height: 56px;
    padding: 0 14px;
  }

  .home-tenant-name {
    font-size: 0.92rem;
  }

  .ppm-topbar-project {
    flex: 1 1 160px;
  }

  .ppm-topbar-project span {
    font-size: 0.9rem;
  }

  .ppm-project-menu {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .ppm-scale-menu {
    order: 2;
    width: auto;
    margin-left: auto;
  }

  .ppm-edit-mode-button {
    order: 2;
    width: 62px;
    min-width: 62px;
    height: 36px;
    min-height: 36px;
  }

  .ppm-project-menu-button {
    width: 100%;
    justify-content: center;
  }

  .button-link.ppm-scale-menu-button {
    width: 62px;
    min-width: 62px;
    height: 36px;
    min-height: 36px;
  }

  .button-link.ppm-actions-menu-button {
    width: 62px;
    min-width: 62px;
    height: 36px;
    min-height: 36px;
  }

  .segmented-pill-button__chevron {
    flex-basis: 24px;
  }

  .ppm-project-menu-panel {
    right: 0;
    left: 0;
    width: 100%;
  }

  .home-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  .home-menu {
    right: -2px;
    width: min(calc(100vw - 28px), 320px);
  }

  .home-menu-row {
    grid-template-columns: 1fr;
  }

  .home-theme-options {
    grid-template-columns: 1fr;
  }

  .home-menu-submit {
    justify-content: center;
    width: 100%;
  }

  .admin-panel-heading,
  .admin-section-heading {
    display: grid;
  }

  .admin-section-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ppm-gantt-workspace {
    --gantt-label-column-min: 180px;
    --gantt-label-column-width: clamp(180px, 52vw, 320px);
    --gantt-label-column-max: 420px;
    grid-template-columns: minmax(var(--gantt-label-column-min), var(--gantt-label-column-width)) minmax(0, 1fr);
  }

  .ppm-gantt-label-pane {
    min-width: 0;
  }

  .ppm-gantt-timeline-viewport {
    min-width: 0;
  }

  .ppm-gantt-label-header,
  .ppm-gantt-group-label,
  .ppm-gantt-task-label {
    padding: 0 var(--space-4);
  }

  .ppm-gantt-task-label {
    padding: 0 var(--space-4);
  }

  .ppm-side-panel {
    top: 0;
    width: 100vw;
    height: 100vh;
    padding: var(--space-5);
  }

  .ppm-toast {
    top: calc(var(--topbar-height) + var(--space-3));
    right: var(--space-3);
    left: var(--space-3);
    max-width: none;
    text-align: center;
  }

  .admin-table-wrap {
    overflow: visible;
  }

  .admin-table {
    min-width: 0;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table,
  .admin-table tbody,
  .admin-table tr,
  .admin-table td {
    display: block;
    width: 100%;
  }

  .admin-table tr {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    padding: var(--space-3);
    margin-bottom: var(--space-4);
  }

  .admin-table td {
    display: grid;
    grid-template-columns: minmax(92px, 38%) minmax(0, 1fr);
    gap: 8px;
    border-bottom: 0;
    padding: 6px 4px;
  }

  .admin-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 650;
  }

  .org-tree-row {
    grid-template-columns: 1fr;
    margin-left: calc(var(--tree-depth, 0) * 14px);
  }

  .org-tree-main,
  .org-tree-meta {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .org-tree-toggle {
    width: 28px;
  }

  .admin-header-actions {
    justify-content: stretch;
  }

  .admin-header-actions .admin-tertiary-link {
    justify-content: center;
    width: 100%;
  }

  .admin-detail-grid {
    grid-template-columns: 1fr;
  }
}
