@font-face {
  font-family: "Minecraft";
  src: url("Minecraft.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0c0c0e;
  --bg-panel: #121214;
  --bg-card: #18181b;
  --border: #27272a;
  --border-glow: rgba(99, 102, 241, 0.25);
  --text: #fafafa;
  --text-muted: #71717a;
  --accent: #6366f1;
  --accent-dim: #4f46e5;
  --green: #22c55e;
  --green-dim: #16a34a;
  --success: #22c55e;
  --error: #ef4444;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-minecraft: "Minecraft", "Segoe UI", system-ui, sans-serif;
  --premium-gold: #d4a853;
  --premium-gold-muted: rgba(212, 168, 83, 0.55);
  --premium-surface: linear-gradient(165deg, rgba(26, 26, 32, 0.96) 0%, rgba(12, 12, 16, 0.98) 100%);
  --premium-ring: linear-gradient(145deg, #6366f1 0%, #22c55e 45%, var(--premium-gold) 100%);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-minecraft);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.app {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.sidebar {
  width: 320px;
  flex-shrink: 0;
  padding: 24px 20px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg) 100%);
}

.guild-panel {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.guild-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--green), var(--accent));
  background-size: 200% 100%;
  opacity: 0.9;
  animation: barGlow 4s ease-in-out infinite;
}

@keyframes barGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.guild-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.guild-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--bg);
}

.guild-title {
  flex: 1;
  min-width: 0;
}

.guild-name {
  font-family: var(--font-minecraft);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
  line-height: 1.3;
  display: block;
}

.guild-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  animation: statPop 0.5s var(--ease-out) backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

.stat-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.stat-value {
  display: block;
  font-family: var(--font-minecraft);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat-card[data-stat="online"] .stat-value,
.stat-card[data-stat="testers-online"] .stat-value {
  color: var(--green);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bot-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.bot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.bot-name {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  padding: 24px 20px 32px;
  animation: mainIn 0.6s var(--ease-out) 0.1s backwards;
}

.content-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: none;
  width: 100%;
  margin: 0;
  flex: 1;
  min-width: 0;
}

.tabs {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: wrap;
  width: 100%;
}

.tester-auth-section {
  width: 100%;
  animation: panelReveal 0.4s var(--ease-out);
}

.tester-auth-box {
  margin-bottom: 0;
}

.demote-intro {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 16px 0;
  max-width: 900px;
}

.demote-intro code {
  font-size: 0.78rem;
  color: var(--accent);
}

.demote-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.demote-table-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(65vh, 800px);
  overflow-y: auto;
  padding-right: 4px;
  scroll-behavior: smooth;
}

.demote-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
  background: var(--premium-surface);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  border-left: 4px solid rgba(239, 68, 68, 0.55);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.demote-row--premium:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(239, 68, 68, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.demote-row-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

@media (max-width: 720px) {
  .demote-row-main {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }

  .demote-row-nums {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

.demote-row-user {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.demote-row-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.demote-pill {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.demote-pill strong {
  color: var(--text);
}

.demote-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab {
  font-family: var(--font-minecraft);
  padding: 12px 20px;
  background: #1c1c1e;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    color 0.3s var(--ease),
    background 0.3s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.35s var(--ease),
    transform 0.25s var(--ease-out);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(0);
}

.tab:hover {
  color: var(--text);
  background: #252528;
  border-color: rgba(255, 255, 255, 0.2);
}

.tab.active {
  background: linear-gradient(145deg, #252528 0%, #1c1c1e 100%);
  border-color: rgba(99, 102, 241, 0.55);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2), 0 8px 24px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.tab-icon {
  font-size: 1rem;
}

.tab-content {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  animation: tabIn 0.4s var(--ease-out) forwards;
}

.tab-content.active {
  display: block;
}

.logs-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  animation: cardIn 0.5s var(--ease-out) 0.1s backwards;
}

.logs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.logs-header h2 {
  font-family: var(--font-minecraft);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.logs-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.logs-list {
  max-height: calc(100vh - 280px);
  min-height: 320px;
  overflow-y: auto;
  padding: 12px 16px;
  scroll-behavior: smooth;
}

.logs-list::-webkit-scrollbar {
  width: 10px;
}

.logs-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.logs-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 5px;
}

.log-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 6px;
  border-radius: 10px;
  font-family: "SF Mono", "Consolas", "Monaco", monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  border-left: 3px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  word-break: break-word;
  animation: logSlide 0.35s var(--ease-out) forwards;
}

.log-entry.log {
  border-left-color: rgba(255, 255, 255, 0.5);
}

.log-entry.warn {
  border-left-color: rgba(250, 204, 21, 0.8);
}

.log-entry.error {
  border-left-color: rgba(248, 113, 113, 0.9);
}

.log-entry .time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-right: 10px;
  flex-shrink: 0;
}

.log-entry .msg {
  color: rgba(255, 255, 255, 0.9);
}

.status-activity-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  animation: cardIn 0.5s var(--ease-out) 0.1s backwards;
}

.status-activity-title {
  font-family: var(--font-minecraft);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 20px 0;
}

.status-sub-section {
  margin-bottom: 18px;
}

.status-sub-title {
  font-family: var(--font-minecraft);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 8px 0;
}

.status-sub-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.status-input,
.status-select {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: var(--font-minecraft);
  font-size: 0.85rem;
  color: var(--text);
  min-width: 160px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.2s var(--ease);
}

.status-input:focus,
.status-select:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.65);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.status-input::placeholder {
  color: var(--text-muted);
}

.status-select {
  min-width: 140px;
  cursor: pointer;
}

.status-buttons {
  gap: 12px;
}

.status-btn {
  font-family: var(--font-minecraft);
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: 10px;
  border: 2px solid;
  background: transparent;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.status-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.status-online { color: #22c55e; border-color: #22c55e; }
.status-idle   { color: #eab308; border-color: #eab308; }
.status-dnd    { color: #ef4444; border-color: #ef4444; }
.status-offline { color: var(--text-muted); border-color: var(--text-muted); }

.status-apply-btn {
  font-family: var(--font-minecraft);
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: 10px;
  border: 2px solid #4ade80;
  background: #22c55e;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

.status-apply-btn:hover {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.45);
}

.status-apply-btn:active {
  transform: translateY(0) scale(0.98);
}

.status-apply-btn.btn-busy {
  opacity: 0.85;
  cursor: wait;
  box-shadow: none;
}

.btn-busy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-busy-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: busyPulse 0.9s ease-in-out infinite;
}

@keyframes busyPulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

.status-activity-fields {
  flex-wrap: wrap;
}

.status-activity-fields .status-input {
  flex: 1;
  min-width: 140px;
}

.status-reset-btn {
  font-family: var(--font-minecraft);
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: 10px;
  border: 2px solid #ef4444;
  background: transparent;
  color: #ef4444;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.2s, transform 0.15s;
}

.status-reset-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.status-error-msg {
  font-size: 0.8rem;
  margin: 12px 0 0 0;
  min-height: 1.2em;
  color: var(--text-muted);
}

.status-error-msg.error {
  color: var(--error);
}

.status-error-msg.success {
  color: var(--success);
}

.status-error-msg.msg-flash {
  animation: msgPop 0.55s var(--ease-out);
}

#dashboardAuthMsg.msg-flash.success {
  animation: msgPop 0.55s var(--ease-out);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes statPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes mainIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes tabIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes logSlide {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

.fade-in {
  animation: fadeIn 0.5s var(--ease-out) forwards;
}

.fade-in-slow {
  animation: fadeIn 0.6s var(--ease-out) 0.1s forwards;
  opacity: 0;
}

.hidden {
  display: none !important;
}

.dashboard-gate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}

.dashboard-gate--hidden {
  display: none !important;
}

.dashboard-gate-card {
  max-width: 420px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.dashboard-gate-title {
  font-size: 1.35rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.dashboard-gate-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

.dashboard-gate-row {
  margin-bottom: 8px;
}

.dashboard-sign-out-btn {
  margin-top: 14px;
  width: 100%;
  padding: 8px 12px;
  font-size: 0.75rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
}

.dashboard-sign-out-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.tester-stats-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  animation: cardIn 0.5s var(--ease-out) 0.1s backwards;
}

.tester-stats-box.premium-surface {
  position: relative;
  background: var(--premium-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 26px 28px 28px;
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.1),
    0 12px 48px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.tester-stats-box.premium-surface::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--premium-ring);
  background-size: 200% 100%;
  opacity: 0.85;
  animation: barGlow 6s ease-in-out infinite;
}

.premium-page-title {
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-shadow: 0 0 32px rgba(99, 102, 241, 0.25);
}

.premium-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  margin-top: 4px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.premium-avatar-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  padding: 3px;
  background: var(--premium-ring);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
}

.premium-avatar-wrap--lg {
  width: 64px;
  height: 64px;
  box-shadow: 0 6px 28px rgba(239, 68, 68, 0.15);
}

.premium-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--bg-card);
  border: 2px solid rgba(12, 12, 14, 0.95);
}

.premium-user-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.premium-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}

.premium-display-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.premium-display-name.muted {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.premium-user-handle {
  font-size: 0.82rem;
  color: var(--premium-gold);
  font-weight: 600;
  opacity: 0.95;
}

.premium-id.tester-stats-id,
code.premium-id {
  font-size: 0.72rem;
  padding: 6px 10px;
  margin-top: 2px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.tester-stats-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 12px 0;
}

.tester-stats-auth-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tester-stats-panel {
  margin-top: 8px;
  animation: panelReveal 0.45s var(--ease-out);
}

.tester-stats-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.tester-stats-toolbar--wide {
  flex-wrap: wrap;
  align-items: center;
}

.tester-stats-sort-label {
  font-size: 0.85rem;
  color: var(--text-muted, #a0a0a8);
  white-space: nowrap;
  margin-left: 0.25rem;
}

.tester-stats-sort {
  min-width: 12rem;
  max-width: 16rem;
}

.tester-stats-search {
  flex: 1;
  min-width: 200px;
  max-width: 420px;
}

.tester-stats-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 10px 0;
}

.tester-stats-user-line {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tester-stats-display-name {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
}

.tester-stats-display-name.muted {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.tester-stats-key {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.tester-stats-advanced {
  margin-top: 4px;
}

.tester-stats-advanced summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 8px;
  user-select: none;
}

.tester-stats-advanced summary:hover {
  text-decoration: underline;
}

.tester-stats-textarea {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 56px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--text);
  resize: vertical;
}

.tester-stats-msg {
  font-size: 0.8rem;
  min-height: 1.2em;
  margin: 8px 0 12px 0;
  color: var(--text-muted);
}

.tester-stats-msg.error {
  color: var(--error);
}

.tester-stats-msg.success {
  color: var(--success);
}

/* Bulk-add modal (tester stats) — GPU-friendly motion, no animated blur (causes jank) */
@keyframes dashboardModalBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes dashboardModalPanelIn {
  from {
    opacity: 0;
    transform: translate3d(-50%, -50%, 0) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate3d(-50%, -50%, 0) scale(1);
  }
}

.dashboard-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
  margin: 0;
  max-width: min(440px, calc(100vw - 32px));
  max-height: min(90vh, 640px);
  width: calc(100vw - 32px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
  color: var(--text);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.12),
    0 24px 56px rgba(0, 0, 0, 0.65),
    0 8px 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.dashboard-modal[open] {
  animation: dashboardModalPanelIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.dashboard-modal::backdrop {
  /* Solid dim only — animating backdrop-filter is expensive */
  background: rgba(0, 0, 0, 0.78);
  animation: dashboardModalBackdropIn 0.22s ease-out both;
}

.dashboard-modal-inner {
  padding: 22px 24px;
  max-height: min(90vh, 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-modal[open],
  .dashboard-modal::backdrop {
    animation: none !important;
  }
}

.dashboard-modal-title {
  font-size: 1.05rem;
  margin: 0 0 10px 0;
  color: var(--text);
}

.dashboard-modal-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 16px 0;
}

.dashboard-modal-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.dashboard-modal-input {
  width: 100%;
  margin-bottom: 18px;
}

.dashboard-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.bulk-add-progress-wrap {
  margin: 4px 0 14px 0;
}

.bulk-add-progress-wrap.hidden {
  display: none !important;
}

.bulk-add-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(99, 102, 241, 0.2);
  overflow: hidden;
}

.bulk-add-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, #818cf8 50%, var(--green) 100%);
  transition: width 0.14s ease-out;
}

.bulk-add-progress-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 8px 0 0 0;
  font-variant-numeric: tabular-nums;
}

.tester-stats-msg.msg-flash {
  animation: msgPop 0.55s var(--ease-out);
}

@keyframes msgPop {
  0% { transform: scale(0.98); filter: brightness(1.2); }
  40% { transform: scale(1.02); }
  100% { transform: scale(1); filter: brightness(1); }
}

.tester-stats-table-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(70vh, 900px);
  overflow-y: auto;
  padding-right: 4px;
  scroll-behavior: smooth;
}

.tester-stats-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.25s var(--ease);
  animation: rowEnter 0.45s var(--ease-out) backwards;
  animation-delay: calc(var(--row-i, 0) * 35ms);
}

.tester-stats-row--premium {
  gap: 14px;
  padding: 18px 20px;
  background: linear-gradient(165deg, rgba(28, 28, 34, 0.92) 0%, rgba(14, 14, 18, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow:
    0 6px 28px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}

.tester-stats-row:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.tester-stats-row--premium:hover {
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow:
    0 10px 36px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(99, 102, 241, 0.08);
}

.tester-row-saved {
  animation: rowSavedFlash 1s var(--ease-out) !important;
  border-color: rgba(34, 197, 94, 0.75) !important;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25), 0 8px 28px rgba(34, 197, 94, 0.12) !important;
}

@keyframes rowEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rowSavedFlash {
  0% {
    border-color: rgba(34, 197, 94, 0.9);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.45);
  }
  100% {
    border-color: var(--border);
    box-shadow: none;
  }
}

.tester-stats-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.tester-stats-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-family: var(--font-minecraft);
}

.tester-stats-id {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--accent);
  word-break: break-all;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.tester-stats-row .tester-all-input {
  width: 100%;
  max-width: 200px;
}

.tester-stats-row .monthly-json {
  width: 100%;
  min-height: 72px;
}

.tester-stats-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

/* Toasts — save / apply feedback */
.toast-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 32px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(30, 30, 35, 0.98) 0%, rgba(22, 22, 26, 0.98) 100%);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);
  transform: translateX(120%) scale(0.92);
  opacity: 0;
  transition:
    transform 0.45s var(--ease-out),
    opacity 0.35s var(--ease);
  pointer-events: auto;
}

.toast--visible {
  transform: translateX(0) scale(1);
  opacity: 1;
}

.toast--leaving {
  opacity: 0;
  transform: translateX(40px) scale(0.96);
  transition-duration: 0.35s;
}

.toast--success {
  border-color: rgba(34, 197, 94, 0.45);
}

.toast--error {
  border-color: rgba(239, 68, 68, 0.5);
}

.toast-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.toast-icon--ok {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
  animation: toastIconPop 0.5s var(--ease-out);
}

.toast-icon--err {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

@keyframes toastIconPop {
  0% { transform: scale(0); }
  55% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.toast-text {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
}

.tester-stats-lock {
  animation: panelReveal 0.4s var(--ease-out);
}

@keyframes panelReveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .toast {
    transition-duration: 0.15s;
  }

  .tester-stats-panel,
  .tester-stats-lock {
    animation: none;
  }

  .tester-stats-row {
    animation: none;
    animation-delay: 0s !important;
  }

  .tester-row-saved {
    animation: none !important;
  }

  .msg-flash,
  .status-error-msg.msg-flash,
  #dashboardAuthMsg.msg-flash.success {
    animation: none;
  }

  .toast-icon--ok {
    animation: none;
  }
}

@media (max-width: 900px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .tabs {
    justify-content: flex-start;
  }

  .toast-root {
    bottom: 16px;
    right: 12px;
    left: 12px;
    align-items: stretch;
  }

  .toast {
    transform: translateY(24px) scale(0.96);
  }

  .toast--visible {
    transform: translateY(0) scale(1);
  }

  .transcript-split {
    flex-direction: column;
  }

  .transcript-list-wrap {
    max-height: 240px;
  }

  .transcript-iframe {
    min-height: 360px;
  }
}

/* —— Transcripts tab —— */
.transcript-intro {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 16px;
  max-width: 720px;
}

.transcript-intro code {
  font-size: 0.85em;
  padding: 2px 6px;
  background: var(--bg-card);
  border-radius: 4px;
  border: 1px solid var(--border);
}

.transcript-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.transcript-search {
  flex: 1;
  min-width: 180px;
  max-width: 360px;
}

.transcript-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: auto;
}

.transcript-split {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  min-height: 420px;
}

.transcript-list-wrap {
  flex: 0 0 min(340px, 38%);
  max-height: min(70vh, 640px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
}

.transcript-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s var(--ease);
}

.transcript-row:last-child {
  border-bottom: none;
}

.transcript-row:hover {
  background: rgba(99, 102, 241, 0.08);
}

.transcript-row.active {
  background: rgba(99, 102, 241, 0.16);
  border-left: 3px solid var(--accent);
  padding-left: 11px;
}

.transcript-row-main {
  min-width: 0;
  flex: 1;
}

.transcript-row-title {
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-all;
  color: var(--text);
}

.transcript-row-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.transcript-preview-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #111;
}

.transcript-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.transcript-preview-header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transcript-open-tab {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  flex-shrink: 0;
}

.transcript-open-tab:hover {
  text-decoration: underline;
}

.transcript-iframe {
  flex: 1;
  width: 100%;
  min-height: min(70vh, 640px);
  border: none;
  background: #1e1f22;
}

.transcript-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Duplicate IGNs tab — premium cards */
.dupign-page {
  position: relative;
}

.dupign-intro {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 720px;
  margin: 0 0 18px;
}

.dupign-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.dupign-wrap {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.dupign-empty {
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.dupign-empty--locked {
  border-radius: 14px;
  border: 1px dashed rgba(212, 175, 55, 0.28);
  background: rgba(0, 0, 0, 0.25);
}

.dupign-empty--locked strong {
  color: #e8d9b8;
}

.dupign-group {
  padding: 22px 22px 20px;
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(32, 27, 20, 0.95) 0%, rgba(14, 12, 10, 0.98) 100%);
  border: 1px solid rgba(212, 175, 55, 0.22);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dupign-group-title {
  margin: 0 0 18px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dupign-mc-label {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(212, 175, 55, 0.85);
  margin-right: 10px;
  vertical-align: middle;
}

.dupign-mc-name {
  font-family: var(--font-minecraft), system-ui, sans-serif;
  font-size: 1.25rem;
  color: #f5e6c8;
  text-shadow: 0 1px 12px rgba(212, 175, 55, 0.25);
  vertical-align: middle;
}

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

.dupign-user-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(22, 22, 28, 0.95) 0%, rgba(10, 10, 14, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.dupign-user-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.12);
}

.dupign-avatar-wrap {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.5), rgba(99, 102, 241, 0.45));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.dupign-avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #1a1a20;
}

.dupign-user-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dupign-uname {
  font-weight: 700;
  font-size: 0.95rem;
  color: #e8e8ef;
}

.dupign-dname {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.dupign-id-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.dupign-id {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--accent);
  word-break: break-all;
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  flex: 1;
  min-width: 0;
}

.dupign-copy-id {
  font-size: 0.72rem;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
}

.dupign-copy-id:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

.dupign-delete-btn {
  margin-top: 10px;
  align-self: flex-start;
}
