(()=>{const o=window.React;if(!o)return;const e=o.createElement,v=o.useState,f=o.useEffect,c={bg:"var(--app-bg,#0e0e10)",surface:"var(--app-surface,#1a1a1c)",elevated:"var(--app-elevated,#2a2a2e)",rule:"var(--app-rule,rgba(255,255,255,.07))",ink:"var(--app-ink,#e6e3da)",inkSoft:"var(--app-ink-soft,rgba(230,227,218,.62))",inkFaint:"var(--app-ink-faint,rgba(230,227,218,.38))",accent:"var(--app-accent,#00f3ff)",success:"var(--app-success,#00d4b8)",warn:"var(--app-warn,#f8d974)",fail:"var(--app-fail,#f43f6c)",mono:'var(--app-font-mono,"JetBrains Mono",SFMono-Regular,monospace)'},i={heroKpis:[{label:"credits",value:"24.840",delta:"+500",trend:"up"},{label:"active projects",value:"3",delta:"+1",trend:"up"},{label:"open invoices",value:"1",delta:"",trend:"flat"},{label:"spend \xB7 MTD",value:"\u20AC 62,40",delta:"+12,1%",trend:"down"}],user:{plan:"Pro",role:"Owner",memberSince:"2026-01-14",servicesConnected:"6 / 9"},credits:{balance:24840,eur:"\u20AC 248,40",rate:"1 credit = \u20AC 0,01 \xB7 Pro plan",includedPerMonth:2e4}},u={heroKpis:[{label:"open invoices",value:"1",delta:"",trend:"flat"},{label:"paid this year",value:"\u20AC 796,00",delta:"",trend:"flat"},{label:"next invoice",value:"2026-07-30",delta:"",trend:"flat"},{label:"payment method",value:"Visa \u2022\u202242",delta:"",trend:"flat"}],items:[{id:"inv-2026-07",date:"2026-07-30",pack:"Pro monthly (20.000 cr)",amount:"\u20AC 199,00",status:"warn",statusLabel:"due 2026-07-30"},{id:"inv-2026-06",date:"2026-06-30",pack:"Pro monthly (20.000 cr)",amount:"\u20AC 199,00",status:"ok",statusLabel:"paid"},{id:"inv-2026-05-topup",date:"2026-05-12",pack:"Top-up \xB7 5.000 cr",amount:"\u20AC 49,00",status:"ok",statusLabel:"paid"},{id:"inv-2026-05",date:"2026-05-30",pack:"Pro monthly (20.000 cr)",amount:"\u20AC 199,00",status:"ok",statusLabel:"paid"}]},r={heroKpis:[{label:"active",value:"3",delta:"+1",trend:"up"},{label:"in review",value:"1",delta:"",trend:"flat"},{label:"completed",value:"11",delta:"+2",trend:"up"},{label:"credits spent",value:"6.240",delta:"+820",trend:"down"}],items:[{id:"pr-1042",title:"Brand refresh \u2014 voice + visual worksheet",status:"warn",statusLabel:"review",agent:"brand-canvas",createdAt:"2026-06-28",cost:"\u20AC 0,42"},{id:"pr-1039",title:"Cold-email pack \u2014 40 prospects",status:"running",statusLabel:"running",agent:"cold-email-personalizer",createdAt:"2026-07-01",cost:"\u20AC 0,88"},{id:"pr-1021",title:"Blog series \u2014 6 posts",status:"ok",statusLabel:"done",agent:"content-writer",createdAt:"2026-06-10",cost:"\u20AC 1,20"}]},l={summary:i,invoices:u,projects:r,source:"seed"};function y(t){return t==="fail"?c.fail:t==="warn"?c.warn:t==="running"?c.accent:c.success}function p(t,a){return{label:a||String(t||"\u2014").toUpperCase(),color:y(t)}}function b(t){const a=t&&t.user||{},n=t&&t.credits||{};return e("div",{className:"acct-card"},[e("div",{key:"hd",className:"acct-card-head"},e("span",{className:"acct-overline mono"},"CREDITS & PLAN")),e("div",{key:"bal",className:"acct-credits-balance mono"},[e("span",{key:"v"},String(n.balance??"\u2014")),e("span",{key:"u",className:"acct-credits-unit"}," credits")]),e("div",{key:"eur",className:"acct-credits-eur mono"},n.eur||"\u2014"),e("div",{key:"rate",className:"acct-credits-rate"},n.rate||"\u2014"),e("div",{key:"rows",className:"acct-kv-rows"},[e("div",{key:"plan",className:"acct-kv-row"},[e("span",{key:"k",className:"acct-kv-k"},"Plan"),e("span",{key:"v",className:"acct-kv-v"},a.plan||"\u2014")]),e("div",{key:"role",className:"acct-kv-row"},[e("span",{key:"k",className:"acct-kv-k"},"Role"),e("span",{key:"v",className:"acct-kv-v"},a.role||"\u2014")]),e("div",{key:"svc",className:"acct-kv-row"},[e("span",{key:"k",className:"acct-kv-k"},"Services connected"),e("span",{key:"v",className:"acct-kv-v mono"},a.servicesConnected||"\u2014")]),e("div",{key:"since",className:"acct-kv-row"},[e("span",{key:"k",className:"acct-kv-k"},"Member since"),e("span",{key:"v",className:"acct-kv-v mono"},a.memberSince||"\u2014")])])])}function m(t){return e("div",{key:t.key,className:"acct-row"},t.parts)}function g(t){const a=Array.isArray(t&&t.items)?t.items:[];return e("div",{className:"acct-card"},[e("div",{key:"hd",className:"acct-card-head"},e("span",{className:"acct-overline mono"},"ACTIVE PROJECTS")),a.length===0?e("p",{key:"e",className:"acct-empty"},"No projects on file."):e("div",{key:"list",className:"acct-list"},a.map(n=>{const s=p(n.status,n.statusLabel);return m({key:n.id,parts:[e("span",{key:"c",className:"acct-chip mono",style:{color:s.color,borderColor:s.color}},s.label),e("span",{key:"t",className:"acct-row-title"},[e("span",{key:"ti"},n.title||"\u2014"),e("span",{key:"sub",className:"acct-row-sub"},`${n.agent||"\u2014"} \xB7 ${n.createdAt||"\u2014"}`)]),e("span",{key:"cost",className:"acct-row-num mono"},n.cost||"\u2014"),typeof window.ScopeBadge=="function"?e(window.ScopeBadge,{key:"scope",item:n,kind:window.KIND_REGISTRY&&window.KIND_REGISTRY.accountSuite}):null]})}))])}function N(t){const a=Array.isArray(t&&t.items)?t.items:[];return e("div",{className:"acct-card"},[e("div",{key:"hd",className:"acct-card-head"},e("span",{className:"acct-overline mono"},"INVOICES")),a.length===0?e("p",{key:"e",className:"acct-empty"},"No invoices on file."):e("div",{key:"list",className:"acct-list"},a.map(n=>{const s=p(n.status,n.statusLabel);return m({key:n.id,parts:[e("span",{key:"c",className:"acct-chip mono",style:{color:s.color,borderColor:s.color}},s.label),e("span",{key:"t",className:"acct-row-title"},[e("span",{key:"ti"},n.pack||"\u2014"),e("span",{key:"sub",className:"acct-row-sub"},n.date||"\u2014")]),e("span",{key:"amt",className:"acct-row-num mono"},n.amount||"\u2014"),typeof window.ScopeBadge=="function"?e(window.ScopeBadge,{key:"scope",item:n,kind:window.KIND_REGISTRY&&window.KIND_REGISTRY.accountSuite}):null]})}))])}const k="account-suite-style";function h(){if(document.getElementById(k))return;const t=`
    .accountsuite{display:flex;flex-direction:column;gap:14px;height:100%;min-height:0;font-size:14px;line-height:1.45;color:${c.ink};font-family:var(--app-font-body,"Inter",system-ui,sans-serif);overflow:auto;padding:1.5rem;}
    .accountsuite *,.accountsuite *::before,.accountsuite *::after{box-sizing:border-box;}
    .accountsuite .mono{font-family:${c.mono};font-variant-numeric:tabular-nums;}
    .accountsuite .acct-src{font-family:${c.mono};font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:${c.inkFaint};margin:-6px 0 0;}

    .accountsuite .acct-grid{display:grid;grid-template-columns:1fr 1.3fr 1.3fr;gap:14px;align-items:start;}
    .accountsuite .acct-card{background:${c.surface};border:1px solid ${c.rule};border-radius:12px;padding:20px;}
    .accountsuite .acct-card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;gap:10px;}
    .accountsuite .acct-overline{font-size:10px;text-transform:uppercase;letter-spacing:.14em;color:${c.inkFaint};}

    .accountsuite .acct-credits-balance{font-weight:700;font-size:1.9rem;color:${c.ink};line-height:1;}
    .accountsuite .acct-credits-unit{font-size:.55em;color:${c.inkFaint};font-weight:400;}
    .accountsuite .acct-credits-eur{font-size:13px;color:${c.inkSoft};margin-top:4px;}
    .accountsuite .acct-credits-rate{font-size:11px;color:${c.inkFaint};margin-top:2px;margin-bottom:14px;}
    .accountsuite .acct-kv-rows{display:flex;flex-direction:column;gap:8px;}
    .accountsuite .acct-kv-row{display:flex;justify-content:space-between;gap:10px;padding-top:8px;border-top:1px solid ${c.rule};font-size:12px;}
    .accountsuite .acct-kv-row:first-child{border-top:0;padding-top:0;}
    .accountsuite .acct-kv-k{color:${c.inkFaint};}
    .accountsuite .acct-kv-v{color:${c.ink};}

    .accountsuite .acct-empty{font-size:12px;color:${c.inkFaint};margin:0;}
    .accountsuite .acct-list{display:flex;flex-direction:column;gap:2px;}
    .accountsuite .acct-row{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:9px 0;border-top:1px solid ${c.rule};}
    .accountsuite .acct-row:first-child{border-top:0;}
    .accountsuite .acct-chip{font-size:9.5px;font-weight:700;letter-spacing:.06em;padding:2px 8px;border-radius:999px;border:1px solid;width:fit-content;white-space:nowrap;}
    .accountsuite .acct-row-title{display:flex;flex-direction:column;gap:2px;min-width:0;}
    .accountsuite .acct-row-title>span:first-child{font-size:12.5px;color:${c.ink};overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
    .accountsuite .acct-row-sub{font-size:10.5px;color:${c.inkFaint};}
    .accountsuite .acct-row-num{font-size:12px;color:${c.inkSoft};text-align:right;white-space:nowrap;}

    @media(max-width:1100px){.accountsuite .acct-grid{grid-template-columns:1fr;}}
    `,a=document.createElement("style");a.id=k,a.textContent=t,document.head.appendChild(a)}function d(){h();const t=()=>window.KIND_REGISTRY&&window.KIND_REGISTRY.accountSuite&&window.KIND_REGISTRY.accountSuite.data||l,[a,n]=v(t);f(()=>{const w=()=>n(t());return window.addEventListener("account-live-hydrated",w),()=>window.removeEventListener("account-live-hydrated",w)},[]);const s=a&&a.summary||i,x=a&&a.invoices||u,S=a&&a.projects||r;return e("div",{className:"accountsuite"},[a&&a.source?e("p",{key:"src",className:"acct-src"},`source: ${a.source}`):null,e("div",{key:"grid",className:"acct-grid"},[b(s),g(S),N(x)])])}d.displayName="AccountSuiteView",window.ACCOUNT_SUITE_VIEW_FN=d,window.VIEWS=window.VIEWS||{},window.VIEWS.accountSuite=d,window.KIND_REGISTRY=window.KIND_REGISTRY||{},window.KIND_REGISTRY.accountSuite=window.KIND_REGISTRY.accountSuite||{id:"accountSuite",label:"Account",workspaceLabel:"Account",workspaceIcon:"account_circle",description:"Your account at a glance: credit balance & plan, active projects, and invoices.",defaultView:"accountSuite",defaultDetail:"none",agentTreatment:"implicit",primaryAction:{label:"Top up credits",kind:"primary",icon:"add"},secondaryActions:[{label:"Export invoices",icon:"download"}],heroKpis:i.heroKpis,schema:[{key:"title",label:"Item",wide:!0},{key:"status",label:"Status",kind:"status"},{key:"sub",label:"Detail"},{key:"kpi",label:"Amount",mono:!0,right:!0}],mockItems:r.items.map(t=>({id:t.id,title:t.title,status:t.status,statusLabel:t.statusLabel,sub:`${t.agent} \xB7 ${t.createdAt}`,kpi:t.cost})),data:l},window.ACCOUNT_SUITE_SEED=l})();
