@import url('./business-billing.css');
.agent-workspace{max-width:1080px;margin-inline:auto;min-width:0}.agent-workspace h3{margin:0 0 6px}.agent-workspace .note{line-height:1.65;white-space:pre-line;overflow-wrap:anywhere}.agent-intro,.agent-profile-card header,.agent-invoice header{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.agent-intro{padding:8px 0 18px;border-bottom:1px solid var(--border,#dde2ea);margin-bottom:14px}.agent-intro p,.agent-profile-card header p,.agent-invoice header p{margin:0;color:var(--muted,#677086)}.agent-avatar{display:grid;place-items:center;flex:0 0 46px;width:46px;height:46px;border-radius:16px;background:var(--primary-soft,#eeeefa);color:var(--primary,#5856a8);font-size:22px;font-weight:700}.agent-chip{display:inline-flex;align-items:center;background:var(--primary-soft,#eeeefa);color:var(--primary,#5856a8);border-radius:30px;padding:6px 10px;font-size:12px;line-height:1.4;font-weight:600}.agent-chip-review{background:#fff0d5;color:#785411}.agent-banner{padding:14px 16px;border:1px solid #e2c880;border-radius:12px;background:#fff8e7;color:#755318;line-height:1.6}.agent-tabs{display:flex;gap:8px;overflow-x:auto;padding:2px 0 16px;scrollbar-width:thin}.agent-tabs button{white-space:nowrap;flex-shrink:0;min-height:42px}.agent-tabs [aria-current=page]{background:var(--primary,#5856a8);color:#fff}.agent-team-grid,.agent-plan-grid,.agent-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.agent-profile-card{display:flex;flex-direction:column;gap:16px;padding:18px}.agent-profile-card>p{line-height:1.65;color:var(--muted,#677086);margin:0;flex:1}.agent-profile-card button{align-self:flex-start}.agent-empty{padding:30px 18px;border:1px dashed var(--border,#dde2ea);border-radius:14px;color:var(--muted,#677086);text-align:center;line-height:1.7;margin:16px 0}.agent-transcript{display:grid;gap:12px;margin:18px 0}.agent-message{padding:16px;border:1px solid var(--border,#dde2ea);border-radius:14px;background:var(--panel,#fff);min-width:0}.agent-message-user{background:var(--primary-soft,#eeeefa);margin-left:24px}.agent-message header{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}.agent-message header small{color:var(--muted,#677086);font-size:11px}.agent-message p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;margin:9px 0 0}.agent-message>small{display:block;line-height:1.7;margin-top:10px;color:var(--muted,#677086)}.agent-actions{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.agent-workspace form{margin-block:16px}.agent-workspace textarea{resize:vertical;min-height:100px}.agent-workspace .field{min-width:0}.agent-workspace .check-field{align-items:flex-start;gap:10px;line-height:1.7}.agent-workspace .check-field input{margin-top:5px;flex:0 0 auto}.agent-permissions,.agent-publish{padding:16px;border-radius:12px;background:var(--primary-soft,#eeeefa);margin-block:16px}.agent-publish summary{cursor:pointer;font-weight:600;line-height:1.7}.agent-price{font-size:30px;font-weight:700;letter-spacing:-1px;margin:14px 0}.agent-price small{font-weight:400;font-size:13px;letter-spacing:0;margin-inline-start:5px;color:var(--muted,#677086)}.agent-plan{padding:18px}.agent-plan>p:last-child{font-size:13px;line-height:1.6;margin-bottom:0}.agent-invoice{padding:20px}.agent-invoice dl{margin:0}.agent-invoice dl>div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid var(--border,#dde2ea)}.agent-invoice dt{color:var(--muted,#677086)}.agent-invoice dd{margin:0;text-align:right;font-weight:600;overflow-wrap:anywhere}.agent-qr{display:block;max-width:260px;width:100%;height:auto;object-fit:contain;margin:16px auto;background:#fff;padding:8px;border-radius:12px}.agent-receipts{margin:20px 0}.agent-receipts figure{margin:12px 0}.agent-receipts img{display:block;max-width:100%;width:auto;max-height:650px;object-fit:contain;border:1px solid var(--border,#dde2ea);border-radius:12px}.agent-receipts figcaption{font-size:12px;margin-top:8px;color:var(--muted,#677086)}.agent-review{padding:18px}.agent-workspace .settings-list{margin-block:16px}.agent-workspace input[type=file]{max-width:100%;font-size:13px}.agent-workspace input,.agent-workspace textarea,.agent-workspace select{box-sizing:border-box;max-width:100%}
@media(min-width:960px){.agent-plan-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.agent-workspace{padding-bottom:20px}}
@media(max-width:560px){.agent-form-grid,.agent-team-grid{grid-template-columns:1fr}.agent-intro>.agent-chip{margin-left:58px}.agent-message-user{margin-left:12px}.agent-price{font-size:26px}.agent-plan{padding:14px}.agent-invoice dl>div{font-size:13px}.agent-workspace .agent-tabs{margin-inline:-2px}.agent-workspace .form-actions button{width:100%}}
[data-theme=dark] .agent-message{background:#202434}[data-theme=dark] .agent-message-user,[data-theme=dark] .agent-avatar,[data-theme=dark] .agent-permissions,[data-theme=dark] .agent-publish,[data-theme=dark] .agent-chip{background:#303249;color:#d5d3ff}[data-theme=dark] .agent-banner,[data-theme=dark] .agent-chip-review{background:#3e3524;color:#f2d695}

.agent-plan-settings{min-width:0;border:1px solid var(--border,#dde2ea);border-radius:12px;padding:12px;margin-block:12px}.agent-plan-settings legend{padding-inline:6px;font-weight:600}

/* The conversation owns its scroll area; the text composer stays in view. */
#sheet:has(.agent-chat-page){height:calc(var(--app-height,100dvh) - max(var(--safe-top,0px),env(safe-area-inset-top)) - var(--telegram-top,0px) - 12px)}
#sheet-content:has(.agent-chat-page){display:flex;flex:1;min-height:0;overflow:hidden;padding-bottom:0}
.agent-workspace.agent-chat-page{display:flex;flex-direction:column;flex:1;min-height:0;width:100%;max-width:800px;padding:0}
.agent-chat-header{display:flex;align-items:center;gap:10px;flex:none;padding:8px 0 10px}
.agent-chat-header>div{min-width:0}.agent-chat-header strong{overflow-wrap:anywhere;font-size:15px}
.agent-chat-header .agent-avatar{width:36px;height:36px;flex-basis:36px;border-radius:12px;font-size:17px}
.agent-chat-page .agent-chat-header p{margin:2px 0 0;color:var(--muted);font-size:12px;line-height:1.6}
.agent-chat-shortcuts{flex:none;display:flex;flex-wrap:wrap;margin-bottom:4px}
.agent-chat-page .agent-chat-shortcuts button{width:auto;max-width:100%;min-height:44px;margin:0;padding:8px 12px;font-size:13px;line-height:1.6;white-space:normal;text-align:start}
#sheet-content .agent-chat-options{flex:none;position:relative;margin:0;padding:0 0 8px;border:0;border-bottom:1px solid var(--line,#e9ebf2);background:transparent}
#sheet-content .agent-chat-options>summary{margin:0}
.agent-chat-options summary{width:fit-content;min-height:36px;align-content:center;cursor:pointer;font-size:12px;font-weight:600;color:var(--muted);padding:5px 0}
.agent-chat-options summary:focus-visible,.agent-chat-history:focus-visible{outline:2px solid var(--primary,#5754d7);outline-offset:2px}
.agent-chat-menu{position:absolute;top:100%;inset-inline:0;z-index:5;display:grid;gap:2px;padding:8px;max-height:min(48dvh,360px);overflow-y:auto;background:var(--surface,#fff);border:1px solid var(--line,#e9ebf2);border-radius:12px;box-shadow:0 12px 28px #161b3626}
.agent-chat-page .agent-chat-menu button{width:100%;margin:0;justify-content:flex-start;text-align:start;border:0;background:transparent;color:var(--ink,var(--text));min-height:44px;padding:10px;font-size:13px;line-height:1.6}
.agent-chat-menu button:hover{background:var(--primary-soft,#eeedfc)}
.agent-chat-page .agent-chat-menu p{margin:6px 10px;padding-top:10px;border-top:1px solid var(--line,#e9ebf2);font-size:12px;color:var(--muted);line-height:1.7}
.agent-chat-history{flex:1;min-height:60px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;overflow-wrap:anywhere;padding:14px 2px;scroll-padding:12px}
.agent-chat-page .agent-transcript{margin:0;gap:16px}
.agent-chat-page .agent-message{padding:12px 14px;border-color:var(--line,#e9ebf2);border-radius:14px;margin-right:12px;font-size:var(--text-support)}
.agent-chat-page .agent-message-user{margin-right:0;margin-left:28px}
.agent-chat-page .agent-message header{gap:4px 12px;font-size:12px}.agent-chat-page .agent-message p{font-size:var(--text-support);line-height:1.85}
.agent-chat-welcome{height:100%;min-height:120px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:20px 12px}
.agent-chat-page .agent-chat-welcome h3{margin:0 0 8px;font-size:20px}.agent-chat-page .agent-chat-welcome p{margin:0;color:var(--muted);font-size:13px;line-height:1.8}
.agent-chat-composer{flex:none;border-top:1px solid var(--line,#e9ebf2);padding:12px 0 calc(12px + max(var(--safe-bottom,0px),env(safe-area-inset-bottom)) + var(--content-bottom,0px));background:var(--surface,#fff)}
.agent-chat-page form[data-form=agent-chat]{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'input send' 'error error';gap:0 8px;align-items:end;margin:0}
.agent-chat-page form[data-form=agent-chat]>.field{grid-area:input;margin:0}
.agent-chat-page form[data-form=agent-chat]>.field>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#sheet-content .agent-chat-page form[data-form=agent-chat] textarea{font-size:var(--text-body);line-height:1.65;min-height:64px;max-height:130px;resize:none;padding:10px 12px}
.agent-chat-page form[data-form=agent-chat]>.form-actions{grid-area:send;position:static;margin:0;padding:0;border:0;box-shadow:none;background:transparent}
.agent-chat-page form[data-form=agent-chat] button[type=submit]{width:auto;min-width:64px;min-height:48px;margin:0;padding:10px 16px;font-size:var(--text-support);border-radius:12px}
.agent-chat-page form[data-form=agent-chat]>.form-error{grid-area:error;margin:8px 0 0;max-height:70px;overflow:auto;font-size:12px;line-height:1.6}
.agent-chat-page .agent-chat-disclosure{margin:8px 0 0;font-size:11px;line-height:1.6;color:var(--muted)}
.agent-chat-page .agent-chat-unavailable{margin:0 0 12px;font-size:13px;line-height:1.7}
.workflow #sheet[open]:has(.agent-chat-page){height:calc(100dvh - 210px);min-height:0;max-height:880px;display:flex;flex-direction:column;overflow:hidden}
.workflow #sheet:has(.agent-chat-page) .workflow-heading{padding:16px 28px;flex:none}
.workflow #sheet-content:has(.agent-chat-page){padding:0 28px;flex:1}
@media(max-width:560px){#sheet-content:has(.agent-chat-page){padding-inline:16px}.agent-chat-page .agent-message{padding:10px 12px}.agent-chat-page .agent-message-user{margin-left:20px}}
@media(max-height:520px){.agent-chat-header{padding-block:3px}.agent-chat-header .agent-avatar{display:none}#sheet-content .agent-chat-options{padding-bottom:0}.agent-chat-composer{padding-top:8px}.agent-chat-page .agent-chat-disclosure{font-size:10px;margin-top:4px}#sheet-content .agent-chat-page form[data-form=agent-chat] textarea{min-height:48px;height:48px}.agent-chat-welcome{min-height:60px;padding:8px}}

/* Keep the selected agent tab visible inside Desktop workflow button styles. */
.agent-workspace .agent-tabs button[aria-current=page]{background:var(--action,var(--primary,#5856a8));border-color:var(--action,var(--primary,#5856a8));color:var(--on-action,#fff)}

/* Activation decisions follow the reviewed fields instead of covering them on small screens. */
.agent-workspace form[data-form^="agent-activation-"]>.form-actions{position:static;box-shadow:none}

.ai-costs{overflow-wrap:anywhere}.ai-costs p,.ai-costs small{color:var(--muted)}.ai-cost-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px;margin:16px 0}.ai-cost-totals strong,.ai-cost-totals small{display:block}.ai-cost-totals strong{font-size:1.15rem;margin-top:4px}.ai-costs ul{list-style:none;padding:0;margin:12px 0}.ai-costs li{display:flex;justify-content:space-between;align-items:start;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.ai-costs li>div{min-width:0}.ai-costs li small{display:block;margin-top:4px}.ai-costs li>strong{flex-shrink:0;font-variant-numeric:tabular-nums}.ai-costs summary{cursor:pointer;padding:12px 0}@media(max-width:360px){.ai-costs li{flex-direction:column;gap:4px}}
.subscription-workspace{max-width:1000px}.subscription-heading{margin:18px 0}.subscription-heading h2{margin:0 0 8px;font-size:23px;line-height:1.6;overflow-wrap:anywhere}.subscription-heading p,.subscription-summary p{margin:6px 0;color:var(--muted,#677086);line-height:1.7}.subscription-eyebrow{font-size:12px;font-weight:600;color:var(--muted,#677086);display:block;line-height:1.6}.subscription-summary{display:grid;grid-template-columns:1fr 1fr;gap:12px 24px;padding:20px}.subscription-summary>.note{grid-column:1/-1;margin:0}.subscription-summary h3{font-size:25px;margin:5px 0}.subscription-capacity{display:grid;align-content:center;gap:7px}.subscription-capacity>strong{font-size:22px}.subscription-capacity>span{font-size:12px;color:var(--muted,#677086);line-height:1.6}.subscription-capacity progress{appearance:none;width:100%;height:8px;border:0;border-radius:20px;overflow:hidden;background:var(--border,#dde2ea)}.subscription-capacity progress::-webkit-progress-bar{background:var(--border,#dde2ea)}.subscription-capacity progress::-webkit-progress-value{background:var(--primary,#5856a8);border-radius:20px}.subscription-next{padding:20px;border-color:var(--primary,#5856a8);background:var(--primary-soft,#eeeefa)}.subscription-next h3{margin-top:6px;line-height:1.7}.subscription-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}.subscription-history{margin:26px 0}.subscription-empty{padding:20px;margin:0;color:var(--muted,#677086);line-height:1.7}.subscription-details{border:1px solid var(--border,#dde2ea);border-radius:12px;padding:14px 16px;margin:14px 0;min-width:0}.subscription-details>summary{cursor:pointer;font-weight:600;line-height:1.7}.subscription-details>summary::marker{color:var(--primary,#5856a8)}.subscription-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:0;margin:22px 0;list-style:none}.subscription-steps li{display:flex;flex-direction:column;align-items:flex-start;gap:7px;font-size:12px;color:var(--muted,#677086);line-height:1.6;min-width:0}.subscription-steps li>span{display:grid;place-items:center;width:28px;height:28px;border:1px solid var(--border,#dde2ea);border-radius:50%;font-size:13px;font-weight:700}.subscription-steps .is-current{color:var(--primary,#5856a8);font-weight:700}.subscription-steps .is-current>span{background:var(--primary,#5856a8);color:#fff;border-color:transparent}.subscription-steps .is-complete>span{background:var(--primary-soft,#eeeefa);color:var(--primary,#5856a8)}.subscription-plan-grid{margin:20px 0;grid-template-columns:repeat(2,minmax(0,1fr))}.subscription-plan{display:flex;flex-direction:column;gap:9px;min-width:0}.subscription-plan.is-recommended{border-color:var(--primary,#5856a8);box-shadow:0 0 0 1px var(--primary,#5856a8)}.subscription-plan-label{min-height:32px}.subscription-plan h3{font-size:20px}.subscription-plan .agent-price{font-size:30px;line-height:1.4;margin:0}.subscription-plan .agent-price small{display:block;margin:4px 0 0;font-size:12px;line-height:1.6}.subscription-plan>p{margin:0;line-height:1.7;color:var(--muted,#677086)}.subscription-plan .subscription-plan-capacity{color:var(--text,#252639)}.subscription-plan>button,.subscription-plan>.subscription-plan-foot{margin-top:auto}.subscription-plan-foot{padding-top:9px;font-size:12px;color:var(--muted,#677086);line-height:1.6}.subscription-included{margin:24px 0;padding:0 2px}.subscription-included ul{padding-left:20px;line-height:1.8;margin:10px 0;display:grid;gap:6px}.subscription-quote{padding:20px;background:var(--primary-soft,#eeeefa)}.subscription-quote>div:first-child{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.subscription-quote .agent-price{margin:0;font-size:30px}.subscription-quote dl,.subscription-payment dl{margin:14px 0 0}.subscription-quote dl>div,.subscription-payment dl>div{display:flex;justify-content:space-between;gap:15px;border-top:1px solid var(--border,#dde2ea);padding:12px 0;line-height:1.7}.subscription-quote dt,.subscription-payment dt{color:var(--muted,#677086)}.subscription-quote dd,.subscription-payment dd{margin:0;text-align:right;overflow-wrap:anywhere;font-weight:600}.subscription-payment,.subscription-upload{padding:20px}.subscription-payment dd>button{display:block;margin:7px 0 0 auto;font-weight:400}.subscription-account{user-select:text;-webkit-user-select:text}.subscription-payment [data-copy-status]{font-size:13px;line-height:1.6}.subscription-invoice>span{display:block;margin-top:20px;color:var(--muted,#677086);font-size:12px}.subscription-invoice .agent-price{margin-top:5px}.subscription-review-note{border-top:1px solid var(--border,#dde2ea);padding-top:12px;margin-top:12px}.subscription-workspace .subscription-details form{margin-bottom:0}.subscription-workspace .subscription-details .agent-receipts{margin-bottom:0}.subscription-workspace .check-field{margin:18px 0}.subscription-workspace .check-field span{min-width:0}
@media(min-width:900px){.subscription-plan-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.subscription-plan{padding:16px}.subscription-plan .agent-price{font-size:28px}}
@media(max-width:560px){.subscription-summary{grid-template-columns:1fr;padding:16px}.subscription-next,.subscription-payment,.subscription-upload,.subscription-quote{padding:16px}.subscription-plan-grid{grid-template-columns:1fr}.subscription-plan-label{min-height:0}.subscription-plan .agent-price small{display:inline;margin-inline-start:7px}.subscription-plan>button{width:100%}.subscription-actions{display:grid;grid-template-columns:1fr}.subscription-actions>button{width:100%}.subscription-steps{gap:6px}.subscription-steps li{font-size:11px}.subscription-quote dl>div{font-size:13px}.subscription-payment dl>div{flex-direction:column;gap:4px}.subscription-payment dd{text-align:left}.subscription-payment dd>button{margin-left:0}.subscription-heading h2{font-size:21px}}
@media(max-width:560px){.subscription-workspace .subscription-plan-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.subscription-workspace .subscription-plan{padding:12px;gap:9px}.subscription-workspace .subscription-plan h3{font-size:var(--text-heading);overflow-wrap:anywhere}.subscription-workspace .subscription-plan .agent-price{font-size:25px}.subscription-workspace .subscription-plan .agent-price small{display:block;margin-inline-start:0;font-size:11px}.subscription-workspace .subscription-plan>p,.subscription-workspace .subscription-plan>button{font-size:12px}.subscription-workspace .subscription-plan>button{padding:10px 7px;line-height:1.6}.subscription-workspace .subscription-plan .agent-chip{font-size:10px;padding:4px 7px}.subscription-workspace .subscription-plan-foot{font-size:11px}}
