.admin-dashboard .admin-nav .main-nav:has(.admin-whitelist-tab) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-dashboard .admin-whitelist-tab .material-icons {
  font-size: 19px;
}

.admin-dashboard.admin-whitelist-mode .dashboard-grid.admin-grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

.admin-dashboard.admin-whitelist-mode .dashboard-sidebar.admin-sidebar {
  display: none !important;
}

.admin-whitelist-active .admin-nav .sub-nav,
.admin-whitelist-active > .dashboard-section:not(#admin-whitelist-management) {
  display: none !important;
}

.admin-whitelist-management {
  --wl-border: rgba(255, 255, 255, 0.09);
  --wl-muted: rgba(255, 255, 255, 0.52);
  --wl-panel: rgba(15, 15, 19, 0.76);
  color: #f4f4f6;
}

.admin-wl-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.admin-wl-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: #ff4167;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.admin-wl-header h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1;
}

.admin-wl-header p {
  margin: 0.5rem 0 0;
  color: var(--wl-muted);
  font-size: 0.92rem;
}

.admin-wl-refresh {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--wl-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.admin-wl-refresh .material-icons {
  font-size: 17px;
}

.admin-wl-refresh:hover,
.admin-wl-refresh:focus-visible {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  outline: none;
}

.admin-wl-refresh.is-loading .material-icons {
  animation: admin-wl-spin 800ms linear infinite;
}

.admin-wl-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid var(--wl-border);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
}

.admin-wl-summary article {
  display: grid;
  gap: 0.4rem;
  min-height: 86px;
  padding: 1rem 1.1rem;
  border-right: 1px solid var(--wl-border);
}

.admin-wl-summary article:last-child {
  border-right: 0;
}

.admin-wl-summary span {
  color: var(--wl-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.admin-wl-summary strong {
  color: #fff;
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.admin-wl-panel {
  overflow: hidden;
  border: 1px solid var(--wl-border);
  border-radius: 12px;
  background: var(--wl-panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.17);
}

.admin-wl-toolbar {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--wl-border);
}

.admin-wl-search {
  display: flex;
  width: min(100%, 460px);
  height: 42px;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.admin-wl-search:focus-within {
  border-color: rgba(255, 65, 103, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 23, 72, 0.08);
}

.admin-wl-search > .material-icons {
  color: rgba(255, 255, 255, 0.38);
  font-size: 18px;
}

.admin-wl-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.83rem;
}

.admin-wl-search input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.admin-wl-shortcut {
  padding: 0.16rem 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.61rem;
}

.admin-wl-result-count {
  padding-right: 0.35rem;
  color: var(--wl-muted);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.admin-wl-notice {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.75rem 0.75rem 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(244, 180, 0, 0.2);
  border-radius: 7px;
  background: rgba(244, 180, 0, 0.07);
  color: #efcf73;
  font-size: 0.74rem;
}

.admin-wl-notice[hidden] {
  display: none;
}

.admin-wl-notice .material-icons {
  font-size: 17px;
}

.admin-wl-table-wrap {
  overflow-x: auto;
}

.admin-wl-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.admin-wl-table th {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--wl-border);
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.64rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-wl-table td {
  padding: 0.78rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  vertical-align: middle;
}

.admin-wl-table tbody tr {
  transition: background-color 140ms ease;
}

.admin-wl-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.022);
}

.admin-wl-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-wl-account {
  display: flex;
  min-width: 185px;
  align-items: center;
  gap: 0.65rem;
}

.admin-wl-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: #232329;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 750;
}

.admin-wl-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-wl-account-copy,
.admin-wl-tiktok {
  display: grid;
  min-width: 0;
  gap: 0.16rem;
}

.admin-wl-account-copy strong,
.admin-wl-tiktok strong {
  overflow: hidden;
  color: #f7f7f8;
  font-size: 0.78rem;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-wl-account-copy small,
.admin-wl-tiktok small {
  overflow: hidden;
  max-width: 170px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.65rem;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-wl-empty-value,
.admin-wl-date {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.71rem;
  white-space: nowrap;
}

.admin-wl-status {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.28rem 0.48rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.69rem;
  font-weight: 650;
  white-space: nowrap;
}

.admin-wl-status .material-icons {
  font-size: 15px;
}

.admin-wl-status.is-active {
  color: #7bdcaa;
}

.admin-wl-status.is-active.is-whitelist {
  border-color: rgba(49, 197, 123, 0.2);
  background: rgba(49, 197, 123, 0.08);
  color: #50dda0;
}

.admin-wl-status.is-active.is-tiktok {
  border-color: rgba(73, 151, 255, 0.22);
  background: rgba(73, 151, 255, 0.09);
  color: #75b1ff;
}

.admin-wl-status.is-inactive {
  border-color: rgba(255, 65, 103, 0.2);
  background: rgba(255, 23, 72, 0.075);
  color: #ff718e;
}

.admin-wl-status.is-unknown {
  border-color: rgba(213, 184, 103, 0.18);
  background: rgba(213, 184, 103, 0.07);
  color: #d5b867;
}

.admin-wl-mobile-states {
  display: none;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.38rem;
}

.admin-wl-actions-cell {
  width: 1%;
}

.admin-wl-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
}

.admin-wl-action {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.64);
  font: inherit;
  font-size: 0.65rem;
  font-weight: 620;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.admin-wl-action .material-icons {
  font-size: 15px;
}

.admin-wl-action:hover,
.admin-wl-action:focus-visible {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
  outline: none;
}

.admin-wl-action.is-danger {
  color: #ff718e;
}

.admin-wl-action.is-remove:not(:disabled) .material-icons {
  color: #ff718e;
}

.admin-wl-action.is-danger:hover,
.admin-wl-action.is-danger:focus-visible {
  border-color: rgba(255, 65, 103, 0.3);
  background: rgba(255, 23, 72, 0.08);
}

.admin-wl-action:disabled {
  opacity: 0.26;
  cursor: not-allowed;
}

.admin-wl-pagination {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-top: 1px solid var(--wl-border);
}

.admin-wl-pagination[hidden] {
  display: none;
}

.admin-wl-pagination button {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--wl-border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.68);
  font: inherit;
  font-size: 0.68rem;
  cursor: pointer;
}

.admin-wl-pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.admin-wl-pagination .material-icons {
  font-size: 16px;
}

.admin-wl-pagination > span {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.69rem;
}

.admin-wl-loading {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
}

.admin-wl-loading i {
  height: 52px;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(255,255,255,.025), rgba(255,255,255,.055), rgba(255,255,255,.025));
  background-size: 220% 100%;
  animation: admin-wl-shimmer 1.2s ease infinite;
}

.admin-wl-empty {
  display: grid;
  min-height: 270px;
  place-items: center;
  align-content: center;
  gap: 0.45rem;
  padding: 2rem;
  text-align: center;
}

.admin-wl-empty > .material-icons {
  color: rgba(255, 255, 255, 0.25);
  font-size: 34px;
}

.admin-wl-empty strong {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.admin-wl-empty p {
  margin: 0;
  color: var(--wl-muted);
  font-size: 0.75rem;
}

.admin-wl-empty button {
  margin-top: 0.35rem;
  padding: 0.48rem 0.7rem;
  border: 1px solid var(--wl-border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
}

.admin-wl-empty.is-error > .material-icons {
  color: #ff5b7c;
}

.admin-wl-audit {
  margin-top: 1rem;
  overflow: hidden;
  border: 1px solid var(--wl-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.admin-wl-audit summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.8rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.75rem;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.admin-wl-audit summary::-webkit-details-marker {
  display: none;
}

.admin-wl-audit summary > span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-wl-audit summary .material-icons {
  font-size: 17px;
}

.admin-wl-audit-chevron {
  transition: transform 160ms ease;
}

.admin-wl-audit[open] .admin-wl-audit-chevron {
  transform: rotate(180deg);
}

.admin-wl-audit-list {
  max-height: 320px;
  overflow: auto;
  border-top: 1px solid var(--wl-border);
}

.admin-wl-audit-list > p {
  margin: 0;
  padding: 1rem;
  color: var(--wl-muted);
  font-size: 0.73rem;
}

.admin-wl-audit-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-wl-audit-entry > .material-icons {
  color: rgba(255, 255, 255, 0.28);
  font-size: 16px;
}

.admin-wl-audit-entry > span {
  display: grid;
  gap: 0.15rem;
}

.admin-wl-audit-entry strong {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.71rem;
}

.admin-wl-audit-entry small,
.admin-wl-audit-entry time {
  color: rgba(255, 255, 255, 0.36);
  font-size: 0.64rem;
}

.admin-wl-modal[hidden],
.admin-wl-toast[hidden] {
  display: none;
}

.admin-wl-modal {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.admin-wl-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
}

.admin-wl-dialog {
  position: relative;
  width: min(100%, 430px);
  padding: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: #151519;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
  animation: admin-wl-dialog-in 180ms ease both;
}

.admin-wl-dialog-icon {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 0.85rem;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 23, 72, 0.1);
  color: #ff587a;
  font-size: 20px;
}

.admin-wl-dialog h3 {
  margin: 0;
  color: #fff;
  font-size: 1.05rem;
}

.admin-wl-dialog > p {
  margin: 0.55rem 0 1rem;
  color: var(--wl-muted);
  font-size: 0.77rem;
  line-height: 1.55;
}

.admin-wl-dialog-account {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem;
  border: 1px solid var(--wl-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.admin-wl-dialog-account > .material-icons {
  color: rgba(255, 255, 255, 0.35);
  font-size: 19px;
}

.admin-wl-dialog-account > span {
  display: grid;
  gap: 0.1rem;
}

.admin-wl-dialog-account strong {
  color: #f5f5f6;
  font-size: 0.78rem;
}

.admin-wl-dialog-account small {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.66rem;
}

.admin-wl-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.admin-wl-dialog-actions button {
  min-height: 38px;
  padding: 0.5rem 0.75rem;
  border-radius: 7px;
  font: inherit;
  font-size: 0.73rem;
  font-weight: 680;
  cursor: pointer;
}

.admin-wl-cancel {
  border: 1px solid var(--wl-border);
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
}

.admin-wl-confirm {
  border: 1px solid rgba(255, 65, 103, 0.35);
  background: #d91642;
  color: #fff;
}

.admin-wl-confirm.is-critical {
  background: #b91035;
}

.admin-wl-confirm:disabled {
  opacity: 0.55;
  cursor: wait;
}

.admin-wl-toast {
  position: fixed;
  z-index: 10020;
  right: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--wl-border);
  border-radius: 9px;
  background: #1a1a1f;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 620;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  animation: admin-wl-toast-in 180ms ease both;
}

.admin-wl-toast .material-icons {
  font-size: 18px;
}

.admin-wl-toast.is-success .material-icons {
  color: #45d18a;
}

.admin-wl-toast.is-error .material-icons {
  color: #ff5f80;
}

.admin-wl-modal-open {
  overflow: hidden;
}

@keyframes admin-wl-spin {
  to { transform: rotate(360deg); }
}

@keyframes admin-wl-shimmer {
  to { background-position: -120% 0; }
}

@keyframes admin-wl-dialog-in {
  from { opacity: 0; transform: translateY(7px) scale(0.985); }
}

@keyframes admin-wl-toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

@media (max-width: 1100px) {
  .admin-wl-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-wl-summary article:nth-child(2) {
    border-right: 0;
  }

  .admin-wl-summary article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--wl-border);
  }

  .admin-wl-action span:not(.material-icons) {
    display: none;
  }
}

@media (max-width: 760px) {
  .admin-dashboard .admin-nav .main-nav:has(.admin-whitelist-tab) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-wl-header {
    align-items: flex-start;
  }

  .admin-wl-refresh {
    font-size: 0;
  }

  .admin-wl-refresh .material-icons {
    font-size: 18px;
  }

  .admin-wl-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-wl-search {
    width: 100%;
  }

  .admin-wl-result-count {
    padding-left: 0.2rem;
  }

  .admin-wl-table,
  .admin-wl-table tbody,
  .admin-wl-table tr,
  .admin-wl-table td {
    display: block;
    width: 100%;
  }

  .admin-wl-table thead {
    display: none;
  }

  .admin-wl-table tbody {
    display: grid;
    gap: 0.7rem;
    padding: 0.7rem;
  }

  .admin-wl-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border: 1px solid var(--wl-border);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.018);
  }

  .admin-wl-table td {
    min-width: 0;
    padding: 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .admin-wl-table td::before {
    display: block;
    margin-bottom: 0.35rem;
    color: rgba(255, 255, 255, 0.32);
    content: attr(data-label);
    font-size: 0.58rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  .admin-wl-table td:first-child,
  .admin-wl-table td:last-child {
    grid-column: 1 / -1;
  }

  .admin-wl-mobile-states {
    display: flex;
  }

  .admin-wl-row-actions {
    justify-content: flex-start;
  }

  .admin-wl-action span:not(.material-icons) {
    display: inline;
  }

  .admin-wl-audit-entry {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .admin-wl-audit-entry time {
    grid-column: 2;
  }
}

@media (max-width: 460px) {
  .admin-wl-summary {
    grid-template-columns: 1fr 1fr;
  }

  .admin-wl-summary article {
    min-height: 78px;
    padding: 0.85rem;
  }

  .admin-wl-summary strong {
    font-size: 1.25rem;
  }

  .admin-wl-shortcut {
    display: none;
  }

  .admin-wl-table tbody tr {
    grid-template-columns: 1fr;
  }

  .admin-wl-table td,
  .admin-wl-table td:first-child,
  .admin-wl-table td:last-child {
    grid-column: 1;
  }

  .admin-wl-row-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .admin-wl-action {
    justify-content: center;
  }

  .admin-wl-action.is-danger {
    grid-column: 1 / -1;
  }

  .admin-wl-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-wl-dialog-actions button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-wl-refresh,
  .admin-wl-table tbody tr,
  .admin-wl-action,
  .admin-wl-audit-chevron {
    transition: none;
  }

  .admin-wl-loading i,
  .admin-wl-refresh.is-loading .material-icons,
  .admin-wl-dialog,
  .admin-wl-toast {
    animation: none;
  }
}
