/* Layout owned by workspace-shell.js. Global surfaces and typography live in
   design-refresh.css; native mobile navigation and form state remain intact. */
.af-workspace-shell #quick-form,
.af-workspace-shell .top-nav,
.af-workspace-shell #open-parameters,
.af-workspace-shell .af-submit-unchanged { display: none !important; }
.af-profile-bar { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.af-profile-mark { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--af-accent-soft, #a995ff12); color: var(--af-accent, #b8a8ed); }
.af-profile-mark svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.af-profile-copy { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 14px; min-width: 0; }
.af-profile-copy strong { color: var(--af-text, #f0edf8); font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.af-profile-copy > span { color: var(--af-muted, #a4acc0); font-size: 13px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.af-profile-edit { color: var(--af-accent, #d3c6ff); font-size: 13px; text-decoration: none; white-space: nowrap; padding: 10px 12px; margin-left: auto; border: 1px solid var(--af-line, #a68ee435); border-radius: 9px; transition: background 160ms ease, border-color 160ms ease; }
.af-profile-edit:hover { background: var(--af-accent-soft, #a995ff16); border-color: var(--af-accent, #aa90f2); }
.af-profile-empty .af-profile-edit { background: var(--af-accent-strong, #8060cb); border-color: var(--af-accent, #9979e4); color: #fff; }
.af-section-navigation { max-width: 1880px; margin: 0 auto 18px; }
.af-section-tabs { display: flex; align-items: center; gap: 6px; min-width: 0; width: fit-content; max-width: 100%; border-bottom: 1px solid var(--af-line, #a995ff26); }
.af-section-tabs[hidden], .af-section-navigation[hidden], .af-form-unchanged[hidden] { display: none !important; }
.af-section-tabs a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px 12px; color: var(--af-muted, #a4aec2); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.af-section-tabs a::after { content: ""; position: absolute; bottom: -1px; left: 16px; right: 16px; height: 2px; background: transparent; border-radius: 2px; }
.af-section-tabs a:hover { color: var(--af-text, #f4f0ff); }
.af-section-tabs a.active { color: var(--af-text, #e5dcff); }
.af-section-tabs a.active::after { background: var(--af-accent, #ad92ee); }
.af-form-unchanged { grid-column: 1 / -1; margin: 6px 0 0; color: var(--af-muted, #a4aec2); font-size: 13px; line-height: 1.6; }

@media (min-width: 981px) {
  body.af-workspace-shell { --header-h: 80px; }
  .af-workspace-shell .app-header { height: var(--header-h); gap: 20px; padding: 12px 24px; }
  .af-workspace-shell .app-header .brand { min-width: 156px; width: 156px; flex: 0 0 156px; justify-content: flex-start; }
  .af-workspace-shell .app-header .header-actions { margin-left: 0; }
  .af-workspace-shell .app-rail .rail-main { gap: 6px; }
  body.af-workspace-shell.rail-labels-visible .app-rail :is(a, button) { min-height: 52px !important; font-size: 14px !important; }
  body.af-workspace-shell.rail-labels-visible .app-rail :is(a, button) > span:not(.rail-icon) { max-width: 142px; }
  .af-workspace-shell .app-rail .rail-icon { border: 0; background: none; }
  .af-workspace-shell .app-rail .rail-icon svg { width: 21px; height: 21px; stroke-width: 1.6; }
}
@media (min-width: 981px) and (max-width: 1280px) {
  .af-profile-copy { display: grid; gap: 2px; }
  .af-profile-copy strong { max-width: 360px; }
  .af-workspace-shell .app-header .brand { min-width: 140px; width: 140px; flex-basis: 140px; }
}
@media (max-width: 980px) {
  .af-workspace-shell .app-header { display: flex !important; align-items: center !important; gap: 10px !important; padding-inline: 12px !important; }
  .af-workspace-shell .app-header .brand { min-width: 0 !important; width: 44px !important; flex: 0 0 44px !important; }
  .af-profile-bar { gap: 10px; }
  .af-profile-mark { display: none; }
  .af-profile-copy { display: grid; gap: 2px; }
  .af-profile-copy strong { font-size: 14px; max-width: none; }
  .af-profile-copy > span { font-size: 12px; }
  .af-profile-edit { font-size: 12px; min-height: 44px; display: inline-flex; align-items: center; padding: 8px 10px; }
  .af-workspace-shell .header-actions { display: none !important; }
  .af-section-navigation { margin-bottom: 14px; }
  .af-section-tabs { width: 100%; gap: 0; }
  .af-section-tabs a { padding: 9px 12px; font-size: 13px; justify-content: center; flex: 1; }
  .af-section-tabs a::after { left: 12px; right: 12px; }
}
@media (max-width: 540px) {
  .af-workspace-shell .app-header { gap: 8px !important; }
  .af-workspace-shell .app-header .brand { display: none !important; }
  .af-profile-copy > span { max-width: 43vw; }
  .af-profile-edit { font-size: 11px; padding-inline: 8px; }
  .af-section-tabs a { padding-inline: 10px; }
}
@media print {
  .af-profile-bar, .af-section-navigation { display: none !important; }
}
