/* ============================================================
   WBS HoSo – Stylesheet (WBS Corporate Identity)
   Font: Source Sans 3 · Material Symbols Rounded
   Marke #0071B2 · Sekundär #3C3C7D · Grün #02866E
   Rot #E51C3E · Akzent #FFE600
   ============================================================ */

:root {
  --marke:      #0071B2;
  --marke-dark: #005a8f;
  --sekundaer:  #3C3C7D;
  --gruen:      #02866E;
  --rot:        #E51C3E;
  --akzent:     #FFE600;

  --text:       #1e293b;
  --text-muted: #64748b;
  --border:     #e2e8f0;
  --bg:         #f4f6f9;
  --card:       #ffffff;

  --radius:     14px;
  --shadow:     0 1px 2px rgba(15,23,42,.06), 0 6px 18px rgba(15,23,42,.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  background-color: var(--bg);
  /* Dot-Grid-Hintergrund */
  background-image: radial-gradient(rgba(60,60,125,.10) 1px, transparent 1px);
  background-size: 22px 22px;
  min-height: 100vh;
}

.material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  line-height: 1;
}

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

h1, h2, h3 { font-weight: 700; color: var(--text); margin: 0; }

/* ---------- Header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.app-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  background: var(--marke);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 11px;
  border-radius: 10px;
  letter-spacing: .3px;
}
.brand-text strong { display: block; font-size: 16px; line-height: 1.1; }
.brand-text small { color: var(--text-muted); font-size: 12px; }

.app-nav { display: flex; gap: 4px; margin-left: 12px; }
.app-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
}
.app-nav a:hover { background: rgba(0,113,178,.08); color: var(--marke); text-decoration: none; }
.app-nav a.active { background: var(--marke); color: #fff; }

.app-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
}
.logout-link { color: var(--text-muted); display: inline-flex; }
.logout-link:hover { color: var(--rot); }

/* ---------- Layout ---------- */
.page-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 20px 60px;
}
.page-head { margin-bottom: 22px; }
.page-head h1 {
  font-size: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-head .sub { color: var(--text-muted); margin-top: 4px; font-size: 15px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.toolbar .spacer { flex: 1; }

/* ---------- Cards / Grid ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 880px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.card-body { padding: 16px 18px; }

/* ---------- Stat-Kacheln ---------- */
.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
}
.stat .ico {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.stat .ico .material-symbols-rounded { font-size: 26px; color: #fff; }
.stat .num { font-size: 28px; font-weight: 700; line-height: 1; }
.stat .lbl { color: var(--text-muted); font-size: 14px; margin-top: 2px; }
.ico-standort { background: var(--marke); }
.ico-home     { background: var(--gruen); }
.ico-praktikum{ background: var(--sekundaer); }
.ico-total    { background: #64748b; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge .material-symbols-rounded { font-size: 15px; }
.badge-standort { background: rgba(0,113,178,.12);  color: var(--marke); }
.badge-home     { background: rgba(2,134,110,.13);  color: var(--gruen); }
.badge-hybrid   { background: rgba(60,60,125,.12);   color: var(--sekundaer); }
.badge-praktikum{ background: rgba(60,60,125,.14);   color: var(--sekundaer); }
.badge-ende     { background: rgba(229,28,62,.12);    color: var(--rot); }
.badge-muted    { background: #eef2f6; color: var(--text-muted); }

/* ---------- Teilnehmer-Listen ---------- */
.person-list { display: flex; flex-direction: column; }
.person {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border);
}
.person:last-child { border-bottom: 0; }
.person .avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(60,60,125,.10);
  color: var(--sekundaer);
  font-weight: 700;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.person .who { flex: 1 1 auto; min-width: 0; }
.person .who .nm {
  font-weight: 600;
  line-height: 1.3;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.person .who .nm a { color: var(--text); }
.person .who .nm a:hover { color: var(--marke); text-decoration: none; }
.person .who .tp {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
  margin-top: 3px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.person .actions { flex-shrink: 0; display: flex; align-items: center; gap: 6px; margin-top: 1px; }
.tp.wp-dup { color: var(--rot); font-weight: 600; }
.empty-hint { color: var(--text-muted); font-size: 14px; padding: 10px 4px; }

/* ---------- Tabellen ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.table th { color: var(--text-muted); font-weight: 600; font-size: 13px; }
.table tbody tr:hover { background: rgba(0,113,178,.035); }
.table td.center, .table th.center { text-align: center; }

.cell-dot {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
}
.cell-standort { background: rgba(0,113,178,.14); color: var(--marke); }
.cell-home     { background: rgba(2,134,110,.15); color: var(--gruen); }
.cell-praktikum{ background: rgba(60,60,125,.16); color: var(--sekundaer); }
.cell-frei     { background: #e9edf3; color: #94a3b8; }

/* ---------- Formulare ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
input[type=text], input[type=email], input[type=password], select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: #fff;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--marke);
  box-shadow: 0 0 0 3px rgba(0,113,178,.15);
}
select.compact { width: auto; min-width: 150px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .12s, border-color .12s;
}
.btn:hover { text-decoration: none; }
.btn .material-symbols-rounded { font-size: 19px; }
.btn-primary { background: var(--marke); color: #fff; }
.btn-primary:hover { background: var(--marke-dark); }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: #f1f5f9; }
.btn-sm { padding: 6px 11px; font-size: 13px; }

/* ---------- Hinweise / Alerts ---------- */
.alert-box {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-info    { background: rgba(0,113,178,.10); color: var(--marke); }
.alert-success { background: rgba(2,134,110,.12); color: var(--gruen); }
.alert-warn    { background: rgba(255,230,0,.30); color: #1e293b; }
.alert-danger  { background: rgba(229,28,62,.10); color: var(--rot); }

.back-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--text-muted); font-weight: 600; font-size: 14px;
  margin-bottom: 8px;
}
.back-link:hover { color: var(--marke); text-decoration: none; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 34px 30px;
  width: 100%;
  max-width: 400px;
}
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo .mark {
  display: inline-block;
  background: var(--marke);
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  padding: 10px 16px;
  border-radius: 12px;
  margin-bottom: 12px;
}
.login-logo h1 { font-size: 18px; }
.login-logo p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

/* ---------- Footer ---------- */
.app-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
}

.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 16px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

@media (max-width: 640px) {
  .nav-label { display: none; }
  .brand-text small { display: none; }
  .app-footer { flex-direction: column; gap: 8px; }
}
