/* =====================================================================
   checkdat - schlichtes, handwerksnahes Design. Keine Spielereien,
   gut lesbar, funktioniert auf Baustellen-Tablet und Buero-Monitor.
   ===================================================================== */

:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #1f2933;
  --muted: #6b7280;
  --line: #e2e5ea;
  --brand: #1d6f5c;       /* ruhiges Gruen */
  --brand-dark: #16584a;
  --warn: #b45309;
  --err: #b91c1c;
  --ok: #15803d;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

a { color: var(--brand); }

/* --- Login-Seite --- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.brand {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.5px;
  margin: 0 0 4px;
}
.brand span { color: var(--brand); }
.subtitle { color: var(--muted); margin: 0 0 24px; font-size: 14px; }

/* --- Formularelemente --- */
label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
}
input:focus, select:focus { outline: 2px solid var(--brand); border-color: var(--brand); }

button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 11px 16px;
}
.btn-primary { background: var(--brand); color: #fff; width: 100%; margin-top: 20px; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--muted); padding: 6px 10px; }
.btn-small { font-size: 13px; padding: 7px 12px; }

.linkrow { margin-top: 14px; text-align: center; font-size: 13px; }
.linkrow a { cursor: pointer; }

/* --- Meldungen --- */
.msg { margin-top: 16px; font-size: 14px; padding: 10px 12px; border-radius: 8px; display: none; }
.msg.show { display: block; }
.msg.error { background: #fef2f2; color: var(--err); border: 1px solid #fecaca; }
.msg.ok    { background: #f0fdf4; color: var(--ok);  border: 1px solid #bbf7d0; }

/* --- App-Layout --- */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .who { font-size: 13px; color: var(--muted); }
.main { max-width: 900px; margin: 0 auto; padding: 24px 20px 60px; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.panel h2 { margin: 0 0 4px; font-size: 17px; }
.panel .hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; }

/* --- Dokumentzeilen im Anlage-Formular --- */
.doc-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 10px; align-items: center; margin-bottom: 10px; }
.doc-row .btn-ghost { color: var(--err); }
@media (max-width: 640px){ .doc-row { grid-template-columns: 1fr; } }

/* --- Job-Liste --- */
.job { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; }
.job-head { display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.job-title { font-weight: 600; }
.job-meta { color: var(--muted); font-size: 13px; }
.badge { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.badge.neu      { background: #eef2ff; color: #4338ca; }
.badge.in_arbeit{ background: #fef9c3; color: #854d0e; }
.badge.fertig   { background: #dcfce7; color: var(--ok); }
.badge.fehler   { background: #fee2e2; color: var(--err); }
.job-docs { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); display: none; }
.job-docs.open { display: block; }
.job-docs ul { margin: 0; padding-left: 18px; font-size: 14px; }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }
