* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; margin: 0; background: #f5f5f7; color: #1a1a1a; }

#login-view { display: flex; align-items: center; justify-content: center; height: 100vh; }
#login-view[hidden] { display: none; }
#login-form { background: #fff; padding: 2rem; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.08); width: 280px; }
#login-form input { width: 100%; padding: .6rem; margin: .5rem 0; border: 1px solid #ccc; border-radius: 8px; }
#login-form button { width: 100%; padding: .6rem; border: none; border-radius: 8px; background: #2563eb; color: #fff; cursor: pointer; }
#login-error { color: #b91c1c; margin-top: .5rem; }

header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; background: #fff; border-bottom: 1px solid #e5e5e5; }
header h1 { font-size: 1.2rem; margin: 0; }
#logout-btn { border: 1px solid #ccc; background: #fff; border-radius: 8px; padding: .4rem .8rem; cursor: pointer; }

main { display: flex; gap: 1rem; padding: 1rem; max-width: 900px; margin: 0 auto; }
#list-pane { flex: 1; min-width: 260px; }
#detail-pane { flex: 2; background: #fff; border-radius: 12px; padding: 1rem; box-shadow: 0 1px 6px rgba(0,0,0,.06); }

#new-checklist-form, #new-item-form { display: flex; gap: .5rem; margin-bottom: .75rem; }
#new-checklist-form input, #new-item-form input { flex: 1; padding: .5rem; border: 1px solid #ccc; border-radius: 8px; }
#new-checklist-form button, #new-item-form button { padding: .5rem .8rem; border: none; border-radius: 8px; background: #2563eb; color: #fff; cursor: pointer; }

#checklist-list { list-style: none; padding: 0; margin: 0; }
#checklist-list li { background: #fff; border-radius: 10px; padding: .6rem .8rem; margin-bottom: .5rem; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.05); display: flex; justify-content: space-between; align-items: center; }
#checklist-list li.selected { outline: 2px solid #2563eb; }
#checklist-list li .badge { font-size: .7rem; background: #16a34a; color: #fff; border-radius: 999px; padding: .1rem .5rem; margin-left: .3rem; }
#checklist-list li .badge-gtd { background: #7c3aed; }

#detail-header { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
#detail-header h2 { margin: 0; flex: 1; }
#detail-header button { border: 1px solid #ccc; background: #fff; border-radius: 8px; padding: .4rem .7rem; cursor: pointer; }
#active-badge { font-size: .75rem; background: #16a34a; color: #fff; border-radius: 999px; padding: .2rem .6rem; }
#source-badge { font-size: .75rem; background: #7c3aed; color: #fff; border-radius: 999px; padding: .2rem .6rem; }
#checklist-delete-btn { color: #b91c1c; border-color: #fca5a5; }

#item-list { list-style: none; padding: 0; margin: 0 0 1rem; }
#item-list li { display: flex; align-items: center; gap: .6rem; padding: .5rem .3rem; border-bottom: 1px solid #eee; }
#item-list li .item-text { flex: 1; }
#item-list li.status-done_agent .item-text,
#item-list li.status-done_user .item-text { text-decoration: line-through; color: #999; }
#item-list li.status-skipped .item-text { color: #bbb; font-style: italic; }
#item-list li.status-skipped { opacity: .7; }
#item-list li .agent-mark { font-size: .9rem; }
#item-list button { border: none; background: none; color: #b91c1c; cursor: pointer; }
#item-list button[data-testid="item-skip-btn"] { color: #6b7280; }

#status-msg { position: fixed; bottom: 1rem; right: 1rem; background: #1a1a1a; color: #fff; padding: .5rem 1rem; border-radius: 8px; }

@media (max-width: 700px) {
  main { flex-direction: column; }
}
