/* Korpora — the admin panel: numbers, filters, the account sheet. */

/* admin */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin: 0 0 22px;
}
.stat {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--panel);
  text-decoration: none;
  color: var(--ink);
}
a.stat:hover {
  border-color: var(--ink-3);
}
/* the account cell (td.who) stays a table cell: a grid td drops out of the row and cuts its lines short (only the
   phone card in stack.css makes it a grid); the name goes under the e-mail as a block */
.who a {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.who small {
  display: block;
  overflow-wrap: anywhere;
}
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.acc-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  margin-bottom: 6px;
}
.acc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
@media (min-width: 1000px) {
  .acc-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: start;
  }
}
/* the inner column is a grid too: without an explicit shrinkable track a wide table sets its width */
.acc-grid > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
}
.acc-grid .section {
  margin: 0;
}
.danger {
  border-color: var(--red);
}
.danger h2 {
  color: var(--red);
}
.mini {
  font-size: 0.86rem;
}
.mono-sm {
  font: 400 0.84rem/1.4 var(--f-mono);
}
.hwid {
  font: 500 0.86rem/1.3 var(--f-mono);
  color: var(--gold-ink);
  white-space: nowrap;
}
.ok-text {
  color: var(--green);
  font-weight: 600;
}
.bad-text {
  color: var(--red);
  font-weight: 600;
}

/* the question before a destructive action (public/js/ui.js builds it from data-confirm and the template in
   views/partials/page-bottom.ejs) — on every signed-in page, so it lives in this bundle */
.confirm {
  width: min(460px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.confirm::backdrop {
  background: rgb(20 18 17 / 0.5);
}
.confirm-box {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 22px 22px 18px;
}
.confirm-q {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  font-size: 1.02rem;
  font-weight: 550;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.confirm-q > .i {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  color: var(--red);
}
.confirm .actions {
  justify-content: flex-end;
  margin: 0;
}
.confirm [data-ok] {
  background: var(--red);
  border-color: var(--red);
  color: var(--panel);
}
.confirm [data-ok]:hover {
  border-color: var(--ink);
}
@media (prefers-reduced-motion: no-preference) {
  .confirm[open] {
    animation: confirm-in 0.16s ease-out;
  }
  .confirm[open]::backdrop {
    animation: confirm-fade 0.16s ease-out;
  }
}
@keyframes confirm-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}
@keyframes confirm-fade {
  from {
    opacity: 0;
  }
}
