/* Scoped prototype corrections. Original desktop CSS/assets stay canonical;
   constrained viewports reflow content instead of hiding horizontal overflow. */
body.shared-shell #shellDesktop .main { min-width: 0; }
body.shared-shell #shellDesktop .topbar { min-width: 0; }
@media (min-width: 1100px) and (max-width: 1599px) {
  body.shared-shell #shellDesktop .topbar {
    flex: 0 0 auto; height: auto; min-height: var(--header-h);
    flex-wrap: wrap; gap: 10px 12px;
  }
  body.shared-shell #shellDesktop .topbar-title { min-width: 0; }
  body.shared-shell #shellDesktop .launcher-search { flex: 1 1 240px; min-width: 200px; }
  body.shared-shell #shellDesktop .topbar-actions {
    flex: 0 1 auto; min-width: 0; max-width: 100%; flex-wrap: wrap;
    justify-content: flex-end; gap: 6px; margin-left: auto;
  }
  body.shared-shell #shellDesktop .topbar-actions > * { min-width: 0; max-width: 100%; }
  body.shared-shell #shellDesktop .finanzonline-status,
  body.shared-shell #shellDesktop .nvision-edition-badge,
  body.shared-shell #shellDesktop .erp-integration-status { padding-inline: 9px; }
  body.shared-shell #shellDesktop .launcher-agent-header-status { width: 142px; min-width: 0; }
  body.shared-shell #shellDesktop .launcher-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.shared-shell #shellDesktop .launcher-overview-favorites { grid-column: 1 / -1; }
  body.shared-shell #shellDesktop .launcher-overview-card { min-width: 0; }
  body.shared-shell #shellDesktop .launcher-overview-head,
  body.shared-shell #shellDesktop .launcher-favorites-footer { flex-wrap: wrap; }
  body.shared-shell #shellDesktop .launcher-workspace-head { flex-wrap: wrap; gap: 12px; }
}
/* Favorites are the same in-memory selection in both views, not a second list. */
.shared-shell #shellCompact .shell-favorites { max-width: 940px; margin: 27px auto 0; padding: 0 22px; }
.shared-shell #shellCompact .shell-favorites h2 { margin: 0 0 12px; color: #3f606b; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; }
.shared-shell #shellCompact .shell-favorite-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 12px; }
.shared-shell #shellCompact .shell-favorite {
  display: grid; place-items: center; justify-self: center; width: 52px; height: 52px;
  padding: 12px; border: 1px solid color-mix(in srgb, var(--module-color) 40%, #dce7e9);
  border-radius: 15px; background: color-mix(in srgb, var(--module-color) 12%, white);
  color: var(--module-color); cursor: pointer;
}
.shared-shell #shellCompact .shell-favorite-toggle { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid #405b65; border-radius: 12px; background: none; color: #9ab4bc; cursor: pointer; }
.shared-shell #shellCompact .shell-favorite-toggle[aria-pressed="true"] { color: #72dfcf; background: #143c42; }
.shared-shell #shellCompact .shell-favorite-toggle[aria-pressed="true"] svg { fill: currentColor; }
@media (max-width: 1099px) {
  body.shared-shell #shellCompact .topbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; }
  body.shared-shell #shellCompact .topbar-actions { flex-wrap: wrap; justify-content: flex-end; }
  .shared-shell #shellCompact .shell-status-actions { display: flex; grid-column: 1 / -1; flex-wrap: wrap; justify-content: flex-end; gap: 6px; padding-bottom: 4px; }
  .shared-shell #shellCompact .shell-status-actions button {
    display: flex; align-items: center; justify-content: center; flex: 1 1 70px; gap: 5px;
    min-height: 44px; padding: 6px; border: 1px solid #28535c; border-radius: 11px;
    background: #ffffff0c; color: #dce9ed; font: 600 11px 'Segoe UI', sans-serif;
  }
  .shared-shell #shellCompact .shell-status-actions svg { width: 17px; height: 17px; }
  .shared-shell #shellCompact .shell-status-ai { color: #8ce7dd; font-weight: 900; }
  body.shared-shell #shellCompact .shell-workday,
  body.shared-shell #shellCompact .shell-module,
  body.shared-shell #shellCompact .shell-dock-head > div { min-width: 0; }
  .shared-shell #shellCompact .shell-dock-head { flex-wrap: wrap; }
}
#launcherAccountDialog { overflow-wrap: anywhere; }
#launcherAccountDialog header, #launcherAccountDialog footer { flex-wrap: wrap; }
@media (max-width: 499px) {
  .shared-shell #shellCompact #shellVersion { display: none; }
  .shared-shell #shellCompact .shell-status-actions button { flex-basis: 44px; font-size: 10px; }
  .shared-shell #shellCompact .shell-status-actions button:first-child span:last-child { font-size: 9px; }
}
