/* admin – ab 1.6.0: Rollen & Rechte (Matrix, Hierarchie), Checklisten-Editor und Positionstypen. Farben nur aus den Tokens von app.css. */

/* ---------- Rollen & Rechte ---------- */
.perm-roles .perm-role { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 0; }
.perm-scroll { overflow-x: auto; padding: 0; -webkit-overflow-scrolling: touch; }
.perm-table { min-width: 560px; }
.perm-table th, .perm-table td { vertical-align: middle; }
.perm-table .perm-name { position: sticky; left: 0; background: var(--card); min-width: 150px; max-width: 200px; font-weight: 600; z-index: 1; }
.perm-table thead th { text-align: left; font-size: 0.85rem; color: var(--ink); }
.perm-table select { min-height: 44px; min-width: 156px; }
.perm-group th { background: var(--bg); color: var(--ink); font-size: 0.85rem; padding: 8px 10px; }
.perm-sensitive .perm-name { box-shadow: inset 3px 0 var(--warn); }
.perm-locked { background: var(--bg); }
.perm-locked select { opacity: 0.75; cursor: not-allowed; }
.perm-lock { margin-right: 4px; }

.perm-node { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.perm-node-main { flex: 1 1 200px; min-width: 0; }
.perm-level-1 { padding-left: 18px; border-left: 2px solid var(--line); }
.perm-level-2 { padding-left: 36px; border-left: 2px solid var(--line); }
.perm-level-3 { padding-left: 54px; border-left: 2px solid var(--line); }
.perm-level-4, .perm-level-5 { padding-left: 72px; border-left: 2px solid var(--line); }
.perm-leader { display: flex; align-items: center; gap: 6px; }
.perm-leader select { min-height: 44px; }

/* ---------- Checklisten: Durchlauf ---------- */
.check-section { margin: 14px 0 6px; font-weight: 700; color: var(--ink); list-style: none; border-bottom: 2px solid var(--line); padding-bottom: 4px; }
.check-hint { margin: 4px 0 0; }
.check-item.fail { border-color: var(--danger); }
.check-text { width: 100%; min-height: 76px; }
.check-extra select, .check-extra input[type="date"] { min-height: 44px; max-width: 100%; }
.yesno button { min-height: 44px; min-width: 64px; padding: 8px 14px; }
.yesno button.active { background: var(--ok-soft); color: var(--ok); }
.yesno button.active.no { background: var(--danger-soft); color: var(--danger); }
.sig { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.sig-pad { width: 100%; max-width: 400px; aspect-ratio: 8 / 3; background: #fff; border: 1px solid var(--line); border-radius: 10px; touch-action: none; }

/* ---------- Checklisten: Vorlagen-Editor ---------- */
.tpl-editor { list-style: decimal; }
.tpl-editor .icon-btn { width: 44px; height: 44px; }
.tpl-editor select { min-height: 44px; }
.tpl-item { padding: 8px 0; border-bottom: 1px solid var(--line); }
.tpl-settings { background: var(--bg); border-radius: 10px; padding: 10px; }

@media print {
	.check-extra .btn, .check-extra .link, .sig .row, .yesno button:not(.active) { display: none; }
	.check-item { break-inside: avoid; }
}
