* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f6f7f3;
  color: #29423b;
  font:
    15px system-ui,
    sans-serif;
}
header,
main {
  max-width: 1600px;
  margin: auto;
  padding: 24px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
h1 {
  margin: 0;
  font-size: 26px;
}
small {
  color: #60746c;
}
button,
input,
select,
textarea {
  font: inherit;
  border: 1px solid #ccd8d0;
  border-radius: 8px;
  padding: 9px;
  background: white;
  color: inherit;
}
button {
  cursor: pointer;
}
button.primary,
button.active {
  background: #365e50;
  color: white;
  border-color: #365e50;
}
.toolbar,
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat,
.lane,
article,
details {
  background: white;
  border: 1px solid #e0e6df;
  border-radius: 12px;
  padding: 14px;
}
.stat strong {
  display: block;
  font-size: 25px;
}
.board {
  display: grid;
  grid-template-columns: repeat(7, minmax(205px, 1fr));
  gap: 12px;
  overflow: auto;
  align-items: start;
}
.lane {
  background: #edf1eb;
  min-height: 240px;
}
.lane h3 {
  font-size: 14px;
  margin: 0 0 12px;
}
.ticket {
  background: white;
  border-radius: 9px;
  padding: 12px;
  margin-bottom: 10px;
  border-left: 5px solid #a7bdb0;
  cursor: grab;
  box-shadow: 0 1px 3px #0001;
}
.ticket p {
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.tag {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 11px;
}
.ticket button {
  font-size: 12px;
  padding: 5px;
}
.tablewrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  background: white;
}
th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #e1e7e0;
  vertical-align: top;
  min-width: 100px;
}
th {
  background: #dce9df;
}
td {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
dialog {
  border: 1px solid #d5dfd6;
  border-radius: 14px;
  width: min(850px, 95vw);
  max-height: 90vh;
  color: inherit;
  padding: 24px;
}
dialog::backdrop {
  background: #20372d66;
}
.formgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
}
textarea {
  min-height: 75px;
  resize: vertical;
}
.wide {
  grid-column: 1/-1;
}
.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
  flex-wrap: wrap;
}
details {
  margin-bottom: 10px;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
.guide p {
  margin: 8px 0;
}
.empty {
  color: #718078;
  font-size: 13px;
}
#print {
  display: none;
}
@media (max-width: 600px) {
  header,
  main {
    padding: 14px;
  }
  .formgrid {
    grid-template-columns: 1fr;
  }
}
@media print {
  body {
    background: white;
    color: black;
  }
  header,
  main,
  dialog {
    display: none !important;
  }
  #print {
    display: block;
  }
  #print article {
    break-inside: avoid;
    margin: 10px 0;
    border: 1px solid #bbb;
  }
  #print dl {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 4px;
  }
  #print dd {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  @page {
    margin: 15mm;
  }
}

body {
  font-size: 1rem;
}
small {
  font-size: 0.875rem;
}
.tag {
  font-size: 0.8125rem;
}
.ticket button,
.lane h3,
label,
.empty {
  font-size: 0.875rem;
}
button,
input,
select,
textarea {
  min-height: 42px;
}
input,
select,
textarea {
  min-width: 0;
  max-width: 100%;
}
select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%2329423b' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.notice {
  max-width: 1552px;
  margin: 0 auto;
  padding: 0 24px;
  color: #365e50;
  font-size: 0.875rem;
  min-height: 1.5em;
}
.notice.error,
#passwordError {
  color: #9b2929;
}
.account {
  align-self: center;
  font-size: 0.875rem;
  padding: 8px;
}
.ticket button {
  min-height: 36px;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #c49b33;
  outline-offset: 3px;
}
.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.login-card {
  max-width: 440px;
  width: 100%;
  padding: 32px;
  background: white;
  border: 1px solid #d5dfd6;
  border-radius: 16px;
  box-shadow: 0 8px 32px #29423b0d;
}
.login-card h1 {
  margin: 10px 0;
}
.login-card p {
  line-height: 1.55;
}
.login-card form,
.login-card label {
  display: grid;
  gap: 10px;
}
.login-card form {
  gap: 18px;
}
.login-card button {
  padding: 12px;
}
.login-error {
  color: #9b2929;
  min-height: 1.5em;
}
.login-note {
  font-size: 0.875rem;
}
#passwordForm {
  display: grid;
  gap: 14px;
}
#passwordForm .actions {
  margin-top: 0;
}
#print {
  overflow-wrap: anywhere;
}
.stats strong {
  overflow-wrap: anywhere;
}
body:has(#notice.error) #notice {
  font-weight: 600;
}
@media (max-width: 600px) {
  .login-card {
    padding: 24px;
  }
  .notice {
    padding: 0 14px;
  }
  h1 {
    font-size: 1.5rem;
  }
  .toolbar {
    align-items: center;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media print {
  .notice {
    display: none !important;
  }
}
