/* Admin dashboard: builds on style.css tokens and components. */
.admin { max-width: 1120px; }
.admin-badge {
  margin-left: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--amber); background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent);
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { display: grid; gap: 6px; padding: 16px 18px; background: var(--card); border: 1px solid var(--card-border); border-radius: 14px; }
.stat-label { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted-fg); }
.stat-value { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; align-items: start; }
@media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; } }

/* priority list */
.prio-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.prio-item {
  display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--card);
  animation: fadeUp .3s both; transition: border-color .2s, transform .2s;
}
.prio-item.moved { border-color: var(--emerald-strong); }
.prio-rank {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; font-size: 12.5px; font-weight: 700;
  background: linear-gradient(135deg, var(--tile-from), var(--tile-to)); color: #fff;
}
.unranked .prio-rank { background: var(--muted); color: var(--muted-fg); }
.prio-who { min-width: 0; display: grid; }
.prio-who strong, .prio-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prio-who span { font-size: 12px; color: var(--muted-fg); }
.prio-actions { display: flex; gap: 4px; }
.icon-sm {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--foreground); cursor: pointer; transition: background .2s;
}
.icon-sm:hover { background: var(--accent); }
.icon-sm:disabled { opacity: .35; pointer-events: none; }
.icon-sm svg { width: 15px; height: 15px; }
.prio-empty { padding: 10px; font-size: 13px; color: var(--muted-fg); border: 1px dashed var(--border); border-radius: 10px; }

/* queues */
.queues { display: grid; gap: 10px; }
.queue { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; animation: fadeUp .3s both; }
.queue.competing { border-color: color-mix(in srgb, var(--amber) 55%, transparent); background: color-mix(in srgb, var(--amber-soft) 50%, transparent); }
.queue-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.queue-title { font-weight: 600; }
.queue-when { font-size: 12.5px; color: var(--muted-fg); }
.queue ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; font-size: 13.5px; }
.queue li span { color: var(--muted-fg); font-size: 12.5px; }

/* users table */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.users { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.users th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted-fg); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.users td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.users .num { text-align: right; font-variant-numeric: tabular-nums; }
.users tbody tr.user-row { cursor: pointer; transition: background .15s; }
.users tbody tr.user-row:hover, .users tbody tr.user-row[aria-expanded="true"] { background: var(--accent); }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell .who { display: grid; }
.user-cell .who span { font-size: 12px; color: var(--muted-fg); }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neutral-dot); flex-shrink: 0; }
.online-dot.on { background: var(--emerald-strong); box-shadow: 0 0 0 3px var(--emerald-soft); }
.tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 600; color: var(--amber); background: var(--amber-soft); }
.history-row td { padding: 0 10px 14px; background: color-mix(in srgb, var(--accent) 45%, transparent); white-space: normal; }
.history-row .bookings { padding-top: 10px; }

/* Booking-email column */
.mail-cell { white-space: nowrap; }
.mail-cell > span:first-child { margin-right: 6px; }
.mail-cell .btn { margin-left: 6px; }

.user-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag-bad { color: var(--rose); border-color: color-mix(in srgb, var(--rose) 40%, transparent); background: var(--rose-soft); }
.btn.danger { color: var(--rose); }
