

body.admin { overflow: hidden; }

.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.dim-text { color: var(--dim); }
.win-text { color: var(--win); font-weight: 900; }
.hint { color: var(--dim); font-size: 13px; }

.btn-danger { --fill: var(--loss); --lip: #a3233f; --ink: #fff; }

.tag {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  background: var(--raised);
  color: var(--muted);
  text-transform: capitalize;
}
.tag-red { background: rgba(255, 90, 118, .18); color: var(--loss); }
.tag-gold { background: rgba(255, 203, 61, .16); color: var(--gold); }
.tag-violet { background: rgba(242, 56, 74, .2); color: var(--violet-hi); }

code {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: .92em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--gem);
}



.login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
  background:
    radial-gradient(circle at 20% 10%, rgba(242, 56, 74, .22), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(255, 203, 61, .1), transparent 40%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 28px;
  border-width: 2px;
  box-shadow: 0 8px 0 #0d0f15;
  animation: riseIn .5s cubic-bezier(.2, .8, .3, 1);
}

.login-logo { width: 64px; height: 64px; animation: bob 3.4s ease-in-out infinite; }
.login-card h1 { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.1; }
.login-sub { color: var(--muted); font-size: 14px; }
.form-error { min-height: 1.2em; color: var(--loss); font-weight: 800; font-size: 14px; }



.admin-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.admin-nav .brand-section { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.admin-nav .brand-icon { width: 38px; height: 38px; }
.brand-stack { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.brand-stack .brand-wordmark { max-width: 120px; height: auto; }
.brand-tag { font-size: 11px; font-weight: 900; color: var(--violet-hi); }
.login-wordmark { width: 100%; max-width: 260px; height: auto; margin-top: -4px; }
.admin-nav nav { display: flex; flex-direction: column; gap: 2px; }

.nav-count {
  margin-left: auto;
  min-width: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--gold);
  color: #3a2500;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}
.nav-count:empty { display: none; }

.admin-nav-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  font-size: 13px;
  color: var(--dim);
}
.admin-nav-footer strong { color: var(--text); }

.admin-main { overflow-y: auto; padding: 28px 32px 56px; }
.admin-main > * { max-width: 1280px; margin-inline: auto; }

.admin-section { display: none; }
.admin-section.active { display: block; animation: viewIn .2s ease-out; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 18px;
}
.section-head .view-sub { flex-basis: 100%; }

.sub-title { font-size: 16px; font-weight: 900; margin: 24px 0 10px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }



.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.stat-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  animation: riseIn .35s ease-out backwards;
  animation-delay: calc(var(--i) * 40ms);
}
.stat-tile span { color: var(--muted); font-weight: 700; font-size: 13px; }
.stat-tile strong { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.2; }
.stat-tile small { color: var(--dim); font-size: 12px; font-weight: 700; }

.list-panel { padding: 16px 18px; }
.list-panel h3, .stack-form h3 { font-size: 16px; font-weight: 900; margin-bottom: 8px; }

.mini-list { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }

.mini-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  min-width: 0;
}
.mini-row:last-child { border-bottom: 0; }
.mini-row img { width: 26px; height: 26px; border-radius: 8px; flex: none; background: var(--raised); }
.mini-row > span:first-of-type { flex: 1; min-width: 0; }
.mini-row time { margin-left: auto; color: var(--dim); font-size: 12px; white-space: nowrap; }
.chat-row .grow { overflow-wrap: anywhere; }



.lookup-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 18px;
  border-width: 2px;
  border-color: var(--line-2);
}

.lookup-bar + .hint { margin: 8px 4px 16px; }

.players-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: 12px;
  align-items: start;
}

.table-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 6px;
}

.table-tools .filter-controls { margin: 0; }
.input-with-icon.small { height: 38px; flex: 1 1 200px; max-width: 280px; }

.custom-table.clickable tbody tr { cursor: pointer; transition: background-color .12s; }
.custom-table.clickable tbody tr:hover { background: rgba(242, 56, 74, .08); }
.custom-table.clickable tbody tr.selected { background: rgba(242, 56, 74, .16); box-shadow: inset 3px 0 0 var(--violet); }
.custom-table td small { display: block; font-size: 11px; color: var(--dim); font-weight: 700; }
.custom-table td, .custom-table th { padding-left: 16px; padding-right: 16px; }

.player-panel {
  position: sticky;
  top: 0;
  padding: 18px;
  max-height: calc(100dvh - 60px);
  overflow-y: auto;
}

.player-panel .empty-state { border: 0; background: none; padding: 40px 12px; }
.player-panel.opened > * { animation: riseIn .3s ease-out backwards; }
.player-panel.opened > *:nth-child(2) { animation-delay: .04s; }
.player-panel.opened > *:nth-child(3) { animation-delay: .08s; }
.player-panel.opened > *:nth-child(4) { animation-delay: .12s; }
.player-panel.opened > *:nth-child(5) { animation-delay: .16s; }
.player-panel.opened > *:nth-child(6) { animation-delay: .2s; }

.player-head { display: flex; align-items: center; gap: 14px; }
.player-avatar { width: 64px; height: 64px; border-radius: 18px; border: 3px solid var(--line-2); background: var(--raised); }
.player-id { flex: 1; min-width: 0; }
.player-id h3 { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.1; overflow-wrap: anywhere; }
.player-id h3 small { font-family: var(--body); font-size: 13px; color: var(--dim); font-weight: 700; }
.player-id > span { font-size: 12px; color: var(--dim); font-weight: 700; }
.player-id a { color: var(--violet-hi); }
.player-tags { margin-top: 4px; }

.player-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.player-stats > div {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg);
}
.player-stats span { font-size: 12px; color: var(--muted); font-weight: 700; }
.player-stats strong { font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.2; display: inline-block; }
.player-stats small { font-size: 11px; color: var(--dim); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }

.notice {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 203, 61, .1);
  color: var(--gold);
  font-size: 14px;
  margin-bottom: 12px;
}

.player-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.player-block h4 { font-size: 15px; font-weight: 900; }
.player-block h4 small { color: var(--dim); font-weight: 700; font-size: 13px; }

.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.level-row { margin-left: auto; }
.role-row { margin-top: 10px; }
.role-row .custom-select { height: 40px; min-width: 150px; }
.input-with-icon.count { width: 84px; flex: none; }

.seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--bg);
}
.seg-btn { height: 34px; border-radius: 9px; font-weight: 800; color: var(--muted); font-size: 14px; }
.seg-btn.active { background: var(--raised); color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.chip:hover { color: var(--text); border-color: var(--violet); }

.admin-inventory { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }

.admin-pet {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 8px;
  border-radius: 12px;
  background: var(--bg);
}
.admin-pet > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-pet strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-pet span:not(.pet-img) { font-size: 12px; color: var(--gem); font-weight: 800; }

.icon-btn.danger:hover { color: var(--loss); background: rgba(255, 90, 118, .12); }



.pet-picker { position: relative; }

.picker-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  display: none;
  max-height: 340px;
  overflow-y: auto;
  padding: 6px;
  background: var(--panel);
  border: 2px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 6px 0 #0d0f15;
}
.picker-results.open { display: block; animation: riseIn .15s ease-out; }

.picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}
.picker-item .pet-img { width: 34px; height: 34px; }
.picker-item span:not(.pet-img) { flex: 1; min-width: 0; }
.picker-item strong { color: var(--gem); font-size: 13px; }
.picker-item:hover, .picker-item.active { background: var(--raised); }
.picker-empty { padding: 10px; color: var(--dim); font-size: 14px; }



.inline-form {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px;
  margin-bottom: 16px;
}
.inline-form .form-group:not(.grow) { width: 160px; }

.admin-giveaways .giveaway-card.ended { opacity: .6; }

.pet-row { display: flex; gap: 2px; }
.pet-row .pet-img { width: 30px; height: 30px; }

.stack-form { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; }
.stack-form .hint { margin-top: -6px; }
.stack-form .btn { align-self: flex-start; }

textarea {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  resize: vertical;
  outline: none;
}
textarea:focus { border-color: var(--violet); }

#sec-chat .list-panel { margin-top: 12px; }



.confirm-card { max-width: 420px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }

.quick-amounts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.treasury-result-card {
  padding: 16px;
  border-radius: 12px;
  background: var(--raised);
  border: 1px solid var(--violet);
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fee-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.breakdown-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.breakdown-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

.breakdown-info strong {
  color: var(--text);
  font-weight: 800;
}

.breakdown-bar {
  width: 100%;
  height: 8px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}

.breakdown-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gem), var(--violet-hi));
  border-radius: 999px;
  transition: width 0.4s ease;
}

.bots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.bot-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.bot-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bot-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--violet);
  background: var(--bg);
}

.bot-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.bot-info strong {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-info span {
  font-size: 12px;
}

.bot-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 10px;
  background: var(--bg);
  border-radius: 10px;
}

.bot-stats-row > div {
  display: flex;
  flex-direction: column;
}

.bot-stats-row span {
  font-size: 11px;
  color: var(--dim);
}

.bot-stats-row strong {
  font-size: 13px;
  color: var(--text);
  font-weight: 800;
}

.bot-active-trade {
  font-size: 12px;
  color: var(--gold);
  background: rgba(255, 203, 61, 0.1);
  padding: 6px 10px;
  border-radius: 6px;
}

.bot-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}



@media (max-width: 1180px) {
  .players-layout { grid-template-columns: 1fr; }
  .player-panel { position: static; max-height: none; order: -1; }
}

@media (max-width: 860px) {
  body.admin { overflow: auto; }
  .admin-layout { grid-template-columns: 1fr; height: auto; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-nav .brand-section { padding: 0 8px 0 0; }
  .admin-nav nav { flex-direction: row; overflow-x: auto; flex: 1 1 100%; order: 3; }
  .admin-nav nav .nav-item { width: auto; white-space: nowrap; }
  .admin-nav-footer { flex-direction: row; align-items: center; margin: 0 0 0 auto; padding: 0; }
  .admin-nav-footer > span { display: none; }
  .admin-main { padding: 20px 16px 48px; overflow: visible; }
  .two-col { grid-template-columns: 1fr; }
  .lookup-bar { flex-direction: column; align-items: stretch; }
  .player-stats { grid-template-columns: 1fr 1fr; }
  .level-row { margin-left: 0; }
}

.bot-card.bot-banned { border-color: #ef4444; box-shadow: 0 0 16px rgba(239, 68, 68, 0.2); }
.tag-red { background: rgba(239, 68, 68, 0.15); color: #ef4444; border-color: rgba(239, 68, 68, 0.3); }
.pet-cell { display: flex; align-items: center; gap: 8px; }
.pet-cell img { width: 28px; height: 28px; object-fit: contain; }
.pet-cell .gem-icon { width: 20px; height: 20px; }

.slowmode-form { margin-top: 12px; }
.slowmode-form .chip.active { border-color: var(--violet); color: var(--text); background: rgba(242, 56, 74, .2); }

/* roles */
.role-color-input { width: 44px; height: 40px; padding: 2px; border: 2px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; }
.role-staff-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--muted); align-self: center; }
.role-preview { align-self: center; }
.role-badge-preview { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.role-line { gap: 10px; }
.role-line .role-badge-preview { min-width: 80px; justify-content: center; }
.role-edit-name { flex: 1; min-width: 100px; height: 34px; padding: 0 10px; border: 2px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); font: inherit; font-weight: 700; }
.role-line .role-color-input { width: 38px; height: 34px; }

/* daily rewards editor */
.rw-form { margin-top: 12px; gap: 12px; }
.rw-row { align-items: flex-end; gap: 16px; }
.rw-enabled { align-self: center; margin-right: 8px; }
.input-with-icon.count-wide { width: 170px; height: 40px; }
.rw-tier-editor { display: flex; flex-direction: column; gap: 6px; }
.rw-tier-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--bg); }
.rw-tier-row label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--muted); }
.rw-tier-level { width: 80px; height: 36px; padding: 0 10px; border: 2px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); font: inherit; font-weight: 800; }
.rw-tier-row .input-with-icon.count-wide { height: 36px; }
.rw-tier-row .rw-tier-del { margin-left: auto; }

/* games: house edge */
.edge-form { margin-top: 12px; gap: 12px; max-width: 640px; }
.edge-row { align-items: flex-start; gap: 24px; }
.edge-row .input-with-icon .hint { margin-left: 4px; }
.edge-row .form-group > .hint { margin-top: 6px; max-width: 240px; }

/* pet values */
.val-filters { margin-bottom: 10px; gap: 12px; align-items: center; }
.val-row { gap: 10px; flex-wrap: wrap; }
.val-row .input-with-icon.count-wide { height: 36px; }
.val-tag { margin-left: 6px; }
#valImportText { width: 100%; font-family: ui-monospace, monospace; font-size: 13px; }

/* daily cases editor */
.rw-case-editor { display: flex; flex-direction: column; gap: 12px; }
.rw-case { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--bg); }
.rw-case-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rw-case-head .input-with-icon { height: 40px; min-width: 180px; }
.rw-case-level-label, .rw-item-weight-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--muted); }
.rw-case-level, .rw-item-weight { width: 80px; height: 36px; padding: 0 10px; border: 2px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--text); font: inherit; font-weight: 800; }
.rw-case-items { display: flex; flex-direction: column; gap: 6px; }
.rw-item-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; border-radius: 10px; background: var(--panel); }
.rw-item-row .input-with-icon { height: 36px; }
.rw-item-pet-wrap { position: relative; min-width: 220px; flex: 1; }
.rw-item-pet-wrap .input-with-icon { height: 36px; }
.rw-item-chance { min-width: 60px; font-weight: 900; font-size: 13px; color: var(--violet-hi, #ff5a68); }
.rw-item-row .rw-item-del { margin-left: auto; }
.rw-case-ev { font-weight: 700; }

/* pet drops */
.drop-form { margin-top: 12px; gap: 12px; }
.drop-row { gap: 16px; align-items: flex-end; }
.drop-picked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.drop-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 6px; border-radius: 10px; background: var(--bg); font-size: 13px; font-weight: 700; }
.drop-chip img { width: 28px; height: 28px; object-fit: contain; }
.drop-chip small { color: var(--muted); }
.drop-chip .icon-btn { width: 26px; height: 26px; }

.val-cosmic { background: rgba(242, 56, 74, .2); color: #ffb3ba; }
.val-rap { background: rgba(255, 255, 255, .06); color: var(--muted); }

.login-card { align-items: stretch; text-align: center; }
.login-card .login-logo, .login-card .login-wordmark { align-self: center; }
.login-card .form-group { text-align: left; }

.btn-filter { display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 12px; border-radius: 6px; background: #1f222e; border: 1px solid #313546; color: var(--muted); font-size: 12px; font-weight: 700; }
.btn-filter:hover { background: #2b2f40; color: var(--text); }
.btn-filter.active, .btn-filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.section-head { align-items: center; }
.stat-grid { align-items: stretch; }
.stat-tile { justify-content: center; }

#treasuryDepositForm { padding: 0; margin: 0; align-items: center; }
#treasuryDepositForm .input-with-icon { flex: 1; }

#sec-bots div:has(> #ledgerSearchInput) { align-items: center; flex-wrap: wrap; }
#ledgerSearchInput, #ledgerBotFilter { height: 34px; }
#ledgerSearchInput { flex: 1; min-width: 180px; }

.input-with-icon:has(> input + .hint) { gap: 8px; }
.input-with-icon:has(> input + .hint) > input { width: auto; flex: 1; min-width: 0; }
.input-with-icon > input + .hint { position: static; flex: none; color: var(--muted); font-weight: 800; }

.mini-row.role-line > .role-badge-preview { flex: none; }
.role-line .role-staff-check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

#playerSearch { min-width: 180px; }
.lookup-bar + .hint { text-align: center; }

.edge-form { max-width: none; }
.row { align-items: center; }
.panel > h3, .panel > header { text-align: left; }
.empty-box, .detail-empty { display: grid; place-items: center; text-align: center; }

/* =====================================================================
   Fee payout card + Bot accounts (refresh)
   ===================================================================== */
.tag-win { background: rgba(52, 215, 123, .16); color: var(--win); }
.struck { text-decoration: line-through; opacity: .6; }
.danger-text { color: var(--loss) !important; }

.payout-card { border: 1px solid rgba(242, 56, 74, .45); background: linear-gradient(180deg, rgba(242, 56, 74, .14), rgba(242, 56, 74, .04)); border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px; }
.payout-card[hidden] { display: none; }
.payout-card.is-completed { border-color: rgba(52, 215, 123, .5); background: linear-gradient(180deg, rgba(52, 215, 123, .14), rgba(52, 215, 123, .03)); }
.payout-card.is-cancelled, .payout-card.is-expired { border-color: var(--line-strong); background: var(--card-2); }
.payout-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.payout-top strong { font-size: 15px; }
.payout-timer { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--muted); font-size: 13px; }
.payout-what { margin: 0; color: var(--muted); }
.payout-what b { color: var(--text); }
.payout-what .gem-text, .payout-steps .gem-text { color: var(--gem); }
.payout-steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.payout-steps b { color: var(--text); }
.payout-steps .btn { margin-left: 8px; vertical-align: middle; }
.payout-live { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; padding: 8px 10px; border-radius: 8px; background: rgba(0, 0, 0, .2); }
.payout-live::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.payout-live.on::before { background: var(--win); box-shadow: 0 0 0 0 rgba(52, 215, 123, .6); animation: payoutPulse 1.4s infinite; }
.payout-live.wait::before { animation: payoutPulse 1.4s infinite; }
.payout-live.off { color: var(--loss); }
.payout-live.off::before { background: var(--loss); }
@keyframes payoutPulse { 70% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); } }
.payout-actions { display: flex; justify-content: flex-end; }

.bots-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); align-items: start; }
.bot-card { text-align: left; align-items: stretch; }
.bot-card.bot-online { border-color: rgba(52, 215, 123, .35); }
.bot-card-head { justify-content: flex-start; text-align: left; }
.bot-avatar-wrap { position: relative; flex: none; }
.bot-avatar { display: block; object-fit: cover; }
.bot-dot { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: #5f6578; border: 2px solid var(--card); }
.bot-dot.on { background: var(--win); }
.bot-info { align-items: flex-start; }
.bot-stats-row { grid-template-columns: repeat(4, 1fr); text-align: left; }
.bot-stats-row strong.gem-text { color: var(--gem); }
.bot-notes { margin: 0; }
.bot-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.bot-actions > .btn { width: 100%; justify-content: center; }
.bot-actions > span:empty { display: none; }
.bot-actions .bot-join { grid-column: 1 / -1; }
.bot-actions > span:empty { display: none; }
@media (max-width: 520px) {
  .bots-grid { grid-template-columns: 1fr; }
  .bot-stats-row { grid-template-columns: 1fr 1fr; }
}

/* Maintenance mode panel */
.maint-panel { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.maint-info { flex: 1 1 260px; min-width: 0; }
.maint-info h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; }
.maint-info .hint { margin: 0; }
.maint-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--win); box-shadow: 0 0 0 4px rgba(52, 215, 123, .15); }
.maint-panel.is-on { border-color: rgba(255, 90, 118, .5); background: linear-gradient(180deg, rgba(255, 90, 118, .1), transparent), var(--card); }
.maint-panel.is-on .maint-dot { background: var(--loss); box-shadow: 0 0 0 4px rgba(255, 90, 118, .18); }
#maintMessage { flex: 2 1 260px; min-width: 0; height: 40px; }

/* =====================================================================
   Overview: grouped stats + 7-day charts
   ===================================================================== */
.ov-group { margin-bottom: 18px; }
.ov-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ov-title svg { width: 16px; height: 16px; fill: none; stroke: var(--violet-hi); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ov-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.ov-grid .stat-tile { padding: 14px 16px; }
.ov-grid .stat-tile strong { display: inline-flex; align-items: center; gap: 8px; font-size: 26px; }
.stat-tile.ov-online { border-color: rgba(52, 215, 123, .35); background: linear-gradient(180deg, rgba(52, 215, 123, .08), transparent 70%), var(--card); }
.ov-live { width: 10px; height: 10px; border-radius: 50%; background: var(--win); box-shadow: 0 0 0 0 rgba(52, 215, 123, .6); animation: ovPulse 1.6s infinite; }
@keyframes ovPulse { 70% { box-shadow: 0 0 0 8px rgba(52, 215, 123, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 215, 123, 0); } }
.ov-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.ov-chart { padding: 14px 16px 10px; }
.ov-chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.ov-chart-head .hint { margin: 0; }
.ov-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 160px; align-items: end; }
.ov-bar { height: 100%; display: grid; grid-template-rows: auto 1fr auto; align-items: end; justify-items: center; gap: 4px; }
.ov-bar i { display: block; width: 100%; max-width: 38px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--violet-hi), rgba(242, 56, 74, .35)); align-self: end; transition: height .4s ease; }
.ov-bar.today i { background: linear-gradient(180deg, #ffb3ba, var(--violet)); box-shadow: 0 0 14px -4px var(--violet); }
.ov-bar-val { font-size: 10.5px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.ov-bar small { font-size: 11px; font-weight: 800; color: var(--dim); }
.ov-bar.today small { color: var(--text); }
.ov-lists { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ov-online-tag { font-size: 11px; font-weight: 900; color: var(--win); }
@media (max-width: 1180px) { .ov-lists { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .ov-charts, .ov-lists { grid-template-columns: 1fr; } }

/* withdraw all fees */
.fee-all { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 12px; background: rgba(245, 196, 81, .08); border: 1px solid rgba(245, 196, 81, .35); }
.fee-all-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.fee-all-head strong { font-size: 15px; }
.fee-all-head span { font-weight: 900; color: #f5c451; }
.fee-all-steps { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: 13px; color: var(--muted); }
.fee-all-row { gap: 8px; }
.fee-all-row .input-with-icon { height: 42px; }
.fee-or { margin-top: 4px; }

.login-or { display: flex; align-items: center; gap: 10px; margin: 6px 0; color: var(--muted, #8a90a3); font-size: 12px; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .08); }
.login-hint { text-align: center; margin-top: 4px; font-size: 12px; }

/* Upgrader pets */
.upg-add-row { align-items: flex-end; gap: 12px; }
.upg-add-row .form-group { margin: 0; }
.upg-list-head { align-items: center; margin-bottom: 8px; }
.upg-list-head h3 { margin: 0; }
.upg-row, #upgCatalogList .mini-row { display: flex; align-items: center; gap: 10px; }
.upg-row img, .upg-row .pet-img, #upgCatalogList .mini-row img, #upgCatalogList .mini-row .pet-img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.upg-count { width: 110px; }
.upg-count input { width: 60px; }
.upg-val { display: inline-flex; align-items: center; gap: 4px; min-width: 90px; justify-content: flex-end; }
#upgCatalogList { max-height: 420px; overflow: auto; }
@media (max-width: 640px) {
  .upg-row { flex-wrap: wrap; }
  .upg-row .grow { flex-basis: calc(100% - 52px); }
}
.upg-row > .pet-img, #upgCatalogList .mini-row > .pet-img { flex: 0 0 40px !important; width: 40px !important; max-width: 40px; height: 40px; border-radius: 10px; overflow: hidden; }
.upg-row > .pet-img img, #upgCatalogList .mini-row > .pet-img img { width: 100%; height: 100%; object-fit: contain; }

/* =====================================================================
   ROGEMS Admin v2: 6 pages with tabs, refined dark-red control panel
   ===================================================================== */
body.admin { --adm-side: 236px; --adm-bg: #0a0b10; --adm-panel: #111319; --adm-panel-2: #161922; --adm-line: rgba(255,255,255,.07);
  background: radial-gradient(1200px 600px at 100% -10%, rgba(242,56,74,.07), transparent 60%), var(--adm-bg); font-family: Inter, Nunito, system-ui, sans-serif; }
body.admin .admin-layout { grid-template-columns: var(--adm-side) minmax(0, 1fr); }

/* side bar */
.adm-side { padding: 18px 12px 14px; background: linear-gradient(180deg, #0f1117, #0c0d12); border-right: 1px solid var(--adm-line); gap: 6px; }
.adm-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; margin-bottom: 6px; border-bottom: 1px solid var(--adm-line); }
.adm-brand-icon { width: 36px; height: 36px; filter: drop-shadow(0 4px 12px rgba(242,56,74,.45)); }
.adm-brand span { display: grid; gap: 3px; min-width: 0; }
.adm-brand-word { width: 118px; height: auto; }
.adm-brand small { font-size: 10px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-hi); }
.adm-pages { display: grid; gap: 3px; padding-top: 6px; }
.adm-page { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 11px; background: none; color: var(--muted);
  font: inherit; font-size: 14px; font-weight: 800; text-align: left; cursor: pointer; transition: background .15s ease, color .15s ease; }
.adm-page svg { width: 19px; height: 19px; flex: none; }
.adm-page:hover { background: rgba(255,255,255,.04); color: var(--text); }
.adm-page.active { color: #fff; background: linear-gradient(90deg, rgba(242,56,74,.22), rgba(242,56,74,.06)); box-shadow: inset 0 0 0 1px rgba(242,56,74,.28); }
.adm-page.active::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.adm-page.active svg { color: var(--accent-hi); }
.adm-page-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-hi); box-shadow: 0 0 0 3px rgba(242,56,74,.2); animation: admPulse 1.6s ease-in-out infinite; }
@keyframes admPulse { 50% { box-shadow: 0 0 0 6px rgba(242,56,74,0); } }
.adm-side-foot { margin-top: auto; display: grid; gap: 10px; padding: 12px 6px 0; border-top: 1px solid var(--adm-line); font-size: 12px; color: var(--subtle); }
.adm-me { display: flex; align-items: center; gap: 10px; }
.adm-me > span:last-child { display: grid; }
.adm-me strong { color: var(--text); font-size: 13px; }
.adm-me-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--win); box-shadow: 0 0 8px var(--win); flex: none; }

/* top bar */
body.admin .admin-main { padding: 0 32px 64px; }
body.admin .admin-main > * { max-width: 1320px; }
.adm-top { position: sticky; top: 0; z-index: 40; margin: 0 -32px 22px; padding: 18px 32px 0; max-width: none !important;
  background: linear-gradient(180deg, rgba(10,11,16,.97) 70%, rgba(10,11,16,.88)); backdrop-filter: blur(10px); border-bottom: 1px solid var(--adm-line); }
.adm-top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1320px; margin: 0 auto; padding-bottom: 14px; }
.adm-title small { display: block; font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--subtle); }
.adm-title h1 { margin: 2px 0 0; font-size: 26px; font-weight: 900; letter-spacing: -.02em; font-family: inherit; }
.adm-find { position: relative; flex: 0 1 340px; }
.adm-find svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--subtle); }
.adm-find input { width: 100%; height: 40px; padding: 0 14px 0 36px; border-radius: 11px; border: 1px solid var(--adm-line); background: var(--adm-panel); color: var(--text); font: inherit; font-size: 13.5px; }
.adm-find input:focus { outline: none; border-color: rgba(242,56,74,.55); box-shadow: 0 0 0 3px rgba(242,56,74,.15); }
.adm-tabs { display: flex; gap: 4px; max-width: 1320px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px 12px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 800; white-space: nowrap; cursor: pointer; transition: color .15s ease; }
.adm-tab:hover { color: var(--text); }
.adm-tab.active { color: #fff; }
.adm-tab.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); box-shadow: 0 -2px 12px rgba(242,56,74,.6); }
.adm-tab .nav-count { margin-left: 0; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; }
.adm-top:has(.adm-tabs:not([hidden])) .adm-top-row { padding-bottom: 6px; }

/* section heads: the page title lives in the top bar now */
body.admin .section-head { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; min-height: 0; }
body.admin .section-head > .view-title { display: none; }
body.admin .section-head:not(:has(> :not(.view-title))) { display: none; }
body.admin .section-head .view-sub { flex-basis: 100%; text-align: left; margin: 0; }

/* panels, tiles, tables */
body.admin .panel { background: linear-gradient(180deg, rgba(255,255,255,.018), transparent 40%), var(--adm-panel); border: 1px solid var(--adm-line); border-radius: 16px; box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 12px 30px -20px rgba(0,0,0,.8); }
body.admin .admin-section > .panel, body.admin .admin-section > form.panel, body.admin .admin-section > div.panel { margin-bottom: 14px; }
.panel-title { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; padding: 16px 18px 6px; }
.panel > .panel-title:first-child { margin: -2px -2px 0; }
form.panel > .panel-title, .panel:not(.table-panel) > .panel-title { padding: 0 0 12px; }
.panel-title h3 { margin: 0; font-size: 15px; font-weight: 900; }
.panel-title .hint { margin: 0; font-size: 12px; }
body.admin .stat-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
body.admin .stat-tile { padding: 16px 18px; gap: 4px; position: relative; overflow: hidden; }
body.admin .stat-tile::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(closest-side, rgba(242,56,74,.14), transparent); }
body.admin .stat-tile span { font-size: 11.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
body.admin .stat-tile strong { font-family: inherit; font-weight: 900; font-size: 26px; letter-spacing: -.02em; }
body.admin .stat-tile small { color: var(--muted); font-weight: 700; }
body.admin .custom-table { width: 100%; border-collapse: collapse; }
body.admin .custom-table thead th { position: sticky; top: 0; background: var(--adm-panel); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); padding-top: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--adm-line); }
body.admin .custom-table tbody td { padding-top: 11px; padding-bottom: 11px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: middle; }
body.admin .custom-table tbody tr:last-child td { border-bottom: 0; }
body.admin .custom-table td.actions { text-align: right; white-space: nowrap; }
body.admin .custom-table td.actions .btn + .btn { margin-left: 6px; }
.table-scroll { overflow-x: auto; }
.block { display: block; }
body.admin .tag-green { color: var(--win); background: rgba(52,215,123,.12); border-color: rgba(52,215,123,.3); }
.lose-text { color: var(--loss); }
.empty-state.small { padding: 22px 10px; }

/* game pills */
.game-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 900; white-space: nowrap; background: rgba(255,255,255,.06); color: var(--text); }
.game-pill.g-coinflip { background: rgba(245,196,81,.14); color: #f7cf6b; }
.game-pill.g-dice { background: rgba(242,56,74,.15); color: #ff7a86; }
.game-pill.g-upgrader { background: rgba(63,208,255,.13); color: #6fdcff; }
.bet-players { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.bet-players em { font-style: normal; font-size: 11px; font-weight: 900; color: var(--subtle); }
.bet-player { display: inline-flex; align-items: center; gap: 8px; }
.bet-player img { width: 28px; height: 28px; border-radius: 50%; background: var(--adm-panel-2); }
.bet-player span { display: grid; line-height: 1.15; }
.bet-player strong { font-size: 13px; }
.bet-player small { font-size: 11px; color: var(--muted); font-weight: 700; }

/* switches */
.switch { position: relative; flex: none; width: 40px; height: 23px; border-radius: 99px; background: #2a2e3a; transition: background .2s ease; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.4); transition: transform .2s cubic-bezier(.3,1.3,.5,1); }
input:checked + .switch, .pp-toggle.on .switch { background: var(--win); }
input:checked + .switch::after, .pp-toggle.on .switch::after { transform: translateX(17px); }
.pp-toggle.danger.on .switch { background: var(--accent); }
.switch-row { display: flex; align-items: center; gap: 12px; margin: 14px 0 4px; cursor: pointer; }
.switch-row input, .feature-card input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row span:last-child { display: grid; }
.switch-row small { color: var(--muted); font-size: 12px; }
.switch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.feature-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 13px; background: var(--adm-panel-2); border: 1px solid var(--adm-line); cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.feature-card:hover { border-color: rgba(255,255,255,.14); }
.feature-card.off { background: rgba(242,56,74,.07); border-color: rgba(242,56,74,.35); }
.feature-txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.feature-txt strong { font-size: 14px; }
.feature-txt small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.feature-state { font-style: normal; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--win); }
.feature-card.off .feature-state { color: var(--accent-hi); }
#sec-site .maint-panel { margin-bottom: 14px; }

/* fees */
.fees-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.fee-editor { padding: 18px; }
.fee-rows { display: grid; gap: 8px; margin-bottom: 10px; }
.fee-row { display: grid; grid-template-columns: 28px auto minmax(0, 1fr) 120px 36px; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--adm-panel-2); border: 1px solid var(--adm-line); }
.fee-row:last-child { grid-template-columns: 28px minmax(0, 1fr) 120px 36px; }
.fee-lvl { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: rgba(242,56,74,.16); color: var(--accent-hi); font-weight: 900; font-size: 12px; }
.fee-range { font-size: 13px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.fee-rate { position: relative; }
.fee-rate input { padding-right: 26px !important; text-align: right; font-weight: 900; }
.fee-rate .unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-weight: 900; color: var(--muted); pointer-events: none; }
.fee-actions { margin: 12px 0 6px; }
.fee-side { display: grid; gap: 14px; }
.fee-side .panel { padding: 18px; }
.fee-calc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.fee-calc > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 11px; background: var(--adm-panel-2); }
.fee-calc span { font-size: 10.5px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
.fee-calc strong { font-size: 17px; font-weight: 900; }
.fee-bars { display: grid; gap: 9px; }
.fee-bar { display: grid; grid-template-columns: 110px minmax(0, 1fr) 48px; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.fee-bar i { display: block; height: 10px; border-radius: 99px; background: rgba(255,255,255,.05); position: relative; overflow: hidden; }
.fee-bar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, #b81d2c, #ff5a68); box-shadow: 0 0 10px rgba(242,56,74,.5); }
.fee-bar strong { text-align: right; color: var(--text); }

/* giveaways table */
.gw-prize { display: flex; align-items: center; gap: 10px; }
.gw-prize > .pet-img, .gw-prize > img, .gw-prize > svg { width: 36px; height: 36px; flex: none; }
.gw-prize span { display: grid; }
.gw-prize small { color: var(--muted); font-weight: 700; font-size: 11.5px; }

/* players page: list OR player page */
body.admin .players-layout { grid-template-columns: minmax(0, 1fr); }
#sec-players:not(.player-open) .player-panel { display: none; }
#sec-players.player-open .table-panel, #sec-players.player-open .lookup-bar, #sec-players.player-open .lookup-bar + .hint, #sec-players.player-open .section-head { display: none; }
body.admin .player-panel { position: static; max-height: none; overflow: visible; padding: 0; background: none; border: 0; box-shadow: none; }
.pp-back { margin-bottom: 12px; }
.pp-hero { display: flex; align-items: center; gap: 18px; padding: 20px 22px; border-radius: 18px; border: 1px solid var(--adm-line);
  background: radial-gradient(500px 200px at 0% 0%, rgba(242,56,74,.16), transparent 70%), var(--adm-panel); }
.pp-hero.is-locked { border-color: rgba(242,56,74,.45); }
.pp-hero .player-avatar { width: 76px; height: 76px; border-radius: 20px; background: var(--adm-panel-2); box-shadow: 0 0 0 3px rgba(242,56,74,.25); }
.pp-hero .player-id { flex: 1; min-width: 0; }
.pp-hero h3 { margin: 0 0 4px; font-size: 24px; font-weight: 900; }
.pp-hero h3 small { font-size: 14px; color: var(--muted); font-weight: 700; }
.pp-hero .player-id > span, .pp-hero .player-id > a { font-size: 12.5px; color: var(--muted); }
.pp-hero .player-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.pp-hero-actions { display: flex; flex-direction: column; gap: 8px; flex: none; }
.pp-lock-note { margin: 10px 0 0; padding: 12px 16px; border-radius: 12px; background: rgba(242,56,74,.1); border: 1px solid rgba(242,56,74,.35); font-size: 13px; line-height: 1.45; }
.pp-lock-note strong { color: var(--accent-hi); }
body.admin .pp-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
body.admin .pp-stats > div { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--adm-panel); border: 1px solid var(--adm-line); }
body.admin .pp-stats span { font-size: 10.5px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); }
body.admin .pp-stats strong { font-size: 21px; font-weight: 900; font-family: inherit; }
body.admin .pp-stats small { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.pp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.pp-col { display: grid; gap: 12px; min-width: 0; }
body.admin .player-block { margin: 0; padding: 16px 18px; border-radius: 16px; background: var(--adm-panel); border: 1px solid var(--adm-line); }
body.admin .player-block h4 { margin: 0 0 12px; font-size: 13px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
body.admin .player-block h4 small { margin-left: 6px; letter-spacing: 0; text-transform: none; color: var(--subtle); font-weight: 700; }
.pp-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.pp-toggle { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--adm-line); background: var(--adm-panel-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s ease; }
.pp-toggle:hover { border-color: rgba(255,255,255,.16); }
.pp-toggle > span:last-child { display: grid; min-width: 0; }
.pp-toggle strong { font-size: 13px; }
.pp-toggle small { font-size: 11px; color: var(--muted); }
.pp-toggle.on.danger { border-color: rgba(242,56,74,.45); background: rgba(242,56,74,.08); }
.pp-list { display: grid; gap: 2px; max-height: 330px; overflow-y: auto; }
body.admin .player-block .mini-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.04); font-size: 13px; }
body.admin .player-block .mini-row:last-child { border-bottom: 0; }
body.admin .player-block .mini-row time { color: var(--subtle); font-size: 11.5px; min-width: 52px; text-align: right; }
.role-row, .level-row { align-items: center; gap: 8px; margin-top: 8px; }
.role-row .hint, .level-row .hint { min-width: 64px; margin: 0; }
#noteForm textarea { width: 100%; resize: vertical; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--adm-line); background: var(--input); color: var(--text); font: inherit; font-size: 13px; margin-bottom: 8px; }
body.admin .admin-inventory { max-height: 340px; overflow-y: auto; }

/* lock dialog */
.lock-dialog { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.65); backdrop-filter: blur(4px); }
.lock-dialog .modal-content { width: min(440px, 100%); padding: 22px; display: grid; gap: 12px; animation: riseIn .25s ease-out; }
.lock-dialog h3 { margin: 0; font-size: 20px; }
.lock-dialog p { margin: 0; line-height: 1.5; }
.lock-dialog input { height: 42px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--adm-line); background: var(--input); color: var(--text); font: inherit; }
.lock-dialog input:focus { outline: none; border-color: rgba(242,56,74,.55); }

/* dashboard quick actions */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 18px; }
.qa { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--adm-line); background: var(--adm-panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform .15s ease, border-color .15s ease; }
.qa:hover { transform: translateY(-2px); border-color: rgba(242,56,74,.45); }
.qa svg { width: 20px; height: 20px; color: var(--accent-hi); flex: none; }
.qa span { display: grid; }
.qa strong { font-size: 13.5px; }
.qa small { font-size: 11.5px; color: var(--muted); }

/* mobile */
@media (max-width: 900px) {
  body.admin .admin-layout { grid-template-columns: minmax(0, 1fr); height: auto; }
  .adm-side { position: sticky; top: 0; z-index: 60; flex-direction: row; align-items: center; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--adm-line); overflow-x: auto; }
  .adm-brand { padding: 0 6px 0 0; margin: 0; border: 0; }
  .adm-brand span { display: none; }
  .adm-brand-icon { width: 28px; height: 28px; }
  .adm-pages { display: flex; padding: 0; gap: 2px; }
  .adm-page { flex-direction: column; gap: 3px; padding: 7px 10px; font-size: 10.5px; width: auto; }
  .adm-page.active::before { display: none; }
  .adm-page-dot { position: absolute; top: 5px; right: 8px; }
  .adm-side-foot { display: none; }
  body.admin .admin-main { padding: 0 14px 48px; overflow: visible; }
  .adm-top { position: static; margin: 0 -14px 16px; padding: 14px 14px 0; }
  .adm-top-row { flex-wrap: wrap; }
  .adm-find { flex: 1 1 100%; }
  .adm-title h1 { font-size: 22px; }
  .fees-layout, .pp-grid { grid-template-columns: minmax(0, 1fr); }
  body.admin .pp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pp-hero { flex-wrap: wrap; }
  .pp-hero-actions { flex-direction: row; width: 100%; }
  .pp-hero-actions .btn { flex: 1; }
  .pp-toggles { grid-template-columns: minmax(0, 1fr); }
  .fee-row { grid-template-columns: 26px minmax(0, 1fr) 96px 34px; }
  .fee-row .fee-range { display: none; }
  .fee-row:last-child .fee-range { display: block; }
  .fee-calc { grid-template-columns: minmax(0, 1fr); }
}
/* v2 fixes */
body.admin .btn-danger { background: linear-gradient(180deg, #ff4d5e, #d81f3a); color: #fff; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 6px 16px -8px rgba(242,56,74,.8), inset 0 1px 0 rgba(255,255,255,.2); }
body.admin .btn-danger:hover { filter: brightness(1.08); }
body.admin .btn-win { background: linear-gradient(180deg, #3fe08a, #1fae5c); color: #04210f; border: 0; box-shadow: 0 6px 16px -8px rgba(52,215,123,.8); }
body.admin .btn-win:hover { filter: brightness(1.06); }
body.admin .btn-danger:disabled, body.admin .btn-win:disabled { opacity: .5; }
.game-pill { flex: none; }
body.admin .row.level-row, body.admin .row.role-row { justify-content: flex-start; flex-wrap: wrap; }
body.admin .role-row .custom-select { min-width: 150px; }
#feeEarned { margin: 12px 0 0; }
@media (min-width: 1200px) { .quick-actions { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.qa small { line-height: 1.3; }
@media (max-width: 900px) {
  body.admin .adm-side { flex-wrap: nowrap; gap: 4px; padding: 8px 8px; }
  body.admin .adm-side .adm-pages { flex: 1 1 auto; order: 0; overflow-x: auto; flex-direction: row; scrollbar-width: none; }
  body.admin .adm-side .adm-pages::-webkit-scrollbar { display: none; }
  body.admin .adm-page { white-space: nowrap; min-width: 64px; align-items: center; }
  body.admin .adm-page span { font-size: 10.5px; }
  .fee-row .fee-range { white-space: normal; line-height: 1.2; }
}
body.admin .player-block .level-row { margin-left: 0; }
body.admin .custom-table .leaderboard-player { display: flex; align-items: center; gap: 10px; }
body.admin .custom-table .leaderboard-player img { width: 34px; height: 34px; border-radius: 10px; background: var(--adm-panel-2); flex: none; object-fit: cover; }
body.admin .custom-table .leaderboard-player span { display: grid; font-weight: 800; }
