/* ══════════════════════════════════════════════════════════════
   KC Intern – Kachel-Navigation & Startseite
   ══════════════════════════════════════════════════════════════ */

/* ── Shell ───────────────────────────────────────────────────── */
#kc-shell {
  min-height: 100vh;
  background: var(--bg);
}

#kc-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* ── Startseite ──────────────────────────────────────────────── */
.kc-start {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Kacheln-Grid ────────────────────────────────────────────── */
.kc-kacheln-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-auto-rows: 1fr;   /* alle Kacheln einer Ansicht gleich hoch */
  gap: 14px;
}

/* Kleinere Variante für Unterseiten (z.B. Stempeluhr) */
.kc-kacheln-klein { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.kc-kacheln-klein .kc-kachel { min-height: 0; padding: 16px; }
.kc-kacheln-klein .kc-kachel-icon { width: 38px; height: 38px; }
.kc-kacheln-klein .kc-kachel-icon svg { width: 20px; height: 20px; }
.kc-kacheln-klein .kc-kachel-titel { margin-top: 12px; font-size: 15px; }

/* Abschnitts-Überschrift (z.B. "Verwaltung") */
.kc-sektion {
  margin: 28px 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.kc-sektion::after { content: ''; flex: 1; height: 1px; background: var(--border2); }

/* ── Einzelne Kachel ─────────────────────────────────────────── */
/* Eckig mit Schatten (wie der Webshop); Farbe je Bereich über --kc-farbe */
.kc-kachel {
  --kc-farbe: var(--accent);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
  padding: 20px;
  cursor: pointer;
  transition: border-color .15s, transform .12s, box-shadow .15s;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 118px;
}

.kc-kachel:hover {
  border-color: var(--kc-farbe);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .14);
}

.kc-kachel:active { transform: translateY(0); }

.kc-kachel-icon {
  width: 48px;
  height: 48px;
  background: var(--kc-farbe);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.kc-kachel-icon svg { width: 26px; height: 26px; }

.kc-kachel-titel {
  margin-top: 16px;   /* fester Abstand → Titel aller Kacheln auf einer Linie */
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--text);
}

.kc-kachel-sub {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
}

.kc-kachel-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Zurück-Button ───────────────────────────────────────────── */
/* Gleiche Höhe, Fläche und Rahmen wie der Menü-Knopf daneben, Pfeil als Icon */
.kc-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px 0 10px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .10);
  cursor: pointer;
  color: var(--text);
  transition: border-color .15s, color .15s;
}
.kc-back-btn svg { width: 17px; height: 17px; }

.kc-back-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .kc-kacheln-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .kc-kachel {
    min-height: 118px;
    padding: 14px;
  }
  .kc-kachel-icon { width: 40px; height: 40px; }
  .kc-kachel-icon svg { width: 22px; height: 22px; }
  .kc-kachel-titel { margin-top: 14px; font-size: 15px; }
  .kc-kachel-sub { font-size: 11.5px; }
  .kc-sektion { margin-top: 22px; }
}

@media (max-width: 360px) {
  .kc-kacheln-grid { grid-template-columns: 1fr 1fr; }
}

.kc-logo {
  font-family: var(--sans);
  font-size: 18px;
  color: #ffffff;
  letter-spacing: .12em;
  font-weight: 700;
  text-transform: uppercase;
}

/* ── Globaler Content-Container ─────────────────────────────── */
#kc-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px;
  width: 100%;
}

/* Alle direkten View-Divs zentrieren */
#main-content > div,
.kc-seite {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

/* Header immer volle Breite */
#main-content > div > div[style*="100vw"] {
  max-width: none !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
}
/* ── Header volle Breite ─────────────────────────────────────── */

#main-content { overflow: visible !important; }

.main { overflow: visible !important; }

#kc-content,
#main-content,
.main {
  overflow-x: visible !important;
}

#main-content {
  max-width: 100%;
  padding: 0;
}

#main-content > div {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 20px 16px;
}

/* ── Knöpfe in der Kopfzeile (Hilfe, Menü) ──────────────────── */
.kc-kopf-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  background: #333;
  border: 1px solid #555;
  color: #ddd;
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
}
.kc-kopf-btn:hover { border-color: var(--accent); color: #fff; }
.kc-kopf-icon { width: 16px; height: 16px; display: inline-flex; }
.kc-kopf-icon svg { width: 16px; height: 16px; }

/* ── Burger Overlay ──────────────────────────────────────────── */
#kc-burger-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 1000;
}

#kc-burger-menu {
  position: fixed;
  left: var(--burger-left, 0px);
  top: var(--burger-top, 40px);
  width: 260px;
  max-height: 80vh;
  background: #1a1a1a;
  padding: 16px;
  overflow-y: auto;
  box-shadow: 2px 2px 12px rgba(0,0,0,.4);
  z-index: 1001;
}

.kc-burger-items {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kc-burger-items button {
  background: none;
  border: none;
  color: #cccccc;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  font-family: var(--sans);
  border-radius: 0;
  transition: background .1s;
}

.kc-burger-items button:hover {
  background: #2a2a2a;
  color: #ffffff;
}
.kc-burger-items button { display: flex; align-items: center; gap: 10px; }
.kc-menu-icon {
  width: 24px; height: 24px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
}
.kc-menu-icon svg { width: 15px; height: 15px; }

/* ── Offene Anträge Leiste ───────────────────────────────────── */
.kc-offen-item {
  display: inline-block;
  font-size: 13px;
  color: var(--text);
  padding: 2px 10px;
  margin: 2px 0;
  background: var(--bg2);
  border: 1px solid var(--border2);
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.kc-offen-item:hover {
  color: var(--accent);
  border-color: var(--accent);
}
