/* Dashboard — dark base matches home.css aesthetic */

*, *::before, *::after { box-sizing: border-box; }

.dash-body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #151621 0, #050509 55%, #000 100%);
  color: #f5f5f5;
  font-family: ui-sans-serif, system-ui, -apple-system, "SF Pro Text",
               Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.dash-shell {
  min-height: 100vh;
  padding: 20px clamp(16px, 5vw, 40px);
  display: flex;
  flex-direction: column;
}

/* Header */

.dash-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.dash-logo {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  opacity: 0.85;
  text-decoration: none;
  color: inherit;
}

.dash-mode {
  font-size: 11px;
  opacity: 0.55;
  flex: 1;
}

.dash-auth-row {
  display: flex;
  gap: 6px;
}

.dash-auth-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.04);
  color: #f5f5f5;
  font-size: 11px;
  cursor: pointer;
}

.dash-auth-btn:hover {
  background: rgba(255,255,255,0.12);
}

.dash-auth-btn.secondary {
  border-color: rgba(255,255,255,0.15);
  opacity: 0.7;
}

/* Auth dialog */

.dash-dialog {
  background: #111118;
  color: #f5f5f5;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 28px 24px 24px;
  width: min(360px, 90vw);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.dash-dialog::backdrop {
  background: rgba(0,0,0,0.7);
}

.dash-dialog-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  color: #f5f5f5;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.6;
}

.dash-dialog-title {
  margin: 0 0 16px;
  font-size: 18px;
  letter-spacing: 0.03em;
}

.dash-dialog-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.dtab {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  cursor: pointer;
}

.dtab.active {
  background: rgba(255,255,255,0.1);
  color: #f5f5f5;
  border-color: rgba(255,255,255,0.4);
}

.dpanel { display: none; flex-direction: column; gap: 10px; }
.dpanel.active { display: flex; }

.dpanel input {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: #f5f5f5;
  font-size: 13px;
}

.dash-submit-btn {
  padding: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #f5f5f5;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 4px;
}

.dash-submit-btn:hover {
  background: rgba(255,255,255,0.22);
}

.dash-status {
  font-size: 11px;
  min-height: 16px;
  margin: 0;
  opacity: 0.8;
}

/* Main grid */

.dash-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
  gap: 20px;
  align-items: stretch;
}

.dash-card {
  background: rgba(0,0,0,0.9);
  border-radius: 32px;
  padding: 22px 22px 26px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 45px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.04);
}

.dash-card-player {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-card-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-card-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
}

.dash-player-name {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0.06em;
}

.dash-player-tag {
  margin: 0;
  font-size: 12px;
  opacity: 0.7;
}

/* Avatar */

.dash-avatar-ring {
  margin: 14px 0;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.12), transparent 55%),
    radial-gradient(circle at 80% 90%, rgba(255,0,64,0.35), transparent 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dash-avatar-img {
  width: 72%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 25px rgba(0,0,0,0.9));
}

/* XP bar */

.dash-xp-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

.dash-xp-label, .dash-xp-value {
  font-size: 11px;
  opacity: 0.7;
}

.dash-xp-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.dash-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff2445, #ffae4f);
}

/* Actions card */

.dash-card-title {
  margin: 0;
  font-size: 20px;
}

.dash-card-copy {
  margin: 4px 0 10px;
  font-size: 12px;
  opacity: 0.75;
  max-width: 360px;
}

.dash-actions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.dash-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  text-decoration: none;
  color: #f5f5f5;
  background: rgba(255,255,255,0.02);
  font-size: 12px;
  cursor: pointer;
}

.dash-pill.primary {
  border-color: rgba(255,255,255,0.38);
  background: radial-gradient(circle at 0% 0%, rgba(255,0,64,0.5), transparent 60%);
}

.dash-pill:hover {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.06);
}

.pill-title { font-weight: 600; }
.pill-sub { opacity: 0.7; }

/* Guest prompt */

.dash-guest-prompt {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.dash-guest-prompt p {
  margin: 0;
  font-size: 11px;
  opacity: 0.6;
}

/* Footer */

.dash-footer {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 10px;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

.dash-footer-dots {
  min-width: 24px;
  animation: dotsPulse 1.4s infinite steps(3, end);
}

@keyframes dotsPulse {
  0%   { opacity: 0.3; }
  50%  { opacity: 1; }
  100% { opacity: 0.3; }
}

/* Responsive */

@media (max-width: 900px) {
  .dash-main {
    grid-template-columns: 1fr;
  }
  .dash-avatar-ring {
    width: 130px;
    height: 130px;
  }
}
