/* =========================================================
   ProductPilot — Ergänzungen zum ecosion.de-Stylesheet
   style.css bleibt unverändert; hier liegt nur, was die
   Website nicht kennt (Formularfelder, Meldungen, Tabelle).
   Alle Farben und Schriften kommen aus den Tokens in style.css.
   ========================================================= */

/* ---------- Kopfbereich ---------- */
.app-hero {
  padding-top: clamp(40px, 6vw, 88px);
}
.app-hero__title {
  margin: 18px 0 0;
  font-size: clamp(2.5rem, 7.2vw, 6.4rem);
  font-weight: 750;
  line-height: 0.94;
  letter-spacing: -0.045em;
}
.app-hero__title .ln {
  display: block;
}
.section--app {
  padding-top: clamp(56px, 7vw, 96px);
}
#main {
  padding-bottom: clamp(72px, 9vw, 128px);
}
[tabindex="-1"]:focus {
  outline: none;
}

/* ---------- Meldungen ---------- */
.notice {
  margin: clamp(28px, 4vw, 48px) 0 0;
  padding: 14px 18px;
  border: 1px solid var(--ink);
  border-left: 6px solid var(--marker);
  background: var(--sheet);
  font-size: 16px;
}
.notice--error {
  border-left-color: var(--pen);
}

/* ---------- Formular ---------- */
.sheet__bar--plain .sheet__title {
  border-bottom: 0;
}
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule-soft);
}
.f {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 18px 24px 22px;
  background: var(--sheet);
}
.f--wide {
  grid-column: 1 / -1;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background-color: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  transition: background-color 0.2s, box-shadow 0.2s;
}
.textarea {
  min-height: 112px;
  resize: vertical;
}
.input::placeholder,
.textarea::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
.input:focus,
.textarea:focus,
.select:focus,
.file:focus-visible {
  outline: none;
  background-color: var(--sheet);
  box-shadow: 0 0 0 3px var(--marker);
}
.select {
  padding-right: 38px;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23121212' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}

.file {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--ink);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  transition: background-color 0.2s, box-shadow 0.2s;
}
.file::file-selector-button {
  height: 36px;
  margin-right: 14px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font: 600 14px var(--sans);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.file::file-selector-button:hover {
  background: var(--marker);
  color: var(--ink);
}

/* ---------- Fußleiste mit Button und Wartezustand ---------- */
.sheet__foot {
  flex-wrap: wrap;
  padding: 16px 20px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}
.busy {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}
.busy[hidden] {
  display: none;
}
.busy__bar {
  position: relative;
  width: 96px;
  height: 3px;
  overflow: hidden;
  background: var(--rule-soft);
}
.busy__bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 36%;
  background: var(--ink);
  animation: busy 1.1s var(--ease) infinite;
}
.is-busy .btn[type="submit"] {
  opacity: 0.55;
  pointer-events: none;
}
@keyframes busy {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(280%);
  }
}

/* ---------- Ausgabe (Markdown der KI) ---------- */
.prose {
  padding: 26px 28px 20px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.prose > :first-child {
  margin-top: 0;
}
.prose > :last-child {
  margin-bottom: 0;
}
.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  margin: 22px 0 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.prose p {
  margin: 0 0 12px;
}
.prose strong {
  font-weight: 700;
  color: var(--ink);
}
.prose ol,
.prose ul {
  margin: 0 0 14px;
  padding-left: 22px;
}
.prose ul {
  list-style: square;
}
.prose li {
  margin-bottom: 10px;
  padding-left: 4px;
}
.prose li > p {
  margin-bottom: 6px;
}
.prose li > :last-child {
  margin-bottom: 0;
}
.prose li > ul,
.prose li > ol {
  margin-top: 6px;
}
.prose table {
  width: 100%;
  margin: 0 0 14px;
  border-collapse: collapse;
  font-size: 15px;
}
.prose th,
.prose td {
  padding: 8px 10px;
  border: 1px solid var(--rule-soft);
  text-align: left;
}
.prose li::marker {
  font-family: var(--mono);
  font-size: 0.85em;
  color: var(--muted);
}
.prose hr {
  margin: 20px 0;
  border: 0;
  border-top: 1px solid var(--rule-soft);
}
.prose--cell {
  padding: 0;
  font-size: 15px;
}

/* ---------- CSV-Verarbeitung ---------- */
.job {
  padding: 22px 24px 24px;
  border-bottom: 1px solid var(--rule-soft);
}
.job__count {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 12px;
}
.progress {
  height: 6px;
  background: var(--rule-soft);
}
.progress i {
  display: block;
  width: calc(var(--p, 0) * 100%);
  height: 100%;
  background: var(--ink);
  transition: width 0.5s var(--ease);
}

.table-wrap {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.table th {
  padding: 14px 20px 10px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.table td {
  padding: 18px 20px 18px 0;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}
.table th:first-child,
.table td:first-child {
  padding-left: 24px;
}
.table th:last-child,
.table td:last-child {
  padding-right: 24px;
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.table__text {
  min-width: 420px;
}

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 720px) {
  .form {
    grid-template-columns: 1fr;
  }
  .f {
    padding: 16px;
  }
  .prose {
    padding: 20px 16px 16px;
  }
  .sheet__foot .actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    margin-left: 0;
  }
  .sheet__foot .btn {
    justify-content: center;
  }
  .table__text {
    min-width: 300px;
  }
  .job {
    padding: 18px 16px 20px;
  }
}
