/* Business Live follows the dashboard palette and Arabic/LTR direction switch. */
#sidebar .nav{min-height:0;overflow-y:auto;scrollbar-width:thin}
.live-page{min-width:0}
.live-page .page-title{flex-wrap:wrap;align-items:flex-start}
.live-page .page-title>div{min-width:0}
.live-page h1,.live-page h2,.live-page h3,
.live-dialog h2,.live-dialog h3{line-height:1.55;overflow-wrap:anywhere}
.live-page p,.live-dialog p,.live-dialog small{overflow-wrap:anywhere}
.live-inactive{padding:17px 21px;margin-bottom:20px;background:#fff8ec;border:1px solid #d8b887;border-radius:12px;line-height:1.7}
.live-inactive strong{font-size:.91rem}
.live-inactive p{margin:5px 0 0;font-size:.82rem}
.client-plan-cell{display:flex;align-items:center;gap:7px 12px;flex-wrap:wrap}
.client-plan-cell .text-link{white-space:normal;text-align:start;line-height:1.5}
.client-plan-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;border:0;padding:0;margin:18px 0;min-width:0}
.client-plan-choices legend{font-weight:700;padding:0;margin-bottom:9px;line-height:1.6}
.client-plan-option{position:relative;min-width:0;cursor:pointer}
.client-plan-option input{position:absolute;opacity:0;width:1px;height:1px}
.client-plan-option span{display:block;padding:13px 16px;border:1px solid var(--line);border-radius:9px;background:var(--paper);color:var(--ink);line-height:1.55;overflow-wrap:anywhere}
.client-plan-option input:checked+span{border-color:#75b852;background:#f4fbef;box-shadow:0 0 0 1px #75b852;font-weight:700}
.client-plan-option input:focus-visible+span{outline:3px solid #75bf58;outline-offset:2px}
.live-templates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:23px}
.live-template{min-width:0;display:flex;flex-direction:column;padding:22px;border:1px solid var(--line);border-radius:12px;background:var(--paper)}
.live-template .live-index{font-size:.73rem;color:var(--muted);letter-spacing:.1em;direction:ltr;align-self:flex-start}
.live-template h2{margin:18px 0 9px}
.live-template p{font-size:.84rem;color:var(--muted);line-height:1.75;flex:1;margin:0 0 18px}
.live-template .text-link{align-self:flex-start;padding-inline:0;text-align:start}
.live-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px 20px}
.live-search{position:relative;flex:1;min-width:220px}
.live-search svg{position:absolute;inset-inline-start:12px;top:50%;transform:translateY(-50%);width:18px;color:var(--muted)}
.live-search input{width:100%;padding-inline-start:40px;min-height:44px}
.live-filter{display:flex;gap:5px;flex-wrap:wrap}
.live-filter button{background:transparent;color:var(--muted);padding:9px 12px;border-radius:8px;border:1px solid transparent;line-height:1.4;white-space:normal}
.live-filter button.active{background:#f4f9f2;color:var(--ink);border-color:var(--line);font-weight:700}
.live-row{display:flex;align-items:center;justify-content:space-between;gap:16px 24px;padding:18px 22px;border-top:1px solid var(--line);min-width:0}
.live-row-main{min-width:0;flex:1}
.live-row-main>strong{display:block;font-size:.95rem;line-height:1.65;overflow-wrap:anywhere}
.live-row-main p{margin:7px 0 0;color:var(--muted);font-size:.82rem;line-height:1.6;overflow-wrap:anywhere}
.live-row-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:6px;font-size:.77rem;color:var(--muted)}
.live-row-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.live-row-actions .text-link{white-space:normal;line-height:1.4}
.live-empty{padding:36px 22px;text-align:center;color:var(--muted)}
.live-page>.note{display:flex;align-items:flex-start;gap:9px}
.live-page>.note svg{margin-top:3px}
.live-dialog{width:min(860px,calc(100% - 28px));max-width:860px;max-height:min(92dvh,940px);height:auto;margin:auto;padding:0;overflow:hidden;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:16px;box-shadow:0 22px 75px #0002}
.live-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.live-dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;padding:20px 27px;border-bottom:1px solid var(--line)}
.live-dialog-head>div{min-width:0}
.live-dialog-head small{font-size:.7rem;color:var(--muted);letter-spacing:.1em}
.live-dialog-head h2{margin:4px 0 0;font-size:1.28rem}
.live-dialog-body{min-height:0;overflow:auto;padding:22px 27px;overscroll-behavior:contain}
.live-dialog-footer{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:9px;padding:16px 27px;border-top:1px solid var(--line);background:var(--paper)}
.live-dialog-footer .btn{white-space:normal;text-align:center;line-height:1.45}
.live-dialog-error{margin-top:18px}
.live-steps{display:flex;gap:12px;align-items:center;list-style:none;padding:0;margin:0 0 18px;font-size:.79rem;color:var(--muted);flex-wrap:wrap}
.live-steps li{display:flex;align-items:center;gap:7px;line-height:1.6}
.live-steps li+li:before{content:'';display:inline-block;width:22px;height:1px;background:var(--line);margin-inline-end:5px}
.live-steps li span{display:grid;place-items:center;min-width:23px;height:23px;padding:0 5px;border-radius:50%;background:#f2f2f2;color:var(--muted)}
.live-steps li.active{color:var(--ink);font-weight:700}
.live-steps li.active span{background:#dff3d6;color:#274b22}
.live-helper,.live-policy{border:1px solid var(--line);border-radius:9px;background:#f8faf8;padding:14px 16px;font-size:.82rem;line-height:1.85;margin:0 0 22px;overflow-wrap:anywhere}
.live-policy{background:#f4f8ef;margin:19px 0 0}
.live-form-section{margin:0 0 25px}
.live-form-section h3{margin:0 0 13px;font-size:1rem}
.live-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px 20px}
.live-field{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:.84rem;font-weight:600;line-height:1.55}
.live-field.wide{grid-column:1/-1;width:auto}
.live-field>span,.live-field>label{display:block;min-width:0;overflow-wrap:anywhere}
.live-field em{font-size:.72rem;color:var(--muted);font-weight:400;font-style:normal;margin-inline-start:6px}
.live-field input,.live-field select,.live-field textarea{display:block;width:100%;min-width:0;max-width:100%;height:auto;min-height:46px;padding:10px 12px;line-height:1.55;font-size:.88rem;white-space:normal;overflow-wrap:anywhere}
.live-field select{padding-inline-end:35px;appearance:auto}
.live-field textarea{min-height:96px;resize:vertical}
.live-field small{font-size:.73rem;color:var(--muted);line-height:1.65;white-space:normal}
.live-field .live-error{color:#9e493d}
.live-field [aria-invalid=true]{border-color:#b15b4e;background:#fff9f7}
.live-currency-other{display:flex;flex-direction:column;gap:5px;font-size:.79rem;margin-top:5px}
.live-field-hint{grid-column:1/-1;margin:15px 0 0;font-size:.78rem;color:var(--muted);line-height:1.7}
.live-review{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 17px;border:1px solid var(--line);border-radius:10px;margin:0;overflow:hidden}
.live-review>div{min-width:0;padding:13px 16px;border-bottom:1px solid var(--line)}
.live-review dt{font-size:.73rem;color:var(--muted);line-height:1.55;margin-bottom:4px}
.live-review dd{margin:0;font-size:.89rem;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;word-break:normal}
.live-view-label{font-size:.78rem;color:var(--muted);margin-bottom:17px}
.live-view-label~h3{margin-top:25px}
.live-kind-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0 0 20px}
.live-kind-choices legend{grid-column:1/-1;font-size:.9rem;font-weight:700;margin-bottom:12px}
.live-kind-option{position:relative;display:block;min-width:0;cursor:pointer}
.live-kind-option input{position:absolute;opacity:0;width:1px;height:1px}
.live-kind-option span{display:flex;flex-direction:column;gap:7px;min-width:0;height:100%;padding:15px;border:1px solid var(--line);border-radius:9px;background:var(--paper);line-height:1.6}
.live-kind-option strong,.live-kind-option small{overflow-wrap:anywhere}
.live-kind-option small{font-size:.73rem;color:var(--muted)}
.live-kind-option input:checked+span{border-color:#77bf55;background:#f4fbef;box-shadow:0 0 0 1px #77bf55}
.live-kind-option input:focus-visible+span{outline:3px solid #75bf58;outline-offset:2px}
.live-import-tabs{display:flex;gap:8px;margin-bottom:14px;flex-wrap:wrap}
.live-import-tabs button{border:1px solid var(--line);background:transparent;padding:10px 15px;border-radius:8px;color:var(--ink)}
.live-import-tabs button.active{border-color:#79bd57;background:#f5faef;font-weight:700}
.live-paste textarea{min-height:170px}
.live-upload{display:block;border:1px dashed #9fb796;background:#f9fbf8;padding:24px;border-radius:10px;text-align:center;line-height:1.8}
.live-upload input{display:block;margin:15px auto 0;max-width:100%}
.live-import-examples{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:20px 0 0}
.live-import-results{display:grid;gap:12px;max-height:480px;overflow-y:auto}
.live-import-row{padding:14px 17px;border:1px solid var(--line);border-radius:9px;min-width:0}
.live-import-row-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}
.live-import-row-head strong{min-width:0;overflow-wrap:anywhere}
.live-import-row>small{display:block;margin:8px 0;color:var(--muted);line-height:1.6}
.live-import-row>small.live-skipped{color:#936535}
.live-match{border:1px solid #d4e4c9;background:#f8fbf5;border-radius:8px;padding:12px 14px;margin:13px 0;font-size:.78rem;line-height:1.6}
.live-match p{font-size:.77rem;margin:4px 0 10px;color:var(--muted)}
.live-match-choices{display:flex;gap:12px 19px;flex-wrap:wrap}
.live-match-choices label{display:inline-flex;align-items:center;gap:6px;cursor:pointer;line-height:1.6}
.live-match-choices input{width:17px;height:17px;min-width:17px;margin:0;accent-color:#5f9e43}
.live-import-row details{margin-top:9px}
.live-import-row summary{cursor:pointer;color:var(--green);font-size:.79rem}
.live-import-row .live-review{margin-top:12px}
html[data-theme=dark] :is(.live-template,.live-dialog,.live-dialog-footer,.live-kind-option span){background:#18181b;color:#fafafa;border-color:#303033}
html[data-theme=dark] .live-inactive{background:#32291b;color:#f5efe3;border-color:#80653d}
html[data-theme=dark] .client-plan-option span{background:#18181b;color:#fafafa;border-color:#303033}
html[data-theme=dark] .client-plan-option input:checked+span{background:#252c21;border-color:#75b852}
html[data-theme=dark] :is(.live-helper,.live-policy,.live-upload,.live-filter button.active,.live-import-tabs button.active,.live-kind-option input:checked+span){background:#252c21;color:#f3f3f3;border-color:#567b45}
html[data-theme=dark] :is(.live-steps li span){background:#303033;color:#eee}
html[data-theme=dark] .live-field [aria-invalid=true]{background:#352825;color:#fff;border-color:#a76a5d}
html[data-theme=dark] .live-template p,html[data-theme=dark] .live-row-main p{color:#a1a1aa}
html[data-theme=dark] .live-match{background:#202a1d;border-color:#46603c;color:#fafafa}
html[data-theme=dark] .live-import-row>small.live-skipped{color:#ffc980}
@media(max-width:1050px){.live-templates{grid-template-columns:1fr 1fr}.live-tools{align-items:stretch}.live-search{flex-basis:100%}}
@media(max-width:760px){.live-templates{grid-template-columns:1fr}.live-template{padding:17px}.live-row{align-items:flex-start;flex-direction:column}.live-row-actions{width:100%}.live-dialog{width:calc(100% - 18px);max-height:95dvh}.live-dialog-head,.live-dialog-body,.live-dialog-footer{padding-inline:17px}.live-form-grid,.live-review,.client-plan-choices{grid-template-columns:1fr}.live-kind-choices{grid-template-columns:1fr}.live-dialog-footer .btn{flex:1 1 45%}.live-page .page-title .btn{max-width:100%}}
@media(prefers-reduced-motion:reduce){.live-dialog *{scroll-behavior:auto!important}}

/* Live workspace: editorial hierarchy from the approved preview. */
.live-page{--live-accent:#477c2e;--live-line:#e2e8df;--live-soft:#f3f8ee}
.live-page .live-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:26px 40px;min-width:0;margin:9px 0 32px}
.live-page .live-hero-copy{min-width:0;max-width:820px}
.live-page .live-hero-kicker,.live-page .live-section-kicker{display:block;margin:0 0 13px;color:var(--live-accent);font-size:.72rem;font-weight:750;letter-spacing:.09em;line-height:1.5}
.live-page .live-hero-kicker{display:inline-block;direction:ltr;unicode-bidi:isolate}
.live-page .live-hero h1{font-size:clamp(2.05rem,3.25vw,3.3rem);font-weight:750;line-height:1.28;letter-spacing:-.055em;margin:0 0 15px;overflow-wrap:normal}
.live-page .live-hero h1 span{color:#5d9d3f}
.live-page .live-hero-copy>p{max-width:740px;margin:0;color:var(--muted);font-size:.95rem;line-height:1.9}
.live-page .live-hero-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex-shrink:0}
.live-page .live-hero-actions .btn{min-height:46px;padding:11px 18px}
.live-page .live-hero-actions .btn:not(.secondary){background:#20251f;border-color:#20251f;color:#fff}
.live-page .live-hero-actions .btn:not(.secondary):hover:not(:disabled){background:#343d31;border-color:#343d31;color:#fff}
.live-page .live-hero-actions .btn.secondary{background:#fff;border-color:var(--live-line)}
.live-page .live-hero-note{display:flex;align-items:center;gap:12px 17px;min-width:0;padding:17px 20px;border:1px solid #dfeada;border-radius:12px;background:#f5faef;color:#4d7043}
.live-page .live-hero-note>span{display:grid;place-items:center;flex:none;color:#69aa46}
.live-page .live-hero-note>span svg{width:17px;height:17px}
.live-page .live-hero-note p{flex:1;min-width:0;margin:0;font-size:.82rem;line-height:1.75}
.live-page .live-hero-note small{flex:none;color:#83a078;font-size:.65rem;letter-spacing:.08em;direction:ltr;unicode-bidi:isolate}
.live-page .live-section-heading{display:flex;align-items:end;justify-content:space-between;gap:14px 30px;margin:43px 0 21px;min-width:0}
.live-page .live-section-heading>div{min-width:0}
.live-page .live-section-heading h2{font-size:clamp(1.35rem,2vw,1.8rem);font-weight:700;line-height:1.45;letter-spacing:-.035em;margin:0 0 5px}
.live-page .live-section-heading p{color:var(--muted);font-size:.83rem;line-height:1.75;margin:0}
.live-page .live-section-heading small{display:block;color:var(--live-accent);font-size:.74rem;font-weight:700;line-height:1.7;white-space:normal;margin-bottom:8px}
.live-page .live-section-heading>span{color:#90a08a;font-size:.75rem;line-height:1.6}
.live-page .live-templates{gap:14px;margin-bottom:46px}
.live-page .live-template{min-height:262px;padding:27px;border-color:var(--live-line);border-radius:15px;box-shadow:0 2px 5px #10200003}
.live-page .live-template-head{display:flex;flex-direction:row-reverse;align-items:flex-start;justify-content:space-between;gap:12px;min-height:38px}
.live-page .live-template .live-index{align-self:auto;color:#aebfa9;font-size:.72rem;letter-spacing:.07em;font-weight:700}
.live-page .live-template-icon{display:grid;place-items:center;flex:none;width:38px;height:38px;background:var(--live-soft);border:1px solid #e4efde;border-radius:10px;color:var(--live-accent)}
.live-page .live-template-icon svg{width:19px;height:19px}
.live-page .live-template h3{font-size:1.2rem;font-weight:700;line-height:1.45;letter-spacing:-.02em;margin:20px 0 7px}
.live-page .live-template p{font-size:.82rem;color:#859080;line-height:1.8;margin:0 0 25px}
.live-page .live-template .text-link{display:flex;align-items:center;justify-content:flex-start;width:100%;min-height:46px;margin-top:auto;padding:14px 0 0;border-top:1px solid #edf0e9;color:var(--live-accent);font-size:.83rem;text-decoration:none}
.live-page .live-template .text-link:hover{text-decoration:underline;text-underline-offset:3px}
.live-page .live-template-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;margin-top:auto;padding-top:13px;border-top:1px solid #edf0e9}
.live-page .live-template-footer .text-link{width:auto;min-height:28px;margin:0;padding:0;border:0;flex:none}
.live-page .live-template-footer small{font-size:.71rem;color:#a3b0a0;text-align:end;line-height:1.5}
.live-page>.panel{border-color:var(--live-line);border-radius:15px;box-shadow:none}
.live-page>.panel .panel-head h2{font-size:1.27rem;line-height:1.5}
.live-page .live-tools{gap:12px 18px}
.live-page .live-filter button.active{background:#edf6e9;border-color:#e6efdf;color:#3e752e}
.live-page .live-row-check{display:inline-flex;align-items:center;justify-content:center;flex:none}
.live-page .live-row-check input,.live-page .live-bulk-bar input{width:18px;height:18px;margin:0;accent-color:var(--live-accent)}
.live-page .live-bulk-bar{display:flex;align-items:center;gap:11px 16px;flex-wrap:wrap;padding:14px 20px;background:#f9fcf7;border-block:1px solid var(--live-line);font-size:.8rem}
.live-page .live-bulk-bar label{display:inline-flex;align-items:center;gap:9px;line-height:1.5;cursor:pointer;font-weight:600}
.live-page .live-bulk-bar>span{color:var(--muted);margin-inline-end:auto}
.live-page .live-bulk-bar .btn{min-height:36px;padding:6px 12px;font-size:.78rem}
.live-page .live-bulk-result{margin:0;padding:12px 20px;background:#f2f8ed;color:#3a7129;font-size:.8rem;line-height:1.7;white-space:pre-line}
.live-dialog .live-delete-warning{padding:20px;border:1px solid #e9c5be;border-radius:11px;background:#fff7f5;line-height:1.7}
.live-dialog .live-delete-warning strong{font-size:1rem;color:#8c352c}
.live-dialog .live-delete-warning p{font-size:.85rem;margin:8px 0 0;color:#754a45}
.live-dialog .live-import-summary,.live-dialog .live-import-report{margin:12px 0;padding:12px 15px;border:1px solid #d8e9cf;border-radius:9px;background:#f7fbf4;font-size:.82rem;line-height:1.7}
.live-dialog .live-import-report{white-space:pre-wrap}
.live-dialog .live-batch-progress:empty{display:none}
.live-dialog .live-batch-progress{margin:12px 0;color:#437e2d;font-size:.8rem}
.live-dialog .live-import-row>small.live-error{color:#a34536}
html[dir=rtl] .live-page :is(.live-hero h1,.live-section-heading h2,.live-template h3){letter-spacing:normal}
html[data-theme=dark] .live-page{--live-accent:#a2d37c;--live-line:#303b30;--live-soft:#293628}
html[data-theme=dark] .live-page .live-hero h1 span{color:#a2d37c}
html[data-theme=dark] .live-page .live-hero-actions .btn:not(.secondary){background:#c2f970;border-color:#c2f970;color:#172015}
html[data-theme=dark] .live-page .live-hero-actions .btn:not(.secondary):hover:not(:disabled){background:#aee266;border-color:#aee266;color:#172015}
html[data-theme=dark] .live-page .live-hero-actions .btn.secondary{background:#202024;border-color:#3a4438;color:#fafafa}
html[data-theme=dark] .live-page .live-hero-note{background:#253022;border-color:#3c5135;color:#d8e9d1}
html[data-theme=dark] .live-page .live-template{border-color:var(--live-line);box-shadow:none}
html[data-theme=dark] .live-page .live-template p{color:#a1a9a0}
html[data-theme=dark] .live-page .live-template .text-link{border-top-color:#303b30;color:#a2d37c}
html[data-theme=dark] .live-page .live-template-footer{border-top-color:#303b30}
html[data-theme=dark] .live-page .live-template-icon{border-color:#3a5135}
html[data-theme=dark] .live-page .live-filter button.active,html[data-theme=dark] .live-page .live-bulk-bar,html[data-theme=dark] .live-page .live-bulk-result{background:#253022;border-color:#3c5135;color:#e3f4d8}
html[data-theme=dark] .live-dialog .live-delete-warning{background:#33231f;border-color:#81534c;color:#f8e1dc}
html[data-theme=dark] .live-dialog .live-delete-warning :is(strong,p){color:#f8e1dc}
html[data-theme=dark] .live-dialog :is(.live-import-summary,.live-import-report){background:#253022;border-color:#3c5135;color:#e3f4d8}
@media(max-width:960px){.live-page .live-hero{align-items:flex-start;flex-direction:column}.live-page .live-hero-actions{order:2}}
@media(max-width:760px){.live-page .live-hero{margin:0 0 23px;gap:21px}.live-page .live-hero h1{font-size:clamp(1.9rem,7vw,2.5rem);line-height:1.35}.live-page .live-hero-copy>p{font-size:.86rem}.live-page .live-hero-actions{width:100%}.live-page .live-hero-actions .btn{flex:1 1 auto}.live-page .live-hero-note{align-items:flex-start;flex-wrap:wrap}.live-page .live-hero-note small{margin-inline-start:auto}.live-page .live-section-heading{align-items:flex-start;flex-direction:column;margin:30px 0 15px}.live-page .live-template{min-height:225px;padding:21px}.live-page .live-template h3{margin-top:13px}.live-page .live-templates{margin-bottom:32px}.live-page .live-bulk-bar{padding:12px 16px}.live-page .live-bulk-bar>span{margin-inline-end:0}.live-page .live-bulk-bar .btn{flex:1 1 42%}}
