/* Leitstand – Admin-Dashboard */

.admin-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 0;
  margin-bottom: 1.5rem;
  background: rgba(16, 12, 9, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.admin-bar .mark { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; letter-spacing: 0.26em; text-transform: uppercase; font-size: 0.72rem; color: var(--sand); }
.admin-bar .mark__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 12px 2px rgba(255, 107, 31, 0.8); }

/* --- Login --------------------------------------------------------------- */

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1.25rem; }
.login-card { width: min(420px, 100%); text-align: center; }
.login-card h2 { margin-bottom: 0.4rem; }
.login-card .fire { margin: 0 auto 0.5rem; transform: scale(0.62); height: 110px; }

/* --- Kennzahlen ---------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.85rem;
  margin-bottom: 2rem;
}

/* Feste Viererreihen – so bleibt auch die letzte Zeile bündig. */
@media (min-width: 780px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}

.stat {
  position: relative;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(155deg, rgba(46, 35, 26, 0.72), rgba(23, 17, 13, 0.9));
  overflow: hidden;
}

.stat::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ember-deep), var(--flame));
  opacity: 0.75;
}

.stat--muted::after { background: var(--line); }
.stat__num { font-family: var(--font-display); font-size: 2.3rem; line-height: 1; color: var(--cream); }
.stat--hero .stat__num { color: var(--flame); font-size: 2.9rem; }
.stat__label { margin-top: 0.4rem; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ash); }

/* --- Layout -------------------------------------------------------------- */

.cols { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }

.panel { margin-bottom: 1.25rem; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.panel__title { font-family: var(--font-display); font-size: 1.25rem; }

/* --- Tabelle ------------------------------------------------------------- */

.table-scroll { overflow-x: auto; margin: 0 -0.4rem; padding: 0 0.4rem; }

table.list { width: 100%; border-collapse: collapse; font-size: 0.93rem; }

table.list th {
  text-align: left;
  padding: 0.55rem 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ash);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

table.list td { padding: 0.8rem 0.7rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.list tr:hover td { background: rgba(255, 107, 31, 0.05); }
table.list .name { font-weight: 700; }
table.list .sub { font-size: 0.81rem; color: var(--ash); }
table.list .num { text-align: center; font-family: var(--font-display); font-size: 1.05rem; }
table.list .actions { text-align: right; white-space: nowrap; }

.empty { padding: 2.5rem 1rem; text-align: center; color: var(--ash); }

/* --- Mitbringsel --------------------------------------------------------- */

.bring-group { margin-bottom: 1.2rem; }
.bring-group__title { display: flex; align-items: baseline; gap: 0.5rem; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--flame); margin-bottom: 0.5rem; }
.bring-group__count { color: var(--ash); letter-spacing: 0; }
.bring-item { padding: 0.5rem 0 0.5rem 0.85rem; border-left: 2px solid var(--line); font-size: 0.9rem; }
.bring-item strong { display: block; font-weight: 600; }
.bring-item span { font-size: 0.8rem; color: var(--ash); }

.ride-group--offer .bring-item { border-left-color: var(--moss); }
.ride-group--need .bring-item { border-left-color: var(--flame); }
.ride-group--offer .bring-group__title { color: var(--moss); }

/* --- Schalter ------------------------------------------------------------ */

.switch { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.switch:last-of-type { border-bottom: 0; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }

.switch__track {
  position: relative;
  width: 46px;
  height: 26px;
  flex: none;
  border-radius: 999px;
  background: rgba(16, 12, 9, 0.85);
  border: 1px solid var(--line);
  transition: all 0.25s var(--ease);
}

.switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ash);
  transition: all 0.25s var(--ease);
}

.switch input:checked + .switch__track { background: rgba(255, 107, 31, 0.28); border-color: var(--ember); }
.switch input:checked + .switch__track::after { transform: translateX(20px); background: var(--flame); box-shadow: 0 0 10px rgba(255, 167, 51, 0.8); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--flame); outline-offset: 3px; }

.switch__text { font-size: 0.93rem; }
.switch__text small { display: block; color: var(--ash); font-size: 0.79rem; }

/* --- Filterzeile --------------------------------------------------------- */

.toolbar { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.toolbar .input { width: auto; min-width: 190px; padding: 0.5rem 0.85rem; font-size: 0.9rem; }

/* --- Dialog -------------------------------------------------------------- */

dialog.sheet {
  width: min(560px, calc(100% - 2rem));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, #2b2119, #171109);
  color: var(--cream);
  box-shadow: var(--shadow-lift);
}

dialog.sheet::backdrop { background: rgba(8, 5, 3, 0.72); backdrop-filter: blur(3px); }
dialog.sheet .sheet__body { padding: clamp(1.4rem, 4vw, 2rem); }

/* --- Toast --------------------------------------------------------------- */

.toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 50;
  max-width: 340px;
  padding: 0.9rem 1.2rem;
  border-radius: var(--r-md);
  border-left: 3px solid var(--moss);
  background: rgba(28, 21, 15, 0.97);
  box-shadow: var(--shadow-lift);
  font-size: 0.92rem;
  transform: translateY(140%);
  transition: transform 0.45s var(--ease);
}

.toast--show { transform: none; }
.toast--error { border-left-color: var(--clay); color: #f0c4ba; }

@media (max-width: 900px) {
  .cols { grid-template-columns: 1fr; }
}
