/* Admin, stats, barres de défilement */

/* Admin */
.admin-box { flex-direction: column; align-items: stretch; gap: 8px; }
.admin-box .link { text-align: left; text-decoration: none; }

.who { margin: 0; color: var(--muted); font-size: 0.8125rem; overflow-wrap: anywhere; }

.who code { color: var(--text); user-select: all; }
.toast[data-error="true"] { border-color: rgba(227, 36, 43, 0.6); }

.banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--red-soft);
  border: 1px solid rgba(227, 36, 43, 0.4);
}
.banner[hidden] { display: none; }
.banner p { margin: 0; }
.banner--error { margin-top: 0; font-weight: 600; }

.login {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 16px;
  background: radial-gradient(ellipse at 50% 0%, #26070a 0%, var(--desk) 60%);
}
.login[hidden] { display: none; }
.login__box {
  width: min(380px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
}
.login__box h1 { margin: 4px 0 0; font-family: var(--head); font-size: 1.75rem; line-height: 1; }
.login__hint { margin: 0; color: var(--muted); }
.login__error { margin: 0; color: #ff6b70; font-weight: 600; min-height: 1.4em; }
.login__box .field input { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; }
.login__box .btn { padding: 10px 14px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  margin: 0;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-color: rgba(63, 191, 127, 0.5);
  border-radius: 8px;
  padding: 12px 16px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 10;
}
.toast[hidden] { display: none; }
@media (max-width: 760px) {
  .admin-box { flex-direction: row; align-items: center; }
}

/* Stats */
.view__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stat__label { margin: 0; color: var(--muted); font-weight: 600; }
.stat__value { margin: 0; font-family: var(--head); font-weight: 700; font-size: 2.75rem; line-height: 1; font-variant-numeric: tabular-nums; }
.stat--money .stat__value { color: var(--amber); }
.stat__note { margin: 4px 0 0; font-size: 0.9375rem; }
.stat__steps { display: flex; gap: 8px; margin-top: 12px; }
.step {
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.step:hover { border-color: var(--muted); }
.stat .row-actions { margin-top: 10px; }

/* Barres de défilement aux couleurs de la tablette */
* { scrollbar-width: thin; scrollbar-color: #3a3d44 transparent; }
*:hover { scrollbar-color: #4a4e57 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #3a3d44;
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--red); background-clip: padding-box; }
::-webkit-scrollbar-corner, ::-webkit-scrollbar-button { display: none; background: transparent; }
