/* ═══════════════════════════════════════════════════════════
   Echo – Theme System   (Dark only)
   Applied via:  html[data-theme="dark"]
   ═══════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────
   ████  DARK THEME  ████
   ────────────────────────────────────────────────────────── */
html[data-theme="dark"] {
  --bg-page:    #120b1f;
  --bg-grad:    radial-gradient(ellipse at 16% 14%, rgba(160,100,255,0.14), transparent 32rem),
                radial-gradient(ellipse at 86% 22%, rgba(100,80,220,0.10), transparent 36rem),
                linear-gradient(180deg, #120b1f 0%, #0f0c1a 55%, #0d0a17 100%);
  --card:       rgba(28, 22, 44, 0.82);
  --card-s:     rgba(35, 28, 52, 0.88);
  --border:     rgba(255, 255, 255, 0.10);
  --border-acc: rgba(167, 139, 250, 0.22);
  --text:       #f7efff;
  --muted:      #b9a9c7;
  --heading:    #ede0ff;
  --accent:     #a78bfa;
  --accent2:    #f0b86c;
  --shadow:     0 18px 52px rgba(0, 0, 0, 0.55);
  --nav-bg:     rgba(22, 16, 36, 0.72);
  --nav-link:   rgba(247, 239, 255, 0.65);
  --input-bg:   rgba(255,255,255,0.05);
}

/* ── Dark: Body & Page Background ── */
html[data-theme="dark"] body.echo-auth-page,
html[data-theme="dark"] body:has(.echo-auth-nav) {
  min-height: 100vh;
  background: var(--bg-grad) !important;
  color: var(--text) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* ── Dark: Auth Nav ── */
html[data-theme="dark"] .echo-auth-nav,
html[data-theme="dark"] .echo-user-nav,
html[data-theme="dark"] .echo-legal-nav {
  background: var(--nav-bg) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 14px 42px rgba(0,0,0,0.35) !important;
  backdrop-filter: blur(18px) !important;
}

html[data-theme="dark"] .echo-auth-brand,
html[data-theme="dark"] .echo-user-brand,
html[data-theme="dark"] .echo-legal-brand {
  color: var(--heading) !important;
}

html[data-theme="dark"] .echo-auth-links a,
html[data-theme="dark"] .echo-user-links a,
html[data-theme="dark"] .echo-legal-links a,
html[data-theme="dark"] .echo-pill-link {
  color: var(--nav-link) !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid var(--border) !important;
}

html[data-theme="dark"] .echo-primary-link,
html[data-theme="dark"] .echo-auth-links a.is-primary,
html[data-theme="dark"] .echo-user-links a.is-primary {
  color: #fff !important;
  background: linear-gradient(135deg, #7c3aed, #a78bfa) !important;
  border-color: transparent !important;
}

/* ── Dark: Auth Copy & Card ── */
html[data-theme="dark"] .echo-auth-copy h1 {
  color: var(--heading) !important;
}
html[data-theme="dark"] .echo-auth-copy p {
  color: var(--muted) !important;
}
html[data-theme="dark"] .echo-auth-card {
  background: var(--card) !important;
  border: 1px solid var(--border-acc) !important;
  box-shadow: var(--shadow) !important;
}
html[data-theme="dark"] .echo-auth-card h1 {
  color: var(--heading) !important;
}
html[data-theme="dark"] .echo-auth-card p {
  color: var(--muted) !important;
}

/* ── Dark: Form elements ── */
html[data-theme="dark"] .echo-field label {
  color: var(--muted) !important;
}
html[data-theme="dark"] .echo-input,
html[data-theme="dark"] .echo-field input,
html[data-theme="dark"] .echo-field select,
html[data-theme="dark"] .echo-field textarea {
  background: var(--input-bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] .echo-input::placeholder,
html[data-theme="dark"] .echo-field input::placeholder,
html[data-theme="dark"] .echo-field textarea::placeholder {
  color: rgba(185,169,199,0.45) !important;
}
html[data-theme="dark"] .echo-input:focus,
html[data-theme="dark"] .echo-field input:focus,
html[data-theme="dark"] .echo-field select:focus,
html[data-theme="dark"] .echo-field textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(167,139,250,0.18) !important;
}
html[data-theme="dark"] .echo-submit {
  background: linear-gradient(135deg, #7c3aed, #a78bfa) !important;
  color: #fff !important;
}
html[data-theme="dark"] .echo-text-link {
  color: var(--accent) !important;
}

/* ── Dark: Footer ── */
html[data-theme="dark"] .echo-footer {
  border-top-color: rgba(255,255,255,0.07) !important;
  color: var(--muted) !important;
}
html[data-theme="dark"] .echo-footer a {
  color: var(--muted) !important;
}

/* ── Dark: Dashboard app (override inline amber→purple) ── */
html[data-theme="dark"] body,
html[data-theme="dark"] .echo-app {
  background:
    radial-gradient(ellipse 80% 44% at 18% 16%, rgba(120,70,220,0.15), transparent 52%),
    radial-gradient(ellipse 70% 50% at 82% 22%, rgba(80,50,180,0.12), transparent 52%),
    linear-gradient(180deg, #120b1f 0%, #0f0c1a 58%, #0d0a17 100%) !important;
  background-attachment: fixed !important;
}

html[data-theme="dark"] .echo-topbar {
  border-bottom-color: rgba(167,139,250,0.10) !important;
}
html[data-theme="dark"] .brand-word {
  color: var(--heading) !important;
}
html[data-theme="dark"] .top-link,
html[data-theme="dark"] .nav-pill {
  color: var(--nav-link) !important;
  border-color: var(--border) !important;
  background: rgba(255,255,255,0.05) !important;
}
html[data-theme="dark"] .top-link:hover,
html[data-theme="dark"] .nav-pill:hover {
  color: #fff !important;
  background: rgba(167,139,250,0.12) !important;
}
html[data-theme="dark"] .coin-chip {
  background: linear-gradient(135deg, #f0b86c, #c88a30) !important;
  color: #1a0e02 !important;
  border-color: transparent !important;
}

/* ── Dark: Sidebar ── */
html[data-theme="dark"] .side-rail {
  background: rgba(18, 12, 30, 0.80) !important;
  border-color: rgba(167,139,250,0.12) !important;
}
html[data-theme="dark"] .profile-name { color: var(--text) !important; }
html[data-theme="dark"] .profile-meta { color: var(--muted) !important; }
html[data-theme="dark"] .rail-link {
  color: rgba(247,239,255,0.60) !important;
}
html[data-theme="dark"] .rail-link.is-active,
html[data-theme="dark"] .rail-link:hover {
  background: rgba(167,139,250,0.12) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] .rail-link strong { color: var(--accent) !important; }
html[data-theme="dark"] .rail-actions a { color: rgba(247,239,255,0.55) !important; }
html[data-theme="dark"] .rail-actions a:hover { color: var(--accent) !important; }

/* ── Dark: Hero strip ── */
html[data-theme="dark"] .hero-strip {
  background:
    radial-gradient(ellipse 110% 80% at 0% 50%, rgba(100,50,180,0.22) 0%, transparent 60%),
    rgba(16,10,28,0.60) !important;
  border-color: rgba(167,139,250,0.14) !important;
}
html[data-theme="dark"] .hero-copy h1 { color: var(--heading) !important; }
html[data-theme="dark"] .hero-copy h1 span { color: var(--accent) !important; }
html[data-theme="dark"] .hero-sub { color: var(--muted) !important; }
html[data-theme="dark"] .eyebrow {
  background: rgba(0,0,0,0.28) !important;
  border-color: rgba(167,139,250,0.20) !important;
  color: var(--accent) !important;
}
html[data-theme="dark"] .primary-action {
  background: var(--accent) !important;
  color: #fff !important;
}
html[data-theme="dark"] .secondary-action {
  background: rgba(0,0,0,0.32) !important;
  border-color: rgba(167,139,250,0.22) !important;
  color: var(--muted) !important;
}

/* ── Dark: Metric cards ── */
html[data-theme="dark"] .metric-card {
  background: rgba(18,12,30,0.60) !important;
  border-color: rgba(167,139,250,0.10) !important;
}
html[data-theme="dark"] .metric-card:hover {
  background: rgba(100,50,200,0.16) !important;
  border-color: rgba(167,139,250,0.22) !important;
}
html[data-theme="dark"] .metric-card-coins {
  background: rgba(120,70,10,0.22) !important;
  border-color: rgba(240,184,108,0.18) !important;
}
html[data-theme="dark"] .metric-val { color: var(--text) !important; }
html[data-theme="dark"] .metric-card-coins .metric-val { color: var(--accent2) !important; }
html[data-theme="dark"] .metric-label { color: var(--muted) !important; }
html[data-theme="dark"] .metric-cta { color: rgba(167,139,250,0.55) !important; }
html[data-theme="dark"] .metric-card-link:hover .metric-cta { color: var(--accent) !important; }

/* ── Dark: Chat pills ── */
html[data-theme="dark"] .chat-pill {
  background: rgba(18,12,30,0.55) !important;
  border-color: rgba(167,139,250,0.10) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] .chat-pill:hover {
  background: rgba(100,50,200,0.18) !important;
  border-color: rgba(167,139,250,0.22) !important;
}
html[data-theme="dark"] .cp-text strong { color: var(--text) !important; }
html[data-theme="dark"] .cp-text small { color: var(--muted) !important; }

/* ── Dark: Profile tiles ── */
html[data-theme="dark"] .profile-tile {
  background: rgba(18,12,30,0.55) !important;
  border-color: rgba(167,139,250,0.10) !important;
}
html[data-theme="dark"] .profile-tile:hover {
  border-color: rgba(167,139,250,0.22) !important;
}
html[data-theme="dark"] .tile-body h3 { color: var(--text) !important; }
html[data-theme="dark"] .tile-body p { color: var(--muted) !important; }
html[data-theme="dark"] .tile-chat {
  background: var(--accent) !important;
  color: #fff !important;
}
html[data-theme="dark"] .section-head h2 { color: var(--text) !important; }
html[data-theme="dark"] .section-head p { color: var(--muted) !important; }
html[data-theme="dark"] .section-link { color: var(--accent) !important; }

/* ── Dark: Right panels ── */
html[data-theme="dark"] .bonus-panel,
html[data-theme="dark"] .verify-panel,
html[data-theme="dark"] .quick-panel {
  background: rgba(18,12,30,0.65) !important;
  border-color: rgba(167,139,250,0.12) !important;
}
html[data-theme="dark"] .bonus-panel {
  background: linear-gradient(145deg, rgba(100,50,180,0.18), rgba(18,12,30,0.62)) !important;
}
html[data-theme="dark"] .panel-label { color: var(--accent) !important; }
html[data-theme="dark"] .bonus-panel h2,
html[data-theme="dark"] .verify-panel h2 { color: var(--text) !important; }
html[data-theme="dark"] .bonus-panel span { color: var(--muted) !important; }
html[data-theme="dark"] .bonus-panel button,
html[data-theme="dark"] .verify-panel button {
  background: var(--accent) !important;
  color: #fff !important;
}
html[data-theme="dark"] .quick-panel a { color: var(--muted) !important; }
html[data-theme="dark"] .quick-panel a:hover { color: var(--accent) !important; }

/* ── Dark: Account modal ── */
html[data-theme="dark"] .account-modal-card {
  background: rgba(18,12,30,0.96) !important;
  border-color: rgba(167,139,250,0.18) !important;
}
html[data-theme="dark"] .account-modal-close {
  background: rgba(255,255,255,0.08) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] .modal-tag { color: var(--accent) !important; }
html[data-theme="dark"] .modal-copy { color: var(--muted) !important; }
html[data-theme="dark"] .account-label { color: rgba(247,239,255,0.85) !important; }
html[data-theme="dark"] .account-subtitle { color: var(--text) !important; }
html[data-theme="dark"] .account-note { color: var(--muted) !important; }
html[data-theme="dark"] .account-input {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.10) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] .account-file-btn,
html[data-theme="dark"] .account-secondary-btn,
html[data-theme="dark"] .account-delete-btn {
  background: rgba(255,255,255,0.08) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] .account-submit-btn {
  background: linear-gradient(135deg, var(--accent2), #c88a30) !important;
  color: #1a0e02 !important;
}
html[data-theme="dark"] .account-row {
  border-top-color: rgba(255,255,255,0.07) !important;
}

/* ── Dark: Discover page ── */
html[data-theme="dark"] .discover-topbar {
  background: rgba(18,12,30,0.72) !important;
  border-bottom-color: rgba(167,139,250,0.10) !important;
}
html[data-theme="dark"] .brand-link,
html[data-theme="dark"] .brand-link span {
  color: var(--heading) !important;
}
html[data-theme="dark"] .d-card {
  background: rgba(22,16,38,0.72) !important;
  border-color: rgba(167,139,250,0.10) !important;
}
html[data-theme="dark"] .d-card:hover {
  border-color: rgba(167,139,250,0.22) !important;
}
html[data-theme="dark"] .d-card-name strong { color: var(--text) !important; }
html[data-theme="dark"] .d-card-name span { color: var(--muted) !important; }
html[data-theme="dark"] .d-chat-btn {
  background: var(--accent) !important;
  color: #fff !important;
}
html[data-theme="dark"] .d-vibe-chip {
  background: rgba(255,255,255,0.10) !important;
  border-color: rgba(255,255,255,0.10) !important;
  color: rgba(247,239,255,0.72) !important;
}
html[data-theme="dark"] .p-modal-card {
  background: rgba(18,12,30,0.96) !important;
  border-color: rgba(167,139,250,0.16) !important;
}
html[data-theme="dark"] .p-modal-status { color: var(--accent) !important; }
html[data-theme="dark"] .p-modal-text { color: var(--muted) !important; }
html[data-theme="dark"] .p-btn-primary {
  background: var(--accent) !important;
  color: #fff !important;
}

/* ── Dark: Shop page ── */
html[data-theme="dark"] .sh-topbar {
  border-bottom-color: rgba(167,139,250,0.10) !important;
}
html[data-theme="dark"] .sh-brand span { color: var(--heading) !important; }
html[data-theme="dark"] .sh-nav a {
  color: var(--nav-link) !important;
  background: rgba(255,255,255,0.06) !important;
  border-color: var(--border) !important;
}
html[data-theme="dark"] .sh-nav-cta {
  background: linear-gradient(135deg, #7c3aed, #a78bfa) !important;
  color: #fff !important;
  border-color: transparent !important;
}
html[data-theme="dark"] .sh-eyebrow,
html[data-theme="dark"] .sh-voucher-label { color: var(--accent) !important; }
html[data-theme="dark"] .sh-hero h1 { color: var(--heading) !important; }
html[data-theme="dark"] .sh-sub { color: var(--muted) !important; }
html[data-theme="dark"] .sh-card {
  background: var(--card) !important;
  border-color: var(--border-acc) !important;
}
html[data-theme="dark"] .sh-voucher {
  background: var(--card) !important;
  border-color: var(--border-acc) !important;
}
html[data-theme="dark"] .sh-voucher-input {
  background: var(--input-bg) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] .sh-voucher-btn {
  background: linear-gradient(135deg, #7c3aed, #a78bfa) !important;
  color: #fff !important;
}
html[data-theme="dark"] .sh-info,
html[data-theme="dark"] .sh-trust {
  background: var(--card) !important;
  border-color: var(--border) !important;
}
html[data-theme="dark"] .sh-trust-item { color: var(--muted) !important; }

/* ── Dark: Legal / Impressum pages ── */
html[data-theme="dark"] .imp-topbar,
html[data-theme="dark"] .legal-public-nav {
  background: rgba(22,16,36,0.72) !important;
  border-color: var(--border) !important;
  box-shadow: 0 14px 42px rgba(0,0,0,0.35) !important;
  backdrop-filter: blur(18px) !important;
}
html[data-theme="dark"] .imp-brand,
html[data-theme="dark"] .imp-brand span { color: var(--heading) !important; }
html[data-theme="dark"] .imp-nav a,
html[data-theme="dark"] .legal-back a {
  color: var(--nav-link) !important;
  background: rgba(255,255,255,0.06) !important;
  border-color: var(--border) !important;
}
html[data-theme="dark"] .imp-nav-cta {
  background: linear-gradient(135deg, #7c3aed, #a78bfa) !important;
  color: #fff !important;
}
html[data-theme="dark"] .imp-hero h1,
html[data-theme="dark"] .legal-hero h1 { color: var(--heading) !important; }
html[data-theme="dark"] .imp-eyebrow,
html[data-theme="dark"] .imp-hero-sub { color: var(--accent) !important; }
html[data-theme="dark"] .imp-card,
html[data-theme="dark"] .imp-brand-block,
html[data-theme="dark"] .faq-item,
html[data-theme="dark"] .glass {
  background: var(--card) !important;
  border-color: var(--border-acc) !important;
}
html[data-theme="dark"] .imp-card h2,
html[data-theme="dark"] .faq-item button { color: var(--heading) !important; }
html[data-theme="dark"] .imp-card p,
html[data-theme="dark"] .imp-card li,
html[data-theme="dark"] .faq-answer { color: var(--muted) !important; }
html[data-theme="dark"] .imp-card a { color: var(--accent) !important; }
html[data-theme="dark"] .imp-footer,
html[data-theme="dark"] .imp-footer span { color: var(--muted) !important; }
html[data-theme="dark"] .glass input,
html[data-theme="dark"] .glass select,
html[data-theme="dark"] .glass textarea {
  background: var(--input-bg) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
html[data-theme="dark"] .glass button[type="submit"] {
  background: linear-gradient(135deg, #7c3aed, #a78bfa) !important;
  color: #fff !important;
}




/* ──────────────────────────────────────────────────────────
   MOBILE
   ────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  html[data-theme="dark"] .echo-auth-nav,
  html[data-theme="dark"] .echo-user-nav,
  html[data-theme="dark"] .echo-legal-nav {
    width: calc(100% - 20px) !important;
    border-radius: 24px !important;
    flex-wrap: wrap;
    justify-content: center !important;
  }

  html[data-theme="dark"] .echo-auth-links,
  html[data-theme="dark"] .echo-user-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  html[data-theme="dark"] .echo-footer {
    flex-direction: column;
    text-align: center;
  }
}

/* ── Auth page layout (dark) ── */
html[data-theme="dark"] .echo-auth-page {
  display: flex;
  flex-direction: column;
}
html[data-theme="dark"] .echo-auth-main {
  flex: 1;
  width: min(1080px, calc(100% - 28px));
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: clamp(24px, 6vw, 74px);
  align-items: center;
}
html[data-theme="dark"] .echo-auth-copy h1 {
  color: #ede0ff;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
  font-weight: 640;
}
html[data-theme="dark"] .echo-auth-card {
  padding: clamp(1.1rem, 4vw, 1.65rem);
}

/* ── Nav and auth layout (shared structure) ── */
.echo-user-nav,
.echo-auth-nav,
.echo-legal-nav {
  width: min(1180px, calc(100% - 28px));
  min-height: 60px;
  margin: 16px auto 0;
  padding: 0.42rem 0.52rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border-radius: 999px;
}
.echo-user-brand,
.echo-auth-brand,
.echo-legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  font-size: 0.82rem;
  font-weight: 720;
  letter-spacing: 0.12em;
  text-decoration: none;
}
.echo-user-brand img,
.echo-auth-brand img,
.echo-legal-brand img {
  width: 120px;
  height: 80px;
  object-fit: contain;
}
.echo-user-links,
.echo-auth-links,
.echo-legal-links {
  display: flex;
  align-items: center;
  gap: 0.36rem;
}
.echo-user-links a,
.echo-auth-links a,
.echo-legal-links a,
.echo-pill-link {
  min-height: 34px;
  padding: 0 0.8rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 680;
}
.echo-footer {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 26px 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
}
.echo-footer-links {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.echo-footer a { text-decoration: none; }

.echo-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}
.echo-field {
  display: grid;
  gap: 0.42rem;
}
.echo-input,
.echo-field input,
.echo-field select,
.echo-field textarea {
  width: 100%;
  min-height: 46px;
  border-radius: 16px;
  padding: 0 0.95rem;
  outline: none;
  font-family: inherit;
  font-size: 0.92rem;
}
.echo-field textarea { padding-top: 0.85rem; }
.echo-submit,
.echo-auth-card input[type="submit"],
.echo-auth-card button[type="submit"] {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  font-weight: 760;
  cursor: pointer;
  font-size: 0.96rem;
}

@media (max-width: 640px) {
  html[data-theme="dark"] .echo-auth-main {
    grid-template-columns: 1fr;
    padding: 28px 0 44px;
  }
  html[data-theme="dark"] .echo-auth-copy {
    text-align: center;
  }
}
