/* 官網產品 Demo：手機框 + 瀏覽器框（僅 mockup／假資料） */
:root {
  --demo-teal: #06b6d4;
  --demo-teal-deep: #0e7490;
  --demo-accent: #f97316;
  --demo-text: #0f172a;
  --demo-muted: #64748b;
  --demo-line: #e2e8f0;
  --demo-surface: #f8fafc;
  --demo-font: "DM Sans", "Noto Sans TC", system-ui, sans-serif;
  --demo-grad: linear-gradient(145deg, #0e7490 0%, #06b6d4 48%, #fb923c 130%);
  --demo-grad-btn: linear-gradient(135deg, #f97316, #fb923c);
  --demo-grad-nav: linear-gradient(135deg, #f97316, #06b6d4);
}

.demo-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 800; letter-spacing: .04em;
  padding: .3rem .65rem; border-radius: 999px;
  background: #fff7ed; color: #c2410c; border: 1px solid rgba(249,115,22,.35);
}
.demo-badge::before { content: ""; width: .45rem; height: .45rem; border-radius: 999px; background: #f97316; }

.demo-stage {
  display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; justify-content: center;
}
.demo-side {
  flex: 1 1 260px; max-width: 360px;
}
.demo-side h3 { margin: 0 0 .5rem; font-size: 1.15rem; font-weight: 800; color: var(--demo-text); }
.demo-side p { margin: 0 0 .75rem; color: var(--demo-muted); font-size: .92rem; line-height: 1.55; }
.demo-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0; }
.demo-chip {
  appearance: none; border: 1px solid var(--demo-line); background: #fff; color: var(--demo-muted);
  border-radius: 999px; padding: .4rem .75rem; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer;
}
.demo-chip.on {
  color: #fff; border-color: transparent; background: var(--demo-grad-nav);
}

/* —— Phone —— */
.demo-phone {
  width: 320px; height: 640px;
  border-radius: 32px; border: 9px solid #0f172a; background: var(--demo-surface);
  overflow: hidden; position: relative;
  box-shadow: 0 24px 50px rgba(15,23,42,.28);
  font-family: var(--demo-font); flex-shrink: 0;
}
.demo-phone-notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 100px; height: 20px; background: #0f172a; border-radius: 0 0 12px 12px; z-index: 5;
}
.demo-phone-screen {
  display: none; height: 100%; overflow: auto; padding: 36px 14px 64px; background: var(--demo-surface);
}
.demo-phone-screen.on { display: block; }
.demo-phone-tab {
  position: absolute; left: 0; right: 0; bottom: 0; height: 56px;
  background: rgba(255,255,255,.97); border-top: 1px solid var(--demo-line);
  display: grid; grid-template-columns: repeat(3, 1fr); z-index: 6;
}
.demo-phone-tab button {
  appearance: none; border: 0; background: transparent; font: inherit;
  font-size: .65rem; font-weight: 700; color: var(--demo-muted); cursor: pointer;
  display: grid; place-items: center; gap: .1rem;
}
.demo-phone-tab button.on { color: var(--demo-teal-deep); }
.demo-phone-tab .ico { font-size: 1rem; }

.ph-user { display: flex; align-items: center; gap: .55rem; margin-bottom: .85rem; }
.ph-avatar {
  width: 40px; height: 40px; border-radius: 999px;
  background: var(--demo-grad-nav); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: .9rem;
}
.ph-user strong { display: block; font-size: .9rem; color: var(--demo-text); }
.ph-user span { font-size: .7rem; color: var(--demo-muted); }

.ph-hero {
  border-radius: 18px; padding: .95rem; color: #fff; margin-bottom: .7rem;
  background: var(--demo-grad); box-shadow: 0 12px 28px rgba(14,116,144,.25);
  position: relative; overflow: hidden; cursor: pointer;
}
.ph-hero::after {
  content: ""; position: absolute; right: -16px; top: -24px; width: 90px; height: 90px;
  border-radius: 999px; background: rgba(255,255,255,.12);
}
.ph-hero .eyebrow { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; opacity: .9; font-weight: 800; margin: 0; }
.ph-hero .tier { font-size: 1.25rem; font-weight: 900; margin: .15rem 0; }
.ph-hero .rate { font-size: .75rem; opacity: .92; }
.ph-hero .bar-meta { display: flex; justify-content: space-between; font-size: .68rem; font-weight: 700; margin: .7rem 0 .3rem; opacity: .95; }
.ph-track { height: 9px; border-radius: 999px; background: rgba(255,255,255,.28); overflow: hidden; }
.ph-track > i { display: block; height: 100%; width: 62%; border-radius: 999px; background: linear-gradient(90deg,#fff,#fdba74); }
.ph-hero .foot { display: flex; justify-content: space-between; margin-top: .4rem; font-size: .66rem; font-weight: 700; opacity: .95; }

.ph-pill {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 1px solid var(--demo-line); border-radius: 14px;
  padding: .65rem .75rem; margin-bottom: .65rem; cursor: pointer;
}
.ph-pill .val { font-size: 1.05rem; font-weight: 900; color: var(--demo-text); }
.ph-pill .lbl { font-size: .65rem; color: var(--demo-muted); font-weight: 700; }
.ph-pill .go { color: var(--demo-muted); font-weight: 800; }

.ph-quick { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; margin-bottom: .65rem; }
.ph-quick button {
  appearance: none; border: 1px solid var(--demo-line); background: #fff; border-radius: 12px;
  padding: .55rem; text-align: left; cursor: pointer; font: inherit;
}
.ph-quick .k { font-size: .62rem; color: var(--demo-muted); font-weight: 700; }
.ph-quick .v { font-size: .9rem; font-weight: 800; margin-top: .15rem; color: var(--demo-text); }

.ph-menu {
  background: #fff; border: 1px solid var(--demo-line); border-radius: 14px; overflow: hidden;
}
.ph-menu button {
  width: 100%; appearance: none; border: 0; border-bottom: 1px solid #f1f5f9;
  background: #fff; font: inherit; cursor: pointer; display: flex; align-items: center;
  gap: .55rem; padding: .7rem .75rem; text-align: left;
}
.ph-menu button:last-child { border-bottom: 0; }
.ph-menu .mi {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg,#ecfeff,#fff7ed);
  display: grid; place-items: center; font-size: .85rem;
}
.ph-menu strong { display: block; font-size: .8rem; color: var(--demo-text); }
.ph-menu span { font-size: .65rem; color: var(--demo-muted); }
.ph-menu .chev { margin-left: auto; color: #cbd5e1; font-weight: 800; }

.ph-head { display: flex; align-items: center; gap: .4rem; margin-bottom: .7rem; }
.ph-head h4 { margin: 0; font-size: .98rem; font-weight: 800; color: var(--demo-text); flex: 1; }
.ph-back {
  appearance: none; width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--demo-line);
  background: #fff; cursor: pointer; font-weight: 800; color: var(--demo-muted);
}
.ph-card {
  background: #fff; border: 1px solid var(--demo-line); border-radius: 14px; padding: .75rem; margin-bottom: .55rem;
}
.ph-card h5 { margin: 0 0 .45rem; font-size: .82rem; font-weight: 800; color: var(--demo-text); }
.ph-row {
  display: flex; justify-content: space-between; gap: .4rem; padding: .4rem 0;
  border-bottom: 1px solid #f1f5f9; font-size: .75rem;
}
.ph-row:last-child { border-bottom: 0; }
.ph-amt { font-weight: 800; color: #059669; }
.ph-amt.out { color: #b91c1c; }
.ph-sub { font-size: .65rem; color: var(--demo-muted); margin-top: .1rem; }
.ph-btn {
  appearance: none; border: 0; border-radius: 999px; width: 100%; padding: .6rem;
  font: inherit; font-weight: 800; color: #fff; cursor: pointer; background: var(--demo-grad-btn);
  margin-top: .35rem;
}
.ph-btn.teal { background: linear-gradient(135deg, var(--demo-teal), #22d3ee); }
.ph-assets { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.ph-asset {
  text-align: center; padding: .55rem; border-radius: 12px; border: 1px solid var(--demo-line); background: var(--demo-surface);
}
.ph-asset .n { font-size: 1rem; font-weight: 800; color: var(--demo-text); }
.ph-asset .l { font-size: .6rem; color: var(--demo-muted); font-weight: 700; margin-top: .1rem; }
.ph-note { font-size: .7rem; color: var(--demo-muted); line-height: 1.45; margin: 0 0 .5rem; }
.ph-success { text-align: center; padding: 2rem .5rem 1rem; }
.ph-burst {
  width: 72px; height: 72px; margin: 0 auto .6rem; border-radius: 999px;
  display: grid; place-items: center; font-size: 1.75rem; color: #fff;
  background: var(--demo-grad-nav);
}

/* —— Browser：對齊 TGA Operations Console —— */
.demo-browser {
  width: min(760px, 100%);
  border-radius: 14px; border: 1px solid #cbd5e1; background: #f4f6f9;
  box-shadow: 0 20px 50px rgba(15,23,42,.18); overflow: hidden;
  font-family: var(--demo-font); flex: 1 1 420px;
}
.demo-browser-bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .45rem .7rem; background: #e8edf3; border-bottom: 1px solid var(--demo-line);
}
.demo-dots { display: flex; gap: .35rem; }
.demo-dots i { width: 9px; height: 9px; border-radius: 999px; background: #cbd5e1; display: block; }
.demo-dots i:nth-child(1) { background: #f87171; }
.demo-dots i:nth-child(2) { background: #fbbf24; }
.demo-dots i:nth-child(3) { background: #34d399; }
.demo-url {
  flex: 1; background: #fff; border: 1px solid var(--demo-line); border-radius: 8px;
  padding: .28rem .6rem; font-size: .7rem; color: var(--demo-muted); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tga-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .65rem .9rem; background: #fff; border-bottom: 1px solid var(--demo-line);
}
.tga-topbar-left { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.tga-9dot {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--demo-line);
  background: #fff; display: grid; grid-template-columns: repeat(3, 5px); gap: 3px;
  place-content: center; flex-shrink: 0;
}
.tga-9dot i { width: 5px; height: 5px; border-radius: 1px; background: #64748b; display: block; }
.tga-brand strong { display: block; font-size: .92rem; color: #0f172a; font-weight: 800; }
.tga-brand span { font-size: .68rem; color: var(--demo-muted); font-weight: 600; }
.tga-avatar {
  width: 34px; height: 34px; border-radius: 999px;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  color: #fff; display: grid; place-items: center; font-size: .72rem; font-weight: 800;
}

.tga-body { padding: 1rem .95rem 1.15rem; min-height: 440px; position: relative; }
.tga-view { display: none; }
.tga-view.on { display: block; animation: demoFade .2s ease; }
@keyframes demoFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.tga-eyebrow {
  margin: 0 0 .2rem; font-size: .68rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: #2563eb;
}
.tga-body h4 {
  margin: 0 0 .25rem; font-size: 1.25rem; font-weight: 800; color: #0f172a; letter-spacing: -.02em;
}
.tga-desc { margin: 0 0 1rem; font-size: .8rem; color: var(--demo-muted); line-height: 1.45; }

.tga-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem;
  max-width: 520px;
}
@media (max-width: 560px) { .tga-grid { grid-template-columns: 1fr; max-width: none; } }

.tga-tile {
  position: relative; appearance: none; border: 1px solid #e2e8f0; background: #fff;
  border-radius: 16px; padding: 1rem .9rem .9rem; text-align: left; cursor: pointer;
  font: inherit; color: inherit; box-shadow: 0 4px 14px rgba(15,23,42,.05);
  display: flex; flex-direction: column; align-items: flex-start; gap: .65rem;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.tga-tile:hover {
  transform: translateY(-2px); border-color: #bfdbfe;
  box-shadow: 0 12px 28px rgba(15,23,42,.1);
}
.tga-tile.is-soon { opacity: .88; cursor: default; }
.tga-tile.is-soon:hover { transform: none; }
.tga-badge {
  position: absolute; top: .55rem; right: .55rem;
  font-size: .6rem; font-weight: 800; padding: .15rem .45rem; border-radius: 999px;
  background: #dcfce7; color: #166534;
}
.tga-badge.soon { background: #f1f5f9; color: #64748b; }
.tga-ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.35rem; color: #fff;
}
.tga-ico.admin { background: linear-gradient(145deg, #3b82f6, #1d4ed8); }
.tga-ico.server { background: linear-gradient(145deg, #475569, #334155); }
.tga-ico.pay { background: linear-gradient(145deg, #f97316, #ea580c); }
.tga-ico.vending { background: linear-gradient(145deg, #10b981, #059669); }
.tga-ico.dpp { background: linear-gradient(145deg, #8b5cf6, #7c3aed); }
.tga-ico.orders { background: linear-gradient(145deg, #6366f1, #4f46e5); }
.tga-tile h5 { margin: 0; font-size: .95rem; font-weight: 800; color: #0f172a; }
.tga-tile p { margin: 0; font-size: .72rem; color: var(--demo-muted); line-height: 1.4; }

.tga-back {
  appearance: none; border: 1px solid var(--demo-line); background: #fff; border-radius: 8px;
  padding: .35rem .65rem; font: inherit; font-size: .74rem; font-weight: 700;
  color: #334155; cursor: pointer; margin-bottom: .75rem;
}
.tga-back:hover { background: #f1f5f9; }

.demo-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; margin-bottom: .75rem; }
@media (max-width: 520px) { .demo-kpis { grid-template-columns: 1fr 1fr; } }
.demo-kpi {
  background: #fff; border: 1px solid var(--demo-line); border-radius: 12px; padding: .65rem .7rem;
}
.demo-kpi .k { font-size: .65rem; color: var(--demo-muted); font-weight: 700; }
.demo-kpi .v { font-size: 1rem; font-weight: 900; color: var(--demo-text); margin-top: .15rem; }
.demo-kpi .d { font-size: .62rem; font-weight: 700; margin-top: .15rem; color: #059669; }
.demo-table-wrap {
  background: #fff; border: 1px solid var(--demo-line); border-radius: 12px; overflow: auto;
}
.demo-table { width: 100%; border-collapse: collapse; font-size: .7rem; }
.demo-table th {
  text-align: left; padding: .5rem .6rem; background: #f1f5f9; color: var(--demo-muted);
  font-weight: 700; border-bottom: 1px solid var(--demo-line); white-space: nowrap;
}
.demo-table td {
  padding: .5rem .6rem; border-bottom: 1px solid #f1f5f9; color: var(--demo-text); white-space: nowrap;
}
.demo-table tr:last-child td { border-bottom: 0; }
.demo-pill {
  display: inline-flex; padding: .12rem .4rem; border-radius: 999px; font-size: .62rem; font-weight: 800;
}
.demo-pill.ok { background: #ecfdf5; color: #047857; }
.demo-pill.warn { background: #fff7ed; color: #c2410c; }
.tga-toast {
  position: absolute; left: 50%; bottom: .85rem; transform: translateX(-50%);
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
  font-size: .75rem; font-weight: 700; padding: .45rem .75rem; border-radius: 10px;
  box-shadow: 0 8px 20px rgba(15,23,42,.08); display: none; white-space: nowrap; z-index: 3;
}
.tga-toast.on { display: block; animation: demoFade .2s ease; }

@media (max-width: 400px) {
  .demo-phone { width: 290px; height: 580px; }
}
