/* ==========================================================================
   Betrieb – Fanclub Trinkpause
   Baut auf css/style.css und admin/admin.css auf.
   ========================================================================== */

/* ---------- Dashboard: Kennzahlen-Karten ---------- */
/* Die Kachel-Navigation erbt von stammdaten.css eine max-width:700px
   und width:fit-content, die dort für die nebeneinander liegenden,
   einzeln verschiebbaren Bereichs-Boxen gedacht sind - hier gibt es nur
   eine einzige Navigation, die soll wie bei Stammdaten mehrere Kacheln
   pro Zeile zeigen. width:100% statt fit-content ist nötig, sonst kann
   der Browser bei "auto-fill" nicht berechnen, wie viele Spalten passen,
   und zeigt nur eine einzige Spalte. */
#betriebNavGrid { width: 100%; max-width: none; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}
.dashboard-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 16px 16px;
}
.dashboard-card-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.dashboard-card-value {
  font-family: var(--font-heavy);
  font-size: 1.4rem;
  color: var(--anthracite);
  margin: 0;
}
.dashboard-card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 6px 0 0;
}
.dashboard-card.warn .dashboard-card-value { color: #b30000; }
.dashboard-card.ok .dashboard-card-value { color: #1e8e3e; }

/* ---------- Dashboard: Karten-Gruppentitel (z.B. "Tickets", "Shop") ---------- */
.dashboard-group { margin-bottom: 22px; }
.dashboard-group-title {
  font-family: var(--font-heavy);
  font-size: 0.9rem;
  color: var(--anthracite);
  margin: 0 0 10px;
}

/* ---------- Dashboard: To-Do-Liste ---------- */
.dashboard-todo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dashboard-todo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  padding: 12px 16px;
  border-left: 4px solid var(--grey-line);
}
.dashboard-todo-item.priority-high { border-left-color: var(--red); }
.dashboard-todo-item.priority-medium { border-left-color: #d97706; }
.dashboard-todo-item.priority-low { border-left-color: #1e8e3e; }
.dashboard-todo-text { font-size: 0.88rem; }
.dashboard-todo-count {
  display: inline-block;
  background: var(--off-white);
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-right: 8px;
}
.dashboard-todo-empty {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 20px;
}

/* ---------- Ticketübersicht: schmale/zentrierte Spalten ---------- */
.admin-table th.col-narrow, .admin-table td.col-narrow { width: 90px; max-width: 90px; text-align: center; white-space: nowrap; }
.admin-table th.col-center, .admin-table td.col-center { text-align: center; }
.ticketuebersicht-negativ { color: #b30000; font-weight: 600; }
.ticketuebersicht-positiv { color: #1e8e3e; font-weight: 600; }
.events-group-empty { text-align: center; color: var(--text-muted); font-style: italic; padding: 20px; }

/* Spieldetail-Popup: Standardmässig sind Modals auf 560px begrenzt
   (gedacht für normale Formulare) - seit die Ticketkategorien-Tabelle
   (6 Spalten) dort mit reinkam, war das zu schmal für eine gute
   Übersicht. "width: 100%" ist hier nötig, nicht nur max-width, da die
   Basisregel sonst schon vorher eine kleinere feste Breite vorgibt. */
#gameDetailModal { width: 100%; max-width: 900px; }

/* ---------- Spielübersicht/Dashboard: Total-Zeile & klickbare Spiele-Zeilen ---------- */
.admin-table .total-row td {
  background: var(--off-white);
  font-weight: 700;
  border-bottom: 2px solid var(--grey-line);
}
.admin-table tr.clickable-row { cursor: pointer; }
.admin-table tr.clickable-row:hover td { background: rgba(0,0,0,0.03); }
.admin-table td.cell-bold { font-weight: 700; }

/* ---------- Spiel-Detailansicht ---------- */
.game-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.game-detail-item { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--grey-line); }
.game-detail-label { font-size: 0.74rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.game-detail-value { font-family: var(--font-heavy); font-size: 1.05rem; color: var(--anthracite); }
.game-detail-value.total { color: #1e8e3e; }
.game-detail-value.total.negativ { color: #b30000; }
.game-detail-full { grid-column: 1 / -1; }

/* ---------- Bestellung löschen: Rückerstattungs-Optionen ---------- */
.btn-secondary {
  background: var(--off-white);
  color: var(--anthracite);
  border: 1.5px solid var(--grey-line);
}
.btn-secondary:hover { background: var(--grey-line); }

/* Vorbestellungs-Kennzeichnung in der Bestellungen-Tabelle (Positionen,
   für die bei Bestelleingang nicht genug Bestand da war). */
.order-item-backorder-badge {
  display: inline-block;
  background: #fff3cd;
  color: #856404;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  margin: 0 4px;
}
