/* Scoped refinement: no CRM, Demandas, billing or account styles. */
.planning-canvas-active #app > main {
  width: 100%; max-width: 1600px; min-width: 0;
  padding: 24px clamp(16px, 2vw, 32px);
}
#planning-shell.planning-shell--nav-collapsed { grid-template-columns: minmax(0, 1fr); }
#planning-shell .planning-shell__sidebar[hidden] { display: none; }
#planning-shell .planning-shell__content { min-width: 0; }
#pges-planning-flow .pges-flow-navigation__module { flex-wrap: wrap; gap: 8px; }
#pges-planning-flow .planning-stages-toggle {
  margin-left: 6px; padding: 5px 10px; min-height: 32px;
  border: 1px solid #dce3ef; border-radius: 9px; background: #f7f9fd;
  color: #3f549c; font: inherit; font-size: .78rem; font-weight: 600;
  letter-spacing: normal; text-transform: none; cursor: pointer;
}
#pges-planning-flow .planning-stages-toggle:hover { background: #edf1fb; }
#pges-planning-flow .planning-stages-toggle:focus-visible { outline: 3px solid #9eaff3; outline-offset: 3px; }
#step-swot .swot-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; }
#step-swot .swot-toolbar__entry { display: flex; flex: 1 1 390px; align-items: center; gap: 10px; min-width: 0; }
#step-swot .swot-toolbar__entry .input-field { flex: 1 1 0; width: 0; min-width: 0; }
#step-swot .swot-toolbar__entry .secondary-btn { flex-shrink: 0; }
#step-swot .swot-grid { align-items: start; }
#step-swot .swot-quadrant__items { height: auto; min-height: 82px; max-height: 320px; }
.planning-workspace-active .pges-app-header__container { max-width: none; padding: 12px 22px; }
.planning-workspace-active .pges-app-header__inner { gap: 22px; }
.planning-workspace-active #header-buttons { gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.planning-workspace-active #header-buttons > button { color: #e4eafb; font-size: .84rem; white-space: nowrap; }
.planning-workspace-active #header-buttons > button:disabled { color: #b7c4e0; opacity: .7; }
.planning-workspace-active #header-buttons > button:last-child { color: #263553; }
.planning-workspace-active #header-buttons > .planning-header-current {
  color: #fff; padding: 9px 12px; border: 1px solid #8395c07a; border-radius: 24px; background: #ffffff0c;
}
.planning-workspace-active #header-buttons > .planning-header-back { display: none; }
#planning-shell .planning-stage-surface .step-context { display: none; }
#planning-shell .planning-shell__title, #planning-shell .planning-block-card__title { font-family: Inter, system-ui, sans-serif; }
#planning-shell .planning-block-card { border-radius: 12px; padding: 12px; box-shadow: none; }
#planning-shell .planning-block-card__title { font-size: 1rem; }
#planning-shell .planning-shell__intro { box-shadow: none; padding: 14px; border-radius: 12px; }
@media (min-width: 1025px) {
  #planning-shell .planning-shell__sidebar-inner { max-height: calc(100dvh - 285px); min-height: 300px; overflow-y: auto; overscroll-behavior: contain; }
  #planning-shell .planning-shell__sidebar-inner > * { flex-shrink: 0; }
}
#pges-planning-flow .pges-flow-navigation__copy { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1024px) {
  #planning-shell .planning-shell__sidebar-inner { max-height: 230px; overflow-y: auto; overscroll-behavior: contain; }
  #planning-shell .planning-shell__sidebar-inner > * { flex-shrink: 0; }
  #planning-shell .planning-shell__intro { display: none; }
}
#planning-shell, #mgmt-shell { min-width: 0; }
#mgmt-shell .mgmt-content, #mgmt-shell .mgmt-sidebar { min-width: 0; }
#planning-shell .step-title, #mgmt-shell .step-title {
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(1.45rem, 2.1vw, 2rem);
  line-height: 1.22;
  letter-spacing: -.035em;
  color: #182640;
}
#planning-shell .planning-stage-surface,
#planning-shell .planning-guide-rail,
#mgmt-shell .mgmt-card, #mgmt-shell .mgmt-page-hero {
  border-radius: 16px;
  border-color: #dce3ef;
  background: #fff;
  box-shadow: 0 4px 18px rgb(24 38 64 / 4%);
}
#planning-shell .planning-stage-surface { padding: clamp(18px, 2vw, 28px); }
#planning-shell .step-context { margin-bottom: 12px; }
#planning-shell .step-context__eyebrow { display: none; }
#planning-shell .step-context__headline { font-size: .78rem; letter-spacing: .02em; }
#planning-shell .step-context__meta { font-size: .8rem; }
#planning-shell .step-subtitle, #mgmt-shell .step-subtitle { font-size: .96rem; line-height: 1.6; }
.planning-method-note {
  border-left: 3px solid #566ac2;
  padding: 9px 13px;
  margin: 12px 0 16px;
  color: #40506b;
  font-size: .88rem;
  line-height: 1.55;
  background: #f5f7fc;
  border-radius: 0 8px 8px 0;
}
#planning-shell .planning-guide-rail__title { font-family: inherit; font-size: 1rem; }
#planning-shell .planning-guide-rail__intent { font-size: .86rem; }
#planning-shell .planning-guide-rail__section { margin-top: 14px; }
#planning-shell .planning-guide-rail details summary {
  cursor: pointer; font-size: .85rem; font-weight: 650; color: #3f549c;
}
#planning-shell .planning-guide-rail__actions .primary-btn { padding: 9px 12px; font-size: .83rem; }
#mgmt-shell .mgmt-page-hero { padding: 16px 20px; gap: 14px; }
#mgmt-shell .mgmt-page-hero::before { display: none; }
#mgmt-shell .mgmt-page-hero__content { gap: 10px; }
#mgmt-shell .mgmt-page-hero__eyebrow { letter-spacing: .08em; font-size: .7rem; }
#mgmt-shell .mgmt-sidebar { border-radius: 16px; }
#mgmt-shell .mgmt-card-body { padding: 18px; }
#mgmt-shell .mgmt-initiative-create > summary {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  padding: 16px 18px; gap: 8px; cursor: pointer; font-weight: 650; color: #243862;
}
#mgmt-shell .mgmt-initiative-create > summary span { font-weight: 400; color: #58667f; font-size: .84rem; }
#mgmt-shell .mgmt-initiative-create[open] > summary { border-bottom: 1px solid #e4e9f2; }
.planning-save-bar:not(.hidden) {
  position: sticky; bottom: 0; z-index: 30; padding: 9px 20px;
  background: #ffffffed; border-top: 1px solid #dce3ef;
}
.planning-save-bar > .wrapper { max-width: none; gap: 10px; flex-wrap: wrap; }
.planning-save-bar #save-status { margin: 0 auto 0 0; min-height: 0; color: #52627b; text-align: left; }
.planning-save-bar #save-status[data-status="saved"] { color: #246b56; }
.planning-save-bar #save-status[data-status="pending"],
.planning-save-bar #save-status[data-status="saving"] { color: #4059a2; }
.planning-save-bar #save-status[data-status="error"],
.planning-save-bar #save-status[data-status="conflict"] { color: #a53330; font-weight: 600; }
.planning-save-bar button { padding: 8px 12px; font-size: .8rem; min-height: 36px; }
.planning-save-bar button[hidden] { display: none; }
.planning-save-bar button:focus-visible, #planning-shell summary:focus-visible,
#mgmt-shell summary:focus-visible { outline: 3px solid #9eaff3; outline-offset: 3px; }
@media (max-width: 1599px) {
  #planning-shell .planning-stage-shell__grid { grid-template-columns: minmax(0, 1fr); }
  #planning-shell .planning-stage-shell__aside { position: static; }
  #planning-shell .planning-guide-rail { padding: 16px 20px; }
}
@media (max-width: 760px) {
  .planning-canvas-active #app > main { padding: 16px 12px; }
  #step-swot .swot-toolbar { display: grid; grid-template-columns: auto minmax(0, 1fr); padding: 12px; }
  #step-swot .swot-toolbar__entry { display: contents; }
  #step-swot .swot-toolbar__entry .input-field { grid-column: 1 / -1; width: 100%; }
  #step-swot .swot-toolbar > .primary-btn { min-width: 0; }
  .planning-workspace-active .pges-app-header__container { padding: 10px 14px; }
  #planning-shell .title-container, #mgmt-shell .title-container { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
  #mgmt-shell .mgmt-page-hero__actions { flex-wrap: wrap; }
  #mgmt-shell .mgmt-stage > .mt-8 > .flex { flex-wrap: wrap; }
  #planning-shell .planning-stage-surface { padding: 16px; }
  .planning-save-bar { padding: 8px 12px; }
  .planning-save-bar #save-status { flex-basis: 100%; font-size: .78rem; }
}
@media (max-width: 980px) {
  #mgmt-shell { grid-template-columns: minmax(0, 1fr); }
  #mgmt-shell .mgmt-sidebar { max-height: 235px; overflow-y: auto; overscroll-behavior: contain; padding: 14px; }
  #mgmt-shell .mgmt-sidebar__brand { padding: 0 0 10px; margin-bottom: 10px; }
}
@media print { .planning-save-bar { display: none !important; } }
