/* AGPL-3.0: adapted card, chip, avatar, completion and history layouts from the pinned frontend. */
:root {
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #162d36;
  background: #fff;
  font-size: 15px;
  line-height: 1.5;
  --accent: #087d92;
  --border: #d4e3e7;
  --muted: #526b75;
  --success: #4ec1a2;
  --danger: #bc2937;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
main {
  max-width: 1160px;
  margin: auto;
  padding: 24px;
  min-width: 0;
}
header {
  max-width: 760px;
  margin: 8px 0 24px;
}
h1 {
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 650;
}
h2 {
  font-size: 1.45rem;
  line-height: 1.25;
}
h3 {
  font-size: 1.13rem;
  margin: 0 0 12px;
}
p {
  overflow-wrap: anywhere;
}
a {
  color: var(--accent);
}
.eyebrow {
  font-size: 0.73rem;
  letter-spacing: 0.14em;
  font-weight: 750;
  color: var(--accent);
}
nav,
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
nav {
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
  margin-bottom: 16px;
}
button,
.file-button {
  font: inherit;
  border: 1px solid #a9c4cc;
  background: #fff;
  color: #163d49;
  border-radius: 9px;
  min-height: 42px;
  padding: 8px 13px;
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
}
button:hover {
  background: #ecfafd;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.primary,
nav button[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.primary:hover {
  background: #066b7d;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid #19a7be;
  outline-offset: 3px;
}
.toolbar {
  margin-bottom: 18px;
  font-size: 0.86rem;
}
.file-button {
  position: relative;
  overflow: hidden;
}
.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.notice {
  padding: 12px 16px;
  background: #effbfa;
  border-radius: 9px;
  overflow-wrap: anywhere;
}
.notice.error {
  background: #fff0f0;
  color: #8e2430;
}
.panel {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  margin: 18px 0;
  background: white;
  min-width: 0;
}
.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(215px, 100%), 1fr));
  gap: 14px;
  margin: 16px 0;
}
label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.87rem;
  color: #294c5a;
  min-width: 0;
}
input,
select,
textarea {
  font: inherit;
  color: #183d4a;
  max-width: 100%;
  width: 100%;
  min-width: 0;
  border: 1px solid #acc6ce;
  border-radius: 8px;
  background: white;
  padding: 10px;
  min-height: 42px;
}
textarea {
  min-height: 80px;
  resize: vertical;
}
input[type="checkbox"] {
  width: 19px;
  min-height: 19px;
  height: 19px;
  flex: none;
  accent-color: var(--accent);
}
.check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  min-height: 38px;
}
.check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
fieldset {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 16px 0;
  padding: 12px;
  min-width: 0;
}
legend {
  font-weight: 600;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
  gap: 26px 16px;
  margin: 28px 0;
}
.chore {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 29px 18px 18px;
  background: #fff;
  min-width: 0;
  box-shadow: 0 2px 9px #173e4b08;
}
.badges {
  position: absolute;
  top: -13px;
  left: 16px;
  right: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  display: inline-block;
  background: #f1f6f8;
  border: 1px solid #dce6ea;
  border-radius: 20px;
  padding: 3px 9px;
  color: #405f6b;
  font-size: 0.77rem;
}
.chip.danger {
  background: #ffedf0;
  border-color: #ffd3da;
  color: #a42b3c;
}
.chip.warning {
  background: #fff6df;
  border-color: #f2daa4;
  color: #825c14;
}
.person {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}
.avatar {
  border-radius: 50%;
  width: 29px;
  height: 29px;
  display: inline-grid;
  place-items: center;
  background: #e1f5f6;
  color: #086e80;
  font-size: 0.76rem;
  font-weight: 700;
  flex: none;
}
.complete {
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.6rem;
  background: var(--success);
  border-color: var(--success);
  color: #123c33;
  padding: 0;
  flex: none;
}
.complete:hover {
  background: #6bd0b5;
}
.card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 14px;
}
.meta,
small,
.muted {
  color: var(--muted);
  font-size: 0.86rem;
}
.meta {
  margin: 8px 0;
}
.empty {
  background: #f5fafb;
  padding: 24px;
  border-radius: 16px;
  color: #44616b;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: 12px;
  margin: 20px 0;
}
.stat {
  background: #f3fafb;
  border-radius: 16px;
  padding: 16px;
}
.stat strong {
  display: block;
  font-size: 1.7rem;
}
.history {
  border-left: 3px solid var(--success);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0 14px 14px 0;
  padding: 16px;
  margin: 12px 0;
}
.history.skipped {
  border-left-color: #c78932;
}
.note-text {
  white-space: pre-wrap;
  border-left: 2px solid #bfdee5;
  padding-left: 10px;
}
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 16px 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
}
th,
td {
  padding: 11px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  min-width: 95px;
  overflow-wrap: anywhere;
}
th {
  background: #f2f8fa;
  font-weight: 650;
}
.bar {
  height: 7px;
  background: #d8edf2;
  border-radius: 5px;
  overflow: hidden;
}
.bar meter {
  width: 100%;
  height: 12px;
  display: block;
  margin-top: -3px;
}
.preview {
  background: #f5fbfc;
}
.export-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    12px ui-monospace,
    monospace;
  max-height: 400px;
  overflow: auto;
}
footer {
  margin-top: 28px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  font-size: 0.83rem;
  color: var(--muted);
}
@media (max-width: 500px) {
  main {
    padding: 16px;
  }
  .panel {
    padding: 15px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .actions > * {
    max-width: 100%;
  }
  h1 {
    font-size: 1.8rem;
  }
  .toolbar {
    gap: 7px;
  }
  .toolbar button,
  .file-button {
    font-size: 0.8rem;
  }
  .card-actions button {
    padding-left: 10px;
    padding-right: 10px;
  }
}
