.home-production-content { position: relative; }
.home-production-content > .home-brazil-map-loading { top: min(220px, 25dvh); }
.home-production-panel[aria-busy='true'] > .home-production-panel-heading,
.home-production-panel[aria-busy='true'] > .home-production-source,
.home-production-panel[aria-busy='true'] .home-production-content > :not(.home-brazil-map-loading) {
  visibility: hidden;
}
.home-map-viewport { overflow: hidden; border-radius: 14px; isolation: isolate; }
.home-brazil-map-loading {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 16px;
  box-sizing: border-box;
  width: 296px;
  max-width: calc(100% - 32px);
  padding: 22px 20px;
  overflow: hidden;
  transform: translate(-50%, -50%);
  border: 1px solid var(--ui-border-strong);
  border-radius: 0;
  background: color-mix(in srgb, var(--ui-panel) 96%, transparent);
  box-shadow: 0 12px 36px rgb(0 0 0 / 12%);
  color: var(--ui-text);
  backdrop-filter: blur(16px);
  pointer-events: none;
}
.home-brazil-map-loading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 42%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ui-secondary), transparent);
  animation: home-map-loading-sweep 2s cubic-bezier(.4, 0, .2, 1) infinite;
}
.home-brazil-map-spinner {
  position: relative;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 1px solid var(--ui-border);
  border-radius: 0;
  background-color: var(--ui-raised);
  background-image: linear-gradient(var(--ui-border) 1px, transparent 1px), linear-gradient(90deg, var(--ui-border) 1px, transparent 1px);
  background-size: 12px 12px;
  background-position: center;
  color: var(--ui-secondary);
}
.home-brazil-map-spinner::before,
.home-brazil-map-spinner span,
.home-brazil-map-spinner::after {
  position: absolute;
  top: 13px;
  width: 3px;
  height: 22px;
  background: currentColor;
  transform-origin: center bottom;
  animation: home-map-loading-wave 1.2s ease-in-out infinite;
}
.home-brazil-map-spinner::before { content: ''; left: 14px; animation-delay: -.8s; }
.home-brazil-map-spinner span { left: 22px; animation-delay: -.4s; }
.home-brazil-map-spinner::after { content: ''; left: 30px; }
.home-brazil-map-loading-copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 5px;
}
.home-brazil-map-loading-copy strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.4;
}
.home-brazil-map-loading-copy small {
  color: var(--ui-muted);
  font-size: 12px;
  line-height: 1.5;
}
@keyframes home-map-loading-wave {
  0%, 100% { transform: scaleY(.35); opacity: .45; }
  50% { transform: scaleY(1); opacity: 1; }
}
@keyframes home-map-loading-sweep {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(345%); }
}
@media (prefers-reduced-motion: reduce) {
  .home-brazil-map-spinner::before,
  .home-brazil-map-spinner span,
  .home-brazil-map-spinner::after,
  .home-brazil-map-loading::after { animation: none; }
  .home-brazil-map-spinner::before { transform: scaleY(.55); }
  .home-brazil-map-spinner::after { transform: scaleY(.75); }
  .home-brazil-map-loading::after { left: 29%; }
}
.home-map-viewport .home-brazil-map { overflow: hidden; cursor: grab; touch-action: none; outline: none; }
.home-map-viewport.is-dragging .home-brazil-map { cursor: grabbing; }
.home-map-viewport .home-brazil-map:focus-visible { outline: 1px solid var(--ui-muted); outline-offset: -2px; border-radius: 14px; }
.home-map-controls { position: absolute; z-index: 3; top: 1px; right: 1px; display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--ui-border); border-radius: 999px; background: var(--ui-panel); box-shadow: 0 3px 10px rgb(0 0 0 / 8%); }
.home-map-controls button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 29px; height: 29px; padding: 0 7px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--ui-secondary); font: inherit; font-size: 11px; cursor: pointer; }
.home-map-controls button:hover:not(:disabled), .home-map-controls button.is-active { border-color: var(--ui-border-strong); background: var(--ui-raised); color: var(--ui-text); }
.home-map-controls button:disabled { opacity: .35; cursor: default; }
.home-map-controls button:focus-visible { outline: 2px solid var(--ui-muted); outline-offset: 2px; }
.home-map-depth use { fill: color-mix(in srgb, var(--home-map-state) 55%, #080c13); stroke: color-mix(in srgb, var(--home-map-stroke) 45%, #080c13); stroke-width: .6; stroke-linejoin: round; }
.home-map-depth use.is-production { fill: color-mix(in srgb, var(--home-map-production) 65%, #080c13); }
.home-map-viewport.is-3d .home-map-camera { filter: drop-shadow(0 7px 7px rgb(0 0 0 / 18%)); }
.home-map-gesture-hint { position: absolute; bottom: 6px; left: 4px; right: 4px; color: var(--ui-muted); font-size: 10px; line-height: 1.5; text-align: center; pointer-events: none; }
@media (max-width: 560px) {
  .home-map-controls button { min-width: 32px; height: 32px; }
}

.home-factory-pin.is-interactive { cursor: pointer; }
.home-factory-pin.is-interactive:focus, .home-factory-pin.is-interactive:focus-visible { outline: 0 !important; }
.home-factory-pin.is-interactive:focus-visible .home-factory-pin-marker { stroke: #fff; stroke-width: 5; }
.home-factory-pin.is-interactive:hover .home-factory-pin-marker { r: 11; }

.machinery-modal-backdrop { position: fixed; z-index: 10000; inset: 0; display: grid; place-items: center; padding: clamp(8px, 1.6vw, 22px); background: transparent; }
.machinery-modal-dialog { display: flex; flex-direction: column; width: min(1040px, 100%); max-height: min(720px, calc(100dvh - 32px)); overflow: hidden; border: 0; border-radius: 12px; background: transparent; color: #f4f5f6; box-shadow: none; }
.machinery-modal-heading { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 20px; padding: 7px 14px; border: 0; background: transparent; }
.machinery-modal-heading .ops-overline { color: #aeb5bf; font-size: 9px; letter-spacing: .12em; }
.machinery-modal-close { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border: 1px solid #363a3f; background: #1b1e21; color: #e4e4e7; font: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.machinery-modal-close:hover { background: #292d31; }
.machinery-modal-content { min-height: 0; overflow: auto; overscroll-behavior: contain; }
#workspace-content .machinery-modal-content .machinery-page { box-sizing: border-box; width: 100%; max-width: none; padding: 8px 14px 14px; }
#workspace-content .machinery-modal-content .machinery-layout.is-embedded { grid-template-columns: minmax(0, 1fr); gap: 0; }
#workspace-content .machinery-modal-content .machinery-stage { height: min(64vh, 600px); min-height: 320px; }
@media (max-width: 840px) {
  .machinery-modal-backdrop { padding: 0; }
  .machinery-modal-dialog { width: 100%; max-height: 100dvh; border: 0; border-radius: 0; }
  .machinery-modal-heading { padding: 10px 14px; }
  #workspace-content .machinery-modal-content .machinery-page { padding: 4px 8px 8px; }
  #workspace-content .machinery-modal-content .machinery-stage { height: 58vh; min-height: 280px; }
}
