/* NSCRA Panel 1.26.1 — Visual Stability Hotfix
   Presentation-only corrective layer loaded after visual-refresh-126.css.
   Fixes CSS cascade/contrast/layout regressions observed on live 1.26.0.
   No route, business, data, updater, trust, licensing or edition logic lives here. */

:root{
  --v1261-line:color-mix(in srgb,var(--border,var(--line,#dbe3ed)) 94%,#94a3b8 6%);
  --v1261-shadow:0 8px 24px rgba(15,23,42,.055);
}

/* Keep layout motion from shifting compact/icon controls. */
.icon-button:hover,
.menu-button:hover,
.sidebar-close:hover,
.header-search-button:hover,
.header-notification:hover,
.widget-handle:hover,
.widget-dismiss-v125:hover{
  transform:none;
}

/* Dashboard hero: 1.26.0 wrapped two already-styled panels in another decorated
   surface. Restore the intended two-panel composition and remove the clipped orb. */
.page-dashboard .dashboard-hero-v160{
  border:0;
  border-radius:0;
  overflow:visible;
  background:transparent;
  box-shadow:none;
  gap:1rem;
}
.page-dashboard .dashboard-hero-main,
.page-dashboard .dashboard-hero-snapshot{
  border-color:var(--v1261-line);
  border-radius:var(--v126-radius-lg,19px);
  box-shadow:var(--v1261-shadow);
}
.page-dashboard .dashboard-hero-main{
  background:linear-gradient(135deg,color-mix(in srgb,var(--accent,var(--primary,#2563eb)) 9%,var(--surface,#fff)),var(--surface,#fff) 64%);
}
.page-dashboard .dashboard-hero-main::after{
  content:none;
  display:none;
}

/* Critical 1.26.0 regression: the late generic quick-action rule replaced the
   primary background but preserved its white text, making the first action blank. */
.page-dashboard .quick-action{
  min-width:0;
  min-height:88px;
  align-content:center;
  color:var(--text,#172033);
  border-color:var(--v1261-line);
  background:var(--surface,#fff);
}
.page-dashboard .quick-action span{
  color:inherit;
  line-height:1.45;
}
.page-dashboard .quick-action small{
  color:var(--muted,#64748b);
  line-height:1.65;
}
.page-dashboard .quick-action.primary,
.page-dashboard .quick-action.primary:hover,
.page-dashboard .quick-action.primary:focus-visible{
  color:#fff;
  border-color:transparent;
  background:linear-gradient(145deg,color-mix(in srgb,var(--accent,var(--primary,#2563eb)) 94%,#fff 6%),var(--accent-strong,var(--primary-dark,#1d4ed8)));
  box-shadow:0 9px 22px color-mix(in srgb,var(--accent,var(--primary,#2563eb)) 20%,transparent),inset 0 1px 0 rgba(255,255,255,.18);
}
.page-dashboard .quick-action.primary small{
  color:rgba(255,255,255,.84);
}
.page-dashboard .quick-action:not(.primary):hover{
  color:var(--text,#172033);
  background:color-mix(in srgb,var(--accent,var(--primary,#2563eb)) 5%,var(--surface,#fff));
}

/* Snapshot cards should read as metrics, not empty blocks. */
.page-dashboard .dashboard-hero-snapshot article{
  min-width:0;
  min-height:112px;
  align-content:center;
}
.page-dashboard .dashboard-hero-snapshot span,
.page-dashboard .dashboard-hero-snapshot small{
  line-height:1.6;
}
.page-dashboard .dashboard-hero-snapshot b{
  line-height:1.2;
  color:var(--text,#172033);
}

/* Preserve semantic status accents instead of washing every dashboard stat into
   the same gradient. */
.page-dashboard .stats-grid>.stat{
  background:var(--surface,#fff);
  border-color:var(--v1261-line);
}
.page-dashboard .stats-grid>.stat::after{
  opacity:.45;
}

/* 1.26 decorative dots can crowd existing pills in dense tables/forms. Keep the
   original pill contract and semantic colors without adding layout width. */
.badge::before,
.status::before{
  content:none;
  display:none;
}

/* Avoid artificially tall module cards when their content is short. */
.module-card{
  min-height:200px;
}
.module-card:has(.empty),
.module-card:has(.module-scope-note){
  min-height:0;
}

/* Stronger readable boundaries after the low-contrast 1.26 pass. */
.card,
.table-wrap,
.filter-bar,
.filter-panel,
fieldset{
  border-color:var(--v1261-line);
}
.page-head .muted,
.card-head .muted,
.section-title .muted{
  color:var(--muted,#64748b);
}

@media(max-width:1180px){
  .page-dashboard .dashboard-hero-v160{gap:.85rem}
}
@media(max-width:760px){
  .page-dashboard .dashboard-hero-main,
  .page-dashboard .dashboard-hero-snapshot{border-radius:15px}
  .page-dashboard .quick-action{min-height:78px}
}
@media(max-width:520px){
  .page-dashboard .dashboard-hero-v160{gap:.65rem}
  .page-dashboard .dashboard-hero-snapshot article{min-height:96px}
}
