:root {
  --border: #dde3ed;
  --blue: #254fd1;
}
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid #cbd3df;
  border-radius: 8px;
  padding: 10px 16px;
  min-height: 44px;
  font-weight: 600;
  color: #18283b;
  background: #fff;
}
a.button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
a.button:hover {
  filter: brightness(0.97);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.brand .brand-mark {
  width: 34px;
  height: 34px;
  font-size: 0.8rem;
}
.topbar nav {
  display: flex;
  gap: 8px;
  margin-left: 28px;
}
.topbar nav a {
  padding: 10px 14px;
  text-decoration: none;
  color: #607087;
  font-size: 0.875rem;
  font-weight: 650;
  border-radius: 7px;
}
.topbar nav a.active {
  color: #254fd1;
  background: #ecf1ff;
}
.quiet {
  border-color: transparent;
  background: transparent;
  font-size: 0.875rem;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 6px 0 28px;
}
.page-heading h1 {
  margin: 4px 0 10px;
}
.page-heading .eyebrow {
  margin: 0;
  color: #607087;
}
.page-heading p {
  margin: 0;
}
.count {
  font-size: 1rem;
  background: #e6eaf2;
  border-radius: 20px;
  padding: 4px 10px;
  vertical-align: middle;
  letter-spacing: 0;
}
.form-card {
  max-width: 760px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}
.settings-admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}
.settings-wide {
  max-width: none;
}
.settings-wide h2 {
  margin-top: 0;
}
.position-list {
  display: grid;
  gap: 9px;
  margin: 20px 0;
}
.position-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
}
.position-row label,
.position-add label {
  margin: 0;
}
.position-row input {
  margin: 0;
}
.position-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.closed-date-list {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.closed-date-list > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.closed-date-chip {
  padding: 5px 8px;
  border-radius: 6px;
  background: #fff0ef;
  color: #8b2b25;
  font-size: 0.78rem;
}
@media (max-width: 900px) {
  .settings-admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .position-row { grid-template-columns: 1fr auto auto; }
  .position-row > label:first-of-type { grid-column: 1 / -1; }
  .position-add { grid-template-columns: 1fr; }
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field-help {
  display: block;
  color: #607087;
  font-size: 0.8rem;
  font-weight: 400;
  margin-top: 7px;
}
.form-card .pay-rates {
  margin-bottom: 28px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 0.875rem;
  text-decoration: none;
}
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th,
td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
thead th {
  background: #f8faff;
  color: #607087;
  font-weight: 600;
  white-space: nowrap;
}
tbody tr:last-child > * {
  border-bottom: 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 5px;
  padding: 4px 9px;
  color: #536277;
  background: #edf0f5;
}
.badge.published {
  background: #e3f3ed;
  color: #166647;
}
.empty-state {
  padding: 64px 24px;
  text-align: center;
  border: 1px dashed #c0ccdd;
  border-radius: 12px;
  background: white;
}
.empty-state h2 {
  font-size: 1.25rem;
  margin: 0;
}
.empty-state .button {
  margin-top: 10px;
}
.success {
  background: #e3f3ed;
  color: #166647;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 700px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
  }
  .topbar .brand {
    flex: 1;
  }
  .topbar .account-name {
    display: none;
  }
  .topbar nav {
    order: 3;
    margin: 0;
    width: 100%;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .form-card {
    padding: 20px;
  }
  .employee-table {
    min-width: 680px;
  }
}
.employee-group-title {
  margin: 18px 0 8px;
  font-size: 0.9rem;
  color: #53637b;
}
.hours-export-form .report-option-first {
  margin-top: 24px;
}
.payment-tag {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #edf1f6;
  color: #53637b;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.payment-tag.eft {
  background: #e8f0ff;
  color: #244c9b;
}
.payment-tag.cash {
  background: #fff1d8;
  color: #80510a;
}
.weekly-wages {
  margin-top: 14px;
}
.weekly-wages > summary {
  width: fit-content;
  cursor: pointer;
  color: #254fd1;
  font-size: 0.875rem;
  font-weight: 650;
  padding: 8px 2px;
}
.weekly-wages[open] > summary {
  margin-bottom: 8px;
}
.weekly-wages tfoot th {
  background: #f8faff;
}
.colour-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.colour-picker { margin: 0 0 20px; }
.colour-picker > summary { cursor: pointer; padding: 12px 0; color: #254fd1; }
.colour-options label > span:last-child { min-width: 0; }
.colour-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.colour-options label:has(input:checked) {
  border-color: var(--tone);
  box-shadow: inset 0 0 0 1px var(--tone);
  background: var(--tint);
}
.colour-options input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}
.colour-options strong,
.colour-options small {
  display: block;
}
.colour-options small {
  overflow: hidden;
  color: #607087;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.colour-swatch,
.employee-list-colour {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--tone);
}
.employee-list-colour {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
}
@media (max-width: 700px) {
  .colour-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
