/* -------------------------------------------------------------------
   Stage 105.3T CLEAN — Devices / Products / Radius / Prepaid Surface
   Consistency v2 / Customer Picker Safe Reapply

   Built cleanly from confirmed Stage 105.3S after the Customers -> Edit
   Customer page was rebuilt in Stage 105.3R and checkpointed in 105.3S.

   Frontend-only, visual-only refinement. This intentionally avoids the
   failed 105.3Q popup/modal path and does not style modal overlays.

   Safety scope:
   - no routes, no API calls, no database, no backend, no app.js changes
   - no RADIUS runtime changes
   - no prepaid/topup execution changes
   - no product backend/write changes
   - no customer package/speed logic changes
   - no Asset Register backend/write changes
   - protects Customer 360 and the rebuilt Customers -> Edit Customer picker
------------------------------------------------------------------- */

body.ispforge-ui-v2-devices-assets-professional-active,
body.ispforge-ui-v2-rpp-professional-active{
  --ui2-1053t-card-bg: rgba(255,255,255,.965);
  --ui2-1053t-card-soft: rgba(248,250,252,.88);
  --ui2-1053t-border: rgba(148,163,184,.24);
  --ui2-1053t-border-strong: rgba(99,102,241,.24);
  --ui2-1053t-text: #0f172a;
  --ui2-1053t-muted: #64748b;
  --ui2-1053t-shadow: 0 14px 40px rgba(15,23,42,.075);
  --ui2-1053t-radius-lg: 22px;
  --ui2-1053t-radius-md: 16px;
}

html[data-theme="dark"] body.ispforge-ui-v2-devices-assets-professional-active,
html[data-theme="dark"] body.ispforge-ui-v2-rpp-professional-active,
body.dark.ispforge-ui-v2-devices-assets-professional-active,
body.dark.ispforge-ui-v2-rpp-professional-active,
body.theme-dark.ispforge-ui-v2-devices-assets-professional-active,
body.theme-dark.ispforge-ui-v2-rpp-professional-active{
  --ui2-1053t-card-bg: rgba(15,23,42,.925);
  --ui2-1053t-card-soft: rgba(30,41,59,.70);
  --ui2-1053t-border: rgba(148,163,184,.22);
  --ui2-1053t-border-strong: rgba(129,140,248,.25);
  --ui2-1053t-text: #e5edf8;
  --ui2-1053t-muted: #9fb0c5;
  --ui2-1053t-shadow: 0 16px 42px rgba(0,0,0,.24);
}

/* Keep rebuilt Edit Customer and Customer 360 outside this surface pass. */
#page .stage1053r-edit-customer-page,
#page .stage1053r-edit-customer-page *,
#page [data-stage1053r-edit-customer-rebuild="active"],
#page [data-stage1053r-edit-customer-rebuild="active"] *,
#page .stage1052c-customer-360,
#page .stage1052c-customer-360 *,
#page .customer360,
#page .customer360 *,
#page .customer-360,
#page .customer-360 *{
  touch-action: auto;
}

/* Consistent operational/content cards for product/radius/prepaid/device pages. */
body.ispforge-ui-v2-devices-assets-professional-active :where(.content-card,.content-panel,.settings-card,.settings-panel,.setup-card,.setup-panel,.admin-card,.admin-panel,.list-card,.list-panel,.form-card,.form-panel,.table-card,.table-panel,.search-card,.search-panel,.filter-card,.filter-panel):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *),
body.ispforge-ui-v2-rpp-professional-active :where(.content-card,.content-panel,.settings-card,.settings-panel,.setup-card,.setup-panel,.admin-card,.admin-panel,.list-card,.list-panel,.form-card,.form-panel,.table-card,.table-panel,.search-card,.search-panel,.filter-card,.filter-panel):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *){
  border: 1px solid var(--ui2-1053t-border) !important;
  border-radius: var(--ui2-1053t-radius-lg) !important;
  background: var(--ui2-1053t-card-bg) !important;
  box-shadow: var(--ui2-1053t-shadow) !important;
  color: var(--ui2-1053t-text) !important;
}

/* Filter/search/tool rows: same spacing and wrapping without changing button behaviour. */
body.ispforge-ui-v2-devices-assets-professional-active :where(.filter-row,.filters-row,.search-row,.toolbar-row,.tool-row,.actions-row,.header-actions,.page-actions,.table-actions,.list-actions,.controls-row):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *),
body.ispforge-ui-v2-rpp-professional-active :where(.filter-row,.filters-row,.search-row,.toolbar-row,.tool-row,.actions-row,.header-actions,.page-actions,.table-actions,.list-actions,.controls-row):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *){
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px 12px !important;
  min-width: 0 !important;
}

body.ispforge-ui-v2-devices-assets-professional-active :where(.filter-row,.filters-row,.search-row,.toolbar-row,.tool-row,.controls-row):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *) > :where(input,select,textarea,.input,.select,.form-control,.search-input),
body.ispforge-ui-v2-rpp-professional-active :where(.filter-row,.filters-row,.search-row,.toolbar-row,.tool-row,.controls-row):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *) > :where(input,select,textarea,.input,.select,.form-control,.search-input){
  min-width: min(240px, 100%) !important;
  max-width: 100% !important;
}

/* Legacy form rows/grids on these pages should breathe like the newer cards. */
body.ispforge-ui-v2-devices-assets-professional-active :where(.form-row,.field-row,.input-row,.settings-row,.config-row):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *),
body.ispforge-ui-v2-rpp-professional-active :where(.form-row,.field-row,.input-row,.settings-row,.config-row):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *){
  gap: 12px !important;
  align-items: end !important;
}

body.ispforge-ui-v2-devices-assets-professional-active :where(.form-grid,.settings-grid,.config-grid,.fields-grid,.details-grid):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *),
body.ispforge-ui-v2-rpp-professional-active :where(.form-grid,.settings-grid,.config-grid,.fields-grid,.details-grid):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *){
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)) !important;
  gap: 14px 16px !important;
}

body.ispforge-ui-v2-devices-assets-professional-active :where(label,.field-label,.control-label):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *),
body.ispforge-ui-v2-rpp-professional-active :where(label,.field-label,.control-label):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *){
  color: var(--ui2-1053t-text) !important;
  font-weight: 750 !important;
}

body.ispforge-ui-v2-devices-assets-professional-active :where(.hint,.help,.help-text,.helper-text,.description,.muted,.text-muted,small):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *),
body.ispforge-ui-v2-rpp-professional-active :where(.hint,.help,.help-text,.helper-text,.description,.muted,.text-muted,small):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *){
  color: var(--ui2-1053t-muted) !important;
}

/* Section headers inside the page should be quiet, not a second competing hero. */
body.ispforge-ui-v2-devices-assets-professional-active :where(.card-header,.panel-header,.section-title-row,.table-title-row,.list-title-row):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *),
body.ispforge-ui-v2-rpp-professional-active :where(.card-header,.panel-header,.section-title-row,.table-title-row,.list-title-row):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *){
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px 14px !important;
  padding-bottom: 12px !important;
  margin-bottom: 14px !important;
  border-bottom: 1px solid var(--ui2-1053t-border) !important;
}

body.ispforge-ui-v2-devices-assets-professional-active :where(.card-header,.panel-header,.section-title-row,.table-title-row,.list-title-row):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *) :where(h2,h3,h4),
body.ispforge-ui-v2-rpp-professional-active :where(.card-header,.panel-header,.section-title-row,.table-title-row,.list-title-row):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *) :where(h2,h3,h4){
  margin: 0 !important;
  color: var(--ui2-1053t-text) !important;
  line-height: 1.18 !important;
}

/* Tabs on older operations/product pages: pill-style, readable and wrap-safe. */
body.ispforge-ui-v2-devices-assets-professional-active :where(.tabs,.tabbar,.tab-row,.nav-tabs,.subtabs,.page-tabs):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *),
body.ispforge-ui-v2-rpp-professional-active :where(.tabs,.tabbar,.tab-row,.nav-tabs,.subtabs,.page-tabs):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *){
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 6px !important;
  border: 1px solid var(--ui2-1053t-border) !important;
  border-radius: 18px !important;
  background: var(--ui2-1053t-card-soft) !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.ispforge-ui-v2-devices-assets-professional-active :where(.tabs,.tabbar,.tab-row,.nav-tabs,.subtabs,.page-tabs):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *) :where(a,button,.tab,.tab-btn,.nav-link),
body.ispforge-ui-v2-rpp-professional-active :where(.tabs,.tabbar,.tab-row,.nav-tabs,.subtabs,.page-tabs):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *) :where(a,button,.tab,.tab-btn,.nav-link){
  min-height: 36px !important;
  border-radius: 14px !important;
  white-space: nowrap !important;
}

/* Empty/loading/notice blocks should look intentional and readable. */
body.ispforge-ui-v2-devices-assets-professional-active :where(.empty-state,.no-data,.loading-state,.notice,.alert,.info-box,.warning-box):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *),
body.ispforge-ui-v2-rpp-professional-active :where(.empty-state,.no-data,.loading-state,.notice,.alert,.info-box,.warning-box):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *){
  border-radius: var(--ui2-1053t-radius-md) !important;
  border: 1px solid var(--ui2-1053t-border) !important;
  background: var(--ui2-1053t-card-soft) !important;
  color: var(--ui2-1053t-text) !important;
}

/* Dense data regions: preserve table behaviour but keep wrappers consistent. */
body.ispforge-ui-v2-devices-assets-professional-active :where(.table-wrap,.table-wrapper,.table-responsive,.data-table-wrap,.list-table-wrap):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *),
body.ispforge-ui-v2-rpp-professional-active :where(.table-wrap,.table-wrapper,.table-responsive,.data-table-wrap,.list-table-wrap):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *){
  border-radius: var(--ui2-1053t-radius-lg) !important;
  border: 1px solid var(--ui2-1053t-border) !important;
  background: var(--ui2-1053t-card-bg) !important;
  box-shadow: var(--ui2-1053t-shadow) !important;
  overflow: auto !important;
}

body.ispforge-ui-v2-devices-assets-professional-active :where(.table-wrap,.table-wrapper,.table-responsive,.data-table-wrap,.list-table-wrap):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *) table,
body.ispforge-ui-v2-rpp-professional-active :where(.table-wrap,.table-wrapper,.table-responsive,.data-table-wrap,.list-table-wrap):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *) table{
  margin: 0 !important;
  min-width: 760px;
}

/* Re-assert the rebuilt Edit Customer picker surface so future generic page CSS cannot box it again. */
#page .stage1053r-edit-customer-page .stage1053r-results,
#page .stage1053r-edit-customer-page #stage833-results{
  display:block !important;
  position:relative !important;
  width:100% !important;
  max-height:min(430px,52vh) !important;
  min-height:130px !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  pointer-events:auto !important;
  z-index:auto !important;
}

#page .stage1053r-edit-customer-page .stage1053r-result,
#page .stage1053r-edit-customer-page .stage833-result,
#page .stage1053r-edit-customer-page [data-stage833-customer-id]{
  display:block !important;
  width:100% !important;
  min-height:58px !important;
  pointer-events:auto !important;
  cursor:pointer !important;
  text-align:left !important;
}

#page .stage1053r-edit-customer-page .stage1053r-result-main,
#page .stage1053r-edit-customer-page .stage1053r-result-sub,
#page .stage1053r-edit-customer-page .stage833-result-main,
#page .stage1053r-edit-customer-page .stage833-result-sub{
  pointer-events:none !important;
}

@media (max-width: 900px){
  body.ispforge-ui-v2-devices-assets-professional-active :where(.filter-row,.filters-row,.search-row,.toolbar-row,.tool-row,.actions-row,.header-actions,.page-actions,.table-actions,.list-actions,.controls-row):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *),
  body.ispforge-ui-v2-rpp-professional-active :where(.filter-row,.filters-row,.search-row,.toolbar-row,.tool-row,.actions-row,.header-actions,.page-actions,.table-actions,.list-actions,.controls-row):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *){
    align-items: stretch !important;
  }

  body.ispforge-ui-v2-devices-assets-professional-active :where(.filter-row,.filters-row,.search-row,.toolbar-row,.tool-row,.actions-row,.header-actions,.page-actions,.table-actions,.list-actions,.controls-row):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *) > *,
  body.ispforge-ui-v2-rpp-professional-active :where(.filter-row,.filters-row,.search-row,.toolbar-row,.tool-row,.actions-row,.header-actions,.page-actions,.table-actions,.list-actions,.controls-row):not(.stage1053r-edit-customer-page *):not([data-stage1053r-edit-customer-rebuild="active"] *) > *{
    max-width: 100% !important;
  }
}
