/* Dashboard (index.html): tasks and finance on the left, the year on the right.
   Tokens come from coolhanx.css; the shared pieces (".cols-2", the "?" bubble) from ui.css. */

/* One grid for the whole page: twelve columns, one gap, cards that fill their row's height. */
.dg-row{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px;margin-bottom:16px;align-items:stretch}
.dg-row>.card{margin:0;min-width:0;display:flex;flex-direction:column}
.span-8{grid-column:span 8} .span-4{grid-column:span 4}
@media(max-width:1180px){.span-8,.span-4{grid-column:1/-1}}

/* ---- the chart header carries the two ways of looking: when to count, net or gross ---- */
.chart-head{justify-content:space-between;flex-wrap:wrap}
.chart-sel{display:flex;gap:8px}
.chart-sel select{height:30px;padding:0 8px;border:1px solid var(--line-2);border-radius:8px;background:var(--surface);color:var(--ink);font:inherit;font-size:.8rem;font-weight:600}

/* ---- Aufgaben: five groups, only what is open; a finished group is one green tick ---- */
#dk-todo-n{margin-left:auto}
.tgroup{border-bottom:1px solid var(--line);padding-bottom:4px}
.tgroup:last-child{border-bottom:0}
.tg-h{display:flex;align-items:baseline;justify-content:space-between;margin:0;padding:12px 18px 2px;font-size:.7rem;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.tg-h .tg-more{font-size:.74rem;font-weight:700;letter-spacing:0;text-transform:none}
.tg-h .tg-more[hidden]{display:none}
.dg-todo .task-row{padding:8px 18px}
.tasklist .dash-empty{padding:8px 18px}
.task-row.done .tk-dot{display:grid;place-items:center;width:18px;height:18px;background:var(--good);color:var(--on-accent,#fff);font-size:.66rem;line-height:1}
.task-row.done .tk-dot::before{content:"✓";font-weight:800}
.task-row.done .tk-lab{color:var(--muted);font-weight:500}
.task-row.info .tk-dot{background:var(--faint)}
.task-row.info .tk-lab{color:var(--ink-2);font-weight:500}
.tk-amt{font-size:.78rem;color:var(--muted);white-space:nowrap}
.tk-sub{display:block;margin-top:1px;font-size:.72rem;font-weight:500;color:var(--muted)}

/* in the half-width cards the tab names and the link to the page do not fit side by side: the link wraps below */
.dg-row .tabbar{flex-wrap:wrap}
.dg-row .sect-t .more{margin-left:auto}

/* the open items: per side the total, one ageing bar, the non-empty buckets */
.op-h{margin:0 0 6px;font-size:.7rem;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--muted)}
.dg-open .op-h:not(:first-child){margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}
.op-t{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:8px}
.op-v{font-size:1.25rem;font-weight:800;letter-spacing:-.02em}
.op-n{font-size:.78rem;color:var(--muted)}
.dg-open .age-legend{margin-top:8px}

/* Aufgaben: only what is open. A row that is done and a group with nothing open are not drawn. */
.dg-todo .task-row.done{display:none}
.dg-todo .tgroup:not(:has(.task-row:not(.done))){display:none}
.todo-none{padding:16px 18px!important}

/* Letzte Belege: three columns, the date under the number */
.dg-recent .tbl{width:100%}
.dg-recent .rc-when{display:block;margin-top:1px;font-size:.72rem;font-weight:500;color:var(--muted)}
