:root {
  color-scheme: light;
  --accent: #e67b22;
  --ink: #172b36;
  --muted: #62727c;
}
body {
  background: #edf1f3;
  color: var(--ink);
}
[hidden] {
  display: none !important;
}
.app {
  max-width: 1180px;
  margin: 36px auto;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}
.page-header h1 {
  font-size: 34px;
  letter-spacing: -1px;
  margin: 5px 0;
}
.page-header p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #467087;
}
.page-header #themeToggle {
  position: static;
  font-size: 12px;
}
.isolation {
  font-size: 12px;
  font-weight: 700;
  border-left: 3px solid var(--accent);
  padding: 9px 12px;
  background: #fff2e7;
  margin-bottom: 16px;
  color: #7b3f12;
}
.isolation span {
  font-weight: 400;
  margin-left: 10px;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.toolbar-link {
  font-size: 13px;
  color: inherit;
  padding: 10px;
  text-decoration: underline;
}
.panel {
  border: 1px solid #d5dfe4;
  box-shadow: 0 2px 8px #23364108;
  padding: 20px;
  border-radius: 10px;
}
.search input {
  border: 1px solid #b1c0ca;
  box-shadow: none;
  font-size: 16px;
}
.filter label {
  font-size: 11px;
  letter-spacing: 0.2px;
  color: #4a5e6a;
}
.filter-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.completed-filter {
  margin: 0;
  font-weight: 400;
}
.status {
  font-size: 12px;
  margin-top: 14px;
}
button {
  background: #173d52;
  border: 1px solid #173d52;
  box-shadow: none;
  text-shadow: none;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
}
button:active {
  transform: none;
  border-bottom-width: 1px;
  box-shadow: none;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.secondary {
  background: #f6f8fa;
  color: #243f50;
  border: 1px solid #c5d2da;
  text-shadow: none;
}
.text-button {
  background: transparent;
  border: 0;
  color: #456a80;
  padding: 5px;
}
.result {
  grid-template-columns: 1.2fr 0.8fr 1.2fr 240px;
  padding: 16px 0;
  gap: 18px;
}
.result .name {
  font-size: 15px;
  margin-bottom: 4px;
}
.result .boat {
  line-height: 1.6;
}
.result .completed-status {
  margin-top: 6px;
}
.result .date {
  white-space: normal;
}
.actions {
  gap: 6px;
}
.actions .checklist {
  background: #e67b22;
  border: 1px solid #d56814;
  font-size: 13px;
}
.actions .edit-button {
  grid-column: 1/-1;
}
.result.completed {
  padding: 16px 10px;
}
.empty {
  padding: 24px;
  color: #62727c;
  text-align: center;
}
dialog {
  width: min(850px, 94vw);
  max-height: 92vh;
  border: 1px solid #bacbd5;
  border-radius: 12px;
  padding: 24px;
  color: #172b36;
}
dialog::backdrop {
  background: #10212fb0;
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.dialog-header h2 {
  font-size: 20px;
  margin: 0;
}
.dialog-header div {
  display: flex;
  gap: 8px;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}
.field input,
.field textarea,
.login input,
#reportDays {
  border: 1px solid #adbec9;
  border-radius: 5px;
  padding: 10px;
  font: 14px Arial;
  background: #fff;
  color: #172b36;
}
.field textarea {
  resize: vertical;
  min-height: 80px;
}
.field.wide {
  grid-column: 1/-1;
}
#saveError,
#loginError {
  color: #a92c20;
}
.login {
  max-width: 420px;
  margin: 15vh auto;
  padding: 28px;
}
.login input {
  display: block;
  width: 100%;
  margin: 10px 0 16px;
}
.login label {
  font-size: 13px;
}
#preview {
  width: min(950px, 96vw);
  background: #e9edef;
}
#previewContent {
  padding: 18px;
  background: #fff;
  overflow: auto;
}
.print-brand {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
}
#report {
  width: min(1000px, 94vw);
}
#reportContent {
  overflow: auto;
  margin: 16px 0;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.report-table td,
.report-table th {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #d6dfe4;
}
.report-table th {
  background: #eef3f6;
}
.report-type-road {
  --type-color: #946200;
  --type-background: #ffe066;
}
.report-type-water-pickup {
  --type-color: #1358bb;
  --type-background: #b9d8ff;
}
.report-type-land {
  --type-color: #176a32;
  --type-background: #b7e8bd;
}
.report-type-water-dropoff {
  --type-color: #a82020;
  --type-background: #ffc2c2;
}
.report-type-slip {
  --type-color: #6a2caf;
  --type-background: #d9c0ff;
}
.report-type-other {
  --type-color: #64717c;
  --type-background: #f0f2f4;
}
.report-table tbody tr {
  background: var(--type-background);
}
.report-table tbody td:first-child {
  border-left: 4px solid var(--type-color);
}
.report-legend {
  margin: 0 0 20px;
  font-size: 12px;
}
.report-legend > strong {
  display: block;
  margin-bottom: 8px;
}
.report-legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.report-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 5px;
  background: var(--type-background);
}
.report-type-swatch {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-radius: 2px;
  background: var(--type-color);
}
body.dark-theme .isolation {
  background: #3a2b1e;
  color: #f4c79c;
}
body.dark-theme .eyebrow {
  color: #9dbbce;
}
body.dark-theme .toolbar-link {
  color: #d8e2e9;
}
body.dark-theme .text-button {
  color: #aecbde;
}
body.dark-theme .page-header p {
  color: #b7c5ce;
}
body.dark-theme .secondary {
  background: #35414c;
  color: #eef3f7;
  border-color: #65727d;
  text-shadow: none;
}
@media (max-width: 800px) {
  .result {
    grid-template-columns: 1fr 1fr;
  }
  .actions {
    grid-column: 1/-1;
  }
  .app {
    margin-top: 22px;
  }
  .page-header h1 {
    font-size: 28px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field.wide {
    grid-column: auto;
  }
  .isolation span {
    display: block;
    margin: 4px 0 0;
  }
  .toolbar button {
    font-size: 12px;
  }
  .dialog-header {
    align-items: flex-start;
  }
  .dialog-header div {
    flex-direction: column;
  }
}
@media print {
  dialog,
  .login {
    display: none !important;
  }
  .print-brand {
    font-size: 11px;
    font-weight: 900;
  }
  body {
    background: #fff;
  }
  #printArea {
    display: block !important;
  }
}
