/* === Cafe Mittendrin Farbpalette ===
   Hellblau:    #5B9BD5
   Dunkelblau:  #1B2A4A
   Beige/Sand:  #E4D5C3
   Orange/Rot:  #E8501A
   Dunkelbraun: #3E2222
   ================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 20px;
  line-height: 1.5;
  color: #1B2A4A;
  background: #f3ede6;
  min-height: 100vh;
}

/* --- Header --- */
header {
  background: #1B2A4A;
  color: white;
  text-align: center;
  padding: 24px 16px 16px;
}

.header-logo {
  max-width: 280px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.app-title {
  margin-top: 12px;
  font-size: 18px;
  opacity: 0.7;
  letter-spacing: 0.5px;
}

/* --- Navigation --- */
nav {
  display: flex;
  gap: 0;
  background: #5B9BD5;
}

.nav-btn {
  flex: 1;
  padding: 16px;
  font-size: 20px;
  font-weight: 600;
  border: none;
  background: #5B9BD5;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}

.nav-btn:hover {
  background: #4a8ac4;
}

.nav-btn.active {
  background: #f3ede6;
  color: #1B2A4A;
}

/* --- Main --- */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px;
}

.hidden {
  display: none !important;
}

/* --- Week Navigation --- */
.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.week-label {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  flex-shrink: 0;
  color: #1B2A4A;
}

.btn-today {
  display: block;
  margin: 0 auto 20px;
  padding: 10px 28px;
  font-size: 18px;
  border: 2px solid #1B2A4A;
  background: white;
  color: #1B2A4A;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.btn-today:hover {
  background: #1B2A4A;
  color: white;
}

/* --- Buttons --- */
.btn-large {
  padding: 14px 24px;
  font-size: 18px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  background: #5B9BD5;
  color: white;
  transition: background 0.2s, transform 0.1s;
}

.btn-large:hover {
  background: #4a8ac4;
}

.btn-large:active {
  transform: scale(0.97);
}

.btn-primary {
  background: #E8501A;
  color: white;
}

.btn-primary:hover {
  background: #d04515;
}

.shift-time {
  font-weight: 400;
  font-size: 16px;
  opacity: 0.7;
  margin-left: 6px;
}

/* --- Member Select --- */
.member-select {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(27,42,74,0.1);
}

.member-select label {
  font-size: 22px;
  font-weight: 600;
  white-space: nowrap;
  color: #1B2A4A;
}

.member-select select {
  flex: 1;
  padding: 12px 16px;
  font-size: 20px;
  border: 2px solid #5B9BD5;
  border-radius: 8px;
  background: white;
  color: #1B2A4A;
}

/* --- Week Grid --- */
.week-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.day-card {
  background: white;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(27,42,74,0.08);
  overflow: hidden;
}

.day-card.today {
  border: 3px solid #E8501A;
}

.day-header {
  padding: 14px 18px;
  font-size: 22px;
  font-weight: 700;
  background: #E4D5C3;
  color: #1B2A4A;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.day-header .date-str {
  font-weight: 400;
  font-size: 18px;
  color: #666;
}

.day-card.today .day-header {
  background: #1B2A4A;
  color: white;
}

.day-card.today .day-header .date-str {
  color: #5B9BD5;
}

.day-body {
  padding: 14px 18px;
}

.day-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.toggle-btn {
  flex: 1;
  padding: 14px;
  font-size: 20px;
  font-weight: 600;
  border: 3px solid #ddd;
  border-radius: 10px;
  cursor: pointer;
  background: white;
  transition: all 0.2s;
}

.toggle-btn:hover {
  border-color: #aaa;
}

.toggle-btn.yes {
  border-color: #5B9BD5;
  background: white;
  color: #5B9BD5;
}

.toggle-btn.yes.active {
  background: #5B9BD5;
  color: white;
}

.toggle-btn.no {
  border-color: #E8501A;
  background: white;
  color: #E8501A;
}

.toggle-btn.no.active {
  background: #E8501A;
  color: white;
}

.day-available-list {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 2px solid #E4D5C3;
}

.day-available-list h4 {
  font-size: 16px;
  color: #888;
  margin-bottom: 6px;
  font-weight: 600;
}

.available-names {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.name-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 600;
}

.name-tag.available {
  background: #d6e9f8;
  color: #1B2A4A;
}

.name-tag.unavailable {
  background: #fde0d4;
  color: #3E2222;
  text-decoration: line-through;
  opacity: 0.6;
}

/* --- Legend --- */
.legend {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 16px;
  font-size: 16px;
  color: #666;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
}

.dot.available { background: #5B9BD5; }
.dot.unavailable { background: #E8501A; }
.dot.empty { background: #E4D5C3; border: 2px solid #c4b5a3; }

/* --- Members View --- */
#view-members h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #1B2A4A;
}

.add-member {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.add-member input {
  flex: 1;
  padding: 14px 16px;
  font-size: 20px;
  border: 2px solid #5B9BD5;
  border-radius: 10px;
  background: white;
}

.add-member input:focus {
  outline: none;
  border-color: #1B2A4A;
}

.member-list {
  list-style: none;
}

.member-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: white;
  border-radius: 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(27,42,74,0.06);
  font-size: 22px;
  font-weight: 500;
}

.btn-delete {
  padding: 10px 18px;
  font-size: 16px;
  background: #fde0d4;
  color: #E8501A;
  border: 2px solid #E8501A;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.btn-delete:hover {
  background: #E8501A;
  color: white;
}

/* --- Overview Table --- */
.overview-table-wrap {
  margin-bottom: 24px;
}

.overview-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(27,42,74,0.08);
  font-size: 20px;
}

.overview-table thead th {
  background: #E4D5C3;
  color: #1B2A4A;
  padding: 14px 8px;
  font-weight: 700;
  text-align: center;
  border-bottom: 2px solid #d4c4b0;
}

.overview-table thead th.ov-today {
  background: #1B2A4A;
  color: white;
}

.ov-name-col {
  text-align: left !important;
  padding-left: 16px !important;
  min-width: 100px;
}

.ov-day-name {
  font-size: 20px;
  font-weight: 700;
}

.ov-day-date {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.7;
}

.overview-table tbody td {
  padding: 14px 8px;
  text-align: center;
  border-bottom: 1px solid #f0ebe5;
}

.ov-name-cell {
  text-align: left !important;
  padding-left: 16px !important;
  font-weight: 600;
  color: #1B2A4A;
}

.overview-table tbody tr:last-child td {
  border-bottom: none;
}

.ov-cell.ov-today {
  background: #f0f6fc;
}

.ov-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 700;
}

.ov-yes {
  background: #5B9BD5;
  color: white;
}

.ov-no {
  background: #E8501A;
  color: white;
}

.ov-empty {
  background: #E4D5C3;
  color: #999;
  font-size: 20px;
}

/* Summary cards */
.ov-summary {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.ov-summary-card {
  flex: 1;
  background: white;
  border-radius: 12px;
  padding: 16px 8px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(27,42,74,0.06);
}

.ov-summary-day {
  font-size: 18px;
  font-weight: 700;
  color: #1B2A4A;
}

.ov-summary-count {
  font-size: 28px;
  font-weight: 700;
  color: #5B9BD5;
  margin: 4px 0;
}

.ov-summary-label {
  font-size: 14px;
  color: #888;
}

/* --- No member hint --- */
.no-member-hint {
  text-align: center;
  padding: 40px 20px;
  color: #888;
  font-size: 22px;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .header-logo { max-width: 200px; }
  .subtitle { font-size: 18px; }
  .week-label { font-size: 20px; }
  .btn-large { padding: 12px 16px; font-size: 16px; }
  .toggle-btn { padding: 12px; font-size: 18px; }
  .week-nav { flex-direction: column; text-align: center; }
  .add-member { flex-direction: column; }
  .overview-table { font-size: 16px; }
  .ov-status { width: 36px; height: 36px; font-size: 20px; }
  .ov-summary-count { font-size: 22px; }
}
