/**
 * Erlaubnisse nach § 34d und § 34i - der Profilbereich mit der Frist.
 *
 * Alle Klassen tragen den Praefix `in-erl-`. Der Bereich sitzt im Profil und
 * uebernimmt dessen Rahmen (`profile-section`); hier steht nur, was der
 * Fristkasten und die beiden Nachweiskarten brauchen.
 *
 * DIE FARBE DES KASTENS IST DIE NACHRICHT. Gruen heisst erledigt, Gelb
 * heisst „es laeuft", Rot heisst „die Stufe ist weg". Deshalb tragen alle
 * drei zusaetzlich einen eigenen Text und ein eigenes Zeichen: Wer Rot und
 * Gruen nicht unterscheiden kann, darf die Frist trotzdem nicht verpassen.
 */

.in-erl-kasten {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0 24px;
  padding: 16px 18px;
  border-radius: 10px;
  border-left: 5px solid currentColor;
  line-height: 1.55;
}

.in-erl-kasten svg {
  flex: 0 0 auto;
  margin-top: 2px;
}

.in-erl-kasten strong {
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
}

.in-erl-kasten p {
  margin: 4px 0 0;
}

.in-erl-kasten--frei {
  color: #4b5563;
  background: #f3f4f6;
}

.in-erl-kasten--erfuellt {
  color: #166534;
  background: #ecfdf3;
}

.in-erl-kasten--offen {
  color: #7a4a12;
  background: #fff8ef;
}

.in-erl-kasten--warnung {
  color: #92400e;
  background: #fef3c7;
}

.in-erl-kasten--abgelaufen {
  color: #b91c1c;
  background: #fef2f2;
}

/* Die verbleibenden Tage sind die Zahl, auf die es ankommt. */
.in-erl-rest {
  font-size: 22px;
  font-weight: 700;
}

/* ========================================
   DIE BEIDEN NACHWEISE
   ======================================== */

.in-erl-liste {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.in-erl-karte {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 10px;
  background: var(--color-surface, #ffffff);
}

.in-erl-kopf {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.in-erl-kopf h3 {
  margin: 0;
  font-size: 18px;
}

.in-erl-kopf p {
  margin: 2px 0 0;
  color: var(--color-text-secondary, #6b7280);
  font-size: 13px;
}

.in-erl-marke {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.in-erl-marke--ok {
  background: #dcfce7;
  color: #166534;
}

.in-erl-marke--offen {
  background: #fef3c7;
  color: #92400e;
}

.in-erl-erlaeuterung {
  margin: 0;
  color: var(--color-text-secondary, #6b7280);
  font-size: 13px;
  line-height: 1.5;
}

.in-erl-feld {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.in-erl-feld > span:first-child {
  font-size: 13px;
  color: var(--color-text-secondary, #6b7280);
}

.in-erl-nummer,
.in-erl-datei {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  background: #ffffff;
  font: inherit;
  color: inherit;
}

.in-erl-nummer:focus,
.in-erl-datei:focus {
  outline: 2px solid var(--in-gold, #c9a24b);
  outline-offset: 1px;
}

.in-erl-dateistand {
  font-size: 12px;
  color: var(--color-text-secondary, #6b7280);
  overflow-wrap: anywhere;
}

.in-erl-aktionen {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.in-erl-knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.in-erl-knopf:hover {
  background: #f3f4f6;
}

.in-erl-knopf--stark {
  background: #17233a;
  border-color: #17233a;
  color: #ffffff;
}

.in-erl-knopf--stark:hover {
  background: #24344f;
}

.in-erl-knopf[disabled] {
  opacity: 0.6;
  cursor: default;
}

.in-erl-fussnote {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-secondary, #6b7280);
}

@media (max-width: 600px) {
  .in-erl-liste {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ========================================
   FRISTHINWEIS AUF DER ÜBERSICHT
   ======================================== */

/* Ein Knopf und kein Kasten: Wer ihn sieht, soll ihn anklicken können und
   direkt im Profil landen. */
.home-fristbanner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin: 0 0 20px;
  padding: 16px 20px;
  border: 0;
  border-left: 5px solid #92400e;
  border-radius: 10px;
  background: #fef3c7;
  color: #92400e;
  font: inherit;
  text-align: left;
  line-height: 1.55;
  cursor: pointer;
}

.home-fristbanner:hover {
  background: #fde9a8;
}

.home-fristbanner:focus-visible {
  outline: 2px solid #92400e;
  outline-offset: 2px;
}

.home-fristbanner strong {
  font-size: 17px;
}

.home-fristbanner--rot {
  border-left-color: #b91c1c;
  background: #fef2f2;
  color: #b91c1c;
}

.home-fristbanner--rot:hover {
  background: #fde4e4;
}

/* ========================================
   REITER „NACHWEISE": ZWEI BLÖCKE, EINE SEITE
   ======================================== */

/* Erlaubnisse oben, Qualifikationen darunter. Der Abstand ist die Trennung —
   sie sind Verschiedenes: eine behördliche Zulassung mit Frist und ein
   Nachweis der Sachkunde. */
.profile-nachweise {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-nachweise > .profile-section + .profile-section {
  border-top: 1px solid var(--color-border, #e5e7eb);
  padding-top: 24px;
}
