/* styles.css — reines lokales CSS, keine externen Ressourcen. */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #101216;
  color: #e8e6e1;
  line-height: 1.5;
}

/* Statusbanner */
#banner {
  position: sticky; top: 0; z-index: 10;
  background: #3a2d12; color: #ffd98a;
  border-bottom: 1px solid #8a6a2a;
  text-align: center;
  font-size: 13px; font-weight: 700; letter-spacing: 0.12em;
  padding: 10px 12px;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 28px 18px 56px; }

h1 { font-size: 24px; margin: 6px 0 2px; }
#stand { color: #9a97a8; font-size: 13px; margin: 0 0 8px; }

/* Dezente, ruhige Linien-Animation (SVG-Stroke) unter dem Titel.
   Rein dekorativ: zeigt keinen Arbeitsstand und haengt an keinen Daten. */
#linie { display: block; width: 100%; height: 24px; margin: 4px 0 18px; }
#linie path {
  fill: none; stroke: #6f7bd8; stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 90 560;             /* kurzer Strich auf langer Bahn */
  animation: lauf 9s linear infinite;   /* langsames, ruhiges Wandern */
  opacity: 0.55;
}
@keyframes lauf {
  from { stroke-dashoffset: 650; }
  to   { stroke-dashoffset: 0; }
}
/* Animation aus bei reduzierter Bewegung */
@media (prefers-reduced-motion: reduce) {
  #linie path { animation: none; stroke-dasharray: none; }
}

.projekt {
  background: #171a20;
  border: 1px solid #262b35;
  border-radius: 12px;
  padding: 18px 18px 14px;
  margin: 18px 0;
}
.projekt-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.projekt h2 { font-size: 18px; margin: 0 0 4px; flex: 1 1 auto; }
.abschnitt {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #77747f;
  margin: 14px 0 2px;
}
.beschreibung { color: #b8b6c2; font-size: 14px; margin: 0 0 4px; }

/* Herkunfts-Kennzeichnung je Projekt (Wahrheitsmerkmal) */
.quelle-badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
  border: 1px solid transparent;
}
.quelle-platzhalter { color: #c9a54e; border-color: #5c4a22; background: #221b0d; }
.quelle-bestaetigt  { color: #9fe0ae; border-color: #2e5c39; background: #10241a; }

.schritte { list-style: none; margin: 0; padding: 0; }
.schritt { padding: 10px 0; border-top: 1px solid #232833; }
.schritt:first-child { border-top: 0; }
.schritt-zeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.punkt { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.titel { flex: 1 1 auto; min-width: 180px; }
.datum { color: #8a8898; font-size: 12px; }
.notiz { color: #9a97a8; font-size: 13px; margin: 6px 0 0 20px; }

.badge {
  font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid transparent; white-space: nowrap;
}
.status-offen .punkt { background: #8a8898; }
.status-offen .badge { color: #c9c7d4; border-color: #3a3f4d; }
.status-in-arbeit .punkt { background: #e0b34c; }
.status-in-arbeit .badge { color: #ffd98a; border-color: #6b5626; background: #241d0e; }
.status-geliefert .punkt { background: #4fae62; }
.status-geliefert .badge { color: #9fe0ae; border-color: #2e5c39; background: #10241a; }
.status-wartet .punkt { background: #6f7bd8; }
.status-wartet .badge { color: #aeb8f5; border-color: #3d4679; background: #161a2e; }

/* Verlauf: echte, datierte Ereignisse (chronologisch, wie eingetragen) */
.ereignisse { list-style: none; margin: 0; padding: 0 0 0 4px; }
.ereignis {
  display: flex; gap: 12px; align-items: baseline;
  padding: 6px 0 6px 14px; border-left: 2px solid #2c3342;
}
.zeit { color: #8a8898; font-size: 12px; white-space: nowrap; flex: none; }
.etext { font-size: 14px; }

.platzhalter-hinweis {
  margin: 12px 0 2px; font-size: 12px; color: #c9a54e;
  border-top: 1px dashed #3a3324; padding-top: 8px;
}
.fehler { color: #ff9d9d; }

footer { color: #77747f; font-size: 12px; margin-top: 26px; }

/* Werkzeugleiste und Bearbeiten-Modus */
#werkzeuge { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 6px; }
#werkzeuge button, .import-label {
  font: inherit; font-size: 12px; font-weight: 700;
  color: #c9c7d4; background: #1b1f27; border: 1px solid #333a48;
  border-radius: 8px; padding: 6px 12px; cursor: pointer;
}
#werkzeuge button:hover, .import-label:hover { border-color: #4a5468; color: #e8e6e1; }
#sperr-bereich { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
#sperr-bereich input {
  font: inherit; font-size: 13px; padding: 6px 10px;
  background: #14171d; color: #e8e6e1; border: 1px solid #333a48; border-radius: 8px;
}
#sperr-bereich button {
  font: inherit; font-size: 12px; font-weight: 700; padding: 6px 12px;
  color: #c9c7d4; background: #1b1f27; border: 1px solid #333a48; border-radius: 8px; cursor: pointer;
}
.hinweis { color: #77747f; font-size: 12px; margin: 6px 0 10px; }
.hinweis.fehler { color: #ff9d9d; }

/* Eingabefelder im Bearbeiten-Modus */
.schritt-edit { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 6px 0; }
.projekt input[type="text"], .projekt input[type="password"], .projekt select, .ereignis input[type="text"] {
  font: inherit; font-size: 13px; padding: 5px 9px;
  background: #14171d; color: #e8e6e1; border: 1px solid #333a48; border-radius: 7px;
}
.e-titel { flex: 1 1 200px; }
.e-notiz { flex: 1 1 100%; }
.e-datum { width: 150px; }
.e-pname { flex: 1 1 240px; font-size: 15px; font-weight: 700; }
.e-pbeschreibung { width: 100%; margin: 6px 0; }
.e-zeit { width: 160px; }
.e-text { flex: 1 1 220px; }
.ops { display: inline-flex; gap: 4px; }
button.mini {
  font: inherit; font-size: 11px; padding: 3px 8px;
  color: #c9c7d4; background: #1b1f27; border: 1px solid #333a48; border-radius: 6px; cursor: pointer;
}
button.mini.rot { color: #ff9d9d; border-color: #5c3232; }
button.add {
  font: inherit; font-size: 12px; font-weight: 700; margin: 8px 0 0;
  color: #aeb8f5; background: #161a2e; border: 1px dashed #3d4679; border-radius: 8px;
  padding: 6px 12px; cursor: pointer;
}
button.add.gross { display: block; width: 100%; padding: 12px; font-size: 14px; }
.projekt-ops { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* Anhaenge */
.anhang-liste { list-style: none; margin: 0; padding: 0; }
.anhang { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.anhang-name {
  font: inherit; font-size: 13px; color: #aeb8f5; background: none;
  border: none; padding: 0; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px;
}
.anhang-add {
  display: inline-block; font-size: 12px; font-weight: 700; margin-top: 6px;
  color: #aeb8f5; background: #161a2e; border: 1px dashed #3d4679;
  border-radius: 8px; padding: 6px 12px; cursor: pointer;
}

.status-pausiert .punkt { background: #6b6f7d; }
.status-pausiert .badge { color: #a8aab4; border-color: #3a3f4d; background: #171a20; }
#sperr-bereich[hidden] { display: none; }

.anmeldung input { display: block; width: 100%; max-width: 340px; margin: 6px 0; }

/* New design: local fonts, no remote services. */
body{background:#fff;color:#251f21;font-size:14px;font-family:system-ui,-apple-system,sans-serif;line-height:1.7}.wrap{max-width:1120px;padding:40px 28px 60px}#banner{position:static;background:#f4efec;color:#585254;border:0;font-size:11px;letter-spacing:.06em;padding:8px}.page-head{padding-bottom:30px}h1{font-family:Georgia,serif;font-weight:400;font-size:38px;letter-spacing:-.035em;margin:6px 0 12px}.intro{color:#585254;font-size:14px}.eyebrow{color:#585254;font-size:10px;font-weight:600;letter-spacing:.1em;margin:0}#stand{color:#585254;font-size:12px}#summary{display:flex;justify-content:space-between;gap:30px;align-items:center;padding:30px 0;border-top:1px solid #eae9ea;border-bottom:1px solid #eae9ea;margin-bottom:30px}#summary[hidden]{display:none}#summary h2{font-family:Georgia,serif;font-size:25px;font-weight:400;margin:8px 0}.metric strong{font-size:38px;letter-spacing:-.04em;font-weight:600}.metric{min-width:130px}.metric p{margin:0}#project-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:28px}.project-card{font:inherit;text-align:left;color:#251f21;background:#fff;border:1px solid #eae9ea;border-radius:12px;padding:22px;cursor:pointer;min-width:0}.project-card.selected{border:2px solid #73a89a;padding:21px}.project-card h2{font-size:21px;margin:18px 0 6px}.project-card progress{display:block;width:100%;height:5px;appearance:none;border:0;background:#eae9ea;border-radius:3px}.project-card progress::-webkit-progress-bar{background:#eae9ea;border-radius:3px}.project-card progress::-webkit-progress-value{background:#73a89a;border-radius:3px}.next{font-size:12px;margin:18px 0 0;overflow-wrap:anywhere}.projekt{background:#fff;border:1px solid #eae9ea;border-radius:12px;padding:24px;margin:20px 0}.projekt h2{font-family:Georgia,serif;font-weight:400;font-size:25px}.beschreibung,.notiz,.datum,.zeit,.hinweis,footer,.abschnitt{color:#585254}.abschnitt{font-size:10px;letter-spacing:.1em;margin:28px 0 10px}.schritt{border-color:#eae9ea;padding:15px 0}.schritt-zeile{gap:12px}.titel{min-width:0;flex:1 1 160px}.badge{font-size:10px;border-radius:4px}.status-offen .badge,.status-pausiert .badge{background:#fff;color:#585254;border-color:#eae9ea}.status-offen .punkt,.status-pausiert .punkt{background:#c0bebf}.status-in-arbeit .badge,.status-wartet .badge{background:#f4efec;color:#585254;border-color:#eae9ea}.status-in-arbeit .punkt,.status-wartet .punkt{background:#585254}.status-geliefert .badge{background:#fff;color:#3e7062;border-color:#73a89a}.status-geliefert .punkt{background:#73a89a}.quelle-badge{font-size:10px;letter-spacing:0;border-radius:4px}.quelle-platzhalter{background:#f4efec;color:#585254;border-color:#eae9ea}.quelle-bestaetigt{background:#fff;color:#3e7062;border-color:#73a89a}.platzhalter-hinweis{color:#585254;border-color:#eae9ea;font-size:11px;margin-top:20px}.ereignis{border-color:#eae9ea}.ereignisse .zeit{white-space:normal}.empty{padding:30px;border:1px dashed #eae9ea;border-radius:12px;color:#585254}#werkzeuge button,.import-label,button.mini,button.add,.anhang-add,#sperr-bereich button{background:#fff;color:#251f21;border:1px solid #eae9ea;border-radius:5px;padding:10px 14px;min-height:44px;font-weight:500;font-size:12px}#werkzeuge button:hover,.import-label:hover,button.add:hover{color:#251f21;border-color:#73a89a}#btn-bearbeiten{background:#73a89a!important;border-color:#73a89a!important;color:white!important}.anhang-name{color:#3e7062;text-align:left;overflow-wrap:anywhere;min-height:44px}.projekt input[type=text],.projekt input[type=password],.projekt select,.ereignis input[type=text]{background:#fff;color:#251f21;border:1px solid #c0bebf;padding:10px;min-height:44px;max-width:100%}.projekt input:focus,.projekt select:focus{outline:2px solid #73a89a;outline-offset:2px}.anmeldung{max-width:560px;margin:20px auto}.anmeldung input{max-width:none;margin:14px 0}.ops{flex-wrap:wrap}button.mini.rot{color:#b6222d;border-color:#eae9ea}.hinweis.fehler,.fehler{color:#b6222d}footer{border-top:1px solid #eae9ea;padding-top:20px;font-size:11px}button:focus-visible,.import-label:focus-within{outline:2px solid #251f21;outline-offset:3px}#btn-export-datajs{display:none}#sperr-bereich input{background:#fff;color:#251f21;border-color:#eae9ea}
@media(max-width:700px){.wrap{padding:28px 20px 45px}#summary{display:block}#summary .metric{margin-top:22px}#project-nav{grid-template-columns:1fr}.project-card{padding:18px}.project-card.selected{padding:17px}.projekt{padding:18px}.schritt-zeile .datum{flex-basis:100%;margin-left:22px}.ereignis{flex-wrap:wrap}.anmeldung h2{font-size:24px}.e-titel,.e-pname,.e-notiz{min-width:0;max-width:100%}.schritt-edit>input,.schritt-edit>select{flex-basis:100%;width:100%}.titel{flex-basis:120px}h1{font-size:34px}}

.key-panel{margin-top:24px;padding:20px;border:1px solid #73a89a;border-radius:10px}.key-panel input.key-once{font-family:monospace;font-size:12px;width:100%}.key-panel button{margin:8px 8px 0 0}
/* Data-driven step signals. No looping activity animation. */
.project-signal{display:inline-block;font-size:11px;padding:3px 9px;border-radius:4px;margin:6px 0 10px;font-weight:600}.project-signal.signal-red{color:#ad2834;background:#fff0f1}.project-signal.signal-green{color:#24764e;background:#eaf7ef}.project-signal.signal-yellow{color:#805900;background:#fff3ce}.project-signal.signal-neutral{color:#585254;background:#f4efec}.back-projects{min-height:44px;background:#fff;border:1px solid #eae9ea;padding:10px 14px;font:inherit;border-radius:5px;cursor:pointer}.detail-intro{padding:28px 0 10px}.detail-intro h2{font-family:Georgia,serif;font-size:30px;font-weight:400;margin:8px 0}.detail-intro p{color:#585254}.detail-intro progress{height:8px;width:100%;accent-color:#24764e}.schritte{position:relative}.schritt{position:relative;padding:20px 0 20px 0}.schritt .schritt-zeile{align-items:flex-start;flex-wrap:nowrap}.step-number{width:32px;height:32px;flex:none;display:grid;place-items:center;border:2px solid #c0bebf;border-radius:50%;background:#fff;font-size:12px;font-weight:600;margin-top:2px}.step-content{min-width:0;flex:1}.step-content .titel{display:block;font-size:16px;font-weight:600;overflow-wrap:anywhere}.signal-label{font-size:11px;font-weight:600;display:inline-block;margin-top:5px}.signal-red .step-number{color:#ad2834;border-color:#d96470}.signal-red .signal-label{color:#ad2834}.signal-green .step-number{color:#fff;border-color:#24764e;background:#24764e}.signal-green .signal-label{color:#24764e}.signal-yellow .step-number{color:#805900;border-color:#dda916;background:#fff3ce}.signal-yellow .signal-label{color:#805900}.signal-neutral .signal-label{color:#585254}.step-meta{color:#585254;font-size:11px;margin:4px 0 0}.approval-box{padding:14px 16px;margin:14px 0 0 44px;background:#fff9e9;border:1px solid #eedba0;border-radius:8px}.approval-box p{font-size:12px;margin:0 0 10px}.approve-button,.approve-confirm{font:inherit;font-size:12px;font-weight:600;min-height:44px;padding:10px 14px;background:#ffe8a5;border:1px solid #c89b22;border-radius:5px;color:#624400;cursor:pointer;margin:0 8px 4px 0}.approval-record{margin-left:44px}.signal-legend{padding:22px;border:1px solid #eae9ea;border-radius:10px;margin-top:30px}.signal-legend h3{font-size:14px;margin:0 0 8px}.signal-legend p{font-size:12px;color:#585254}.stale-setting{font-size:12px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.stale-setting input{min-height:44px;width:72px;border:1px solid #c0bebf;border-radius:5px;padding:8px;font:inherit}.schritt:target{outline:2px solid #73a89a}progress{transition:accent-color .25s ease}.projekt .schritt .notiz{margin-left:44px}
@media(max-width:700px){.approval-box{margin-left:0}.detail-intro h2{font-size:28px}.signal-legend{padding:18px}.step-content .titel{font-size:15px}}

/* State indicators, not a claimed work heartbeat. */
@keyframes board-recent{0%,100%{box-shadow:0 0 0 0 rgba(88,82,84,0);transform:scale(1)}50%{box-shadow:0 0 0 5px rgba(88,82,84,.12);transform:scale(1.04)}}
@keyframes board-waiting{0%,100%{box-shadow:0 0 0 0 rgba(221,169,22,0);transform:scale(1)}50%{box-shadow:0 0 0 8px rgba(221,169,22,.18);transform:scale(1.08)}}
@keyframes board-alert{0%,100%{box-shadow:0 0 0 0 rgba(173,40,52,0);opacity:1}50%{box-shadow:0 0 0 5px rgba(173,40,52,.12);opacity:.68}}
@keyframes board-check-in{from{transform:scale(.75);opacity:.5}to{transform:scale(1);opacity:1}}
.motion-recent .step-number{animation:board-recent 3.6s ease-in-out infinite}.motion-waiting .step-number{animation:board-waiting 2s ease-in-out infinite}.motion-alert .step-number{animation:board-alert 5s ease-in-out infinite}.signal-green .step-number{animation:board-check-in .4s ease-out both}.detail-intro progress::-webkit-progress-value,.project-card progress::-webkit-progress-value{transition:width .65s ease}.signal-label{transition:color .25s ease}
@media(prefers-reduced-motion:reduce){.step-number,.motion-recent .step-number,.motion-waiting .step-number,.motion-alert .step-number,.signal-green .step-number{animation:none!important}.detail-intro progress::-webkit-progress-value,.project-card progress::-webkit-progress-value{transition:none}}

/* V6: deliberately visible motion for recorded state, never simulated progress. */
@keyframes state-arrive{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}
@keyframes waiting-orbit{to{transform:rotate(360deg)}}
@keyframes waiting-sway{0%,100%{transform:rotate(-10deg) scale(1)}50%{transform:rotate(10deg) scale(1.16)}}
@keyframes alert-knock{0%,65%,100%{transform:translateX(0)}72%{transform:translateX(-5px)}79%{transform:translateX(5px)}86%{transform:translateX(-3px)}93%{transform:translateX(3px)}}
@keyframes alert-wash{0%,100%{background-color:rgba(173,40,52,.015)}50%{background-color:rgba(173,40,52,.09)}}
@keyframes state-ripple{0%{transform:scale(.85);opacity:.7}85%,100%{transform:scale(1.85);opacity:0}}
@keyframes waiting-box{0%,100%{box-shadow:inset 4px 0 #dda916,0 0 0 0 #eedba000}50%{box-shadow:inset 8px 0 #dda916,0 0 0 4px #eedba055}}
.schritt{animation:state-arrive .6s ease-out both;animation-delay:var(--step-delay,0ms);border-radius:8px}
.step-number{position:relative;isolation:isolate}
.motion-waiting .step-number{animation:waiting-sway 2.4s ease-in-out infinite;font-size:16px}
.motion-waiting .step-number::after{content:"";position:absolute;inset:-8px;border:2px solid transparent;border-top-color:#dda916;border-bottom-color:#dda916;border-radius:50%;animation:waiting-orbit 3.2s linear infinite}
.motion-waiting .approval-box{animation:waiting-box 2.4s ease-in-out infinite}
.motion-alert{animation:state-arrive .6s ease-out both,alert-wash 3.6s ease-in-out infinite;animation-delay:var(--step-delay,0ms),0s}
.motion-alert .step-number{animation:alert-knock 3.6s ease-in-out infinite;font-size:20px;background:#fff0f1}
.motion-alert .step-number::after,.motion-recent .step-number::after{content:"";position:absolute;inset:-3px;border:2px solid currentColor;border-radius:50%;animation:state-ripple 3.6s ease-out infinite;pointer-events:none;z-index:-1}
.motion-recent .step-number{animation:none}
.motion-recent .step-number::after{animation-duration:4.5s;color:#999}
.signal-green .step-number{animation:board-check-in .65s cubic-bezier(.2,1.7,.4,1) both;animation-delay:var(--step-delay,0ms)}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.motion-waiting .step-number::after,.motion-alert .step-number::after,.motion-recent .step-number::after{display:none}}

.signal-blocked .step-number{color:#777;border-style:dashed;background:#f7f7f7}.signal-blocked .signal-label{color:#585254}.parallel-label{font-weight:600}.parallel-control{font-size:12px;display:flex;align-items:center;gap:8px}.parallel-control input{width:22px;height:22px}

.auto-mode{border:1px solid #d8d4cd;border-radius:10px;padding:16px;margin:20px 0}.auto-mode.is-on{background:#fff3ce;border:2px solid #bb8a00}.auto-mode label{font-size:14px;font-weight:600}.auto-mode input{width:22px;height:22px;vertical-align:middle;margin-right:8px}.auto-mode p{font-size:12px;margin-bottom:0}.reject-button,.reject-confirm{min-height:44px;background:#fff;color:#ad2834;border:1px solid #ad2834;border-radius:5px;padding:10px 14px;font:inherit;font-size:12px}.reject-reason{display:block;width:100%;min-height:70px;margin:12px 0;border:1px solid #aaa;padding:8px;font:inherit;box-sizing:border-box}

.agent-panel{margin:24px 0;border:1px solid #ddd;border-radius:10px;padding:16px}.agent-panel h3{margin-top:0}.agent-panel p{font-size:12px;overflow-wrap:anywhere}.agent-panel input{display:block;width:100%;box-sizing:border-box;min-height:44px;padding:10px;margin:10px 0;border:1px solid #aaa;border-radius:5px}.agent-row{border-top:1px solid #ddd;margin-top:16px;padding-top:12px}.agent-output:empty{display:none}

.auto-mode p{overflow-wrap:anywhere}.key-panel input,.key-once{max-width:100%;box-sizing:border-box}

.connect-prompt{width:100%;box-sizing:border-box;min-height:210px;padding:12px;border:1px solid #bbb;border-radius:6px;font:inherit;font-size:12px;line-height:1.6;resize:vertical;margin:8px 0}

.language-switch{display:flex;justify-content:flex-end;gap:10px;align-items:center;margin-bottom:22px;font-size:12px}.language-switch select{min-height:44px;padding:8px;border:1px solid #ccc;border-radius:5px;background:white;color:#251f21}

.account-id { overflow-wrap: anywhere; font-size: 0.8rem; }
