/* Pages compte/auth/admin/lobby (étapes 5 et 8, refonte étape 9) — complète ui.css. */

.panel {
  max-width: 460px;
  margin: 6vh auto 0;
  background: linear-gradient(165deg, #237c50 0%, var(--felt) 40%, #155634 100%);
  border: 1px solid var(--line-gold);
  border-radius: 16px;
  padding: 26px 28px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(0, 0, 0, 0.18),
    0 18px 48px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}
.panel::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--gold-grad);
  opacity: 0.85;
}
.panel.wide { max-width: 860px; }

.tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.tabs button {
  flex: 1;
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.25);
  color: #cfd8d2;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.tabs button:hover { color: var(--paper); }
.tabs button.active {
  background: var(--gold-grad);
  border-color: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

form { display: flex; flex-direction: column; gap: 12px; }
label { font-size: 0.9rem; display: flex; flex-direction: column; gap: 4px; }
input[type='email'], input[type='password'], input[type='text'], input[type='number'], select {
  font: inherit;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.28);
  color: var(--paper);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder { color: rgba(246, 244, 239, 0.45); }
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(216, 161, 44, 0.25);
}
select option { background: var(--felt-dark); color: var(--paper); }
.check { flex-direction: row; align-items: flex-start; gap: 8px; }
.check input { margin-top: 3px; accent-color: var(--accent); }

button.primary {
  font: inherit;
  padding: 12px;
  border: 0;
  border-radius: 9px;
  background: var(--gold-grad);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: filter 0.15s, transform 0.1s;
}
button.primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
button.primary:active { transform: translateY(0); filter: brightness(0.96); }
button.primary:disabled { opacity: 0.55; cursor: wait; transform: none; }
button.danger, button.primary.danger {
  background: linear-gradient(180deg, #d4553f, #b3402f 60%, #93301f);
  color: #fff;
}
button.ghost, a.ghost {
  font: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--paper);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
button.ghost:hover, a.ghost:hover { border-color: var(--accent); background: rgba(0, 0, 0, 0.3); }
button.ghost.danger { border-color: rgba(212, 85, 63, 0.55); color: #ffb3a7; }
button.ghost.danger:hover { border-color: #d4553f; }

.msg { min-height: 1.3em; margin: 10px 0 0; font-size: 0.9rem; }
.msg.error { color: #ffb3a7; }
.msg.ok { color: #b9e8c5; }

.linkline { margin-top: 12px; font-size: 0.85rem; }
.linkline a, .linkline button.link {
  color: var(--accent-bright); background: none; border: 0; padding: 0;
  font: inherit; font-size: inherit; cursor: pointer; text-decoration: underline;
}

table.data { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.data th, table.data td { padding: 9px 10px; text-align: left; }
table.data thead th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  border-bottom: 1px solid var(--line-gold);
}
table.data tbody td { border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
table.data tbody tr:hover { background: rgba(240, 199, 94, 0.07); }
.table-scroll { overflow-x: auto; }

.rowline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.balance-big {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  margin: 4px 0;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--accent-bright);
  -webkit-text-fill-color: transparent;
}
code.secret {
  display: block; word-break: break-all; background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 10px; border-radius: 8px; font-size: 0.85rem; user-select: all;
}
details.privacy { font-size: 0.82rem; color: #d6ded9; }
details.privacy summary { cursor: pointer; color: var(--accent-bright); }

/* Formulaire de création de table : grille responsive lisible */
.create-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.create-grid .span-2 { grid-column: 1 / -1; }
.create-grid label { font-size: 0.85rem; gap: 5px; }
.hint-unit {
  font-size: 0.72rem;
  color: var(--accent-bright);
  font-weight: 600;
  opacity: 0.85;
}
.create-hint {
  margin: 12px 0 4px;
  padding: 9px 12px;
  background: rgba(0, 0, 0, 0.22);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
}
@media (min-width: 640px) {
  .create-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .create-grid .span-2 { grid-column: span 2; }
}

/* L'attribut hidden doit TOUJOURS gagner — sinon `form { display:flex }` l'écrase
   et les formulaires Connexion + Inscription s'affichent en même temps. */
[hidden] { display: none !important; }

/* Champ mot de passe avec œil (afficher/masquer) */
.pwd-wrap { position: relative; display: flex; }
.pwd-wrap input { flex: 1; padding-right: 46px; }
.pwd-eye {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: #cfd8d2;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  padding: 8px;
  border-radius: 7px;
}
.pwd-eye:hover { color: var(--accent-bright); }

/* Boutons compacts (actions admin du lobby) */
.mini { padding: 5px 10px; font-size: 0.8rem; }

/* Dialogues (lobby : modification de table) */
dialog {
  border: 1px solid var(--line-gold);
  border-radius: 14px;
  background: var(--felt);
  color: var(--paper);
  padding: 20px 22px;
  min-width: 300px;
  max-width: 92vw;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
dialog h2 { margin-top: 0; }
