/* © MK_Kasi · Projekt-Manager · Layout */

/* ============================================================
   APP-HÜLLE
   ============================================================ */

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   HEADER (sticky)
   ============================================================ */

header {
  border-bottom: 1px solid var(--border);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11,12,15,0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.logo-texte {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-mark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.logo-mark::before {
  content: '◢ ';
  color: var(--c-knx);
}
.logo-tag {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 3px;
}

/* Rechte Seite des Headers: Aktionen + Settings-Button */
.header-rechts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

#header-aktionen {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Settings-Button (9-Punkte-Grid) */
.btn-settings-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
  -webkit-appearance: none;
}
.btn-settings-toggle:hover {
  background: var(--surface-2);
  border-color: var(--border);
}
.btn-settings-toggle.aktiv {
  background: var(--surface-2);
  border-color: var(--c-knx);
}

/* 3×3 Punkt-Grid-Icon */
.dot-grid {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  gap: 3px;
}
.dot-grid span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-dim);
  display: block;
  transition: background 0.15s ease, transform 0.2s ease;
}
.btn-settings-toggle:hover .dot-grid span,
.btn-settings-toggle.aktiv .dot-grid span {
  background: var(--c-knx);
}
.btn-settings-toggle.aktiv .dot-grid span {
  animation: dotWiggle 0.35s ease;
}

/* ============================================================
   HAUPTBEREICH
   ============================================================ */

main {
  flex: 1;
  padding: 32px 24px 60px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================================
   STARTBILDSCHIRM: HERO
   ============================================================ */

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: normal;
  color: var(--c-knx);
}
.hero p {
  color: var(--text-dim);
  margin-top: 12px;
  max-width: 520px;
  font-size: 15px;
}
.hero-aktionen {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

/* ============================================================
   PROJEKT-GRID (Startbildschirm)
   ============================================================ */

.projekt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* ============================================================
   PROJEKTANSICHT: PROJEKT-HEADER-LEISTE
   ============================================================ */

.projekt-kopf {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.projekt-kopf h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1;
  letter-spacing: -0.02em;
  word-break: break-word;
}
.projekt-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ============================================================
   RESPONSIVE: MOBIL
   ============================================================ */

@media (max-width: 640px) {
  header {
    padding: 10px 16px;
  }
  main {
    padding: 20px 16px 40px;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero-aktionen {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .kategorie-auswahl {
    grid-template-columns: 1fr;
  }
  .modal {
    padding: 20px;
  }
  .modal-aktionen {
    flex-direction: column-reverse;
  }
  .modal-aktionen .btn {
    width: 100%;
    justify-content: center;
  }
}
