/* ADMIN: builds on the ALERTS card styles, using the full width of the screen. */
#admin-v .alerts-body.admin-body {
  max-width: none;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.admin-stat {
  display: flex;
  flex-direction: column;
  background: var(--c-grey-050505);
  border: 1px solid var(--c-grey-222);
  border-top: 3px solid var(--c-amber);
  border-radius: 4px;
  padding: 10px;
  font-size: 0.72rem;
  color: var(--c-grey-aaa);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.admin-stat:hover,
.admin-stat:focus-visible {
  border-color: var(--c-amber);
  transform: translateY(-1px);
}

.admin-stat--active {
  border-color: var(--c-amber);
  box-shadow: inset 0 0 0 1px var(--c-amber);
}

.admin-num {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--c-white);
}

.admin-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-show-all {
  border: 1px solid var(--c-amber);
  border-radius: 3px;
  padding: 4px 10px;
  font-size: 0.65rem;
  color: var(--c-amber);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.admin-show-all:hover {
  background: var(--c-amber);
  color: var(--c-black);
}

.admin-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-search-input {
  flex: 1;
  min-width: 0;
  background: var(--c-black);
  color: var(--c-white);
  border: 1px solid var(--c-grey-333);
  border-radius: 3px;
  font-family: inherit;
  font-size: 0.85rem;
  padding: 8px 10px;
  outline: none;
}

.admin-search-input:focus {
  border-color: var(--c-amber);
}

.admin-search-count {
  color: var(--c-grey-aaa);
  font-size: 0.7rem;
  white-space: nowrap;
}

/* Rows the search hides stay hidden, including in the phone card layout below. */
#admin-v [data-admin-search-target="row"][hidden] {
  display: none !important;
}

.admin-empty {
  margin: 0;
  color: var(--c-grey-666);
  font-size: 0.8rem;
}

/* board.css styles every table as the fixed-width BOARD; the admin tables size to their content instead. */
#admin-v .admin-table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  font-size: 0.75rem;
}

#admin-v .admin-table th,
#admin-v .admin-table td {
  width: auto !important;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--c-grey-222);
  vertical-align: middle;
  white-space: normal;
  overflow: visible;
}

#admin-v .admin-table th {
  color: var(--c-grey-aaa);
  font-size: 0.65rem;
  white-space: nowrap;
}

#admin-v .admin-table .admin-email {
  overflow-wrap: anywhere;
}

#admin-v .admin-table td.admin-actions {
  text-align: right;
  white-space: nowrap;
}

.admin-actions .alerts-inline-form {
  display: inline-block;
  margin: 2px 0 2px 6px;
}

/* Phones: each row becomes a small card so nothing is hidden off the side. */
@media (max-width: 760px) {
  #admin-v .admin-table thead {
    display: none;
  }

  #admin-v .admin-table,
  #admin-v .admin-table tbody,
  #admin-v .admin-table tr,
  #admin-v .admin-table td {
    display: block;
    width: 100% !important;
    box-sizing: border-box;
  }

  #admin-v .admin-table tr {
    border-bottom: 1px solid var(--c-grey-333);
    padding: 6px 0;
  }

  #admin-v .admin-table td {
    border-bottom: none;
    padding: 3px 4px;
  }

  #admin-v .admin-table td[data-label]::before {
    content: attr(data-label) ": ";
    color: var(--c-grey-aaa);
    font-size: 0.65rem;
  }

  #admin-v .admin-table td.admin-actions {
    text-align: left;
    white-space: normal;
  }

  .admin-actions .alerts-inline-form {
    margin: 4px 6px 0 0;
  }
}
