* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background:
    radial-gradient(circle at top left, rgba(255, 59, 59, 0.16), transparent 35%),
    radial-gradient(circle at bottom right, rgba(88, 101, 242, 0.15), transparent 35%),
    #080810;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100vh;
}

.admin-page {
  padding: 60px 7% 90px;
}

.admin-hero {
  margin-bottom: 36px;
}

.admin-tagline {
  color: #ffd166;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.admin-hero h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1;
  margin-bottom: 18px;
}

.admin-hero p {
  color: #b8b8c8;
  line-height: 1.7;
  max-width: 860px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 25px;
  align-items: start;
  margin-bottom: 38px;
}

.create-card,
.created-card,
.users-panel {
  background: rgba(17, 17, 29, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 26px;
  padding: 28px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.28);
}

.create-card h2,
.created-card h2,
.users-panel h2 {
  font-size: 2rem;
  margin-bottom: 22px;
}

.create-card label {
  display: block;
  color: #aaaabb;
  font-size: 0.9rem;
  font-weight: 900;
  margin: 18px 0 8px;
}

.create-card input,
.users-tools input,
.user-action input,
.market-edit-action input {
  width: 100%;
  background: #080810;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 15px;
  outline: none;
  font-weight: 800;
}

.create-card input:focus,
.users-tools input:focus,
.user-action input:focus,
.market-edit-action input:focus {
  border-color: #5865f2;
}

.name-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.name-row span {
  color: #ffffff;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 15px;
}

.random-risk-box {
  margin-top: 22px;
  background: rgba(255, 209, 102, 0.1);
  border: 1px solid rgba(255, 209, 102, 0.22);
  border-radius: 18px;
  padding: 16px;
}

.random-risk-box strong {
  display: block;
  color: #ffd166;
  font-size: 1.05rem;
  margin-bottom: 5px;
}

.random-risk-box span {
  color: #d8d8e8;
  font-size: 0.92rem;
}

.create-card button,
.created-header button,
.users-tools button,
.user-action button,
.market-edit-action button {
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  background: #5865f2;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s ease;
}

.create-card button {
  width: 100%;
  margin-top: 22px;
  background: #ff3b3b;
}

.create-card button:hover {
  background: #ff5a5a;
  transform: translateY(-2px);
}

.created-header button:hover,
.users-tools button:hover,
.user-action button:hover,
.market-edit-action button:hover {
  background: #6d78f5;
  transform: translateY(-2px);
}

.admin-message {
  min-height: 22px;
  margin-top: 16px;
  color: #ffd166;
  font-weight: 800;
  text-align: center;
}

.created-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.created-header h2 {
  margin-bottom: 0;
}

.admin-coin-list {
  display: grid;
  gap: 18px;
}

.admin-coin-item {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 20px;
}

.admin-coin-top {
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.admin-coin-img {
  width: 95px;
  height: 95px;
  object-fit: contain;
  border-radius: 18px;
  background: transparent;
}

.admin-coin-top h3 {
  font-size: 1.35rem;
  margin-bottom: 8px;
}

.admin-coin-top p {
  color: #b8b8c8;
  line-height: 1.6;
  font-size: 0.93rem;
}

.admin-coin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
}

.admin-coin-meta span {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: capitalize;
}

.market-edit-box {
  margin-top: 16px;
  background: rgba(88, 101, 242, 0.1);
  border: 1px solid rgba(88, 101, 242, 0.2);
  border-radius: 18px;
  padding: 16px;
}

.market-edit-box.locked {
  color: #aaaabb;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  font-weight: 800;
  text-align: center;
}

.market-edit-box strong {
  display: block;
  color: #9ca5ff;
  margin-bottom: 6px;
  font-size: 1rem;
}

.market-edit-box span {
  display: block;
  color: #b8b8c8;
  line-height: 1.5;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.market-edit-action {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 10px;
}

.owner-final-box {
  border-color: rgba(255, 209, 102, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(17, 17, 29, 0.94);
}

.owner-final-box strong {
  color: #ffd166;
}

.owner-final-box span {
  color: #d8d8e8;
}

.owner-final-box input {
  border-color: rgba(255, 209, 102, 0.22);
}

.owner-final-box input:focus {
  border-color: #ffd166;
}

.owner-final-box button {
  background: #ffd166;
  color: #080810;
}

.owner-final-box button:hover {
  background: #ffe08a;
}

.owner-delete-box {
  border-color: rgba(255, 59, 59, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 59, 59, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(17, 17, 29, 0.94);
}

.owner-delete-box strong {
  color: #ff6b6b;
}

.owner-delete-box span {
  color: #ffd1d1;
}

.delete-warning {
  background: rgba(255, 59, 59, 0.14);
  border: 1px solid rgba(255, 59, 59, 0.24);
  color: #ffffff;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 900;
  margin-bottom: 12px;
  text-align: center;
}

.delete-coin-btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  background: #ff3b3b;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s ease;
}

.delete-coin-btn:hover {
  background: #ff5a5a;
  transform: translateY(-2px);
}

.final-value-box {
  margin-top: 16px;
  background: rgba(255, 59, 59, 0.1);
  border: 1px solid rgba(255, 59, 59, 0.2);
  border-radius: 18px;
  padding: 16px;
}

.final-value-box strong {
  display: block;
  color: #ff6b6b;
  margin-bottom: 7px;
}

.final-value-box span {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.final-value-box p {
  color: #d8d8e8;
  line-height: 1.5;
}

.final-value-box.finished {
  background: rgba(77, 255, 157, 0.1);
  border-color: rgba(77, 255, 157, 0.22);
}

.final-value-box.finished strong {
  color: #4dff9d;
}

.final-value-box.muted {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #b8b8c8;
  font-weight: 800;
  text-align: center;
}

.users-panel {
  margin-top: 0;
}

.users-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.users-header h2 {
  margin-bottom: 0;
}

.users-tools {
  display: flex;
  gap: 10px;
  align-items: center;
}

.users-tools input {
  min-width: 260px;
}

.users-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1050px;
}

.users-table th,
.users-table td {
  padding: 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.users-table th {
  color: #aaaabb;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.04);
}

.users-table td {
  color: #ffffff;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-pfp {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #222236;
}

.user-name {
  font-weight: 900;
  margin-bottom: 4px;
}

.user-id {
  color: #777789;
  font-size: 0.78rem;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roles-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.role-pill,
.status-pill {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: capitalize;
}

.role-pill.owner {
  background: rgba(255, 209, 102, 0.14);
  color: #ffd166;
  border: 1px solid rgba(255, 209, 102, 0.22);
}

.role-pill.admin {
  background: rgba(255, 59, 59, 0.14);
  color: #ff6b6b;
  border: 1px solid rgba(255, 59, 59, 0.22);
}

.role-pill.staff,
.role-pill.support {
  background: rgba(88, 101, 242, 0.16);
  color: #9ca5ff;
  border: 1px solid rgba(88, 101, 242, 0.22);
}

.role-pill.user {
  background: rgba(255, 255, 255, 0.08);
  color: #aaaabb;
}

.status-pill.good {
  background: rgba(77, 255, 157, 0.12);
  color: #4dff9d;
  border: 1px solid rgba(77, 255, 157, 0.22);
}

.status-pill.banned {
  background: rgba(255, 59, 59, 0.14);
  color: #ff6b6b;
  border: 1px solid rgba(255, 59, 59, 0.24);
}

.ban-reason {
  color: #aaaabb;
  font-size: 0.82rem;
  margin-top: 8px;
  line-height: 1.4;
  max-width: 220px;
}

.action-grid {
  display: grid;
  gap: 10px;
  min-width: 260px;
}

.user-action {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.user-action.full {
  grid-template-columns: 1fr;
}

.user-action.danger button {
  background: #ff3b3b;
}

.user-action.danger button:hover {
  background: #ff5a5a;
}

.user-action.safe button {
  background: #4dff9d;
  color: #080810;
}

.user-action.safe button:hover {
  background: #72ffb2;
}

.mini-message {
  color: #aaaabb;
  font-weight: 800;
}

.users-pagination {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.users-pagination button {
  border: none;
  border-radius: 12px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s ease;
}

.users-pagination button:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.users-pagination button.active {
  background: #5865f2;
}

.users-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.no-access {
  width: 100%;
  max-width: 620px;
  margin: 80px auto;
  background: rgba(17, 17, 29, 0.94);
  border: 1px solid rgba(255, 59, 59, 0.22);
  border-radius: 24px;
  padding: 32px;
  color: #ff6b6b;
  text-align: center;
  font-weight: 900;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.28);
}

@media (max-width: 1150px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .users-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .users-tools {
    width: 100%;
  }

  .users-tools input {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 700px) {
  .admin-page {
    padding: 40px 5% 70px;
  }

  .create-card,
  .created-card,
  .users-panel {
    padding: 22px;
  }

  .admin-coin-top {
    grid-template-columns: 1fr;
  }

  .admin-coin-img {
    width: 120px;
    height: 120px;
  }

  .created-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .created-header button {
    width: 100%;
  }

  .market-edit-action,
  .user-action,
  .users-tools {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .market-edit-action button,
  .user-action button,
  .users-tools button {
    width: 100%;
  }

  .name-row {
    grid-template-columns: 1fr;
  }
}