/* ═══════════════════════════════════════════════════════════════════
   SHARED PAGE GRID
   ───────────────────────────────────────────────────────────────────
   The body paints the lattice via `body::before`, but every full-area
   module (Command Center, File Drop, Floor Mapper, Asset Hub, ObjTrain,
   Control Settings, CamLog, Tower Plan) covers it with its own opaque
   panel. This file repaints the same grid INSIDE those panels so the
   background stays common on every page, in both day and night mode.

   Implementation notes:
   • The grid is applied as `background-image` layers rather than a
     pseudo-element, so it always sits behind the panel's own content
     with no stacking-context surprises.
   • `background-attachment: fixed` locks the lattice to the viewport,
     so lines stay aligned with the body grid and with each other when
     you switch modules — no seam where a panel begins.
   • The grid is uniform across the viewport (no vignette), matching the
     reference screenshots.
   • Only background-image/size/repeat/attachment/position are set here.
     Each panel keeps its own background-COLOUR, so nothing else changes.

   Three cascade requirements — all of them matter:
   1. This stylesheet must load LAST (after every panel stylesheet), or
      the panels' `background:` shorthand would reset these image layers.
   2. Each ID is written twice. theme.css styles these same panels as
      `body.light-mode #panel {...}`, which outranks a plain `#panel`.
   3. `!important` is required because that theme.css rule is itself
      `background: ... !important`. Between two !important declarations
      the higher specificity wins, which is why (2) is needed as well.
      Without both, the grid silently disappears in day mode.
   ═══════════════════════════════════════════════════════════════════ */

#dashboard-overlay#dashboard-overlay,
#plan-upload-panel#plan-upload-panel,
#fp-module#fp-module,
#assets-panel#assets-panel,
#assets-mgmt-overlay#assets-mgmt-overlay,
#objtrain-panel#objtrain-panel,
#ctrl-settings-panel#ctrl-settings-panel,
#camlog-overlay#camlog-overlay,
#tower-plan-overlay#tower-plan-overlay {
  background-image:
    linear-gradient(var(--dt-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--dt-grid-line) 1px, transparent 1px) !important;
  background-size:
    var(--dt-grid-size) var(--dt-grid-size),
    var(--dt-grid-size) var(--dt-grid-size) !important;
  background-repeat: repeat, repeat !important;
  background-attachment: fixed, fixed !important;
  background-position: top left, top left !important;
}

/* Walk mode is a deliberately immersive full-screen view — no grid. */
#walk-overlay#walk-overlay { background-image: none !important; }
