/* Admin page: reuses app.css tokens and components. */
.adm { display: grid; gap: 18px; padding: 28px 0 60px; }
.adm-tabs { display: flex; gap: 4px; margin-left: auto; }
.adm-tabs button { border: 0; background: none; padding: 8px 14px; border-radius: 999px; font-size: 14.5px; color: var(--ink-2); cursor: pointer; }
.adm-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.adm-denied { padding: 22px; margin: 0; }
.adm-upload { display: grid; gap: 14px; padding: 22px; }
.adm-upload h2 { margin: 0; font: 700 20px/1.3 var(--serif); }
.adm-upload .btn { justify-self: start; }
.adm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.adm-wide { grid-column: 1 / -1; }
.adm-grid input[type="file"] { padding: 8px 10px; height: auto; }
.adm-bar { display: flex; gap: 12px; }
.adm-table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table th, .adm-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.adm-table th { font-size: 12.5px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.adm-table .acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.adm-table input, .adm-table select {
  height: 32px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); color: var(--ink); font: inherit; font-size: 13.5px;
}
.adm-table input.title { width: 100%; min-width: 160px; }
.adm-table input.cat { width: 120px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--paper-2); color: var(--muted); }
.pill--ok { background: var(--jade-soft); color: var(--jade); }
.pill--bad { background: var(--seal-soft); color: var(--seal-2); }
@media (max-width: 760px) {
  .adm-grid { grid-template-columns: 1fr; }
  .adm-tabs button { padding: 7px 9px; font-size: 13px; }
  .lang { display: none; }
  /* on a phone the tables keep their columns and scroll sideways inside their card */
  .adm > * { min-width: 0; }
  .adm-table-wrap { max-width: 100%; }
  .adm-table { min-width: 620px; }
  .adm-table th, .adm-table td { padding: 10px; }
  .adm-table th, .adm-table td.num, .adm-table td:first-child, .pill { white-space: nowrap; }
  /* the users list is a stack of cards: the email on top, then each field with its name */
  #userTable { min-width: 0; }
  #userTable thead { display: none; }
  #userTable tbody, #userTable tr { display: block; }
  #userTable tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  #userTable tr:last-child { border-bottom: 0; }
  #userTable td { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 0; border: 0; white-space: normal; word-break: break-all; }
  #userTable td[data-label]::before { content: attr(data-label); font-size: 12px; color: var(--muted); font-weight: 700; }
  #userTable td.user-email { display: block; padding: 0 0 6px; font-weight: 700; font-size: 15px; word-break: break-all; }
  #userTable td.user-acts { display: block; padding-top: 10px; }
  #userTable .acts { justify-content: flex-start; }
}
