/* DigiwoX Aufgaben - flat, no shadows, mobile first.
   Brand colour lives in --brand only; change it there. */
:root {
  --brand:        #1f6feb;
  --brand-dark:   #1858bd;
  --ink:          #14181f;
  --ink-soft:     #5b6675;
  --line:         #e3e7ed;
  --bg:           #f6f7f9;
  --card:         #ffffff;
  --offen:        #6b7280;
  --pruefung:     #b45309;
  --erledigt:     #15803d;
  --blockiert:    #b91c1c;
  --radius:       8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 15px from the screen edge on mobile, in every section */
.wrap { width: 100%; max-width: 820px; margin: 0 auto; padding: 15px; }
.wrap--wide { max-width: 1180px; }

.topbar {
  background: var(--ink);
  color: #fff;
  width: 100%;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.topbar a, .topbar span { color: #fff; }
.topbar .brand { font-weight: 700; letter-spacing: .2px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 15px;
  margin-bottom: 15px;
  width: 100%;
}

h1 { font-size: 20px; margin: 0 0 10px; line-height: 1.3; }
h2 { font-size: 17px; margin: 22px 0 10px; }
p  { margin: 0 0 10px; }
.muted { color: var(--ink-soft); font-size: 14px; }

/* icons always keep clear space from their label */
.row-ico { display: inline-flex; align-items: center; gap: 10px; }

.meta { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 14px 0 0; }
.meta div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 7px; font-size: 15px; }
.meta div:last-child { border-bottom: 0; }
.meta b { font-weight: 600; color: var(--ink-soft); }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.badge--offen     { background: var(--offen); }
.badge--pruefung  { background: var(--pruefung); }
.badge--erledigt  { background: var(--erledigt); }
.badge--blockiert { background: var(--blockiert); }
.badge--due       { background: var(--blockiert); }
.badge--prio      { background: var(--pruefung); }

/* full width action buttons, flat */
.actions { display: grid; gap: 10px; margin-top: 18px; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
  font-family: inherit;
}
.btn:hover    { background: var(--brand-dark); }
.btn:active   { transform: translateY(1px); }
.btn[disabled]{ opacity: .6; cursor: progress; }
.btn--done    { background: var(--erledigt); }
.btn--done:hover { background: #126c33; }
.btn--review  { background: var(--pruefung); }
.btn--review:hover { background: #96450a; }
.btn--block   { background: var(--blockiert); }
.btn--block:hover { background: #9d1818; }
.btn--ghost   { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: #eef1f5; }
.btn--sm      { padding: 10px 14px; font-size: 15px; }

input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%;
  padding: 13px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-soft); margin: 12px 0 6px; }

.notice { padding: 13px 15px; border-radius: var(--radius); margin-bottom: 15px; font-size: 15px; border: 1px solid; }
.notice--ok   { background: #ecfdf3; border-color: #abefc6; color: #0a5c2c; }
.notice--warn { background: #fffaeb; border-color: #fedf89; color: #7a4a05; }
.notice--err  { background: #fef3f2; border-color: #fecdca; color: #912018; }

/* task list on the board */
.tlist { display: grid; gap: 10px; }
.tcard {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--offen);
  border-radius: var(--radius);
  padding: 14px 15px;
  color: inherit;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.tcard:hover { background: #fbfcfe; border-color: #c9d2de; transform: translateY(-1px); text-decoration: none; }
.tcard--in_pruefung { border-left-color: var(--pruefung); }
.tcard--erledigt    { border-left-color: var(--erledigt); }
.tcard--blockiert   { border-left-color: var(--blockiert); }
.tcard .t { font-weight: 600; margin-bottom: 6px; }
.tcard .s { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-soft); }

.filters { display: grid; grid-template-columns: 1fr; gap: 10px; }
.counts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 15px; }
.counts div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.counts b { display: block; font-size: 22px; line-height: 1.2; }
.counts span { font-size: 13px; color: var(--ink-soft); }

.log { list-style: none; margin: 0; padding: 0; }
.log li { border-left: 2px solid var(--line); padding: 0 0 14px 14px; margin-left: 4px; font-size: 14px; }
.log li:last-child { padding-bottom: 0; }
.log .when { color: var(--ink-soft); font-size: 13px; }

.center { text-align: center; }
.stack-list { display: grid; gap: 10px; }

@media (min-width: 680px) {
  .meta { grid-template-columns: 1fr 1fr; gap: 8px 24px; }
  .actions { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .filters { grid-template-columns: 1fr 1fr 2fr auto; align-items: end; }
  .counts { grid-template-columns: repeat(4, 1fr); }
  h1 { font-size: 24px; }
}
