/* systemmap · briefings.css
 * ════════════════════════════════════════════════════════════════════
 * Das Briefing-Archiv.
 *
 * Eine Karte je Briefing, weil ein Archiv zum Blaettern da ist und
 * nicht zum Abarbeiten -- anders als die Pruefstrecke, die Zeilen
 * traegt. Was auf der Karte steht, ist genau das, woran man ein
 * Briefing wiedererkennt: Datum, Titel, ein Satz.
 *
 * TERRA MARKIERT WIE UEBERALL IM HAUS GENAU EINE SACHE: etwas, das
 * noch nicht beim Kunden ist. Der Entwurf traegt es, der versaeumte
 * Versand traegt es. Gruen ist veroeffentlicht. Mehr Farben gibt es
 * nicht, und eine sechste Bedeutung kommt nicht dazu.
 *
 * Radien nach Hausregel: Belege 2px, Bedienelemente 8px, Karten 18px.
 */

[hidden] { display: none !important; }

.bf__gruppen { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 16px; }

/* ── Die Karten ───────────────────────────────────────────────────── */
.bf__gitter {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  align-items: start;
}

.bf__karte {
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--panel); overflow: hidden;
  display: flex; flex-direction: column;
}
/* Ein Entwurf ist gestrichelt: dieselbe Form, die im Ausfuhrdesk
   "nicht aus der Quelle" heisst -- hier "noch nicht beim Kunden". */
.bf__karte--entwurf { border-style: dashed; border-color: var(--terra); }

.bf__oeffnen {
  display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px;
  width: 100%; text-align: left; align-items: start;
  padding: 16px 18px; background: none; border: 0; cursor: pointer;
  font: inherit; color: inherit;
}
.bf__oeffnen:hover { background: var(--hover); }
.bf__oeffnen:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }

/* Das Kuerzel steht fuer die Datei, nicht fuer den Inhalt: gruen, wenn
   sie sich hier lesen laesst, still, wenn nicht. Das ist eine ehrliche
   Auskunft vor dem Klick. */
.bf__typ {
  display: grid; place-items: center;
  width: 46px; height: 54px; border-radius: 2px;
  background: var(--green); color: #FFFFFF;
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .06em;
}
.bf__typ--fremd {
  background: var(--panel); color: var(--dim);
  border: 1px dashed var(--line);
}

.bf__karte__haupt { min-width: 0; }
.bf__karte__kopf {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; margin-bottom: 5px;
}
.bf__datum {
  font-family: var(--mono); font-size: 11px; color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.bf__fuer {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  border-radius: 2px; padding: 2px 6px;
  background: var(--hover); color: var(--dim);
}
.bf__byte { font-family: var(--mono); font-size: 10.5px; color: var(--dim); margin-left: auto; }

.bf__titel {
  display: block;
  font-family: var(--serif, Merriweather, Georgia, serif);
  font-size: 15.5px; font-weight: 700; line-height: 1.35;
}
.bf__kurz {
  display: block; margin-top: 5px;
  font-size: 13px; line-height: 1.5; color: var(--dim);
}

.bf__zustaende { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 9px; }
.bf__zustand {
  font-family: var(--mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 2px; padding: 2px 6px;
  color: var(--dim);
}
.bf__zustand--entwurf { color: var(--terra); border-color: var(--terra); border-style: dashed; }
.bf__zustand--raus { color: var(--sttext-green, #2E6B32); border-color: #C3D6C0; }
.bf__zustand--warn { color: var(--terra); border-color: var(--terra); }
.bf__zustand--weg { color: var(--dim); border-style: dashed; }

.bf__karte__tat {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  padding: 0 18px 16px; margin-top: -2px;
}
.bf__karte__tat .btn-primary, .bf__karte__tat .btn-quiet { font-size: 10.5px; }

.bf__sag {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--dim);
}

/* ── Der Leseplatz ────────────────────────────────────────────────── */
.bf__rahmen {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: var(--hover);
}
.bf__rahmen iframe {
  display: block; width: 100%; height: 78vh; min-height: 420px; border: 0;
}
.bf__unten {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin: 12px 0 0;
}
.bf__hinweis { font-size: 12.5px; color: var(--dim); }

/* Eine Datei, die sich hier nicht lesen laesst, bekommt eine ehrliche
   Auskunft und keinen leeren Rahmen. */
.bf__kein {
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  border: 1px dashed var(--terra); border-radius: 8px; padding: 20px;
}
.bf__kein b { font-size: 15px; }
.bf__kein span { font-size: 13.5px; line-height: 1.6; color: var(--dim); max-width: 62ch; }

/* ── Der Schreibtisch ─────────────────────────────────────────────── */
.bf__form { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.bf__row { display: flex; gap: 12px; flex-wrap: wrap; }
.bf__row .bf__field { flex: 1 1 220px; }
.bf__field { display: flex; flex-direction: column; gap: 4px; }
.bf__field .meta { font-size: 11px; }
.bf__hint { margin: 0; font-size: 12.5px; color: var(--dim); line-height: 1.55; max-width: 72ch; }
.bf__tat { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* .input steht in keiner Hausvorlage -- die Regel gehoert nach
   werter-controls.css, sobald diese Datei zu einer Lieferung gehoert.
   Bis dahin hier, mit denselben Werten wie .select. */
.bf__form .input, .bf__brief .input {
  font: inherit; font-size: 14px; color: var(--text);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; min-height: 38px; width: 100%;
}
.bf__form textarea.input, .bf__brief textarea.input { resize: vertical; line-height: 1.55; }

/* ── Das Anschreiben ──────────────────────────────────────────────── */
.bf__brief {
  border: 1px solid var(--line); border-radius: 18px;
  padding: 18px; margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 12px; max-width: 760px;
}
.bf__brief__kopf { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bf__brief__name {
  font-family: var(--serif, Merriweather, Georgia, serif);
  font-size: 16px; font-weight: 700; margin: 0;
}
.bf__brief__slug { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.bf__brief__text { font-family: var(--mono); font-size: 12.5px; }

.bf__leer { color: var(--dim); font-size: 13.5px; margin: 0; }

.bf__melde { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; }
.bf__melde:empty { display: none; }
.bf__melde--gut {
  background: #E9F0E8; color: var(--sttext-green, #2E6B32);
  border-radius: 2px; padding: 8px 10px;
}
.bf__melde--schlecht {
  background: var(--st-red, #F6E6E4); color: var(--sttext-red, #9B2C22);
  border-radius: 2px; padding: 8px 10px;
}

@media (max-width: 460px) {
  .bf__gitter { grid-template-columns: 1fr; }
  .bf__rahmen iframe { height: 60vh; }
}
