/* ===== Dashboard ===== */

.dashboard-main {
  padding: calc(var(--header-height, 70px) + 0px) 0 30px;
  position: relative;
}

/* Subtle hero glow like home */
.dashboard-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 320px;
  background: radial-gradient(ellipse 50% 50% at 50% 0%, rgba(255, 140, 26, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.dashboard-main > .container {
  position: relative;
  z-index: 1;
}

.dashboard-login-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--text);
}

.dashboard-login-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.5;
}

/* ---------- Greeting ---------- */
.dashboard-greeting {
  margin: 0 0 32px;
  max-width: 720px;
}

.dashboard-greeting-text {
  display: block;
}

/* ---------- Modern Hero ---------- */
.dashboard-greeting {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  position: relative;
}

.dashboard-greeting-text {
  flex: 1;
  min-width: 240px;
}

.dashboard-greeting-eyebrow {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-bottom: 14px;
  opacity: 0.6;
}

.dashboard-title {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 3vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
}

.dashboard-title em {
  color: var(--orange);
  font-style: italic;
}

.dashboard-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

/* ---------- Stats ---------- */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.dashboard-stat {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 16px);
  padding: 26px 22px;
  text-align: left;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.dashboard-stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 140, 26, 0.5) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.dashboard-stat:hover {
  border-color: rgba(255, 140, 26, 0.35);
  transform: translateY(-2px);
}

.dashboard-stat:hover::before { opacity: 1; }

.dashboard-stat-value {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.dashboard-stat-label {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}

@media (max-width: 720px) {
  .dashboard-stats { grid-template-columns: 1fr; }
  .dashboard-greeting { flex-direction: column; text-align: center; align-items: center; }
  .dashboard-subtitle { margin-left: auto; margin-right: auto; }
  .dashboard-stat { text-align: center; }
}


/* ---------- Tabs ---------- */
.dashboard-tabs {
  margin-bottom: 32px;
}

/* ---------- Grid ---------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.dash-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  position: relative;
}

.dash-item:hover {
  border-color: rgba(255, 140, 26, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px -20px rgba(255, 140, 26, 0.4);
}

.dash-item-image {
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  position: relative;
  display: grid;
  place-items: center;
}

.dash-item-image-bot {
  background: linear-gradient(135deg, #5865f2 0%, #7983f5 50%, #4752c4 100%);
}

.dash-item-image-bot svg {
  width: 64px;
  height: 64px;
  fill: rgba(255, 255, 255, 0.85);
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.4));
}

.dash-item-image-script {
  background: linear-gradient(135deg, #2d1a0a, #0a0503);
}

.dash-item-status {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dash-status-active        { color: #4ade80; }
.dash-status-pending_setup { color: #ffb070; }
.dash-status-error         { color: #fca5a5; }

.dash-item-type {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.dash-type-script { color: var(--text-muted); }
.dash-type-bot    { color: #c1c8ff; }

.dash-item-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}

.dash-item-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.dash-item-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.dash-item-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.dash-item-meta-key { color: var(--text-dim); }
.dash-item-meta-val {
  font-family: var(--font-mono, ui-monospace, monospace);
  color: var(--text-muted);
  font-size: 11px;
  text-align: right;
  word-break: break-all;
}

.dash-item-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-btn {
  flex: 1;
  padding: 9px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dash-btn-primary {
  background: var(--orange);
  color: #0a0a0a;
}
.dash-btn-primary:hover { background: #ffa338; }

.dash-btn-secondary {
  background: var(--bg-elev, rgba(255,255,255,0.03));
  color: var(--text);
  border: 1px solid var(--border);
}
.dash-btn-secondary:hover { border-color: var(--text-muted); color: var(--orange); }

/* ---------- Loading / Empty ---------- */
.dashboard-loading,
.dashboard-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.dashboard-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 140, 26, 0.15);
  border-top-color: var(--text-muted);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.dashboard-empty svg {
  margin-bottom: 16px;
  color: var(--text-dim);
}
.dashboard-empty h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 8px;
  color: var(--text);
}
.dashboard-empty p { margin: 0 0 20px; }

.btn-large {
  padding: 14px 28px;
  font-size: 15px;
}

/* === Dashboard Modal + Update-Badge === */
.dash-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}
.dash-modal {
  background: var(--bg-card, #0e0e10);
  border: 1px solid var(--border, #1a1a1e);
  border-radius: 14px;
  width: 100%;
  max-width: 480px;
  overflow: hidden;
}
.dash-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border, #1a1a1e);
}
.dash-modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.dash-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  transition: all 0.15s;
}
.dash-modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}
.dash-modal-body {
  padding: 22px 22px 0;
}
.dash-modal-help {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 16px;
}
.dash-modal-label {
  display: block;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.dash-modal-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border, #1a1a1e);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font-mono);
  transition: border-color 0.15s;
}
.dash-modal-input:focus {
  outline: none;
  border-color: var(--text-muted);
}
.dash-modal-error {
  margin-top: 8px;
  font-size: 12px;
  color: #ef4444;
  min-height: 16px;
}
.dash-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 22px 22px;
}
.dash-modal-actions .dash-btn {
  min-width: 80px;
}

/* Toast (used by verify-bot config save) */
.dash-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #d1fadf;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  animation: dashToastIn 0.18s ease-out, dashToastOut 0.4s ease-in 1.7s forwards;
}
@keyframes dashToastIn  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dashToastOut { to   { opacity: 0; transform: translateY(6px); } }

/* Update-Badge auf Card */
.dash-update-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 14px;
  margin-right: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #22c55e;
  border: 1px solid #22c55e;
  border-radius: 999px;
  white-space: nowrap;
}


/* Spoiler-Style: License + Binding-Value */
.dash-spoiler {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.dash-spoiler:hover {
  border-color: rgba(255,140,26,0.4);
  background: rgba(255,140,26,0.04);
}
.dash-spoiler-value {
  -webkit-text-security: disc;
  text-security: disc;
  letter-spacing: 0.5px;
  color: var(--text);
  transition: all 0.15s;
}
.dash-spoiler.revealed .dash-spoiler-value {
  -webkit-text-security: none;
  text-security: none;
  letter-spacing: 0;
}
.dash-spoiler.copied {
  border-color: var(--text-muted);
  background: rgba(255,140,26,0.15);
}
.dash-spoiler.copied .dash-spoiler-value {
  -webkit-text-security: none;
  text-security: none;
  color: var(--text-muted);
  font-weight: 600;
}
.dash-spoiler-toggle {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.dash-spoiler-toggle:hover {
  color: var(--text-muted);
}

/* Relative-Time-Display */
.dash-time {
  cursor: help;
  border-bottom: 1px solid rgba(255,140,26,0.4);
  transition: border-color 0.15s, color 0.15s;
}
.dash-time:hover {
  color: var(--text-muted);
  border-bottom-color: var(--text-muted);
}

/* Filter-Pills mit Status-Farben */
.dash-pill[data-status='all'].active {
  background: var(--orange);
  color: #000;
}
.dash-pill[data-status='active'].active {
  background: #22c55e;
  color: #000;
}
.dash-pill[data-status='inactive'].active {
  background: #ef4444;
  color: #fff;
}

/* Copyable-Span für IP/Guild — wie Spoiler aber ohne disc */
.dash-copyable {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  color: var(--text);
  transition: all 0.15s;
  user-select: none;
}
.dash-copyable:hover {
  border-color: rgba(255,140,26,0.4);
  background: rgba(255,140,26,0.04);
}
.dash-copyable.copied {
  border-color: var(--text-muted);
  background: rgba(255,140,26,0.15);
  color: var(--text-muted);
  font-weight: 600;
}

/* Meta-Werte: spezielle Farben pro Row */
.dash-item-meta-row:nth-child(1) .dash-item-meta-val { color: var(--text); }
/* Server-IP / Guild-ID — grau */
.dash-item-meta-row:nth-child(2) .dash-item-meta-val { color: var(--text-dim); }
/* Version — grün */
.dash-item-meta-row:nth-child(3) .dash-item-meta-val { color: #22c55e; font-weight: 600; }
/* Letztes Update — orange */
.dash-item-meta-row:nth-child(4) .dash-item-meta-val { color: var(--text-muted); }
.dash-item-meta-row:nth-child(4) .dash-time { color: var(--text-muted); border-bottom-color: rgba(255,140,26,0.3); }

/* ---------- Stat-Card Watermark-Icons ---------- */
.dashboard-stat {
  position: relative;
  overflow: hidden;
}

.dashboard-stat-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 80px;
  color: var(--text-muted);
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.dashboard-stat-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.dashboard-stat-value,
.dashboard-stat-label {
  position: relative;
  z-index: 1;
}

.dashboard-stat:hover .dashboard-stat-icon { color: var(--orange);
  opacity: 0.14;
  transition: opacity 0.25s ease, color 0.25s ease;
}

/* ---------- Wave Hand Animation ---------- */
.dashboard-wave {
  display: inline-block;
  margin-left: 4px;
  font-style: normal;
  transform-origin: 70% 70%;
}

@keyframes dashWave {
  0%   { transform: rotate(14deg); }
  15%  { transform: rotate(-8deg); }
  30%  { transform: rotate(14deg); }
  45%  { transform: rotate(-4deg); }
  60%  { transform: rotate(10deg); }
  75%  { transform: rotate(14deg); }
  100% { transform: rotate(14deg); }
}

/* ============================================================
   Dashboard Login-Wall (Blog-Hero-Style)
   ============================================================ */
.dashboard-login-wall {
  text-align: center;
  padding: 60px 0 80px;
}

.dashboard-login-inner {
  max-width: 600px;
  margin: 0 auto;
}

.dashboard-login-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 14px 0 16px;
  color: var(--text);
}

.dashboard-login-title .accent {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  color: var(--orange);
}

.dashboard-login-sub {
  max-width: 480px;
  margin: 0 auto 32px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.dashboard-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.dashboard-login-help {
  margin: 24px auto 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.dashboard-login-help span {
  color: var(--text-muted);
}

.dashboard-login-help a {
  color: var(--orange);
  text-decoration: none;
  margin-left: 4px;
  transition: opacity 0.2s ease;
}

.dashboard-login-help a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.dashboard-login-btn { background: #5865F2 !important; color: #fff !important; }
.dashboard-login-btn:hover { background: #4752C4 !important; }

/* License-Status Dot */
.dash-license-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 7px;
  vertical-align: middle;
  background: var(--text-muted);
  flex-shrink: 0;
  cursor: help;
}

.dash-license-dot--active {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.45);
}

.dash-license-dot--pending_setup {
  background: #eab308;
  box-shadow: 0 0 6px rgba(234, 179, 8, 0.45);
}

.dash-license-dot--revoked {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.45);
}

.dash-license-dot--expired {
  background: #6b7280;
}

/* Meta-val muss inline-flex sein damit Dot + Spoiler nebeneinander */
.dash-item-meta-val {
  display: inline-flex;
  align-items: center;
}

/* VIP Badge neben License-Key */
.dash-vip-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ff8c1a, #ffae5c);
  color: #1a0d00;
  border-radius: 4px;
  cursor: help;
  line-height: 1.2;
  flex-shrink: 0;
}

/* Active-Until: rot wenn weniger als 7 Tage */
.dash-item-meta-val.dash-expires-soon {
  color: #ef4444;
  font-weight: 500;
}


  50%      { transform: translateX(4px); opacity: 1; }
}

}

/* Update-Layout: Badge und Button gleich gross, Pfeil dazwischen vertikal zentriert */
.dash-item-actions {
  align-items: center;
}
.dash-update-badge {
  flex: 1;
}
.dash-update-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  opacity: 0.6;
  height: 36px;
  width: 14px;
  margin-left: -4px;
}
.dash-update-arrow svg {
  display: block;
}

.dash-item-image-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    padding: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    user-select: none;
    pointer-events: none;
}

/* devCon Switch */
.dc-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}
.dc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.dc-switch-slider {
    position: absolute;
    inset: 0;
    background: rgba(237, 66, 69, 0.55);            /* off → red */
    border: 1px solid rgba(237, 66, 69, 0.45);
    border-radius: 999px;
    transition: background 0.2s, border-color 0.2s;
}
.dc-switch-slider::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}
.dc-switch input:checked + .dc-switch-slider {
    background: rgba(67, 181, 129, 0.85);            /* on → green */
    border-color: rgba(67, 181, 129, 0.6);
}
.dc-switch input:checked + .dc-switch-slider::before {
    transform: translateX(16px);
    background: #fff;
}
.dc-switch:hover .dc-switch-slider {
    background: rgba(237, 66, 69, 0.75);
    border-color: rgba(237, 66, 69, 0.65);
}
.dc-switch input:checked:hover + .dc-switch-slider {
    background: rgba(67, 181, 129, 1);
}

/* Notify row matching style — DEVCON_NOTIFY_SEPARATOR_v2 */
.dash-notify-row {
    margin-bottom: 10px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

}

/* Dashboard: normaler Cursor ueberall, aber Werte koennen markiert+kopiert werden */
.dash-item, .dash-item * {
    cursor: default;
}
.dash-item .dash-item-meta-val {
    user-select: text;
    -webkit-user-select: text;
}
.dash-item .dc-switch,
.dash-item .dc-switch * {
    cursor: pointer;
}
.dash-item button,
.dash-item a {
    cursor: pointer;
}

/* HARD CURSOR OVERRIDE */
.dash-item,
.dash-item *,
.dash-item-meta-val,
.dash-item-meta-key,
.dash-item-name {
    cursor: default !important;
}
.dash-item .dc-switch,
.dash-item .dc-switch *,
.dash-item button,
.dash-item a {
    cursor: pointer !important;
}

/* Verhindere Text-Caret beim Klick auf static Labels */
.dash-item-meta-key,
.dash-item-meta-row,
.dash-item-name,
.dash-notify-row,
.dash-notify-row * {
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* Werte (IP, Version etc.) sollen kopierbar bleiben - aber NUR wenn user wirklich markiert */
.dash-item-meta-val {
    user-select: text;
    -webkit-user-select: text;
}


/* DEVCON_REF_CLEAN_v1 */

/* Quest Card — kompakt, einzeilig, apple-style */
.ref-quest-card {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.ref-quest-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,140,26,0.12);
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ref-quest-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ref-quest-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.ref-quest-progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
  max-width: 280px;
}
.ref-quest-progress-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 999px;
  transition: width 0.3s ease;
  width: 0%;
}
.ref-quest-progress-text {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.ref-quest-reward-value {
  font-size: 14px;
  font-weight: 700;
  color: #4ade80;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.ref-quest-claim {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--orange);
  color: #0a0a0a;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  white-space: nowrap;
}
.ref-quest-claim:hover:not(:disabled) { opacity: 0.9; }
.ref-quest-claim:active:not(:disabled) { transform: scale(0.97); }
.ref-quest-claim:disabled {
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  cursor: not-allowed;
}

.ref-quest-done {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 16px;
  color: #4ade80;
  font-size: 14px;
  font-weight: 500;
}
.ref-quest-done-icon { color: #4ade80; }

@media (max-width: 720px) {
  .ref-quest-card {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon main"
      "progress reward"
      "claim claim";
  }
  .ref-quest-icon { grid-area: icon; }
  .ref-quest-main { grid-area: main; }
  .ref-quest-progress-text { grid-area: progress; justify-self: start; }
  .ref-quest-reward-value { grid-area: reward; justify-self: end; }
  .ref-quest-claim { grid-area: claim; width: 100%; padding: 10px; justify-content: center; }
}

/* === Referral Link Card — schlank === */
.ref-link-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  margin-bottom: 28px;
}
.ref-link-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.ref-link-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  min-width: 0;
}
.ref-link-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 11px 0;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: -0.005em;
  outline: none;
  min-width: 0;
}
.ref-link-code-pill {
  background: rgba(255,140,26,0.12);
  color: var(--orange);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.ref-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: #0a0a0a;
  border: none;
  border-radius: 12px;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  white-space: nowrap;
  line-height: 1;
}
.ref-copy-btn:hover { opacity: 0.9; }
.ref-copy-btn:active { transform: scale(0.98); }
.ref-copy-btn.is-copied {
  background: rgba(74,222,128,0.2);
  color: #4ade80;
}

/* === Stats Grid === */
#dashReferralsView .ref-stats-grid { margin-bottom: 28px; }

/* === Friends List === */
.ref-friends-wrap { margin-top: 6px; }
.ref-friends-title {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ref-friends-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.ref-friend-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.ref-friend-row:last-child { border-bottom: none; }
.ref-friend-row:hover { background: rgba(255,255,255,0.02); }
.ref-friend-id { display: flex; align-items: center; gap: 12px; }
.ref-friend-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.ref-friend-avatar-fallback {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,140,26,0.12); color: var(--orange);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}
.ref-friend-name { font-weight: 500; font-size: 14px; }
.ref-friend-date { color: var(--text-muted); font-size: 12px; }
.ref-status-badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
}
.ref-friend-payout { margin-left: 8px; color: #4ade80; font-weight: 600; font-size: 12px; }
.ref-friends-empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
}
.ref-friends-empty svg { display: block; margin: 0 auto 10px; opacity: 0.6; }
.ref-friends-empty p { margin: 0; font-size: 13px; }


/* DEVCON_REF_GREETING_v1 */
.ref-title-orange { color: var(--orange); }


.ref-quest-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}
.ref-quest-progress-wrap .ref-quest-progress-bar {
  flex: 1;
  max-width: none;
  margin: 0;
}
.ref-quest-progress-num {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  min-width: 12px;
  text-align: center;
  font-weight: 500;
}
.ref-quest-progress-current { color: var(--orange); }


.ref-quest-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 0;
  line-height: 1.2;
}
.ref-quest-desc:empty { display: none; }


.ref-quest-desc { margin: 0 !important; line-height: 1.1 !important; }
.ref-quest-title { margin-bottom: 0 !important; line-height: 1.2 !important; }

/* ───── Skeleton-Loading (DEVCON_SKELETON_v1) ─────
   Page ships with structure visible from first paint. JS sets
   <body class="dc-loading"> until data lands, which pulses the placeholders.
   Removing the class stops the animation. Page-level layout is never hidden
   while loading — only the empty values pulse.
*/
@keyframes dc-skel-pulse { 0%,100% { opacity: 0.45; } 50% { opacity: 0.75; } }
body.dc-loading .dc-skel,
body.dc-loading [data-skel],
body.dc-loading .stat-value,
body.dc-loading .dash-stat-value,
body.dc-loading .vb-stat-value {
  animation: dc-skel-pulse 1.6s ease-in-out infinite;
}
