/* Customer dashboard (pages/dashboard.html). Behaviour: scripts/dashboard.js
   Buttons (.avn-btn), avatars (.avn-av) and errors (.avn-err) come from styles/store.css */
.dsh {
  --acc: var(--cl-accent-rgb, 163, 191, 240);
  --line: rgba(255, 255, 255, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --display: "Clash Display", var(--font-body, system-ui, sans-serif);
  max-width: 1260px;
  margin: 0 auto;
  padding: clamp(96px, 10vw, 128px) 16px 70px;
  color: #fff;
  min-height: 70vh;
}
.dsh-ic { width: 18px; height: 18px; flex: none; }
.dsh a { text-decoration: none; }

/* ---------- layout ---------- */
.dsh-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.dsh-side {
  position: sticky; top: 100px;
  display: flex; flex-direction: column; gap: 14px;
  padding: 14px; border-radius: 22px; border: 1px solid var(--line);
  background: radial-gradient(120% 40% at 0% 0%, rgba(var(--acc), 0.12), transparent 60%), linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  animation: dsh-in 0.8s var(--ease) both;
}
@keyframes dsh-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.dsh-me { display: flex; align-items: center; gap: 11px; padding: 6px 6px 14px; border-bottom: 1px solid var(--line); }
.dsh-me__txt { display: flex; flex-direction: column; min-width: 0; }
.dsh-me__txt b { overflow: hidden; font-size: 14.5px; text-overflow: ellipsis; white-space: nowrap; }
.dsh-me__txt small { overflow: hidden; font-size: 12px; color: #8f919d; text-overflow: ellipsis; white-space: nowrap; }
.dsh-nav { position: relative; display: flex; flex-direction: column; gap: 2px; }
.dsh-nav a {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 12px;
  font-size: 14px; font-weight: 600; color: #a9abb6; white-space: nowrap;
  transition: color 0.25s ease;
}
.dsh-nav a:hover { color: #fff; }
.dsh-nav a.is-active { color: #fff; }
.dsh-nav a .dsh-ic { color: rgba(var(--acc), 0.75); transition: color 0.25s ease; }
.dsh-nav a.is-active .dsh-ic { color: rgb(var(--acc)); }
.dsh-nav a span { flex: 1; }
.dsh-nav em { min-width: 22px; padding: 1px 7px; border-radius: 999px; font-style: normal; font-size: 11.5px; font-weight: 800; text-align: center; color: #c9d6f5; background: rgba(var(--acc), 0.14); }
.dsh-nav a.is-active em { color: #0b0b0d; background: rgb(var(--acc)); }
.dsh-glider {
  position: absolute; left: 0; top: 0; z-index: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(var(--acc), 0.2), rgba(var(--acc), 0.07));
  box-shadow: inset 0 0 0 1px rgba(var(--acc), 0.3), 0 8px 20px -12px rgba(var(--acc), 0.9);
  opacity: 0;
  transition: transform 0.5s var(--ease), width 0.5s var(--ease), height 0.5s var(--ease), opacity 0.3s ease;
  pointer-events: none;
}
.dsh-glider.is-on { opacity: 1; }
.dsh-out { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; background: none; color: #f0a3a3; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease; }
.dsh-out:hover { color: #fecaca; background: rgba(248, 113, 113, 0.08); }

.dsh-main { min-width: 0; outline: none; }
.dsh-view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.dsh-view.is-enter > * { animation: dsh-in 0.7s var(--ease) both; }
.dsh-view.is-enter > *:nth-child(2) { animation-delay: 0.06s; }
.dsh-view.is-enter > *:nth-child(3) { animation-delay: 0.12s; }
.dsh-view.is-enter > *:nth-child(4) { animation-delay: 0.18s; }
.dsh-view.is-enter > *:nth-child(n+5) { animation-delay: 0.24s; }

/* ---------- headings ---------- */
.dsh-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 4px; }
.dsh-kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 10px; padding: 5px 11px 5px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #d9dbe3; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.dsh-kicker .dsh-ic { width: 14px; height: 14px; color: rgb(var(--acc)); }
.dsh-h1 { margin: 0 0 6px; font-family: var(--display); font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.025em; }
.dsh-h1 span { background: linear-gradient(100deg, rgb(var(--acc)), #fff 50%, rgb(var(--acc))); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: dsh-sheen 6s ease-in-out infinite; }
@keyframes dsh-sheen { 50% { background-position: 100% 0; } }
.dsh-lead { margin: 0; font-size: 15px; color: #a3a6b3; }
.dsh-h2 { margin: 0 0 12px; font-family: var(--display); font-size: 18px; font-weight: 700; }
.dsh-muted { margin: 0 0 14px; font-size: 14px; color: #9a9ca8; }
.dsh-btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- cards ---------- */
.dsh-card {
  min-width: 0;
  padding: 20px; border-radius: 22px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
}
.dsh-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.dsh-card__head h2 { margin: 0; font-family: var(--display); font-size: 18px; }
.dsh-card__head a { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: rgb(var(--acc)); }
.dsh-card__head a .dsh-ic { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.dsh-card__head a:hover .dsh-ic { transform: translateX(3px); }
.dsh-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.dsh-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.dsh-stat {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 16px 18px; border-radius: 20px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  color: #fff;
  transition: transform 0.45s var(--ease), border-color 0.3s ease, box-shadow 0.45s ease;
}
.dsh-stat:hover { color: #fff; transform: translateY(-3px); border-color: rgba(var(--acc), 0.3); box-shadow: 0 20px 40px -28px rgba(var(--acc), 0.9); }
.dsh-stat .dsh-ic { grid-row: span 2; width: 42px; height: 42px; padding: 10px; border-radius: 13px; color: rgb(var(--acc)); background: rgba(var(--acc), 0.1); border: 1px solid rgba(var(--acc), 0.22); }
.dsh-stat b { font-family: var(--display); font-size: 24px; line-height: 1.1; }
.dsh-stat span { font-size: 12.5px; color: #9a9ca8; }

.dsh-cont {
  display: flex; align-items: center; gap: 14px;
  padding: 12px; margin-bottom: 8px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025);
  color: #fff; transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.4s var(--ease);
}
.dsh-cont:last-child { margin-bottom: 0; }
.dsh-cont:hover { color: #fff; border-color: rgba(var(--acc), 0.35); background: rgba(var(--acc), 0.05); transform: translateX(3px); }
.dsh-cont__img, .dsh-oi__img, .dsh-key__img { width: 50px; height: 50px; flex: none; border-radius: 13px; overflow: hidden; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); display: grid; place-items: center; color: rgb(var(--acc)); }
.dsh-cont__img img, .dsh-oi__img img, .dsh-key__img img { width: 100%; height: 100%; object-fit: cover; }
.dsh-cont__body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.dsh-cont__body b { font-size: 14.5px; }
.dsh-cont__body small { font-size: 12px; color: #9a9ca8; }
.dsh-cont__go { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: rgb(var(--acc)); }
.dsh-cont__go .dsh-ic { width: 15px; height: 15px; }
.dsh-bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.dsh-bar span { display: block; height: 100%; width: var(--p); border-radius: inherit; background: linear-gradient(90deg, rgba(var(--acc), 0.6), rgb(var(--acc))); box-shadow: 0 0 10px rgba(var(--acc), 0.8); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.1s var(--ease) 0.2s; }
.dsh-bar.is-in span { transform: scaleX(1); }

.dsh-cta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; }
.dsh-cta__ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: rgb(var(--acc)); background: rgba(var(--acc), 0.12); border: 1px solid rgba(var(--acc), 0.28); }
.dsh-cta b { font-size: 15.5px; }
.dsh-cta p { margin: 4px 0 0; font-size: 13.5px; color: #9a9ca8; }
.dsh-cta .dsh-btns { grid-column: 1 / -1; }

.dsh-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 10px; }
.dsh-q {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center;
  padding: 12px; border-radius: 16px; color: #fff;
  transition: background-color 0.25s ease, transform 0.4s var(--ease);
}
.dsh-q:hover { color: #fff; background: rgba(255, 255, 255, 0.05); transform: translateY(-2px); }
.dsh-q > span { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: rgb(var(--acc)); background: rgba(var(--acc), 0.1); }
.dsh-q b { font-size: 14px; }
.dsh-q small { overflow: hidden; font-size: 12px; color: #8f919d; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- setup ---------- */
.dsh-pick { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.15) transparent; }
.dsh-pick__i {
  position: relative; display: flex; align-items: center; gap: 9px; flex: none;
  padding: 6px 14px 6px 6px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03);
  color: #b7bac6; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease, transform 0.3s var(--ease);
}
.dsh-pick__i img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
.dsh-pick__i:hover { color: #fff; border-color: rgba(255, 255, 255, 0.18); }
.dsh-pick__i.is-active { color: #fff; border-color: rgba(var(--acc), 0.55); background: rgba(var(--acc), 0.12); box-shadow: 0 10px 24px -16px rgba(var(--acc), 1); }
.dsh-pick__own { width: 14px; height: 14px; color: rgb(var(--acc)); }

.dsh-setup { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.dsh-setup__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.dsh-setup__side { position: sticky; top: 100px; display: grid; gap: 14px; }
.dsh-prod {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; border-radius: 22px; border: 1px solid var(--line);
  background: radial-gradient(120% 80% at 100% 0%, rgba(var(--acc), 0.14), transparent 60%), linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
}
.dsh-prod__img { width: 72px; height: 72px; flex: none; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.dsh-prod__img img { width: 100%; height: 100%; object-fit: cover; }
.dsh-prod__txt { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; flex: 1; min-width: 0; }
.dsh-prod__txt b { font-family: var(--display); font-size: 21px; }
.dsh-prod__txt > span:not(.dsh-pill) { font-size: 13px; color: #9a9ca8; }
.dsh-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); border: 1px solid color-mix(in srgb, var(--c) 32%, transparent); white-space: nowrap; }
.dsh-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); animation: dsh-blink 2s ease-in-out infinite; }
@keyframes dsh-blink { 50% { opacity: 0.45; } }
.dsh-ring { position: relative; width: 62px; height: 62px; flex: none; }
.dsh-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; filter: drop-shadow(0 0 5px rgba(var(--acc), 0.8)); }
.dsh-ring circle { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 4; }
.dsh-ring .dsh-ring__fill { stroke: rgb(var(--acc)); stroke-linecap: round; stroke-dasharray: 119.4; stroke-dashoffset: 119.4; transition: stroke-dashoffset 1.2s var(--ease) 0.15s; }
.dsh-ring.is-in .dsh-ring__fill { stroke-dashoffset: calc(119.4 - 119.4 * var(--p) / 100); }
.dsh-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13.5px; }

.dsh-alert, .dsh-win { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.dsh-alert { color: #f5e2c2; background: rgba(245, 180, 84, 0.08); border: 1px solid rgba(245, 180, 84, 0.28); }
.dsh-alert[data-s="down"] { color: #fecaca; background: rgba(248, 113, 113, 0.08); border-color: rgba(248, 113, 113, 0.3); }
.dsh-win { color: #d6f5e3; background: rgba(74, 222, 128, 0.08); border: 1px solid rgba(74, 222, 128, 0.3); animation: dsh-pop 0.6s var(--spring) both; }
@keyframes dsh-pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
.dsh-win .dsh-ic { color: #4ade80; }

.dsh-steps { position: relative; margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.dsh-step {
  position: relative; border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012));
  transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.4s ease;
}
.dsh-view.is-enter .dsh-step { animation: dsh-in 0.6s var(--ease) both; animation-delay: calc(0.1s + var(--k, 0) * 70ms); }
.dsh-step.is-current { border-color: rgba(var(--acc), 0.45); box-shadow: 0 24px 44px -30px rgba(var(--acc), 0.9); }
.dsh-step.is-done { border-color: rgba(74, 222, 128, 0.22); }
.dsh-step__head { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; background: none; color: #fff; font: inherit; text-align: left; cursor: pointer; }
.dsh-step__num {
  display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 11px;
  font-family: var(--display); font-size: 15px; font-weight: 700;
  color: #c9d6f5; background: rgba(var(--acc), 0.1); border: 1px solid rgba(var(--acc), 0.25);
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.4s var(--spring);
}
.dsh-step__num .dsh-ic { width: 17px; height: 17px; }
.dsh-step.is-current .dsh-step__num { color: #0b0b0d; background: rgb(var(--acc)); box-shadow: 0 0 18px -2px rgba(var(--acc), 0.9); }
.dsh-step.is-done .dsh-step__num { color: #0b0b0d; background: #4ade80; border-color: transparent; }
.dsh-step__title { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 15.5px; font-weight: 700; }
.dsh-step__title small { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #8f919d; }
.dsh-step.is-done .dsh-step__title { color: #b7bac6; }
.dsh-step__chev { width: 18px; height: 18px; color: #8f919d; transition: transform 0.4s var(--ease); }
.dsh-step.is-open .dsh-step__chev, .dsh-fq.is-open .dsh-step__chev { transform: rotate(180deg); }
.dsh-step__body { height: 0; overflow: hidden; transition: height 0.4s var(--ease); }
.dsh-step__in { padding: 0 16px 16px 66px; display: grid; gap: 12px; }
.dsh-step__in > p { margin: 0; font-size: 14.5px; line-height: 1.65; color: #c3c6d1; }
.dsh-done { justify-self: start; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 11px; border: 1px solid rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.08); color: #a7f3c4; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background-color 0.2s ease, transform 0.3s var(--spring); }
.dsh-done .dsh-ic { width: 15px; height: 15px; }
.dsh-done:hover { background: rgba(74, 222, 128, 0.16); }
.dsh-done:active { transform: scale(0.95); }
.dsh-step.is-done .dsh-done { border-color: var(--line); background: rgba(255, 255, 255, 0.04); color: #9a9ca8; }

.dsh-dl {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 16px;
  color: #0b0b0d;
  background: linear-gradient(180deg, color-mix(in srgb, rgb(var(--acc)) 80%, #fff 20%), rgb(var(--acc)) 60%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 16px 30px -16px rgba(var(--acc), 1);
  transition: transform 0.35s var(--ease), filter 0.2s ease;
}
.dsh-dl:hover { color: #0b0b0d; transform: translateY(-2px); filter: brightness(1.05); }
.dsh-dl > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dsh-dl b { font-size: 15px; }
.dsh-dl small { font-size: 12px; opacity: 0.7; }
.dsh-dl__ic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: rgba(11, 11, 13, 0.12); }
.dsh-dl__ic .dsh-ic { width: 20px; height: 20px; animation: dsh-bob 2s ease-in-out infinite; }
@keyframes dsh-bob { 50% { transform: translateY(2px); } }
.dsh-dl--discord { color: #fff; background: rgba(var(--acc), 0.1); border: 1px solid rgba(var(--acc), 0.35); box-shadow: none; }
.dsh-dl--discord:hover { color: #fff; background: rgba(var(--acc), 0.16); }
.dsh-dl--discord .dsh-dl__ic { color: rgb(var(--acc)); background: rgba(var(--acc), 0.14); }
.dsh-dl--discord .dsh-dl__ic .dsh-ic { animation: none; }
.dsh-inline { justify-self: start; display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: rgb(var(--acc)); }
.dsh-inline .dsh-ic { width: 15px; height: 15px; }

.dsh-req { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.dsh-req li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; line-height: 1.45; color: #c3c6d1; }
.dsh-req .dsh-ic { width: 16px; height: 16px; margin-top: 1px; color: #4ade80; }
.dsh-help p { margin: 0 0 12px; font-size: 13.5px; color: #9a9ca8; }
.dsh-reset { justify-self: center; padding: 4px; border: 0; background: none; color: #7d7f8b; font: inherit; font-size: 12.5px; cursor: pointer; }
.dsh-reset:hover { color: #fca5a5; }

/* ---------- keys ---------- */
.dsh-key { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dsh-key__main { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.dsh-key__top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dsh-key__top b { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.dsh-key__code {
  align-self: flex-start; max-width: 100%; overflow: hidden;
  padding: 6px 10px; border-radius: 9px;
  font: 600 14px/1.4 ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: 0.06em;
  color: #e6ecfb; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(var(--acc), 0.2);
  text-overflow: ellipsis; white-space: nowrap;
}
.dsh-key.is-shown .dsh-key__code { border-color: rgba(var(--acc), 0.5); box-shadow: 0 0 0 3px rgba(var(--acc), 0.1); }
.dsh-key__acts { display: flex; gap: 6px; flex: none; }
.dsh-ib {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; min-width: 36px; padding: 0 10px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: #d9dbe3;
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.25s var(--spring);
}
.dsh-ib .dsh-ic { width: 16px; height: 16px; }
.dsh-ib:hover { color: #fff; border-color: rgba(var(--acc), 0.4); background: rgba(var(--acc), 0.1); }
.dsh-ib:active { transform: scale(0.93); }
.dsh-ib--copy { color: #0b0b0d; background: rgb(var(--acc)); border-color: transparent; }
.dsh-ib--copy:hover { color: #0b0b0d; background: rgb(var(--acc)); filter: brightness(1.08); }
.dsh-ib.is-done { color: #0b0b0d; background: #4ade80; }
.dsh-ib.is-fail { color: #fff; background: #ef4444; }
.dsh-chip { display: inline-block; padding: 2px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 600; color: #c7cbd8; background: rgba(255, 255, 255, 0.07); white-space: nowrap; }
.dsh-chip--acc { margin-left: 8px; color: #0b0b0d; background: rgb(var(--acc)); vertical-align: middle; }
.dsh-keys--inline { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.2); border: 1px solid var(--line); }
.dsh-keylist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.dsh-keycard { display: grid; gap: 14px; }
.dsh-view.is-enter .dsh-keycard { animation: dsh-in 0.6s var(--ease) both; animation-delay: calc(0.1s + var(--k, 0) * 60ms); }
.dsh-keycard__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.dsh-keycard__foot small { font-size: 12px; color: #8f919d; }
.dsh-keycard__foot > span { display: flex; gap: 4px; }
.dsh-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 0; border-radius: 9px; background: none; color: rgb(var(--acc)); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color 0.2s ease, color 0.2s ease; }
.dsh-link .dsh-ic { width: 15px; height: 15px; }
.dsh-link:hover { color: #fff; background: rgba(var(--acc), 0.1); }
.dsh-link--danger { color: #9a9ca8; }
.dsh-link--danger:hover, .dsh-link--danger.is-confirm { color: #fecaca; background: rgba(248, 113, 113, 0.1); }

.dsh-addkey { display: grid; grid-template-rows: 0fr; padding: 0 20px; border-color: transparent; background: none; opacity: 0; transition: grid-template-rows 0.45s var(--ease), padding 0.45s var(--ease), opacity 0.3s ease, border-color 0.3s ease; }
.dsh-addkey.is-open { grid-template-rows: 1fr; padding: 20px; opacity: 1; border-color: rgba(var(--acc), 0.35); background: radial-gradient(120% 60% at 100% 0%, rgba(var(--acc), 0.12), transparent 60%), rgba(255, 255, 255, 0.03); }
.dsh-addkey__in { min-height: 0; overflow: hidden; }
.dsh-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.dsh-lbl { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.dsh-form .dsh-lbl { margin: 0; }
.dsh-lbl--wide { grid-column: 1 / -1; }
.dsh-lbl > span { font-size: 12.5px; font-weight: 700; color: #b7bac6; }
.dsh-lbl > span i { font-style: normal; font-weight: 500; color: #7d7f8b; }
.dsh-lbl input, .dsh-lbl select, .dsh-field input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(0, 0, 0, 0.25); color: #fff;
  font: inherit; font-size: 14.5px; outline: none;
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}
.dsh-lbl select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9ca8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.dsh-lbl select option { color: #fff; background: #16161b; }
.dsh-lbl input[name="key"], .dsh-field input { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; letter-spacing: 0.04em; }
.dsh-lbl input:focus, .dsh-lbl select:focus, .dsh-field input:focus { border-color: rgba(var(--acc), 0.6); box-shadow: 0 0 0 4px rgba(var(--acc), 0.13); }
.dsh-lbl input:disabled { color: #8f919d; }
.dsh-quickkey { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.dsh-quickkey .avn-err { grid-column: 1 / -1; }
.dsh-field { position: relative; display: block; }
.dsh-field .dsh-ic { position: absolute; left: 14px; top: 50%; width: 17px; height: 17px; color: rgba(var(--acc), 0.8); transform: translateY(-50%); pointer-events: none; }
.dsh-field input { padding-left: 42px; }
.dsh-note { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12.5px; color: #8f919d; }
.dsh-note .dsh-ic { width: 14px; height: 14px; }

/* ---------- orders / lists ---------- */
.dsh-orders { display: grid; gap: 14px; }
.dsh-view.is-enter .dsh-stagger { animation: dsh-in 0.6s var(--ease) both; animation-delay: calc(0.1s + var(--k, 0) * 70ms); }
.dsh-order { border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)); overflow: hidden; }
.dsh-order--compact { border-radius: 16px; background: rgba(255, 255, 255, 0.025); }
.dsh-order__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dsh-order__head > span { display: flex; flex-direction: column; }
.dsh-order__head b { font-family: ui-monospace, Consolas, monospace; font-size: 14px; letter-spacing: 0.04em; }
.dsh-order__head small { font-size: 12px; color: #8f919d; }
.dsh-order__total { align-items: flex-end; }
.dsh-order__total b { font-family: var(--display); font-size: 19px; letter-spacing: 0; }
.dsh-order__items { display: grid; }
.dsh-oi { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dsh-oi:last-child { border-bottom: 0; }
.dsh-oi__img { width: 44px; height: 44px; border-radius: 12px; }
.dsh-oi__txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dsh-oi__txt b { overflow: hidden; font-size: 14.5px; text-overflow: ellipsis; white-space: nowrap; }
.dsh-oi__txt small { overflow: hidden; font-size: 12.5px; color: #9a9ca8; text-overflow: ellipsis; white-space: nowrap; }
.dsh-oi__acts { display: flex; gap: 2px; flex: none; }
.dsh-oi__price { font-variant-numeric: tabular-nums; }
.dsh-order__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 11px 16px; font-size: 12.5px; color: #9a9ca8; background: rgba(0, 0, 0, 0.18); }
.dsh-order__foot > span { display: inline-flex; align-items: center; gap: 7px; }
.dsh-order__foot .dsh-ic { width: 14px; height: 14px; color: #f5c07a; }

.dsh-minicart { margin: -8px -8px 0; }
.dsh-minicart .dsh-oi { padding: 12px 8px; }
.dsh-minicart__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: #a9abb6; }
.dsh-minicart__foot b { margin-left: 6px; font-family: var(--display); font-size: 20px; color: #fff; }

.dsh-statlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dsh-sp {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.012)); color: #fff;
  transition: border-color 0.25s ease, transform 0.4s var(--ease);
}
.dsh-view.is-enter .dsh-sp { animation: dsh-in 0.6s var(--ease) both; animation-delay: calc(0.08s + var(--k, 0) * 50ms); }
.dsh-sp:hover { color: #fff; border-color: rgba(var(--acc), 0.3); transform: translateY(-2px); }

/* ---------- support ---------- */
.dsh-support { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; }
.dsh-support .dsh-q { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); grid-template-columns: minmax(0, 1fr); row-gap: 3px; align-content: start; }
.dsh-support .dsh-q > span { grid-row: auto; margin-bottom: 8px; }
.dsh-discord { display: flex; align-items: center; gap: 14px; color: #fff; border-color: rgba(var(--acc), 0.35); background: radial-gradient(120% 90% at 0% 0%, rgba(var(--acc), 0.2), transparent 60%), rgba(255, 255, 255, 0.03); transition: transform 0.4s var(--ease), box-shadow 0.4s ease; }
.dsh-discord:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 24px 44px -28px rgba(var(--acc), 1); }
.dsh-discord > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.dsh-discord b { font-size: 16px; }
.dsh-discord small { font-size: 12.5px; color: #a3a6b3; line-height: 1.45; }
.dsh-discord__ic { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; color: #0b0b0d; background: rgb(var(--acc)); box-shadow: 0 10px 24px -10px rgba(var(--acc), 1); }
.dsh-discord__ic .dsh-ic { width: 22px; height: 22px; }
.dsh-faq { display: grid; gap: 8px; }
.dsh-fq { border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); transition: border-color 0.25s ease; }
.dsh-fq.is-open { border-color: rgba(var(--acc), 0.35); }
.dsh-fq__q { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 16px; border: 0; background: none; color: #fff; font: inherit; font-size: 14.5px; font-weight: 700; text-align: left; cursor: pointer; }
.dsh-fq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s var(--ease); }
.dsh-fq.is-open .dsh-fq__a { grid-template-rows: 1fr; }
.dsh-fq__a > div { min-height: 0; overflow: hidden; }
.dsh-fq__a p { margin: 0; padding: 0 16px 14px; font-size: 14px; line-height: 1.65; color: #b7bac6; }

/* ---------- profile ---------- */
.dsh-prof { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.dsh-prof b { margin-top: 6px; font-family: var(--display); font-size: 22px; }
.dsh-prof small { font-size: 13px; color: #8f919d; }
.dsh-danger { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dsh-danger .dsh-muted { margin: 0; }
.dsh-danger .dsh-h2 { margin-bottom: 4px; }
.dsh-btn-danger:hover, .dsh-btn-danger.is-confirm { color: #fecaca !important; border-color: rgba(248, 113, 113, 0.45) !important; background: rgba(248, 113, 113, 0.1) !important; }

/* ---------- empty + gate ---------- */
.dsh-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: clamp(30px, 5vw, 50px) 16px; border-radius: 22px; border: 1px dashed rgba(255, 255, 255, 0.12); text-align: center; }
.dsh-empty__art { display: grid; place-items: center; width: 70px; height: 70px; margin-bottom: 8px; border-radius: 22px; color: rgb(var(--acc)); background: rgba(var(--acc), 0.08); border: 1px solid rgba(var(--acc), 0.25); animation: dsh-float 4s ease-in-out infinite; }
.dsh-empty__art .dsh-ic { width: 30px; height: 30px; }
@keyframes dsh-float { 50% { transform: translateY(-6px) rotate(-3deg); } }
.dsh-empty b { font-family: var(--display); font-size: 20px; }
.dsh-empty p { max-width: 44ch; margin: 0 0 10px; font-size: 14px; color: #9a9ca8; }

.dsh-gate { display: flex; flex-direction: column; align-items: center; max-width: 560px; margin: 0 auto; padding: clamp(20px, 5vw, 50px) 0; text-align: center; animation: dsh-in 0.9s var(--ease) both; }
.dsh-gate__art { position: relative; display: grid; place-items: center; width: 110px; height: 110px; margin-bottom: 22px; color: rgb(var(--acc)); }
.dsh-gate__art span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(var(--acc), 0.35); animation: dsh-ring 3s ease-out infinite; }
.dsh-gate__art span + span { animation-delay: 1.5s; }
@keyframes dsh-ring { from { transform: scale(0.5); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.dsh-gate__ic { position: relative; width: 46px; height: 46px; filter: drop-shadow(0 0 16px rgba(var(--acc), 0.6)); }
.dsh-gate .dsh-lead { margin-bottom: 24px; }
.dsh-gate__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.dsh-gate__list li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; font-size: 13px; color: #c3c6d1; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.dsh-gate__list .dsh-ic { width: 15px; height: 15px; color: rgb(var(--acc)); }

.nav-link.is-current { color: #fff !important; }

/* ---------- responsive ----------
   Container queries, not media queries: the site's 4:3 stretch makes the real layout
   width smaller than the viewport width that media queries see. */
.dsh { container: dsh / inline-size; }
.dsh-main { container: dmain / inline-size; }

@container dsh (max-width: 960px) {
  .dsh-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .dsh-side { position: static; flex-direction: row; align-items: center; gap: 10px; padding: 8px; border-radius: 18px; }
  .dsh-me, .dsh-out { display: none; }
  .dsh-nav { flex-direction: row; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .dsh-nav::-webkit-scrollbar { display: none; }
  .dsh-nav a { flex: none; padding: 9px 12px; }
}
@container dmain (max-width: 900px) {
  .dsh-setup { grid-template-columns: minmax(0, 1fr); }
  .dsh-setup__side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dsh-reset { grid-column: 1 / -1; }
  .dsh-support { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dsh-discord { grid-column: 1 / -1; }
}
@container dmain (max-width: 820px) {
  .dsh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dsh-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container dmain (max-width: 700px) {
  .dsh-statlist { grid-template-columns: minmax(0, 1fr); }
}
@container dmain (max-width: 640px) {
  .dsh-grid2 { grid-template-columns: minmax(0, 1fr); }
}
@container dmain (max-width: 540px) {
  .dsh-card { padding: 16px; border-radius: 18px; }
  .dsh-stat { padding: 12px; column-gap: 10px; }
  .dsh-stat .dsh-ic { width: 36px; height: 36px; padding: 8px; }
  .dsh-stat b { font-size: 20px; }
  .dsh-stat span { font-size: 11.5px; }
  .dsh-setup__side { grid-template-columns: minmax(0, 1fr); }
  .dsh-support { grid-template-columns: minmax(0, 1fr); }
  .dsh-step__in { padding: 0 14px 14px; }
  .dsh-step__head { padding: 12px 14px; gap: 12px; }
  .dsh-prod { flex-wrap: wrap; }
  .dsh-prod__img { width: 56px; height: 56px; }
  .dsh-key { flex-wrap: wrap; }
  .dsh-key__acts { width: 100%; }
  .dsh-key__acts .dsh-ib--copy { flex: 1; }
  .dsh-form { grid-template-columns: minmax(0, 1fr); }
  .dsh-quickkey { grid-template-columns: minmax(0, 1fr); }
  .dsh-oi { flex-wrap: wrap; }
  .dsh-oi__acts { width: 100%; padding-left: 56px; }
  .dsh-keycard__foot { flex-wrap: wrap; }
  .dsh-cont__go { display: none; }
  .dsh-head .avn-btn { width: 100%; }
}
@container dmain (max-width: 400px) {
  .dsh-quick { grid-template-columns: minmax(0, 1fr); }
  .dsh-stat { grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
  .dsh-stat .dsh-ic { grid-row: auto; }
}
