/* Signaturwerk – Oberfläche. Systemschriften, keine externen Ressourcen (DSGVO). */
:root {
  --ground: #F4F2EC; --surface: #FFFFFF; --ink: #1B1B19; --muted: #6B6962; --line: #E3E0D6;
  --acc: #1F6F5F; --acc-dark: #154D42; --acc-soft: #E4F0EC;
  --warn: #9A4A06; --warn-soft: #FBEEDD; --ok: #2A6F47; --ok-soft: #E3F1E7;
  --danger: #A33A2C; --danger-soft: #F6E3DF; --nav: #1B1B19; --nav-2: #2C2C29; --nav-muted: #B9B7AE;
  --radius: 10px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); font-size: 14px; line-height: 1.5; }
a { color: var(--acc); text-decoration: none; }
a:hover { color: var(--acc-dark); text-decoration: underline; }
h1 { font-size: 24px; font-weight: 650; letter-spacing: -0.3px; margin: 0; }
h2 { font-size: 15px; font-weight: 650; margin: 0 0 12px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* Rahmen */
.shell { display: flex; min-height: 100vh; }
.nav { width: 236px; flex-shrink: 0; background: var(--nav); color: #F4F2EC; padding: 22px 14px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 18px; color: #fff; font-size: 19px; font-weight: 650; letter-spacing: -0.2px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--acc); display: grid; place-items: center; font-size: 17px; }
.nav-label { padding: 12px 8px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #8E8C84; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--nav-muted); font-weight: 500; }
.nav a:hover { background: var(--nav-2); color: #fff; text-decoration: none; }
.nav a.on { background: var(--nav-2); color: #fff; box-shadow: inset 3px 0 0 var(--acc); }
.nav .count { margin-left: auto; background: var(--warn-soft); color: var(--warn); border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 650; }
.nav-foot { margin-top: auto; padding: 12px 10px; border-radius: 10px; background: var(--nav-2); font-size: 12px; color: var(--nav-muted); }
.nav-foot strong { display: block; color: #fff; font-size: 13px; }
.nav-foot a { padding: 6px 0 0; color: var(--nav-muted); }
main { flex: 1; min-width: 0; padding: 28px 32px 48px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
.head .sub { color: var(--muted); margin-top: 4px; }
.head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Bausteine */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.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)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 500px; gap: 24px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stat .label { color: var(--muted); font-size: 13px; }
.stat .value { font-size: 32px; font-weight: 650; letter-spacing: -0.5px; line-height: 1.2; margin: 4px 0 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--acc); background: var(--acc); color: #fff; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--acc-dark); color: #fff; text-decoration: none; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { border-color: #C9C5B8; background: #FBFAF7; }
.btn.danger { background: var(--surface); color: var(--danger); border-color: var(--line); }
.btn.small { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.btn.link { background: none; border: 0; color: var(--acc); padding: 0; min-height: 0; font-weight: 600; }
form.inline { display: inline; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.b-ok, .b-current, .b-active { color: var(--ok); background: var(--ok-soft); }
.b-warn, .b-outdated { color: var(--warn); background: var(--warn-soft); }
.b-danger, .b-never { color: var(--danger); background: var(--danger-soft); }
.b-muted, .b-expired, .b-disabled, .b-paused { color: var(--muted); background: #EEECE4; }
.b-acc, .b-scheduled, .b-default { color: var(--acc); background: var(--acc-soft); }

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.flash.error { background: var(--danger-soft); color: var(--danger); }
.notice { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; background: var(--acc-soft); }
.notice.warn { background: var(--warn-soft); }

/* Formulare */
label, .label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field { display: flex; flex-direction: column; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field .lock { font-size: 11px; color: var(--muted); font-weight: 500; margin-left: 6px; }
input[type=text], input[type=email], input[type=url], input[type=search], input[type=number], input[type=date], input[type=datetime-local], input[type=file], select, textarea {
  width: 100%; padding: 9px 12px; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; font: inherit; color: var(--ink); background: var(--surface);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--acc); outline-offset: -1px; border-color: var(--acc); }
input:disabled { background: var(--ground); color: var(--muted); }
textarea { min-height: 70px; resize: vertical; }
input[type=color] { width: 44px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; margin: 0; }
.checks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* Tabellen */
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 650; padding: 10px 14px; }
table.list td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
table.list tr:hover td { background: #FBFAF7; }
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.person { display: flex; gap: 10px; align-items: center; }
.avatar { width: 30px; height: 30px; border-radius: 999px; background: var(--acc-soft); color: var(--acc); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 999px; font-size: 13px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip:hover { text-decoration: none; border-color: #C9C5B8; }
.tag { font-size: 12px; background: #EEECE4; border-radius: 6px; padding: 1px 7px; color: #4A4843; }

/* Vorschau */
.preview-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.preview-label strong { text-transform: uppercase; letter-spacing: .8px; }
.split.flip { grid-template-columns: 500px minmax(0, 1fr); }
.preview { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.preview .mailtext { font-size: 13px; color: var(--muted); border-bottom: 1px dashed var(--line); padding-bottom: 12px; margin-bottom: 14px; }
.preview iframe { width: 100%; border: 0; display: block; min-height: 220px; }
.sticky { position: sticky; top: 20px; }

/* Layout-Auswahl */
.layouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.layout-opt { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 14px; cursor: pointer; background: var(--surface); }
.layout-opt input { position: absolute; opacity: 0; }
.layout-opt:has(input:checked) { border: 2px solid var(--acc); padding: 13px; }
.layout-opt .thumb { height: 44px; display: flex; align-items: center; margin-bottom: 8px; }
.sk { background: #333; height: 6px; border-radius: 2px; }
.sk.l { background: #B5B2A8; height: 4px; }

/* Banner */
.banner-img { width: 210px; height: 44px; object-fit: cover; border-radius: 4px; display: block; background: #EEECE4; }
.banner-big { width: 420px; max-width: 100%; height: auto; border-radius: 6px; display: block; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.bars span { flex: 1; background: var(--acc); border-radius: 2px 2px 0 0; min-height: 2px; opacity: .85; }

/* Installation */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-weight: 600; cursor: pointer; }
.tab[aria-selected=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding: 3px 0 0 38px; min-height: 26px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 999px; background: var(--acc-soft); color: var(--acc); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.sig-source { position: absolute; left: -9999px; top: 0; }

/* Login */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { display: grid; grid-template-columns: 420px 400px; gap: 64px; align-items: center; }
.login .pitch h1 { font-size: 30px; line-height: 1.2; margin: 18px 0 12px; }
.login .box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }

.log li { padding: 4px 0; color: var(--muted); }
.log { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.log strong { color: var(--ink); font-weight: 600; }

@media (max-width: 1100px) {
  .split, .split.flip { grid-template-columns: 1fr; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .nav { width: 100%; height: auto; position: static; }
  main { padding: 20px 16px; }
  .g2, .g3, .g4, .checks, .layouts { grid-template-columns: 1fr; }
}
