:root {
  --bg: #faf8f5; --card: #ffffff; --text: #2a2a28; --muted: #6d6a64;
  --line: #e4dfd7; --accent: #2f6f5e; --accent-text: #ffffff; --warn: #fff3d6; --warn-text: #5c4300;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1d1b; --card: #272725; --text: #ecebe6; --muted: #a5a29a;
    --line: #3a3a36; --accent: #5fb59f; --accent-text: #10201b; --warn: #3b3118; --warn-text: #f0dca0;
  }
}
* { box-sizing: border-box; }
body { margin: 0 auto; max-width: 820px; padding: 1rem; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
h1 { margin: 0; font-size: 1.5rem; }
.sub, .muted { color: var(--muted); font-size: .9rem; margin: .25rem 0; }
.strong { font-weight: 600; margin: 0 0 .5rem; }
.banner { background: var(--warn); color: var(--warn-text); padding: .6rem .8rem; border-radius: 8px; margin: .8rem 0; font-size: .9rem; }
.tabs { display: flex; gap: .5rem; margin: 1rem 0; }
.tabs button { flex: 1; padding: .6rem; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 8px; font: inherit; cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .9rem; margin-bottom: .8rem; }
.inline { display: flex; flex-wrap: wrap; gap: .5rem; }
.inline input[type=text], .inline #task-title { flex: 1 1 220px; }
.inline #task-hours { width: 5.5rem; }
.grid { display: grid; gap: .5rem; }
input, select, textarea { font: inherit; padding: .5rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); width: 100%; }
.inline input, .inline select { width: auto; }
textarea { resize: vertical; }
button { font: inherit; padding: .45rem .8rem; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 8px; cursor: pointer; }
button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
button:disabled { opacity: .5; cursor: wait; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; }
.bar { height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; }
#progress-fill { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
h2 { font-size: 1rem; margin: 1.2rem 0 .4rem; color: var(--muted); font-weight: 600; }
ul.tasks { list-style: none; margin: 0; padding: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; margin-bottom: .5rem; }
.row .title { flex: 1 1 240px; }
.row.done .title, .row.skipped .title { text-decoration: line-through; color: var(--muted); }
.chip { font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; background: var(--line); color: var(--muted); white-space: nowrap; }
.chip.status-approved { background: var(--accent); color: var(--accent-text); }
.hours { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.filter { margin: .8rem 0; max-width: 220px; }
.lead-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.lead-head .name { font-weight: 600; flex: 1 1 auto; }
.lead-notes { color: var(--muted); font-size: .9rem; margin: 0 0 .5rem; white-space: pre-wrap; }
#toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: .6rem 1rem; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90%; }
#toast.show { opacity: 1; }
.ir-foot { text-align: center; font-size: .7rem; opacity: .45; margin: 2rem 0 1rem; }
.ir-foot a { color: inherit; }
html.i18n-wait body { visibility: hidden; }
.lang { font-size: .85rem; opacity: .7; white-space: nowrap; }
.lang button { font: inherit; color: inherit; background: none; border: 0; padding: .1rem .2rem; cursor: pointer; }
.lang button[aria-pressed="true"] { font-weight: 700; }
