:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --bg-soft: #eef3f6;
  --surface: #ffffff;
  --surface-tint: #f9fbfc;
  --ink: #18212b;
  --ink-soft: #344253;
  --muted: #667789;
  --line: #dbe3e8;
  --line-strong: #c7d2da;
  --green: #14795d;
  --yellow: #ad6a00;
  --orange: #c24d12;
  --red: #b42318;
  --blue: #2666a3;
  --teal: #0d7f8c;
  --nav: #17212b;
  --shadow: 0 14px 38px rgba(24, 33, 43, 0.07);
  --shadow-soft: 0 8px 20px rgba(24, 33, 43, 0.05);
}

* {
  box-sizing: border-box;
}

.tracking-widest,
.tracking-wide,
.tracking-wider,
.tracking-tight,
.tracking-normal {
  letter-spacing: 0 !important;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(238, 243, 246, 0.85) 0, rgba(245, 247, 250, 0) 240px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  color: #184d82;
}

.topbar {
  background: var(--nav);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-inner {
  align-items: center;
  display: grid;
  gap: 20px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin: 0 auto;
  max-width: 1440px;
  min-height: 68px;
  padding: 0 28px;
}

.brand {
  align-items: center;
  color: #fff;
  display: inline-flex;
  font-size: 16px;
  font-weight: 800;
  gap: 10px;
  white-space: nowrap;
}

.brand:hover {
  color: #fff;
}

.brand-mark {
  align-items: center;
  background: #d9f2ee;
  border-radius: 7px;
  color: #0e4f53;
  display: inline-flex;
  font-size: 15px;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.topbar nav {
  display: flex;
  gap: 4px;
  justify-content: center;
  min-width: 0;
  overflow-x: auto;
  padding: 8px 0;
}

.topbar nav a {
  border-radius: 7px;
  color: #c8d6df;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 750;
  padding: 8px 11px;
}

.topbar nav a:hover,
.topbar nav a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.user-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #e8eff3;
  font-size: 12px;
  font-weight: 750;
  max-width: 180px;
  overflow: hidden;
  padding: 7px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shell {
  margin: 0 auto;
  max-width: 1320px;
  padding: 30px 28px 44px;
}

.page-head {
  align-items: flex-end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.eyebrow {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 6px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  margin: 0;
}

h1 {
  color: #111923;
  font-size: 32px;
  line-height: 1.12;
}

h2 {
  color: #16202a;
  font-size: 17px;
  line-height: 1.25;
}

h3 {
  color: var(--ink-soft);
  font-size: 14px;
}

.metric-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-bottom: 16px;
}

.metric-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid #9ab6c8;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  min-height: 104px;
  padding: 16px;
}

.metric-grid article:nth-child(1) {
  border-left-color: var(--green);
}

.metric-grid article:nth-child(2) {
  border-left-color: var(--yellow);
}

.metric-grid article:nth-child(3) {
  border-left-color: var(--red);
}

.metric-grid article:nth-child(4) {
  border-left-color: var(--blue);
}

.metric-grid article:nth-child(5) {
  border-left-color: var(--teal);
}

.metric-grid span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-grid strong {
  color: #111923;
  display: block;
  font-size: 34px;
  line-height: 1.1;
  margin-top: 12px;
}

.metric-grid .metric-text {
  font-size: 21px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.dashboard-visuals,
.two-column {
  display: grid;
  gap: 16px;
}

.dashboard-visuals {
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
}

.two-column {
  grid-template-columns: minmax(320px, 0.88fr) minmax(0, 1.12fr);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
  padding: 18px;
}

.panel.narrow {
  max-width: 760px;
}

.panel-head {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-note {
  color: var(--muted);
  font-size: 13px;
  margin: 5px 0 0;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}

table {
  background: var(--surface);
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: var(--surface-tint);
}

th {
  background: #f2f5f7;
  color: #536476;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.team-row-hover {
  cursor: pointer;
}

.status,
.health-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  justify-content: center;
  line-height: 1;
  min-width: 82px;
  padding: 6px 9px;
  white-space: nowrap;
}

.status.on_track,
.health-green {
  background: #e5f4ef;
  color: var(--green);
}

.status.watch,
.status.monitor,
.health-yellow {
  background: #fff2d8;
  color: var(--yellow);
}

.health-orange {
  background: #ffead5;
  color: var(--orange);
}

.status.off_track,
.status.missing,
.health-red {
  background: #fee4e2;
  color: var(--red);
}

.health-unknown {
  background: #edf2f4;
  color: var(--muted);
}

button,
.primary {
  align-items: center;
  border: 1px solid #14545a;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
}

button {
  background: #fff;
  color: #14545a;
}

button:hover {
  background: #f1f7f7;
}

.primary {
  background: #14545a;
  color: #fff;
}

.primary:hover {
  background: #0f4449;
  color: #fff;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.stack-form p {
  display: grid;
  gap: 6px;
  margin: 0;
}

label {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid #cbd6dd;
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  padding: 10px 11px;
  width: 100%;
}

input[type="checkbox"],
input[type="radio"] {
  border-radius: 4px;
  height: 1rem;
  min-height: 0;
  padding: 0;
  width: 1rem;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 127, 140, 0.12);
  outline: 0;
}

textarea {
  min-height: 140px;
}

.helptext {
  color: var(--muted);
  font-size: 12px;
}

.support-engineer-picker {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.96)),
    #fff;
  border: 1px solid #d9e2ea;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  display: grid;
  gap: 10px;
  padding: 12px;
}

.support-picker-selected {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
}

.support-picker-token,
.support-picker-option {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.support-picker-token {
  background: #111827;
  border: 1px solid #111827;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  min-height: 34px;
  padding: 6px 11px 6px 7px;
  width: auto;
}

.support-picker-token:hover {
  background: #0f766e;
  border-color: #0f766e;
}

.support-picker-token-x {
  align-items: center;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  display: inline-flex;
  font-size: 16px;
  height: 22px;
  justify-content: center;
  line-height: 1;
  width: 22px;
}

.support-picker-placeholder {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.support-picker-search {
  align-items: center;
  background: #fff;
  border: 1px solid #cfd9e3;
  border-radius: 9px;
  display: flex;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
}

.support-picker-search:focus-within {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.support-picker-search-icon {
  align-items: center;
  background: #ecfdf5;
  border-radius: 999px;
  color: #0f766e;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 900;
  height: 25px;
  justify-content: center;
  width: 25px;
}

.support-picker-search input {
  background: transparent;
  border: 0 !important;
  box-shadow: none !important;
  min-height: 42px;
  padding: 0;
}

.support-picker-options {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  max-height: 230px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}

.support-picker-option {
  background: #fff;
  border: 1px solid #d9e2ea;
  border-radius: 8px;
  color: #334155;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  min-height: 40px;
  padding: 8px 10px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.support-picker-option:hover {
  background: #f8fafc;
  border-color: #94d3cc;
  color: #111827;
  transform: translateY(-1px);
}

.support-picker-option input {
  accent-color: #0f766e;
  opacity: 0;
  pointer-events: none;
  position: absolute;
}

.support-picker-option-action {
  align-items: center;
  background: #ecfdf5;
  border-radius: 999px;
  color: #0f766e;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.support-picker-option-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-picker-empty {
  border: 1px dashed #cfd9e3;
  border-radius: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  margin: 0;
  padding: 11px;
  text-align: center;
}

.project-hero,
.project-panel,
.project-create-panel,
.project-edit-panel,
.project-directory,
.project-metric-strip article {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(29, 41, 57, 0.055);
}

.project-hero {
  align-items: end;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 18px;
  padding: 28px;
}

.project-hero-main h1 {
  color: #111827;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 950;
  line-height: 1.02;
  margin: 0;
}

.project-hero-main p:not(.project-eyebrow) {
  color: #536476;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.6;
  margin: 14px 0 0;
  max-width: 720px;
}

.project-eyebrow {
  color: #0f766e;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.project-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: end;
}

.project-button {
  align-items: center;
  border-radius: 7px;
  display: inline-flex;
  font-size: 14px;
  font-weight: 850;
  gap: 8px;
  min-height: 40px;
  padding: 10px 14px;
}

.project-button-primary {
  background: #111827;
  color: #fff;
}

.project-button-primary:hover {
  background: #0f766e;
  color: #fff;
}

.project-button-secondary {
  background: #fff;
  border: 1px solid #d9e1e8;
  color: #344253;
}

.project-button-secondary:hover {
  background: #f6f9fb;
  color: #111827;
}

.project-create-panel,
.project-edit-panel {
  margin-bottom: 18px;
  padding: 20px;
}

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

.project-form-head {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.project-form-head h2 {
  color: #111827;
  font-size: 19px;
  font-weight: 950;
  line-height: 1.2;
}

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

.project-form-grid-compact {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.project-form-grid label {
  color: #536476;
  display: grid;
  font-size: 11px;
  font-weight: 950;
  gap: 6px;
  text-transform: uppercase;
}

.project-form-grid input,
.project-form-grid select,
.project-form-grid textarea {
  background: #f8fafc;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  min-height: 40px;
  padding: 9px 10px;
  text-transform: none;
  width: 100%;
}

.project-form-grid textarea {
  min-height: 40px;
  resize: vertical;
}

.project-form-grid .project-checkbox-field {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
}

.project-form-grid .project-checkbox-field input {
  width: auto;
}

.project-form-grid input:focus,
.project-form-grid select:focus,
.project-form-grid textarea:focus {
  border-color: rgba(13, 127, 140, 0.55);
  box-shadow: 0 0 0 3px rgba(13, 127, 140, 0.16);
  outline: 2px solid transparent;
}

.project-date-field {
  background: linear-gradient(135deg, #f8fafc 0%, #eef7f5 100%);
  border: 1px solid rgba(13, 127, 140, 0.2);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 10px;
}

.project-form-grid .project-date-field {
  align-self: stretch;
}

.project-date-input,
.project-form-grid .project-date-input {
  background: #ffffff;
  border: 1px solid rgba(13, 127, 140, 0.28);
  border-radius: 8px;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

.project-date-input:focus,
.project-form-grid .project-date-input:focus {
  border-color: rgba(13, 127, 140, 0.68);
  box-shadow: 0 0 0 4px rgba(13, 127, 140, 0.14);
  outline: 2px solid transparent;
}

.project-date-quickbar {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-date-quickbar button {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(13, 127, 140, 0.24);
  border-radius: 7px;
  color: #0f5962;
  cursor: pointer;
  display: inline-flex;
  font-size: 11px;
  font-weight: 950;
  justify-content: center;
  min-height: 34px;
  padding: 7px 8px;
  text-transform: uppercase;
}

.project-date-quickbar button:hover {
  background: #eaf7f4;
  border-color: rgba(13, 127, 140, 0.42);
}

.project-form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: end;
  margin-top: 16px;
}

.project-form-status {
  color: #667789;
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 900;
  min-height: 18px;
}

.project-form-status[data-state="saving"] {
  color: #9a5b00;
}

.project-form-status[data-state="saved"] {
  color: #14795d;
}

.project-form-status[data-state="error"] {
  color: #b42318;
}

.kpi-entry-form {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: 92px minmax(140px, 1fr) minmax(70px, auto) auto auto auto;
}

.kpi-entry-form label {
  color: #536476;
  display: grid;
  font-size: 10px;
  font-weight: 950;
  gap: 5px;
  text-transform: uppercase;
}

.kpi-entry-form input {
  background: #f8fafc;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  min-height: 38px;
  padding: 8px 10px;
  text-transform: none;
  width: 100%;
}

.kpi-entry-form .project-button {
  min-height: 38px;
}

.kpi-top-strip {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.kpi-table-wrap {
  overflow-x: auto;
  padding: 0 5px 5px;
}

.kpi-rolling-table {
  background: #fff;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1120px;
  width: 100%;
}

.kpi-rolling-table th,
.kpi-rolling-table td {
  border-bottom: 1px solid #e1e8ee;
  border-right: 1px solid #edf2f7;
  padding: 12px;
  vertical-align: middle;
}

.kpi-rolling-table thead th {
  background: #f8fafc;
  color: #536476;
  font-size: 11px;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.kpi-rolling-table thead th:first-child {
  min-width: 260px;
  text-align: left;
}

.kpi-rolling-table thead th.is-current {
  background: #ecfdf5;
  color: #14795d;
}

.kpi-rolling-table thead span,
.kpi-rolling-table thead small {
  display: block;
}

.kpi-rolling-table thead small {
  color: #8a98a8;
  font-size: 10px;
  margin-top: 3px;
}

.kpi-rolling-table tbody th {
  background: #fff;
  color: #111827;
  font-size: 13px;
  min-width: 260px;
  position: sticky;
  left: 0;
  text-align: left;
  z-index: 1;
}

.kpi-rolling-table tbody th strong,
.kpi-rolling-table tbody th span,
.kpi-rolling-table tbody th em {
  display: block;
}

.kpi-rolling-table tbody th strong {
  font-size: 14px;
  font-weight: 950;
}

.kpi-rolling-table tbody th span {
  color: #667789;
  font-size: 12px;
  font-weight: 800;
  margin-top: 4px;
}

.kpi-rolling-table tbody th em {
  color: #0f766e;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  margin-top: 6px;
  text-transform: uppercase;
}

.kpi-rolling-table tfoot th {
  background: #f1f5f9;
  color: #111827;
  min-width: 260px;
  position: sticky;
  left: 0;
  text-align: left;
  z-index: 1;
}

.kpi-rolling-table tfoot th strong,
.kpi-rolling-table tfoot th span {
  display: block;
}

.kpi-rolling-table tfoot th strong {
  font-size: 14px;
  font-weight: 950;
}

.kpi-rolling-table tfoot th span {
  color: #667789;
  font-size: 12px;
  font-weight: 800;
  margin-top: 4px;
}

.kpi-rolling-table tfoot td {
  background: #f8fafc;
}

.kpi-week-cell {
  min-width: 118px;
  text-align: center;
}

.kpi-week-cell.is-current {
  background: #fbfefc;
  box-shadow: inset 0 0 0 1px rgba(20, 121, 93, 0.12);
}

.kpi-week-cell.is-editable {
  cursor: pointer;
}

.kpi-cell-display,
.kpi-cell-static {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  color: #111827;
  display: inline-flex;
  font-size: 15px;
  font-weight: 950;
  justify-content: center;
  min-height: 38px;
  min-width: 68px;
  padding: 7px 10px;
}

.kpi-cell-display:hover {
  background: #ecfdf5;
  border-color: rgba(20, 121, 93, 0.35);
  color: #14795d;
}

.kpi-snapshot-trigger {
  cursor: pointer;
}

.kpi-snapshot-trigger:hover {
  background: #dbeafe;
  border-color: #8bb8ff;
  color: #174f90;
}

.kpi-snapshot-dialog {
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
  color: #111827;
  max-width: min(520px, calc(100vw - 32px));
  padding: 0;
  width: 520px;
}

.kpi-snapshot-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.kpi-snapshot-head {
  align-items: center;
  border-bottom: 1px solid #e6ebef;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.kpi-snapshot-head span,
.kpi-snapshot-count span,
.kpi-snapshot-list span {
  color: #667789;
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.kpi-snapshot-head strong {
  display: block;
  font-size: 18px;
  font-weight: 950;
  margin-top: 3px;
}

.kpi-snapshot-head button {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  color: #334155;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.kpi-snapshot-count {
  align-items: baseline;
  background: #f8fafc;
  border-bottom: 1px solid #e6ebef;
  display: flex;
  gap: 10px;
  padding: 14px 18px;
}

.kpi-snapshot-count strong {
  color: #235c9f;
  font-size: 28px;
  font-weight: 950;
}

.kpi-snapshot-summary {
  border-bottom: 1px solid #e6ebef;
  padding: 12px 18px;
}

.kpi-snapshot-summary span {
  color: #667789;
  display: block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.kpi-snapshot-summary strong {
  color: #111827;
  display: block;
  font-size: 14px;
  font-weight: 950;
  margin-top: 3px;
}

.kpi-snapshot-warning {
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.4;
  padding: 10px 18px;
}

.kpi-snapshot-list {
  display: grid;
  gap: 0;
  max-height: min(54vh, 460px);
  overflow: auto;
  padding: 8px;
}

.kpi-snapshot-list a,
.kpi-snapshot-list div,
.kpi-snapshot-list p {
  border-radius: 8px;
  display: block;
  padding: 10px;
  text-align: left;
}

.kpi-snapshot-list a {
  color: inherit;
  text-decoration: none;
}

.kpi-snapshot-list a:hover {
  background: #eef6ff;
}

.kpi-snapshot-list strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
}

.kpi-snapshot-history {
  border-top: 1px solid #e6ebef;
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding: 14px 18px 18px;
}

.kpi-snapshot-history > span {
  color: #667789;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.kpi-snapshot-history section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
}

.kpi-snapshot-history strong {
  color: #111827;
  font-size: 13px;
  font-weight: 950;
}

.kpi-snapshot-history small {
  color: #9a3412;
  font-size: 11px;
  font-weight: 900;
}

.kpi-snapshot-history ul {
  color: #475569;
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 4px;
  list-style: disc;
  margin: 0;
  padding-left: 18px;
}

.kpi-week-cell.status-on_track .kpi-cell-display,
.kpi-week-cell.status-on_track .kpi-cell-static {
  background: #e8f7ef;
  border-color: #b9e4cd;
  color: #14795d;
}

.kpi-week-cell.status-watch .kpi-cell-display,
.kpi-week-cell.status-watch .kpi-cell-static {
  background: #fff3d6;
  border-color: #f8d587;
  color: #9a5b00;
}

.kpi-week-cell.status-off_track .kpi-cell-display,
.kpi-week-cell.status-off_track .kpi-cell-static {
  background: #fee4e2;
  border-color: #fecdca;
  color: #b42318;
}

.kpi-week-cell.status-monitor .kpi-cell-display,
.kpi-week-cell.status-monitor .kpi-cell-static {
  background: #eaf2ff;
  border-color: #c7ddff;
  color: #235c9f;
}

.kpi-week-cell > small {
  color: #0f766e;
  display: block;
  font-size: 10px;
  font-weight: 950;
  margin-top: 6px;
  text-transform: uppercase;
}

.kpi-cell-form {
  grid-template-columns: minmax(80px, 1fr);
  justify-items: stretch;
  margin: 0 auto;
  max-width: 220px;
}

.kpi-cell-form[hidden] {
  display: none;
}

.project-metric-strip {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.project-metric-strip article {
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.project-metric-strip article::before {
  background: var(--metric-accent);
  content: "";
  height: 100%;
  inset: 0 auto 0 0;
  position: absolute;
  width: 4px;
}

.project-metric-strip span {
  color: #667789;
  display: block;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.project-metric-strip strong {
  color: #111827;
  display: block;
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
  margin-top: 14px;
}

.project-metric-strip p {
  color: #667789;
  font-size: 13px;
  font-weight: 750;
  margin: 10px 0 0;
}

.project-overview-grid,
.project-flow-grid,
.project-work-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.project-overview-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
}

.project-flow-grid,
.project-work-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-panel,
.project-directory {
  padding: 20px;
}

.project-panel-head {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.project-panel-head h2,
.directory-head h2 {
  color: #111827;
  font-size: 19px;
  font-weight: 950;
  line-height: 1.2;
}

.project-panel-head a,
.project-panel-head > span {
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.manager-stack,
.attention-stack,
.mini-project-stack,
.project-records,
.split-stack {
  display: grid;
  gap: 10px;
}

.manager-row {
  background: #f8fafc;
  border: 1px solid #e1e8ee;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(120px, auto) minmax(260px, 1fr);
  padding: 14px;
}

.manager-identity {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.manager-identity > span {
  align-items: center;
  background: #111827;
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 950;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.manager-identity strong,
.mini-project strong,
.attention-card strong,
.record-title strong {
  color: #111827;
  display: block;
  font-size: 14px;
  font-weight: 950;
}

.manager-identity p,
.attention-card p,
.directory-head p,
.record-title p,
.mini-project small {
  color: #667789;
  font-size: 13px;
  font-weight: 750;
  margin: 3px 0 0;
}

.project-record-link {
  color: #111827;
  display: block;
}

.project-record-link:hover {
  color: #0f766e;
}

.manager-signals {
  align-content: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.manager-signals > span:not(.signal-pill) {
  background: #fff;
  border: 1px solid #d9e1e8;
  border-radius: 999px;
  color: #536476;
  font-size: 12px;
  font-weight: 850;
  padding: 6px 9px;
}

.signal-pill {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
}

.signal-clear {
  background: #e9f7ef;
  color: #14795d;
}

.signal-warn {
  background: #fff3d6;
  color: #9a5b00;
}

.manager-projects {
  align-content: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.manager-projects a {
  align-items: center;
  background: #fff;
  border: 1px solid #d9e1e8;
  border-radius: 999px;
  color: #344253;
  display: inline-flex;
  font-size: 12px;
  font-weight: 850;
  gap: 6px;
  max-width: 180px;
  overflow: hidden;
  padding: 6px 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-summary {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: 132px minmax(0, 1fr);
}

.health-ring {
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
}

.health-ring::after {
  background: #fff;
  border-radius: 50%;
  content: "";
  inset: 16px;
  position: absolute;
}

.health-ring span,
.health-ring small {
  position: relative;
  z-index: 1;
}

.health-ring span {
  color: #111827;
  font-size: 28px;
  font-weight: 950;
}

.health-ring small {
  color: #667789;
  font-size: 11px;
  font-weight: 900;
  margin-top: 26px;
  position: absolute;
  text-transform: uppercase;
}

.health-list {
  display: grid;
  gap: 9px;
}

.health-list div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.health-list span {
  align-items: center;
  color: #536476;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
}

.health-list i,
.health-dot {
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
}

.health-list i {
  height: 9px;
  width: 9px;
}

.health-list strong {
  color: #111827;
  font-size: 13px;
  font-weight: 950;
}

.health-dot {
  height: 10px;
  width: 10px;
}

.health-dot-green {
  background: #16a34a;
}

.health-dot-yellow,
.health-dot-orange {
  background: #d97706;
}

.health-dot-red {
  background: #dc2626;
}

.health-dot-unknown {
  background: #94a3b8;
}

.attention-card,
.mini-project,
.project-record {
  background: #fff;
  border: 1px solid #e1e8ee;
  border-radius: 8px;
  color: #111827;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.attention-card:hover,
.mini-project:hover,
.project-record:hover {
  border-color: #b7c8d6;
  box-shadow: 0 14px 28px rgba(29, 41, 57, 0.07);
  transform: translateY(-1px);
}

.attention-card {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  padding: 14px;
}

.attention-card div:last-child {
  align-content: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: end;
}

.attention-card span {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #9a3412;
  font-size: 12px;
  font-weight: 850;
  padding: 5px 8px;
}

.split-line {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 140px minmax(0, 1fr) 34px;
}

.split-line span {
  color: #536476;
  font-size: 13px;
  font-weight: 850;
}

.split-line div {
  background: #edf2f7;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.split-line i {
  background: linear-gradient(90deg, #0f766e, #2563eb);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.split-line strong {
  color: #111827;
  font-size: 13px;
  font-weight: 950;
  text-align: right;
}

.mini-project {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 13px;
}

.mini-project em {
  color: #536476;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.project-directory {
  margin-bottom: 18px;
  padding: 0;
}

.directory-head {
  align-items: start;
  border-bottom: 1px solid #e1e8ee;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 0.28fr) minmax(0, 1fr);
  padding: 20px;
}

.directory-filters {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 1.7fr) repeat(4, minmax(130px, 0.9fr)) repeat(3, minmax(170px, 1fr));
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.directory-filters::-webkit-scrollbar {
  height: 6px;
}

.directory-search {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  color: #667789;
  display: flex;
  gap: 10px;
  min-height: 42px;
  min-width: 240px;
  padding: 0 12px;
}

.directory-search input {
  background: transparent;
  border: 0 !important;
  box-shadow: none !important;
  color: #111827;
  font-weight: 750;
  padding: 0;
}

.directory-filter-field {
  color: #8a98a8;
  display: grid;
  font-size: 10px;
  font-weight: 950;
  gap: 5px;
  min-width: 0;
  text-transform: uppercase;
}

.directory-filter-field select {
  appearance: none;
  background: #f8fafc;
  background-image: linear-gradient(45deg, transparent 50%, #667789 50%),
    linear-gradient(135deg, #667789 50%, transparent 50%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  color: #111827;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  min-height: 42px;
  overflow: hidden;
  padding: 9px 28px 9px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.directory-filter-field select:focus {
  border-color: rgba(13, 127, 140, 0.55);
  box-shadow: 0 0 0 3px rgba(13, 127, 140, 0.16);
  outline: 2px solid transparent;
}

.filter-group {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 6px;
}

.filter-group button {
  background: #fff;
  border: 1px solid #d9e1e8;
  border-radius: 999px;
  color: #536476;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
  min-height: 32px;
  padding: 7px 10px;
}

.filter-group button.is-active {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.project-records {
  padding: 14px;
}

.project-record {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns:
    minmax(260px, 1.35fr)
    minmax(120px, 0.55fr)
    minmax(150px, 0.75fr)
    minmax(150px, 0.75fr)
    minmax(170px, 0.85fr)
    minmax(160px, auto)
    minmax(60px, auto);
  padding: 15px;
}

.project-record-header {
  border: 0;
  color: #8a98a8;
  font-size: 10px;
  font-weight: 950;
  padding-bottom: 6px;
  padding-top: 0;
  text-transform: uppercase;
}

.record-title {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.record-title > div {
  min-width: 0;
}

.project-record-link strong,
.record-title p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.record-meta small {
  color: #8a98a8;
  display: block;
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.record-meta strong {
  color: #344253;
  display: block;
  font-size: 13px;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-cell {
  color: #344253;
  display: block;
  font-size: 13px;
  font-weight: 850;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-status {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: end;
}

.status-chip,
.health-chip,
.grade-chip {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
  white-space: nowrap;
}

.status-chip {
  background: #edf2f7;
  color: #344253;
}

.record-status-form {
  margin: 0;
}

.status-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  border: 0;
  cursor: pointer;
  min-height: 32px;
  padding-right: 24px;
}

.status-select:focus {
  box-shadow: 0 0 0 3px rgba(13, 127, 140, 0.18);
  outline: 2px solid transparent;
}

.grade-chip {
  background: #111827;
  color: #fff;
}

.health-chip-green {
  background: #e8f7ef;
  color: #14795d;
}

.health-chip-yellow,
.health-chip-orange {
  background: #fff3d6;
  color: #9a5b00;
}

.health-chip-red {
  background: #fee4e2;
  color: #b42318;
}

.health-chip-unknown {
  background: #edf2f7;
  color: #536476;
}

.health-select {
  appearance: auto;
  border: 1px solid currentColor;
  cursor: pointer;
  min-height: 32px;
  padding: 6px 8px;
}

.health-select:focus {
  box-shadow: 0 0 0 3px rgba(13, 127, 140, 0.18);
  outline: 2px solid transparent;
}

.status-select[data-state="saving"],
.health-select[data-state="saving"] {
  opacity: 0.72;
}

.status-select[data-state="saved"],
.health-select[data-state="saved"] {
  box-shadow: 0 0 0 3px rgba(25, 149, 111, 0.2);
}

.status-select[data-state="error"],
.health-select[data-state="error"] {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.22);
}

.issue-select {
  appearance: auto;
  background: #fff;
  border: 1px solid #d9e1e8;
  border-radius: 8px;
  color: #536476;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  min-height: 38px;
  min-width: 118px;
  padding: 7px 10px;
  width: 100%;
}

.issue-list {
  display: grid;
  gap: 16px;
}

.issue-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 251, 252, 0.96)),
    #fff;
  border: 1px solid #d9e2ea;
  border-left: 4px solid #7c3aed;
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(30, 41, 59, 0.07);
  padding: 18px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.issue-card:hover {
  border-color: #c4b5fd;
  box-shadow: 0 18px 38px rgba(49, 46, 129, 0.11);
  transform: translateY(-1px);
}

.issue-card-header,
.issue-fields {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.issue-card-header {
  margin-bottom: 12px;
}

.issue-source,
.issue-overdue {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  min-height: 28px;
  padding: 6px 10px;
}

.issue-source {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #5b21b6;
}

.issue-overdue {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}

.issue-title {
  color: #111827;
  font-size: 19px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.22;
}

.issue-description {
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  margin-top: 8px;
  max-width: 72ch;
}

.issue-fields {
  margin-top: 18px;
}

.issue-field,
.issue-due {
  display: grid;
  gap: 6px;
}

.issue-field > span,
.issue-due > span {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.issue-field-owner {
  min-width: min(260px, 100%);
}

.issue-due {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  min-height: 58px;
  padding: 9px 12px;
}

.issue-due strong {
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

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

.issue-actions form {
  margin: 0;
}

.issue-icon-button {
  align-items: center;
  background: #fff;
  border: 1px solid #d8c7f4;
  border-radius: 8px;
  color: #5b21b6;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
  width: 42px;
}

.issue-icon-button:hover {
  background: #f5f3ff;
  border-color: #a78bfa;
  transform: translateY(-1px);
}

.issue-icon-button-solve {
  background: #ecfdf5;
  border-color: #86efac;
  color: #047857;
}

.issue-icon-button-solve:hover {
  background: #dcfce7;
  border-color: #4ade80;
}

.issue-priority-high {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.issue-priority-medium {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.issue-priority-low {
  background: #f8fafc;
  border-color: #d9e1e8;
  color: #536476;
}

.issue-select[data-state="saving"] {
  opacity: 0.72;
}

.issue-select[data-state="saved"] {
  box-shadow: 0 0 0 3px rgba(25, 149, 111, 0.2);
}

.issue-select[data-state="error"] {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.22);
}

.project-empty {
  background: #f8fafc;
  border: 1px dashed #cbd6dd;
  border-radius: 8px;
  color: #667789;
  font-size: 14px;
  font-weight: 800;
  margin: 0;
  padding: 18px;
  text-align: center;
}

@media (max-width: 1180px) {
  .project-overview-grid,
  .project-flow-grid,
  .project-work-grid,
  .directory-head {
    grid-template-columns: 1fr;
  }

  .project-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-top-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kpi-entry-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manager-row,
  .project-record {
    grid-template-columns: 1fr;
  }

  .project-record-header {
    display: none;
  }

  .manager-signals,
  .manager-projects,
  .record-status {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .project-hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }

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

  .project-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .health-summary,
  .attention-card,
  .project-form-grid,
  .kpi-entry-form,
  .record-meta,
  .directory-filters {
    grid-template-columns: 1fr;
  }

  .attention-card div:last-child {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .project-metric-strip {
    grid-template-columns: 1fr;
  }

  .project-hero-main h1 {
    font-size: 32px;
  }

  .kpi-top-strip {
    grid-template-columns: 1fr;
  }

  .mini-project {
    align-items: start;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mini-project em {
    grid-column: 2;
  }
}

.messages {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.message {
  background: #e9f4ff;
  border: 1px solid #bed9fb;
  border-radius: 8px;
  color: #1d4d75;
  padding: 10px 12px;
}

.message.error {
  background: #fee4e2;
  border-color: #fda29b;
  color: var(--red);
}

.standup-list,
.attention-list,
.timeline {
  display: grid;
  gap: 10px;
}

.standup-row {
  align-items: center;
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.standup-row span,
.attention-row span,
.timeline-item span {
  color: var(--muted);
  font-size: 13px;
}

.prose {
  color: var(--ink-soft);
  max-width: 850px;
}

.prose h3 {
  margin: 14px 0 4px;
}

.health-layout {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: 148px minmax(0, 1fr);
}

.donut {
  align-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  justify-items: center;
  position: relative;
}

.donut::after {
  background: var(--surface);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(219, 227, 232, 0.8);
  content: "";
  inset: 25px;
  position: absolute;
}

.donut div {
  display: grid;
  justify-items: center;
  position: relative;
  z-index: 1;
}

.donut strong {
  font-size: 30px;
  line-height: 1;
}

.donut span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.legend {
  display: grid;
  gap: 10px;
}

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

.legend-row strong {
  color: var(--ink);
  font-size: 14px;
}

.legend-swatch {
  border-radius: 999px;
  height: 10px;
  width: 10px;
}

.category-bars {
  display: grid;
  gap: 14px;
}

.category-row {
  display: grid;
  gap: 8px;
}

.category-label {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
}

.category-label strong {
  font-size: 14px;
}

.category-label span,
.trend-card-foot {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.stacked-bar {
  background: #edf2f4;
  border-radius: 999px;
  display: flex;
  height: 12px;
  overflow: hidden;
}

.stacked-bar span {
  min-width: 0;
}

.bar-on-track {
  background: var(--green);
}

.bar-watch {
  background: #d08a1d;
}

.bar-off-track {
  background: var(--red);
}

.bar-monitor {
  background: var(--blue);
}

.bar-missing {
  background: #9aa4af;
}

.app-bg {
  background:
    linear-gradient(180deg, rgba(224, 234, 240, 0.82) 0, rgba(244, 247, 251, 0.94) 44%, #eef3f7 100%),
    #eef3f7;
}

.app-frame {
  box-shadow:
    0 24px 70px rgba(15, 23, 42, 0.12),
    0 2px 0 rgba(255, 255, 255, 0.8) inset;
}

.content-plane {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0, rgba(244, 247, 251, 0) 170px),
    #f4f7fb;
}

.brand-tile {
  box-shadow:
    0 14px 24px rgba(13, 127, 140, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.search-shell {
  box-shadow:
    inset 0 1px 2px rgba(15, 23, 42, 0.04),
    0 1px 0 rgba(255, 255, 255, 0.72);
}

.side-rail {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 252, 0.98)),
    #fff;
}

.side-nav {
  scrollbar-width: thin;
}

.side-nav-link {
  align-items: center;
  border-radius: 8px;
  color: #617285;
  display: flex;
  font-size: 14px;
  font-weight: 850;
  gap: 10px;
  margin-bottom: 4px;
  min-height: 40px;
  padding: 10px 12px;
  transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.side-nav-link:hover {
  background: #f0f5f7;
  color: #17212b;
}

.side-nav-link.is-active {
  background: linear-gradient(135deg, rgba(13, 127, 140, 0.12), rgba(59, 114, 208, 0.08));
  box-shadow:
    inset 0 0 0 1px rgba(13, 127, 140, 0.16),
    0 8px 18px rgba(13, 127, 140, 0.08);
  color: #12222c;
}

.side-nav-link.is-active svg {
  color: #0d7f8c;
}

.nav-pill {
  align-items: center;
  color: #667789;
  display: inline-flex;
  gap: 8px;
}

.nav-pill:hover,
.nav-pill.is-active {
  background: #eef2f6;
  color: #17212b;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.76), inset 0 0 0 1px rgba(219, 227, 232, 0.72);
}

.page-kicker {
  color: #2f837d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.surface-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.88)),
    #fff;
  border: 1px solid rgba(203, 214, 221, 0.86);
  box-shadow: 0 9px 24px rgba(24, 33, 43, 0.055);
}

.metric-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 252, 0.94)),
    #fff;
  border: 1px solid rgba(203, 214, 221, 0.92);
  box-shadow: 0 10px 24px rgba(24, 33, 43, 0.055);
  isolation: isolate;
  overflow: hidden;
  position: relative;
}

.metric-card::before {
  background: linear-gradient(90deg, var(--accent, #0d7f8c), transparent);
  content: "";
  height: 3px;
  inset: 0 0 auto;
  opacity: 0.9;
  position: absolute;
}

.metric-card::after {
  background: radial-gradient(circle at top right, color-mix(in srgb, var(--accent, #0d7f8c) 13%, transparent), transparent 45%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

.metric-card:hover,
.row-card:hover,
.surface-card:hover {
  border-color: rgba(13, 127, 140, 0.28);
  box-shadow: 0 16px 34px rgba(24, 33, 43, 0.075);
}

.icon-tile {
  align-items: center;
  background: color-mix(in srgb, var(--accent, #0d7f8c) 10%, white);
  border-radius: 8px;
  color: var(--accent, #0d7f8c);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.metric-track {
  background: rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  height: 6px;
  margin-top: 16px;
  overflow: hidden;
}

.metric-track span {
  background: var(--accent, #0d7f8c);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.row-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(203, 214, 221, 0.86);
  box-shadow: 0 8px 18px rgba(24, 33, 43, 0.04);
}

.chart-shell {
  background:
    linear-gradient(180deg, #f7fafc, #ffffff);
  border: 1px solid rgba(219, 227, 232, 0.95);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.throughput-bar {
  background:
    linear-gradient(180deg, rgba(13, 127, 140, 0.82), rgba(13, 99, 104, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.split-bar {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent, #0d7f8c) 78%, white), var(--accent, #0d7f8c));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.avatar-tile {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent, #3b82f6) 78%, white), var(--accent, #3b82f6));
  box-shadow: 0 8px 16px rgba(30, 64, 175, 0.16);
}

.quick-action {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.88));
  border: 1px solid rgba(203, 214, 221, 0.9);
}

.quick-action:hover {
  background: #fff;
  transform: translateY(-1px);
}

.kpi-weekly-chart {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.94));
  border: 1px solid rgba(219, 227, 232, 0.9);
  border-radius: 8px;
  display: block;
  min-height: 114px;
  width: 100%;
}

.kpi-weekly-chart polyline {
  fill: none;
  stroke: #3b6b9d;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.kpi-weekly-chart .chart-target,
.chart-target {
  stroke: #b59248;
  stroke-dasharray: 5 5;
  stroke-linecap: round;
  stroke-width: 3;
}

.sparkline {
  align-items: end;
  display: flex;
  gap: 4px;
  height: 42px;
}

.sparkline span {
  background: #9fb3c8;
  border-radius: 999px 999px 2px 2px;
  display: block;
  flex: 1;
  min-height: 8px;
}

.sparkline span.current {
  background: #0d7f8c;
}

.forecast-cell {
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.empty-state {
  background: color-mix(in srgb, var(--line) 18%, white);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  padding: 22px;
  text-align: center;
}

.compact-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.surface-card form p,
.row-card form p,
article form p,
aside form p {
  display: grid;
  gap: 6px;
  margin: 0;
}

@media (max-width: 640px) {
  .app-frame {
    border-left: 0;
    border-radius: 0;
    border-right: 0;
    margin: 0;
    min-height: 100vh;
  }

  .health-layout {
    grid-template-columns: 120px minmax(0, 1fr);
  }
}

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

.kpi-graph-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.trend-card,
.kpi-graph-card {
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-height: 174px;
  padding: 14px;
}

.trend-card-head,
.trend-card-foot,
.kpi-graph-head,
.kpi-graph-foot,
.kpi-graph-value {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.trend-card-head strong {
  font-size: 24px;
}

.trend-card h3 {
  font-size: 14px;
  line-height: 1.3;
  min-height: 36px;
}

.kpi-graph-head {
  align-items: flex-start;
}

.kpi-graph-head span:first-child {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 850;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.kpi-graph-head h3 {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.kpi-graph-value {
  justify-content: flex-start;
}

.kpi-graph-value strong {
  color: #111923;
  font-size: 28px;
  line-height: 1;
}

.kpi-graph-value span {
  background: #edf2f4;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  padding: 4px 8px;
}

.kpi-graph-value .delta-up {
  background: #e5f4ef;
  color: var(--green);
}

.kpi-graph-value .delta-down {
  background: #fee4e2;
  color: var(--red);
}

.line-chart {
  height: 54px;
  width: 100%;
}

.line-chart line {
  stroke: #d8e1dc;
  stroke-width: 1;
}

.line-chart polyline {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.kpi-weekly-chart {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 112px;
  padding: 8px;
  width: 100%;
}

.kpi-weekly-chart .chart-grid {
  stroke: #edf2f4;
  stroke-width: 1;
}

.kpi-weekly-chart .chart-target {
  stroke: var(--yellow);
  stroke-dasharray: 5 5;
  stroke-linecap: round;
  stroke-width: 2;
}

.kpi-weekly-chart polyline {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.kpi-weekly-chart circle {
  fill: #fff;
  stroke: var(--blue);
  stroke-width: 2;
}

.kpi-weekly-chart circle.current {
  fill: var(--blue);
}

.kpi-graph-foot {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.stagger-table {
  min-width: 860px;
}

.stagger-table th:first-child {
  width: 140px;
}

.stagger-table td {
  height: 82px;
  min-width: 160px;
}

.stagger-item {
  align-items: center;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 4px 0;
}

.stagger-item span {
  color: #415161;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stagger-item strong {
  color: #143d32;
  font-size: 15px;
}

.stagger-item em {
  color: var(--blue);
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
}

.empty-cell {
  color: #9aa8b5;
}

.sparkline {
  align-items: end;
  display: grid;
  gap: 3px;
  grid-auto-columns: 9px;
  grid-auto-flow: column;
  height: 34px;
  justify-content: start;
  min-width: 70px;
}

.sparkline span {
  background: #b8c6d3;
  border-radius: 3px 3px 0 0;
  display: block;
  min-height: 3px;
}

.sparkline span.current {
  background: var(--blue);
}

.history-values {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 120px;
}

.history-values span {
  background: #edf2f4;
  border: 1px solid #d8e1dc;
  border-radius: 5px;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
  min-width: 28px;
  padding: 3px 6px;
  text-align: center;
}

.history-values .empty-cell {
  background: transparent;
  border: 0;
  color: #9aa8b5;
  padding: 0;
}

.project-metrics {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

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

.split-grid h3 {
  margin: 0 0 10px;
}

.split-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 92px minmax(0, 1fr) 28px;
  margin-bottom: 10px;
}

.split-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.split-row strong {
  font-size: 14px;
  text-align: right;
}

.mini-bar {
  background: #edf2f4;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.mini-bar span {
  background: var(--blue);
  display: block;
  height: 100%;
}

.attention-row,
.timeline-item {
  background: var(--surface-tint);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.attention-row {
  grid-template-columns: minmax(0, 1fr) minmax(160px, auto);
}

.flag-list {
  align-content: start;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.flag-list span {
  background: #fff2d8;
  border: 1px solid #f3c46d;
  border-radius: 999px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 850;
  padding: 4px 8px;
}

.compact-table {
  min-width: 520px;
}

.role-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.role-list div {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 6px;
  grid-template-columns: 150px minmax(0, 1fr);
  padding-bottom: 10px;
}

.role-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.role-list dd {
  margin: 0;
}

.timeline-item p {
  margin: 0;
}

@media (max-width: 980px) {
  .topbar-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding-bottom: 12px;
    padding-top: 12px;
  }

  .topbar nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
  }

  .topbar nav a {
    font-size: 12px;
    padding: 7px 9px;
  }

  .user-chip {
    justify-self: end;
  }
}

@media (max-width: 860px) {
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-visuals,
  .split-grid,
  .trend-card-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .attention-row,
  .role-list div {
    grid-template-columns: 1fr;
  }

  .flag-list {
    justify-content: flex-start;
  }

  .health-layout {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .shell {
    padding: 20px 16px 34px;
  }

  h1 {
    font-size: 28px;
  }
}

/* Product polish: neutral operating system with restrained color. */
:root {
  --bg: #f3f6f8;
  --bg-soft: #eaf0f4;
  --surface: #ffffff;
  --surface-tint: #f8fafc;
  --ink: #111827;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #d9e2ea;
  --line-strong: #c5d1dc;
  --blue: #2563eb;
  --teal: #0f766e;
  --nav: #12212b;
  --shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.055);
}

html,
body {
  background: #f3f6f8;
}

body {
  color: var(--ink);
}

.app-bg {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0, rgba(243, 246, 248, 0) 260px),
    linear-gradient(180deg, #f8fafc 0, #f3f6f8 48%, #eef3f6 100%);
}

.app-frame {
  border-color: #d7e0e8 !important;
  border-radius: 10px;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.105);
}

.content-plane {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(243, 246, 248, 0) 190px),
    #f3f6f8;
}

.side-rail {
  background: #ffffff;
  border-color: #d9e2ea !important;
}

.brand-tile,
.bg-teal-700 {
  background: #0f766e !important;
  box-shadow: 0 12px 22px rgba(15, 118, 110, 0.18);
}

.hover\:bg-teal-800:hover {
  background: #115e59 !important;
}

.bg-teal-50 {
  background: #ecfdf5 !important;
}

.text-teal-700,
.text-teal-800,
.hover\:text-teal-800:hover,
.page-kicker {
  color: #0f766e !important;
}

.border-teal-200,
.hover\:border-teal-200:hover,
.hover\:border-teal-300:hover {
  border-color: #a7f3d0 !important;
}

.hover\:bg-teal-50:hover {
  background: #ecfdf5 !important;
}

.search-shell,
input,
select,
textarea {
  border-color: #cfd9e3 !important;
  background-color: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #0f766e !important;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.13);
}

.side-nav-link {
  color: #526274;
}

.side-nav-link:hover {
  background: #f1f5f9;
  color: #12212b;
}

.side-nav-link.is-active,
.nav-pill.is-active {
  background: #e7f3f1;
  box-shadow: inset 3px 0 0 #0f766e;
  color: #103c3a;
}

.side-nav-link.is-active svg,
.nav-pill.is-active svg {
  color: #0f766e;
}

.surface-card,
.metric-card,
.row-card {
  background: #fff;
  border-color: #d9e2ea;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.048);
}

.metric-card::before {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent, #0f766e) 82%, #111827), transparent);
}

.metric-card::after {
  opacity: 0.42;
}

.metric-card:hover,
.row-card:hover,
.surface-card:hover {
  border-color: rgba(15, 118, 110, 0.24);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.07);
}

.icon-tile {
  background: #ecfdf5;
  color: #0f766e;
}

th {
  background: #f1f5f9;
  color: #475569;
}

tbody tr:hover {
  background: #f8fafc;
}

.primary {
  background: #111827;
  border-color: #111827;
}

.primary:hover {
  background: #0f766e;
  border-color: #0f766e;
}

.metric-track span,
.split-bar,
.throughput-bar,
.sparkline span.current {
  background: #0f766e;
}

/* Cohesion pass: make raw Tailwind surfaces read like the app shell. */
.rounded-lg.border.border-slate-200.bg-white.shadow-sm,
.rounded-lg.border.border-slate-200.bg-white {
  border-color: #d9e2ea !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04) !important;
}

.bg-slate-50 {
  background-color: #f8fafc !important;
}

.border-slate-100,
.border-slate-200,
.border-slate-300 {
  border-color: #d9e2ea !important;
}

.text-slate-500 {
  color: #64748b !important;
}

.text-slate-600 {
  color: #475569 !important;
}

.text-slate-700,
.text-slate-800,
.text-slate-900,
.text-slate-950 {
  color: #111827 !important;
}

.metric-card {
  min-height: 126px;
}

.metric-card strong {
  letter-spacing: 0;
}

.metric-card .metric-track {
  margin-top: 18px;
}

.row-card {
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

a.row-card:hover,
button.row-card:hover,
.quick-action:hover {
  transform: translateY(-1px);
}

.quick-action {
  border-color: #d9e2ea;
}

.guide-tab-button {
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.guide-tab-button.is-active {
  background: #e7f3f1 !important;
  border-color: #a7d8d3 !important;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.14), 0 8px 18px rgba(15, 23, 42, 0.055);
  color: #103c3a !important;
}

.guide-tab-button.is-active svg {
  color: #0f766e;
}

.health-pill,
.status {
  min-width: 0;
}

table {
  border-radius: 8px;
}

th,
td {
  padding: 13px 16px;
}

thead th {
  white-space: nowrap;
}

td {
  color: #30283f;
}

button.rounded-md {
  min-height: 0;
}

.empty-state code {
  display: none;
}

@media (max-width: 1024px) {
  .app-frame {
    margin: 0;
    min-height: 100vh;
  }
}

/* Lovable-inspired purple theme: light, calm, and operational. */
:root {
  --bg: #f7f4fb;
  --bg-soft: #f1ecf8;
  --surface: #ffffff;
  --surface-tint: #fbfaff;
  --ink: #171421;
  --ink-soft: #393247;
  --muted: #766f86;
  --line: #e4ddec;
  --line-strong: #d5c9e3;
  --blue: #5d5fef;
  --teal: #6d38d3;
  --purple: #6d38d3;
  --purple-soft: #f1e9ff;
  --purple-line: #d8c7fb;
  --nav: #ffffff;
  --shadow: 0 18px 48px rgba(59, 43, 91, 0.08);
  --shadow-soft: 0 8px 22px rgba(59, 43, 91, 0.055);
}

html,
body {
  background: #f7f4fb;
}

body,
.app-bg {
  color: var(--ink);
}

.app-bg {
  background:
    radial-gradient(circle at 15% 0%, rgba(109, 56, 211, 0.08), transparent 32rem),
    linear-gradient(180deg, #fbfaff 0%, #f7f4fb 44%, #f4f0fa 100%);
}

.app-frame {
  background: #ffffff !important;
  border-color: #ddd3eb !important;
  border-radius: 10px;
  box-shadow:
    0 26px 70px rgba(37, 29, 58, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.content-plane {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 244, 251, 0) 210px),
    #f7f4fb;
}

header.sticky {
  background: rgba(255, 255, 255, 0.86) !important;
  border-color: #e4ddec !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset;
}

.side-rail {
  background: linear-gradient(180deg, #ffffff 0%, #fbfaff 100%) !important;
  border-color: #e4ddec !important;
}

.brand-tile,
.bg-teal-700 {
  background: linear-gradient(135deg, #7c3aed, #5b2cc7) !important;
  box-shadow: 0 14px 26px rgba(109, 56, 211, 0.2);
}

.hover\:bg-teal-800:hover,
.hover\:bg-slate-950:hover {
  background: #5b2cc7 !important;
}

.bg-slate-950,
.primary {
  background: #211a32 !important;
  border-color: #211a32 !important;
}

.bg-slate-950:hover,
.primary:hover {
  background: #6d38d3 !important;
  border-color: #6d38d3 !important;
}

.text-teal-700,
.text-teal-800,
.hover\:text-teal-800:hover,
.page-kicker,
a.text-teal-700 {
  color: #6d38d3 !important;
}

.bg-teal-50,
.hover\:bg-teal-50:hover {
  background: #f1e9ff !important;
}

.border-teal-200,
.hover\:border-teal-200:hover,
.hover\:border-teal-300:hover {
  border-color: #d8c7fb !important;
}

.search-shell,
input,
select,
textarea {
  background-color: #ffffff !important;
  border-color: #d9cfeb !important;
  color: #1f1a2e !important;
  box-shadow: 0 1px 2px rgba(59, 43, 91, 0.04);
}

.search-shell:focus-within,
input:focus,
select:focus,
textarea:focus {
  border-color: #9f7aea !important;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12) !important;
}

input::placeholder,
textarea::placeholder {
  color: #a39aad !important;
}

.side-nav-link {
  color: #6f667f;
  font-weight: 800;
}

.side-nav-link:hover {
  background: #f6f1ff;
  color: #241936;
}

.side-nav-link.is-active,
.nav-pill.is-active {
  background: #f1e9ff;
  box-shadow:
    inset 3px 0 0 #7c3aed,
    inset 0 0 0 1px rgba(124, 58, 237, 0.08);
  color: #4c1d95;
}

.side-nav-link.is-active svg,
.nav-pill.is-active svg {
  color: #6d38d3;
}

.nav-pill {
  color: #6f667f;
}

.nav-pill:hover {
  background: #f6f1ff;
  color: #241936;
}

.surface-card,
.metric-card,
.row-card,
.quick-action,
.rounded-lg.border.border-slate-200.bg-white.shadow-sm,
.rounded-lg.border.border-slate-200.bg-white {
  background: #ffffff !important;
  border-color: #e1d7ed !important;
  box-shadow: 0 10px 28px rgba(59, 43, 91, 0.055) !important;
}

.surface-card:hover,
.metric-card:hover,
.row-card:hover,
.quick-action:hover {
  border-color: #d1bdf6 !important;
  box-shadow: 0 16px 34px rgba(59, 43, 91, 0.075) !important;
}

.metric-card::before {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent, #7c3aed) 74%, #5b2cc7), transparent);
}

.metric-card::after {
  background: radial-gradient(circle at top right, color-mix(in srgb, var(--accent, #7c3aed) 12%, transparent), transparent 46%);
  opacity: 0.55;
}

.icon-tile {
  background: color-mix(in srgb, var(--accent, #7c3aed) 11%, white);
  color: var(--accent, #7c3aed);
}

.metric-track {
  background: #eee8f6;
}

.metric-track span,
.split-bar,
.throughput-bar,
.sparkline span.current {
  background: #6d38d3;
}

th {
  background: #f5f1fb !important;
  color: #5f556d !important;
  border-color: #e1d7ed !important;
}

td {
  color: #342b42;
  border-color: #e7dfef !important;
}

tbody tr:hover {
  background: #fbf8ff !important;
}

.chart-shell,
.kpi-weekly-chart,
.trend-card,
.kpi-graph-card {
  background: #ffffff !important;
  border-color: #e1d7ed !important;
}

.line-chart polyline,
.kpi-weekly-chart polyline {
  stroke: #6d38d3;
}

.kpi-weekly-chart circle {
  stroke: #6d38d3;
}

.kpi-weekly-chart circle.current {
  fill: #6d38d3;
}

.chart-target,
.kpi-weekly-chart .chart-target {
  stroke: #c48a1f;
}

.bg-slate-50 {
  background-color: #fbfaff !important;
}

.border-slate-100,
.border-slate-200,
.border-slate-300 {
  border-color: #e1d7ed !important;
}

.text-slate-500 {
  color: #766f86 !important;
}

.text-slate-600 {
  color: #62596f !important;
}

.text-slate-700,
.text-slate-800,
.text-slate-900,
.text-slate-950 {
  color: #171421 !important;
}

.guide-tab-button.is-active,
button.rounded-md.bg-slate-100,
.rounded-md.bg-slate-100 {
  background: #f1e9ff !important;
  border-color: #d8c7fb !important;
  color: #4c1d95 !important;
}

.guide-tab-button.is-active svg {
  color: #6d38d3;
}

.health-pill.health-green {
  background: #e9f8ef;
  border-color: #bfe8cf;
  color: #14795d;
}

.health-pill.health-yellow,
.health-pill.health-orange {
  background: #fff5df;
  border-color: #f4d28b;
  color: #9a5d00;
}

.health-pill.health-red {
  background: #fff0ef;
  border-color: #f4c3bf;
  color: #b42318;
}

.health-pill.health-unknown {
  background: #f0edf5;
  border-color: #ded6e8;
  color: #64586f;
}

.record-status {
  align-items: center;
}

.record-status .record-status-form {
  display: inline-flex;
}

.record-status .status-chip,
.record-status .health-chip,
.record-status .grade-chip {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 950;
  justify-content: center;
  line-height: 1;
  min-height: 38px;
  white-space: nowrap;
}

.record-status .status-select,
.record-status .health-select {
  appearance: none !important;
  background-position: calc(100% - 15px) 50%, calc(100% - 9px) 50%, 0 0 !important;
  background-repeat: no-repeat !important;
  background-size: 6px 6px, 6px 6px, 100% 100% !important;
  border-style: solid !important;
  border-width: 1px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 8px 18px rgba(32, 22, 55, 0.08) !important;
  cursor: pointer;
  min-width: 128px;
  padding: 9px 34px 9px 15px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.record-status .status-select:hover,
.record-status .health-select:hover,
.record-status .grade-chip:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 12px 24px rgba(32, 22, 55, 0.12) !important;
}

.record-status .status-select {
  min-width: 138px;
}

.record-status .health-select {
  min-width: 132px;
}

.status-chip-active {
  background:
    linear-gradient(45deg, transparent 50%, #155f4b 50%),
    linear-gradient(135deg, #155f4b 50%, transparent 50%),
    linear-gradient(135deg, #ddf8eb, #effdf7) !important;
  border-color: #a8e2c4 !important;
  color: #14795d !important;
}

.status-chip-in_progress,
.status-chip-ongoing {
  background:
    linear-gradient(45deg, transparent 50%, #2258a6 50%),
    linear-gradient(135deg, #2258a6 50%, transparent 50%),
    linear-gradient(135deg, #e4efff, #f4f8ff) !important;
  border-color: #b9cdf6 !important;
  color: #2258a6 !important;
}

.status-chip-blocked,
.status-chip-at_risk {
  background:
    linear-gradient(45deg, transparent 50%, #b42318 50%),
    linear-gradient(135deg, #b42318 50%, transparent 50%),
    linear-gradient(135deg, #fff0ef, #fff7f5) !important;
  border-color: #f0b5ae !important;
  color: #b42318 !important;
}

.status-chip-paused,
.status-chip-backlog {
  background:
    linear-gradient(45deg, transparent 50%, #695d78 50%),
    linear-gradient(135deg, #695d78 50%, transparent 50%),
    linear-gradient(135deg, #f1edf6, #fbf9ff) !important;
  border-color: #d9cfe7 !important;
  color: #695d78 !important;
}

.status-chip-completed {
  background:
    linear-gradient(45deg, transparent 50%, #0f766e 50%),
    linear-gradient(135deg, #0f766e 50%, transparent 50%),
    linear-gradient(135deg, #d9f8f4, #effffd) !important;
  border-color: #a0dfd7 !important;
  color: #0f766e !important;
}

.health-chip-green {
  background:
    linear-gradient(45deg, transparent 50%, #14795d 50%),
    linear-gradient(135deg, #14795d 50%, transparent 50%),
    linear-gradient(135deg, #dff8eb, #f1fff8) !important;
  border-color: #a8e2c4 !important;
  color: #14795d !important;
}

.health-chip-yellow {
  background:
    linear-gradient(45deg, transparent 50%, #9a5b00 50%),
    linear-gradient(135deg, #9a5b00 50%, transparent 50%),
    linear-gradient(135deg, #fff1c2, #fff9e8) !important;
  border-color: #efca72 !important;
  color: #9a5b00 !important;
}

.health-chip-orange {
  background:
    linear-gradient(45deg, transparent 50%, #c24d12 50%),
    linear-gradient(135deg, #c24d12 50%, transparent 50%),
    linear-gradient(135deg, #ffe6cc, #fff5ec) !important;
  border-color: #f3b37f !important;
  color: #c24d12 !important;
}

.health-chip-red {
  background:
    linear-gradient(45deg, transparent 50%, #b42318 50%),
    linear-gradient(135deg, #b42318 50%, transparent 50%),
    linear-gradient(135deg, #ffe8e5, #fff4f2) !important;
  border-color: #efb5ae !important;
  color: #b42318 !important;
}

.health-chip-unknown {
  background:
    linear-gradient(45deg, transparent 50%, #61576d 50%),
    linear-gradient(135deg, #61576d 50%, transparent 50%),
    linear-gradient(135deg, #f0edf5, #fbf9ff) !important;
  border-color: #d8cfe4 !important;
  color: #61576d !important;
}

.status-select option,
.health-select option {
  background: #ffffff;
  color: #211a32;
  font-weight: 850;
}

.status-select option[value="active"],
.status-select option[value="completed"],
.health-select option[value="green"] {
  color: #14795d;
}

.status-select option[value="in_progress"],
.status-select option[value="ongoing"] {
  color: #2258a6;
}

.status-select option[value="blocked"],
.status-select option[value="at_risk"],
.health-select option[value="red"] {
  color: #b42318;
}

.health-select option[value="yellow"] {
  color: #9a5b00;
}

.health-select option[value="orange"] {
  color: #c24d12;
}

.grade-chip {
  min-width: 42px;
  padding: 0 13px;
  position: relative;
}

.grade-chip::before {
  border-radius: 999px;
  content: "";
  height: 7px;
  margin-right: 7px;
  width: 7px;
}

.grade-chip-A {
  background: linear-gradient(135deg, #efe7ff, #f9f5ff);
  border-color: #cab8ff !important;
  color: #4c1d95;
}

.grade-chip-A::before {
  background: #7c3aed;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.grade-chip-B {
  background: linear-gradient(135deg, #e6f1ff, #f6fbff);
  border-color: #b8d3ff !important;
  color: #1d4ed8;
}

.grade-chip-B::before {
  background: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.grade-chip-C {
  background: linear-gradient(135deg, #fff1c7, #fff9e8);
  border-color: #efca72 !important;
  color: #8a5200;
}

.grade-chip-C::before {
  background: #d97706;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.grade-chip-D {
  background: linear-gradient(135deg, #ffe5e1, #fff4f2);
  border-color: #efb5ae !important;
  color: #a21d13;
}

.grade-chip-D::before {
  background: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.grade-chip-unknown {
  background: linear-gradient(135deg, #f0edf5, #fbf9ff);
  border-color: #d8cfe4 !important;
  color: #61576d;
}

.grade-chip-unknown::before {
  background: #8a7c99;
  box-shadow: 0 0 0 4px rgba(97, 87, 109, 0.1);
}

footer {
  background: #ffffff !important;
  border-color: #e1d7ed !important;
}
