/* Centiva 2.27.1 - Global responsive hardening. No viewport scaling. */
:root{
  --ctv-r-gutter:clamp(8px,1.1vw,16px);
  --ctv-r-control-h:34px;
  --ctv-r-modal-gap:clamp(6px,1.2vw,18px);
}
html,body{max-width:100%;}
img,svg,video,canvas,iframe{max-width:100%;}
.ctv-app-shell,.ctv-client-shell,.ctv-public-shell{min-width:0;max-width:100%;}
@supports(height:100dvh){
  .ctv-app-shell{height:100dvh!important;max-height:100dvh!important;}
  .ctv-modal-layer,.ctv-client-modal-layer{height:100dvh;max-height:100dvh;}
}
.ctv-main,.ctv-workspace,.ctv-module-workspace,.ctv-module-view,.ctv-client-main,.ctv-client-content{min-width:0;min-height:0;}
.ctv-workspace,.ctv-client-content{overflow:auto;overscroll-behavior:contain;}
.ctv-table-wrap,.ctv-real-table-wrap,.table-responsive{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch;}
.ctv-table,.ctv-real-table{max-width:100%;}
.ctv-operation-bar,.ctv-global-tabs,.ctv-module-tabs,.ctv-client-tabs,.ctv-client-nav{min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin;}
.ctv-operation-bar>* , .ctv-global-tabs>* , .ctv-module-tabs>* , .ctv-client-tabs>*{flex:0 0 auto;}

/* All modal families stay inside the actual visual viewport. */
.ctv-modal-layer,.ctv-client-modal-layer{
  box-sizing:border-box!important;
  padding:var(--ctv-r-modal-gap)!important;
  overflow:hidden!important;
  align-items:center;
  justify-content:center;
}
.ctv-modal,.ctv-modal-card,.ctv-client-modal-card,.ctv-dialog,.ctv-uikit-modal-card{
  box-sizing:border-box!important;
  width:min(var(--ctv-modal-width,980px),calc(100vw - (var(--ctv-r-modal-gap) * 2)))!important;
  max-width:calc(100vw - (var(--ctv-r-modal-gap) * 2))!important;
  max-height:calc(100vh - (var(--ctv-r-modal-gap) * 2))!important;
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  overflow:hidden!important;
}
@supports(height:100dvh){
  .ctv-modal,.ctv-modal-card,.ctv-client-modal-card,.ctv-dialog,.ctv-uikit-modal-card{max-height:calc(100dvh - (var(--ctv-r-modal-gap) * 2))!important;}
}
#ctvModalContent,.ctv-modal-content,.ctv-modal-body,.ctv-client-modal-body,.ctv-dialog-body{
  min-width:0!important;min-height:0!important;overflow:auto!important;overscroll-behavior:contain;
}
.ctv-modal-header,.ctv-client-modal-header,.ctv-dialog-header{flex:0 0 auto;}
.ctv-modal-actions,.ctv-modal-footer,.ctv-client-modal-actions,.ctv-client-modal-footer,.ctv-dialog-footer{
  flex:0 0 auto;position:sticky;bottom:0;z-index:3;
}
.ctv-real-form,.ctv-form-grid,.ctv-client-form-grid{
  grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr))!important;
  min-width:0;
}
.ctv-field,.ctv-form-field,.ctv-client-field{min-width:0;}
.ctv-field input,.ctv-field select,.ctv-field textarea,.ctv-form-field input,.ctv-form-field select,.ctv-form-field textarea,.ctv-client-field input,.ctv-client-field select,.ctv-client-field textarea{max-width:100%;min-width:0;}
.select2-container{max-width:100%!important;min-width:0!important;}
.select2-dropdown{max-width:calc(100vw - 16px);}

/* Laptop / 17-inch class: keep the desktop language, reduce only density. */
@media (max-width:1600px),(max-height:900px){
  :root{--ctv-r-control-h:32px;--ctv-r-gutter:10px;}
  .ctv-workspace{padding:10px!important;}
  .ctv-card,.ctv-panel,.ctv-module-card,.ctv-client-card{padding:10px!important;}
  .ctv-top-header,.ctv-header{min-height:46px!important;}
  .ctv-main-menu,.ctv-top-menu{gap:2px!important;}
  .ctv-main-menu a,.ctv-main-menu button,.ctv-top-menu a,.ctv-top-menu button{padding-block:6px!important;padding-inline:8px!important;}
  .ctv-operation-bar{min-height:38px!important;padding-block:4px!important;gap:4px!important;}
  .ctv-global-tabs,.ctv-module-tabs{min-height:34px!important;}
  .ctv-real-form,.ctv-form-grid{gap:8px 10px!important;}
  .ctv-field label,.ctv-form-field label{margin-bottom:4px!important;}
  .ctv-field input,.ctv-field select,.ctv-form-field input,.ctv-form-field select,.ctv-btn,.ctv-button{min-height:var(--ctv-r-control-h)!important;}
  .ctv-modal-header,.ctv-modal-body,.ctv-modal-content,.ctv-modal-actions,.ctv-modal-footer{padding:10px 12px!important;}
}

@media (max-width:1366px){
  .ctv-brand,.ctv-client-brand{min-width:0!important;}
  .ctv-header-inner,.ctv-top-header-inner{gap:6px!important;}
  .ctv-main-menu,.ctv-top-menu{overflow-x:auto;white-space:nowrap;scrollbar-width:thin;}
  .ctv-toolbar,.ctv-filter-bar,.ctv-module-toolbar,.ctv-client-toolbar{flex-wrap:wrap!important;gap:6px!important;}
  .ctv-summary-grid,.ctv-kpi-grid,.ctv-dashboard-grid,.ctv-client-grid{grid-template-columns:repeat(auto-fit,minmax(min(190px,100%),1fr))!important;}
  .ctv-modal,.ctv-modal-card,.ctv-client-modal-card{--ctv-modal-width:920px;}
}

@media (max-width:1100px){
  .ctv-header-inner,.ctv-top-header-inner{flex-wrap:wrap!important;}
  .ctv-main-menu,.ctv-top-menu{order:3;width:100%;}
  .ctv-operation-bar{white-space:nowrap;}
  .ctv-two-col,.ctv-layout-2,.ctv-detail-grid,.ctv-client-two-col{grid-template-columns:1fr!important;}
  .ctv-real-form,.ctv-form-grid,.ctv-client-form-grid{grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr))!important;}
}

@media (max-width:760px){
  :root{--ctv-r-modal-gap:5px;--ctv-r-gutter:7px;}
  .ctv-workspace,.ctv-client-content{padding:7px!important;}
  .ctv-modal,.ctv-modal-card,.ctv-client-modal-card,.ctv-dialog,.ctv-uikit-modal-card{width:calc(100vw - 10px)!important;max-width:calc(100vw - 10px)!important;border-radius:10px!important;}
  .ctv-real-form,.ctv-form-grid,.ctv-client-form-grid{grid-template-columns:1fr!important;}
  .ctv-modal-actions,.ctv-modal-footer,.ctv-client-modal-actions,.ctv-client-modal-footer{display:flex!important;flex-wrap:wrap!important;gap:6px!important;}
  .ctv-modal-actions .ctv-btn,.ctv-modal-footer .ctv-btn,.ctv-client-modal-actions .ctv-btn{flex:1 1 140px;}
  .ctv-page-title,.ctv-module-title,.ctv-client-title{font-size:clamp(16px,5vw,20px)!important;}
  .ctv-public-shell{width:calc(100% - 14px)!important;margin-inline:auto!important;}
  .ctv-public-row,.ctv-public-columns,.ctv-public-grid{grid-template-columns:1fr!important;flex-wrap:wrap!important;}
}

@media (max-height:700px) and (min-width:761px){
  :root{--ctv-r-modal-gap:5px;}
  .ctv-modal-header,.ctv-modal-body,.ctv-modal-content,.ctv-modal-actions,.ctv-modal-footer{padding-block:7px!important;}
  .ctv-workspace{padding-block:7px!important;}
}

/* Public portal: fluid containers without changing visual tokens. */
.ctv-public-shell,.ctv-public-container{width:min(var(--ctv-public-max,1280px),calc(100% - (var(--ctv-r-gutter) * 2)));margin-inline:auto;}
.ctv-public-grid{min-width:0;}
.ctv-public-content,.ctv-public-section{min-width:0;overflow-wrap:anywhere;}

/* Commercial flow wizard - uses only Centiva visual tokens. */
.ctv-commercial-wizard{min-width:0;}
.ctv-commercial-items-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:10px 0 6px;padding:8px 10px;border:1px solid var(--ctv-border,#d9e1ec);border-radius:10px;background:var(--ctv-surface-soft,#f8fafc)}
.ctv-commercial-items-head>div{display:flex;flex-direction:column;gap:2px}.ctv-commercial-items-head small{color:var(--ctv-muted,#64748b)}
.ctv-commercial-items{display:grid;gap:7px;min-width:0}.ctv-commercial-item{display:grid;grid-template-columns:minmax(220px,2fr) repeat(4,minmax(95px,.7fr)) auto;gap:7px;align-items:end;padding:8px;border:1px solid var(--ctv-border,#d9e1ec);border-radius:10px;min-width:0}.ctv-commercial-item .ctv-field{min-width:0}.ctv-commercial-summary{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;margin-top:10px;padding:9px 11px;border:1px solid var(--ctv-border,#d9e1ec);border-radius:10px;background:var(--ctv-surface-soft,#f8fafc)}.ctv-commercial-summary span{display:inline-flex;gap:5px;align-items:center}.ctv-commercial-total{margin-inline-start:auto;font-size:1.04em}.ctv-commercial-total strong{font-size:1.08em}
@media(max-width:1200px){.ctv-commercial-item{grid-template-columns:minmax(200px,2fr) repeat(2,minmax(110px,1fr))}.ctv-commercial-item>[data-commercial-remove-item]{align-self:center;justify-self:end}}
@media(max-width:760px){.ctv-commercial-items-head{align-items:stretch;flex-direction:column}.ctv-commercial-item{grid-template-columns:1fr 1fr}.ctv-commercial-item .ctv-field-grow{grid-column:1/-1}.ctv-commercial-item>[data-commercial-remove-item]{grid-column:2;justify-self:end}.ctv-commercial-summary{align-items:stretch;flex-direction:column}.ctv-commercial-total{margin-inline-start:0}}

/* 2.27.2 — viewport-height and native responsive layer. This intentionally does not use CSS zoom/scale. */
.ctv-real-table-wrap,.ctv-table-wrap,.ctv-operational-tab-table>.ctv-real-table-wrap,.ctv-ui-scroll:has(>table){
  overflow:auto!important;
  max-height:min(68dvh,calc(100dvh - 230px));
  overscroll-behavior:contain;
  scrollbar-gutter:stable both-edges;
  -webkit-overflow-scrolling:touch;
}
.ctv-real-table thead th,.ctv-table thead th{
  position:sticky;top:0;z-index:4;
  background:var(--ctv-surface,#fff);
  box-shadow:0 1px 0 var(--ctv-border,#dfe6f0);
}
.ctv-modal .ctv-real-table-wrap,.ctv-modal-card .ctv-real-table-wrap,.ctv-client-modal-card .ctv-real-table-wrap{
  max-height:min(48dvh,430px);
}
@media (max-height:820px) and (min-width:761px){
  .ctv-real-table-wrap,.ctv-table-wrap,.ctv-operational-tab-table>.ctv-real-table-wrap,.ctv-ui-scroll:has(>table){max-height:calc(100dvh - 188px)}
  .ctv-modal .ctv-real-table-wrap,.ctv-modal-card .ctv-real-table-wrap,.ctv-client-modal-card .ctv-real-table-wrap{max-height:calc(100dvh - 250px)}
}
@media (max-height:680px) and (min-width:761px){
  .ctv-real-table-wrap,.ctv-table-wrap,.ctv-operational-tab-table>.ctv-real-table-wrap,.ctv-ui-scroll:has(>table){max-height:calc(100dvh - 158px)}
  .ctv-module-head,.ctv-clean-module-head{margin-block-end:6px!important}
  .ctv-sales-overview,.ctv-kpi-grid,.ctv-summary-grid{gap:6px!important}
}

/* Tablet: preserve desktop information architecture but use touch-safe two-column composition. */
@media (min-width:761px) and (max-width:1180px){
  :root{--ctv-r-gutter:9px;--ctv-r-control-h:38px}
  .ctv-workspace,.ctv-client-content{padding:9px!important}
  .ctv-summary-grid,.ctv-kpi-grid,.ctv-dashboard-grid,.ctv-client-stats-pro{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .ctv-real-form,.ctv-form-grid,.ctv-client-form-grid,.ctv-real-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .ctv-field-wide,.ctv-field-span-2{grid-column:1/-1!important}
  .ctv-modal,.ctv-modal-card,.ctv-client-modal-card,.ctv-dialog,.ctv-uikit-modal-card{
    width:min(94vw,980px)!important;max-width:94vw!important;max-height:92dvh!important;border-radius:18px!important;
  }
  .ctv-operation-bar,.ctv-module-tabs,.ctv-global-tabs{scroll-snap-type:x proximity}
  .ctv-operation-bar>*,.ctv-module-tabs>*,.ctv-global-tabs>*{scroll-snap-align:start}
  .ctv-client-grid-pro{grid-template-columns:1fr 1fr!important}
  .ctv-client-card-wide{grid-column:1/-1!important;grid-row:auto!important}
  .ctv-public-grid,.ctv-public-columns{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  button,.ctv-btn,.ctv-btn-primary,.ctv-btn-ghost,.ctv-icon-button,.ctv-row-action{min-height:40px;touch-action:manipulation}
}

/* Mobile: application-like shell with safe areas, fixed navigation and full-screen work surfaces. */
@media (max-width:760px){
  html{font-size:15px;-webkit-text-size-adjust:100%;text-size-adjust:100%;}
  body{min-height:100dvh;overflow-x:hidden;overscroll-behavior-y:none;}
  .ctv-app-shell,.ctv-client-shell,.ctv-client-shell-pro,.ctv-public-shell{width:100%!important;max-width:100%!important;min-height:100dvh!important;margin:0!important;}
  .ctv-workspace,.ctv-client-content,.ctv-client-view{padding:8px!important;padding-inline:max(8px,env(safe-area-inset-left)) max(8px,env(safe-area-inset-right))!important;}
  .ctv-main-menu,.ctv-top-menu,.ctv-module-tabs,.ctv-global-tabs,.ctv-operation-bar{scrollbar-width:none;scroll-snap-type:x proximity;}
  .ctv-main-menu::-webkit-scrollbar,.ctv-top-menu::-webkit-scrollbar,.ctv-module-tabs::-webkit-scrollbar,.ctv-global-tabs::-webkit-scrollbar,.ctv-operation-bar::-webkit-scrollbar{display:none}
  .ctv-module-tabs>*,.ctv-global-tabs>*,.ctv-operation-bar>*{scroll-snap-align:start}
  .ctv-real-form,.ctv-form-grid,.ctv-client-form-grid,.ctv-real-form-grid{grid-template-columns:1fr!important;gap:10px!important}
  .ctv-field,.ctv-form-field,.ctv-client-field,.ctv-field-wide,.ctv-field-span-2{grid-column:1!important}
  .ctv-field input,.ctv-field select,.ctv-field textarea,.ctv-form-field input,.ctv-form-field select,.ctv-client-field input,.ctv-client-field select{font-size:16px!important;min-height:44px!important}
  .ctv-field textarea,.ctv-form-field textarea,.ctv-client-field textarea{font-size:16px!important;min-height:92px!important}
  button,.ctv-btn,.ctv-button,.ctv-btn-primary,.ctv-btn-ghost,.ctv-icon-button,.ctv-row-action{min-height:44px;touch-action:manipulation}
  .ctv-row-action{min-width:40px!important;min-height:40px!important}
  .ctv-summary-grid,.ctv-kpi-grid,.ctv-dashboard-grid,.ctv-client-stats-pro{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  .ctv-card,.ctv-panel,.ctv-module-card,.ctv-client-card,.ctv-client-card-pro{border-radius:16px!important;padding:11px!important}
  .ctv-real-table-wrap,.ctv-table-wrap,.ctv-operational-tab-table>.ctv-real-table-wrap,.ctv-ui-scroll:has(>table){
    width:100%!important;max-width:100%!important;max-height:calc(100dvh - 205px)!important;border-radius:12px;overflow:auto!important;
  }
  .ctv-real-table,.ctv-table{min-width:max-content!important;font-size:12px!important}
  .ctv-real-table th,.ctv-real-table td,.ctv-table th,.ctv-table td{padding:8px 9px!important;white-space:nowrap}
  .ctv-real-table td .ctv-table-subtext{white-space:normal;max-width:220px}
  .ctv-modal-layer,.ctv-client-modal-layer{padding:0!important;align-items:stretch!important;justify-content:stretch!important;}
  .ctv-modal,.ctv-modal-card,.ctv-client-modal-card,.ctv-dialog,.ctv-uikit-modal-card{
    width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;border-radius:0!important;border:0!important;
  }
  .ctv-modal-header,.ctv-client-modal-header,.ctv-dialog-header{position:sticky;top:0;z-index:8;padding-top:max(10px,env(safe-area-inset-top))!important;background:var(--ctv-surface,#fff)}
  #ctvModalContent,.ctv-modal-content,.ctv-modal-body,.ctv-client-modal-body,.ctv-dialog-body{padding-bottom:calc(82px + env(safe-area-inset-bottom))!important}
  .ctv-modal-actions,.ctv-modal-footer,.ctv-client-modal-actions,.ctv-client-modal-footer,.ctv-dialog-footer{bottom:0!important;padding-bottom:max(10px,env(safe-area-inset-bottom))!important;background:var(--ctv-surface,#fff)!important;box-shadow:0 -8px 24px rgba(16,32,64,.08)}
  .ctv-operation-bar{position:sticky;bottom:0;z-index:35;background:color-mix(in srgb,var(--ctv-surface,#fff) 94%,transparent);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);padding-bottom:max(5px,env(safe-area-inset-bottom))!important}
  .ctv-client-shell-pro{padding:8px 8px calc(86px + env(safe-area-inset-bottom))!important}
  .ctv-client-top-pro{position:sticky!important;top:0!important;z-index:70!important;border-radius:0 0 16px 16px!important;margin-inline:-8px!important;padding-inline:max(10px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-right))!important}
  .ctv-client-nav-pro{position:fixed!important;right:0!important;left:0!important;bottom:0!important;height:calc(70px + env(safe-area-inset-bottom))!important;padding:6px max(6px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))!important;border-radius:18px 18px 0 0!important;border-inline:0!important;border-bottom:0!important;z-index:190!important;background:rgba(255,255,255,.97)!important;box-shadow:0 -12px 36px rgba(18,34,68,.15)!important;overflow-x:auto!important;}
  .ctv-client-nav-pro button{flex:1 0 62px!important;min-width:62px!important;height:54px!important;display:grid!important;place-items:center!important;align-content:center!important;gap:2px!important;font-size:9px!important;border-radius:12px!important}
  .ctv-client-hero-pro{grid-template-columns:1fr!important;min-height:0!important;padding:16px!important;border-radius:18px!important}
  .ctv-client-hero-copy h1{font-size:20px!important;line-height:1.65!important}
  .ctv-client-health-card{display:none!important}
  .ctv-client-grid-pro{grid-template-columns:1fr!important}
  .ctv-public-container,.ctv-public-shell{width:100%!important;padding-inline:max(10px,env(safe-area-inset-left)) max(10px,env(safe-area-inset-right))!important}
  .ctv-public-grid,.ctv-public-columns,.ctv-public-row{grid-template-columns:1fr!important}
}

@media (max-width:420px){
  .ctv-summary-grid,.ctv-kpi-grid,.ctv-dashboard-grid,.ctv-client-stats-pro{grid-template-columns:1fr 1fr!important}
  .ctv-kpi-card,.ctv-summary-card,.ctv-client-stats-pro>div{min-width:0!important;padding:9px!important}
  .ctv-client-stats-pro strong{font-size:20px!important}
}
.ctv-driver-config-panel{grid-column:1/-1;border:1px solid var(--ctv-border,#dfe8f4);background:var(--ctv-surface-soft,#f8fbff);border-radius:16px;padding:12px;min-width:0}
.ctv-driver-config-panel[hidden]{display:none!important}.ctv-driver-config-panel .ctv-real-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(210px,100%),1fr));gap:9px 11px}
@media(max-width:760px){.ctv-driver-config-panel{padding:10px;border-radius:13px}.ctv-driver-config-panel .ctv-real-form-grid{grid-template-columns:1fr!important}}

/* 2.27.2 table safety net: any UiKit table host becomes a bounded scroll surface,
   even when an older module forgot to emit the standard *-table-wrap element. */
.ctv-workspace :where(div,section,article):has(>table.ctv-real-table),
.ctv-workspace :where(div,section,article):has(>table.ctv-table),
.ctv-client-content :where(div,section,article):has(>table.ctv-real-table),
.ctv-client-content :where(div,section,article):has(>table.ctv-table),
.ctv-modal-content :where(div,section,article):has(>table.ctv-real-table),
.ctv-modal-content :where(div,section,article):has(>table.ctv-table){
  overflow:auto!important;
  max-width:100%!important;
  max-height:min(68vh,calc(100vh - 230px));
  max-height:min(68dvh,calc(100dvh - 230px));
  overscroll-behavior:contain;
  scrollbar-gutter:stable both-edges;
  -webkit-overflow-scrolling:touch;
}
@media(max-width:760px){
  .ctv-workspace :where(div,section,article):has(>table.ctv-real-table),
  .ctv-workspace :where(div,section,article):has(>table.ctv-table),
  .ctv-client-content :where(div,section,article):has(>table.ctv-real-table),
  .ctv-client-content :where(div,section,article):has(>table.ctv-table),
  .ctv-modal-content :where(div,section,article):has(>table.ctv-real-table),
  .ctv-modal-content :where(div,section,article):has(>table.ctv-table){max-height:calc(100dvh - 205px)!important;}
}

/* Centiva 2.28.0 — modal engine, staged wizards and native mobile shell. */
.ctv-step-wizard{display:flex;flex-direction:column;min-width:0;min-height:0;height:100%}.ctv-stepper{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:8px 0 12px;position:relative}.ctv-stepper-item{min-width:0;display:flex;align-items:center;gap:7px;color:#7b879b;font-size:11px}.ctv-stepper-item:after{content:"";height:2px;background:#e6ebf3;flex:1;min-width:8px;border-radius:4px}.ctv-stepper-item:last-child:after{display:none}.ctv-stepper-item i{width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:#eef2f7;border:1px solid #e0e6ef;font-style:normal;font-weight:800;flex:0 0 auto}.ctv-stepper-item.is-active{color:#1f56d8}.ctv-stepper-item.is-active i{background:#1f56d8;color:#fff;border-color:#1f56d8;box-shadow:0 7px 18px rgba(31,86,216,.2)}.ctv-stepper-item.is-done i{background:#e9f8f2;color:#13875f;border-color:#c7ecdf}.ctv-wizard-step{display:none;min-width:0;min-height:0}.ctv-wizard-step.is-active{display:block;animation:ctvWizardIn .18s ease both}.ctv-wizard-help,.ctv-wizard-note{margin:0 0 10px;color:#68768d;font-size:11px;line-height:1.8}.ctv-wizard-note{border:1px solid #dce6f5;background:#f7faff;border-radius:12px;padding:9px 11px}.ctv-wizard-footer{margin-top:auto;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 0 0;border-top:1px solid #e6ebf3;background:#fff;position:sticky;bottom:0;z-index:8}.ctv-wizard-nav{display:flex;gap:7px;align-items:center}.ctv-wizard-review{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(210px,100%),1fr));gap:8px}.ctv-review-card{border:1px solid #e2e8f1;background:linear-gradient(180deg,#fff,#f8fbff);border-radius:14px;padding:11px;display:grid;gap:4px}.ctv-review-card span,.ctv-review-card small{color:#758197;font-size:10px}.ctv-review-card strong{font-size:13px;color:#1c2738}.ctv-service-wizard-row{border:1px solid #e1e7f0;background:#fff;border-radius:15px;padding:10px;margin-bottom:9px;min-width:0}.ctv-service-wizard-row-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.ctv-service-wizard-row [data-svc-section="finance"]{display:none}.ctv-client-service-wizard[data-wizard-step="3"] .ctv-service-wizard-row [data-svc-section="basic"]{display:none}.ctv-client-service-wizard[data-wizard-step="3"] .ctv-service-wizard-row [data-svc-section="finance"]{display:grid}.ctv-service-wizard-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px;padding:9px 10px;border:1px solid #e2e8f1;border-radius:13px;background:#f8fafc}.ctv-service-wizard-toolbar>div{display:grid;gap:2px}.ctv-service-wizard-toolbar small{color:#758197;font-size:10px}@keyframes ctvWizardIn{from{opacity:.25;transform:translateY(5px)}to{opacity:1;transform:none}}

/* A modal has ONE vertical scroll owner: #ctvModalContent. Nested workspaces must adapt,
   tables may scroll horizontally but never create a second vertical scrollbar. */
#ctvModalContent,.ctv-client-modal-card #ctvClientModalContent{overflow-y:auto!important;overflow-x:hidden!important;min-height:0!important;overscroll-behavior:contain;padding-inline:max(12px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-right))!important}
.ctv-modal-card #ctvModalContent :where(.ctv-ui-scroll,.ctv-workspace-table,.ctv-notify-events-body,.ctv-notify-logs-body,.ctv-notify-rules-body,.ctv-rule-list,.ctv-event-list,.ctv-log-list):not(.ctv-ticket-chat-scroll),
.ctv-client-modal-card #ctvClientModalContent :where(.ctv-ui-scroll,.ctv-workspace-table):not(.ctv-ticket-chat-scroll){max-height:none!important;height:auto!important;overflow-y:visible!important}
.ctv-modal-card #ctvModalContent :where(.ctv-real-table-wrap,.ctv-table-wrap,.ctv-table-responsive,.table-responsive),
.ctv-client-modal-card #ctvClientModalContent :where(.ctv-real-table-wrap,.ctv-table-wrap,.ctv-table-responsive,.table-responsive){max-height:none!important;height:auto!important;overflow-x:auto!important;overflow-y:visible!important;scrollbar-gutter:auto!important}
.ctv-modal-card #ctvModalContent :where(.ctv-real-table,.ctv-table){max-width:none}.ctv-modal-card #ctvModalContent :where(.ctv-grid-2,.ctv-detail-grid,.ctv-real-form-grid,.ctv-form-grid,.ctv-profile-form-grid){min-width:0}.ctv-modal-card #ctvModalContent :where(.ctv-account-card,.ctv-notify-card,.ctv-panel,.ctv-card,.ctv-driver-config-panel){min-width:0;max-width:100%}

/* Native mobile admin/client navigation — no horizontal menu/action scrolling. */
.ctv-mobile-appbar,.ctv-mobile-admin-nav,.ctv-mobile-actions-fab,.ctv-mobile-sheet,.ctv-portal-mobile-menu{display:none}
@media(max-width:760px){
  .ctv-native-admin-ready .ctv-admin-header,.ctv-native-admin-ready .ctv-tabbar-wrap,.ctv-native-admin-ready .ctv-admin-header-bottom{display:none!important}
  .ctv-native-admin-ready .ctv-admin-main{padding-top:calc(62px + env(safe-area-inset-top))!important;padding-bottom:calc(82px + env(safe-area-inset-bottom))!important;min-height:100dvh!important}
  .ctv-native-admin-ready .ctv-workspace{height:auto!important;max-height:none!important;min-height:calc(100dvh - 144px)!important;overflow-y:auto!important;overflow-x:hidden!important;padding-bottom:24px!important}
  .ctv-mobile-appbar{display:flex;position:fixed;z-index:185;top:0;right:0;left:0;height:calc(58px + env(safe-area-inset-top));padding:max(7px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 7px max(10px,env(safe-area-inset-left));align-items:center;justify-content:space-between;gap:9px;background:rgba(255,255,255,.97);box-shadow:0 9px 28px rgba(17,30,58,.10);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border-bottom:1px solid rgba(220,228,240,.9)}
  .ctv-mobile-app-brand{display:flex;align-items:center;gap:9px;min-width:0}.ctv-mobile-app-brand img{width:34px;height:34px;object-fit:contain}.ctv-mobile-app-brand>div{display:grid;min-width:0}.ctv-mobile-app-brand small{font-size:9px;color:#74809a}.ctv-mobile-app-brand strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:48vw}.ctv-mobile-app-tools{display:flex;gap:4px}.ctv-mobile-app-tools button{width:40px;min-width:40px;height:40px;min-height:40px;border:0;border-radius:13px;background:#f3f6fb;color:#344158;display:grid;place-items:center}
  .ctv-native-bottom-nav{display:grid!important;grid-template-columns:repeat(5,1fr);position:fixed;z-index:195;right:8px;left:8px;bottom:max(7px,env(safe-area-inset-bottom));height:66px;padding:7px 5px 5px;border:1px solid rgba(198,211,230,.8);border-radius:22px;background:linear-gradient(180deg,rgba(24,38,66,.98),rgba(13,26,49,.99));box-shadow:0 18px 46px rgba(8,20,42,.30);overflow:visible!important;isolation:isolate;--ctv-mobile-notch-x:50%}
  .ctv-native-bottom-nav:before{content:"";position:absolute;z-index:-1;top:-1px;left:calc(var(--ctv-mobile-notch-x) - 37px);width:74px;height:31px;background:#f5f7fb;border-radius:0 0 38px 38px;box-shadow:0 1px 0 rgba(255,255,255,.5);transition:left .28s cubic-bezier(.2,.8,.2,1)}
  .ctv-native-bottom-nav>button{position:relative;border:0!important;background:transparent!important;color:#aab7cd!important;min-width:0!important;min-height:50px!important;height:50px!important;padding:3px 2px!important;border-radius:16px!important;display:grid!important;place-items:center!important;align-content:center!important;gap:2px!important;font-size:8.5px!important;overflow:visible!important;transition:transform .25s cubic-bezier(.2,.8,.2,1),color .2s!important}
  .ctv-native-bottom-nav>button .ctv-line-icon{width:19px!important;height:19px!important}.ctv-native-bottom-nav>button.is-active{color:#fff!important;transform:translateY(-18px)}.ctv-native-bottom-nav>button.is-active .ctv-line-icon{width:43px!important;height:43px!important;padding:11px;border-radius:50%;background:linear-gradient(135deg,#2b68ff,#48b0ff);color:#fff;box-shadow:0 10px 26px rgba(43,104,255,.40);border:3px solid #f5f7fb}.ctv-native-bottom-nav>button.is-active span:not(.ctv-line-icon){transform:translateY(13px);font-weight:700;color:#dce7fb}.ctv-native-bottom-nav>button span:not(.ctv-line-icon){white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
  .ctv-mobile-actions-fab{display:flex;position:fixed;z-index:194;left:max(13px,env(safe-area-inset-left));bottom:calc(84px + env(safe-area-inset-bottom));height:44px;min-height:44px;border:0;border-radius:16px;padding:0 13px;align-items:center;gap:6px;background:linear-gradient(135deg,#173dab,#286cff);color:#fff;box-shadow:0 13px 30px rgba(30,77,188,.28);font:inherit;font-size:11px}.ctv-mobile-actions-fab .ctv-line-icon{width:18px;height:18px}
  .ctv-native-admin-ready .ctv-bottom-operation-bar{display:none!important}.ctv-native-admin-ready .ctv-bottom-operation-bar.has-mobile-dirty{display:flex!important;position:fixed!important;z-index:193!important;right:10px!important;left:84px!important;bottom:calc(84px + env(safe-area-inset-bottom))!important;height:auto!important;min-height:48px!important;padding:5px!important;border-radius:16px!important;box-shadow:0 12px 28px rgba(15,29,54,.18)!important}.ctv-native-admin-ready .ctv-bottom-operation-bar.has-mobile-dirty .ctv-bottom-op-status{display:none!important}.ctv-native-admin-ready .ctv-bottom-operation-bar.has-mobile-dirty .ctv-bottom-op-actions{width:100%;display:grid!important;grid-template-columns:1fr 1fr!important;gap:5px!important}
  .ctv-mobile-sheet{display:block;position:fixed;inset:0;z-index:500;pointer-events:none;opacity:0;transition:opacity .18s}.ctv-mobile-sheet.is-open{pointer-events:auto;opacity:1}.ctv-mobile-sheet-backdrop{position:absolute;inset:0;width:100%;height:100%;border:0;background:rgba(9,18,33,.48);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}.ctv-mobile-sheet-card{position:absolute;right:7px;left:7px;bottom:max(7px,env(safe-area-inset-bottom));max-height:min(76dvh,650px);background:#fff;border:1px solid #dfe6f0;border-radius:24px;padding:9px;box-shadow:0 25px 70px rgba(8,20,42,.32);transform:translateY(110%);transition:transform .28s cubic-bezier(.2,.8,.2,1);display:flex;flex-direction:column;overflow:hidden}.ctv-mobile-sheet.is-open .ctv-mobile-sheet-card{transform:none}.ctv-mobile-sheet-card>header{display:flex;align-items:center;justify-content:space-between;padding:7px 7px 10px;border-bottom:1px solid #edf0f5}.ctv-mobile-sheet-card>header>div{display:grid;gap:2px}.ctv-mobile-sheet-card>header strong{font-size:14px}.ctv-mobile-sheet-card>header span{font-size:10px;color:#7a8699}.ctv-mobile-sheet-body{overflow-y:auto;overflow-x:hidden;padding:8px 2px 2px;display:grid;gap:5px;overscroll-behavior:contain}.ctv-mobile-sheet-section{display:grid;gap:5px}.ctv-mobile-sheet-section h4{margin:8px 8px 2px;font-size:10px;color:#728096}.ctv-mobile-sheet-action{width:100%;min-height:48px;border:1px solid #e4e9f2;border-radius:14px;background:#fff;padding:7px 10px;display:flex;align-items:center;gap:10px;text-align:right;color:#2c384c}.ctv-mobile-sheet-action.is-active{background:#eef4ff;border-color:#d6e3ff;color:#1749b8}.ctv-mobile-sheet-action>.ctv-line-icon{width:31px;height:31px;padding:7px;border-radius:10px;background:#f1f5fb;color:#315eac;flex:0 0 auto}.ctv-mobile-sheet-action span{display:grid;gap:2px}.ctv-mobile-sheet-action strong{font-size:12px}.ctv-mobile-sheet-empty{padding:22px;text-align:center;color:#7b8799}
  body.ctv-mobile-sheet-open{overflow:hidden!important}
  /* Client navigation uses the same curved native pattern and has no horizontal scroll. */
  .ctv-native-client-ready .ctv-client-nav-pro{display:grid!important;grid-template-columns:repeat(5,1fr)!important;overflow:visible!important;right:8px!important;left:8px!important;bottom:max(7px,env(safe-area-inset-bottom))!important;height:66px!important;padding:7px 5px 5px!important;border-radius:22px!important;background:linear-gradient(180deg,rgba(24,38,66,.98),rgba(13,26,49,.99))!important;border:1px solid rgba(198,211,230,.8)!important;box-shadow:0 18px 46px rgba(8,20,42,.30)!important;--ctv-mobile-notch-x:50%;isolation:isolate}
  .ctv-native-client-ready .ctv-client-nav-pro:before{content:"";position:absolute;z-index:-1;top:-1px;left:calc(var(--ctv-mobile-notch-x) - 37px);width:74px;height:31px;background:#f5f7fb;border-radius:0 0 38px 38px;transition:left .28s cubic-bezier(.2,.8,.2,1)}
  .ctv-native-client-ready .ctv-client-nav-pro>button{display:grid!important;place-items:center!important;align-content:center!important;min-width:0!important;width:auto!important;height:50px!important;min-height:50px!important;padding:3px 2px!important;background:transparent!important;color:#aab7cd!important;border:0!important;gap:2px!important;font-size:8.5px!important;overflow:visible!important;transition:transform .25s cubic-bezier(.2,.8,.2,1),color .2s!important}.ctv-native-client-ready .ctv-client-nav-pro>button .ctv-line-icon{width:19px!important;height:19px!important}.ctv-native-client-ready .ctv-client-nav-pro>button.is-active{color:#fff!important;transform:translateY(-18px)}.ctv-native-client-ready .ctv-client-nav-pro>button.is-active .ctv-line-icon{width:43px!important;height:43px!important;padding:11px!important;border-radius:50%!important;background:linear-gradient(135deg,#2b68ff,#48b0ff)!important;color:#fff!important;border:3px solid #f5f7fb!important;box-shadow:0 10px 26px rgba(43,104,255,.40)!important}.ctv-native-client-ready .ctv-client-nav-pro>button.is-active span:not(.ctv-line-icon){transform:translateY(13px);font-weight:700;color:#dce7fb}.ctv-native-client-ready .ctv-client-nav-pro .ctv-mobile-client-extra{display:none!important}
  /* Portal mobile menu is a sheet trigger, not a horizontally scrolling desktop nav. */
  .ctv-portal-header{padding-inline:12px!important}.ctv-portal-header nav{display:none!important}.ctv-portal-mobile-menu{display:grid;width:42px;height:42px;min-height:42px;border:1px solid #dde5ef;border-radius:14px;background:#fff;place-items:center;color:#26364f}
  /* Modal composition: full screen, one vertical scroll, no horizontal content leakage. */
  #ctvModalContent,.ctv-client-modal-card #ctvClientModalContent{padding:calc(50px + env(safe-area-inset-top)) 10px calc(78px + env(safe-area-inset-bottom))!important;overflow-y:auto!important;overflow-x:hidden!important}
  .ctv-modal-close{position:fixed!important;top:max(9px,env(safe-area-inset-top))!important;left:max(9px,env(safe-area-inset-left))!important;z-index:20!important}
  #ctvModalContent>.ctv-modal-headline,#ctvModalContent form>.ctv-modal-headline,#ctvClientModalContent>.ctv-modal-headline,#ctvClientModalContent form>.ctv-modal-headline{position:sticky;top:calc(-50px - env(safe-area-inset-top));z-index:12;background:#fff;margin:-1px -2px 10px;padding:10px 42px 10px 4px;border-bottom:1px solid #edf0f5}
  .ctv-modal-actions,.ctv-wizard-footer,.ctv-client-modal-actions{position:sticky!important;bottom:calc(-78px - env(safe-area-inset-bottom))!important;margin:12px -10px calc(-78px - env(safe-area-inset-bottom))!important;padding:9px 10px max(9px,env(safe-area-inset-bottom))!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;background:#fff!important;border-top:1px solid #e9edf3!important;box-shadow:0 -10px 24px rgba(15,28,50,.07)!important;z-index:15!important}.ctv-wizard-footer>.ctv-btn-ghost{grid-column:1}.ctv-wizard-footer .ctv-wizard-nav{grid-column:2;display:grid!important;grid-template-columns:1fr!important;gap:5px!important}.ctv-wizard-footer .ctv-wizard-nav>*{width:100%!important}.ctv-modal-actions>*{min-width:0!important;width:100%!important;white-space:normal!important}
  .ctv-stepper{grid-template-columns:repeat(4,1fr);gap:2px;position:sticky;top:0;z-index:10;background:#fff;padding:4px 0 10px}.ctv-stepper-item{display:grid;justify-items:center;text-align:center;gap:2px;font-size:8px}.ctv-stepper-item:after{display:none}.ctv-stepper-item i{width:25px;height:25px}.ctv-service-wizard-toolbar{align-items:stretch;flex-direction:column}.ctv-wizard-review{grid-template-columns:1fr}.ctv-commercial-item{grid-template-columns:1fr!important}.ctv-commercial-item>*{grid-column:1!important}.ctv-commercial-item>[data-commercial-remove-item]{justify-self:end!important}
  #ctvModalContent :where(.ctv-notify-layout,.ctv-notifications-layout,.ctv-event-layout,.ctv-rule-layout,.ctv-log-layout,.ctv-grid-2,.ctv-detail-grid){grid-template-columns:1fr!important}.ctv-modal-card #ctvModalContent :where(.ctv-notify-toolbar,.ctv-real-toolbar,.ctv-ui-filter-row,.ctv-form-actionbar,.ctv-account-card-head-actions){flex-wrap:wrap!important;max-width:100%!important}.ctv-modal-card #ctvModalContent :where(input,select,textarea,.select2-container){max-width:100%!important;min-width:0!important;width:100%!important}.select2-container--open .select2-dropdown{max-width:calc(100vw - 12px)!important;right:auto!important;left:6px!important}
}
/* Centiva 2.47.0 — simple one-click remote control-panel connection */
.ctv-driver-config-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px}.ctv-driver-config-head>div{min-width:0;flex:1}.ctv-driver-config-head .ctv-form-section-title{margin:0!important}.ctv-driver-auto-note{margin:6px 2px 0;color:#68768d;font-size:10.5px;line-height:1.8}.ctv-driver-config-head>[data-driver-config-toggle]{flex:0 0 auto;align-self:center;white-space:nowrap}.ctv-driver-config-panel [data-driver-config-grid][hidden]{display:none!important}
@media(max-width:640px){.ctv-driver-config-head{align-items:stretch;flex-direction:column}.ctv-driver-config-head>[data-driver-config-toggle]{align-self:flex-start}}
