/* 1080 x 1920 portrait wallboard. Keep Rig markup and data bindings intact. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: white; font-family: Arial, "Microsoft JhengHei", "微軟正黑體", sans-serif; font-variant-numeric: tabular-nums; }
input, button, select, textarea, table { font-family: inherit; font-variant-numeric: tabular-nums; }
body > form { position: relative; width: 1032px !important; height: auto !important; margin: 0 auto; padding-top: 20px; }
body > form > p { display: none; }
.dashboard-banner { position: relative; width: 2064px; zoom: .5; }
.rig-overview { width: 2064px; zoom: .5; }
.rig-legend { margin-top: 8px; font-size: 28px; line-height: 36px; }
.facility-panel { position: relative; width: 1032px; height: 447px; margin: 24px 0; }
.facility-heading { position: absolute; left: 0; top: 0; z-index: 2; display: flex; align-items: center; gap: 20px; height: 36px; }
.facility-title {
    margin: 0; font-family: inherit; font-size: 28px;
    font-weight: 400; line-height: 36px; text-align: left;
}
.facility-actions { display: flex; align-items: center; gap: 10px; }
.facility-actions > span, .facility-actions > input {
    position: static !important; width: auto !important; height: 22px !important;
    font-size: 14px !important; line-height: 22px; white-space: nowrap;
}
.facility-actions > input { padding: 0 10px; }
#btBackgroundReset, #Chart, #btInformation {
    -webkit-appearance: none; appearance: none;
    color: #08121c; -webkit-text-fill-color: currentColor; opacity: 1;
}
.facility-actions > input[id$="PLCFaci"] { width: 10px !important; height: 5px !important; padding: 0; }
/* The pipe bitmap and every original sensor coordinate share one uniform scale.
   Do not override individual label fonts, widths, or transforms here. */
.facility-original { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform: scale(.62); transform-origin: top left; }
.facility-room3 { height: 412px; overflow: hidden; }
.facility-original > img { display: block; }
/* clip-path creates a stacking context: keep every live overlay above the bitmap. */
.facility-original > img, .facility-room2-original > img {
    position: absolute; left: 0; top: 0; z-index: 0;
}
.facility-original > span, .facility-original > input,
.facility-room2-original > span, .facility-room2-original > input { z-index: 1; }
/* Keep P08's value box clear of the next alarm row at the original coordinates. */
.facility-room3 > .facility-original > span[id$="lbP08"] { line-height: 1; }
.facility-room2 { height: 395px; }
.facility-room2-original { position: absolute; left: 0; top: 0; width: 1032px; height: 395px; transform: none; transform-origin: top left; }
/* An alarm must not resize the pipe layer underneath live sensor overlays. */
.facility-original > img.alarm-frame, .facility-room2-original > img.alarm-frame {
    border: 0; outline: 5px solid red; outline-offset: -5px;
    animation: wallboard-alarm-outline 1s step-end infinite;
}
@keyframes wallboard-alarm-outline {
    0%, 49% { outline-color: red; }
    50%, 100% { outline-color: white; }
}
/* Energy detail stays below the 1080 x 1920 wallboard viewport. */
.power-overview { position: relative; width: 1032px; margin-top: 24px; padding-bottom: 24px; clear: both; }
.power-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.power-overview h1 { margin: 0 0 2px; font-size: 18px; line-height: 20px; }
.power-overview table { width: 100%; border-collapse: collapse; }
.power-overview th { width: auto !important; }
.power-overview tr { font-size: 13px !important; line-height: 14px; }
.power-overview th, .power-overview td { padding: 1px 8px; font-size: 13px; line-height: 14px; }
.power-overview td span, .power-overview td input { font-size: 13px !important; line-height: 14px; }
.power-overview td input {
    padding: 0 4px; height: 16px !important; vertical-align: middle;
    -webkit-appearance: none; appearance: none;
    background-color: #e9edf2; color: #111820;
    -webkit-text-fill-color: currentColor; cursor: pointer;
}
.power-overview td input:focus-visible { outline: 2px solid #008bd2; outline-offset: 2px; }
@media (max-width: 1031px) {
    /* Preserve pipe/value registration on smaller displays; target kiosk is 1080px. */
    form { margin-left: 0; }
}

/* Extend room 1 pipes without changing symbol proportions or room height. */
.facility-room1 > .facility-original { width: 1664px; }
