/*-------------------------------------
      Formatierung Körper (BODY)
-------------------------------------*/
body {
  background-color: black;     /* dunkler Hintergrund */
  color: white;                /* Standardtextfarbe */

  /* NEU: Flexbox für horizontale Zentrierung von <main> */
  /*display: flex;                body wird zum Flex-Container */
  /*justify-content: center;     /* <main> wird horizontal mittig ausgerichtet */
  
  /* optional, falls du es auch vertikal zentrieren willst:
     align-items: center;
     min-height: 100vh;
  */

  margin: 0;                   /* entfernt Standardabstände des Browsers */
  padding: 0;
}

/*-------------------------------------
      Hauptbereich (MAIN)
-------------------------------------*/
main {
  text-align: center;          /* Inhalt (z. B. Überschriften) zentrieren */
  max-width: 80em;             /* maximale Breite auf großen Bildschirmen */
  width: 100%;                 /* auf mobilen Geräten volle Breite */
  margin: 0 auto;              /* zusätzliche Absicherung für Browser ohne Flex-Unterstützung */
  
  /* Grid-Layout bleibt wie gehabt */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20em, 1fr));
  gap: 0.5em;                   /* Abstand zwischen den Grid-Elementen */

  padding: 1rem;               /* etwas Innenabstand zum Rand */
  box-sizing: border-box;      /* Padding zählt in die Breite hinein */
}

/*--------------------------------------
      Formatierung Kacheln
-------------------------------------*/

.partner {
  grid-column: 1/-1;
  background-color: black;
  border: 0.2rem solid white;   /* etwas klarere, sichtbare Umrandung */
  border-radius: 0.5em;
}

.stunden-app {
  background: blueviolet;
  border: 0.2rem solid white;
  border-radius: 0.5em;
}

.finanz-app {
  background-color: purple;
  text-align: center;
  border: 0.2rem solid white;
  border-radius: 0.5em;
}

.migraene-app {
  background-color: blue;
  text-align: center;
  border: 0.2rem solid white;
  border-radius: 0.5em;
}

.urlaubs-app {
  background-color: #0f766e;
  text-align: center;
  border: 0.2rem solid white;
  border-radius: 0.5em;
}

.user-app {
  background-color: darkblue;
  text-align: center;
  border: 0.2rem solid white;
  border-radius: 0.5em;
}

.kachel-start.help-app {
  background-color: #24405f;
  text-align: center;
  border: 0.2rem solid white !important;
  border-radius: 0.5em;
}

.kachel-start {
  position: relative;
  min-height: 9rem;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.kachel-start > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: inherit;
  height: 100%;
  padding: 1rem;
  box-sizing: border-box;
  color: white;
  text-decoration: none;
}

.kachel-start > a > div {
  width: 100%;
}

.kachel-start h3,
.kachel-start p {
  margin-left: auto;
  margin-right: auto;
}

.kachel-start:focus-within {
  outline: 0.18rem solid #facc15;
  outline-offset: 0.2rem;
}

section,
.v-webapp {
  background-color: black;
  grid-column: 1/-1;
  border:0.2em solid white;
  border-radius: 0.5em;
}


.v-stunden,
.v-finanz,
.k-stunden {
  
  background-color: black;
  border: 0.2rem solid white;
  border-radius: 0.5em;
}
.kachel-start > a:hover,
.kachel-start > a:focus {
  text-decoration: none;
  color: white;
  background: green;
}

.kachel-start:hover,
.kachel-start:focus-within {
  transform: translateY(-0.12rem);
  box-shadow: 0 0.8rem 1.5rem rgba(0, 0, 0, 0.35);
}


/*-------------------------------------
      Allgemeine Layout-Elemente
-------------------------------------*/
.navi {
  grid-column: span;
  border: 0.2em solid white;
}
.navi-i {
  display: flex;
  font-size: 1rem;
}

.feld {
  grid-column: 1/-1;
  border:  0.2em solid white;
}

.uebersicht {
  grid-column: 1/-1;
}

.kachel-summe,
.kachel-plus,
.kachel-minus,
.kachel-stunden {
  border: 0.2rem solid white;
}


#kachel-sum {
  border: 0.2rem solid white;
}



.kachel-stunden {
  display: block;
  grid-column: 1/-1;
  border: 0.2rem solid white;
}

/*-------------------------------------
      Formatierung Inhalt
-------------------------------------*/

a {
  color: wheat;
}

.ueberschrift {
  grid-column: 1/-1;
  text-align: center;
}

.webapp-notice {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
  background: #1c2028;
  color: #fff;
  border: .18rem solid #ffd166;
  border-radius: .5rem;
  padding: .85rem 1rem;
  text-align: center;
}

.webapp-notice strong {
  color: #ffd166;
}

.webapp-notice a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: .45rem .8rem;
  border-radius: .4rem;
  background: #ffd166;
  color: #111827;
  text-decoration: none;
  font-weight: 800;
}

.webapp-notice a:hover,
.webapp-notice a:focus-visible {
  background: #ffe08a;
  color: #000;
  outline: .18rem solid #facc15;
  outline-offset: .12rem;
}

.formulare {
  background-color: black;
}

/* Tabelle standardmäßig ausgeblendet (auf kleinen Geräten) */
.table-s {
  display: none;
}

/*-------------------------------------
      Medien-Umschalter (Responsive Design)
-------------------------------------*/





@media (min-width: 62em) {
  main {
    font-size: 1.4rem;         /* etwas größere Schrift am PC */
  }

.desktop-nein {
  display: none;
  }

  .kachel-stunden {
    display: none;
  }

  /* Tabelle wird am PC sichtbar */
  .table-s {
    display: table;
    grid-column: 1/-1;
  }
}

/*-------------------------------------
      Tabellen-Layout
-------------------------------------*/
table {
  border-collapse: collapse;
  width: 100%;

}
th, td {
  border: 0.1em solid #bbb;
  padding: 1em 1em;
  text-align: right;
}
th {
  background: black;
  text-align: center;
}








.k-migraene {
  border: 0.5em solid white;
    background: black;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.k-migraene h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
.display-4, .display-6 {
    font-size: 1.5rem;
    margin: 0.2rem 0 0.4rem;
}
.k-smalltext {
    font-size: 0.9rem;
    color: #555;
}
.text-danger { color: #c0392b; }
.text-success { color: #1f7a4d; }

.k-grid {
    display: grid;
    grid-template-columns: repeat(1,1fr);
    gap: 1rem;
}
@media (min-width: 700px) {
    .k-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1000px) {
    .k-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


.profil-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
}

/* farbiges Symbol im Kreis */
.geschlecht-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
}

/* Farben je nach Geschlecht */
.geschlecht-maennlich {
    background: #2196f3;   /* Blau */
}
.geschlecht-weiblich {
    background: #e91e63;   /* Pink */
}
.geschlecht-divers {
    background: #9c27b0;   /* Lila */
}
.geschlecht-keine_angabe {
    background: #9e9e9e;   /* Grau */
}

/* nur für Screenreader sichtbar, optisch versteckt */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}


/* -------------------------------------------------------------
   Grid mittig ausrichten (dein Problem: links "klebend")
------------------------------------------------------------- */
.k-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    justify-content: center; /* Zentriert die Spalten */
}

/* Karten nicht endlos breit */
.k-migraene {
    max-width: 460px;
    margin: 0 auto; /* Zentriert einzelne Karten */
}

/* Tagesmedikation-Liste */
.k-med-list {
    margin: 0.3rem 0 0.2rem;
    padding-left: 1.1rem;
    font-size: 0.9rem;
}
.k-med-list li {
    margin: 0.15rem 0;
}

/* Trennlinie in Kachel */
.k-divider {
    border: 0;
    border-top: 1px solid rgba(0,0,0,0.12);
    margin: 0.6rem 0;
}

/* Kleine Zeile in Kachel */
.k-smallnote {
    font-size: 0.85rem;
    opacity: 0.85;
}
