:root {
  color-scheme: dark;
  --bg: #0d0e14;
  --panel: #15161f;
  --line: #333540;
  --muted: #b2b4c4;
  --text: #eef0f7;
  --accent: #a5a5f8;
  --danger: #ffb9ae;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.55 system-ui,
    -apple-system,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  color: var(--text);
  border: 1px solid #484b5c;
  border-radius: 6px;
  background: #232531;
  padding: 9px 13px;
  cursor: pointer;
  min-height: 42px;
  text-decoration: none;
  display: inline-block;
}
button:hover,
.button:hover {
  background: #343748;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button.primary,
.primary,
.active {
  background: #363967;
  border-color: #8585c5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #b3b1ff;
  outline-offset: 3px;
}
h1 {
  font-size: 27px;
  line-height: 1.2;
  margin: 0 0 8px;
}
h2 {
  font-size: 19px;
  margin: 0 0 12px;
}
h3 {
  font-size: 16px;
  margin: 10px 0;
}
p {
  margin: 7px 0 14px;
}
small,
.muted {
  color: var(--muted);
}
small {
  display: block;
  font-size: 12px;
}
aside {
  width: 205px;
  position: fixed;
  inset: 0 auto 0 0;
  border-right: 1px solid var(--line);
  padding: 28px 18px;
  background: #101119;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 650;
  margin-bottom: 32px;
}
.brand b {
  border: 1px solid #8b86c9;
  border-radius: 9px;
  padding: 8px;
  color: #e0dfff;
}
.brand small {
  font-weight: 400;
}
nav {
  display: grid;
  gap: 8px;
}
nav button {
  text-align: left;
  background: transparent;
  border-color: transparent;
}
.side-note {
  margin-top: auto;
  padding-top: 25px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
main {
  margin-left: 205px;
  padding: 0 28px 40px;
  max-width: 1900px;
}
header {
  min-height: 70px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 12px;
}
header button {
  padding: 5px 10px;
  margin-left: 5px;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}
.heading p {
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.banner {
  border: 1px solid #53505b;
  background: #232332;
  border-radius: 7px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.bad {
  background: #382b26 !important;
  color: #ffe0b3 !important;
  border-color: #857052 !important;
}
.danger {
  color: var(--danger);
}
.warning {
  color: #efd4a4;
}
.good {
  background: #20382f !important;
  color: #b8e9d4 !important;
}
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 20px 0;
  flex-wrap: wrap;
}
.toolbar label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toolbar input {
  width: 160px;
}
.spacer {
  flex: 1;
}
.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0;
  font-size: 12px;
  color: var(--muted);
}
.legend span {
  padding: 4px 9px;
  border-radius: 4px;
}
.cutting {
  background: #213349 !important;
  border-color: #657e9a !important;
}
.assembly {
  background: #3a3020 !important;
  border-color: #8c7957 !important;
}
.installation {
  background: #1b3834 !important;
  border-color: #54857c !important;
}
.timeline,
.table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th,
td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 10px;
  vertical-align: top;
}
thead th {
  background: #20222e;
  font-weight: 600;
}
th:last-child,
td:last-child {
  border-right: 0;
}
.timeline table {
  table-layout: fixed;
  min-width: 1080px;
}
.timeline th:first-child {
  width: 185px;
}
.timeline td {
  height: 125px;
  background: #11141c;
}
.timeline td.over {
  background: #302025;
}
.load {
  margin-bottom: 8px;
}
.block {
  display: block;
  text-align: left;
  width: 100%;
  padding: 8px;
  margin-bottom: 7px;
  min-height: 64px;
  overflow-wrap: anywhere;
}
.block strong {
  font-size: 12px;
}
.block span {
  display: block;
  font-size: 11px;
  margin-top: 3px;
}
.text-button {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  font-size: inherit;
  font-weight: 600;
  min-height: 32px;
  color: #e4e2ff;
}
.text-button:hover {
  background: transparent;
  color: #bebbff;
}
.pill {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid #50536a;
  border-radius: 5px;
  font-size: 11px;
  background: #272938;
  white-space: nowrap;
}
section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  margin-top: 22px;
  padding: 20px;
}
article {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #151720;
  padding: 18px;
  min-width: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(310px, 100%), 1fr));
  gap: 14px;
}
.work-card p {
  font-size: 12px;
}
.work-card .actions {
  margin-top: 13px;
}
.work-card button {
  font-size: 12px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 7px;
  margin: 18px 0;
}
.metrics > div {
  padding: 14px;
  border-right: 1px solid var(--line);
}
.metrics > div:last-child {
  border: 0;
}
.metrics strong,
.metrics span {
  display: block;
}
.metrics strong {
  font-size: 17px;
  margin: 5px 0;
}
.metrics span {
  font-size: 12px;
  color: var(--muted);
}
.between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.search {
  max-width: 450px;
  margin-bottom: 20px;
}
.list-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.list-row strong {
  font-size: 13px;
}
details {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  margin-top: 14px;
}
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 5px 0;
  min-height: 40px;
}
details .cards {
  margin-top: 12px;
}
label {
  display: grid;
  gap: 6px;
  color: #d3d4e0;
  font-size: 13px;
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #55586b;
  border-radius: 5px;
  background: #10121c;
  color: var(--text);
  padding: 10px;
}
textarea {
  resize: vertical;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-width: 0;
  padding: 12px;
}
legend {
  font-size: 12px;
  padding: 0 6px;
}
.check {
  display: flex;
  align-items: center;
  margin: 6px 0;
  gap: 9px;
}
.check input {
  width: 18px;
  height: 18px;
  padding: 0;
}
.week-inputs {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.week-inputs input {
  padding: 8px 4px;
}
.leave-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
dialog {
  color: var(--text);
  background: #181a25;
  border: 1px solid #62667d;
  border-radius: 10px;
  width: min(730px, calc(100% - 28px));
  max-height: 90vh;
  padding: 24px;
}
dialog::backdrop {
  background: #000b;
}
.form-grid {
  display: grid;
  gap: 16px;
  margin: 15px 0;
}
.footer {
  justify-content: flex-end;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
#form-error {
  color: var(--danger);
}
.preview {
  background: #22283a;
}
.preview small {
  display: block;
}
.login {
  max-width: 450px;
  margin: 9vh auto;
  padding: 28px;
}
.login label {
  margin: 18px 0;
}
.login button {
  width: 100%;
  margin: 10px 0 20px;
}
.login small {
  margin-top: 20px;
}
#notice {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: calc(100vw - 40px);
  background: #263b33;
  color: #e2f8ed;
  border: 1px solid #6c9c86;
  padding: 14px 22px;
  border-radius: 7px;
  display: none;
  z-index: 10;
}
#notice.show {
  display: block;
}
pre,
code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #deddfa;
}
pre {
  font-size: 11px;
  max-height: 230px;
  overflow: auto;
}
code {
  display: block;
  padding: 12px;
  background: #0e1018;
}
.day table {
  min-width: 0;
}
.day th:first-child {
  width: 220px;
}
@media (max-width: 1000px) {
  aside {
    width: 170px;
    padding: 20px 12px;
  }
  main {
    margin-left: 170px;
    padding: 0 18px 30px;
  }
  .metrics {
    grid-template-columns: 1fr;
  }
  .metrics > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .heading {
    flex-wrap: wrap;
  }
}
@media (max-width: 700px) {
  body {
    font-size: 13px;
  }
  aside {
    position: static;
    width: auto;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    margin-bottom: 12px;
  }
  .brand b {
    padding: 5px 8px;
  }
  nav {
    display: flex;
    overflow-x: auto;
    gap: 3px;
  }
  nav button {
    font-size: 11px;
    white-space: nowrap;
    padding: 8px;
  }
  .side-note {
    display: none;
  }
  main {
    margin: 0;
    padding: 0 14px 25px;
  }
  header {
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 12px 0;
    gap: 8px;
  }
  .heading {
    gap: 8px;
    margin-bottom: 15px;
  }
  h1 {
    font-size: 23px;
  }
  .heading .actions button {
    font-size: 12px;
  }
  .toolbar {
    gap: 5px;
  }
  .toolbar button {
    font-size: 12px;
    padding: 7px 10px;
  }
  .toolbar .spacer {
    display: none;
  }
  .timeline:not(.day) {
    overflow: auto;
  }
  .timeline.day table,
  .timeline.day tbody,
  .timeline.day tr,
  .timeline.day th,
  .timeline.day td {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .timeline.day thead {
    display: none;
  }
  .timeline.day th:first-child {
    width: 100%;
    background: #21232e;
  }
  .timeline.day td {
    height: auto;
    min-height: 90px;
  }
  .timeline.day tr {
    margin-bottom: 12px;
  }
  .block {
    min-height: 70px;
  }
  .block strong {
    font-size: 13px;
  }
  .block span {
    font-size: 12px;
  }
  section,
  article {
    padding: 15px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .week-inputs {
    grid-template-columns: repeat(4, 1fr);
  }
  dialog {
    padding: 17px;
  }
  .login {
    margin: 3vh auto;
    padding: 25px;
  }
  .between {
    align-items: flex-start;
  }
  .list-row {
    gap: 10px;
  }
  .list-row button {
    flex-shrink: 0;
    padding: 7px;
  }
  .metrics strong {
    font-size: 16px;
  }
}
