.dash-page {
  padding-bottom: 88px;
}

.dash-hero {
  margin-bottom: 28px;
}

.dash-intro {
  margin: 0;
  max-width: 40rem;
  color: var(--text-soft);
  line-height: 1.65;
  font-size: 1.02rem;
}

#dashAdminLink[hidden] {
  display: none !important;
}

.dash-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.dash-board {
  display: grid;
  gap: 20px;
}

.dash-card {
  padding: 22px 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm), var(--shadow-inset);
}

.dash-card h2 {
  margin: 0 0 14px;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash-card--auth {
  max-width: 480px;
}

.dash-muted {
  margin: 0 0 16px;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

.dash-hint {
  margin-top: 12px;
  margin-bottom: 0;
}

.dash-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.dash-aside {
  display: grid;
  gap: 16px;
}

.dash-main {
  display: grid;
  gap: 20px;
  min-width: 0;
}

/* —— Clip Catch mini-game —— */
.dash-card--game {
  border-color: rgba(139, 124, 248, 0.18);
  background:
    linear-gradient(165deg, rgba(91, 141, 239, 0.08) 0%, rgba(14, 20, 36, 0.72) 55%),
    var(--panel);
}

.dash-game-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dash-game-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.dash-game-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.dash-game-pick:hover {
  border-color: rgba(91, 141, 239, 0.45);
  color: var(--text);
}

.dash-game-pick.is-active {
  border-color: rgba(91, 141, 239, 0.55);
  background: rgba(91, 141, 239, 0.16);
  color: #c8dcff;
}

.dash-game-pick-emoji {
  font-size: 1rem;
  line-height: 1;
}

[data-game-lives-wrap][hidden],
[data-game-time-wrap][hidden] {
  display: none;
}

.dash-game-personal-best {
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #c8dcff;
  border: 1px solid rgba(91, 141, 239, 0.28);
  background: rgba(91, 141, 239, 0.1);
}

.dash-game-personal-best[hidden] {
  display: none;
}

.dash-game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 240px);
  gap: 20px;
  align-items: start;
}

.dash-game-stage {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #06080f;
  overflow: hidden;
}

.dash-game-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--text-soft);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.dash-game-hud strong {
  color: var(--text);
  font-size: 1rem;
}

.dash-game-hud em {
  margin-left: 6px;
  font-style: normal;
  font-weight: 800;
  color: #a78bfa;
}

.dash-game-canvas {
  display: block;
  width: 100%;
  height: 260px;
  touch-action: none;
  cursor: pointer;
  outline: none;
}

.dash-game-canvas:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(91, 141, 239, 0.45);
}

.dash-game-overlay {
  position: absolute;
  inset: 36px 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  background: rgba(6, 8, 15, 0.72);
  backdrop-filter: blur(6px);
}

.dash-game-overlay[hidden] {
  display: none;
}

.dash-game-overlay-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dash-game-overlay-sub {
  margin: 0;
  max-width: 22rem;
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.5;
}

.dash-game-controls-hint {
  margin: 0;
  padding: 8px 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.dash-game-side {
  min-width: 0;
}

.dash-game-lb-title {
  margin: 0 0 12px;
  font-size: 0.92rem;
  font-weight: 700;
}

.dash-game-lb {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
}

.dash-game-lb-row {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.84rem;
}

.dash-game-lb-row--you {
  border-color: rgba(91, 141, 239, 0.35);
  background: rgba(91, 141, 239, 0.1);
}

.dash-game-lb-rank {
  font-weight: 800;
  text-align: center;
}

.dash-game-lb-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-soft);
}

.dash-game-lb-row--you .dash-game-lb-name {
  color: var(--text);
  font-weight: 600;
}

.dash-game-lb-score {
  font-weight: 800;
  color: #b8cff5;
}

.dash-game-lb-empty {
  padding: 16px 10px;
  color: var(--text-soft);
  font-size: 0.85rem;
  line-height: 1.5;
  list-style: none;
}

@media (max-width: 820px) {
  .dash-game-layout {
    grid-template-columns: 1fr;
  }
}

.dash-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dash-profile-label {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.dash-profile-email {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  word-break: break-all;
  color: var(--text);
}

.dash-plan-badge {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dash-plan-badge--free {
  border: 1px solid rgba(91, 141, 239, 0.35);
  background: rgba(91, 141, 239, 0.12);
  color: #c8dcff;
}

.dash-plan-badge--pro {
  border: 1px solid rgba(167, 139, 250, 0.45);
  background: linear-gradient(135deg, rgba(139, 124, 248, 0.22), rgba(91, 141, 239, 0.14));
  color: #ebe4ff;
}

.dash-logout-btn {
  margin-bottom: 8px;
}

.dash-limits-text {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.55;
}

.dash-usage-stack {
  display: grid;
  gap: 12px;
}

.dash-usage-card {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow-inset);
}

.dash-usage-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.dash-usage-head strong {
  color: var(--text);
  font-size: 0.98rem;
}

.dash-usage-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.dash-usage-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #7eb8ff);
  transition: width 0.35s ease;
}

.dash-usage-fill--clips {
  background: linear-gradient(90deg, #3dd68c, var(--primary));
}

.dash-usage-fill--full {
  background: linear-gradient(90deg, #e8a838, #ff6b6b);
}

.dash-usage-hint {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: #ffd8a8;
  line-height: 1.45;
}

.dash-usage-hint[hidden] {
  display: none;
}

.dash-quick {
  display: grid;
  gap: 10px;
}

.dash-quick-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s var(--ease-out),
    background 0.2s var(--ease-out),
    transform 0.2s var(--ease-out);
}

.dash-quick-item:hover {
  border-color: rgba(91, 141, 239, 0.22);
  background: rgba(91, 141, 239, 0.06);
  transform: translateY(-1px);
}

.dash-quick-item--primary {
  border-color: rgba(91, 141, 239, 0.28);
  background: linear-gradient(135deg, rgba(91, 141, 239, 0.14), rgba(139, 124, 248, 0.08));
}

.dash-quick-item--btn {
  width: 100%;
  font: inherit;
}

.dash-quick-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.dash-quick-item strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.dash-quick-item span span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-soft);
  font-weight: 500;
}

.dash-section-head {
  margin-bottom: 18px;
}

.dash-section-head h2 {
  margin-bottom: 6px;
}

.dash-section-head .dash-muted {
  margin: 0;
}

.dash-clip-list {
  display: grid;
  gap: 12px;
}

.dash-clip-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: var(--shadow-inset);
  transition: border-color 0.2s var(--ease-out);
}

.dash-clip-card:hover {
  border-color: rgba(91, 141, 239, 0.18);
}

.dash-clip-card--ok {
  border-color: rgba(61, 214, 140, 0.2);
}

.dash-clip-card-main {
  flex: 1 1 220px;
  min-width: 0;
}

.dash-clip-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.dash-clip-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dash-clip-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.dash-clip-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.dash-clip-wait {
  font-size: 0.85rem;
  color: var(--text-soft);
}

.dash-clip-link-secondary {
  font-size: 0.88rem;
}

.dash-empty-state {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 40px 24px;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.dash-empty-state-title {
  margin: 0;
  max-width: 28rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.dash-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-pill--ok {
  background: rgba(61, 214, 140, 0.18);
  color: #9ce0c0;
}

.dash-pill--err {
  background: rgba(255, 107, 107, 0.16);
  color: #ffb4b4;
}

.dash-pill--run {
  background: rgba(91, 141, 239, 0.2);
  color: #b8d4ff;
}

.dash-pill--q {
  background: rgba(255, 200, 120, 0.14);
  color: #ffd8a8;
}

.dash-pill--def {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
}

.dash-link {
  color: var(--primary);
  font-weight: 600;
}

.dash-err {
  color: #ffb4b4;
  cursor: help;
  border-bottom: 1px dotted rgba(255, 180, 180, 0.5);
  font-size: 0.85rem;
}

.dash-auth-grid {
  display: grid;
  gap: 10px;
}

.dash-auth-grid label {
  font-size: 0.82rem;
  color: var(--text-soft);
}

.dash-auth-grid input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
}

.dash-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.dash-btn-delete {
  padding: 0;
  border: none;
  background: none;
  color: #ffb4b4;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dash-btn-delete:hover {
  color: #ffd0d0;
}

@media (max-width: 900px) {
  .dash-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dash-clip-card {
    flex-direction: column;
    align-items: stretch;
  }

  .dash-clip-actions {
    justify-content: flex-start;
  }
}
