#dashboard .map-panel { grid-template-rows: auto auto !important; }
#dashboard #greenhouseMap { display: block !important; padding: 0 !important; border: 0; background: transparent !important; }
.lm-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 0 0 12px; border-bottom: 1px solid #27434a; }
.lm-views { display: flex; gap: 3px; }
.lm-views button { background: transparent; color: #94b2ba; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; cursor: pointer; font: 13px var(--font-body, sans-serif); }
.lm-views button[aria-pressed=true] { color: #8af1d2; border-color: #63dbc2; background: #102d31; }
.lm-toolbar label { display: flex; align-items: center; gap: 8px; color: #9fb9bf; font-size: 12px; }
.lm-toolbar select { width: 94px; min-height: 34px; padding: 5px 8px; font-size: 12px; }
.lm-toolbar a { margin-left: auto; color: #8cdde6; font-size: 12px; }
.lm-layers { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding: 12px 0; color: #b5cbd0; font-size: 12px; }
.lm-layers label { display: inline-flex; align-items: center; gap: 5px; }
.lm-layers input { width: 14px; height: 14px; accent-color: #58dbbc; }
.lm-layers button { border: 1px solid #315564; color: #b8e9ef; background: #10232d; padding: 7px 10px; font-size: 12px; cursor: pointer; }
#dashboard #greenhouseMap.lm-expanded { position: fixed; inset: 16px; z-index: 100; padding: 20px !important; overflow: auto !important; background: #06131b !important; width: auto; height: auto !important; box-shadow: 0 0 0 30px #02080eef; }
.lm-expanded .lm-drawing { max-width: 1100px; margin: auto; }
.lm-expanded .lm-toolbar { position: sticky; top: -20px; z-index: 2; background: #06131b; padding-top: 12px; }
.lm-layers > span { margin-left: auto; color: #dab574; font: 10px var(--font-data); }
.lm-drawing { width: 100%; background: #040e15; aspect-ratio: 11 / 8; overflow: hidden; }
.lm-drawing svg { width: 100%; height: 100%; display: block; }
.lm-drawing svg text { font-family: var(--font-data, monospace); }
.lm-slab { fill: #13232b; stroke: #385260; stroke-width: 2; }
.lm-envelope { fill: #07191f; stroke: #68b9c6; stroke-width: 3; }
.lm-zone-bands rect { fill: #0e2a3280; stroke: #325d6577; stroke-dasharray: 4 8; }
.lm-zone-bands .lm-core-zone { fill: #14362980; }
.lm-aisles { fill: none; stroke: #598d8666; stroke-width: 45; }
.lm-roof-guide { stroke: #779eae50; stroke-width: 1.5; fill: none; stroke-dasharray: 4 6; }
.lm-tower { stroke: #5c988678; stroke-width: 1.5; fill: #21483855; }
.lm-desk { fill: #253b44; stroke: #6c939e; stroke-width: 2; }
.lm-door { stroke: #a4d3dd; stroke-width: 2; fill: none; }
.lm-windows { stroke: #93b6c5; stroke-width: 5; }
.lm-dimension { stroke: #7395a4; stroke-width: 1; fill: none; }
.lm-dimension text, .lm-dimension-label { fill: #a6c1ca; stroke: none; font-size: 17px; }
.lm-caption { fill: #c6e7ee; font-size: 15px; }
.lm-small { fill: #87a8b5; font-size: 13px; }
.lm-zone-text { fill: #91bbbc; font-size: 13px; }
.lm-marker { cursor: pointer; outline: none; }
.lm-marker > circle, .lm-marker > rect, .lm-marker > path { fill: #06171f; stroke: currentColor; stroke-width: 2; }
.lm-marker text { fill: currentColor; font-size: 14px; font-weight: 700; pointer-events: none; }
.lm-marker:hover > :is(circle, rect, path), .lm-marker:focus > :is(circle, rect, path), .lm-selected > circle, .lm-selected > rect, .lm-selected > path { stroke-width: 4; fill: #20403f; }
.lm-ok { color: #81dfb5; }
.lm-warn { color: #ffc46a; }
.lm-risk { color: #ff7f8c; }
.lm-on { color: #5ce7ff; }
.lm-off { color: #859aa5; }
.lm-unknown { color: #9b9aaf; }
.lm-unknown > circle, .lm-unknown > rect { stroke-dasharray: 4 3; }
.lm-leader { fill: none; stroke: #758c9977; stroke-dasharray: 3 4; stroke-width: 1.5; pointer-events: none; }
.lm-marker .lm-active-ring { fill: none; opacity: .45; stroke-width: 1; animation: lmPulse 2.8s ease-in-out infinite; }
.lm-light-line { fill: none; stroke: #736887; stroke-width: 4; opacity: .35; }
.lm-light-line.is-on { stroke: #d692ff; opacity: .9; }
.lm-water { stroke: #427593; fill: none; stroke-width: 3; opacity: .4; }
.lm-water.is-on { stroke: #5cceff; opacity: .9; stroke-dasharray: 10 8; animation: lmFlow 3s linear infinite; }
.lm-air { stroke: #4e8396; fill: none; stroke-width: 3; opacity: .25; stroke-dasharray: 10 15; }
.lm-air.is-on { opacity: .9; stroke: #8df6e1; animation: lmFlow 2s linear infinite; }
.lm-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 11px; padding: 12px 0; border-bottom: 1px solid #213e49; }
.lm-inspector { padding: 12px 0; border-top: 1px solid #213e49; }
.lm-inspector-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lm-inspector-heading strong { font-size: 16px; }
.lm-state { font-size: 11px; }
.lm-inspector dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 14px 0; gap: 12px; }
.lm-inspector dt { color: #97b6bf; font-size: 11px; }
.lm-inspector dd { margin: 4px 0 0; color: #daf4f8; font: 16px var(--font-data); }
.lm-inspector p, .lm-inspector summary { font-size: 12px; color: #9cb8c1; line-height: 1.5; }
.lm-inspector summary { cursor: pointer; }
.lm-inspector details p { padding: 6px 0; }
.lm-consensus { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; border-top: 1px solid #28464d; padding-top: 14px; }
.lm-consensus span { font-size: 10px; color: #96b9bf; display: block; }
.lm-consensus strong { font: 14px var(--font-data); display: block; margin-top: 7px; }
.lm-consensus small { font-size: 11px; color: #9cb7bf; display: block; margin-top: 4px; }
.lm-source-note { font-size: 10px; line-height: 1.5; color: #8fa8b0; margin: 14px 0 0; }
@keyframes lmPulse { 50% { opacity: .12; } }
@keyframes lmFlow { to { stroke-dashoffset: -100; } }
@media (prefers-reduced-motion: reduce) { .lm-active-ring, .lm-water, .lm-air { animation: none !important; } }
@media(max-width: 760px) {
  .lm-drawing { aspect-ratio: auto; overflow: auto; max-height: 520px; }
  .lm-drawing svg { width: 740px; height: 538px; max-width: none; }
  .lm-toolbar { gap: 9px; }
  .lm-toolbar a { margin: 0; }
  .lm-inspector dl, .lm-consensus { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lm-inspector-heading { align-items: start; flex-direction: column; }
}

/* Fit the complete architectural envelope; detail stays outside the drawing. */
#dashboard .dashboard-layout { grid-template-columns: minmax(0, 1fr) !important; }
#dashboard .dashboard-layout > .decision-panel { grid-column: 1 !important; grid-row: 2 !important; }
#dashboard #greenhouseMap { display: grid !important; grid-template-columns: minmax(0, 1fr) 290px !important; gap: 10px 18px !important; }
.lm-toolbar { grid-column: 1 / -1; grid-row: 1; }
.lm-layers { grid-column: 1 / -1; grid-row: 2; padding: 0; }
.lm-drawing { grid-column: 1; grid-row: 3; aspect-ratio: auto; height: clamp(320px, 48vh, 640px); min-width: 0; }
.lm-inspector { grid-column: 2; grid-row: 3 / 6; min-width: 0; padding: 12px; border: 1px solid #27434a; align-self: stretch; overflow: auto; max-height: 650px; }
.lm-inspector dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lm-inspector-heading { flex-direction: column; align-items: flex-start; }
.lm-picker { display: block; font-size: 12px; color: #99bbc5; margin-bottom: 18px; }
.lm-picker select { display: block; width: 100%; min-width: 0; margin-top: 8px; font-size: 13px; }
.lm-commands > strong, .lm-evaluation > strong { display: block; font-size: 13px; margin: 16px 0 8px; }
.lm-commands > div { display: flex; flex-wrap: wrap; gap: 8px; }
.lm-commands button { padding: 9px 11px; font-size: 13px; background: #12353e; color: #c5f6ed; border: 1px solid #417b83; cursor: pointer; }
.lm-commands button:disabled { opacity: .45; cursor: not-allowed; }
.lm-legend { grid-column: 1; grid-row: 4; }
.lm-consensus { grid-column: 1; grid-row: 5; }
.lm-source-note { grid-column: 1 / -1; grid-row: 6; margin: 0; }
#dashboard #greenhouseMap.lm-expanded { grid-template-rows: auto auto minmax(0, 1fr) auto auto auto !important; overflow: hidden !important; }
.lm-expanded .lm-drawing { width: 100%; height: 100%; max-width: none; min-height: 0; }
.lm-expanded .lm-inspector { max-height: none; }
.lm-expanded .lm-toolbar { position: static; }
#dashboard #greenhouseMap:fullscreen { inset: 0; width: 100vw !important; height: 100vh !important; max-height: none !important; box-sizing: border-box; }
@media(max-width: 760px) {
  #dashboard #greenhouseMap { grid-template-columns: minmax(0, 1fr) !important; }
  .lm-drawing { height: 300px; overflow: hidden; }
  .lm-drawing svg { width: 100%; height: 100%; max-width: 100%; }
  .lm-inspector { grid-column: 1; grid-row: 6; max-height: none; }
  .lm-source-note { grid-row: 7; }
  #dashboard #greenhouseMap.lm-expanded { inset: 4px; padding: 12px !important; overflow: auto !important; grid-template-rows: auto auto 320px auto auto auto auto !important; }
}
