* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #0f1115; color: #e8ecf1; font-family: system-ui, sans-serif; }
#app { max-width: none; margin: 0 auto; padding: 16px; }
h1 { font-size: 1.3rem; margin: 0 8px 0 0; }
.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.bar .fx-input { width: auto; min-width: 140px; }
.spacer { flex: 1; }
.stats { color: #8b94a3; font-size: .85rem; margin-left: auto; }
.hint { color: #8b94a3; font-size: .78rem; font-weight: normal; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.printonly { display: none; }
.fx-input { background: #181b22; color: #e8ecf1; border: 1px solid #2a2f3a; border-radius: 8px; padding: 8px 10px; font: inherit; width: 100%; }
.fx-input:focus { outline: 2px solid #4f8cff; outline-offset: 0; }
.fx-btn:disabled { opacity: .4; cursor: default; }
.fx-btn.small { font-size: .75rem; padding: 4px 8px; margin-top: 6px; }
.cols { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 16px; min-height: 60vh; }
.cols.archiving { display: block; }
.col { flex: 0 0 290px; background: #151820; border: 1px solid #232833; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; max-height: calc(100vh - 150px); }
.col.over { border-color: #4f8cff; background: #171c28; }
.col.wip-full { border-color: #ffb300; }
.col.wip-over { border-color: #ef5350; background: #1e1517; box-shadow: 0 0 0 1px #ef5350 inset; }
.wipmsg { background: #3a1b1d; color: #ff9e9a; border-radius: 6px; padding: 4px 8px; font-size: .78rem; margin-bottom: 8px; }
.chead { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.chead h3 { margin: 0; font-size: .95rem; }
.chbtns { display: inline-flex; }
.count { background: #232833; border-radius: 10px; padding: 1px 8px; font-size: .75rem; color: #9aa4b5; }
.count.warn { background: #4a3a10; color: #ffcc55; }
.count.bad { background: #5a1f22; color: #ff9e9a; font-weight: 700; }
.icon { background: none; border: none; color: #7d8696; cursor: pointer; padding: 2px 4px; border-radius: 4px; font-size: .8rem; }
.icon:hover { color: #fff; background: #232833; }
.list { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 40px; padding: 2px; }
.empty { color: #6b7385; font-size: .85rem; text-align: center; padding: 14px 6px; border: 1px dashed #2a2f3a; border-radius: 8px; }
.card { background: #1d212b; border: 1px solid #2a2f3a; border-left: 4px solid #888; border-radius: 8px; padding: 10px; cursor: grab; }
.card:hover { border-color: #4f8cff; }
.card:focus-visible { border-color: #4f8cff; outline: 2px solid #4f8cff; outline-offset: 2px; }
.card.dragging { opacity: .35; }
.card.prio-high { border-left-color: #ef5350; }
.card.prio-medium { border-left-color: #ffb300; }
.card.prio-low { border-left-color: #43a047; }
.ctitle { font-weight: 600; word-break: break-word; }
.cdesc { color: #9aa4b5; font-size: .82rem; margin-top: 4px; white-space: pre-wrap; max-height: 3.6em; overflow: hidden; }
.meta { display: flex; gap: 6px; align-items: center; margin-top: 8px; flex-wrap: wrap; font-size: .75rem; }
.prio { text-transform: capitalize; }
.due { color: #9aa4b5; }
.due.today { color: #ffb300; }
.due.overdue { color: #ef5350; font-weight: 600; }
.placeholder { height: 8px; background: #4f8cff; border-radius: 4px; opacity: .7; flex: none; }
.quick { margin-top: 8px; }
.err { color: #ff7b72; font-size: .8rem; min-height: 0; }
.addcol { flex: 0 0 200px; background: transparent; color: #8b94a3; border: 2px dashed #2a2f3a; border-radius: 12px; padding: 14px; cursor: pointer; font: inherit; }
.addcol:hover { color: #fff; border-color: #4f8cff; }

/* labels */
.lbls, .lblpick { display: flex; flex-wrap: wrap; gap: 4px; }
.lbls { margin-bottom: 6px; }
.lbl { display: inline-block; color: #0f1115; font-size: .7rem; font-weight: 600; border-radius: 10px; padding: 1px 8px; border: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.lbl.pick { cursor: pointer; opacity: .55; font-size: .78rem; padding: 3px 10px; }
.lbl.pick.on { opacity: 1; box-shadow: 0 0 0 2px #fff; }
.lbl.pick:focus-visible { outline: 2px solid #4f8cff; outline-offset: 2px; }
.lmlist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.lmrow { display: flex; gap: 6px; align-items: center; }
.lmrow input[type=color] { width: 38px; height: 34px; padding: 0; border: none; background: none; flex: none; }
.lmrow .small { margin-top: 0; }

/* checklist */
.prog { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.progbar { flex: 1; height: 6px; background: #2a2f3a; border-radius: 3px; overflow: hidden; }
.progfill { height: 100%; background: #4f8cff; }
.progfill.full { background: #43a047; }
.progtxt { font-size: .75rem; color: #9aa4b5; white-space: nowrap; }
.cklist { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.ckrow { display: flex; gap: 6px; align-items: center; }
.ckrow input[type=checkbox] { width: 18px; height: 18px; flex: none; }
.log { list-style: none; margin: 0; padding: 0; max-height: 140px; overflow: auto; font-size: .82rem; display: flex; flex-direction: column; gap: 3px; }

/* stats */
.sp { background: #151820; border: 1px solid #232833; border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.sp[hidden] { display: none; }
.tiles { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tile { flex: 1; min-width: 120px; background: #1d212b; border-radius: 8px; padding: 10px; }
.tv { font-size: 1.6rem; font-weight: 700; }
.tl { font-size: .78rem; color: #9aa4b5; }
.tile.bad .tv { color: #ef5350; }
.tile.good .tv { color: #43a047; }
.chart h4 { margin: 0 0 8px; font-size: .85rem; color: #9aa4b5; }
.brow { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: .82rem; }
.bl { flex: 0 0 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt { flex: 1; background: #2a2f3a; border-radius: 4px; height: 14px; overflow: hidden; }
.bf { height: 100%; background: #4f8cff; min-width: 2px; }
.bf.over { background: #ef5350; }
.bn { flex: 0 0 44px; text-align: right; color: #9aa4b5; }

/* archive */
.archive { max-width: 640px; display: flex; flex-direction: column; gap: 8px; }
.archive h2 { margin: 0; font-size: 1.1rem; }
.archive .card { cursor: default; }
.archive .actions { margin-top: 4px; }

.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 1000; }
.modal { width: 100%; max-width: 520px; background: #151820; border: 1px solid #2a2f3a; border-radius: 12px; padding: 20px; max-height: 95vh; overflow: auto; }
.modal h2 { margin: 0 0 12px; font-size: 1.1rem; }
.field { margin-bottom: 10px; flex: 1; min-width: 110px; }
.field label { display: block; font-size: .8rem; color: #9aa4b5; margin-bottom: 4px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; margin-top: 8px; }
@media (max-width: 600px) {
  .col { flex-basis: 85vw; }
  .bar .fx-input { flex: 1; }
}

/* print-friendly view */
@media print {
  html, body { background: #fff; color: #000; }
  #app { padding: 0; }
  .noprint, .placeholder { display: none !important; }
  .printonly { display: block; }
  h1.printonly { margin-bottom: 10px; font-size: 1.4rem; }
  .sp { background: #fff; border-color: #999; color: #000; display: block; }
  .sp[hidden] { display: none; }
  .tile { background: #f2f2f2; }
  .tl, .bn, .hint, .progtxt, .cdesc, .due { color: #333; }
  .cols { display: flex; flex-wrap: wrap; overflow: visible; min-height: 0; gap: 10px; }
  .col { flex: 1 1 30%; max-height: none; background: #fff; border: 1px solid #666; break-inside: avoid; color: #000; }
  .col.wip-over { background: #fff; border: 2px solid #c00; box-shadow: none; }
  .wipmsg { background: #fff; color: #c00; border: 1px solid #c00; }
  .list { overflow: visible; }
  .card { background: #fff; color: #000; border: 1px solid #888; border-left-width: 5px; break-inside: avoid; }
  .count { background: #eee; color: #000; }
  .fx-badge { border: 1px solid #999; background: #fff; color: #000; }
  .progbar { border: 1px solid #888; background: #fff; }
  .progfill { background: #555; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pcheck { list-style: none; margin: 6px 0 0; padding: 0; font-size: .8rem; }
  .cdesc { max-height: none; }
}
