// Super admin screens (desktop, browser frame)
// 1. Super Dashboard — system-wide overview + activity logs
// 2. Branding / Tema / Templates — visual theming

const { useState: useSp, useMemo: useMp } = React;

// ═══════════════════════════════════════════════════════
// SHELL
// ═══════════════════════════════════════════════════════
function SuperShell({ activeScreen, navigate, theme, children, pageTitle }) {
  const menu = [
    { id: "super-dashboard", name: "Dashboard",        icon: "shield_person" },
    { id: "super-branding",  name: "Branding & Tema",  icon: "palette" },
    { id: "super-templates", name: "Template Pesan",   icon: "chat" },
    { id: "super-admins",    name: "Admin Users",      icon: "group" },
    { id: "super-logs",      name: "Activity Logs",    icon: "manage_history" },
    { id: "super-api",       name: "API Token",        icon: "key" },
  ];

  return (
    <div className="sup-shell">
      <aside className="sup-sidebar">
        <div className="sup-side-head">
          <div className="sup-side-logo"><img src="assets/logo.png" alt="" /></div>
          <div>
            <h2>Damelkeun</h2>
            <p style={{ color: theme.primary }}>
              <MI name="verified" size={11} />
              Super Admin
            </p>
          </div>
        </div>
        <nav className="sup-nav">
          {menu.map((m) => {
            const isActive = activeScreen === m.id;
            return (
              <button key={m.id} className={`sup-nav-item ${isActive ? "active" : ""}`}
                onClick={() => navigate(m.id)}
                disabled={!["super-dashboard", "super-branding"].includes(m.id)}
                style={isActive ? { background: `${theme.primary}1a`, color: theme.primary } : {}}>
                <MI name={m.icon} size={18} />
                <span>{m.name}</span>
                {!["super-dashboard", "super-branding"].includes(m.id) && (
                  <span className="sup-nav-soon">soon</span>
                )}
              </button>
            );
          })}
        </nav>
      </aside>

      <div className="sup-main">
        <header className="sup-top">
          <h2>{pageTitle}</h2>
          <div className="sup-pill" style={{ background: `${theme.primary}15`, color: theme.primary }}>
            <MI name="shield_person" size={14} />
            Super Administrator
          </div>
        </header>
        <main className="sup-content">{children}</main>
      </div>

      <style>{`
        .sup-shell { display: flex; height: 100%; background: #0f172a; font-family: "Inter", system-ui, sans-serif; color: #e2e8f0; }
        .sup-sidebar {
          width: 240px; background: #1e293b; border-right: 1px solid #334155;
          display: flex; flex-direction: column; flex-shrink: 0;
        }
        .sup-side-head { height: 64px; display: flex; align-items: center; padding: 0 16px; gap: 10px; border-bottom: 1px solid #334155; }
        .sup-side-logo { width: 36px; height: 36px; background: white; border-radius: 9px; padding: 4px; }
        .sup-side-logo img { width: 100%; height: 100%; object-fit: contain; }
        .sup-side-head h2 { font-size: 0.95rem; font-weight: 800; letter-spacing: -0.3px; color: white; }
        .sup-side-head p { font-size: 0.65rem; font-weight: 800; display: flex; align-items: center; gap: 3px; }

        .sup-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
        .sup-nav-item {
          display: flex; align-items: center; gap: 10px;
          padding: 10px 12px; border-radius: 10px;
          color: #94a3b8; font-weight: 500; font-size: 0.85rem;
          background: transparent; border: none; cursor: pointer;
          text-align: left; transition: all 0.15s;
        }
        .sup-nav-item:hover:not(:disabled) { background: rgba(255,255,255,0.04); color: #e2e8f0; }
        .sup-nav-item.active { font-weight: 700; }
        .sup-nav-item:disabled { cursor: not-allowed; opacity: 0.5; }
        .sup-nav-item span { flex: 1; }
        .sup-nav-soon {
          background: rgba(255,255,255,0.08); color: #94a3b8;
          padding: 1px 6px; border-radius: 5px;
          font-size: 0.58rem; font-weight: 800; text-transform: uppercase;
          flex: 0 !important;
        }

        .sup-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
        .sup-top {
          height: 64px; background: #1e293b; border-bottom: 1px solid #334155;
          display: flex; align-items: center; justify-content: space-between;
          padding: 0 24px; flex-shrink: 0;
        }
        .sup-top h2 { font-size: 1.05rem; font-weight: 800; color: white; }
        .sup-pill {
          padding: 5px 12px; border-radius: 999px; font-size: 0.74rem; font-weight: 800;
          display: inline-flex; align-items: center; gap: 5px;
        }
        .sup-content { flex: 1; padding: 20px 24px; overflow-y: auto; background: #0f172a; }
        .sup-card {
          background: #1e293b; border: 1px solid #334155; border-radius: 14px;
          padding: 18px;
        }
        .sup-card-title { font-size: 0.85rem; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; color: white; }
        .sup-card-title .material-symbols-outlined { color: ${theme.primary}; font-size: 1rem !important; }
      `}</style>
    </div>
  );
}

// ═══════════════════════════════════════════════════════
// SUPER DASHBOARD
// ═══════════════════════════════════════════════════════
function SuperDashboard({ theme }) {
  const stats = [
    { label: "Total Orders",  value: "1,248", sub: "+18 minggu ini", icon: "inventory_2" },
    { label: "Admin Aktif",   value: "4",     sub: "2 superadmin",    icon: "group" },
    { label: "Notif WA Hari Ini",  value: "127", sub: "5 gagal kirim",  icon: "chat" },
    { label: "Uptime",        value: "99.9%", sub: "30 hari terakhir", icon: "verified" },
  ];

  return (
    <div className="sd">
      <div className="sd-stats">
        {stats.map((s) => (
          <div key={s.label} className="sup-card sd-stat">
            <div className="sd-stat-ic" style={{ background: `${theme.primary}25`, color: theme.primary }}>
              <MI name={s.icon} size={20} />
            </div>
            <p className="sd-stat-label">{s.label}</p>
            <h3 className="sd-stat-value">{s.value}</h3>
            <p className="sd-stat-sub">{s.sub}</p>
          </div>
        ))}
      </div>

      <div className="sd-grid">
        {/* Activity logs */}
        <div className="sup-card">
          <h3 className="sup-card-title"><MI name="manage_history" size={16} />Activity Logs Terbaru</h3>
          <div className="sd-logs">
            {ACTIVITY_LOGS.map((log) => {
              const typeColors = {
                update: { ic: "edit",           c: "#3b82f6" },
                create: { ic: "add_circle",     c: theme.primary },
                config: { ic: "settings",       c: "#a855f7" },
                done:   { ic: "check_circle",   c: "#10b981" },
              }[log.type];
              return (
                <div key={log.id} className="sd-log-row">
                  <div className="sd-log-ic" style={{ background: `${typeColors.c}25`, color: typeColors.c }}>
                    <MI name={typeColors.ic} size={14} />
                  </div>
                  <div className="sd-log-body">
                    <p className="sd-log-action">
                      <strong>{log.action}</strong>
                      <span className="sd-log-who">{log.who}</span>
                    </p>
                    <p className="sd-log-target">{log.target}</p>
                    <p className="sd-log-time">{log.time}</p>
                  </div>
                </div>
              );
            })}
          </div>
        </div>

        {/* WA Notif logs (right) */}
        <div className="sup-card">
          <h3 className="sup-card-title"><MI name="chat" size={16} />Notifikasi WhatsApp 24 Jam</h3>
          <div className="sd-notif-stats">
            <div className="sd-notif-stat" style={{ background: "rgba(16,185,129,0.1)", borderColor: "rgba(16,185,129,0.25)" }}>
              <p className="sd-notif-num" style={{ color: "#34d399" }}>122</p>
              <p>Terkirim</p>
            </div>
            <div className="sd-notif-stat" style={{ background: "rgba(239,68,68,0.1)", borderColor: "rgba(239,68,68,0.25)" }}>
              <p className="sd-notif-num" style={{ color: "#f87171" }}>5</p>
              <p>Gagal</p>
            </div>
          </div>
          <h4 className="sd-fail-title">Gagal Kirim — Perlu Retry</h4>
          <div className="sd-fails">
            {[
              { order: "ORD-260525-007", reason: "Nomor tidak valid",       time: "13:22" },
              { order: "ORD-260524-002", reason: "Quota harian terlampaui", time: "11:08" },
              { order: "ORD-260524-008", reason: "Timeout API gateway",     time: "09:45" },
            ].map((f) => (
              <div key={f.order} className="sd-fail-row">
                <div>
                  <p className="sd-fail-id">{f.order}</p>
                  <p className="sd-fail-reason">{f.reason} · {f.time}</p>
                </div>
                <button className="sd-fail-retry" style={{ background: theme.primary }}>
                  <MI name="refresh" size={12} /> Retry
                </button>
              </div>
            ))}
          </div>
        </div>
      </div>

      <style>{`
        .sd { display: flex; flex-direction: column; gap: 14px; }
        .sd-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
        .sd-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
        .sd-stat-ic { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
        .sd-stat-label { font-size: 0.7rem; color: #94a3b8; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
        .sd-stat-value { font-size: 1.8rem; font-weight: 800; color: white; line-height: 1; }
        .sd-stat-sub { font-size: 0.72rem; color: #64748b; font-weight: 600; }

        .sd-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }

        .sd-logs { display: flex; flex-direction: column; gap: 10px; }
        .sd-log-row { display: flex; gap: 10px; padding: 10px; border-radius: 10px; background: rgba(255,255,255,0.025); }
        .sd-log-ic { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .sd-log-body { flex: 1; min-width: 0; }
        .sd-log-action { font-size: 0.82rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
        .sd-log-action strong { color: white; font-weight: 800; }
        .sd-log-who { color: #64748b; font-size: 0.72rem; font-family: monospace; }
        .sd-log-target { font-size: 0.74rem; color: #94a3b8; margin-top: 1px; }
        .sd-log-time { font-size: 0.68rem; color: #64748b; margin-top: 3px; }

        .sd-notif-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
        .sd-notif-stat {
          padding: 14px; border-radius: 10px; border: 1px solid; text-align: center;
        }
        .sd-notif-num { font-size: 1.6rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
        .sd-notif-stat p:last-child { font-size: 0.72rem; color: #94a3b8; font-weight: 700; }

        .sd-fail-title { font-size: 0.76rem; font-weight: 800; color: white; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.3px; }
        .sd-fails { display: flex; flex-direction: column; gap: 6px; }
        .sd-fail-row {
          display: flex; align-items: center; justify-content: space-between; gap: 8px;
          padding: 8px 10px; background: rgba(239,68,68,0.07); border: 1px solid rgba(239,68,68,0.18);
          border-radius: 8px;
        }
        .sd-fail-id { font-family: monospace; font-size: 0.74rem; font-weight: 800; color: white; }
        .sd-fail-reason { font-size: 0.68rem; color: #94a3b8; margin-top: 2px; }
        .sd-fail-retry {
          padding: 5px 9px; color: white; border: none; border-radius: 6px;
          font-size: 0.66rem; font-weight: 800; cursor: pointer;
          display: inline-flex; align-items: center; gap: 3px;
        }
      `}</style>
    </div>
  );
}

// ═══════════════════════════════════════════════════════
// BRANDING & TEMA
// ═══════════════════════════════════════════════════════
function SuperBranding({ theme, setBrandPreset, brandPresetId, setSecondary, customSecondary }) {
  const [form, setForm] = useSp({
    brand_name: "Damelkeun",
    brand_tagline: "Tracking Pesanan Konveksi",
    brand_footer: "© 2026 Damelkeun Jaya Mandiri",
  });
  const [saved, setSaved] = useSp(false);

  const onSave = () => {
    setSaved(true);
    setTimeout(() => setSaved(false), 2200);
  };

  return (
    <div className="br">
      {saved && (
        <div className="br-toast" style={{ background: theme.primary }}>
          <MI name="check_circle" size={18} /> Tema disimpan. Halaman customer otomatis update.
        </div>
      )}

      <div className="br-grid">
        {/* Editor */}
        <div className="br-editor">
          <div className="sup-card">
            <h3 className="sup-card-title"><MI name="palette" size={16} />Warna Brand</h3>
            <p className="br-helper">Pilih preset atau custom. Warna ini diaplikasikan ke seluruh halaman customer + admin.</p>
            <div className="br-presets">
              {BRAND_PRESETS.map((p) => {
                const isActive = brandPresetId === p.id;
                return (
                  <button key={p.id} className={`br-preset ${isActive ? "active" : ""}`}
                    onClick={() => setBrandPreset(p.id)}
                    style={isActive ? { borderColor: p.primary, boxShadow: `0 0 0 3px ${p.primary}33` } : {}}>
                    <div className="br-preset-swatch">
                      <span style={{ background: p.primary }} />
                      <span style={{ background: p.secondary }} />
                    </div>
                    <div className="br-preset-info">
                      <p>{p.name}</p>
                      <p className="br-preset-hex">{p.primary}</p>
                    </div>
                    {isActive && <MI name="check_circle" size={16} style={{ color: p.primary, marginLeft: "auto" }} />}
                  </button>
                );
              })}
            </div>

            <div className="br-divider" />

            <label className="br-label">Warna Sekunder (Custom)</label>
            <p className="br-helper">Override warna aksen sekunder secara independen.</p>
            <div className="br-color-row">
              <input type="color" value={customSecondary || theme.secondary}
                onChange={(e) => setSecondary(e.target.value)} />
              <span className="br-hex">{customSecondary || theme.secondary}</span>
              {customSecondary && (
                <button className="br-reset" onClick={() => setSecondary(null)}>
                  <MI name="restart_alt" size={14} /> Reset
                </button>
              )}
            </div>
          </div>

          <div className="sup-card">
            <h3 className="sup-card-title"><MI name="storefront" size={16} />Identitas Brand</h3>
            <div className="br-field">
              <label>Nama Brand</label>
              <input value={form.brand_name} onChange={(e) => setForm((p) => ({ ...p, brand_name: e.target.value }))} />
            </div>
            <div className="br-field">
              <label>Tagline</label>
              <input value={form.brand_tagline} onChange={(e) => setForm((p) => ({ ...p, brand_tagline: e.target.value }))} />
            </div>
            <div className="br-field">
              <label>Footer Text</label>
              <input value={form.brand_footer} onChange={(e) => setForm((p) => ({ ...p, brand_footer: e.target.value }))} />
            </div>
            <div className="br-field">
              <label>Logo</label>
              <div className="br-logo-row">
                <div className="br-logo-cur"><img src="assets/logo.png" alt="" /></div>
                <div>
                  <button className="br-upload">
                    <MI name="upload" size={14} /> Ubah Logo
                  </button>
                  <p className="br-helper" style={{ marginTop: 4 }}>PNG transparent, ≥256×256</p>
                </div>
              </div>
            </div>
          </div>

          <div className="br-actions">
            <button className="br-save" onClick={onSave}
              style={{ background: `linear-gradient(135deg, ${theme.primary}, ${theme.secondary})`, boxShadow: `0 8px 20px ${theme.primary}55` }}>
              <MI name="save" size={16} /> Simpan & Publish ke Live
            </button>
          </div>
        </div>

        {/* Preview */}
        <div className="br-preview">
          <div className="br-preview-head">
            <p className="br-preview-label">PREVIEW LIVE</p>
            <p className="br-preview-sub">Customer side</p>
          </div>
          <div className="br-mock">
            <div className="br-mock-header" style={{ background: theme.bg }}>
              <div className="br-mock-logo-wrap"><img src="assets/logo.png" alt="" /></div>
              <div>
                <p className="br-mock-name" style={{ color: "#1d1e20" }}>{form.brand_name}</p>
                <p className="br-mock-tag">{form.brand_tagline}</p>
              </div>
              <div className="br-mock-live"><span style={{ background: theme.primary }} />Live</div>
            </div>
            <div className="br-mock-body" style={{ background: theme.bg }}>
              <div className="br-mock-card" style={{ borderTop: `3px dashed ${theme.primary}` }}>
                <span className="br-mock-pill" style={{ background: `${theme.primary}1a`, color: theme.primary }}>
                  <MI name="receipt" size={11} />ORD-260526-001
                </span>
                <p className="br-mock-name-big">Bayu Saputra</p>
                <p className="br-mock-product">Kaos Polo Custom Bordir · 120 pcs</p>
              </div>
              <div className="br-mock-ring">
                <svg viewBox="0 0 100 100" width="70" height="70">
                  <circle cx="50" cy="50" r="42" fill="none" stroke="#e2e8f0" strokeWidth="8" />
                  <circle cx="50" cy="50" r="42" fill="none" stroke={theme.primary} strokeWidth="8" strokeLinecap="round"
                    strokeDasharray={`${0.62 * 264} 264`} transform="rotate(-90 50 50)" />
                </svg>
                <div>
                  <p className="br-mock-progress" style={{ color: theme.primary }}>62%</p>
                  <p className="br-mock-progress-l">Sedang dikerjakan</p>
                  <p style={{ color: theme.primary, fontWeight: 800, fontSize: "0.78rem" }}>Jahit</p>
                </div>
              </div>
              <div className="br-mock-stages">
                {STAGES.slice(0, 5).map((s, i) => {
                  const done = i < 4;
                  return (
                    <div key={s.key} className="br-mock-stage">
                      <div className="br-mock-stage-dot" style={{
                        background: done ? theme.primary : (i === 4 ? theme.secondary : "#e2e8f0"),
                      }}>
                        <MI name={done ? "check" : s.icon} size={10} />
                      </div>
                      <span style={{ opacity: done || i === 4 ? 1 : 0.5 }}>{s.label}</span>
                    </div>
                  );
                })}
              </div>
              <button className="br-mock-cta" style={{ background: `linear-gradient(135deg, ${theme.primary}, ${theme.secondary})` }}>
                Lacak Pesanan
              </button>
            </div>
          </div>
        </div>
      </div>

      <style>{`
        .br { display: flex; flex-direction: column; gap: 14px; }
        .br-toast {
          position: sticky; top: 0; z-index: 5;
          padding: 10px 16px; border-radius: 10px;
          color: white; font-weight: 700; font-size: 0.85rem;
          display: flex; align-items: center; gap: 6px;
          box-shadow: 0 6px 20px rgba(0,0,0,0.25);
          animation: brSlide 0.3s ease;
        }
        @keyframes brSlide { from { transform: translateY(-10px); opacity: 0; } to { opacity: 1; } }
        .br-grid { display: grid; grid-template-columns: 1fr 320px; gap: 14px; align-items: flex-start; }
        .br-editor { display: flex; flex-direction: column; gap: 14px; }
        .br-helper { font-size: 0.76rem; color: #94a3b8; margin-bottom: 12px; line-height: 1.5; }
        .br-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
        .br-preset {
          display: flex; align-items: center; gap: 10px;
          padding: 10px; background: rgba(255,255,255,0.025);
          border: 2px solid transparent; border-radius: 10px;
          cursor: pointer; transition: all 0.15s; text-align: left;
          color: #e2e8f0;
        }
        .br-preset:hover { background: rgba(255,255,255,0.05); }
        .br-preset-swatch { display: flex; gap: 3px; }
        .br-preset-swatch span { width: 16px; height: 16px; border-radius: 4px; }
        .br-preset-info p { font-size: 0.8rem; font-weight: 800; color: white; }
        .br-preset-hex { font-family: monospace; font-size: 0.68rem; color: #94a3b8 !important; font-weight: 600 !important; margin-top: 1px; }
        .br-divider { height: 1px; background: #334155; margin: 16px 0; }
        .br-label { font-size: 0.74rem; font-weight: 800; color: white; margin-bottom: 4px; display: block; }
        .br-color-row { display: flex; align-items: center; gap: 10px; }
        .br-color-row input[type=color] {
          width: 50px; height: 36px; border: 1px solid #334155; border-radius: 8px;
          padding: 2px; background: rgba(255,255,255,0.04); cursor: pointer;
        }
        .br-hex { font-family: monospace; font-size: 0.82rem; font-weight: 700; color: white; }
        .br-reset {
          padding: 5px 9px; background: rgba(255,255,255,0.05); border: 1px solid #334155;
          border-radius: 6px; color: #94a3b8; font-size: 0.72rem; font-weight: 700;
          cursor: pointer; display: inline-flex; align-items: center; gap: 3px; margin-left: auto;
        }

        .br-field { display: flex; flex-direction: column; margin-bottom: 12px; }
        .br-field:last-child { margin-bottom: 0; }
        .br-field label { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 5px; color: #94a3b8; }
        .br-field input {
          padding: 9px 12px; background: rgba(0,0,0,0.25);
          border: 1.5px solid #334155; border-radius: 10px;
          color: white; font-family: inherit; font-size: 0.85rem; outline: none;
        }
        .br-field input:focus { border-color: ${theme.primary}; }
        .br-logo-row { display: flex; align-items: center; gap: 12px; }
        .br-logo-cur {
          width: 56px; height: 56px; background: white; border-radius: 10px; padding: 6px; flex-shrink: 0;
        }
        .br-logo-cur img { width: 100%; height: 100%; object-fit: contain; }
        .br-upload {
          padding: 7px 12px; background: rgba(255,255,255,0.05); color: white;
          border: 1.5px solid #334155; border-radius: 8px;
          font-weight: 700; font-size: 0.76rem; cursor: pointer;
          display: inline-flex; align-items: center; gap: 4px;
        }

        .br-actions { display: flex; justify-content: flex-end; }
        .br-save {
          padding: 11px 20px; color: white; border: none; border-radius: 10px;
          font-weight: 800; font-size: 0.88rem; cursor: pointer;
          display: inline-flex; align-items: center; gap: 6px;
        }

        .br-preview { position: sticky; top: 0; }
        .br-preview-head { padding: 0 4px 8px; }
        .br-preview-label { font-size: 0.62rem; font-weight: 800; color: ${theme.primary}; letter-spacing: 0.6px; }
        .br-preview-sub { font-size: 0.72rem; color: #94a3b8; font-weight: 600; }
        .br-mock {
          border-radius: 14px; overflow: hidden;
          box-shadow: 0 12px 40px rgba(0,0,0,0.4);
          border: 1px solid #334155;
        }
        .br-mock-header { padding: 10px 12px; display: flex; align-items: center; gap: 8px; }
        .br-mock-logo-wrap { width: 28px; height: 28px; background: white; border-radius: 6px; padding: 2px; }
        .br-mock-logo-wrap img { width: 100%; height: 100%; object-fit: contain; }
        .br-mock-name { font-size: 0.82rem; font-weight: 800; }
        .br-mock-tag { font-size: 0.6rem; color: #475569; }
        .br-mock-live {
          margin-left: auto; padding: 3px 7px; background: white; border-radius: 10px;
          font-size: 0.6rem; font-weight: 800; color: #1d1e20;
          display: inline-flex; align-items: center; gap: 3px;
        }
        .br-mock-live span { width: 4px; height: 4px; border-radius: 50%; }
        .br-mock-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
        .br-mock-card { background: white; border-radius: 10px; padding: 10px; }
        .br-mock-pill {
          display: inline-flex; align-items: center; gap: 3px;
          padding: 2px 7px; border-radius: 8px; font-family: monospace;
          font-size: 0.62rem; font-weight: 800; margin-bottom: 4px;
        }
        .br-mock-name-big { font-size: 0.86rem; font-weight: 800; color: #1d1e20; }
        .br-mock-product { font-size: 0.65rem; color: #475569; margin-top: 2px; }
        .br-mock-ring { background: white; border-radius: 10px; padding: 10px; display: flex; align-items: center; gap: 10px; }
        .br-mock-ring svg { flex-shrink: 0; }
        .br-mock-progress { font-size: 1.1rem; font-weight: 800; line-height: 1; }
        .br-mock-progress-l { font-size: 0.6rem; color: #94a3b8; font-weight: 600; margin: 1px 0; }
        .br-mock-stages { background: white; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
        .br-mock-stage { display: flex; align-items: center; gap: 6px; font-size: 0.7rem; color: #1d1e20; }
        .br-mock-stage-dot {
          width: 18px; height: 18px; border-radius: 50%; color: white;
          display: flex; align-items: center; justify-content: center; flex-shrink: 0;
        }
        .br-mock-cta {
          padding: 9px; color: white; border: none; border-radius: 8px;
          font-weight: 800; font-size: 0.76rem;
        }
      `}</style>
    </div>
  );
}

window.SuperShell      = SuperShell;
window.SuperDashboard  = SuperDashboard;
window.SuperBranding   = SuperBranding;
