/* Isolation only; the native SolvCRM CSS remains the styling authority.
   No replacement typography, card, button or table design is introduced here. */
#brandstudio-demo-strip{position:relative;z-index:10003;background:#29332a;color:#fff;padding:7px 15px;text-align:center;font-size:12px;line-height:1.45}
#brandstudio-demo-strip strong{color:#d8f18d}
#brandstudio-demo-strip button{margin-left:15px;border:1px solid rgba(255,255,255,.55);border-radius:4px;background:transparent;color:#fff;padding:3px 9px}
.solv-brandstudio-isolated .sidebar{top:var(--bs-demo-top,36px)!important}
.solv-brandstudio-isolated .page-container{padding-top:var(--bs-demo-top,36px)}
.solv-brandstudio-isolated .navbar-custom{top:var(--bs-demo-top,36px)!important}
.solv-brandstudio-isolated .bs-portal-view{padding:24px;min-height:100vh;background:#f7f8fa}
.solv-brandstudio-isolated .bs-portal-view .portal-content{max-width:1200px;margin:0 auto}
.solv-brandstudio-isolated .bs-notice{font-size:12px;opacity:.8}
.solv-brandstudio-isolated .bs-action{cursor:pointer}
.solv-brandstudio-isolated .bs-modal-overlay{position:fixed;z-index:10020;inset:0;background:rgba(5,16,25,.48);display:flex;align-items:center;justify-content:center;padding:15px}
.solv-brandstudio-isolated .bs-modal-overlay .modal-dialog{width:100%;max-width:660px;max-height:calc(100vh - 45px);margin:0}
.solv-brandstudio-isolated .bs-modal-overlay .modal-content{max-height:calc(100vh - 45px);display:flex;flex-direction:column}
.solv-brandstudio-isolated .bs-modal-overlay .modal-body{overflow:auto;min-height:0}
.solv-brandstudio-isolated .bs-modal-overlay .modal-dialog.bs-large{max-width:920px}
.solv-brandstudio-isolated .bs-action-btns{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.solv-brandstudio-isolated .bs-table-toolbar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px 18px;flex-wrap:wrap}
.solv-brandstudio-isolated .bs-table-toolbar input{max-width:260px}
.solv-brandstudio-isolated .bs-quote-total{margin-left:auto;max-width:280px}
.solv-brandstudio-isolated .bs-quote-total .item{display:flex;justify-content:space-between;padding:6px 0}
.solv-brandstudio-isolated .bs-quote-total .item:last-child{border-top:1px solid #ddd;font-weight:bold}
.solv-brandstudio-isolated .bs-quote-items input{width:100%;min-width:0}
.solv-brandstudio-isolated .bs-branding-preview{display:flex;gap:10px;align-items:center}
.solv-brandstudio-isolated .bs-branding-preview img{object-fit:contain;max-width:110px;max-height:50px}
.solv-brandstudio-isolated .bs-color-choice{width:32px;height:32px;border-radius:50%;border:2px solid #ddd;display:inline-block;margin-right:9px;cursor:pointer}
.solv-brandstudio-isolated .bs-demo-logo{max-width:142px;max-height:44px;object-fit:contain}
.solv-brandstudio-isolated .bs-empty{padding:28px;text-align:center;color:#6d7379}
.solv-brandstudio-isolated .bs-metric-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}
.solv-brandstudio-isolated .bs-metric-row .card{padding:18px}
.solv-brandstudio-isolated .bs-metric{font-size:25px;font-weight:700}
.solv-brandstudio-isolated .bs-nav-tabs li a{cursor:pointer}
.solv-brandstudio-isolated .bs-menu-toggle{display:none}
.solv-brandstudio-isolated .bs-form-pad{padding:12px}
.solv-brandstudio-isolated .bs-progress{display:flex;gap:8px;flex-wrap:wrap}
.solv-brandstudio-isolated .bs-progress span{padding:7px 12px;background:#eef1e6;border-radius:6px;font-size:12px}
.solv-brandstudio-isolated .bs-hidden{display:none!important}
@media(max-width:991px){.solv-brandstudio-isolated .bs-metric-row{grid-template-columns:repeat(2,minmax(0,1fr))}.solv-brandstudio-isolated .bs-menu-toggle{display:block}}
@media(max-width:575px){.solv-brandstudio-isolated .bs-metric-row{grid-template-columns:1fr}.solv-brandstudio-isolated .page-wrapper{padding:12px}.solv-brandstudio-isolated .bs-table-toolbar{align-items:stretch}.solv-brandstudio-isolated .bs-table-toolbar input{max-width:100%}.solv-brandstudio-isolated .bs-modal-overlay{padding:8px}.solv-brandstudio-isolated .bs-modal-overlay .modal-dialog{max-height:calc(100vh - 16px)}.solv-brandstudio-isolated .bs-modal-overlay .modal-content{max-height:calc(100vh - 16px)}}
@media(max-width:800px){
  .solv-brandstudio-isolated .navbar-custom .container-fluid{flex-wrap:wrap;min-width:0}
  .solv-brandstudio-isolated .navbar-custom .navbar-nav{min-width:0;max-width:100%;flex-wrap:wrap;justify-content:flex-start}
  .solv-brandstudio-isolated .navbar-custom .navbar-nav .btn{max-width:100%;white-space:normal}
  .solv-brandstudio-isolated .page-container,.solv-brandstudio-isolated .main-scrollable-page{min-width:0;max-width:100%}
  .solv-brandstudio-isolated .table-responsive{overflow-x:auto;max-width:100%}
  .solv-brandstudio-isolated .sidebar.open{box-shadow:0 4px 30px rgba(0,0,0,.28)}
}
/* Demo indicator floats over the native UI instead of changing the app layout. */
.solv-brandstudio-isolated #brandstudio-demo-strip{
 position:fixed;z-index:12000;bottom:14px;left:14px;top:auto;
 background:#29332a;color:#fff;border-radius:7px;
 padding:8px 12px;max-width:390px;font-size:11px;
 box-shadow:0 6px 20px rgba(0,0,0,.2);line-height:1.45;
}
.solv-brandstudio-isolated .sidebar{top:0!important}
.solv-brandstudio-isolated .navbar-custom{top:0!important}
.solv-brandstudio-isolated .page-container{padding-top:0}
@media(max-width:575px){.solv-brandstudio-isolated #brandstudio-demo-strip{max-width:calc(100vw - 28px);bottom:8px;left:8px;right:8px;padding:6px 9px}}
/* Responsive containment for the native-pattern quotation two-column view.
   It does not replace SolvCRM+ typography, buttons, cards or tables. */
.solv-brandstudio-isolated #page-content > .row{flex-wrap:wrap;gap:0;min-width:0}
.solv-brandstudio-isolated #page-content > .row > [class*="col-md-"]{min-width:0}
.solv-brandstudio-isolated #page-content .tab-content,.solv-brandstudio-isolated #page-content .tab-pane{min-width:0;max-width:100%}
@media(max-width:991px){
 .solv-brandstudio-isolated #page-content > .row > .col-md-9,
 .solv-brandstudio-isolated #page-content > .row > .col-md-3{flex:1 1 100%;width:100%;max-width:100%}
 .solv-brandstudio-isolated #page-content .row > [class*="col-md-"]{min-width:0;max-width:100%}
}
/* Preserve horizontal scrolling INSIDE native table containers, never on the page. */
.solv-brandstudio-isolated #page-content{overflow-x:clip}

/* V5.1 functional extension: follow the synchronized native SolvCRM+ typography,
   controls and cards. These styles are scoped to demo-only content and document preview. */
.solv-brandstudio-isolated .bs-demo-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.solv-brandstudio-isolated .bs-demo-steps>div{min-width:0;padding:16px;border:1px solid #e3e7eb;border-radius:7px;background:#fbfcfd}
.solv-brandstudio-isolated .bs-demo-steps strong{display:block;font-size:14px;margin-bottom:6px}
.solv-brandstudio-isolated .bs-demo-steps p{font-size:13px;line-height:1.6;min-height:42px}
.solv-brandstudio-isolated .bs-demo-steps .btn{margin-right:5px;margin-top:5px;white-space:normal}
.solv-brandstudio-isolated .bs-lead-context{display:flex;flex-wrap:wrap;gap:12px;padding:14px 18px;background:#fff;border:1px solid #e7ecee;border-bottom:0;color:#66747a;font-size:13px}
.solv-brandstudio-isolated .bs-lead-context span{display:inline-flex;align-items:center;gap:5px}
.solv-brandstudio-isolated .bs-lead-status{font-size:12px;vertical-align:middle;margin-left:6px}
.solv-brandstudio-isolated .bs-tag{margin:2px 3px 2px 0;font-weight:500;background:#f1f6de;color:#445a1d}
.solv-brandstudio-isolated .bs-lead-info .table th{min-width:135px;width:36%;font-weight:600}
.solv-brandstudio-isolated .bs-lead-summary{padding:18px;border:1px solid #e1e7eb;border-radius:7px;background:#fafbfd;min-width:0}
.solv-brandstudio-isolated .bs-lead-summary p{display:flex;align-items:center;gap:8px}
.solv-brandstudio-isolated .bs-lead-summary .btn{margin:4px 0}
.solv-brandstudio-isolated .bs-mini-note{font-size:12px;line-height:1.6;color:#717b84;padding:9px 12px;margin:0}
.solv-brandstudio-isolated .bs-modal-gap{height:12px}
.solv-brandstudio-isolated .bs-sample-checkbox{font-weight:400;display:flex;align-items:center;gap:10px;line-height:1.5}
.solv-brandstudio-isolated .bs-quote-top{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:14px;margin-bottom:16px}
.solv-brandstudio-isolated .bs-quote-top h4{margin:0 0 8px;overflow-wrap:anywhere}
.solv-brandstudio-isolated .bs-quote-top p{margin:0;color:#70808a;font-size:13px}
.solv-brandstudio-isolated .bs-quote-items{max-width:100%;min-width:0}
.solv-brandstudio-isolated .bs-quote-items .table-responsive{max-width:100%;overflow-x:auto}
.solv-brandstudio-isolated .bs-quote-table-footer{display:flex;gap:18px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;margin-top:16px}
.solv-brandstudio-isolated .bs-quote-side-actions{display:grid;gap:8px}
.solv-brandstudio-isolated .bs-quote-total{width:300px;max-width:100%}
.solv-brandstudio-isolated .bs-quote-total .item{display:flex;justify-content:space-between;gap:10px;padding:6px 0}
.solv-brandstudio-isolated .bs-quote-total .item:last-child{border-top:1px solid #dee4e8;font-weight:700;margin-top:5px;padding-top:12px}
.solv-brandstudio-isolated .bs-editor-info{padding:12px 0}
.solv-brandstudio-isolated .bs-editor-info .table th{min-width:130px;width:32%}
.solv-brandstudio-isolated .bs-editor-info .btn{margin:0 8px 8px 0}
/* Preview represents a paper document, not a replacement for native proposal controls. */
.solv-brandstudio-isolated .bs-proposal-document{width:100%;max-width:820px;margin:12px auto 20px;padding:36px 40px;background:#fff;border:1px solid #d8dee2;box-shadow:0 4px 15px rgba(0,0,0,.06);overflow-wrap:anywhere;color:#283138;font-size:13px;line-height:1.55}
.solv-brandstudio-isolated .bs-proposal-document .bs-doc-demo{background:#f1f6df;color:#4d6025;text-align:center;font-size:10px;font-weight:700;letter-spacing:.7px;padding:7px 9px;margin:-36px -40px 30px}
.solv-brandstudio-isolated .bs-doc-header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding:8px 0 32px;border-bottom:3px solid var(--bs-accent,#afcb37)}
.solv-brandstudio-isolated .bs-doc-from{max-width:65%}
.solv-brandstudio-isolated .bs-doc-from strong{font-size:22px;line-height:1.25}
.solv-brandstudio-isolated .bs-doc-from-sub{margin-top:9px;color:#667780;font-size:11px}
.solv-brandstudio-isolated .bs-doc-header-right{text-align:right;display:grid;gap:5px}
.solv-brandstudio-isolated .bs-doc-header-right>span{font-size:25px;font-weight:700;letter-spacing:2px}
.solv-brandstudio-isolated .bs-doc-header-right>small{color:#62727e}
.solv-brandstudio-isolated .bs-doc-parties{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin:30px 0}
.solv-brandstudio-isolated .bs-doc-parties>div{min-width:0}
.solv-brandstudio-isolated .bs-doc-parties strong{display:block;margin:5px 0 8px}
.solv-brandstudio-isolated .bs-doc-parties p{color:#596972;font-size:12px;white-space:pre-line}
.solv-brandstudio-isolated .bs-doc-label{font-size:10px;letter-spacing:1.2px;color:#6e7d85}
.solv-brandstudio-isolated .bs-doc-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:12px 16px;background:#f6f8f9;border:1px solid #edf0f2;border-radius:5px}
.solv-brandstudio-isolated .bs-doc-meta>div{display:grid;gap:5px;min-width:0}
.solv-brandstudio-isolated .bs-doc-meta span{color:#74808a;font-size:10px}
.solv-brandstudio-isolated .bs-doc-intro{margin-top:30px;margin-bottom:22px}
.solv-brandstudio-isolated .bs-doc-intro h2{font-size:19px;margin-bottom:9px;color:#283138}
.solv-brandstudio-isolated .bs-doc-intro p{white-space:pre-line}
.solv-brandstudio-isolated .bs-doc-line-wrap{max-width:100%;overflow-x:auto}
.solv-brandstudio-isolated .bs-doc-lines{width:100%;border-collapse:collapse;margin-bottom:0;min-width:430px}
.solv-brandstudio-isolated .bs-doc-lines th{padding:11px 9px;background:#f4f7f8;border-bottom:1px solid #dbe2e6}
.solv-brandstudio-isolated .bs-doc-lines td{padding:13px 9px;border-bottom:1px solid #e7ecef;vertical-align:top}
.solv-brandstudio-isolated .bs-numeric{text-align:right;white-space:nowrap}
.solv-brandstudio-isolated .bs-doc-summary{width:320px;max-width:100%;margin:24px 0 30px auto}
.solv-brandstudio-isolated .bs-doc-summary>div{display:flex;justify-content:space-between;gap:14px;padding:8px 0}
.solv-brandstudio-isolated .bs-doc-summary .bs-doc-grand{font-size:15px;border-top:2px solid var(--bs-accent,#afcb37);padding-top:14px;font-weight:700}
.solv-brandstudio-isolated .bs-doc-terms{margin-top:28px;border-top:1px solid #e6ebed;padding-top:16px;min-height:66px}
.solv-brandstudio-isolated .bs-doc-terms h3{font-size:14px;margin:0 0 8px}
.solv-brandstudio-isolated .bs-doc-terms p{font-size:12px;color:#67767f;white-space:pre-line}
.solv-brandstudio-isolated .bs-doc-footer{margin-top:28px;padding-top:12px;border-top:1px solid #e2e7ea;font-size:10px;text-align:center;color:#7c878d}
@media(max-width:1000px){.solv-brandstudio-isolated .bs-demo-steps{grid-template-columns:1fr}.solv-brandstudio-isolated .bs-demo-steps p{min-height:0}}
@media(max-width:600px){.solv-brandstudio-isolated .bs-proposal-document{padding:20px 16px}.solv-brandstudio-isolated .bs-proposal-document .bs-doc-demo{margin:-20px -16px 22px}.solv-brandstudio-isolated .bs-doc-header{flex-wrap:wrap}.solv-brandstudio-isolated .bs-doc-parties{grid-template-columns:1fr;gap:16px;margin:24px 0}.solv-brandstudio-isolated .bs-doc-meta{grid-template-columns:1fr}.solv-brandstudio-isolated .bs-doc-header-right{text-align:left}.solv-brandstudio-isolated .bs-quote-detail>.col-md-3{padding-top:8px}.solv-brandstudio-isolated .bs-lead-info .table th{min-width:105px}}
/* Keep the public-demo disclaimer visible without covering the quotation page. */
@media(min-width:768px){
 .solv-brandstudio-isolated #brandstudio-demo-strip{width:215px;max-width:215px;left:10px;right:auto;bottom:12px;font-size:10px;padding:8px}
 .solv-brandstudio-isolated #brandstudio-demo-strip .btn{margin:3px 0 0 3px}
}
@media(max-width:767px){
 .solv-brandstudio-isolated #brandstudio-demo-strip{position:relative;top:auto;bottom:auto;left:auto;right:auto;width:100%;max-width:none;border-radius:0;box-shadow:none;padding:7px 10px;text-align:center}
}

/* Customer preview uses the original sample offer display, never internal editor actions. */
.solv-brandstudio-isolated .bs-modal-overlay .bs-large .bs-proposal-document{padding:22px;box-shadow:none;border:1px solid #dee3e6;max-width:100%;margin:0 auto;}
.solv-brandstudio-isolated .bs-modal-overlay .bs-large .bs-proposal-document .bs-doc-line-wrap{overflow-x:auto;}

.solv-brandstudio-isolated .bs-portal-feedback{position:fixed;right:15px;bottom:15px;z-index:10050;max-width:min(400px,calc(100vw - 30px));}
