/* ALPLINE 4.1.101 · Six optional skins; original & original_live untouched.
   The existing dashboard DOM remains the source of truth for Preview/Apply. */
@media screen {
main[data-alpline-alt-theme] {
  --alp-finish-main: var(--workspace-primary,#075963);
  --alp-finish-accent:var(--workspace-accent,#39c8bb);
  --alp-finish-rad:clamp(12px,var(--workspace-radius,16px),24px);
  --alp-finish-shadow:0 10px 28px rgba(19,47,62,.065);
  min-width:0!important; max-width:100%!important;
  display:block!important; overflow:visible!important;
  background:transparent!important; color:#173343;
}
main[data-alpline-alt-theme] :is(.alp481-kpis,.alp484-primary-kpis,.alp484-secondary-kpis,.alp457-kpi-grid,.alp484-intelligence-grid,.dashboard-function-grid,.franchise-launchpad) {
  min-width:0!important; width:100%!important; max-width:100%!important;
  box-sizing:border-box!important; gap:clamp(10px,1.2vw,16px)!important;
}
main[data-alpline-alt-theme] :is(.alp481-kpis,.alp484-primary-kpis,.alp484-secondary-kpis,.alp457-kpi-grid,.alp484-intelligence-grid) > * {min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
main[data-alpline-alt-theme] :is(.alp457-paper,.alp484-panel,.alp484-primary-kpis>.kpi,.alp484-secondary-kpis>.mini-kpi,.alp481-kpis>*,.alp457-kpi-grid>*,.dashboard-function-grid>a,.franchise-launchpad>a,.alp480-member-map-panel,.dashboard-shortcuts,.a145-member-welcome) {
  border:1px solid color-mix(in srgb,var(--alp-finish-main) 12%,white)!important;
  background:var(--workspace-surface,#fff)!important;
  border-radius:var(--alp-finish-rad)!important;
  box-shadow:var(--alp-finish-shadow)!important;
  min-width:0!important;
  overflow-wrap:anywhere;
  height:auto;
}
main[data-alpline-alt-theme] :is(.alp484-primary-kpis>.kpi,.alp484-secondary-kpis>.mini-kpi,.alp481-kpis>*,.alp457-kpi-grid>*) {
  position:relative; isolation:isolate; padding:clamp(13px,1.3vw,19px)!important;
  transition:transform .16s ease,box-shadow .16s ease;
}
main[data-alpline-alt-theme] :is(.alp484-primary-kpis>.kpi,.alp484-secondary-kpis>.mini-kpi,.alp481-kpis>*,.alp457-kpi-grid>*)::before {
  content:'';position:absolute;left:0;top:14px;bottom:14px;width:3px;border-radius:0 8px 8px 0;
  background:var(--alp-finish-accent);opacity:.85;pointer-events:none;
}
main[data-alpline-alt-theme] :is(.alp484-primary-kpis,.alp484-secondary-kpis) .kpi i,
main[data-alpline-alt-theme] :is(.alp484-primary-kpis,.alp484-secondary-kpis) .mini-kpi i {
  display:inline-grid!important;place-items:center!important;flex:0 0 40px!important;
  width:40px!important;height:40px!important;min-width:40px!important;
  border-radius:12px!important;font-size:19px!important;font-style:normal!important;
  background:color-mix(in srgb,var(--alp-finish-main) 9%,white)!important;
  color:var(--alp-finish-main)!important;line-height:1!important;
}
main[data-alpline-alt-theme] :is(.alp484-primary-kpis,.alp484-secondary-kpis) :is(small,em,span),
main[data-alpline-alt-theme] :is(.alp481-kpis,.alp457-kpi-grid) small {line-height:1.45!important;letter-spacing:normal!important}
main[data-alpline-alt-theme] :is(.alp484-primary-kpis,.alp484-secondary-kpis,.alp481-kpis,.alp457-kpi-grid) strong,
main[data-alpline-alt-theme] :is(.alp484-primary-kpis,.alp484-secondary-kpis,.alp481-kpis,.alp457-kpi-grid) b {font-variant-numeric:tabular-nums}
main[data-alpline-alt-theme] :is(.a492-workspace-head,.alp481-top,.dash-head) {
  border:1px solid color-mix(in srgb,var(--alp-finish-main) 11%,white)!important;
  background:linear-gradient(112deg,color-mix(in srgb,var(--alp-finish-main) 7%,white),#fff 72%)!important;
  border-radius:var(--alp-finish-rad)!important;
  box-shadow:0 4px 16px rgba(13,40,54,.025)!important;
  padding:clamp(16px,2vw,24px)!important;
  height:auto!important; min-height:0!important;
}
main[data-alpline-alt-theme] :is(.a492-workspace-head,.alp481-top,.dash-head) :is(h1,h2) {font-size:clamp(23px,2.5vw,34px)!important;line-height:1.19!important;margin:.15em 0!important}
main[data-alpline-alt-theme] :is(.dashboard-function-grid,.franchise-launchpad) a {min-height:65px!important;text-decoration:none!important}
main[data-alpline-alt-theme] :is(.dashboard-function-grid,.franchise-launchpad) a:focus-visible,
main[data-alpline-alt-theme] :is(.alp484-primary-kpis,.alp481-kpis) a:focus-visible {
 outline:3px solid var(--alp-finish-accent)!important;outline-offset:2px!important;
}
main[data-alpline-alt-theme] :is(.alp484-intelligence-grid,.alp484-operational-row,.alp480-member-map-panel,.alp481-kpis,.alp484-primary-kpis,.alp484-secondary-kpis) {margin-top:clamp(10px,1.3vw,18px)!important;margin-bottom:clamp(10px,1.3vw,18px)!important}
main[data-alpline-alt-theme] :is(.alp484-panel,.alp457-paper,.dashboard-function-grid,.alp480-member-map-panel) {padding:clamp(15px,1.6vw,22px)!important}
main[data-alpline-alt-theme] :is(.alp484-panel,.alp457-paper) :is(h2,h3) {line-height:1.3!important;overflow-wrap:break-word}
main[data-alpline-alt-theme] svg,main[data-alpline-alt-theme] canvas {max-width:100%}
main[data-alpline-alt-theme] .table-wrap{max-width:100%;overflow-x:auto}
main[data-alpline-alt-theme] :is(.alp484-panel,.alp457-paper,.control-card) {min-width:0}
html[data-alpline-theme=signature] main[data-alpline-alt-theme] {--alp-finish-shadow:0 9px 26px rgba(1,99,104,.08)}
html[data-alpline-theme=paper] main[data-alpline-alt-theme] {--alp-finish-rad:12px;--alp-finish-shadow:0 1px 5px rgba(22,54,38,.045)}
html[data-alpline-theme=focus] main[data-alpline-alt-theme] {--alp-finish-shadow:0 9px 26px rgba(46,38,91,.10)}
html[data-alpline-theme=atelier] main[data-alpline-alt-theme] {--alp-finish-shadow:0 9px 25px rgba(132,60,48,.08)}
html[data-alpline-theme=ledger] main[data-alpline-alt-theme] {--alp-finish-rad:12px;--alp-finish-shadow:0 2px 9px rgba(88,64,27,.055)}
html[data-alpline-theme=orbit] main[data-alpline-alt-theme] {--alp-finish-shadow:0 10px 30px rgba(31,85,124,.09)}
}
@media(hover:hover) and (prefers-reduced-motion:no-preference) {
 main[data-alpline-alt-theme] :is(.alp484-primary-kpis>.kpi,.alp484-secondary-kpis>.mini-kpi,.alp481-kpis>*,.alp457-kpi-grid>*):hover {transform:translateY(-2px);box-shadow:0 15px 31px rgba(25,52,65,.10)!important}
}
@media(max-width:1199px) {
 main[data-alpline-alt-theme] :is(.alp484-primary-kpis,.alp484-secondary-kpis,.alp481-kpis,.alp457-kpi-grid) {
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
 }
 main[data-alpline-alt-theme] :is(.alp484-intelligence-grid,.alp484-operational-row) {grid-template-columns:minmax(0,1fr)!important}
}
@media(max-width:650px) {
 main[data-alpline-alt-theme] :is(.alp484-primary-kpis,.alp484-secondary-kpis,.alp481-kpis,.alp457-kpi-grid) {grid-template-columns:minmax(0,1fr)!important}
 main[data-alpline-alt-theme] :is(.alp484-panel,.alp457-paper,.dashboard-function-grid,.alp480-member-map-panel){padding:13px!important}
 main[data-alpline-alt-theme] :is(.a492-workspace-head,.alp481-top,.dash-head){padding:14px!important}
}
/* Exact same theme colours, card geometry and icon treatment for studio sampling.
   Sample data is labelled; this is not a substitute for live dashboard QA. */
#studio-theme [data-theme-preview] :is(.theme-preview-panel,.theme-preview-metrics>div,.theme-preview-welcome) {
  border:1px solid color-mix(in srgb,var(--preview-primary) 12%,white)!important;
  border-radius:var(--preview-radius)!important;
  box-shadow:0 8px 22px rgba(19,47,62,.055)!important;
}
#studio-theme .theme-choice:has(input:checked) {outline:2px solid var(--preview-primary);outline-offset:1px;border-radius:12px}
#studio-theme .theme-studio-controls button[type=submit] {background:var(--preview-primary)!important;color:#fff!important;border:0!important}
#studio-theme .theme-preview-shell {max-width:100%;overflow:hidden}

/* 4.1.101: previews keep a stable information hierarchy because the same existing
   sections are retained on the real dashboard. No fake sidebar repositioning. */
#studio-theme .theme-preview-grid[data-preset]{
 grid-template-columns:repeat(2,minmax(0,1fr))!important;
 grid-template-areas:"welcome welcome" "metrics metrics" "income operations" "actions actions"!important;
}
#studio-theme .theme-preview-grid[data-preset] .theme-preview-metrics{grid-template-columns:repeat(4,minmax(0,1fr))!important}
#studio-theme .theme-preview-grid[data-preset] .theme-preview-chart{
 display:flex!important;clip-path:none!important;mask:none!important;width:auto!important;
 height:58px!important;border-radius:8px!important;background:transparent!important;
}
#studio-theme .theme-preview-grid[data-preset] .theme-preview-chart i {display:block!important}
#studio-theme .theme-preview-grid[data-preset] .theme-preview-report-table{display:none!important}
#studio-theme [data-theme-preview] .theme-preview-welcome {background:var(--preview-primary)!important}
#studio-theme [data-theme-preview] .theme-preview-welcome h3{color:#fff!important}
@media(max-width:650px){
 #studio-theme .theme-preview-grid[data-preset]{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"welcome" "metrics" "income" "operations" "actions"!important}
 #studio-theme .theme-preview-grid[data-preset] .theme-preview-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
