:root {
  color: #1f2937;
  background: #f6f7f9;
  font-family: Avenir Next, Segoe UI, sans-serif;
}
body {
  margin: 0;
}
header {
  background: #ffffff;
  border-bottom: 1px solid #d8dee8;
}
nav,
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px;
}
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
nav a {
  color: #31516d;
  text-decoration: none;
  font-weight: 600;
}
h1 {
  margin: 0 0 16px;
  font-size: 2rem;
}
h2 {
  margin: 32px 0 12px;
  font-size: 1.25rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.card {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  padding: 18px;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid #d8dee8;
}
th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #e6eaf0;
  text-align: left;
}
th {
  background: #eef2f6;
}
.table-wrap {
  overflow-x: auto;
}
.grid-wrap {
  overflow: visible;
  position: relative;
}
.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.filter-bar {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  padding: 16px;
  margin-bottom: 18px;
}
.entry-form {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding: 16px;
}
.workbook-upload-form {
  grid-template-columns: minmax(320px, 1fr) minmax(150px, 220px);
  align-items: end;
  row-gap: 12px;
  padding: 12px;
}
.contents-form {
  display: contents;
}
.workbook-upload-form input[type="file"] {
  box-sizing: border-box;
  width: 100%;
}
.file-picker input[type="file"] {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}
.file-picker-control {
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 34px;
}
.file-picker-label {
  background: #ffffff;
  border: 1px solid #b8c2cf;
  border-radius: 6px;
  color: #31516d;
  cursor: pointer;
  font-weight: 700;
  padding: 8px 12px;
}
.selected-file {
  align-items: center;
  background: #eef2f6;
  border: 1px solid #b8c2cf;
  border-radius: 6px;
  display: none;
  gap: 8px;
  max-width: 100%;
  min-height: 38px;
  padding: 0 6px 0 10px;
}
.selected-file.visible {
  display: inline-flex;
}
.selected-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clear-file {
  align-items: center;
  background: #ffffff;
  border: 1px solid #b8c2cf;
  border-radius: 999px;
  color: #31516d;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  line-height: 1;
  min-height: 24px;
  padding: 0;
  width: 24px;
}
.field {
  display: grid;
  gap: 6px;
}
.full-width {
  grid-column: 1 / -1;
}
label {
  color: #4b5563;
  font-size: 0.85rem;
  font-weight: 700;
}
input,
select,
textarea,
button {
  border: 1px solid #b8c2cf;
  border-radius: 6px;
  box-sizing: border-box;
  color: #1f2937;
  font: inherit;
  min-height: 38px;
  padding: 7px 10px;
}
button {
  background: #31516d;
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}
.btn {
  align-items: center;
  background: #31516d;
  border: 1px solid #31516d;
  border-radius: 6px;
  box-sizing: border-box;
  color: #ffffff;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  line-height: 1.2;
  min-height: 38px;
  padding: 8px 12px;
  text-decoration: none;
}
.btn-secondary,
.btn-link {
  background: #ffffff;
  border-color: #b8c2cf;
  color: #31516d;
}
.btn-warning {
  background: #9f4f2f;
  border-color: #9f4f2f;
}
.auth-card {
  margin: 0 auto;
  max-width: 860px;
}
.auth-card-narrow {
  max-width: 720px;
}
.auth-card form {
  margin: 0;
}
.auth-card table {
  border: 1px solid #d8dee8;
  margin: 18px 0 0;
  table-layout: fixed;
}
.auth-card th {
  width: 180px;
}
.auth-card td {
  background: #ffffff;
}
.auth-card input:not([type="hidden"]):not([type="submit"]),
.auth-card select,
.auth-card textarea {
  box-sizing: border-box;
  min-height: 40px;
  width: min(100%, 320px);
}
.auth-card input[type="radio"],
.auth-card input[type="checkbox"] {
  min-height: 0;
  width: auto;
}
.auth-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.auth-actions .auth-action {
  flex: 0 0 76px;
  height: 40px;
  min-height: 40px;
  padding: 0 12px;
}
.auth-step-label {
  font-weight: 600;
}
.auth-alternates {
  margin-top: 16px;
}
.auth-alternates p {
  color: #586575;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 8px;
}
.auth-alt-button {
  min-width: 210px;
}
.auth-card .btn:disabled,
.auth-card button:disabled {
  background: #eef2f6;
  border-color: #c8d0da;
  color: #8a97a8;
  cursor: not-allowed;
}
.password-strength {
  margin: 10px 0 16px;
}
.password-strength-track {
  background: #eef2f6;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  width: min(100%, 320px);
}
.password-strength-track span {
  background: #9f2f2f;
  display: block;
  height: 100%;
  transition: width 120ms ease, background 120ms ease;
  width: 8%;
}
.password-strength-track span[data-score="2"] {
  background: #b7791f;
}
.password-strength-track span[data-score="3"],
.password-strength-track span[data-score="4"] {
  background: #25603b;
}
.password-strength p {
  color: #586575;
  font-size: 0.85rem;
  margin: 6px 0 0;
}
.helptext {
  color: #697586;
  display: block;
  font-size: 0.85rem;
  margin-top: 4px;
}
.metric {
  min-height: 92px;
}
.metric span {
  color: #586575;
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}
.metric strong {
  display: block;
  font-size: 1.45rem;
  margin-top: 8px;
}
.section-header {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}
.section-header p {
  color: #586575;
  margin: 0 0 12px;
}
.empty,
.error,
.notice {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  color: #586575;
  padding: 16px;
}
.error {
  border-color: #d99b9b;
  color: #9f2f2f;
}
.notice {
  border-color: #8db596;
  color: #25603b;
  margin-bottom: 18px;
}
.errorlist {
  color: #9f2f2f;
  margin: 4px 0 0;
  padding-left: 18px;
}
.numeric {
  text-align: right;
  white-space: nowrap;
}
.entry-grid,
.data-grid {
  border: 1px solid #b8c2cf;
  border-collapse: collapse;
  table-layout: fixed;
}
.entry-grid th,
.entry-grid td,
.data-grid th,
.data-grid td {
  border: 1px solid #c8d0da;
  vertical-align: middle;
}
.entry-grid th,
.data-grid th {
  background: #e8edf2;
  height: 34px;
  text-align: center;
}
.entry-grid th,
.entry-grid td {
  padding: 0;
}
.data-grid th,
.data-grid td {
  padding: 7px 8px;
}
.data-grid td {
  overflow-wrap: anywhere;
}
.data-grid select {
  background: #ffffff;
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
  color: inherit;
  font: inherit;
  min-height: 36px;
  outline: 0;
  padding: 6px 28px 6px 8px;
  width: 100%;
}
.data-grid select:focus {
  box-shadow: inset 0 0 0 2px #31516d;
}
.preview-grid {
  table-layout: auto;
}
.preview-scroll {
  border: 1px solid #c8d0da;
  max-height: 360px;
  overflow: auto;
}
.preview-scroll .data-grid {
  border: 0;
}
.preview-scroll .data-grid th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.preview-grid th,
.preview-grid td {
  min-width: 150px;
  white-space: nowrap;
}
.preview-grid .wide-column {
  min-width: 280px;
}
.preview-grid th:nth-child(4),
.preview-grid td:nth-child(4),
.preview-grid th:nth-child(5),
.preview-grid td:nth-child(5),
.preview-grid th:nth-child(6),
.preview-grid td:nth-child(6),
.preview-grid th:nth-child(7),
.preview-grid td:nth-child(7) {
  min-width: 260px;
}
.preview-grid th:nth-child(7),
.preview-grid td:nth-child(7) {
  min-width: 340px;
}
.entry-grid select,
.entry-grid input,
.entry-grid textarea,
.data-grid .grid-combobox input {
  background: #ffffff;
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
  min-height: 36px;
  outline: 0;
  padding: 6px 8px;
  width: 100%;
}
.entry-grid input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}
.entry-grid input[type="number"]::-webkit-inner-spin-button,
.entry-grid input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.entry-grid select:focus,
.entry-grid input:focus,
.entry-grid textarea:focus,
.data-grid .grid-combobox input:focus {
  box-shadow: inset 0 0 0 2px #31516d;
}
.grid-combobox {
  position: relative;
}
.grid-combobox::after {
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #31516d;
  content: "";
  pointer-events: none;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}
.grid-combobox.open::after {
  transform: translateY(-50%) rotate(180deg);
}
.grid-combobox input {
  padding-right: 42px;
}
.grid-combobox-menu {
  background: #ffffff;
  border: 1px solid #9aa8b8;
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.18);
  display: none;
  left: 0;
  list-style: none;
  margin: 0;
  max-height: 220px;
  overflow-y: auto;
  padding: 0;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 1000;
}
.grid-combobox.open .grid-combobox-menu {
  display: block;
}
.grid-combobox-menu li {
  border-bottom: 1px solid #e6eaf0;
  cursor: pointer;
  padding: 7px 8px;
}
.grid-combobox-menu li:last-child {
  border-bottom: 0;
}
.grid-combobox-menu li.active,
.grid-combobox-menu li:hover {
  background: #e8edf2;
}
.grid-combobox-menu li.empty-option {
  color: #697586;
  cursor: default;
}
.entry-grid textarea {
  display: block;
  min-height: 36px;
  resize: vertical;
}
.entry-grid .grid-actions {
  text-align: center;
  width: 96px;
}
.entry-grid .remove-grid-row {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #31516d;
  min-height: 36px;
  padding: 0 8px;
  width: 100%;
}
.entry-grid .row-error td {
  background: #fff1f1;
}
.data-grid .row-error td {
  background: #fff1f1;
}
.entry-grid .row-error select,
.entry-grid .row-error input,
.entry-grid .row-error textarea {
  border-color: #c74b4b;
}
.muted {
  color: #697586;
}

/* Column widths for the monthly human-cost grid (data_entry.html). */
col.col-w-7 {
  width: 7%;
}
col.col-w-10 {
  width: 10%;
}
col.col-w-14 {
  width: 14%;
}
col.col-w-18 {
  width: 18%;
}
col.col-w-20 {
  width: 20%;
}
col.col-w-21 {
  width: 21%;
}
