.dash-container { width: 1220px; max-width: 100%; margin-top: 20px; margin-bottom: 30px; }
.hidden { display: none; }
.dash-title { margin: 0 0 8px; font-family: "Montserrat", sans-serif; font-size: 18px; font-weight: 600; color: #fff; text-transform: uppercase; }
.muted { margin: 0; color: rgb(255 255 255 / 65%); font-family: "Montserrat", sans-serif; font-size: 13px; }
.error { color: #ff8d8d; min-height: 20px; font-family: "Montserrat", sans-serif; }
.boxBody { margin-bottom: 12px; padding: 16px; }
.login-card { max-width: 480px; margin: 80px auto; }
.login-discord-actions { margin-top: 16px; }
.login-discord-actions a { display: inline-block; text-decoration: none; text-align: center; }
#loginForm { display: grid; gap: 10px; }
label { display: flex; flex-direction: column; gap: 6px; color: rgb(255 255 255 / 85%); font-family: "Montserrat", sans-serif; font-size: 13px; }
input, select, textarea { background: rgb(255 255 255 / 5%); border: 1px solid rgb(255 255 255 / 10%); border-radius: 10px; padding: 10px 12px; color: #fff; font-family: "Montserrat", sans-serif; }
textarea {
  resize: none;
  overflow: hidden;
  min-height: 96px;
  line-height: 1.4;
}
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgb(190 190 190) 50%), linear-gradient(135deg, rgb(190 190 190) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 10px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 30px;
}
select:focus {
  outline: none;
  border-color: rgb(255 255 255 / 22%);
  background-color: rgb(255 255 255 / 8%);
}
select option {
  background: rgb(28 28 28);
  color: #fff;
}
select option:checked {
  background: linear-gradient(23deg, rgb(120 120 120) 0%, rgb(245 245 245) 55%);
  color: #000;
}
select option:hover,
select option:focus {
  background: rgb(60 60 60);
  color: #fff;
}

/* Native dark popup for deliveries filter (avoids white blank block in some browsers). */
#deliveriesStatus {
  appearance: auto;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
  background-image: none;
  padding-right: 12px;
  color-scheme: dark;
}
#deliveriesStatus option {
  background: #ffffff;
  color: #111111;
}
#deliveriesStatus option:checked,
#deliveriesStatus option:hover,
#deliveriesStatus option:focus {
  background: #2b6ac7;
  color: #ffffff;
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.chip { color: rgb(255 255 255 / 75%); background: rgb(255 255 255 / 8%); border: 1px solid rgb(255 255 255 / 10%); border-radius: 10px; padding: 7px 10px; font-family: "Montserrat", sans-serif; font-size: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { padding: 12px; border-radius: 12px; background: rgb(255 255 255 / 5%); border: 1px solid rgb(255 255 255 / 8%); }
.stat .k { color: rgb(255 255 255 / 65%); font-family: "Montserrat", sans-serif; font-size: 12px; }
.stat .v { margin-top: 6px; color: #fff; font-family: "Montserrat", sans-serif; font-size: 22px; font-weight: 600; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.products-tools { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.products-sort-label { min-width: 170px; }
.products-sort-label select { min-width: 170px; }
.product-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.promocode-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.product-form .full { grid-column: 1 / -1; }
.product-form .inline { flex-direction: row; align-items: center; }
.product-form .command-field { grid-column: span 2; }
.product-form .server-field { grid-column: span 1; }
.actions { display: flex; gap: 8px; }
.filters { display: flex; gap: 10px; align-items: end; margin-bottom: 10px; }
.players-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.status-dropdown {
  position: relative;
  min-width: 150px;
}
.status-dropdown__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgb(255 255 255 / 6%);
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 10px;
  padding: 9px 12px;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 15px;
  cursor: pointer;
}
.status-dropdown__btn:hover {
  background: rgb(255 255 255 / 10%);
}
.status-dropdown__chevron {
  color: rgb(220 220 220 / 90%);
  font-size: 12px;
  line-height: 1;
}
.status-dropdown__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: rgb(22 22 22 / 98%);
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 10px;
  box-shadow: 0 12px 25px rgb(0 0 0 / 45%);
  padding: 4px;
  z-index: 50;
}
.status-dropdown__item {
  width: 100%;
  text-align: left;
  background: transparent;
  color: rgb(255 255 255 / 88%);
  border: 0;
  border-radius: 8px;
  padding: 7px 8px;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  cursor: pointer;
}
.status-dropdown__item:hover {
  background: rgb(255 255 255 / 10%);
  color: #fff;
}
.status-dropdown__item.is-active {
  background: linear-gradient(23deg, rgb(80 80 80) 0%, rgb(220 220 220) 55%);
  color: #000;
  font-weight: 600;
}
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th, td { border-bottom: 1px solid rgb(255 255 255 / 10%); padding: 10px 8px; text-align: left; color: #fff; font-family: "Montserrat", sans-serif; font-size: 12px; vertical-align: top; }
tr:hover td { background: rgb(255 255 255 / 6%); }
.drag-cell { width: 36px; text-align: center; color: rgb(255 255 255 / 55%); }
.drag-handle { cursor: grab; user-select: none; font-size: 15px; line-height: 1; }
tr.is-draggable td { transition: background-color 0.15s ease; }
tr.is-dragging { opacity: 0.55; }
tr.is-dragging td { background: rgb(120 120 120 / 22%) !important; }
.badge { display: inline-block; border-radius: 8px; padding: 3px 8px; font-size: 11px; font-family: "Montserrat", sans-serif; }
.badge.pending { background: rgb(255 196 85 / 15%); color: #ffd07b; }
.badge.issued, .badge.paid, .badge.active { background: rgb(120 255 170 / 15%); color: #abffd0; }
.badge.inactive { background: rgb(255 120 120 / 15%); color: #ffaaaa; }

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
}
.confirm-modal.hidden { display: none; }
.confirm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 72%);
  backdrop-filter: blur(2px);
}
.confirm-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(460px, calc(100vw - 32px));
  border-radius: 14px;
  background: linear-gradient(180deg, rgb(18 20 24 / 96%), rgb(15 16 20 / 96%));
  border: 1px solid rgb(255 255 255 / 16%);
  box-shadow: 0 18px 40px rgb(0 0 0 / 45%);
}
.confirm-modal__dialog .muted {
  margin-top: 2px;
  margin-bottom: 12px;
  color: rgb(255 255 255 / 82%);
}
.confirm-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.players-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
}
.players-modal.hidden { display: none; }
.players-modal__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgb(0 0 0 / 70%);
}
.players-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - 52px);
  overflow: auto;
  border-radius: 14px;
  margin-top: 20px;
  margin-bottom: 20px;
  background: rgb(25 25 25);
  border: 1px solid rgb(60 60 60);
  box-shadow: 0 5px 20px 10px rgb(0 0 0 / 60%);
  padding: 18px;
}
.players-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
  padding-bottom: 10px;
}
.players-modal__dialog .dash-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 18px;
}
.players-modal__dialog .muted {
  color: rgb(255 255 255 / 60%);
  font-size: 13px;
}
.players-modal .table-wrap table {
  min-width: 520px;
}
.players-modal .table-wrap th {
  font-size: 12px;
  color: rgb(255 255 255 / 70%);
  font-weight: 500;
}
.players-modal .table-wrap td {
  background: rgb(255 255 255 / 3%);
  border-bottom: 1px solid rgb(255 255 255 / 8%);
}
.players-modal .table-wrap tr:hover td {
  background: rgb(255 255 255 / 8%);
}
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
}
.product-modal.hidden { display: none; }
.product-modal__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgb(0 0 0 / 72%);
  backdrop-filter: blur(2px);
}
.product-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 14px;
  background: rgb(25 25 25);
  border: 1px solid rgb(60 60 60);
  box-shadow: 0 10px 30px rgb(0 0 0 / 55%);
}
.product-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}
.player-balance-input {
  width: 140px;
  background: rgb(255 255 255 / 5%);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 10px;
  padding: 8px 10px;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
}
.player-balance-input::-webkit-outer-spin-button,
.player-balance-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.player-balance-input[type=number] {
  -moz-appearance: textfield;
}

#pPrice::-webkit-outer-spin-button,
#pPrice::-webkit-inner-spin-button,
#pDiscount::-webkit-outer-spin-button,
#pDiscount::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#pPrice[type=number],
#pDiscount[type=number] {
  -moz-appearance: textfield;
}

@media (max-width: 860px) {
  .product-form {
    grid-template-columns: 1fr 1fr;
  }
  .promocode-form {
    grid-template-columns: 1fr 1fr;
  }
  .product-form .command-field,
  .product-form .server-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .topbar,
  .players-head,
  .section-head,
  .product-modal__head {
    flex-direction: column;
    align-items: stretch;
  }
  .product-form {
    grid-template-columns: 1fr;
  }
  .promocode-form {
    grid-template-columns: 1fr;
  }
  .actions {
    flex-direction: column;
  }
  .products-tools {
    flex-direction: column;
    align-items: stretch;
  }
}
