/* =============================================
   Gleisgeometrie — das Blatt (Papier, DESIGN.md Regel 10): Kopf, Kurzkopf, Tabelle, Unterschriften und Fußzeile der
   Vorlagen in gg-vorlage.js. Papier hat eigene Farben und bleibt im Druck, wie es ist; was gleich ist, kommt aus den
   Werten des Papiers (--papier-…, design.css).
   ============================================= */

.gg-inner {
  display: flex;
  box-sizing: border-box;
  flex-direction: column;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 13mm 13mm 16mm;
  overflow: hidden;
  color: #111;
  font-family: var(--papier-schriftart);
  font-size: 10pt;
  user-select: text;
}

/* Titel */
.gg-title { margin-bottom: 2px; font-size: 14pt; font-weight: 700; text-align: center; }
.gg-title--kurz { margin-bottom: 2mm; font-size: 11pt; }
.gg-sub { margin-bottom: 8mm; color: var(--papier-hell); font-size: 8pt; text-align: center; }

/* Kopf-Felder */
.gg-kz { display: flex; align-items: baseline; margin-bottom: 2.5mm; }
.gg-kz-last { margin-bottom: 6mm; }
.gg-kl { flex-shrink: 0; padding-right: 3px; font-size: 9pt; white-space: nowrap; }
.gg-ki {
  flex: 1; min-width: 0; padding: 0 3px;
  border: none; border-bottom: 1px solid var(--papier-hell); border-radius: 0; background: transparent; outline: none;
  color: #111; font-family: var(--papier-schriftart); font-size: 9pt;
}
.gg-kg { flex-shrink: 0; width: 9mm; }

/* Kurzkopf (Folgeseiten) */
.gg-kurz { display: flex; flex-wrap: wrap; gap: 8mm; margin-bottom: 2mm; font-size: 8.5pt; }
.gg-kurz-rule { margin-bottom: 4mm; border-top: 1.5px solid var(--papier-leise); }

/* Tabelle */
.gg-tbl-title { margin-bottom: 2px; font-size: 10pt; font-weight: 700; text-align: center; }
.gg-tbl { width: 100%; margin-bottom: 5mm; border-collapse: collapse; font-size: 8.5pt; table-layout: fixed; }
.gg-tbl th, .gg-tbl td { padding: 0; border: 1px solid var(--papier-hell); vertical-align: middle; }
.gg-tbl thead th { padding: 3px 4px; font-size: 8.5pt; font-weight: 700; text-align: center; }
.gg-tbl thead th.gg-sub-th { padding: 2px 3px; background: #f2f2f2; font-size: 8pt; font-weight: 600; }
.gg-tbl thead th.gg-nr-th { padding: 2px 1px; font-size: 7pt; }   /* „Schwelle“ passt in 13 mm nur kleiner */
.gg-tbl .gg-td-mid { border-right: 2px solid var(--papier-leise); }
.gg-td-nr { height: 7mm; padding: 0 2px; color: var(--papier-leise); font-size: 8pt; text-align: center; }
.gg-cell-inp {
  display: block; width: 100%; height: 7mm; padding: 1px 2px;
  border: none; border-radius: 0; background: transparent; outline: none;
  color: #111; font-family: var(--papier-schriftart); font-size: 8.5pt; text-align: center;
}
.gg-cell-inp.ok, .gg-calc.ok { color: #1a6e38; font-weight: 600; }
.gg-cell-inp.nok, .gg-calc.nok { color: #c00000; font-weight: 600; }
.gg-cell-inp.gg-cell-text { padding-left: 4px; text-align: left; }
.gg-cell-inp::placeholder { color: #bbb; }
.gg-td-calc { background: #fafafa; text-align: center; }
.gg-calc { color: var(--papier-leise); font-size: 8.5pt; font-variant-numeric: tabular-nums; }

/* Unterschriften */
.gg-ug-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm 8mm; }
.gg-ug-section { margin-bottom: 1px; font-size: 8pt; font-weight: 700; }
.gg-ug-row { display: flex; align-items: baseline; }
.gg-ug-lbl { flex-shrink: 0; font-size: 8pt; white-space: nowrap; }
.gg-ug-inp {
  flex: 1; min-width: 0; padding: 0 2px;
  border: none; border-bottom: 1px solid var(--papier-hell); border-radius: 0; background: transparent; outline: none;
  color: #111; font-family: var(--papier-schriftart); font-size: 8pt;
}

/* Fußzeile: immer am Seitenende */
.gg-foot {
  display: flex; justify-content: space-between;
  position: absolute; right: 13mm; bottom: 9mm; left: 13mm;
  padding-top: 2mm; border-top: 1px solid var(--papier-leise);
  color: var(--papier-hell); font-size: 7pt;
}
.gg-foot-mid { flex: 1; text-align: center; }
