*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #1e1e1e;
  --surface:  #2a2a2a;
  --surface2: #333333;
  --border:   #3a3a3a;
  --text:     #f0f0f0;
  --muted:    #888888;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 1.5rem 1rem 4rem;
}

.app {
  max-width: 600px;
  margin: 0 auto;
}

/* ── Energy bar ─────────────────────────────── */
.energy-label {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stats-label {
  font-size: 14px;
  color: #f0a830;
  letter-spacing: 0.01em;
}

.energy-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 1.25rem;
}

.energy-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 14px 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: center;
}

.energy-btn:hover       { background: var(--surface2); }
.energy-btn.active-low  { background: #1a2e24; border-color: #3a7a55; color: #7dcfa0; }
.energy-btn.active-med  { background: #2e2010; border-color: #8a5a10; color: #f0a830; }
.energy-btn.active-high { background: #162038; border-color: #2a5a9a; color: #74b3f7; }

/* ── Capture area ───────────────────────────── */
.capture {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.capture textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  resize: none;
  overflow: hidden;
  line-height: 1.4;
  height: 22px;
  padding-top: 1px;
}

.capture textarea::placeholder {
  color: #f0f0f0;
  font-style: italic;
}

.plus-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--text);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.plus-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--bg);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* ── Section label ──────────────────────────── */
.section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text);
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ── Item list ──────────────────────────────── */
.item-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.75rem;
}

/* ── Item ───────────────────────────────────── */
.item {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  cursor: default;
  position: relative;
  overflow: hidden;
  margin-bottom: 6px;
  transition: background 0.15s,
              transform 0.6s cubic-bezier(.4,0,.2,1),
              opacity 0.6s ease,
              max-height 0.6s cubic-bezier(.4,0,.2,1),
              margin-bottom 0.6s cubic-bezier(.4,0,.2,1),
              padding-top 0.6s cubic-bezier(.4,0,.2,1),
              padding-bottom 0.6s cubic-bezier(.4,0,.2,1);
}

.item:hover { background: var(--surface2); }

.item.sweep-out {
  transform: translateX(120%);
  opacity: 0;
  max-height: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* ── Item row ───────────────────────────────── */
.item-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ── Checkbox circle ────────────────────────── */
.check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--text);
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}
.check:hover { border-color: #888; }
.check.checked { background: #1D9E75; border-color: #1D9E75; }
.check.checked::after {
  content: '';
  width: 6px;
  height: 10px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  display: block;
}

.item-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
  word-break: break-word;
}
.item-text:hover { color: #bbb; }
.item-text.done-text {
  text-decoration: line-through;
  color: var(--muted);
  cursor: default;
}

/* ── Prio-rad ───────────────────────────────── */
.prio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 0;
  border-top: 1px solid transparent;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s cubic-bezier(.4,0,.2,1),
              opacity 0.35s ease,
              padding-top 0.35s ease,
              border-color 0.35s ease;
}
.prio-row.open {
  max-height: 44px;
  opacity: 1;
  padding-top: 10px;
  border-top-color: var(--border);
  margin-top: 10px;
}

.prio-label {
  font-size: 10px;
  color: var(--text);
  flex-shrink: 0;
}

.bars {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  height: 20px;
  flex: 1;
}

.bar {
  width: 14px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.bar:hover { transform: scaleY(1.08); transform-origin: bottom; }

.delete-btn {
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}
.delete-btn svg { opacity: 0.6; transition: opacity 0.15s; }
.delete-btn:hover svg { opacity: 1; }

.edit-btn {
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}
.edit-btn svg { opacity: 0.6; transition: opacity 0.15s; }
.edit-btn:hover svg { opacity: 1; }

.item-edit {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  outline: none;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  padding: 2px 0;
  resize: none;
  overflow: hidden;
}

/* ── Feedback-rad ───────────────────────────── */
.feedback-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.feedback-q {
  font-size: 10px;
  color: var(--text);
  flex-shrink: 0;
}

.feedback-btn {
  background: var(--surface2);
  border: none;
  border-radius: 8px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.feedback-btn:hover { background: #3d3d3d; }
.feedback-btn:disabled { opacity: 0.4; cursor: default; }

/* ── Win banner ─────────────────────────────── */
.win-banner {
  display: none;
  background: #1a3322;
  border: 1px solid #3a7a55;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: #7dcfa0;
  margin-bottom: 1rem;
}
.win-banner.show { display: block; }

/* ── Divider ────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.25rem 0 1.75rem;
}

.empty { font-size: 11px; color: var(--text); padding: 12px 0; }
