* { box-sizing: border-box; }

body {
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0;
  background: #f4f5f7;
  color: #1f2430;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1f2937;
  color: #fff;
  padding: 0.75rem 1.5rem;
}

.topbar .brand { font-weight: 600; }

.nav-links { display: flex; gap: 1rem; }
.nav-links a { color: #cbd5e1; text-decoration: none; font-size: 0.9rem; }
.nav-links a:hover { color: #fff; }

.topbar nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar a { color: #cbd5e1; text-decoration: none; }
.topbar a:hover { color: #fff; }

main { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }

.flashes { list-style: none; padding: 0; margin: 0 0 1rem; }
.flash { padding: 0.6rem 1rem; border-radius: 6px; margin-bottom: 0.5rem; }
.flash-success { background: #dcfce7; color: #166534; }
.flash-error { background: #fee2e2; color: #991b1b; }

.login-form {
  max-width: 320px;
  margin: 4rem auto;
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.login-form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; }
.login-form input { padding: 0.5rem; border: 1px solid #d1d5db; border-radius: 6px; }

button, .btn-danger {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.9rem;
  background: #2563eb;
  color: #fff;
  font-size: 0.85rem;
}
.btn-danger { background: #dc2626; }

.week-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.week-nav a { text-decoration: none; color: #2563eb; }

.filiale-switch { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.filiale-switch a {
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  background: #e5e7eb;
  text-decoration: none;
  color: #1f2430;
  font-size: 0.85rem;
}
.filiale-switch a.active { background: #2563eb; color: #fff; }

.filiale-block {
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}
.filiale-block h2 { margin-top: 0; }

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}
.tag-col {
  background: #f9fafb;
  border-radius: 8px;
  padding: 0.5rem;
  min-height: 100px;
}
.tag-col h3 { font-size: 0.8rem; margin: 0 0 0.5rem; text-align: center; color: #4b5563; }
.tag-col h3 small { font-weight: 400; }

.shift-card {
  background: #eef2ff;
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
}
.shift-card.shift-archiviert { background: #f3f4f6; opacity: 0.7; }
.shift-name { font-weight: 600; }
.shift-time { color: #4b5563; }

.edit-toggle summary, .new-shift summary {
  cursor: pointer;
  font-size: 0.75rem;
  color: #2563eb;
  margin-top: 0.2rem;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}
.inline-form select, .inline-form input {
  font-size: 0.75rem;
  padding: 0.2rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

.swap-requests {
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
}
table { width: 100%; border-collapse: collapse; }
td { padding: 0.5rem; border-bottom: 1px solid #e5e7eb; font-size: 0.85rem; }
.muted { color: #9ca3af; }
.status-bestaetigt { color: #166534; }
.status-abgelehnt { color: #991b1b; }
.status-offen { color: #92400e; }

.kunden-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.kunden-heute { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.kunden-zahl { font-size: 3rem; font-weight: 700; }
.btn-plus1 { font-size: 1.2rem; padding: 0.6rem 1.4rem; }

.bar-chart { display: flex; gap: 0.5rem; align-items: flex-end; height: 140px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar {
  width: 100%;
  background: #2563eb;
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.bar-value { font-size: 0.7rem; color: #fff; margin-top: 2px; }
.bar-label { font-size: 0.7rem; color: #4b5563; margin-top: 0.3rem; }
.bar-korrektur { margin-top: 0.2rem; }
.bar-korrektur input[type="number"] { width: 3.2rem; }

.monats-kalender { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; margin-bottom: 1.5rem; }
.monats-kalender th { background: #1f2937; color: #fff; padding: 0.4rem; font-size: 0.75rem; }
.monat-zelle { vertical-align: top; border: 1px solid #e5e7eb; padding: 0.3rem; width: 14.28%; height: 90px; font-size: 0.7rem; }
.monat-zelle.ausserhalb { background: #f9fafb; color: #b0b6c0; }
.monat-zelle.heute { background: #eef2ff; }
.tag-nummer { font-weight: 600; margin-bottom: 0.2rem; }
.mini-shift { background: #dbeafe; border-radius: 3px; padding: 1px 3px; margin-bottom: 1px; }
.mini-abwesenheit { border-radius: 3px; padding: 1px 3px; margin-bottom: 1px; }
.mini-urlaub { background: #fef3c7; }
.mini-krankheit { background: #fee2e2; }
