/* ==========================  GRUNDLAYOUT  ============================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }
body {
  font-family: var(--schrift);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--grund);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--rot); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 21px; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }

code, kbd, pre { font-family: var(--schrift-fix); font-size: 12.5px; }

::selection { background: var(--rot); color: #fff; }

/* ---- Anmeldung -------------------------------------------------------- */

#anmeldung {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(192,57,43,.20), transparent 60%),
    linear-gradient(160deg, var(--nav), var(--nav-2));
}
.anmeldekarte {
  width: 100%; max-width: 380px;
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: 14px;
  box-shadow: var(--schatten-hoch);
  padding: 28px 26px 24px;
}
.marke { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.marke .punkt {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: linear-gradient(140deg, var(--rot-hell), var(--rot-dunkel));
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px;
}
.marke strong { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }

/* ---- Rahmen der App --------------------------------------------------- */

#app { display: none; min-height: 100vh; }
#app.an { display: block; }

.kopf {
  position: sticky; top: 0; z-index: 30;
  height: var(--kopf-hoehe);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  background: var(--nav);
  color: var(--text-invers);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.kopf .marke strong { color: #fff; }
.kopf .luecke { flex: 1; }

.rumpf { display: flex; align-items: flex-start; }

.seitenleiste {
  position: sticky; top: var(--kopf-hoehe);
  width: var(--nav-breite); flex: none;
  height: calc(100vh - var(--kopf-hoehe));
  overflow-y: auto;
  background: var(--nav-2);
  border-right: 1px solid rgba(255,255,255,.06);
  padding: 14px 10px;
}
.seitenleiste .abschnitt {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.38); padding: 14px 10px 6px;
}
.navlink {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-kl);
  color: var(--nav-text); font-size: 13.5px; cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
  font-family: inherit;
}
.navlink:hover { background: rgba(255,255,255,.07); color: var(--nav-aktiv); text-decoration: none; }
.navlink.aktiv { background: var(--rot); color: #fff; }
.navlink .zeichen { width: 18px; text-align: center; flex: none; }
/* Punkt an «Verwaltung»: im Projektordner liegt eine neue Version */
.navlink { position: relative; }
.navlink .neuerstand {
  position: absolute; top: 7px; right: 8px; width: 8px; height: 8px;
  border-radius: 50%; background: #f5a623; box-shadow: 0 0 0 2px var(--nav-2);
}

.inhalt { flex: 1; min-width: 0; padding: 22px 26px 60px; max-width: 1400px; }

/* ---- Werkzeugmodus -----------------------------------------------------
   Ein Werkzeug im Rahmen braucht jeden Millimeter. Darum schrumpft die
   Seitenleiste dort auf eine Zeichenspalte und der Inhalt verliert seine
   Ränder und die Breitenbegrenzung. Der Knopf im Kopf holt die Leiste
   wieder hervor; die Wahl wird gemerkt.                                   */

.seitenleiste.schmal { width: 54px; padding: 14px 7px; }
.seitenleiste.schmal .navlink { justify-content: center; padding: 9px 0; gap: 0; }
.seitenleiste.schmal .navlink span:not(.zeichen) { display: none; }
.seitenleiste.schmal .navlink .zeichen { width: auto; font-size: 16px; }
.seitenleiste.schmal .navlink span.neuerstand { display: block; top: 4px; right: 6px; }
/* In der Zeichenspalte ist für «TOOLS» und «KONTO» kein Platz - ein
   Trennstrich sagt dasselbe und stiehlt keine Zeile. */
.seitenleiste.schmal .abschnitt {
  font-size: 0; padding: 0; margin: 10px 6px;
  border-top: 1px solid rgba(255,255,255,.12);
}

#app.werkzeug .inhalt { padding: 0; max-width: none; }

/* Der Streifen über dem Werkzeug wird im Werkzeugmodus flacher - er sagt
   dasselbe, nimmt aber eine Zeile statt zwei. */
#app.werkzeug .projektbalken {
  margin: 0; border-radius: 0; border-left: 0; border-top: 0; border-right: 0;
  padding: 7px 14px; gap: 10px;
}
#app.werkzeug .projektbalken .wer { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
#app.werkzeug .projektbalken .nr { font-size: 13.5px; }
#app.werkzeug .projektbalken .hinweis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#app.werkzeug .werkzeugrahmen {
  border: 0; border-radius: 0;
  height: calc(100vh - var(--kopf-hoehe) - 39px);
}
/* Werkzeuge mit eigener Kopfzeile: kein Streifen darüber, also die ganze Höhe. */
#app.werkzeug .werkzeugrahmen.voll { height: calc(100vh - var(--kopf-hoehe)); }
#app.werkzeug .meldung ~ .werkzeugrahmen.voll { height: calc(100vh - var(--kopf-hoehe) - 42px); }
#app.werkzeug .meldung { margin: 0; border-radius: 0; border-left: 0; border-right: 0; }
#app.werkzeug .meldung ~ .werkzeugrahmen { height: calc(100vh - var(--kopf-hoehe) - 39px - 42px); }

.seitenkopf {
  display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.seitenkopf .unter { color: var(--text-2); font-size: 13px; margin-top: 2px; }

#menuKnopf { display: none; }

@media (max-width: 820px) {
  #menuKnopf { display: inline-flex; }
  #navKnopf { display: none; }
  .seitenleiste.schmal { width: var(--nav-breite); padding: 14px 10px; }
  .seitenleiste.schmal .navlink { justify-content: flex-start; padding: 9px 10px; gap: 10px; }
  .seitenleiste.schmal .navlink span:not(.zeichen) { display: inline; }
  .seitenleiste.schmal .abschnitt { padding: 14px 10px 6px; text-align: left; font-size: 11px; }
  .seitenleiste {
    position: fixed; left: 0; top: var(--kopf-hoehe); z-index: 25;
    transform: translateX(-100%); transition: transform .18s ease;
    box-shadow: var(--schatten-hoch);
  }
  .seitenleiste.offen { transform: none; }
  .inhalt { padding: 16px 14px 48px; }
}
