:root {
  --lw-ink:          #16202b;
  --lw-ink-2:        #5a6a78;
  --lw-primary:      #0d4b7a;
  --lw-primary-dark: #093a5e;
  --lw-accent:       #00a3b4;
  --lw-bg:           #eef2f6;
  --lw-surface:      #ffffff;
  --lw-border:       #d9e0e7;
  --lw-ok:           #1f8a4c;
  --lw-warn:         #b26a00;
  --lw-err:          #c0392b;
  --lw-radius:       8px;
  --lw-shadow:       0 1px 2px rgba(16,32,48,.10), 0 8px 24px rgba(16,32,48,.07);
  --lw-font:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                     "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: var(--lw-font);
  color: var(--lw-ink);
  background: var(--lw-bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Kopfzeile ---------- */
.lw-header {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px; height: 60px;
  background: var(--lw-surface);
  border-bottom: 1px solid var(--lw-border);
  box-shadow: 0 1px 2px rgba(16,32,48,.06);
  position: relative; z-index: 10;
}
.lw-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.lw-mark {
  width: 34px; height: 34px; border-radius: 7px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--lw-primary) 0%, var(--lw-primary-dark) 100%);
  display: flex; align-items: center; justify-content: center;
}
.lw-mark svg { width: 20px; height: 20px; display: block; }
.lw-wordmark { display: flex; flex-direction: column; line-height: 1.15; }
.lw-wordmark b {
  font-size: 15px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase;
}
.lw-wordmark span { font-size: 11.5px; color: var(--lw-ink-2); letter-spacing: .02em; }
.lw-divider { width: 1px; height: 28px; background: var(--lw-border); margin: 0 4px; }
.lw-context { font-size: 14px; font-weight: 600; color: var(--lw-ink-2); }
.lw-spacer { margin-left: auto; }

/* ---------- Schaltflächen ---------- */
.lw-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; font: inherit; font-size: 13.5px; font-weight: 500;
  color: var(--lw-ink); background: var(--lw-surface);
  border: 1px solid var(--lw-border); border-radius: var(--lw-radius);
  cursor: pointer; text-decoration: none;
  transition: background .13s, border-color .13s, box-shadow .13s, transform .06s;
  white-space: nowrap;
}
.lw-btn:hover { background: #f5f8fa; border-color: #bcc7d1; }
.lw-btn:active { transform: translateY(1px); }
.lw-btn:focus-visible { outline: 2px solid var(--lw-accent); outline-offset: 2px; }
.lw-btn--primary {
  color: #fff; background: var(--lw-primary); border-color: var(--lw-primary);
}
.lw-btn--primary:hover { background: var(--lw-primary-dark); border-color: var(--lw-primary-dark); }
.lw-btn--ghost { background: transparent; border-color: transparent; color: var(--lw-ink-2); }
.lw-btn--ghost:hover { background: #eef2f6; color: var(--lw-ink); }
.lw-btn--icon { padding: 8px 10px; font-size: 15px; line-height: 1; min-width: 36px; justify-content: center; }
.lw-btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
.lw-btn-group { display: flex; gap: 6px; align-items: center; }

/* ---------- Statusanzeige ---------- */
.lw-state { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--lw-ink-2); }
.lw-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lw-ink-2); flex: 0 0 auto; }
.lw-dot--ok   { background: var(--lw-ok); }
.lw-dot--warn { background: var(--lw-warn); }
.lw-dot--err  { background: var(--lw-err); }
.lw-dot--busy { background: var(--lw-accent); animation: lw-pulse 1s ease-in-out infinite; }
@keyframes lw-pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- Toast ---------- */
.lw-toasts {
  position: fixed; bottom: 20px; right: 20px; z-index: 900;
  display: flex; flex-direction: column; gap: 9px; align-items: flex-end;
  pointer-events: none;
}
.lw-toast {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 16px; font-size: 13.5px;
  background: var(--lw-ink); color: #fff;
  border-radius: var(--lw-radius); box-shadow: var(--lw-shadow);
  animation: lw-slide .2s ease-out;
  max-width: 380px;
}
.lw-toast--ok  { background: var(--lw-ok); }
.lw-toast--err { background: var(--lw-err); }
@keyframes lw-slide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Zeichenfläche ---------- */
.lw-canvas { flex: 1 1 auto; min-height: 0; background: var(--lw-surface); position: relative; }

/* ---------- Startseite ---------- */
.lw-main { flex: 1 1 auto; overflow-y: auto; }
.lw-wrap { max-width: 1060px; margin: 0 auto; padding: 44px 24px 60px; }
.lw-hero h1 {
  margin: 0 0 12px; font-size: 30px; font-weight: 650; letter-spacing: -.012em;
}
.lw-hero p { margin: 0 0 34px; font-size: 16px; line-height: 1.6; color: var(--lw-ink-2); max-width: 66ch; }
.lw-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.lw-card {
  display: flex; flex-direction: column;
  padding: 22px; background: var(--lw-surface);
  border: 1px solid var(--lw-border); border-radius: 12px;
  box-shadow: var(--lw-shadow);
  text-decoration: none; color: inherit;
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
a.lw-card:hover {
  transform: translateY(-2px); border-color: #b9c6d2;
  box-shadow: 0 2px 4px rgba(16,32,48,.10), 0 14px 32px rgba(16,32,48,.11);
}
.lw-card-ico {
  width: 40px; height: 40px; border-radius: 9px; margin-bottom: 15px;
  background: #e8f1f7; color: var(--lw-primary);
  display: flex; align-items: center; justify-content: center;
}
.lw-card-ico svg { width: 21px; height: 21px; }
.lw-card h2 { margin: 0 0 7px; font-size: 16.5px; font-weight: 620; }
.lw-card p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--lw-ink-2); }
.lw-card-go { margin-top: 15px; font-size: 13px; font-weight: 600; color: var(--lw-primary); }

.lw-panel {
  margin-top: 30px; padding: 20px 22px;
  background: var(--lw-surface); border: 1px solid var(--lw-border);
  border-radius: 12px; box-shadow: var(--lw-shadow);
}
.lw-panel h3 {
  margin: 0 0 16px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .075em; color: var(--lw-ink-2);
}
.lw-facts { display: grid; gap: 18px 26px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.lw-fact dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--lw-ink-2); margin-bottom: 4px; }
.lw-fact dd { margin: 0; font-size: 17px; font-weight: 620; font-variant-numeric: tabular-nums; }
.lw-fact dd small { font-size: 13px; font-weight: 500; color: var(--lw-ink-2); }
.lw-empty { font-size: 13.5px; color: var(--lw-ink-2); line-height: 1.6; margin: 0; }

.lw-footer {
  flex: 0 0 auto; padding: 16px 24px;
  border-top: 1px solid var(--lw-border);
  font-size: 12.5px; color: var(--lw-ink-2); text-align: center; background: var(--lw-surface);
}

/* ---------- bpmn-js Feinschliff ---------- */
.djs-palette {
  border-radius: var(--lw-radius) !important;
  border-color: var(--lw-border) !important;
  box-shadow: var(--lw-shadow) !important;
}
.bjs-powered-by { display: none !important; }
