/* Workspace forms share the active theme, including the task and billing editors. */
.workspace-access-page { max-width: 720px; margin-inline: auto; display: grid; gap: 16px; }
.workspace-access-page > h2, .workspace-access-page > p { margin: 0; }
.workspace-access-page > p { overflow-wrap: anywhere; }
.workspace-access-card { display: grid; gap: 14px; padding: 22px; border: 1px solid #ddd5ee; border-radius: 20px; background: #fff; color: #211c31; }
.workspace-access-card h3, .workspace-access-card p { margin: 0; }
.workspace-access-card button { min-height: 46px; width: 100%; padding: 12px 16px; border: 1px solid #ddd5ee; border-radius: 12px; color: inherit; background: #f6f3fc; }
.workspace-access-card button.primary { background: #6d28d9; border-color: #6d28d9; color: #fff; }
.workspace-access-card button:disabled { opacity: .65; }
.workspace-access-card [role="status"]:empty { display: none; }
.workspace-access-help { font-size: .9em; line-height: 1.5; }
:root[data-theme="dark"] .workspace-access-card { color: #e8e7ef; background: #1d2931; border-color: #40505a; }
:root[data-theme="dark"] .workspace-access-card button:not(.primary) { color: inherit; background: #263640; border-color: #40505a; }
.workspace-sales-contact { display: grid; gap: 16px; }
.workspace-sales-contact a { overflow-wrap: anywhere; }
.workspace-sales-contact .primary { display: block; padding: 14px 18px; text-align: center; border-radius: 12px; color: #fff; background: #6d28d9; text-decoration: none; }
.workspace-plan-page .plan-price strong { white-space: nowrap; }
/* Keep the final controls above the persistent mobile navigation when scrolled. */
html.native-mobile #overlay:is([data-panel="workspace"], [data-panel="tools"], [data-panel="communities"], [data-panel="payments"]) #panel-body {
  padding-bottom: calc(100px + env(safe-area-inset-bottom));
  scroll-padding-bottom: calc(100px + env(safe-area-inset-bottom));
}
#overlay :is(#workspace-task-edit, #workspace-plan-update, #business-profile-form, #business-ai-form),
#overlay .workspace-content-section .settings-form {
  box-sizing: border-box;
  min-width: 0;
  color: #211c31;
  border-color: #ddd5ee;
  background: #fff;
}
#overlay :is(#workspace-task-edit, #workspace-plan-update, #business-profile-form, #business-ai-form) label,
#overlay .workspace-content-section .settings-form label {
  color: inherit;
  min-width: 0;
}
#overlay :is(#workspace-task-edit, #workspace-plan-update, #business-profile-form, #business-ai-form) :is(input:not([type="checkbox"]), select, textarea),
#overlay .workspace-content-section .settings-form :is(input, select, textarea) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}
#overlay .workspace-task-actions { display: grid; gap: 8px; margin-top: 12px; }
#overlay .workspace-task-actions label { display: grid; gap: 5px; }
:root[data-theme="dark"] #overlay :is(#workspace-task-edit, #workspace-plan-update, #business-profile-form, #business-ai-form),
:root[data-theme="dark"] #overlay .workspace-content-section .settings-form {
  color: #e9edf2;
  border-color: #3d4b55;
  background: #17252b;
}
:root[data-theme="dark"] #overlay :is(#workspace-task-edit, #workspace-plan-update, #business-profile-form, #business-ai-form) :is(label, p, small),
:root[data-theme="dark"] #overlay .workspace-content-section .settings-form :is(label, p, small) {
  color: #d4dce4;
}

#overlay .workspace-subscription-review { max-width: 680px; margin: 0 auto; padding: 24px; color: var(--text); }
#overlay .workspace-subscription-review dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#overlay .workspace-subscription-review dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
#overlay .workspace-subscription-review .workspace-form-actions, #overlay .billing-actions { display: flex; flex-wrap: wrap; gap: 10px; }
#overlay .billing-actions p { flex-basis: 100%; }
#overlay .workspace-plan-warning { color: var(--muted); font-size: 13px; min-height: 2em; }
#overlay .workspace-plan-card button:disabled { opacity: .55; cursor: not-allowed; }
#overlay .workspace-billing-notice { padding: 16px; border: 1px solid var(--border); border-radius: 16px; }
#overlay .billing-actions .danger, #overlay .workspace-subscription-review button.danger { color: #ed3764; }
/* Compact iPhone workspace, matching the grouped Profile and Settings surfaces. */
@media(max-width:760px){
 html:root.native-mobile body #overlay[data-panel="workspace"]{--ws-bg:#f2f2f7;--ws-card:#fff;--ws-text:#111b21;--ws-muted:#667781;--ws-line:#e5e5ea;--ws-green:#008069;bottom:0;}
 html:root.native-mobile[data-theme="dark"] body #overlay[data-panel="workspace"]{--ws-bg:#000;--ws-card:#1c1c1e;--ws-text:#f2f2f7;--ws-muted:#98989f;--ws-line:#38383a;--ws-green:#25d366;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .panel{background:var(--ws-bg);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ws-text);}
 html:root.native-mobile body #overlay[data-panel="workspace"] .panel>header{min-height:56px;height:56px;padding:6px 12px;background:var(--ws-bg);border-bottom:1px solid var(--ws-line);}
 html:root.native-mobile body #overlay[data-panel="workspace"] #panel-title{font-size:22px!important;font-weight:650!important;color:var(--ws-text)!important;}
 html:root.native-mobile body #overlay[data-panel="workspace"] :is(#panel-back,#panel-close){min-width:44px;width:44px;height:44px;border:0;background:transparent;color:var(--ws-green);}
 html:root.native-mobile body #overlay[data-panel="workspace"] #panel-body{background:var(--ws-bg);padding:16px 16px calc(100px + env(safe-area-inset-bottom));scroll-padding-bottom:100px;overflow-x:hidden;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-panel{padding:0;gap:18px;max-width:none;min-width:0;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-hero{padding:16px;border:0;border-radius:12px;background:var(--ws-card);color:var(--ws-text);box-shadow:none;display:grid;gap:14px;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-hero-brand{gap:12px;align-items:center;min-width:0;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-hero-brand>i{width:56px;height:56px;min-width:56px;border:0;border-radius:50%;background:#008069;color:#fff;font-size:23px;font-style:normal;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-hero-brand>div{min-width:0;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-hero-brand span{display:none;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-hero-brand h3{margin:0 0 4px;font-size:20px;font-weight:600;color:var(--ws-text);overflow-wrap:anywhere;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-hero-brand p{margin:0;font-size:13px;line-height:1.4;color:var(--ws-muted);text-transform:capitalize;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-hero-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding-top:12px;border-top:1px solid var(--ws-line);}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-hero-metrics>span{padding:0 6px;border:0;border-radius:0;background:transparent;min-width:0;font-size:12px;color:var(--ws-muted);text-align:center;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-hero-metrics>span+span{border-left:1px solid var(--ws-line);}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-hero-metrics strong{font-size:17px;font-weight:600;color:var(--ws-text);overflow-wrap:anywhere;}
 html:root.native-mobile body #overlay[data-panel="workspace"] #workspace-main-dashboard{display:none;}
 html:root.native-mobile body #overlay[data-panel="workspace"] #workspace-view-plans{min-height:44px;margin:0;padding:8px 12px;border:0;border-top:1px solid var(--ws-line);border-radius:0;background:transparent;color:var(--ws-green);font-size:15px;font-weight:500;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-tabs{display:flex;gap:8px;padding:0;border:0;background:transparent;border-radius:0;overflow-x:auto;scrollbar-width:none;min-width:0;max-width:100%;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-tabs button{display:flex;align-items:center;gap:6px;flex:none;min-width:0;min-height:44px;padding:8px 14px;border:0;border-radius:22px;background:var(--ws-card);color:var(--ws-muted);font-size:14px;font-weight:500;white-space:nowrap;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-tabs button.active{background:#d9fdd3;color:#075e54;}
 html:root.native-mobile[data-theme="dark"] body #overlay[data-panel="workspace"] .workspace-tabs button.active{background:#103b2c;color:#7de8a0;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-tabs i{display:none;}
 html:root.native-mobile body #overlay[data-panel="workspace"] :is(#workspace-content,.business-command-center){min-width:0;display:grid;gap:8px;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .business-command-center>header{padding:0 12px 4px;border:0;border-radius:0;background:transparent;color:var(--ws-text);display:block;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .business-command-center>header :is(span,p,b){display:none;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .business-command-center>header h2{margin:0;color:var(--ws-muted);font-size:13px;font-weight:500;text-transform:uppercase;letter-spacing:.04em;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .business-command-grid{display:grid;grid-template-columns:1fr;gap:0;border-radius:12px;overflow:hidden;background:var(--ws-card);}
 html:root.native-mobile body #overlay[data-panel="workspace"] .business-command-grid>button{position:relative;display:grid;grid-template-columns:30px minmax(0,1fr) 14px;gap:12px;align-items:center;min-height:64px;padding:11px 14px;border:0;border-radius:0;background:transparent;color:var(--ws-text);box-shadow:none;transform:none;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .business-command-grid>button+button:before{content:"";position:absolute;top:0;left:56px;right:0;border-top:1px solid var(--ws-line);}
 html:root.native-mobile body #overlay[data-panel="workspace"] .business-command-grid>button:after{content:"›";grid-column:3;grid-row:1;font-size:23px;color:var(--ws-muted);}
 html:root.native-mobile body #overlay[data-panel="workspace"] .business-command-grid>button>i{grid-row:1;width:29px;height:29px;border-radius:7px;background:#008069;color:#fff;font-size:18px;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .business-command-grid>button>i svg{width:20px;height:20px;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .business-command-grid>button:nth-child(3n+1)>i{background:#007aff;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .business-command-grid>button:nth-child(3n+2)>i{background:#34c759;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .business-command-grid>button>span{display:grid;gap:3px;min-width:0;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .business-command-grid strong{font-size:17px;font-weight:400;color:var(--ws-text);}
 html:root.native-mobile body #overlay[data-panel="workspace"] .business-command-grid small{font-size:12px;line-height:1.4;color:var(--ws-muted);}
 html:root.native-mobile body #overlay[data-panel="workspace"] .business-command-grid em{display:none;}
 html:root.native-mobile body #overlay[data-panel="workspace"] :is(.workspace-content-section,.workspace-section-intro,.workspace-access-card,.settings-form,.workspace-plan-card,.workspace-billing-notice){background:var(--ws-card);color:var(--ws-text);border-color:var(--ws-line);border-radius:12px;box-shadow:none;min-width:0;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-section-intro{padding:14px;gap:10px;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-section-intro h2{font-size:20px;font-weight:600;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-section-intro :is(p,small){color:var(--ws-muted);font-size:13px;line-height:1.5;}
 html:root.native-mobile body #overlay[data-panel="workspace"] :is(input,select,textarea){font-family:inherit;font-size:16px;max-width:100%;}
 html:root.native-mobile body #overlay[data-panel="workspace"] button:focus-visible{outline:2px solid var(--ws-green);outline-offset:-2px;}
}
@media(max-width:760px){
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-panel{background:transparent!important;overflow:visible!important;display:grid!important;gap:18px!important;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-tabs{background:transparent!important;padding:0!important;overflow-y:hidden!important;scrollbar-width:none!important;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-tabs::-webkit-scrollbar{display:none;}
}
@media(max-width:760px){
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-hero-brand p{color:var(--ws-muted)!important;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-tabs{box-shadow:none!important;border:0!important;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-tabs button{background:var(--ws-card)!important;color:var(--ws-muted)!important;box-shadow:none!important;}
 html:root.native-mobile body #overlay[data-panel="workspace"] .workspace-tabs button.active{background:#d9fdd3!important;color:#075e54!important;}
 html:root.native-mobile[data-theme="dark"] body #overlay[data-panel="workspace"] .workspace-tabs button.active{background:#103b2c!important;color:#7de8a0!important;}
}

@media(max-width:760px){html:root.native-mobile body #overlay[data-panel="workspace"] .business-command-grid>button>i svg{display:block;width:20px;height:20px;padding:0;border:0;border-radius:0;background:none!important;color:inherit;grid-row:auto;}}
