.dash-app { width: min(100%, 80rem); margin: 0 auto; padding: 3.5rem max(1rem, 2.2vw) 5rem; color: #fff; }
.dash-muted { color: rgba(255, 255, 255, 0.55); font-size: 0.8125rem; }
.dash-kicker { margin: 0 0 0.5rem; color: #c597f1; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

/* Sign-in */
.dash-login { display: grid; place-items: center; min-height: 60vh; }
.dash-login-card {
  width: min(100%, 28rem); padding: 2rem; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 1.5rem;
  background: radial-gradient(circle at 50% 0%, rgba(126, 63, 219, 0.22), transparent 60%), rgba(255, 255, 255, 0.035);
  box-shadow: 0 30px 70px -40px rgba(126, 63, 219, 0.8);
}
.dash-login-card h1 { margin: 0; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; }
.dash-login-card > .dash-muted { margin: 0.5rem 0 0; font-size: 0.875rem; line-height: 1.6; }
.dash-form { display: grid; gap: 0.9rem; margin-top: 1.5rem; }
.dash-form label { display: grid; gap: 0.4rem; font-size: 0.8125rem; font-weight: 600; color: rgba(255, 255, 255, 0.8); }
.dash-form input {
  height: 2.9rem; padding: 0 1rem; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 0.9rem;
  background: rgba(10, 10, 25, 0.7); color: #fff; font: inherit; font-size: 0.9375rem; outline: none;
}
.dash-form input:focus { border-color: rgba(197, 151, 241, 0.6); box-shadow: 0 0 0 3px rgba(126, 63, 219, 0.25); }
.dash-error { min-height: 1.1em; margin: 0; color: #f6a5b4; font-size: 0.8125rem; }
.dash-help { margin: 1.25rem 0 0; color: rgba(255, 255, 255, 0.55); font-size: 0.8125rem; }
.dash-help a, .dash-empty a { color: #c597f1; }

.dash-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 0.9rem; background: rgba(255, 255, 255, 0.05);
  color: #fff; font: inherit; font-size: 0.875rem; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.dash-btn:hover { background: rgba(255, 255, 255, 0.1); }
.dash-btn.is-primary { border: 0; background: #8b2cf5; box-shadow: 0 12px 30px -14px rgba(139, 44, 245, 0.9); }
.dash-btn.is-primary:hover { background: #9a45f7; transform: translateY(-1px); }
.dash-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

/* Signed-in layout */
.dash-wrap { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.dash-wrap.is-loading { display: block; }
.dash-nav {
  position: sticky; top: calc(var(--navbar-height, 64px) + 1rem); display: grid; gap: 0.25rem; padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 1.25rem; background: rgba(255, 255, 255, 0.035);
}
.dash-user { display: flex; align-items: center; gap: 0.7rem; padding: 0.5rem 0.5rem 0.9rem; margin-bottom: 0.25rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.dash-avatar { display: grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: linear-gradient(135deg, #3b1f66, #8b2cf5); font-weight: 700; }
.dash-user-text { display: grid; min-width: 0; font-size: 0.875rem; }
.dash-user-text .dash-muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-nav nav { display: grid; gap: 0.2rem; }
.dash-tab {
  display: flex; align-items: center; gap: 0.7rem; width: 100%; padding: 0.65rem 0.75rem; border: 0; border-radius: 0.8rem;
  background: none; color: rgba(255, 255, 255, 0.7); font: inherit; font-size: 0.875rem; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer;
}
.dash-tab svg { width: 1.1rem; height: 1.1rem; flex: none; }
.dash-tab:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.dash-tab.is-active { background: rgba(139, 44, 245, 0.16); color: #fff; }
.dash-tab.is-active svg { color: #c597f1; }
.dash-logout { margin-top: 0.4rem; border-top: 1px solid rgba(255, 255, 255, 0.08); border-radius: 0 0 0.8rem 0.8rem; padding-top: 0.9rem; }

.dash-main { min-width: 0; }
.dash-head h1 { margin: 0 0 1.25rem; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; }
.dash-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.dash-stat { display: grid; gap: 0.35rem; padding: 1.1rem 1.25rem; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 1.1rem; background: rgba(255, 255, 255, 0.035); }
.dash-stat strong { font-size: 1.4rem; font-weight: 700; }

.dash-section { margin-top: 1.75rem; }
.dash-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.75rem; }
.dash-section-head h2 { margin: 0; font-size: 1.1rem; font-weight: 600; }
.dash-section-head a { color: #c597f1; font-size: 0.8125rem; text-decoration: none; }

.dash-order { margin-bottom: 0.6rem; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 1.1rem; background: rgba(255, 255, 255, 0.035); overflow: hidden; }
.dash-order[open] { border-color: rgba(197, 151, 241, 0.3); }
.dash-order summary { display: flex; align-items: center; gap: 0.9rem; padding: 0.85rem 1rem; cursor: pointer; list-style: none; }
.dash-order summary::-webkit-details-marker { display: none; }
.dash-order summary img, .dash-order-img { flex: none; width: 4.25rem; aspect-ratio: 16 / 9; border-radius: 0.6rem; object-fit: cover; background: rgba(126, 63, 219, 0.15); }
.dash-order-main { display: grid; gap: 0.15rem; min-width: 0; flex: 1; }
.dash-order-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9375rem; font-weight: 600; }
.dash-order-side { display: grid; justify-items: end; gap: 0.3rem; }
.dash-order-total { font-size: 0.875rem; font-weight: 700; }
.dash-order-body { display: grid; gap: 0.55rem; padding: 0 1rem 1rem; border-top: 1px solid rgba(255, 255, 255, 0.07); padding-top: 0.9rem; }
.dash-kv { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.8125rem; color: rgba(255, 255, 255, 0.6); }
.dash-kv > :last-child { color: #fff; text-align: right; }
.dash-id { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 0; }
.dash-id code { overflow: hidden; text-overflow: ellipsis; font-size: 0.75rem; color: rgba(255, 255, 255, 0.85); }
.dash-copy { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 0.5rem; background: none; color: rgba(255, 255, 255, 0.7); cursor: pointer; }
.dash-copy svg { width: 0.9rem; height: 0.9rem; }
.dash-copy.is-done { border-color: rgba(34, 197, 94, 0.5); color: #86efac; }
.dash-note { margin: 0.3rem 0 0; color: rgba(255, 255, 255, 0.7); font-size: 0.8125rem; line-height: 1.6; }
.dash-order-body .dash-btn { justify-self: start; }

.dash-badge { padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.6875rem; font-weight: 700; }
.dash-badge.is-ok { color: #86efac; background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.3); }
.dash-badge.is-wait { color: #fcd34d; background: rgba(234, 179, 8, 0.12); border: 1px solid rgba(234, 179, 8, 0.3); }
.dash-badge.is-warn { color: #fca5a5; background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.3); }
.dash-badge.is-muted { color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); }

.dash-empty { padding: 1.5rem; border: 1px dashed rgba(255, 255, 255, 0.12); border-radius: 1.1rem; color: rgba(255, 255, 255, 0.6); text-align: center; font-size: 0.875rem; }
.dash-quick, .dash-support { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.dash-support { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-quick-card {
  display: flex; gap: 0.85rem; padding: 1.1rem; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.035); color: #fff; text-decoration: none; transition: border-color 160ms ease, transform 160ms ease;
}
.dash-quick-card:hover { border-color: rgba(197, 151, 241, 0.4); transform: translateY(-2px); }
.dash-quick-card strong { display: block; font-size: 0.9375rem; margin-bottom: 0.2rem; }
.dash-quick-ico { display: grid; place-items: center; flex: none; width: 2.4rem; height: 2.4rem; border: 1px solid rgba(139, 44, 245, 0.4); border-radius: 0.8rem; background: rgba(139, 44, 245, 0.12); color: #c597f1; }
.dash-quick-ico svg { width: 1.15rem; height: 1.15rem; }

.dash-guides { display: grid; gap: 0.75rem; }
.dash-guide { padding: 1.2rem 1.35rem; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 1.1rem; background: rgba(255, 255, 255, 0.035); }
.dash-guide h3 { margin: 0 0 0.7rem; font-size: 1rem; }
.dash-guide ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.45rem; color: rgba(255, 255, 255, 0.78); font-size: 0.875rem; line-height: 1.6; }
.dash-guide li::marker { color: #c597f1; font-weight: 700; }

/* Header "Dashboard" button, purple like the reference. */
header button.bs-dash-btn, header a.bs-dash-btn { background: #8b2cf5; color: #fff; box-shadow: 0 10px 26px -12px rgba(139, 44, 245, 0.9); }
header button.bs-dash-btn:hover, header a.bs-dash-btn:hover { background: #9a45f7; }

@media (max-width: 860px) {
  .dash-wrap { grid-template-columns: minmax(0, 1fr); }
  .dash-nav { position: static; }
  .dash-nav nav { display: flex; overflow-x: auto; gap: 0.3rem; scrollbar-width: none; }
  .dash-tab { width: auto; flex: none; }
  .dash-logout { border-top: 0; margin-top: 0; padding-top: 0.65rem; }
  .dash-support { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .dash-app { padding: 2rem 1rem 4rem; }
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-stats > :last-child { grid-column: 1 / -1; }
  .dash-quick { grid-template-columns: minmax(0, 1fr); }
  .dash-order summary img, .dash-order-img { width: 3.25rem; }
  .dash-login-card { padding: 1.5rem; }
}
