:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #25272d;
  background: #f6f5f2;
  font-size: 16px;
  --orange: #e87722;
  --tint: #fdf1e9;
  --ink: #25272d;
  --muted: #606167;
  --line: #ded8cf;
  --paper: #fff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--orange);
  color: #171717;
  font-weight: 750;
  cursor: pointer;
}
button:hover {
  filter: brightness(0.96);
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.secondary {
  background: #fff;
  border-color: #b8b6b0;
  color: var(--ink);
}
button.link {
  background: none;
  border: 0;
  padding: 8px 0;
  min-height: 44px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 600;
  text-align: left;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #25272d;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #e8772266;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  border: 1px solid #b8b6b0;
  border-radius: 7px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
}
textarea {
  resize: vertical;
}
input:disabled,
textarea:disabled {
  opacity: 1;
  background: #f5f4f1;
  color: #555;
}
label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #515159;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 36px;
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin-bottom: 12px;
}
h2 {
  font-size: 22px;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 20px;
  margin-bottom: 7px;
}
p {
  line-height: 1.55;
}
.muted {
  color: var(--muted);
  font-size: 14px;
}
.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 1.6px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  min-width: 0;
  background: #fff;
  padding: 35px 22px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 42px;
}
.brand img {
  display: block;
  width: 100%;
  max-width: 190px;
  height: auto;
}
.brand span {
  display: block;
  letter-spacing: 3px;
  font-size: 10px;
  margin-top: 10px;
  font-weight: 700;
  color: #626167;
}
.sidebar nav {
  display: grid;
  gap: 8px;
}
.sidebar nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  text-align: left;
  color: #5c5c61;
  font-size: 14px;
  padding: 13px 10px;
}
.sidebar nav button.selected {
  background: var(--tint);
  color: #171717;
  box-shadow: inset 3px 0 var(--orange);
}
nav svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.sidebar footer {
  margin-top: auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.main {
  min-width: 0;
  width: 100%;
  max-width: 1200px;
  padding: 28px 40px 60px;
  margin-inline: auto;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 34px;
}
.stage {
  font-size: 10px;
  letter-spacing: 1px;
  background: #eeece6;
  color: #53534f;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 7px 10px;
  white-space: nowrap;
}
.intro {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: start;
}
.intro p {
  max-width: 670px;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 22px;
}
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.filters {
  display: flex;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
}
.filters label {
  flex: 1;
  min-width: 170px;
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 12px 0 24px;
  padding: 22px;
  gap: 20px;
}
.stats > div {
  display: grid;
  gap: 8px;
}
.stats > div + div {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.stats span {
  font-size: 13px;
  color: var(--muted);
}
.stats strong {
  font-size: 30px;
  letter-spacing: -0.8px;
}
.stats small {
  font-size: 15px;
  font-weight: 500;
}
.sheet-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}
.sheet-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.sheet-summary h2 {
  font-size: 20px;
  margin-bottom: 13px;
}
.sheet-summary p {
  margin-bottom: 0;
}
.summary-meta {
  display: flex;
  align-items: center;
  gap: 18px;
}
.badge {
  display: inline-block;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  background: #eeede8;
  color: #55554f;
  padding: 6px 11px;
  border-radius: 20px;
  align-self: start;
}
.badge.Submitted {
  background: var(--tint);
  color: #854415;
}
.badge.Approved {
  background: #e7efdf;
  color: #36582a;
}
.badge.Returned {
  background: #fbe7e5;
  color: #91392d;
}
.empty,
.empty-day {
  padding: 30px 20px;
  color: var(--muted);
  text-align: center;
}
.empty-day {
  background: #fff;
  border: 1px dashed #c7c3ba;
  border-radius: 10px;
}
.empty-day h3 {
  font-size: 18px;
  color: var(--ink);
}
.empty-day p {
  font-size: 14px;
  margin-bottom: 0;
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 15px;
  margin: 18px 0 8px;
}
.sheet-head p:not(.eyebrow) {
  font-size: 18px;
  color: #5f5f64;
  margin-bottom: 20px;
}
.sheet-head h1 {
  font-size: 38px;
}
.editor-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin: 8px 0 24px;
}
.calendar-panel {
  position: sticky;
  top: 24px;
}
.calendar {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 14px;
}
.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}
.calendar-weekdays span {
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  padding: 0 0 10px;
}
.calendar-day {
  padding: 8px 1px;
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 62px;
  background: #faf9f7;
  color: var(--ink);
  border-radius: 6px;
  border: 1px solid transparent;
  line-height: 1;
}
.calendar-day.weekend {
  background: #f2f1ed;
}
.calendar-day.selected {
  background: var(--orange);
  color: #141414;
  border: 1px solid #a84e0c;
}
.calendar-day span {
  font-size: 17px;
  font-weight: 700;
}
.calendar-day small {
  font-size: 9px;
  line-height: 1.1;
  font-weight: 500;
  white-space: nowrap;
}
.calendar-caption {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin: 12px 0 0;
}
.fortnight-total {
  display: flex;
  justify-content: space-between;
  padding: 17px 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 15px;
  font-size: 13px;
}
.fortnight-total strong {
  font-size: 20px;
}
.day-heading {
  display: flex;
  align-items: start;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 18px;
}
.day-heading h2 {
  font-size: 26px;
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin-bottom: 4px;
  width: 100%;
}
#save-state {
  font-size: 12px;
  color: #62645d;
}
#save-state.dirty {
  color: #9b4204;
  font-weight: 700;
}
.activity-cards {
  display: grid;
  gap: 16px;
}
.activity-card {
  border: 1px solid #ccc8bf;
  border-radius: 10px;
  background: #fff;
  padding: 22px;
}
.card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.card-heading p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 10px;
}
.icon-button {
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  font-size: 28px;
  font-weight: 400;
  color: #626269;
  background: transparent;
  border: 1px solid var(--line);
  line-height: 1;
}
.edit-activity {
  font-size: 12px;
  min-height: 44px !important;
  margin-bottom: 10px;
}
.hours-label {
  font-size: 12px;
  margin-bottom: 7px;
}
.hour-control {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hour-control .step {
  width: 52px;
  min-width: 52px;
  height: 62px;
  font-size: 32px;
  padding: 0;
  line-height: 1;
}
.hour-control input {
  font-size: 40px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: -1px;
  text-align: center;
  height: 72px;
  padding: 5px 2px;
  width: 100%;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}
.hour-control input::-webkit-inner-spin-button,
.hour-control input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.hour-control > span {
  font-size: 12px;
  color: var(--muted);
}
.entry-note {
  margin-top: 18px;
  font-size: 12px;
}
.entry-note input {
  font-size: 14px;
  min-height: 48px;
}
.add-activity {
  background: transparent;
  border: 2px dashed #bbb7af;
  width: 100%;
  font-size: 17px;
  min-height: 64px;
  margin: 18px 0 0;
}
.day-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #eeece6;
  border-radius: 9px;
  padding: 18px 20px;
  margin: 20px 0 14px;
  font-weight: 700;
}
.day-total strong {
  font-size: 29px;
  letter-spacing: -0.8px;
}
.save-actions {
  display: grid;
  gap: 10px;
}
.save-actions button {
  min-height: 54px;
}
.save-actions button.link {
  min-height: 44px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
}
.save-help {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin: 2px 0 0;
}
.warning,
.info {
  padding: 18px 20px;
  background: var(--tint);
  border-left: 3px solid var(--orange);
  border-radius: 5px;
  margin-bottom: 20px;
  font-size: 14px;
}
.warning p,
.info p {
  margin: 6px 0 0;
}
.workflow h2 {
  font-size: 20px;
}
.history-panel summary {
  min-height: 44px;
  cursor: pointer;
  font-weight: 700;
}
.history-panel summary span {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 10px;
}
.history {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}
.history article {
  overflow-wrap: anywhere;
  border-left: 2px solid #dad7cf;
  padding-left: 14px;
  font-size: 12px;
}
.history small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.5;
}
.history p {
  margin: 6px 0 0;
}
.login {
  max-width: 470px;
  margin: 12vh auto;
  padding: 38px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 15px 50px #25272d08;
}
.login-logo {
  display: block;
  width: 230px;
  height: auto;
  max-width: 100%;
  margin-bottom: 30px;
}
.login h1 {
  font-size: 40px;
}
.login .actions {
  margin-top: 28px;
}
.login p:last-child {
  font-size: 12px;
  color: var(--muted);
  margin: 25px 0 0;
}
#notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(620px, 90vw);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  z-index: 20;
  font-size: 14px;
  box-shadow: 0 8px 25px #0002;
}
#notice:not(:empty) {
  padding: 14px 20px;
}
#notice.error {
  background: #873224;
}
dialog {
  width: min(460px, calc(100% - 32px));
  max-height: 85dvh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  color: var(--ink);
}
dialog::backdrop {
  background: #16161666;
}
dialog label {
  margin-bottom: 18px;
}
dialog .actions {
  justify-content: flex-end;
}
#activity-error {
  color: #a02e21;
  font-size: 14px;
}
.account {
  max-width: 650px;
}
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .main {
    padding: 24px;
  }
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .calendar-panel {
    position: static;
  }
  .calendar {
    max-width: 650px;
  }
  .calendar-day {
    min-height: 64px;
  }
  .calendar-day small {
    font-size: 11px;
  }
  .calendar-panel > .muted {
    display: none;
  }
  .fortnight-total {
    margin-bottom: 0;
  }
  .day-editor {
    max-width: 650px;
  }
  .sidebar {
    padding-inline: 16px;
  }
}
@media (max-width: 700px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    display: block;
    border: 0;
    padding: 16px 20px 0;
    background: transparent;
  }
  .brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .brand img {
    width: 200px;
    max-width: 65%;
    height: auto;
  }
  .brand span {
    font-size: 9px;
    margin: 0;
    letter-spacing: 1.7px;
  }
  .sidebar footer {
    display: none;
  }
  .sidebar nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: #fff;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 7px 5px max(8px, env(safe-area-inset-bottom));
  }
  .sidebar nav button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-height: 58px;
    padding: 7px 1px;
    font-size: 10px;
    text-align: center;
    border-radius: 6px;
    line-height: 1.2;
  }
  .sidebar nav button.selected {
    box-shadow: none;
    background: var(--tint);
  }
  nav svg {
    width: 23px;
    height: 23px;
  }
  .main {
    padding: 10px 18px calc(100px + env(safe-area-inset-bottom));
  }
  .topbar {
    margin-bottom: 4px;
  }
  .topbar > .muted {
    font-size: 11px;
  }
  .stage {
    font-size: 8px;
    padding: 5px 8px;
  }
  .intro {
    gap: 10px;
  }
  .intro h1 {
    font-size: 30px;
  }
  .intro > .secondary {
    padding: 8px 10px;
    font-size: 12px;
    min-height: 44px;
  }
  .panel {
    padding: 19px;
    margin-bottom: 18px;
  }
  .panel h2 {
    font-size: 19px;
  }
  .stats {
    padding: 18px;
    gap: 12px;
  }
  .stats > div + div {
    padding-left: 16px;
  }
  .stats span {
    font-size: 12px;
  }
  .stats strong {
    font-size: 27px;
  }
  .filters {
    display: grid;
    width: 100%;
    gap: 15px;
  }
  .filters label {
    min-width: 0;
  }
  .sheet-summary {
    padding: 19px;
    gap: 12px;
    align-items: end;
  }
  .sheet-summary h2 {
    font-size: 17px;
  }
  .sheet-summary .eyebrow {
    font-size: 9px;
  }
  .sheet-summary button {
    font-size: 13px;
    padding: 10px 13px;
  }
  .sheet-summary .muted {
    font-size: 12px;
  }
  #back {
    min-height: 36px;
    font-size: 13px;
  }
  .sheet-head {
    margin-top: 6px;
  }
  .sheet-head h1 {
    font-size: 28px;
  }
  .sheet-head p:not(.eyebrow) {
    font-size: 14px;
    margin-bottom: 6px;
  }
  .editor-layout {
    gap: 18px;
    margin-top: 14px;
  }
  .calendar {
    padding: 12px 8px;
  }
  .calendar-weekdays span {
    font-size: 10px;
  }
  .calendar-day {
    min-height: 52px;
    padding: 8px 1px;
    gap: 6px;
  }
  .calendar-day small {
    font-size: 10px;
  }
  .calendar-caption {
    display: none;
  }
  .calendar-panel {
    min-width: 0;
  }
  .fortnight-total {
    font-size: 12px;
    padding: 13px 3px;
  }
  .fortnight-total strong {
    font-size: 18px;
  }
  .day-heading h2 {
    font-size: 25px;
  }
  .activity-card {
    padding: 17px;
  }
  .card-heading h3 {
    font-size: 20px;
  }
  .card-heading p {
    font-size: 12px;
  }
  .hour-control {
    gap: 8px;
  }
  .hour-control .step {
    width: 48px;
    min-width: 48px;
    height: 62px;
  }
  .hour-control input {
    font-size: 40px;
    height: 70px;
  }
  .hour-control > span {
    font-size: 11px;
  }
  .entry-note input {
    font-size: 16px;
  }
  .day-total strong {
    font-size: 30px;
  }
  .workflow .actions {
    display: grid;
  }
  .workflow .actions button {
    width: 100%;
  }
  .login {
    margin: 6vh 16px;
    padding: 30px;
  }
  .login h1 {
    font-size: 36px;
  }
  #notice {
    bottom: calc(88px + env(safe-area-inset-bottom));
    width: max-content;
    max-width: calc(100vw - 32px);
  }
  dialog {
    padding: 22px;
  }
  .info,
  .warning {
    font-size: 13px;
    padding: 15px;
  }
  .account .actions {
    display: grid;
  }
  .sheet-comment {
    margin-top: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

.staff-tools {
  margin-bottom: 22px;
}
.staff-search {
  margin: 20px 0;
}
.staff-list {
  display: grid;
  gap: 14px;
}
.staff-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 0;
}
.staff-card[hidden] {
  display: none;
}
.staff-card > div {
  min-width: 0;
}
.staff-card h2 {
  margin-bottom: 6px;
}
.staff-card .muted {
  margin: 12px 0 0;
}
.staff-email {
  overflow-wrap: anywhere;
  margin-bottom: 12px;
  font-size: 14px;
}
.staff-card .actions {
  justify-content: flex-end;
}
.staff-list + details {
  margin-top: 24px;
}
.staff-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
#staff-editor {
  scroll-margin-top: 20px;
}
#staff-email[readonly] {
  background: #f5f4f1;
}
#staff-invitation p {
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .sidebar nav.admin-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .admin-nav span {
    font-size: 9px;
  }
  .staff-card {
    display: block;
  }
  .staff-card .actions {
    justify-content: flex-start;
    margin-top: 18px;
  }
  .staff-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .staff-card .summary-meta {
    gap: 12px;
    font-size: 13px;
  }
}

.period-list { display: grid; gap: 16px; margin-bottom: 24px; }
.period-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0; }
.period-card h2 { font-size: 20px; margin-bottom: 12px; }
.period-card .actions { flex-wrap: wrap; }
.period-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.period-fields input { min-width: 0; max-width: 100%; }
#period-editor { scroll-margin-top: 18px; }
@media (max-width: 700px) {
  .period-card { display: block; }
  .period-card .actions { margin-top: 18px; }
  .period-fields { grid-template-columns: minmax(0, 1fr); }
}
