:root {
  --bg: #0a0e14;
  --surface: #111820;
  --ink: #e8eef6;
  --muted: #8b9bb0;
  --accent: #2ec8e8;
  --accent-deep: #2b5cff;
  --accent-soft: #16324a;
  --border: #243040;
  --critical: #e07070;
  --high: #e0a050;
  --medium: #8b9bb0;
  --low: #4db88a;
  --font: "Sora", "Segoe UI", sans-serif;
  --font-display: "Source Serif 4", Georgia, serif;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, #12304a 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 0%, #0e1a40 0%, transparent 50%),
    var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
  padding: 0.65rem clamp(0.85rem, 3vw, 2.5rem);
  padding-top: max(0.65rem, env(safe-area-inset-top));
  padding-left: max(clamp(0.85rem, 3vw, 2.5rem), env(safe-area-inset-left));
  padding-right: max(clamp(0.85rem, 3vw, 2.5rem), env(safe-area-inset-right));
  border-bottom: 1px solid var(--border);
  background: #000;
}

.site-area-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.site-area-link {
  flex-shrink: 0;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.site-area-link:hover {
  color: #e8f7ff;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.site-area-link.is-active {
  color: #e8f7ff;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.inline-form {
  display: inline;
  margin: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.brand-logo {
  display: block;
  height: 28px;
  width: auto;
  max-width: min(220px, 55vw);
}

.site-header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  font-size: 0.9rem;
}

.notif-bell {
  position: relative;
}

.notif-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.notif-trigger:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.notif-trigger.has-unread {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.notif-count {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: var(--accent);
  color: #041018;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.05rem;
  text-align: center;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 120;
  width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(24rem, 70vh);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0a1018;
  padding: 0.65rem 0.75rem 0.75rem;
}

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.notif-panel-head strong {
  font-size: 0.9rem;
}

.notif-mark-all {
  margin: 0;
}

.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.notif-list li {
  border-radius: 6px;
}

.notif-list li.is-unread {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.notif-item-form {
  margin: 0;
}

.notif-item {
  display: grid;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.6rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

button.notif-item:hover {
  background: color-mix(in srgb, #fff 5%, transparent);
}

.notif-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.notif-item-body {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.notif-item-meta {
  font-size: 0.7rem;
}

.notif-empty {
  margin: 0.35rem 0 0.15rem;
  font-size: 0.85rem;
}

.user-chip {
  color: var(--muted);
}

.logout-form {
  display: inline;
  margin: 0;
}

.link-btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-btn:hover {
  color: var(--ink);
}

.site-main {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 1.75rem clamp(0.85rem, 3vw, 2.5rem) 3rem;
  padding-left: max(clamp(0.85rem, 3vw, 2.5rem), env(safe-area-inset-left));
  padding-right: max(clamp(0.85rem, 3vw, 2.5rem), env(safe-area-inset-right));
  padding-bottom: max(3rem, calc(2rem + env(safe-area-inset-bottom)));
}

h1 { margin: 0 0 0.35rem; font-size: 1.75rem; letter-spacing: -0.03em; }
h2 { margin: 0 0 0.75rem; font-size: 1.1rem; }

.page-header { margin-bottom: 1.5rem; }
.page-header--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.muted { color: var(--muted); font-size: 0.9rem; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #031018;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 30%, transparent);
  color: #031018;
}

.btn-ghost {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  background: #152030;
  border: 1px solid #3a4d63;
  border-radius: 4px;
  color: #e8eef6;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.form-panel { max-width: 560px; }

.app-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.app-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.field-input,
.app-form select,
.app-form textarea {
  appearance: none;
  background: #0a1018;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.7rem 0.85rem;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.app-form select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 11px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}

.field-input:focus,
.app-form select:focus,
.app-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.field-textarea { resize: vertical; min-height: 6rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.field-error,
.form-error {
  color: var(--critical);
  font-size: 0.85rem;
  font-weight: 400;
}

.form-error {
  padding: 0.65rem 0.8rem;
  background: color-mix(in srgb, #8b2e2e 35%, transparent);
  border: 1px solid color-mix(in srgb, #c45c5c 40%, transparent);
  border-radius: 4px;
}

.panel {
  background: color-mix(in srgb, var(--surface) 92%, #000);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: 1fr; }
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.table-scroll,
.panel:has(> table),
.gantt-chart {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.panel:has(> table) {
  padding-left: 0;
  padding-right: 0;
}

.panel:has(> table) > table,
.panel:has(> table) > h2 {
  margin-left: 1.25rem;
  margin-right: 1.25rem;
}

.panel:has(> table) > table {
  margin-left: 0;
  margin-right: 0;
  min-width: 36rem;
}

.panel:has(> table) > h2,
.panel:has(> table) > .muted,
.panel:has(> table) > p {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.gantt-chart {
  padding: 1rem 1.1rem 1.15rem;
  overflow: hidden;
}

.gantt-filters {
  display: grid;
  grid-template-columns: minmax(10rem, 1.4fr) auto repeat(3, minmax(8rem, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.gantt-filter span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gantt-type-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  align-items: center;
  padding-bottom: 0.35rem;
}

.gantt-type-toggles > span {
  margin: 0;
}

.gantt-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}

.gantt-zoom {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.gantt-zoom-btn.is-active {
  background: var(--accent-soft, rgba(196, 163, 90, 0.16));
  color: var(--accent, #c4a35a);
  font-weight: 600;
}

.gantt-filter-scheduled {
  grid-column: 1 / -1;
  padding-bottom: 0.15rem;
}

.gantt-board {
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: color-mix(in srgb, #0a1018 88%, #12304a);
}

.gantt-side {
  border-right: 1px solid var(--border);
  min-width: 0;
}

.gantt-side-head,
.gantt-time-head {
  height: 2.4rem;
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: color-mix(in srgb, #0a0e14 70%, transparent);
}

.gantt-label-row,
.gantt-bar-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0.25rem 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.gantt-label-row {
  padding-left: calc(0.75rem + var(--indent, 0rem));
}

.gantt-label-row.is-clickable {
  cursor: pointer;
}

.gantt-label-row.is-clickable:hover,
.gantt-label-row.is-clickable:focus-visible {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  outline: none;
}

.gantt-label-title {
  color: var(--ink);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.gantt-bar,
.gantt-diamond {
  cursor: pointer;
  appearance: none;
  font: inherit;
  color: inherit;
}

.gantt-bar:hover,
.gantt-diamond:hover {
  filter: brightness(1.12);
}

.gantt-bar:focus-visible,
.gantt-diamond:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.gantt-label-meta {
  margin-left: auto;
  font-size: 0.75rem;
  white-space: nowrap;
}

.gantt-type-pill {
  flex-shrink: 0;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.gantt-type-pill.type-milestone {
  color: #f0c090;
  border-color: color-mix(in srgb, #f0c090 45%, var(--border));
}

.gantt-type-pill.type-task {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.gantt-type-pill.type-issue {
  color: #9ad0b0;
  border-color: color-mix(in srgb, #9ad0b0 45%, var(--border));
}

.gantt-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.gantt-timeline {
  position: relative;
  min-width: 40rem;
}

.gantt-time-head {
  position: relative;
  padding: 0;
  overflow: hidden;
}

.gantt-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  display: flex;
  align-items: center;
  padding-left: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}

.gantt-bars {
  position: relative;
}

.gantt-bar-row {
  position: relative;
  padding: 0.25rem 0;
}

.gantt-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 2px dashed color-mix(in srgb, #f0c090 75%, transparent);
  z-index: 2;
  pointer-events: none;
}

.gantt-bar {
  position: relative;
  height: 1.55rem;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 0.45rem;
  box-sizing: border-box;
  z-index: 1;
}

.gantt-bar.type-milestone {
  background: color-mix(in srgb, #f0c090 55%, #3a2a18);
  border: 1px solid color-mix(in srgb, #f0c090 60%, transparent);
}

.gantt-bar.type-task {
  background: color-mix(in srgb, var(--accent) 45%, #152030);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
}

.gantt-bar.type-issue {
  background: color-mix(in srgb, #3d8f6a 50%, #152030);
  border: 1px solid color-mix(in srgb, #9ad0b0 45%, transparent);
}

.gantt-bar.is-estimated {
  opacity: 0.72;
  border-style: dashed;
}

.gantt-links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

.gantt-link {
  stroke: color-mix(in srgb, var(--muted) 65%, transparent);
  stroke-width: 1.5;
}

.gantt-link.is-critical {
  stroke: #f0a090;
  stroke-width: 2;
}

.gantt-baseline {
  position: absolute;
  top: 50%;
  height: 0.35rem;
  margin-top: 0.55rem;
  border-radius: 2px;
  background: color-mix(in srgb, var(--muted) 45%, transparent);
  pointer-events: none;
  z-index: 0;
}

.gantt-bar.is-critical {
  background: color-mix(in srgb, #f0a090 42%, #2a1814);
  border-color: color-mix(in srgb, #f0a090 70%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, #f0a090 35%, transparent);
}

.dep-edit-list {
  list-style: none;
  margin: 0 0 0.65rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.dep-edit-row,
.dep-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.dep-edit-title {
  flex: 1 1 8rem;
  font-size: 0.85rem;
}

.dep-lag {
  width: 4.5rem;
  flex: 0 0 auto;
}

.dep-remove {
  font-size: 0.8rem;
  color: var(--muted);
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
}

.workload-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
}

.workload-filters .field {
  margin: 0;
  min-width: 12rem;
}

.workload-panel {
  overflow: hidden;
}

.workload-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.workload-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 42rem;
}

.workload-table th,
.workload-table td {
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  padding: 0.55rem 0.45rem;
}

.workload-person-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: color-mix(in srgb, #0a1018 96%, #12304a);
  text-align: left;
  min-width: 9rem;
  font-weight: 600;
}

.workload-week-col {
  min-width: 6.5rem;
  text-align: left;
}

.workload-week-label {
  display: block;
  font-size: 0.82rem;
  color: var(--ink);
}

.workload-week-sub {
  font-size: 0.68rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.workload-table tbody tr.is-overloaded .workload-person-col {
  color: #f0a090;
}

.workload-badge {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #041018;
  background: #f0a090;
  border-radius: 3px;
  padding: 0.1rem 0.3rem;
  vertical-align: middle;
}

.workload-cell.is-over {
  background: color-mix(in srgb, #f0a090 8%, transparent);
}

.workload-meter {
  position: relative;
  height: 0.35rem;
  border-radius: 999px;
  background: #1e2834;
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.workload-meter-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  max-width: 100%;
}

.workload-cell.is-over .workload-meter-fill {
  background: #f0a090;
}

.workload-cell-nums {
  font-size: 0.78rem;
  display: flex;
  gap: 0.2rem;
  align-items: baseline;
}

.workload-sched {
  color: var(--ink);
  font-weight: 600;
}

.workload-task-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  font-size: 0.72rem;
}

.workload-task-list a {
  color: var(--muted);
  text-decoration: none;
}

.workload-task-list a:hover {
  color: var(--accent);
}

.workload-rail-note {
  font-size: 0.7rem;
  margin-top: 0.25rem;
}

.workload-legend {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
}

.gantt-bar-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: color-mix(in srgb, #fff 22%, transparent);
  pointer-events: none;
}

.gantt-bar-label {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #eef6ff;
}

.gantt-diamond {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  padding: 0;
  background: #f0c090;
  transform: rotate(45deg);
  border: 1px solid color-mix(in srgb, #fff 35%, #f0c090);
  z-index: 2;
  box-shadow: 0 0 0 2px color-mix(in srgb, #0a1018 80%, transparent);
}

.gantt-count,
.gantt-empty {
  margin: 0.75rem 0 0;
}

.gantt table {
  min-width: 40rem;
}

@media (max-width: 960px) {
  .gantt-filters {
    grid-template-columns: 1fr 1fr;
  }

  .gantt-type-toggles,
  .gantt-filter-scheduled {
    grid-column: 1 / -1;
  }

  .gantt-board {
    grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .gantt-filters {
    grid-template-columns: 1fr;
  }

  .gantt-board {
    grid-template-columns: 1fr;
  }

  .gantt-side {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    max-height: 40vh;
    overflow: auto;
  }

  .gantt-label-meta {
    display: none;
  }
}

th, td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--border);
}

th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }

a { color: var(--accent); }

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.plain-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

.plain-list li:last-child { border-bottom: none; }

.person-link {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.person-link:hover {
  color: var(--ink, #e8eef6);
}

.contact-dl {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.contact-dl > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border, #243041);
}

.contact-dl dt {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted, #8b9bb0);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-dl dd {
  margin: 0;
  font-size: 0.95rem;
}

.contact-dl a {
  color: var(--accent);
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent);
}

.badge.approval-pending {
  background: #3a2a14;
  color: var(--high, #d4a017);
}
.badge.approval-approved {
  background: #143028;
  color: var(--low, #3d9a6a);
}
.badge.approval-rejected {
  background: color-mix(in srgb, #c45c5c 28%, transparent);
  color: #c45c5c;
}

.app-form .field-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.75rem 0 0.25rem;
}
.app-form .field-check .field-checkbox-input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}
.app-form .field-check .field-hint {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.85em;
}

.approval-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line, #243041);
}
.approval-item:last-child {
  border-bottom: 0;
}

.approval-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-end;
  margin-top: 0.75rem;
}
.approval-actions .field {
  flex: 1 1 12rem;
  margin: 0;
}

.badge-invoice-uninvoiced {
  background: color-mix(in srgb, var(--muted, #888) 22%, transparent);
  color: var(--text-muted, #888);
}
.badge-invoice-partial {
  background: #3a2a14;
  color: var(--high, #d4a017);
}
.badge-invoice-full {
  background: #143028;
  color: var(--low, #3d9a6a);
}

.approve-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  min-width: 14rem;
}

.approve-row .field-input {
  flex: 1 1 8rem;
  min-width: 6rem;
}

.approve-row .btn-primary,
.approve-row .btn-ghost {
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
}

.priority-critical { background: #3a1a1a; color: var(--critical); }
.priority-high { background: #3a2a14; color: var(--high); }
.priority-medium { background: #1e2834; color: var(--medium); }
.priority-low { background: #143028; color: var(--low); }

.mywork-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.mywork-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.55rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, #0a1018 88%, #12304a);
}

.mywork-day.is-today {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

.mywork-day.has-items {
  background: color-mix(in srgb, var(--accent) 8%, #0a1018);
}

.mywork-day-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.mywork-day-num {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

.mywork-day-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.mywork-day-count.is-empty {
  color: var(--muted);
  font-weight: 400;
}

.mywork-section {
  margin-bottom: 1rem;
}

.mywork-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mywork-list li {
  border-bottom: 1px solid var(--border);
}

.mywork-list li:last-child {
  border-bottom: none;
}

.mywork-row {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.65rem;
  row-gap: 0.15rem;
  align-items: baseline;
  padding: 0.7rem 0.15rem;
  text-decoration: none;
  color: inherit;
}

.mywork-row:hover .mywork-title {
  color: var(--accent);
}

.mywork-kind,
.mywork-row .badge {
  grid-row: 1 / span 2;
  align-self: center;
}

.mywork-kind {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  min-width: 2.6rem;
}

.mywork-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.mywork-meta {
  font-size: 0.8rem;
  grid-column: 2;
}

.mywork-overdue-flag {
  color: #f0a090;
}

.mywork-row.is-overdue {
  background: color-mix(in srgb, #f0a090 6%, transparent);
  margin: 0 -0.35rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  border-radius: 6px;
}

.portal-project-nav {
  margin-bottom: 1rem;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
}

.portal-table th,
.portal-table td {
  text-align: left;
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.portal-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}


@media (max-width: 640px) {
  .mywork-week {
    gap: 0.3rem;
  }

  .mywork-day {
    padding: 0.4rem 0.15rem;
  }

  .mywork-day-num {
    font-size: 0.95rem;
  }
}


.progress-bar {
  height: 8px;
  background: #1e2834;
  border-radius: 4px;
  overflow: hidden;
  min-width: 80px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
}

.messages {
  list-style: none;
  padding: 0.75rem 1rem;
  background: var(--accent-soft);
  border-radius: 6px;
  margin-bottom: 1rem;
}

.notice {
  border-radius: 6px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}

.notice-warn {
  background: color-mix(in srgb, #a65b1f 18%, var(--surface));
  border-color: color-mix(in srgb, #a65b1f 45%, var(--border));
}

.notice h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--high);
}

/* —— Project subheader (nav + alerts) —— */
.project-subheader {
  position: sticky;
  top: 3.35rem;
  z-index: 90;
  margin: -1.75rem calc(-1 * clamp(0.85rem, 3vw, 2.5rem)) 1.5rem;
  padding: 0 clamp(0.85rem, 3vw, 2.5rem);
  padding-left: max(clamp(0.85rem, 3vw, 2.5rem), env(safe-area-inset-left));
  padding-right: max(clamp(0.85rem, 3vw, 2.5rem), env(safe-area-inset-right));
  background: color-mix(in srgb, #0a0e14 92%, #12304a);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.project-subheader-inner {
  max-width: none;
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem 0 0.5rem;
}

.project-subheader-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.project-subheader-id {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
  max-width: none;
}

.project-subheader-id .proj-num {
  margin-right: 0;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.project-subheader-name {
  font-size: 0.95rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.subheader-edit,
.project-edit-link {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 0.15rem 0.45rem;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: 3px;
}

.subheader-edit:hover,
.project-edit-link:hover {
  background: var(--accent-soft);
}

.project-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  width: 100%;
  min-width: 0;
  padding-top: 0.15rem;
}

.project-nav-link {
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}

.project-nav-link:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent-soft) 50%, transparent);
}

.project-nav-link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.project-alerts {
  position: relative;
  margin-left: 0;
  flex-shrink: 0;
}

.alerts-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #152030;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.alerts-trigger:disabled {
  opacity: 0.55;
  cursor: default;
}

.alerts-trigger.has-alerts {
  border-color: color-mix(in srgb, var(--high) 55%, var(--border));
  color: #f0c090;
  background: color-mix(in srgb, #a65b1f 22%, #152030);
}

.alerts-trigger.has-alerts:hover {
  border-color: var(--high);
  color: #ffd7a8;
}

.alerts-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.alerts-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--high);
  color: #1a1008;
  font-size: 0.72rem;
  font-weight: 700;
}

.alerts-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  width: min(360px, calc(100vw - 2rem));
  background: #111820;
  border: 1px solid color-mix(in srgb, var(--high) 40%, var(--border));
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  z-index: 95;
  overflow: hidden;
}

.alerts-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

.alerts-panel-head strong {
  font-size: 0.9rem;
  color: #f0c090;
}

.alerts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 320px;
  overflow-y: auto;
}

.alerts-list li {
  border-bottom: 1px solid var(--border);
}

.alerts-list li:last-child {
  border-bottom: none;
}

.alert-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.7rem 0.9rem;
  text-decoration: none;
  color: var(--ink);
}

.alert-item:hover {
  background: color-mix(in srgb, #a65b1f 14%, transparent);
}

.alert-item-dot {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--high);
  box-shadow: 0 0 8px color-mix(in srgb, var(--high) 60%, transparent);
}

.alert-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.alert-item-title {
  font-size: 0.88rem;
  font-weight: 600;
}

.alert-item-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.alerts-empty {
  margin: 0;
  padding: 0.9rem;
  font-size: 0.85rem;
}

#overview,
#people,
#files,
#budget,
#milestones,
#issues,
#tasks {
  scroll-margin-top: 7.5rem;
}

@media (max-width: 720px) {
  .project-subheader-top {
    flex-wrap: wrap;
  }

  .project-subheader-id {
    max-width: 100%;
    width: 100%;
  }

  .project-alerts {
    margin-left: auto;
  }
}

.proj-num {
  color: var(--accent);
  font-weight: 600;
  margin-right: 0.35rem;
}

.number-preview {
  margin: 0;
  padding: 0.75rem 0.9rem;
  background: #0a1018;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 400;
}

.number-preview .proj-num {
  margin-right: 0;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.confirm-id {
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  background: color-mix(in srgb, var(--accent-soft) 55%, #0a1018);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 6px;
}

.confirm-id-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.confirm-id .number-preview {
  background: #05080e;
  border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
}

.confirm-id .field-hint {
  display: block;
  margin-top: 0.45rem;
}

.subhead {
  margin: 1rem 0 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field-hint {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
}

.req {
  font-style: normal;
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--high);
  text-transform: lowercase;
}

.opt {
  font-style: normal;
  font-weight: 500;
  font-size: 0.72rem;
  color: #a8b8c8;
  text-transform: lowercase;
}

.wizard-panel { max-width: 720px; }

.wizard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.65rem;
}

.wizard-tab {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
}

.wizard-tab:hover { color: var(--ink); }

.wizard-tab.is-active {
  color: var(--ink);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.wizard-pane h2 {
  margin-top: 0;
}

.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.wizard-nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.budget-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.budget-summary--card {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, #0a1018 88%, #12304a);
  margin-bottom: 1.25rem;
}

.budget-summary--card .panel-head {
  gap: 1.25rem;
}

.budget-summary--card .panel-head {
  margin-bottom: 0.75rem;
}

.budget-summary--card .panel-head h2 {
  font-size: 1rem;
}

.budget-donut {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.budget-donut-chart {
  position: relative;
  width: 160px;
  height: 160px;
  flex: 0 0 auto;
}

.budget-donut-ring {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: #1e2836;
  /* Donut hole */
  -webkit-mask: radial-gradient(farthest-side, transparent 58%, #000 59%);
  mask: radial-gradient(farthest-side, transparent 58%, #000 59%);
}

.budget-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  padding: 1.75rem;
}

.budget-donut-center-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.budget-donut-center-label.is-over,
.budget-donut-center-pct.is-over {
  color: #f0a090;
}

.budget-donut-center-pct {
  font-size: 1.15rem;
  color: var(--accent);
  margin-top: 0.15rem;
  line-height: 1.1;
}

.budget-donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  flex: 0 1 auto;
}

.budget-donut-legend li {
  display: grid;
  grid-template-columns: 0.7rem 1fr;
  gap: 0.55rem;
  align-items: center;
}

.budget-donut-legend-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.budget-swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
}

.budget-swatch--budgeted {
  background: #1e2836;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--muted) 45%, transparent);
}

.budget-swatch--spent {
  background: #c4a35a;
}

.budget-swatch--remaining {
  background: #5f9e7e;
}

.budget-swatch--remaining.is-over {
  background: #f0a090;
}

.budget-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.budget-summary--card .budget-stat {
  background: color-mix(in srgb, #000 35%, transparent);
}

.budget-stat {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, #0a1018 88%, #12304a);
}

.budget-stat-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.budget-stat-value {
  font-size: 1.35rem;
  color: var(--ink);
}

.budget-summary--card .budget-stat-value {
  font-size: 1.15rem;
}

.budget-stat-pct {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.88rem;
  color: var(--accent);
}

.budget-stat.is-over .budget-stat-value,
.budget-stat.is-over .budget-stat-pct,
tr.budget-row-over td,
tr.budget-row-over th,
th.budget-row-over {
  color: #f0a090;
}

@media (max-width: 720px) {
  .budget-summary,
  .budget-summary-grid {
    grid-template-columns: 1fr;
  }
}

.budget-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

@media (max-width: 560px) {
  .budget-grid { grid-template-columns: 1fr; }
}

.budget-workspace .form-panel {
  max-width: none;
}

.workspace-panel {
  max-width: 720px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.inline-delete {
  display: inline;
  margin: 0;
}

.budget-workspace .form-actions {
  flex-wrap: wrap;
}

/* —— Workspace edit icon + modal —— */
body.modal-open {
  overflow: hidden;
}

.page-header--actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.co-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  white-space: nowrap;
}

.co-lines {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
}

.po-scope {
  border: 1px solid color-mix(in srgb, var(--border, #333) 80%, transparent);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
}

.po-scope legend {
  padding: 0 0.35rem;
  font-size: 0.9rem;
}

.po-scope .choice {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
}

.po-milestone-fields {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.po-balance {
  font-variant-numeric: tabular-nums;
  margin: 0.75rem 0;
}

.po-balance--ok {
  color: var(--low, #3d9a6a);
}

.po-balance--bad {
  color: var(--critical, #c44);
}

.po-row--cancelledled {
  opacity: 0.55;
}

.po-table td {
  vertical-align: top;
}

.portfolio-risk-chip {
  display: inline-block;
  margin: 0.1rem 0.15rem 0.1rem 0;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.78rem;
  background: color-mix(in srgb, var(--high, #d4a017) 18%, transparent);
  color: var(--high, #d4a017);
}

tr.portfolio-row.risk-high td:last-child .portfolio-risk-chip {
  background: color-mix(in srgb, var(--critical, #e85d5d) 18%, transparent);
  color: var(--critical, #e85d5d);
}

tr.portfolio-row.risk-ok td:last-child {
  color: var(--muted, #8b9bb0);
}

.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0.25rem;
  border: 1px solid var(--line, #243041);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel, #12161c) 80%, black);
  width: fit-content;
  max-width: 100%;
}

.settings-tab {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  color: var(--muted, #8b9bb0);
  text-decoration: none;
  font-size: 0.9rem;
}

.settings-tab:hover {
  color: var(--text, #e8eef6);
}

.settings-tab.is-active {
  background: var(--accent-soft, rgba(196, 163, 90, 0.16));
  color: var(--accent, #c4a35a);
  font-weight: 600;
}

.ppe-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.ppe-item {
  display: grid;
  grid-template-columns: minmax(12rem, 1.4fr) minmax(8rem, 1fr) auto;
  gap: 0.55rem 0.75rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line, #243041);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel, #12161c) 88%, black);
}

.ppe-item.is-checked {
  border-color: color-mix(in srgb, var(--low, #6dbf8c) 45%, var(--line, #243041));
}

.ppe-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: var(--text, #e8eef6);
  cursor: pointer;
}

.ppe-check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent, #c4a35a);
}

.ppe-label {
  font-size: 0.95rem;
}

.ppe-notes {
  width: 100%;
}

.ppe-meta {
  font-size: 0.75rem;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .ppe-item {
    grid-template-columns: 1fr;
  }
}

.ppe-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ppe-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border, #243041);
}

.ppe-list-row:last-child {
  border-bottom: none;
}

.ppe-list-label {
  flex: 1;
}

.ppe-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 6px;
  border: 1px solid var(--line, #243041);
  background: transparent;
  color: var(--muted, #8b9bb0);
  cursor: pointer;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.ppe-toggle.is-checked,
button.ppe-toggle.is-checked {
  color: var(--low, #6bcf8e);
  border-color: color-mix(in srgb, var(--low, #6bcf8e) 45%, var(--line, #243041));
  background: color-mix(in srgb, var(--low, #6bcf8e) 12%, transparent);
}

.ppe-checked-meta {
  font-size: 0.78rem;
  white-space: nowrap;
}

.daily-ppe-checks {
  margin-top: 0.5rem;
  max-height: 14rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.detail-list {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.detail-list dt {
  font-size: 0.78rem;
  color: var(--muted, #8b9bb0);
  margin: 0 0 0.15rem;
}

.detail-list dd {
  margin: 0;
}

.panel-subhead {
  margin: 1rem 0 0.5rem;
  font-size: 0.95rem;
}

.user-lookup {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
}

.user-lookup-field {
  flex: 1 1 18rem;
  margin: 0;
}

.user-lookup-input {
  width: 100%;
  font-size: 1.05rem;
}

.user-lookup-results {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  border: 1px solid var(--line, #243041);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel, #12161c) 92%, black);
  max-height: 16rem;
  overflow: auto;
}

.user-lookup-results li a {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  padding: 0.65rem 0.85rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line, #243041);
}

.user-lookup-results li:last-child a {
  border-bottom: none;
}

.user-lookup-results li a:hover {
  background: var(--accent-soft, rgba(196, 163, 90, 0.12));
}

.user-lookup-hint,
.user-lookup-empty {
  margin-top: 0.75rem;
}

.user-edit-form .field-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}

.user-token-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line, #243041);
}

.user-danger-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, #c45c5c 35%, var(--line, #243041));
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid color-mix(in srgb, #c45c5c 55%, var(--line, #243041));
  border-radius: 6px;
  background: color-mix(in srgb, #c45c5c 18%, transparent);
  color: #e8a0a0;
  font: inherit;
  cursor: pointer;
}

.btn-danger:hover {
  background: color-mix(in srgb, #c45c5c 28%, transparent);
  color: #f0c0c0;
}

.user-invites-details {
  margin-top: 1rem;
}

.user-invites-details summary {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.browse-users-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  max-height: min(28rem, 60vh);
  overflow: auto;
}

.browse-users-list li a {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: baseline;
  padding: 0.65rem 0.25rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line, #243041);
}

.browse-users-list li a:hover {
  color: var(--accent, #c4a35a);
}

.modal-dialog--wide {
  width: min(40rem, 94vw);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ppe-add-options {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.ppe-add-options li {
  padding: 0.25rem 0;
}

.notice-panel {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--panel));
}

.notice-panel .field-input {
  width: 100%;
  margin: 0.5rem 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.panel-head h2 {
  margin: 0;
}

.rail-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: 0.85rem 1.1rem;
}

.rail-filter-status {
  min-width: 14rem;
  margin: 0;
}

.view-toggle {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid var(--line, #243041);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel, #12161c) 80%, black);
}

.view-toggle .btn-ghost {
  margin: 0;
}

.view-toggle .btn-ghost.is-active {
  background: var(--accent-soft, rgba(196, 163, 90, 0.16));
  color: var(--accent, #c4a35a);
  font-weight: 600;
}

.rail-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(12rem, 1fr));
  gap: 0.85rem;
  align-items: start;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.rail-column {
  min-width: 14rem;
  border: 1px solid var(--line, #243041);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel, #12161c) 92%, black);
  display: flex;
  flex-direction: column;
  max-height: min(70vh, 48rem);
}

.rail-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line, #243041);
}

.rail-column-head h2 {
  margin: 0;
  font-size: 0.95rem;
}

.rail-column-body {
  padding: 0.65rem;
  overflow-y: auto;
  min-height: 6rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.rail-column-body.is-drop-target {
  outline: 1px dashed var(--accent, #c4a35a);
  outline-offset: -4px;
  background: color-mix(in srgb, var(--accent, #c4a35a) 8%, transparent);
}

.rail-column-empty {
  margin: 0.5rem 0;
  text-align: center;
  font-size: 0.85rem;
}

.rail-card {
  border: 1px solid var(--line, #243041);
  border-radius: 8px;
  background: var(--panel, #12161c);
  padding: 0.65rem 0.7rem;
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.rail-card.is-dragging {
  opacity: 0.55;
}

.rail-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.rail-card-title {
  font-size: 0.92rem;
  line-height: 1.3;
}

.rail-card-meta {
  font-size: 0.78rem;
  line-height: 1.35;
}

.rail-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
  margin-top: 0.15rem;
}

.field-hint {
  display: block;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.field-multiselect {
  min-height: 5rem;
}

@media (max-width: 960px) {
  .rail-board {
    grid-template-columns: repeat(2, minmax(12rem, 1fr));
  }
}

@media (max-width: 640px) {
  .rail-board {
    grid-template-columns: minmax(14rem, 1fr);
  }
}

.icon-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #3a4d63;
  background: #152030;
  color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #e8f7ff;
}

.icon-btn--lg {
  width: 2.4rem;
  height: 2.4rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 14, 0.72);
  backdrop-filter: blur(2px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(90vh, 820px);
  overflow: auto;
  background: #0f1722;
  border: 1px solid #2a3a4e;
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  padding: 1.15rem 1.25rem 1.35rem;
}

.modal-dialog--wide {
  width: min(720px, 100%);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.modal-body .app-form {
  margin: 0;
}

.modal-body .form-actions {
  margin-top: 0.35rem;
}

.log-table td {
  vertical-align: top;
}

.log-when {
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.85rem;
}

.log-summary {
  display: block;
}

.file-mini-list {
  margin: 0;
  font-size: 0.85rem;
}

.file-mini-list li {
  margin: 0.15rem 0;
}

.notes-list {
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 14rem;
  overflow-y: auto;
}

.note-entry {
  padding: 0.55rem 0.7rem;
  border-left: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--panel) 88%, var(--accent));
}

.note-meta {
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
}

.note-body {
  line-height: 1.4;
}

/* —— Milestone → Task → Issue tree —— */
.tree-panel {
  padding: 0.35rem 0.5rem 0.75rem;
}

.tree-list,
.tree-children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tree-children {
  margin-left: 1.35rem;
  border-left: 1px solid var(--border);
  padding-left: 0.65rem;
}

.tree-node {
  margin: 0.15rem 0;
}

.tree-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.35rem;
  border-radius: 6px;
  min-width: 0;
}

.tree-row:hover {
  background: color-mix(in srgb, var(--accent-soft) 35%, transparent);
}

.tree-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  min-width: 0;
  flex: 1;
}

.tree-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.tree-chevron {
  appearance: none;
  width: 2rem;
  height: 2rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.tree-chevron:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.tree-node.is-open > .tree-row > .tree-chevron {
  transform: rotate(90deg);
  color: var(--accent);
}

.tree-chevron--spacer {
  width: 2rem;
  height: 2rem;
  display: inline-block;
  flex-shrink: 0;
}

.tree-count {
  font-size: 0.85rem;
}

.tree-empty {
  padding: 0.45rem 0.5rem 0.55rem 2.45rem;
  font-size: 0.9rem;
}

.btn-compact {
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
  min-height: 2rem;
  white-space: nowrap;
}

.tree-node--task > .tree-row .tree-main span:first-child {
  color: var(--ink);
}

.tree-node--issue > .tree-row .tree-main span:first-child {
  color: #d5deea;
  font-size: 0.95rem;
}

.subhead {
  margin: 1rem 0 0.4rem;
  font-size: 0.95rem;
}

.preview-meta {
  margin-bottom: 1rem;
}


.field-multiselect {
  min-height: 8rem;
}

/* Dark-theme file pickers (replace native light buttons) */
input[type="file"],
input[type="file"].field-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 400;
  background: #0a1018;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}

input[type="file"]::file-selector-button,
input[type="file"].field-input::file-selector-button {
  appearance: none;
  margin-right: 0.85rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid #3a4d63;
  border-radius: 3px;
  background: #1a2a3c;
  color: #e8eef6;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

input[type="file"]:hover::file-selector-button,
input[type="file"].field-input:hover::file-selector-button {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

input[type="file"]:focus,
input[type="file"].field-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* Filename text after the button */
input[type="file"]::file-selector-button + *,
input[type="file"] {
  color: #c5d0dc;
}

/* —— Mobile / phone-friendly layout —— */
@media (max-width: 720px) {
  h1 {
    font-size: 1.35rem;
  }

  .site-main {
    padding-top: 1.15rem;
  }

  .brand-logo {
    height: 24px;
    max-width: min(160px, 48vw);
  }

  .user-chip {
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-header-meta {
    gap: 0.65rem;
    font-size: 0.85rem;
  }

  .page-header--actions,
  .page-header--split {
    align-items: flex-start;
  }

  .page-header--actions .icon-btn,
  .page-header--split .icon-btn {
    margin-top: 0.15rem;
  }

  .project-subheader {
    top: 3.1rem;
    margin-top: -1.15rem;
  }

  .project-subheader-top {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .project-subheader-id {
    max-width: 100%;
    width: calc(100% - 6.5rem);
  }

  .project-alerts {
    margin-left: auto;
  }

  .alerts-trigger {
    min-height: 2.5rem;
    padding: 0.45rem 0.7rem;
  }

  /* Horizontal swipeable section tabs */
  .project-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    gap: 0.35rem;
    padding-bottom: 0.4rem;
    margin: 0 -0.15rem;
  }

  .project-nav-link {
    flex: 0 0 auto;
    min-height: 2.5rem;
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.9rem;
    font-size: 0.88rem;
  }

  .wizard-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .wizard-tab {
    flex: 0 0 auto;
    min-height: 2.5rem;
  }

  .wizard-nav {
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .wizard-nav-right {
    width: 100%;
    display: flex;
    gap: 0.65rem;
  }

  .wizard-nav-right .btn-primary,
  .wizard-nav-right .btn-ghost {
    flex: 1;
  }

  .panel {
    padding: 0.95rem 1rem;
  }

  .panel:has(> table) > h2,
  .panel:has(> table) > .muted,
  .panel:has(> table) > p {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  th, td {
    padding: 0.65rem 0.55rem;
  }

  .btn-primary,
  .btn-ghost {
    min-height: 2.75rem;
    padding: 0.7rem 1rem;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions .btn-primary,
  .form-actions .btn-ghost,
  .form-actions a.btn-ghost {
    width: 100%;
  }

  .icon-btn {
    width: 2.75rem;
    height: 2.75rem;
  }

  .modal {
    align-items: flex-end;
    padding: 0;
  }

  .modal-dialog,
  .modal-dialog--wide {
    width: 100%;
    max-height: min(92dvh, 92vh);
    border-radius: 14px 14px 0 0;
    padding: 1rem 1rem calc(1.15rem + env(safe-area-inset-bottom));
  }

  .list-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .file-mini-list {
    max-width: 12rem;
  }

  .tree-row {
    flex-wrap: wrap;
  }

  .tree-actions {
    width: 100%;
    padding-left: 2.45rem;
  }

  .tree-actions .btn-compact {
    flex: 1;
    justify-content: center;
  }

  .tree-children {
    margin-left: 0.75rem;
  }
}

@media (max-width: 420px) {
  .project-subheader-id {
    width: 100%;
  }

  .project-alerts {
    width: 100%;
  }

  .alerts-trigger {
    width: 100%;
    justify-content: center;
  }

  .user-chip {
    display: none;
  }
}

@media (hover: none) and (pointer: coarse) {
  .project-nav-link,
  .btn-primary,
  .btn-ghost,
  .link-btn,
  .icon-btn,
  .alerts-trigger {
    -webkit-tap-highlight-color: color-mix(in srgb, var(--accent) 25%, transparent);
  }

  .btn-primary:hover {
    transform: none;
  }
}

/* Sprint 10 — burn chart + calendar */
.forecast-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(8rem, 1fr));
  gap: 0.85rem;
}

@media (max-width: 800px) {
  .forecast-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.burn-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  color: var(--muted, #8b9bb0);
}

.burn-swatch {
  display: inline-block;
  width: 1.1rem;
  height: 0.25rem;
  margin-right: 0.35rem;
  vertical-align: middle;
  border-radius: 2px;
}

.burn-swatch--actual { background: var(--accent, #c4a35a); }
.burn-swatch--planned { background: #5b7cfa; }
.burn-swatch--budget { background: #6b7c8f; }

.burn-chart {
  width: 100%;
  min-height: 220px;
}

.burn-chart-svg {
  display: block;
}

.burn-grid {
  stroke: var(--line, #243041);
  stroke-width: 1;
}

.burn-axis-label {
  fill: var(--muted, #8b9bb0);
  font-size: 10px;
  font-family: Sora, system-ui, sans-serif;
}

.burn-line {
  stroke-width: 2.25;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.burn-line--actual { stroke: var(--accent, #c4a35a); }
.burn-line--planned { stroke: #5b7cfa; stroke-dasharray: 5 4; }
.burn-line--budget { stroke: #6b7c8f; stroke-width: 1.5; stroke-dasharray: 2 3; }

.calendar-panel {
  overflow-x: auto;
}

.calendar-legend {
  display: flex;
  gap: 0.85rem;
  font-size: 0.82rem;
  color: var(--muted, #8b9bb0);
}

.cal-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  margin-right: 0.3rem;
  vertical-align: middle;
}

.cal-dot--task { background: #5b7cfa; }
.cal-dot--rail { background: var(--critical, #e85d5d); }
.cal-dot--milestone { background: var(--accent, #c4a35a); }

.cal-grid {
  min-width: 44rem;
}

.cal-weekdays,
.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-weekday {
  padding: 0.4rem 0.5rem;
  font-size: 0.78rem;
  color: var(--muted, #8b9bb0);
  border-bottom: 1px solid var(--line, #243041);
}

.cal-day {
  min-height: 6.5rem;
  padding: 0.35rem 0.4rem;
  border-right: 1px solid var(--line, #243041);
  border-bottom: 1px solid var(--line, #243041);
  background: color-mix(in srgb, var(--panel, #12161c) 92%, black);
}

.cal-week .cal-day:first-child {
  border-left: 1px solid var(--line, #243041);
}

.cal-day.is-outside {
  opacity: 0.45;
}

.cal-day.is-today {
  outline: 1px solid var(--accent, #c4a35a);
  outline-offset: -1px;
}

.cal-day-num {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cal-events {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cal-event a {
  display: block;
  font-size: 0.72rem;
  line-height: 1.25;
  padding: 0.15rem 0.3rem;
  border-radius: 3px;
  text-decoration: none;
  color: var(--text, #e8eef6);
  background: color-mix(in srgb, #5b7cfa 22%, transparent);
}

.cal-event--rail a {
  background: color-mix(in srgb, var(--critical, #e85d5d) 22%, transparent);
}

.cal-event--milestone a {
  background: color-mix(in srgb, var(--accent, #c4a35a) 22%, transparent);
}

.cal-event.is-overdue a {
  box-shadow: inset 2px 0 0 var(--critical, #e85d5d);
}

.cal-event-kind {
  display: none;
}

/* Team analytics (Sprint A1) */
.analytics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
  gap: 0.85rem;
  margin: 0 0 1.25rem;
}

.analytics-card {
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line, #243041);
  border-radius: 10px;
  background: var(--panel, #12161c);
}

.analytics-card h2 {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted, #8b9bb0);
}

.analytics-metric {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.1;
  font-family: Sora, system-ui, sans-serif;
}

.analytics-card.is-warn {
  border-color: color-mix(in srgb, var(--accent, #c4a35a) 40%, var(--line, #243041));
}

.analytics-card.is-warn .analytics-metric {
  color: var(--accent, #c4a35a);
}

.analytics-next {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.analytics-section {
  margin-bottom: 2rem;
  scroll-margin-top: 5rem;
}

.analytics-section-head {
  margin-bottom: 0.85rem;
}

.labor-util-chart {
  min-height: 220px;
}

.labor-line {
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.labor-line--logged {
  stroke: var(--accent, #c4a35a);
}

.labor-line--scheduled {
  stroke: #5b7cfa;
}

.labor-line--capacity {
  stroke: #6b7c8f;
  stroke-dasharray: 5 4;
  stroke-width: 1.5;
}

.labor-swatch--logged { background: var(--accent, #c4a35a); }
.labor-swatch--scheduled { background: #5b7cfa; }
.labor-swatch--capacity { background: #6b7c8f; }

#labor table .workload-meter {
  display: inline-block;
  width: 5.5rem;
  height: 0.45rem;
  margin-right: 0.4rem;
  vertical-align: middle;
  border-radius: 3px;
  background: color-mix(in srgb, var(--line, #243041) 80%, transparent);
  overflow: hidden;
}

#labor table .workload-meter-fill {
  display: block;
  height: 100%;
  background: var(--accent, #c4a35a);
  border-radius: 3px;
}

#labor tr.is-overloaded td:first-child a {
  color: var(--accent, #c4a35a);
}

.analytics-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.rail-age-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.rail-age-bars li {
  display: grid;
  grid-template-columns: 4.5rem 1fr 2rem;
  gap: 0.5rem;
  align-items: center;
}

.rail-age-label {
  font-size: 0.85rem;
  color: var(--muted, #8b9bb0);
}

.rail-age-track {
  height: 0.55rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--line, #243041) 80%, transparent);
  overflow: hidden;
}

.rail-age-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #5b7cfa;
}

.rail-age-fill.is-hot {
  background: var(--accent, #c4a35a);
}

.rail-age-count {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rail-priority-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.rail-priority-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.customer-bac-bars .rail-age-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}




