/* ISO-27001-Portal der makroh GmbH — Farben aus dem Logo (Blau #004780, Grau #58585a), Aufbau wie PACE */
:root {
  --brand: #004780; --brand-600: #003a69; --brand-50: #eaf1f8; --brand-100: #cfe0ef;
  --grey: #58585a; --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --faint: #94a3b8;
  --line: #e4e8f0; --bg: #f3f5f9; --panel: #fff;
  --ok: #059669; --ok-bg: #ecfdf5; --warn: #b45309; --warn-bg: #fffbeb; --bad: #be123c; --bad-bg: #fff1f2;
  --radius: 12px; --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 1px rgba(15,23,42,.04);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); font-size: 14px; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; } h2 { font-size: 16px; margin: 0; } h3 { font-size: 14px; margin: 0 0 6px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; }

.topbar { height: 60px; display: flex; align-items: center; gap: 16px; padding: 0 20px; background: #fff; border-top: 4px solid var(--brand); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar img { height: 32px; } .topbar .title { font-weight: 700; color: var(--grey); letter-spacing: .02em; }
.topbar .spacer { flex: 1; } .topbar .who { color: var(--muted); font-size: 13px; }
.layout { display: grid; grid-template-columns: 248px 1fr; min-height: calc(100vh - 60px); }
.rail { background: var(--brand-50); border-right: 1px solid #dbe4ec; padding: 14px 10px; }
.rail a { white-space: nowrap; display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; color: #33475a; font-weight: 600; border: 1px solid transparent; margin-bottom: 2px; }
.rail a:hover { background: rgba(0,71,128,.08); text-decoration: none; }
.rail a.on { background: #fff; border-color: var(--brand-100); color: #1f3447; box-shadow: var(--shadow-sm); }
.rail .head { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #6b7f90; margin: 14px 12px 6px; }
main { padding: 24px 28px 48px; max-width: 1280px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-body { padding: 16px 18px; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1000px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .layout { grid-template-columns: 1fr; } .rail { display: flex; flex-wrap: wrap; } }
.kpi { padding: 16px 18px; } .kpi .v { font-size: 26px; font-weight: 700; color: var(--brand); } .kpi .l { color: var(--muted); font-size: 12.5px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--line); background: #fbfcfe; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line-2, #eef1f6); vertical-align: top; }
tr:last-child td { border-bottom: 0; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.b-offen { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.b-in_arbeit { background: var(--warn-bg); color: var(--warn); border-color: #fde68a; }
.b-erledigt { background: var(--ok-bg); color: var(--ok); border-color: #a7f3d0; }
.b-entfaellt { background: #f8fafc; color: var(--faint); border-color: #e2e8f0; }
.b-ueberfaellig { background: var(--bad-bg); color: var(--bad); border-color: #fecdd3; }
.b-bald { background: var(--warn-bg); color: var(--warn); border-color: #fde68a; }

.progress { height: 8px; background: #eef1f6; border-radius: 999px; overflow: hidden; } .progress > span { display: block; height: 100%; background: var(--brand); }

form.inline { display: inline; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 12px; }
input, select, textarea { font: inherit; font-size: 14px; color: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fff; font-weight: 400; width: 100%; }
input, select { height: 40px; line-height: 38px; }
input[type="date"] { line-height: normal; padding-top: 0; padding-bottom: 0; }
input[type="file"] { padding: 7px 10px; line-height: normal; }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0 6px 0 0; vertical-align: middle; accent-color: var(--brand); }
textarea { padding: 9px 12px; line-height: 1.45; min-height: 72px; resize: vertical; }
label.check { flex-direction: row; align-items: center; font-weight: 500; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
select { -webkit-appearance: none; appearance: none; padding-right: 30px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border-radius: 10px; padding: 0 16px; border: 1px solid transparent; cursor: pointer; font: inherit; font-weight: 600; white-space: nowrap; }
.btn-primary { background: var(--brand); color: #fff; } .btn-primary:hover { background: var(--brand-600); text-decoration: none; }
.btn-light { background: #fff; border-color: var(--line); color: var(--ink-2); } .btn-light:hover { background: var(--bg); text-decoration: none; }
.btn-danger { background: #fff; border-color: #fecdd3; color: var(--bad); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; } .row > label { flex: 1; min-width: 170px; }
.actions { display: flex; gap: 6px; flex-wrap: nowrap; align-items: center; } .actions form { margin: 0; }

.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; }
.flash.ok { background: var(--ok-bg); border-color: #a7f3d0; color: #065f46; } .flash.err { background: var(--bad-bg); border-color: #fecdd3; color: #9f1239; }

.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth .box { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 16px; box-shadow: 0 24px 60px -12px rgba(15,23,42,.25); padding: 32px; }
.auth img { height: 46px; margin-bottom: 18px; } .auth .btn { width: 100%; justify-content: center; }
.auth img.qr, .qr { display: block; margin: 8px auto 12px; width: 240px; height: 240px; max-width: 100%; image-rendering: pixelated; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.doc { background: #fff; padding: 8px 4px; line-height: 1.55; } .doc table { margin: 8px 0 16px; } .doc h1 { font-size: 20px; } .doc h2 { font-size: 16px; margin-top: 22px; }
details summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.phase-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--brand); color: #fff; font-weight: 700; font-size: 12.5px; margin-right: 8px; }

.nowrap { white-space: nowrap; }
td.col-act { width: 1%; white-space: nowrap; }
details > summary { list-style: none; display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 12.5px; color: var(--ink-2); }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { border-color: var(--brand-100); background: var(--brand-50); color: var(--brand-600); }
details form { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; white-space: normal; min-width: 300px; }
.meta { font-size: 12px; color: var(--faint); margin-top: 4px; }
.progress-cell { width: 34%; }
table.fixed { table-layout: fixed; }
table.fixed td, table.fixed th { overflow-wrap: break-word; }
table.fixed td.col-act { width: auto; }
tr.edit-row > td { background: #f7f9fc; padding: 14px 16px 16px; border-bottom: 1px solid var(--line); }
tr.edit-row form { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; align-items: end; }
.form-grid .span-all { grid-column: 1 / -1; }
.form-grid .actions { margin-top: 2px; }
label.check-field { height: 40px; margin-bottom: 12px; }
.actions.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.actions.grid2 form, .actions.grid2 .btn { width: 100%; }
